SUMO - Simulation of Urban MObility
MSDevice_Vehroutes.cpp
Go to the documentation of this file.
1 /****************************************************************************/
10 // A device which collects info on the vehicle trip
11 /****************************************************************************/
12 // SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/
13 // Copyright (C) 2009-2017 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 <microsim/MSGlobals.h>
34 #include <microsim/MSNet.h>
35 #include <microsim/MSLane.h>
36 #include <microsim/MSEdge.h>
37 #include <microsim/MSRoute.h>
38 #include <microsim/MSVehicle.h>
39 #include <microsim/MSVehicleType.h>
44 #include "MSDevice_Vehroutes.h"
45 
46 
47 // ===========================================================================
48 // static member variables
49 // ===========================================================================
53 bool MSDevice_Vehroutes::mySorted = false;
57 std::map<const SUMOTime, int> MSDevice_Vehroutes::myDepartureCounts;
58 std::map<const SUMOTime, std::map<const std::string, std::string> > MSDevice_Vehroutes::myRouteInfos;
59 
60 
61 // ===========================================================================
62 // method definitions
63 // ===========================================================================
64 // ---------------------------------------------------------------------------
65 // static initialisation methods
66 // ---------------------------------------------------------------------------
67 void
69  if (OptionsCont::getOptions().isSet("vehroute-output")) {
70  OutputDevice::createDeviceByOption("vehroute-output", "routes", "routes_file.xsd");
71  mySaveExits = OptionsCont::getOptions().getBool("vehroute-output.exit-times");
72  myLastRouteOnly = OptionsCont::getOptions().getBool("vehroute-output.last-route");
73  myDUAStyle = OptionsCont::getOptions().getBool("vehroute-output.dua");
74  mySorted = myDUAStyle || OptionsCont::getOptions().getBool("vehroute-output.sorted");
75  myIntendedDepart = OptionsCont::getOptions().getBool("vehroute-output.intended-depart");
76  myRouteLength = OptionsCont::getOptions().getBool("vehroute-output.route-length");
78  }
79 }
80 
81 
83 MSDevice_Vehroutes::buildVehicleDevices(SUMOVehicle& v, std::vector<MSDevice*>& into, int maxRoutes) {
84  if (maxRoutes < INT_MAX) {
85  return new MSDevice_Vehroutes(v, "vehroute_" + v.getID(), maxRoutes);
86  }
87  if (OptionsCont::getOptions().isSet("vehroute-output")) {
88  if (myLastRouteOnly) {
89  maxRoutes = 0;
90  }
91  myStateListener.myDevices[&v] = new MSDevice_Vehroutes(v, "vehroute_" + v.getID(), maxRoutes);
92  into.push_back(myStateListener.myDevices[&v]);
93  return myStateListener.myDevices[&v];
94  }
95  return 0;
96 }
97 
98 
99 // ---------------------------------------------------------------------------
100 // MSDevice_Vehroutes::StateListener-methods
101 // ---------------------------------------------------------------------------
102 void
104  if (to == MSNet::VEHICLE_STATE_NEWROUTE) {
105  myDevices[vehicle]->addRoute();
106  }
107 }
108 
109 
110 // ---------------------------------------------------------------------------
111 // MSDevice_Vehroutes-methods
112 // ---------------------------------------------------------------------------
113 MSDevice_Vehroutes::MSDevice_Vehroutes(SUMOVehicle& holder, const std::string& id, int maxRoutes) :
114  MSDevice(holder, id),
115  myCurrentRoute(&holder.getRoute()),
116  myMaxRoutes(maxRoutes),
117  myLastSavedAt(0),
118  myDepartLane(-1),
119  myDepartPos(-1),
120  myDepartSpeed(-1),
121  myDepartPosLat(0) {
123 }
124 
125 
127  for (std::vector<RouteReplaceInfo>::iterator i = myReplacedRoutes.begin(); i != myReplacedRoutes.end(); ++i) {
128  (*i).route->release();
129  }
132 }
133 
134 
135 bool
138  if (mySorted && myStateListener.myDevices[&veh] == this) {
140  myDepartureCounts[departure]++;
141  }
142  if (!MSGlobals::gUseMesoSim) {
143  myDepartLane = static_cast<MSVehicle&>(veh).getLane()->getIndex();
144  myDepartPosLat = static_cast<MSVehicle&>(veh).getLateralPositionOnLane();
145  }
146  myDepartSpeed = veh.getSpeed();
148  }
149  return mySaveExits;
150 }
151 
152 
153 bool
154 MSDevice_Vehroutes::notifyLeave(SUMOVehicle& veh, double /*lastPos*/, MSMoveReminder::Notification reason, const MSLane* /* enteredLane */) {
155  if (mySaveExits && reason != NOTIFICATION_LANE_CHANGE) {
156  if (reason != NOTIFICATION_TELEPORT && myLastSavedAt == veh.getEdge()) { // need to check this for internal lanes
158  } else if (myLastSavedAt != veh.getEdge()) {
159  myExits.push_back(MSNet::getInstance()->getCurrentTimeStep());
160  myLastSavedAt = veh.getEdge();
161  }
162  }
163  return mySaveExits;
164 }
165 
166 
167 void
169  if (index == 0 && myReplacedRoutes[index].route->size() == 2 &&
170  myReplacedRoutes[index].route->getEdges().front()->getPurpose() == MSEdge::EDGEFUNCTION_DISTRICT &&
171  myReplacedRoutes[index].route->getEdges().back()->getPurpose() == MSEdge::EDGEFUNCTION_DISTRICT) {
172  return;
173  }
174  // check if a previous route shall be written
176  if (index >= 0) {
177  assert((int)myReplacedRoutes.size() > index);
178  // write edge on which the vehicle was when the route was valid
179  os << " replacedOnEdge=\"";
180  if (myReplacedRoutes[index].edge) {
181  os << myReplacedRoutes[index].edge->getID();
182  }
183  // write the time at which the route was replaced
184  os << "\" replacedAtTime=\"" << time2string(myReplacedRoutes[index].time) << "\" probability=\"0\" edges=\"";
185  // get the route
186  int i = index;
187  while (i > 0 && myReplacedRoutes[i - 1].edge) {
188  i--;
189  }
190  const MSEdge* lastEdge = 0;
191  for (; i < index; ++i) {
192  myReplacedRoutes[i].route->writeEdgeIDs(os, lastEdge, myReplacedRoutes[i].edge);
193  lastEdge = myReplacedRoutes[i].edge;
194  }
195  myReplacedRoutes[index].route->writeEdgeIDs(os, lastEdge);
196  } else {
197  os << " edges=\"";
198  const MSEdge* lastEdge = 0;
199  int numWritten = 0;
200  if (myHolder.getNumberReroutes() > 0) {
201  assert((int)myReplacedRoutes.size() <= myHolder.getNumberReroutes());
202  int i = (int)myReplacedRoutes.size();
203  while (i > 0 && myReplacedRoutes[i - 1].edge) {
204  i--;
205  }
206  for (; i < (int)myReplacedRoutes.size(); ++i) {
207  numWritten += myReplacedRoutes[i].route->writeEdgeIDs(os, lastEdge, myReplacedRoutes[i].edge);
208  lastEdge = myReplacedRoutes[i].edge;
209  }
210  }
211  const MSEdge* upTo = 0;
212  if (mySaveExits) {
213  int remainingWithExitTime = (int)myExits.size() - numWritten;
214  assert(remainingWithExitTime >= 0);
215  assert(remainingWithExitTime <= (int)myCurrentRoute->size());
216  if (remainingWithExitTime < (int)myCurrentRoute->size()) {
217  upTo = *(myCurrentRoute->begin() + remainingWithExitTime);
218  }
219  }
220  myCurrentRoute->writeEdgeIDs(os, lastEdge, upTo);
221  if (mySaveExits) {
222  os << "\" exitTimes=\"";
223  for (std::vector<SUMOTime>::const_iterator it = myExits.begin(); it != myExits.end(); ++it) {
224  if (it != myExits.begin()) {
225  os << " ";
226  }
227  os << time2string(*it);
228  }
229  }
230  }
231  (os << "\"").closeTag();
232 }
233 
234 
235 void
237  writeOutput(true);
238 }
239 
240 
241 void
242 MSDevice_Vehroutes::writeOutput(const bool hasArrived) const {
243  OutputDevice& routeOut = OutputDevice::getDeviceByOption("vehroute-output");
244  OutputDevice_String od(routeOut.isBinary(), 1);
247  if (!MSGlobals::gUseMesoSim) {
248  if (tmp.wasSet(VEHPARS_DEPARTLANE_SET)) {
249  tmp.departLaneProcedure = DEPART_LANE_GIVEN;
250  tmp.departLane = myDepartLane;
251  }
252  if (tmp.wasSet(VEHPARS_DEPARTPOSLAT_SET)) {
253  tmp.departPosLatProcedure = DEPART_POSLAT_GIVEN;
254  tmp.departPosLat = myDepartPosLat;
255  }
256  }
257  if (tmp.wasSet(VEHPARS_DEPARTPOS_SET)) {
258  tmp.departPosProcedure = DEPART_POS_GIVEN;
259  tmp.departPos = myDepartPos;
260  }
261  if (tmp.wasSet(VEHPARS_DEPARTSPEED_SET)) {
262  tmp.departSpeedProcedure = DEPART_SPEED_GIVEN;
263  tmp.departSpeed = myDepartSpeed;
264  }
265  const std::string typeID = myHolder.getVehicleType().getID() != DEFAULT_VTYPE_ID ? myHolder.getVehicleType().getID() : "";
266  tmp.write(od, OptionsCont::getOptions(), SUMO_TAG_VEHICLE, typeID);
267  if (hasArrived) {
268  od.writeAttr("arrival", time2string(MSNet::getInstance()->getCurrentTimeStep()));
269  if (myRouteLength) {
270  const bool includeInternalLengths = MSGlobals::gUsingInternalLanes && MSNet::getInstance()->hasInternalLinks();
272  myHolder.getRoute().begin(), myHolder.getCurrentRouteEdge(), includeInternalLengths);
273  od.writeAttr("routeLength", routeLength);
274  }
275  }
276  if (myDUAStyle) {
278  if (routeDist != 0) {
279  const std::vector<const MSRoute*>& routes = routeDist->getVals();
280  unsigned index = 0;
281  while (index < routes.size() && routes[index] != myCurrentRoute) {
282  ++index;
283  }
284  od.openTag(SUMO_TAG_ROUTE_DISTRIBUTION).writeAttr(SUMO_ATTR_LAST, index);
285  const std::vector<double>& probs = routeDist->getProbs();
286  for (int i = 0; i < (int)routes.size(); ++i) {
287  od.setPrecision();
288  od.openTag(SUMO_TAG_ROUTE).writeAttr(SUMO_ATTR_COST, routes[i]->getCosts());
289  od.setPrecision(8);
290  od.writeAttr(SUMO_ATTR_PROB, probs[i]);
291  od.setPrecision();
292  od << " edges=\"";
293  routes[i]->writeEdgeIDs(od, *routes[i]->begin());
294  (od << "\"").closeTag();
295  }
296  od.closeTag();
297  } else {
298  writeXMLRoute(od);
299  }
300  } else {
301  if (myReplacedRoutes.size() > 0) {
302  od.openTag(SUMO_TAG_ROUTE_DISTRIBUTION);
303  for (int i = 0; i < (int)myReplacedRoutes.size(); ++i) {
304  writeXMLRoute(od, i);
305  }
306  }
307  writeXMLRoute(od);
308  if (myReplacedRoutes.size() > 0) {
309  od.closeTag();
310  }
311  }
312  for (std::vector<SUMOVehicleParameter::Stop>::const_iterator i = myHolder.getParameter().stops.begin(); i != myHolder.getParameter().stops.end(); ++i) {
313  i->write(od);
314  }
315  for (std::vector<SUMOVehicleParameter::Stop>::const_iterator i = myHolder.getRoute().getStops().begin(); i != myHolder.getRoute().getStops().end(); ++i) {
316  i->write(od);
317  }
319  od.closeTag();
320  od.lf();
321  if (mySorted) {
322  myRouteInfos[tmp.depart][myHolder.getID()] = od.getString();
323  myDepartureCounts[tmp.depart]--;
324  std::map<const SUMOTime, int>::iterator it = myDepartureCounts.begin();
325  while (it != myDepartureCounts.end() && it->second == 0) {
326  std::map<const std::string, std::string>& infos = myRouteInfos[it->first];
327  for (std::map<const std::string, std::string>::const_iterator it2 = infos.begin(); it2 != infos.end(); ++it2) {
328  routeOut << it2->second;
329  }
330  myRouteInfos.erase(it->first);
331  myDepartureCounts.erase(it);
332  it = myDepartureCounts.begin();
333  }
334  } else {
335  routeOut << od.getString();
336  }
337 }
338 
339 
340 const MSRoute*
342  if (index < (int)myReplacedRoutes.size()) {
343  return myReplacedRoutes[index].route;
344  } else {
345  return 0;
346  }
347 }
348 
349 
350 void
352  if (myMaxRoutes > 0) {
353  if (myHolder.hasDeparted()) {
355  } else {
356  myReplacedRoutes.push_back(RouteReplaceInfo(0, MSNet::getInstance()->getCurrentTimeStep(), myCurrentRoute));
357  }
358  if ((int)myReplacedRoutes.size() > myMaxRoutes) {
359  myReplacedRoutes.front().route->release();
360  myReplacedRoutes.erase(myReplacedRoutes.begin());
361  }
362  } else {
364  }
367 }
368 
369 
370 void
372  for (std::map<const SUMOVehicle*, MSDevice_Vehroutes*, Named::NamedLikeComparatorIdLess<SUMOVehicle> >::const_iterator it = myStateListener.myDevices.begin();
373  it != myStateListener.myDevices.end(); ++it) {
374  if (it->first->hasDeparted()) {
375  it->second->writeOutput(false);
376  }
377  }
378 }
379 
380 
381 void
384  out.writeAttr(SUMO_ATTR_ID, getID());
385  std::vector<std::string> internals;
386  if (!MSGlobals::gUseMesoSim) {
387  internals.push_back(toString(myDepartLane));
388  internals.push_back(toString(myDepartPosLat));
389  }
390  internals.push_back(toString(myDepartSpeed));
391  internals.push_back(toString(myDepartPos));
392  internals.push_back(toString(myReplacedRoutes.size()));
393  for (int i = 0; i < (int)myReplacedRoutes.size(); ++i) {
394  internals.push_back(myReplacedRoutes[i].edge->getID());
395  internals.push_back(toString(myReplacedRoutes[i].time));
396  internals.push_back(myReplacedRoutes[i].route->getID());
397  }
398  out.writeAttr(SUMO_ATTR_STATE, toString(internals));
399  out.closeTag();
400 }
401 
402 
403 void
405  std::istringstream bis(attrs.getString(SUMO_ATTR_STATE));
406  if (!MSGlobals::gUseMesoSim) {
407  bis >> myDepartLane;
408  bis >> myDepartPosLat;
409  }
410  bis >> myDepartSpeed;
411  bis >> myDepartPos;
412  int size;
413  bis >> size;
414  for (int i = 0; i < size; ++i) {
415  std::string edgeID;
416  SUMOTime time;
417  std::string routeID;
418  bis >> edgeID;
419  bis >> time;
420  bis >> routeID;
421  myReplacedRoutes.push_back(RouteReplaceInfo(MSEdge::dictionary(edgeID), time, MSRoute::dictionary(routeID)));
422  }
423 }
424 
425 
426 /****************************************************************************/
static std::map< const SUMOTime, int > myDepartureCounts
Map needed to sort vehicles by departure time.
const MSLane * getLane() const
Returns the lane the reminder works on.
OutputDevice & writeAttr(const SumoXMLAttr attr, const T &val)
writes a named attribute
Definition: OutputDevice.h:256
const int myMaxRoutes
The maximum number of routes to report.
Representation of a vehicle in the micro simulation.
Definition: MSVehicle.h:83
The position is given.
virtual bool hasDeparted() const =0
Returns whether this vehicle has departed.
virtual double getArrivalPos() const =0
Returns this vehicle&#39;s desired arrivalPos for its current route (may change on reroute) ...
const MSRoute * myCurrentRoute
The currently used route.
static StateListener myStateListener
A class that is notified about reroutings.
void release() const
deletes the route if there are no further references to it
Definition: MSRoute.cpp:105
Function-object for stable sorting of objects acting like Named without being derived (SUMOVehicle) ...
Definition: Named.h:90
virtual const MSRoute & getRoute() const =0
Returns the current route.
Represents a generic random distribution.
void vehicleStateChanged(const SUMOVehicle *const vehicle, MSNet::VehicleState to)
Called if a vehicle changes its state.
SUMOVehicle & myHolder
The vehicle that stores the device.
Definition: MSDevice.h:187
distribution of a route
static bool myDUAStyle
A shortcut for the Option "vehroute-output.dua".
The position is given.
virtual const MSEdge * getEdge() const =0
Returns the edge the vehicle is currently at.
Notification
Definition of a vehicle state.
double getDistanceBetween(double fromPos, double toPos, const MSEdge *fromEdge, const MSEdge *toEdge, bool includeInternal=true) const
Compute the distance between 2 given edges on this route, including the length of internal lanes...
Definition: MSRoute.cpp:281
std::string time2string(SUMOTime t)
Definition: SUMOTime.cpp:60
static MSNet * getInstance()
Returns the pointer to the unique instance of MSNet (singleton).
Definition: MSNet.cpp:158
static bool dictionary(const std::string &id, MSEdge *edge)
Inserts edge into the static dictionary Returns true if the key id isn&#39;t already in the dictionary...
Definition: MSEdge.cpp:728
const std::vector< T > & getVals() const
Returns the members of the distribution.
bool notifyEnter(SUMOVehicle &veh, MSMoveReminder::Notification reason, const MSLane *enteredLane=0)
Does nothing, returns true only if exit times should be collected.
std::vector< SUMOTime > myExits
The times the vehicle exites an edge.
static bool mySorted
A shortcut for the Option "vehroute-output.sorted".
bool getBool(const std::string &name) const
Returns the boolean-value of the named option (only for Option_Bool)
static RandomDistributor< const MSRoute * > * distDictionary(const std::string &id)
Returns the named route distribution.
Definition: MSRoute.cpp:161
const std::string & getID() const
Returns the id.
Definition: Named.h:66
int size() const
Returns the number of edges to pass.
Definition: MSRoute.cpp:86
const std::string DEFAULT_VTYPE_ID
static bool mySaveExits
A shortcut for the Option "vehroute-output.exit-times".
void addVehicleStateListener(VehicleStateListener *listener)
Adds a vehicle states listener.
Definition: MSNet.cpp:794
void writeXMLRoute(OutputDevice &os, int index=-1) const
Called on route output.
begin/end of the description of a route
The speed is given.
static bool myIntendedDepart
A shortcut for the Option "vehroute-output.intended-depart".
static OptionsCont & getOptions()
Retrieves the options.
Definition: OptionsCont.cpp:65
The lane is given.
virtual std::string getString(int id) const =0
Returns the string-value of the named (by its enum-value) attribute.
std::vector< Stop > stops
List of the stops the vehicle will make, TraCI may add entries here.
std::map< const SUMOVehicle *, MSDevice_Vehroutes *, SUMOVehicle::ComparatorIdLess > myDevices
A map for internal notification.
void writeParams(OutputDevice &out) const
The state of a link.
void generateOutput() const
Called on writing vehroutes output.
static void init()
Static intialization.
A road/street connecting two junctions.
Definition: MSEdge.h:80
bool isSet(const std::string &name, bool failOnNonExistant=true) const
Returns the information whether the named option is set.
The vehicle changes lanes (micro only)
int myDepartLane
The lane the vehicle departed at.
static bool myLastRouteOnly
A shortcut for the Option "vehroute-output.last-route".
int getIndex() const
Returns the lane&#39;s index.
Definition: MSLane.h:507
The edge is a district edge.
Definition: MSEdge.h:99
The vehicle got a new route.
Definition: MSNet.h:588
void addRoute()
Called on route change.
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
Definition: ToString.h:56
const std::vector< double > & getProbs() const
Returns the probabilities assigned to the members of the distribution.
Representation of a vehicle.
Definition: SUMOVehicle.h:67
Encapsulated SAX-Attributes.
const int VEHPARS_DEPARTSPEED_SET
virtual int getNumberReroutes() const =0
Returns the number of new routes this vehicle got.
double myDepartPosLat
The lateral depart position.
std::vector< RouteReplaceInfo > myReplacedRoutes
Prior routes.
const int VEHPARS_DEPARTPOSLAT_SET
SUMOTime depart
The vehicle&#39;s departure time.
SUMOTime getCurrentTimeStep() const
Returns the current simulation step.
Definition: MSNet.h:257
static MSDevice_Vehroutes * buildVehicleDevices(SUMOVehicle &v, std::vector< MSDevice *> &into, int maxRoutes=INT_MAX)
Build devices for the given vehicle, if needed.
bool hasInternalLinks() const
return whether the network contains internal links
Definition: MSNet.h:678
A class that is notified about reroutings.
static bool gUsingInternalLanes
Information whether the simulation regards internal lanes.
Definition: MSGlobals.h:76
int writeEdgeIDs(OutputDevice &os, const MSEdge *const from, const MSEdge *const upTo=0) const
Output the edge ids up to but not including the id of the given edge.
Definition: MSRoute.cpp:222
static void generateOutputForUnfinished()
generate vehroute output for vehicles which are still in the network
void writeOutput(const bool hasArrived) const
Called on writing vehroutes output.
static bool myRouteLength
A shortcut for the Option "vehroute-output.route-length".
VehicleState
Definition of a vehicle state.
Definition: MSNet.h:576
void saveState(OutputDevice &out) const
Saves the state of the device.
bool notifyLeave(SUMOVehicle &veh, double lastPos, Notification reason, const MSLane *enteredLane=0)
Saves exit times if needed.
Abstract in-vehicle device.
Definition: MSDevice.h:71
virtual double getDepartPos() const =0
Returns this vehicle&#39;s real departure position.
The vehicle has departed (was inserted into the network)
Structure representing possible vehicle parameter.
virtual SUMOTime getDeparture() const =0
Returns this vehicle&#39;s real departure time.
double myDepartSpeed
The speed on departure.
virtual double getPositionOnLane() const =0
Get the vehicle&#39;s position along the lane.
static OutputDevice & getDeviceByOption(const std::string &name)
Returns the device described by the option.
virtual const SUMOVehicleParameter & getParameter() const =0
Returns the vehicle&#39;s parameter (including departure definition)
MSDevice_Vehroutes(SUMOVehicle &holder, const std::string &id, int maxRoutes)
Constructor.
const std::string & getID() const
Returns the name of the vehicle type.
const int VEHPARS_DEPARTLANE_SET
void addReference() const
increments the reference counter for the route
Definition: MSRoute.cpp:99
A device which collects info on the vehicle trip (mainly on departure and arrival) ...
description of a vehicle
static bool createDeviceByOption(const std::string &optionName, const std::string &rootElement="", const std::string &schemaFile="")
Creates the device using the output definition stored in the named option.
Static storage of an output device and its base (abstract) implementation.
Definition: OutputDevice.h:71
bool closeTag()
Closes the most recently opened tag.
void loadState(const SUMOSAXAttributes &attrs)
Loads the state of the device from the given description.
long long int SUMOTime
Definition: TraCIDefs.h:52
const MSRoute * getRoute(int index) const
Called on route retrieval.
MSRouteIterator begin() const
Returns the begin of the list of edges to pass.
Definition: MSRoute.cpp:74
static std::map< const SUMOTime, std::map< const std::string, std::string > > myRouteInfos
const int VEHPARS_DEPARTPOS_SET
virtual const ConstMSEdgeVector::const_iterator & getCurrentRouteEdge() const =0
Returns an iterator pointing to the current edge in this vehicles route.
virtual double getSpeed() const =0
Returns the vehicle&#39;s current speed.
bool isBinary() const
Returns whether we have a binary output.
Definition: OutputDevice.h:244
double myDepartPos
The lane the vehicle departed at.
static bool gUseMesoSim
Definition: MSGlobals.h:98
Representation of a lane in the micro simulation.
Definition: MSLane.h:79
const std::vector< SUMOVehicleParameter::Stop > & getStops() const
Returns the stops.
Definition: MSRoute.cpp:350
virtual const std::string & getID() const =0
Get the vehicle&#39;s ID.
OutputDevice & openTag(const std::string &xmlElement)
Opens an XML tag.
An output device that encapsulates an ofstream.
The vehicle is being teleported.
const MSEdge * myLastSavedAt
The last edge the exit time was saved for.
virtual const MSVehicleType & getVehicleType() const =0
Returns the vehicle&#39;s type.
static bool dictionary(const std::string &id, const MSRoute *route)
Adds a route to the dictionary.
Definition: MSRoute.cpp:118
~MSDevice_Vehroutes()
Destructor.
Information about a replaced route.