SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
MSTriggeredRerouter.cpp
Go to the documentation of this file.
1 /****************************************************************************/
9 // Reroutes vehicles passing an edge
10 /****************************************************************************/
11 // SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/
12 // Copyright (C) 2001-2016 DLR (http://www.dlr.de/) and contributors
13 /****************************************************************************/
14 //
15 // This file is part of SUMO.
16 // SUMO is free software: you can redistribute it and/or modify
17 // it under the terms of the GNU General Public License as published by
18 // the Free Software Foundation, either version 3 of the License, or
19 // (at your option) any later version.
20 //
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 <string>
34 #include <algorithm>
36 #include <utils/common/Command.h>
39 #include <utils/common/ToString.h>
46 #include <microsim/MSLane.h>
47 #include <microsim/MSVehicle.h>
48 #include <microsim/MSRoute.h>
49 #include <microsim/MSEdge.h>
50 #include <microsim/MSNet.h>
51 #include <microsim/MSGlobals.h>
53 #include "MSTriggeredRerouter.h"
54 
55 #include <mesosim/MELoop.h>
56 #include <mesosim/MESegment.h>
57 
58 #ifdef CHECK_MEMORY_LEAKS
59 #include <foreign/nvwa/debug_new.h>
60 #endif // CHECK_MEMORY_LEAKS
61 
62 //#define DEBUG_REROUTER
63 #define DEBUGCOND (veh.getID() == "disabled")
64 
65 // ===========================================================================
66 // static member defintion
67 // ===========================================================================
68 MSEdge MSTriggeredRerouter::mySpecialDest_keepDestination("MSTriggeredRerouter_keepDestination", -1, MSEdge::EDGEFUNCTION_UNKNOWN, "", "", -1);
69 MSEdge MSTriggeredRerouter::mySpecialDest_terminateRoute("MSTriggeredRerouter_terminateRoute", -1, MSEdge::EDGEFUNCTION_UNKNOWN, "", "", -1);
70 
71 // ===========================================================================
72 // method definitions
73 // ===========================================================================
75  const MSEdgeVector& edges,
76  SUMOReal prob, const std::string& file, bool off) :
77  MSTrigger(id),
78  MSMoveReminder(id),
79  SUMOSAXHandler(file),
80  myProbability(prob), myUserProbability(prob), myAmInUserMode(false) {
81  // build actors
82  for (MSEdgeVector::const_iterator j = edges.begin(); j != edges.end(); ++j) {
85  s->addDetector(this);
86  continue;
87  }
88  const std::vector<MSLane*>& destLanes = (*j)->getLanes();
89  for (std::vector<MSLane*>::const_iterator i = destLanes.begin(); i != destLanes.end(); ++i) {
90  (*i)->addMoveReminder(this);
91  }
92  }
93  if (off) {
94  setUserMode(true);
96  }
97 }
98 
99 
101 }
102 
103 // ------------ loading begin
104 void
106  const SUMOSAXAttributes& attrs) {
107  if (element == SUMO_TAG_INTERVAL) {
108  bool ok = true;
111  }
112  if (element == SUMO_TAG_DEST_PROB_REROUTE) {
113  // by giving probabilities of new destinations
114  // get the destination edge
115  std::string dest = attrs.getStringSecure(SUMO_ATTR_ID, "");
116  if (dest == "") {
117  throw ProcessError("MSTriggeredRerouter " + getID() + ": No destination edge id given.");
118  }
119  MSEdge* to = MSEdge::dictionary(dest);
120  if (to == 0) {
121  if (dest == "keepDestination") {
123  } else if (dest == "terminateRoute") {
125  } else {
126  throw ProcessError("MSTriggeredRerouter " + getID() + ": Destination edge '" + dest + "' is not known.");
127  }
128  }
129  // get the probability to reroute
130  bool ok = true;
131  SUMOReal prob = attrs.getOpt<SUMOReal>(SUMO_ATTR_PROB, getID().c_str(), ok, 1.);
132  if (!ok) {
133  throw ProcessError();
134  }
135  if (prob < 0) {
136  throw ProcessError("MSTriggeredRerouter " + getID() + ": Attribute 'probability' for destination '" + dest + "' is negative (must not).");
137  }
138  // add
139  myCurrentEdgeProb.add(prob, to);
140  }
141 
142  if (element == SUMO_TAG_CLOSING_REROUTE) {
143  // by closing
144  std::string closed_id = attrs.getStringSecure(SUMO_ATTR_ID, "");
145  MSEdge* closed = MSEdge::dictionary(closed_id);
146  if (closed == 0) {
147  throw ProcessError("MSTriggeredRerouter " + getID() + ": Edge '" + closed_id + "' to close is not known.");
148  }
149  myCurrentClosed.push_back(closed);
150  bool ok;
151  const std::string allow = attrs.getOpt<std::string>(SUMO_ATTR_ALLOW, getID().c_str(), ok, "", false);
152  const std::string disallow = attrs.getOpt<std::string>(SUMO_ATTR_DISALLOW, getID().c_str(), ok, "");
153  myCurrentPermissions = parseVehicleClasses(allow, disallow);
154  }
155 
156  if (element == SUMO_TAG_CLOSING_LANE_REROUTE) {
157  // by closing lane
158  std::string closed_id = attrs.getStringSecure(SUMO_ATTR_ID, "");
159  MSLane* closed = MSLane::dictionary(closed_id);
160  if (closed == 0) {
161  throw ProcessError("MSTriggeredRerouter " + getID() + ": Lane '" + closed_id + "' to close is not known.");
162  }
163  myCurrentClosedLanes.push_back(closed);
164  bool ok;
166  const std::string allow = attrs.getOpt<std::string>(SUMO_ATTR_ALLOW, getID().c_str(), ok, "", false);
167  const std::string disallow = attrs.getOpt<std::string>(SUMO_ATTR_DISALLOW, getID().c_str(), ok, "");
168  myCurrentPermissions = parseVehicleClasses(allow, disallow);
169  } else {
170  // lane closing only makes sense if the lane really receives reduced
171  // permissions
173  }
174  }
175 
176  if (element == SUMO_TAG_ROUTE_PROB_REROUTE) {
177  // by explicit rerouting using routes
178  // check if route exists
179  std::string routeStr = attrs.getStringSecure(SUMO_ATTR_ID, "");
180  if (routeStr == "") {
181  throw ProcessError("MSTriggeredRerouter " + getID() + ": No route id given.");
182  }
183  const MSRoute* route = MSRoute::dictionary(routeStr);
184  if (route == 0) {
185  throw ProcessError("MSTriggeredRerouter " + getID() + ": Route '" + routeStr + "' does not exist.");
186  }
187 
188  // get the probability to reroute
189  bool ok = true;
190  SUMOReal prob = attrs.getOpt<SUMOReal>(SUMO_ATTR_PROB, getID().c_str(), ok, 1.);
191  if (!ok) {
192  throw ProcessError();
193  }
194  if (prob < 0) {
195  throw ProcessError("MSTriggeredRerouter " + getID() + ": Attribute 'probability' for route '" + routeStr + "' is negative (must not).");
196  }
197  // add
198  myCurrentRouteProb.add(prob, route);
199  }
200 }
201 
202 
203 void
205  if (element == SUMO_TAG_INTERVAL) {
206  RerouteInterval ri;
209  ri.closed = myCurrentClosed;
214  if (ri.closedLanes.size() > 0) {
215  // collect edges that are affect by a closed lane
216  std::set<MSEdge*> affected;
217  for (std::vector<MSLane*>::iterator l = ri.closedLanes.begin(); l != ri.closedLanes.end(); ++l) {
218  affected.insert(&((*l)->getEdge()));
219  }
220  ri.closedLanesAffected.insert(ri.closedLanesAffected.begin(), affected.begin(), affected.end());
221  }
222  myCurrentClosed.clear();
223  myCurrentClosedLanes.clear();
226  myIntervals.push_back(ri);
227  myIntervals.back().id = (long)&myIntervals.back();
228  if (!(ri.closed.empty() && ri.closedLanes.empty()) && ri.permissions != SVCAll) {
232  }
233  }
234 }
235 
236 
237 // ------------ loading end
238 
239 
240 SUMOTime
242  for (std::vector<RerouteInterval>::iterator i = myIntervals.begin(); i != myIntervals.end(); ++i) {
243  if (i->begin == currentTime && !(i->closed.empty() && i->closedLanes.empty()) && i->permissions != SVCAll) {
244  for (MSEdgeVector::iterator e = i->closed.begin(); e != i->closed.end(); ++e) {
245  for (std::vector<MSLane*>::const_iterator l = (*e)->getLanes().begin(); l != (*e)->getLanes().end(); ++l) {
246  //std::cout << SIMTIME << " closing: intervalID=" << i->id << " lane=" << (*l)->getID() << " prevPerm=" << getVehicleClassNames((*l)->getPermissions()) << " new=" << getVehicleClassNames(i->permissions) << "\n";
247  (*l)->setPermissions(i->permissions, i->id);
248  }
249  (*e)->rebuildAllowedLanes();
250  }
251  for (std::vector<MSLane*>::iterator l = i->closedLanes.begin(); l != i->closedLanes.end(); ++l) {
252  (*l)->setPermissions(i->permissions, i->id);
253  (*l)->getEdge().rebuildAllowedLanes();
254  }
258  }
259  if (i->end == currentTime && !(i->closed.empty() && i->closedLanes.empty()) && i->permissions != SVCAll) {
260  for (MSEdgeVector::iterator e = i->closed.begin(); e != i->closed.end(); ++e) {
261  for (std::vector<MSLane*>::const_iterator l = (*e)->getLanes().begin(); l != (*e)->getLanes().end(); ++l) {
262  (*l)->resetPermissions(i->id);
263  //std::cout << SIMTIME << " opening: intervalID=" << i->id << " lane=" << (*l)->getID() << " restore prevPerm=" << getVehicleClassNames((*l)->getPermissions()) << "\n";
264  }
265  (*e)->rebuildAllowedLanes();
266  }
267  for (std::vector<MSLane*>::iterator l = i->closedLanes.begin(); l != i->closedLanes.end(); ++l) {
268  (*l)->resetPermissions(i->id);
269  (*l)->getEdge().rebuildAllowedLanes();
270  }
271  }
272  }
273  return 0;
274 }
275 
276 
279  for (std::vector<RerouteInterval>::const_iterator i = myIntervals.begin(); i != myIntervals.end(); ++i) {
280  if (i->begin <= time && i->end > time) {
281  if (
282  // destProbReroute
283  i->edgeProbs.getOverallProb() > 0 ||
284  // routeProbReroute
285  i->routeProbs.getOverallProb() > 0 ||
286  // affected by closingReroute
287  veh.getRoute().containsAnyOf(i->closed) ||
288  // affected by closingLaneReroute
289  veh.getRoute().containsAnyOf(i->closedLanesAffected)) {
290  return &*i;
291  }
292  }
293  }
294  return 0;
295 }
296 
297 
300  for (std::vector<RerouteInterval>::const_iterator i = myIntervals.begin(); i != myIntervals.end(); ++i) {
301  if (i->begin <= time && i->end > time) {
302  if (i->edgeProbs.getOverallProb() != 0 || i->routeProbs.getOverallProb() != 0 || !i->closed.empty()) {
303  return &*i;
304  }
305  }
306  }
307  return 0;
308 }
309 
310 
311 bool
313  SUMOReal /*newPos*/, SUMOReal /*newSpeed*/) {
314  return notifyEnter(veh, NOTIFICATION_JUNCTION);
315 }
316 
317 
318 bool
321  return reason == NOTIFICATION_LANE_CHANGE;
322 }
323 
324 
325 bool
327  // check whether the vehicle shall be rerouted
329  const MSTriggeredRerouter::RerouteInterval* rerouteDef = getCurrentReroute(time, veh);
330  if (rerouteDef == 0) {
331  return true; // an active interval could appear later
332  }
334  if (RandHelper::rand() > prob) {
335  return false; // XXX another interval could appear later but we would have to track whether the current interval was already tried
336  }
337  // if we have a closingLaneReroute, only vehicles with a rerouting device can profit from rerouting (otherwise, edge weights will not reflect local jamming)
338  const bool hasReroutingDevice = veh.getDevice(typeid(MSDevice_Routing)) != 0;
339  if (rerouteDef->closedLanes.size() > 0 && !hasReroutingDevice) {
340  return true; // an active interval could appear later
341  }
342  // get vehicle params
343  const MSRoute& route = veh.getRoute();
344  const MSEdge* lastEdge = route.getLastEdge();
345 #ifdef DEBUG_REROUTER
346  if (DEBUGCOND) {
347  std::cout << SIMTIME << " veh=" << veh.getID() << " check rerouter " << getID() << " lane=" << veh.getLane()->getID() << " edge=" << veh.getEdge()->getID() << " finalEdge=" << lastEdge->getID() << " arrivalPos=" << veh.getArrivalPos() << "\n";
348  }
349 #endif
350  // get rerouting params
351  const MSRoute* newRoute = rerouteDef->routeProbs.getOverallProb() > 0 ? rerouteDef->routeProbs.get() : 0;
352  // we will use the route if given rather than calling our own dijsktra...
353  if (newRoute != 0) {
354 #ifdef DEBUG_REROUTER
355  if (DEBUGCOND) {
356  std::cout << " replacedRoute from routeDist " << newRoute->getID() << "\n";
357  }
358 #endif
359  veh.replaceRoute(newRoute);
360  return false; // XXX another interval could appear later but we would have to track whether the currenty interval was already used
361  }
362  const MSEdge* newEdge = lastEdge;
363  // ok, try using a new destination
364  SUMOReal newArrivalPos = -1;
365  const bool destUnreachable = std::find(rerouteDef->closed.begin(), rerouteDef->closed.end(), lastEdge) != rerouteDef->closed.end();
366  // if we have a closingReroute, only assign new destinations to vehicles which cannot reach their original destination
367  // if we have a closingLaneReroute, no new destinations should be assigned
368  if (rerouteDef->closed.size() == 0 || destUnreachable) {
369  newEdge = rerouteDef->edgeProbs.getOverallProb() > 0 ? rerouteDef->edgeProbs.get() : route.getLastEdge();
370  if (newEdge == &mySpecialDest_terminateRoute) {
371  newEdge = veh.getEdge();
372  newArrivalPos = veh.getPositionOnLane(); // instant arrival
373  } else if (newEdge == &mySpecialDest_keepDestination || newEdge == lastEdge) {
374  if (destUnreachable && rerouteDef->permissions == SVCAll) {
375  // if permissions aren't set vehicles will simply drive through
376  // the closing unless terminated. If the permissions are specified, assume that the user wants
377  // vehicles to stand and wait until the closing ends
378  WRITE_WARNING("Cannot keep destination edge '" + lastEdge->getID() + "' for vehicle '" + veh.getID() + "' due to closed edges. Terminating route.");
379  newEdge = veh.getEdge();
380  } else {
381  newEdge = lastEdge;
382  }
383  } else if (newEdge == 0) {
384 #ifdef DEBUG_REROUTER
385  if (DEBUGCOND) {
386  std::cout << " could not find new edge!\n";
387  }
388 #endif
389  assert(false); // this should never happen
390  newEdge = veh.getEdge();
391  }
392  }
393  // we have a new destination, let's replace the vehicle route (if it is affected)
394  if (rerouteDef->closed.size() == 0 || destUnreachable || veh.getRoute().containsAnyOf(rerouteDef->closed)) {
395  ConstMSEdgeVector edges;
396  SUMOAbstractRouter<MSEdge, SUMOVehicle>& router = hasReroutingDevice
398  : MSNet::getInstance()->getRouterTT(rerouteDef->closed);
399  router.compute(
400  veh.getEdge(), newEdge, &veh, MSNet::getInstance()->getCurrentTimeStep(), edges);
401  const bool useNewRoute = veh.replaceRouteEdges(edges);
402 #ifdef DEBUG_REROUTER
403  if (DEBUGCOND) std::cout << " rerouting: newEdge=" << newEdge->getID() << " useNewRoute=" << useNewRoute << " newArrivalPos=" << newArrivalPos << " numClosed=" << rerouteDef->closed.size()
404  << " destUnreachable=" << destUnreachable << " containsClosed=" << veh.getRoute().containsAnyOf(rerouteDef->closed) << "\n";
405 #endif
406  if (useNewRoute && newArrivalPos != -1) {
407  // must be called here because replaceRouteEdges may also set the arrivalPos
408  veh.setArrivalPos(newArrivalPos);
409  }
410  }
411  return false; // XXX another interval could appear later but we would have to track whether the currenty interval was already used
412 }
413 
414 
415 void
417  myAmInUserMode = val;
418 }
419 
420 
421 void
423  myUserProbability = prob;
424 }
425 
426 
427 bool
429  return myAmInUserMode;
430 }
431 
432 
433 SUMOReal
436 }
437 
438 
439 SUMOReal
441  return myUserProbability;
442 }
443 
444 
445 
446 /****************************************************************************/
447 
#define DEBUGCOND
MSEdgeVector closed
The list of closed edges.
long long int SUMOTime
Definition: SUMOTime.h:43
bool notifyMove(SUMOVehicle &veh, SUMOReal oldPos, SUMOReal newPos, SUMOReal newSpeed)
Triggers rerouting (once) for vehicles that are already on the edge when the rerouter activates...
virtual const MSRoute & getRoute() const =0
Returns the current route.
SUMOTime setPermissions(const SUMOTime currentTime)
Sets the edge permission if there are any defined in the closingEdge.
SVCPermissions myCurrentPermissions
List of permissions for closed edges.
RandomDistributor< MSEdge * > edgeProbs
The distributions of new destinations to use.
The vehicle arrived at a junction.
bool add(SUMOReal prob, T val, bool checkDuplicates=true)
Adds a value with an assigned probability to the distribution.
const MSEdge * getLastEdge() const
returns the destination edge
Definition: MSRoute.cpp:96
SUMOTime myCurrentIntervalBegin
The first and the last time steps of the interval.
bool notifyLeave(SUMOVehicle &veh, SUMOReal lastPos, MSMoveReminder::Notification reason)
Removes the reminder.
virtual SUMOReal getPositionOnLane() const =0
Get the vehicle's position along the lane.
std::vector< MSLane * > myCurrentClosedLanes
List of closed lanes.
virtual const MSEdge * getEdge() const =0
Returns the edge the vehicle is currently at.
Notification
Definition of a vehicle state.
static SUMOReal rand()
Returns a random real number in [0, 1)
Definition: RandHelper.h:62
A device that performs vehicle rerouting based on current edge speeds.
virtual MSLane * getLane() const =0
Returns the lane the vehicle is on.
static MSNet * getInstance()
Returns the pointer to the unique instance of MSNet (singleton).
Definition: MSNet.cpp:159
virtual bool compute(const E *from, const E *to, const V *const vehicle, SUMOTime msTime, std::vector< const E * > &into)=0
Builds the route between the given edges using the minimum effort at the given time The definition of...
void setUserUsageProbability(SUMOReal prob)
Sets the probability with which a vehicle is rerouted given by the user.
static bool dictionary(const std::string &id, MSEdge *edge)
Inserts edge into the static dictionary Returns true if the key id isn't already in the dictionary...
Definition: MSEdge.cpp:673
std::vector< const MSEdge * > ConstMSEdgeVector
Definition: MSEdge.h:78
SUMOReal getUserProbability() const
Returns the rerouting probability given by the user.
const SVCPermissions SVCAll
void setUserMode(bool val)
Sets whether the process is currently steered by the user.
SAX-handler base for SUMO-files.
SUMOTime getCurrentTimeStep() const
Returns the current simulation step.
Definition: MSNet.h:254
virtual bool hasAttribute(int id) const =0
Returns the information whether the named (by its enum-value) attribute is within the current list...
The purpose of the edge is not known.
Definition: MSEdge.h:91
#define WRITE_WARNING(msg)
Definition: MsgHandler.h:200
#define SIMTIME
Definition: SUMOTime.h:70
authorities vehicles
SUMOTime getOptSUMOTimeReporting(int attr, const char *objectid, bool &ok, SUMOTime defaultValue, bool report=true) const
Tries to read given attribute assuming it is a SUMOTime.
SUMOReal myProbability
The probability and the user-given probability.
const std::string & getID() const
Returns the id.
Definition: Named.h:66
A road/street connecting two junctions.
Definition: MSEdge.h:80
virtual void myEndElement(int element)
Called when a closing tag occurs.
The vehicle changes lanes (micro only) XXX: What if a vehicle changes lanes and passes a junction sim...
An abstract device that changes the state of the micro simulation.
Definition: MSTrigger.h:48
Representation of a vehicle.
Definition: SUMOVehicle.h:66
Encapsulated SAX-Attributes.
virtual ~MSTriggeredRerouter()
Destructor.
SUMOTime begin
The begin time these definitions are valid.
MSEventControl * getBeginOfTimestepEvents()
Returns the event control for events executed at the begin of a time step.
Definition: MSNet.h:400
T get(MTRand *which=0) const
Draw a sample of the distribution.
A wrapper for a Command function.
RandomDistributor< const MSRoute * > myCurrentRouteProb
new routes with probabilities
static MSEdge mySpecialDest_keepDestination
special destination values
void addDetector(MSMoveReminder *data)
Adds a data collector for a detector to this segment.
Definition: MESegment.cpp:193
SUMOReal getProbability() const
Returns the rerouting probability.
bool notifyEnter(SUMOVehicle &veh, MSMoveReminder::Notification reason)
Tries to reroute the vehicle.
SVCPermissions parseVehicleClasses(const std::string &allowedS)
Parses the given definition of allowed vehicle classes into the given containers Deprecated classes g...
Something on a lane to be noticed about vehicle movement.
static MSEdge mySpecialDest_terminateRoute
const RerouteInterval * getCurrentReroute(SUMOTime time, SUMOVehicle &veh) const
Returns the rerouting definition valid for the given time and vehicle, 0 if none. ...
virtual SUMOTime addEvent(Command *operation, SUMOTime execTimeStep, AdaptType type)
Adds an Event.
SUMOAbstractRouter< MSEdge, SUMOVehicle > & getRouterTT(const MSEdgeVector &prohibited=MSEdgeVector()) const
Definition: MSNet.cpp:856
RandomDistributor< MSEdge * > myCurrentEdgeProb
new destinations with probabilities
void clear()
Clears the distribution.
SUMOReal getOverallProb() const
Return the sum of the probabilites assigned to the members.
static bool dictionary(const std::string &id, MSLane *lane)
Static (sic!) container methods {.
Definition: MSLane.cpp:1286
bool inUserMode() const
Returns whether the user is setting the rerouting probability.
SUMOTime end
The end time these definitions are valid.
std::vector< MSLane * > closedLanes
The list of closed lanes.
RandomDistributor< const MSRoute * > routeProbs
The distributions of new routes to use.
A single mesoscopic segment (cell)
Definition: MESegment.h:57
virtual std::string getStringSecure(int id, const std::string &def) const =0
Returns the string-value of the named (by its enum-value) attribute.
virtual bool replaceRoute(const MSRoute *route, bool onInit=false, int offset=0)=0
Replaces the current route by the given one.
std::vector< RerouteInterval > myIntervals
List of rerouting definition intervals.
MESegment * getSegmentForEdge(const MSEdge &e, SUMOReal pos=0)
Get the segment for a given edge at a given position.
Definition: MELoop.cpp:295
MSEdgeVector myCurrentClosed
List of closed edges.
bool myAmInUserMode
Information whether the current rerouting probability is the user-given.
static MELoop * gMesoNet
mesoscopic simulation infrastructure
Definition: MSGlobals.h:107
MSTriggeredRerouter(const std::string &id, const MSEdgeVector &edges, SUMOReal prob, const std::string &file, bool off)
Constructor.
Patch the time in a way that it is at least as high as the simulation begin time. ...
#define SUMOReal
Definition: config.h:214
virtual void myStartElement(int element, const SUMOSAXAttributes &attrs)
Called on the opening of a tag;.
virtual MSDevice * getDevice(const std::type_info &type) const =0
Returns a device of the given type if it exists or 0.
T getOpt(int attr, const char *objectid, bool &ok, T defaultValue, bool report=true) const
Tries to read given attribute assuming it is an int.
std::vector< MSEdge * > MSEdgeVector
Definition: MSEdge.h:77
static SUMOAbstractRouter< MSEdge, SUMOVehicle > & getRouterTT(const MSEdgeVector &prohibited=MSEdgeVector())
return the router instance
virtual SUMOReal getArrivalPos() const =0
Returns this vehicle's desired arrivalPos for its current route (may change on reroute) ...
SVCPermissions permissions
The permissions to use.
static bool gUseMesoSim
Definition: MSGlobals.h:95
Representation of a lane in the micro simulation.
Definition: MSLane.h:79
virtual const std::string & getID() const =0
Get the vehicle's ID.
MSEdgeVector closedLanesAffected
The list of edges that are affect by closed lanes.
static bool dictionary(const std::string &id, const MSRoute *route)
Adds a route to the dictionary.
Definition: MSRoute.cpp:122
bool containsAnyOf(const MSEdgeVector &edgelist) const
Definition: MSRoute.cpp:247