SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MSLink.cpp
Go to the documentation of this file.
1 /****************************************************************************/
10 // A connnection between lanes
11 /****************************************************************************/
12 // SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/
13 // Copyright (C) 2001-2014 DLR (http://www.dlr.de/) and contributors
14 /****************************************************************************/
15 //
16 // This file is part of SUMO.
17 // SUMO is free software: you can redistribute it and/or modify
18 // it under the terms of the GNU General Public License as published by
19 // the Free Software Foundation, either version 3 of the License, or
20 // (at your option) any later version.
21 //
22 /****************************************************************************/
23 
24 // ===========================================================================
25 // included modules
26 // ===========================================================================
27 #ifdef _MSC_VER
28 #include <windows_config.h>
29 #else
30 #include <config.h>
31 #endif
32 
33 #include <iostream>
34 #include <algorithm>
35 #include <limits>
37 #include "MSNet.h"
38 #include "MSLink.h"
39 #include "MSLane.h"
40 #include "MSPerson.h"
41 #include "MSEdge.h"
42 #include "MSGlobals.h"
43 #include "MSVehicle.h"
44 #include "MSPModel.h"
45 
46 #ifdef CHECK_MEMORY_LEAKS
47 #include <foreign/nvwa/debug_new.h>
48 #endif // CHECK_MEMORY_LEAKS
49 
50 //#define MSLink_DEBUG_CROSSING_POINTS
51 
52 // ===========================================================================
53 // static member variables
54 // ===========================================================================
56 
57 
58 // ===========================================================================
59 // member method definitions
60 // ===========================================================================
61 #ifndef HAVE_INTERNAL_LANES
62 MSLink::MSLink(MSLane* succLane, LinkDirection dir, LinkState state, SUMOReal length) :
63  myLane(succLane),
64  myIndex(-1),
65  myState(state),
66  myDirection(dir),
67  myLength(length),
68  myHasFoes(false),
69  myAmCont(false),
70  myJunction(0)
71 #else
72 MSLink::MSLink(MSLane* succLane, MSLane* via, LinkDirection dir, LinkState state, SUMOReal length) :
73  myLane(succLane),
74  myIndex(-1),
75  myState(state),
76  myDirection(dir),
77  myLength(length),
78  myHasFoes(false),
79  myAmCont(false),
80  myJunctionInlane(via),
81  myJunction(0)
82 #endif
83 {}
84 
85 
87 
88 
89 void
90 MSLink::setRequestInformation(int index, bool hasFoes, bool isCont,
91  const std::vector<MSLink*>& foeLinks,
92  const std::vector<MSLane*>& foeLanes,
93  MSLane* internalLaneBefore) {
94  myIndex = index;
96  myAmCont = isCont;
97  myFoeLinks = foeLinks;
98  myFoeLanes = foeLanes;
99  myJunction = myLane->getEdge().getFromJunction(); // junctionGraph is initialized after the whole network is loaded
100 #ifdef MSLink_DEBUG_CROSSING_POINTS
101  std::cout << " link " << myIndex << " to " << getViaLaneOrLane()->getID() << " has foes: " << toString(foeLanes) << "\n";
102 #endif
103 #ifdef HAVE_INTERNAL_LANES
104  MSLane* lane = 0;
105  if (internalLaneBefore != 0) {
106  // this is an exit link. compute crossing points with all foeLanes
107  lane = internalLaneBefore;
108  //} else if (myLane->getEdge().isCrossing()) {
109  // // this is the link to a pedestrian crossing. compute crossing points with all foeLanes
110  // // @note not currently used by pedestrians
111  // lane = myLane;
112  }
113  if (lane != 0) {
114  for (std::vector<MSLane*>::const_iterator it_lane = myFoeLanes.begin(); it_lane != myFoeLanes.end(); ++it_lane) {
115  if (myLane == (*it_lane)->getLinkCont()[0]->getLane() && !lane->getLinkCont()[0]->getViaLaneOrLane()->getEdge().isInternal()) {
116  //if (myLane == (*it_lane)->getLinkCont()[0]->getLane()) {
117  // this foeLane has the same target and merges at the end (lane exits the junction)
118  myLengthsBehindCrossing.push_back(std::make_pair(0, 0)); // dummy value, never used
119 #ifdef MSLink_DEBUG_CROSSING_POINTS
120  std::cout
121  << " " << lane->getID()
122  << " merges with " << (*it_lane)->getID()
123  << " nextLane " << lane->getLinkCont()[0]->getViaLaneOrLane()->getID()
124  << " dist1=" << myLengthsBehindCrossing.back().first
125  << " dist2=" << myLengthsBehindCrossing.back().second
126  << "\n";
127 #endif
128  } else {
129  std::vector<SUMOReal> intersections1 = lane->getShape().intersectsAtLengths2D((*it_lane)->getShape());
130  //std::cout << " number of intersections1=" << intersections1.size() << "\n";
131  if (intersections1.size() == 0) {
132  intersections1.push_back(10000.0); // disregard this foe (using maxdouble leads to nasty problems down the line)
133  } else if (intersections1.size() > 1) {
134  std::sort(intersections1.begin(), intersections1.end());
135  }
136  std::vector<SUMOReal> intersections2 = (*it_lane)->getShape().intersectsAtLengths2D(lane->getShape());
137  //std::cout << " number of intersections2=" << intersections2.size() << "\n";
138  if (intersections2.size() == 0) {
139  intersections2.push_back(0);
140  } else if (intersections2.size() > 1) {
141  std::sort(intersections2.begin(), intersections2.end());
142  }
143  myLengthsBehindCrossing.push_back(std::make_pair(
144  lane->getLength() - intersections1.back(),
145  (*it_lane)->getLength() - intersections2.back()));
146 #ifdef MSLink_DEBUG_CROSSING_POINTS
147  std::cout
148  << " intersection of " << lane->getID()
149  << " totalLength=" << lane->getLength()
150  << " with " << (*it_lane)->getID()
151  << " totalLength=" << (*it_lane)->getLength()
152  << " dist1=" << myLengthsBehindCrossing.back().first
153  << " dist2=" << myLengthsBehindCrossing.back().second
154  << "\n";
155 #endif
156  }
157  }
158  }
159 #else
160  UNUSED_PARAMETER(internalLaneBefore);
161 #endif
162 }
163 
164 
165 void
166 MSLink::setApproaching(const SUMOVehicle* approaching, const SUMOTime arrivalTime, const SUMOReal arrivalSpeed, const SUMOReal leaveSpeed,
167  const bool setRequest, const SUMOTime arrivalTimeBraking, const SUMOReal arrivalSpeedBraking, const SUMOTime waitingTime) {
168  const SUMOTime leaveTime = getLeaveTime(arrivalTime, arrivalSpeed, leaveSpeed, approaching->getVehicleType().getLength());
169  myApproachingVehicles.insert(std::make_pair(approaching,
170  ApproachingVehicleInformation(arrivalTime, leaveTime, arrivalSpeed, leaveSpeed, setRequest,
171  arrivalTimeBraking, arrivalSpeedBraking, waitingTime)));
172 }
173 
174 
175 void
177  myBlockedFoeLinks.insert(link);
178 }
179 
180 
181 
182 bool
184  for (std::set<MSLink*>::const_iterator i = myBlockedFoeLinks.begin(); i != myBlockedFoeLinks.end(); ++i) {
185  if ((*i)->isBlockingAnyone()) {
186  return true;
187  }
188  }
189  return false;
190 }
191 
192 
193 void
195  myApproachingVehicles.erase(veh);
196 }
197 
198 
201  std::map<const SUMOVehicle*, ApproachingVehicleInformation>::const_iterator i = myApproachingVehicles.find(veh);
202  if (i != myApproachingVehicles.end()) {
203  return i->second;
204  } else {
205  return ApproachingVehicleInformation(-1000, -1000, 0, 0, false, -1000, 0, 0);
206  }
207 }
208 
209 
210 SUMOTime
211 MSLink::getLeaveTime(const SUMOTime arrivalTime, const SUMOReal arrivalSpeed,
212  const SUMOReal leaveSpeed, const SUMOReal vehicleLength) const {
213  return arrivalTime + TIME2STEPS((getLength() + vehicleLength) / MAX2((SUMOReal)0.5 * (arrivalSpeed + leaveSpeed), NUMERICAL_EPS));
214 }
215 
216 
217 bool
218 MSLink::opened(SUMOTime arrivalTime, SUMOReal arrivalSpeed, SUMOReal leaveSpeed, SUMOReal vehicleLength,
219  SUMOReal impatience, SUMOReal decel, SUMOTime waitingTime,
220  std::vector<const SUMOVehicle*>* collectFoes) const {
221  if (haveRed()) {
222  return false;
223  }
225  return true;
226  }
227  if ((myState == LINKSTATE_STOP || myState == LINKSTATE_ALLWAY_STOP) && waitingTime == 0) {
228  return false;
229  }
230  const SUMOTime leaveTime = getLeaveTime(arrivalTime, arrivalSpeed, leaveSpeed, vehicleLength);
231  for (std::vector<MSLink*>::const_iterator i = myFoeLinks.begin(); i != myFoeLinks.end(); ++i) {
232 #ifdef HAVE_INTERNAL
234  if ((*i)->haveRed()) {
235  continue;
236  }
237  }
238 #endif
239  if ((*i)->blockedAtTime(arrivalTime, leaveTime, arrivalSpeed, leaveSpeed, myLane == (*i)->getLane(),
240  impatience, decel, waitingTime, collectFoes)) {
241  return false;
242  }
243  }
244  return true;
245 }
246 
247 
248 bool
249 MSLink::blockedAtTime(SUMOTime arrivalTime, SUMOTime leaveTime, SUMOReal arrivalSpeed, SUMOReal leaveSpeed,
250  bool sameTargetLane, SUMOReal impatience, SUMOReal decel, SUMOTime waitingTime,
251  std::vector<const SUMOVehicle*>* collectFoes) const {
252  for (std::map<const SUMOVehicle*, ApproachingVehicleInformation>::const_iterator i = myApproachingVehicles.begin(); i != myApproachingVehicles.end(); ++i) {
253  if (!i->second.willPass) {
254  continue;
255  }
257  assert(waitingTime > 0);
258  if (waitingTime > i->second.waitingTime) {
259  continue;
260  }
261  if (waitingTime == i->second.waitingTime && arrivalTime < i->second.arrivalTime) {
262  continue;
263  }
264  }
265  const SUMOTime foeArrivalTime = (SUMOTime)((1.0 - impatience) * i->second.arrivalTime + impatience * i->second.arrivalTimeBraking);
266  if (i->second.leavingTime < arrivalTime) {
267  // ego wants to be follower
268  if (sameTargetLane && (arrivalTime - i->second.leavingTime < myLookaheadTime
269  || unsafeMergeSpeeds(i->second.leaveSpeed, arrivalSpeed,
270  i->first->getVehicleType().getCarFollowModel().getMaxDecel(), decel))) {
271  if (collectFoes == 0) {
272  return true;
273  } else {
274  collectFoes->push_back(i->first);
275  }
276  }
277  } else if (foeArrivalTime > leaveTime) {
278  // ego wants to be leader.
279  if (sameTargetLane && (foeArrivalTime - leaveTime < myLookaheadTime
280  || unsafeMergeSpeeds(leaveSpeed, i->second.arrivalSpeedBraking,
281  decel, i->first->getVehicleType().getCarFollowModel().getMaxDecel()))) {
282  if (collectFoes == 0) {
283  return true;
284  } else {
285  collectFoes->push_back(i->first);
286  }
287  }
288  } else {
289  // even without considering safeHeadwayTime there is already a conflict
290  if (collectFoes == 0) {
291  return true;
292  } else {
293  collectFoes->push_back(i->first);
294  }
295  }
296  }
297  return false;
298 }
299 
300 
301 bool
303  MSVehicle* veh = lane->getLastVehicle();
304  SUMOReal distLeft = 0;
305  if (veh == 0) {
306  veh = lane->getPartialOccupator();
307  distLeft = lane->getLength() - lane->getPartialOccupatorEnd();
308  } else {
309  distLeft = lane->getLength() - veh->getPositionOnLane() + veh->getVehicleType().getLength();
310  }
311  if (veh == 0) {
312  return false;
313  } else {
314  assert(distLeft > 0);
315  // can we be sure that the vehicle leaves this lane in the next step?
316  bool result = distLeft > (veh->getSpeed() - veh->getCarFollowModel().getMaxDecel());
317  return result;
318  }
319 }
320 
321 
322 bool
323 MSLink::hasApproachingFoe(SUMOTime arrivalTime, SUMOTime leaveTime, SUMOReal speed, SUMOReal decel) const {
324  for (std::vector<MSLink*>::const_iterator i = myFoeLinks.begin(); i != myFoeLinks.end(); ++i) {
325  if ((*i)->blockedAtTime(arrivalTime, leaveTime, speed, speed, myLane == (*i)->getLane(), 0, decel, 0)) {
326  return true;
327  }
328  }
329  for (std::vector<MSLane*>::const_iterator i = myFoeLanes.begin(); i != myFoeLanes.end(); ++i) {
330  if ((*i)->getVehicleNumber() > 0 || (*i)->getPartialOccupator() != 0) {
331  return true;
332  }
333  }
334  return false;
335 }
336 
337 
340  return myDirection;
341 }
342 
343 
344 void
346  myState = state;
347 }
348 
349 
350 MSLane*
352  return myLane;
353 }
354 
355 
356 bool
358 #ifdef HAVE_INTERNAL_LANES
359  if (myJunctionInlane == 0 || myAmCont) {
360  return false;
361  } else {
362  MSLane* pred = myJunctionInlane->getLogicalPredecessorLane();
364  return false;
365  } else {
366  MSLane* pred2 = pred->getLogicalPredecessorLane();
367  assert(pred2 != 0);
368  MSLink* predLink = MSLinkContHelper::getConnectingLink(*pred2, *pred);
369  assert(predLink != 0);
370  return predLink->havePriority();
371  }
372  }
373 #else
374  return false;
375 #endif
376 }
377 
378 
379 void
380 MSLink::writeApproaching(OutputDevice& od, const std::string fromLaneID) const {
381  if (myApproachingVehicles.size() > 0) {
382  od.openTag("link");
383  od.writeAttr(SUMO_ATTR_FROM, fromLaneID);
384 #ifdef HAVE_INTERNAL_LANES
385  const std::string via = getViaLane() == 0 ? "" : getViaLane()->getID();
386 #else
387  const std::string via = "";
388 #endif
389  od.writeAttr(SUMO_ATTR_VIA, via);
390  od.writeAttr(SUMO_ATTR_TO, getLane() == 0 ? "" : getLane()->getID());
391  std::vector<std::pair<SUMOTime, const SUMOVehicle*> > toSort; // stabilize output
392  for (std::map<const SUMOVehicle*, ApproachingVehicleInformation>::const_iterator it = myApproachingVehicles.begin(); it != myApproachingVehicles.end(); ++it) {
393  toSort.push_back(std::make_pair(it->second.arrivalTime, it->first));
394  }
395  std::sort(toSort.begin(), toSort.end());
396  for (std::vector<std::pair<SUMOTime, const SUMOVehicle*> >::const_iterator it = toSort.begin(); it != toSort.end(); ++it) {
397  od.openTag("approaching");
398  const ApproachingVehicleInformation& avi = myApproachingVehicles.find(it->second)->second;
399  od.writeAttr(SUMO_ATTR_ID, it->second->getID());
400  od.writeAttr(SUMO_ATTR_IMPATIENCE, it->second->getImpatience());
401  od.writeAttr("arrivalTime", time2string(avi.arrivalTime));
402  od.writeAttr("arrivalTimeBraking", time2string(avi.arrivalTimeBraking));
403  od.writeAttr("leaveTime", time2string(avi.leavingTime));
404  od.writeAttr("arrivalSpeed", toString(avi.arrivalSpeed));
405  od.writeAttr("arrivalSpeedBraking", toString(avi.arrivalSpeedBraking));
406  od.writeAttr("leaveSpeed", toString(avi.leaveSpeed));
407  od.writeAttr("willPass", toString(avi.willPass));
408  od.closeTag();
409  }
410  od.closeTag();
411  }
412 }
413 
414 
415 #ifdef HAVE_INTERNAL_LANES
416 MSLane*
417 MSLink::getViaLane() const {
418  return myJunctionInlane;
419 }
420 
421 
423 MSLink::getLeaderInfo(SUMOReal dist, SUMOReal minGap, std::vector<const MSPerson*>* collectBlockers) const {
424  LinkLeaders result;
425  // this link needs to start at an internal lane (either an exit link or between two internal lanes)
427  (myJunctionInlane == 0 && getLane()->getEdge().getPurpose() != MSEdge::EDGEFUNCTION_INTERNAL)
428  || (myJunctionInlane != 0 && myJunctionInlane->getLogicalPredecessorLane()->getEdge().isInternal()))) {
429  //std::cout << " getLeaderInfo link=" << getViaLaneOrLane()->getID() << "\n";
430  // this is an exit link
431  for (size_t i = 0; i < myFoeLanes.size(); ++i) {
432  MSLane* foeLane = myFoeLanes[i];
433  // distance from the querying vehicle to the crossing point with foeLane
434  const SUMOReal distToCrossing = dist - myLengthsBehindCrossing[i].first;
435  //std::cout << " distToCrossing=" << distToCrossing << " foeLane=" << foeLane->getID() << "\n";
436  if (distToCrossing < 0) {
437  continue; // vehicle is behind the crossing point, continue with next foe lane
438  }
439  const SUMOReal foeDistToCrossing = foeLane->getLength() - myLengthsBehindCrossing[i].second;
440  // it is not sufficient to return the last vehicle on the foeLane because ego might be its leader
441  // therefore we return all vehicles on the lane
442  //
443  // special care must be taken for continuation lanes. (next lane is also internal)
444  // vehicles on these lanes should always block (gap = -1)
445  const bool contLane = (foeLane->getLinkCont()[0]->getViaLaneOrLane()->getEdge().getPurpose() == MSEdge::EDGEFUNCTION_INTERNAL);
446  const bool sameTarget = (myLane == foeLane->getLinkCont()[0]->getLane());
447  // vehicles on cont. lanes or on internal lanes with the same target as this link can never be ignored
448  const bool cannotIgnore = contLane || sameTarget;
449  const MSLane::VehCont& vehicles = foeLane->getVehiclesSecure();
450  foeLane->releaseVehicles();
451  for (MSLane::VehCont::const_iterator it_veh = vehicles.begin(); it_veh != vehicles.end(); ++it_veh) {
452  MSVehicle* leader = *it_veh;
453  if (cannotIgnore || leader->getWaitingTime() < MSGlobals::gIgnoreJunctionBlocker) {
454  // compute distance between vehicles on the the superimposition of both lanes
455  // where the crossing point is the common point
456  SUMOReal gap;
457  if (contLane) {
458  gap = -1; // always break for vehicles which are on a continuation lane
459  } else {
460  const SUMOReal leaderBack = leader->getPositionOnLane() - leader->getVehicleType().getLength();
461  const SUMOReal leaderBackDist = foeDistToCrossing - leaderBack;
462  //std::cout << " distToCrossing=" << distToCrossing << " leader backDist=" << leaderBackDist << "\n";
463  if (leaderBackDist < 0) {
464  // leader is completely past the crossing point
465  // or there is no crossing point
466  continue; // next vehicle
467  }
468  gap = distToCrossing - leaderBackDist - (sameTarget ? minGap : 0);
469  }
470  result.push_back(LinkLeader(leader, gap, cannotIgnore ? -1 : distToCrossing));
471  }
472 
473  }
474  MSVehicle* leader = foeLane->getPartialOccupator();
475  if (leader != 0) {
476  if (cannotIgnore || leader->getWaitingTime() < MSGlobals::gIgnoreJunctionBlocker) {
477  // compute distance between vehicles on the the superimposition of both lanes
478  // where the crossing point is the common point
479  SUMOReal gap;
480  if (contLane) {
481  gap = -1; // always break for vehicles which are on a continuation lane
482  } else {
483  const SUMOReal leaderBackDist = foeDistToCrossing - foeLane->getPartialOccupatorEnd();
484  //std::cout << " distToCrossing=" << distToCrossing << " leader (partialOccupator) backDist=" << leaderBackDist << "\n";
485  if (leaderBackDist < 0) {
486  // leader is completely past the crossing point
487  // or there is no crossing point
488  continue; // next lane
489  }
490  gap = distToCrossing - leaderBackDist - (sameTarget ? minGap : 0);
491  }
492  result.push_back(LinkLeader(leader, gap, sameTarget ? -1 : distToCrossing));
493  }
494  }
495  // check for crossing pedestrians (keep driving if already on top of the crossing
496  const SUMOReal distToPeds = distToCrossing - MSPModel::SAFETY_GAP - foeLane->getWidth() * 0.5;
497  if (distToPeds >= -MSPModel::SAFETY_GAP && MSPModel::getModel()->blockedAtDist(foeLane, foeDistToCrossing, collectBlockers)) {
498  result.push_back(LinkLeader((MSVehicle*)0, -1, distToPeds));
499  }
500  }
501  }
502  return result;
503 }
504 #endif
505 
506 
507 MSLane*
509 #ifdef HAVE_INTERNAL_LANES
510  if (myJunctionInlane != 0) {
511  return myJunctionInlane;
512  }
513 #endif
514  return myLane;
515 }
516 
517 
518 /****************************************************************************/
519 
OutputDevice & writeAttr(const SumoXMLAttr attr, const T &val)
writes a named attribute
Definition: OutputDevice.h:257
MSEdge & getEdge() const
Returns the lane&#39;s edge.
Definition: MSLane.h:455
Representation of a vehicle in the micro simulation.
Definition: MSVehicle.h:78
static const SUMOReal SAFETY_GAP
Definition: MSPModel.h:81
virtual void releaseVehicles() const
Allows to use the container for microsimulation again.
Definition: MSLane.h:303
const MSCFModel & getCarFollowModel() const
Returns the vehicle&#39;s car following model definition.
Definition: MSVehicle.h:538
SUMOTime getWaitingTime() const
Returns the SUMOTime waited (speed was lesser than 0.1m/s)
Definition: MSVehicle.h:357
This is an uncontrolled, minor link, has to stop.
SUMOReal getLength() const
Returns the lane&#39;s length.
Definition: MSLane.h:370
std::vector< MSVehicle * > VehCont
Container for vehicles.
Definition: MSLane.h:88
std::string time2string(SUMOTime t)
Definition: SUMOTime.cpp:61
SUMOReal getLength() const
Get vehicle&#39;s length [m].
SUMOReal getWidth() const
Returns the lane&#39;s width.
Definition: MSLane.h:386
T MAX2(T a, T b)
Definition: StdDefs.h:74
SUMOReal getPositionOnLane() const
Get the vehicle&#39;s position along the lane.
Definition: MSVehicle.h:284
#define TIME2STEPS(x)
Definition: SUMOTime.h:66
This is an uncontrolled, all-way stop link.
#define UNUSED_PARAMETER(x)
Definition: StdDefs.h:39
virtual const VehCont & getVehiclesSecure() const
Returns the vehicles container; locks it for microsimulation.
Definition: MSLane.h:296
SUMOReal getPartialOccupatorEnd() const
Returns the position of the in-lapping vehicle&#39;s end.
Definition: MSLane.h:261
LinkDirection
The different directions a link between two lanes may take (or a stream between two edges)...
const std::string & getID() const
Returns the id.
Definition: Named.h:60
MSLane * getLogicalPredecessorLane() const
Definition: MSLane.cpp:1351
Representation of a vehicle.
Definition: SUMOVehicle.h:64
static MSPModel * getModel()
Definition: MSPModel.cpp:65
LinkState
The right-of-way state of a link between two lanes used when constructing a NBTrafficLightLogic, in MSLink and GNEInternalLane.
static bool gUsingInternalLanes
Information whether the simulation regards internal lanes.
Definition: MSGlobals.h:71
SUMOReal getMaxDecel() const
Get the vehicle type&#39;s maximum deceleration [m/s^2].
Definition: MSCFModel.h:184
MSVehicle * getLastVehicle() const
returns the last vehicle
Definition: MSLane.cpp:973
std::string toString(const T &t, std::streamsize accuracy=OUTPUT_ACCURACY)
Definition: ToString.h:53
EdgeBasicFunction getPurpose() const
Returns the edge type (EdgeBasicFunction)
Definition: MSEdge.h:222
const MSVehicleType & getVehicleType() const
Returns the vehicle&#39;s type definition.
Definition: MSBaseVehicle.h:90
SUMOReal getSpeed() const
Returns the vehicle&#39;s current speed.
Definition: MSVehicle.h:292
int SUMOTime
Definition: SUMOTime.h:43
static SUMOTime gIgnoreJunctionBlocker
Information whether the simulation regards internal lanes.
Definition: MSGlobals.h:74
const PositionVector & getShape() const
Returns this lane&#39;s shape.
Definition: MSLane.h:323
MSVehicle * getPartialOccupator() const
Returns the vehicle which laps into this lane.
Definition: MSLane.h:253
Static storage of an output device and its base (abstract) implementation.
Definition: OutputDevice.h:71
bool closeTag()
Closes the most recently opened tag.
#define SUMOReal
Definition: config.h:218
static const bool gUseMesoSim
Definition: MSGlobals.h:102
const MSJunction * getFromJunction() const
Definition: MSEdge.h:324
#define NUMERICAL_EPS
Definition: config.h:162
const MSLinkCont & getLinkCont() const
returns the container with all links !!!
Definition: MSLane.cpp:1039
The edge is an internal edge.
Definition: MSEdge.h:92
std::vector< SUMOReal > intersectsAtLengths2D(const PositionVector &other) const
For all intersections between this vector and other, return the 2D-length of the subvector from this ...
Representation of a lane in the micro simulation.
Definition: MSLane.h:77
OutputDevice & openTag(const std::string &xmlElement)
Opens an XML tag.
virtual const MSVehicleType & getVehicleType() const =0
Returns the vehicle&#39;s type.