Eclipse SUMO - Simulation of Urban MObility
MSStateHandler.cpp
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2012-2019 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials
5 // are made available under the terms of the Eclipse Public License v2.0
6 // which accompanies this distribution, and is available at
7 // http://www.eclipse.org/legal/epl-v20.html
8 // SPDX-License-Identifier: EPL-2.0
9 /****************************************************************************/
16 // Parser and output filter for routes and vehicles state saving and loading
17 /****************************************************************************/
18 
19 
20 // ===========================================================================
21 // included modules
22 // ===========================================================================
23 #include <config.h>
24 
25 #ifdef HAVE_VERSION_H
26 #include <version.h>
27 #endif
28 
29 #include <sstream>
38 #include <microsim/MSEdge.h>
39 #include <microsim/MSLane.h>
40 #include <microsim/MSGlobals.h>
41 #include <microsim/MSNet.h>
44 #include <microsim/MSRoute.h>
46 #include <microsim/MSDriverState.h>
47 #include "MSStateHandler.h"
48 
49 #include <mesosim/MESegment.h>
50 #include <mesosim/MELoop.h>
51 
52 
53 // ===========================================================================
54 // method definitions
55 // ===========================================================================
56 MSStateHandler::MSStateHandler(const std::string& file, const SUMOTime offset) :
57  MSRouteHandler(file, true),
58  myOffset(offset),
59  mySegment(nullptr),
60  myCurrentLane(nullptr),
61  myAttrs(nullptr),
62  myLastParameterised(nullptr) {
63  myAmLoadingState = true;
64  const std::vector<std::string> vehIDs = OptionsCont::getOptions().getStringVector("load-state.remove-vehicles");
65  myVehiclesToRemove.insert(vehIDs.begin(), vehIDs.end());
66 }
67 
68 
70 }
71 
72 
73 void
74 MSStateHandler::saveState(const std::string& file, SUMOTime step) {
77  out.writeAttr("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance").writeAttr("xsi:noNamespaceSchemaLocation", "http://sumo.dlr.de/xsd/state_file.xsd");
79  //saveRNGs(out);
85  for (int i = 0; i < MSEdge::dictSize(); i++) {
86  for (MESegment* s = MSGlobals::gMesoNet->getSegmentForEdge(*MSEdge::getAllEdges()[i]); s != nullptr; s = s->getNextSegment()) {
87  s->saveState(out);
88  }
89  }
90  } else {
91  for (int i = 0; i < MSEdge::dictSize(); i++) {
92  const std::vector<MSLane*>& lanes = MSEdge::getAllEdges()[i]->getLanes();
93  for (std::vector<MSLane*>::const_iterator it = lanes.begin(); it != lanes.end(); ++it) {
94  (*it)->saveState(out);
95  }
96  }
97  }
98  out.close();
99 }
100 
101 
102 void
104  MSRouteHandler::myStartElement(element, attrs);
106  switch (element) {
107  case SUMO_TAG_SNAPSHOT: {
109  const std::string& version = attrs.getString(SUMO_ATTR_VERSION);
110  if (version != VERSION_STRING) {
111  WRITE_WARNING("State was written with sumo version " + version + " (present: " + VERSION_STRING + ")!");
112  }
113  break;
114  }
115  case SUMO_TAG_RNGSTATE: {
116  if (attrs.hasAttribute(SUMO_ATTR_RNG_DEFAULT)) {
118  }
121  }
124  }
125  if (attrs.hasAttribute(SUMO_ATTR_RNG_DEVICE)) {
127  }
130  }
133  }
136  }
137  break;
138  }
139  case SUMO_TAG_DELAY: {
140  vc.setState(attrs.getInt(SUMO_ATTR_NUMBER),
141  attrs.getInt(SUMO_ATTR_BEGIN),
142  attrs.getInt(SUMO_ATTR_END),
143  attrs.getFloat(SUMO_ATTR_DEPART),
144  attrs.getFloat(SUMO_ATTR_TIME));
145  break;
146  }
147  case SUMO_TAG_FLOWSTATE: {
149  pars->id = attrs.getString(SUMO_ATTR_ID);
150  bool ok;
151  if (attrs.getOpt<bool>(SUMO_ATTR_REROUTE, nullptr, ok, false)) {
153  }
155  attrs.getInt(SUMO_ATTR_INDEX));
156  break;
157  }
158  case SUMO_TAG_VTYPE: {
160  break;
161  }
162  case SUMO_TAG_VEHICLE: {
164  myAttrs = attrs.clone();
165  break;
166  }
167  case SUMO_TAG_DEVICE: {
168  myDeviceAttrs.push_back(attrs.clone());
169  break;
170  }
173  break;
174  }
175  case SUMO_TAG_SEGMENT: {
176  if (mySegment == nullptr) {
178  } else if (mySegment->getNextSegment() == nullptr) {
180  } else {
182  }
183  myQueIndex = 0;
184  break;
185  }
186  case SUMO_TAG_LANE: {
187  bool ok;
188  const std::string laneID = attrs.get<std::string>(SUMO_ATTR_ID, nullptr, ok);
190  if (myCurrentLane == nullptr) {
191  throw ProcessError("Unknown lane '" + laneID + "' in loaded state");
192  }
193  break;
194  }
196  try {
197  const std::vector<std::string>& vehIDs = attrs.getStringVector(SUMO_ATTR_VALUE);
200  } else {
201  myCurrentLane->loadState(vehIDs, MSNet::getInstance()->getVehicleControl());
202  }
203  } catch (EmptyData&) {} // attr may be empty
204  myQueIndex++;
205  break;
206  }
207  case SUMO_TAG_PARAM: {
208  bool ok;
209  const std::string key = attrs.get<std::string>(SUMO_ATTR_KEY, nullptr, ok);
210  // circumventing empty string test
211  const std::string val = attrs.hasAttribute(SUMO_ATTR_VALUE) ? attrs.getString(SUMO_ATTR_VALUE) : "";
212  assert(myLastParameterised != 0);
213  if (myLastParameterised != nullptr) {
215  }
216  break;
217  }
218  default:
219  break;
220  }
221 }
222 
223 
224 void
227  if (element != SUMO_TAG_PARAM && myVehicleParameter == nullptr && myCurrentVType == nullptr) {
228  myLastParameterised = nullptr;
229  }
230 }
231 
232 
233 void
235  assert(myVehicleParameter != 0);
237  // the vehicle was already counted in MSVehicleControl::setState
239  // make a copy because myVehicleParameter is reset in closeVehicle()
240  const std::string vehID = myVehicleParameter->id;
241  if (myVehiclesToRemove.count(vehID) == 0) {
243  // reset depart
244  vc.discountStateLoaded();
245  SUMOVehicle* v = vc.getVehicle(vehID);
247  v->loadState(*myAttrs, myOffset);
248  if (v->hasDeparted()) {
249  // vehicle already departed: disable pre-insertion rerouting and enable regular routing behavior
250  MSDevice_Routing* routingDevice = static_cast<MSDevice_Routing*>(v->getDevice(typeid(MSDevice_Routing)));
251  if (routingDevice != nullptr) {
253  }
255  }
256  while (!myDeviceAttrs.empty()) {
257  const std::string attrID = myDeviceAttrs.back()->getString(SUMO_ATTR_ID);
258  for (MSVehicleDevice* const dev : v->getDevices()) {
259  if (dev->getID() == attrID) {
260  dev->loadState(*myDeviceAttrs.back());
261  }
262  }
263  delete myDeviceAttrs.back();
264  myDeviceAttrs.pop_back();
265  }
266  } else {
267  vc.discountStateLoaded(true);
268  delete myVehicleParameter;
269  myVehicleParameter = nullptr;
270  }
271  delete myAttrs;
272 }
273 
274 
275 void
280  out.writeAttr(SUMO_ATTR_RNG_INSERTIONCONTROL, RandHelper::saveState(MSNet::getInstance()->getInsertionControl().getFlowRNG()));
285  out.closeTag();
286 
287 }
288 
289 
290 /****************************************************************************/
SUMO_TAG_SNAPSHOT
Definition: SUMOXMLDefinitions.h:260
SUMOSAXAttributes::getStringVector
const std::vector< std::string > getStringVector(int attr) const
Tries to read given attribute assuming it is a string vector.
Definition: SUMOSAXAttributes.cpp:113
MSLane::dictionary
static bool dictionary(const std::string &id, MSLane *lane)
Static (sic!) container methods {.
Definition: MSLane.cpp:1866
SUMO_ATTR_DEPART
Definition: SUMOXMLDefinitions.h:431
SUMOSAXAttributes::hasAttribute
virtual bool hasAttribute(int id) const =0
Returns the information whether the named (by its enum-value) attribute is within the current list.
MSEdge::getNumericalID
int getNumericalID() const
Returns the numerical id of the edge.
Definition: MSEdge.h:265
SUMOVehicleParameter::parametersSet
int parametersSet
Information for the router which parameter were set, TraCI may modify this (whe changing color)
Definition: SUMOVehicleParameter.h:671
MSDevice_Routing
A device that performs vehicle rerouting based on current edge speeds.
Definition: MSDevice_Routing.h:60
WRITE_WARNING
#define WRITE_WARNING(msg)
Definition: MsgHandler.h:275
MSNet.h
SUMOVehicle::setChosenSpeedFactor
virtual void setChosenSpeedFactor(const double factor)=0
SUMOSAXAttributes::getString
virtual std::string getString(int id) const =0
Returns the string-value of the named (by its enum-value) attribute.
MESegment
A single mesoscopic segment (cell)
Definition: MESegment.h:49
OutputDevice
Static storage of an output device and its base (abstract) implementation.
Definition: OutputDevice.h:63
MSStateHandler::myStartElement
void myStartElement(int element, const SUMOSAXAttributes &attrs)
Called on the opening of a tag;.
Definition: MSStateHandler.cpp:103
MSRouteHandler::myAmLoadingState
bool myAmLoadingState
whether a state file is being loaded
Definition: MSRouteHandler.h:196
SUMOVehicleParserHelper.h
MESegment::loadState
void loadState(const std::vector< std::string > &vehIDs, MSVehicleControl &vc, const SUMOTime blockTime, const int queIdx)
Loads the state of this segment with the given parameters.
Definition: MESegment.cpp:660
OptionsCont.h
MSStateHandler::myEndElement
void myEndElement(int element)
Called when a closing tag occurs.
Definition: MSStateHandler.cpp:225
SUMO_TAG_PARAM
parameter associated to a certain key
Definition: SUMOXMLDefinitions.h:169
MSVehicleControl::discountStateLoaded
void discountStateLoaded(bool removed=false)
avoid counting a vehicle twice if it was loaded from state and route input
Definition: MSVehicleControl.h:472
MSVehicleControl::saveState
void saveState(OutputDevice &out)
Saves the current state into the given stream.
Definition: MSVehicleControl.cpp:191
SUMOSAXAttributes::getInt
virtual int getInt(int id) const =0
Returns the int-value of the named (by its enum-value) attribute.
SUMOSAXAttributes::get
T get(int attr, const char *objectid, bool &ok, bool report=true) const
Tries to read given attribute assuming it is an int.
Definition: SUMOSAXAttributes.h:492
SUMO_ATTR_SPEEDFACTOR
Definition: SUMOXMLDefinitions.h:454
MSDevice::getEquipmentRNG
static std::mt19937 * getEquipmentRNG()
Definition: MSDevice.h:90
MESegment::getEdge
const MSEdge & getEdge() const
Returns the edge this segment belongs to.
Definition: MESegment.h:265
VEHPARS_FORCE_REROUTE
const int VEHPARS_FORCE_REROUTE
Definition: SUMOVehicleParameter.h:62
RandHelper::saveState
static std::string saveState(std::mt19937 *rng=0)
save rng state to string
Definition: RandHelper.h:155
MSNet::getInsertionControl
MSInsertionControl & getInsertionControl()
Returns the insertion control.
Definition: MSNet.h:389
MSStateHandler::myOffset
const SUMOTime myOffset
offset
Definition: MSStateHandler.h:91
SUMO_TAG_LANE
begin/end of the description of a single lane
Definition: SUMOXMLDefinitions.h:49
SUMOTime
long long int SUMOTime
Definition: SUMOTime.h:34
SUMOVehicle
Representation of a vehicle.
Definition: SUMOVehicle.h:60
SUMOSAXAttributes::clone
virtual SUMOSAXAttributes * clone() const =0
return a new deep-copy attributes object
EmptyData
Definition: UtilExceptions.h:68
OptionsCont::getOptions
static OptionsCont & getOptions()
Retrieves the options.
Definition: OptionsCont.cpp:57
MSGlobals::gUseMesoSim
static bool gUseMesoSim
Definition: MSGlobals.h:90
SUMO_ATTR_ID
Definition: SUMOXMLDefinitions.h:378
SUMOVehicleParameter
Structure representing possible vehicle parameter.
Definition: SUMOVehicleParameter.h:297
MSEdge.h
SUMO_TAG_VTYPE
description of a vehicle type
Definition: SUMOXMLDefinitions.h:121
MSInsertionControl.h
SUMOSAXAttributes::getFloat
virtual double getFloat(int id) const =0
Returns the double-value of the named (by its enum-value) attribute.
SUMO_TAG_VIEWSETTINGS_VEHICLES
Definition: SUMOXMLDefinitions.h:247
OutputDevice::close
void close()
Closes the device and removes it from the dictionary.
Definition: OutputDevice.cpp:207
MSStateHandler::closeVehicle
void closeVehicle()
Ends the processing of a vehicle.
Definition: MSStateHandler.cpp:234
MSStateHandler::saveState
static void saveState(const std::string &file, SUMOTime step)
Saves the current state.
Definition: MSStateHandler.cpp:74
SUMO_ATTR_RNG_DEVICE
Definition: SUMOXMLDefinitions.h:1029
SUMOVehicleParameter::depart
SUMOTime depart
Definition: SUMOVehicleParameter.h:482
MSEdge::dictSize
static int dictSize()
Returns the number of edges.
Definition: MSEdge.cpp:792
OutputDevice::closeTag
bool closeTag(const std::string &comment="")
Closes the most recently opened tag and optionally adds a comment.
Definition: OutputDevice.cpp:253
OptionsCont::getStringVector
const StringVector & getStringVector(const std::string &name) const
Returns the list of string-value of the named option (only for Option_StringVector)
Definition: OptionsCont.cpp:235
MSVehicleTransfer::getInstance
static MSVehicleTransfer * getInstance()
Returns the instance of this object.
Definition: MSVehicleTransfer.cpp:185
SUMO_ATTR_BEGIN
weights: time range begin
Definition: SUMOXMLDefinitions.h:678
MESegment.h
MSStateHandler::myQueIndex
int myQueIndex
que index
Definition: MSStateHandler.h:103
MSStateHandler::~MSStateHandler
virtual ~MSStateHandler()
standard destructor
Definition: MSStateHandler.cpp:69
MSStateHandler::myLastParameterised
Parameterised * myLastParameterised
the last object that potentially carries parameters
Definition: MSStateHandler.h:112
OutputDevice::writeAttr
OutputDevice & writeAttr(const SumoXMLAttr attr, const T &val)
writes a named attribute
Definition: OutputDevice.h:255
MSInsertionControl::getFlowRNG
std::mt19937 * getFlowRNG()
retrieve internal RNG
Definition: MSInsertionControl.h:160
MSVehicleControl::getVehicle
SUMOVehicle * getVehicle(const std::string &id) const
Returns the vehicle with the given id.
Definition: MSVehicleControl.cpp:240
MSVehicleControl::setState
void setState(int runningVehNo, int loadedVehNo, int endedVehNo, double totalDepartureDelay, double totalTravelTime)
Sets the current state variables as loaded from the stream.
Definition: MSVehicleControl.cpp:181
SUMO_TAG_SEGMENT
segment of a lane
Definition: SUMOXMLDefinitions.h:174
SUMO_ATTR_RNG_DRIVERSTATE
Definition: SUMOXMLDefinitions.h:1031
MSInsertionControl::saveState
void saveState(OutputDevice &out)
Saves the current state into the given stream.
Definition: MSInsertionControl.cpp:334
SUMOVehicle::getDevice
virtual MSVehicleDevice * getDevice(const std::type_info &type) const =0
Returns a device of the given type if it exists or 0.
MSRouteHandler::closeVehicle
virtual void closeVehicle()
Ends the processing of a vehicle (note: is virtual because is reimplemented in MSStateHandler)
Definition: MSRouteHandler.cpp:587
MSStateHandler::mySegment
MESegment * mySegment
segment
Definition: MSStateHandler.h:97
SUMOVehicleParameter::id
std::string id
The vehicle's id.
Definition: SUMOVehicleParameter.h:468
MELoop::getSegmentForEdge
MESegment * getSegmentForEdge(const MSEdge &e, double pos=0)
Get the segment for a given edge at a given position.
Definition: MELoop.cpp:292
SUMORouteHandler::myEndElement
virtual void myEndElement(int element)
Called when a closing tag occurs.
Definition: SUMORouteHandler.cpp:215
OutputDevice.h
MSRoute::dict_saveState
static void dict_saveState(OutputDevice &out)
Saves all known routes into the given stream.
Definition: MSRoute.cpp:256
ProcessError
Definition: UtilExceptions.h:39
MSStateHandler::myAttrs
SUMOSAXAttributes * myAttrs
cached attrs (used when loading vehicles)
Definition: MSStateHandler.h:106
SUMO_TAG_DEVICE
Definition: SUMOXMLDefinitions.h:271
SUMO_TAG_VEHICLETRANSFER
Definition: SUMOXMLDefinitions.h:270
time2string
std::string time2string(SUMOTime t)
Definition: SUMOTime.cpp:67
MSGlobals.h
MSDevice_Routing.h
SUMO_ATTR_RNG_DEVICE_TOC
Definition: SUMOXMLDefinitions.h:1032
MSStateHandler::myCurrentLane
MSLane * myCurrentLane
current lane being loaded
Definition: MSStateHandler.h:100
MSStateHandler::MSStateHandler
MSStateHandler(const std::string &file, const SUMOTime offset)
standard constructor
Definition: MSStateHandler.cpp:56
MESegment::getNextSegment
MESegment * getNextSegment() const
Returns the following segment on the same edge (0 if it is the last).
Definition: MESegment.h:151
MSEdge
A road/street connecting two junctions.
Definition: MSEdge.h:78
SUMOSAXAttributes::getOpt
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.
Definition: SUMOSAXAttributes.h:518
MSStateHandler::myTime
SUMOTime myTime
time
Definition: MSStateHandler.h:94
MSMoveReminder::NOTIFICATION_DEPARTED
The vehicle has departed (was inserted into the network)
Definition: MSMoveReminder.h:93
SUMORouteHandler::myVehicleParameter
SUMOVehicleParameter * myVehicleParameter
Parameter of the current vehicle, trip, person, container or flow.
Definition: SUMORouteHandler.h:206
MSDevice_BTreceiver::getRNG
static std::mt19937 * getRNG()
Definition: MSDevice_BTreceiver.h:78
SUMO_TAG_VEHICLE
description of a vehicle
Definition: SUMOXMLDefinitions.h:119
SUMO_ATTR_TIME
trigger: the time of the step
Definition: SUMOXMLDefinitions.h:676
string2time
SUMOTime string2time(const std::string &r)
Definition: SUMOTime.cpp:44
MSLane::loadState
void loadState(const std::vector< std::string > &vehIDs, MSVehicleControl &vc)
Loads the state of this segment with the given parameters.
Definition: MSLane.cpp:3049
MSDevice_BTreceiver.h
SUMO_ATTR_INDEX
Definition: SUMOXMLDefinitions.h:804
MSDevice_Routing::notifyEnter
bool notifyEnter(SUMOTrafficObject &veh, MSMoveReminder::Notification reason, const MSLane *enteredLane=0)
Computes a new route on vehicle insertion.
Definition: MSDevice_Routing.cpp:167
SUMO_ATTR_RNG_INSERTIONCONTROL
Definition: SUMOXMLDefinitions.h:1028
SUMO_TAG_DELAY
Definition: SUMOXMLDefinitions.h:258
OutputDevice::openTag
OutputDevice & openTag(const std::string &xmlElement)
Opens an XML tag.
Definition: OutputDevice.cpp:239
StringUtils.h
MSRouteHandler::myStartElement
virtual void myStartElement(int element, const SUMOSAXAttributes &attrs)
Called on the opening of a tag;.
Definition: MSRouteHandler.cpp:132
MSDriverState.h
OutputDevice::getDevice
static OutputDevice & getDevice(const std::string &name)
Returns the described OutputDevice.
Definition: OutputDevice.cpp:54
OutputDevice::writeHeader
bool writeHeader(const SumoXMLTag &rootElement)
Definition: OutputDevice.h:187
MSNet::getInstance
static MSNet * getInstance()
Returns the pointer to the unique instance of MSNet (singleton).
Definition: MSNet.cpp:167
SUMO_TAG_FLOWSTATE
a flow state definition (used when saving and loading simulatino state)
Definition: SUMOXMLDefinitions.h:155
MSGlobals::gMesoNet
static MELoop * gMesoNet
mesoscopic simulation infrastructure
Definition: MSGlobals.h:105
SUMOVehicle::loadState
virtual void loadState(const SUMOSAXAttributes &attrs, const SUMOTime offset)=0
Loads the state of this vehicle from the given description.
SUMOVehicle::hasDeparted
virtual bool hasDeparted() const =0
Returns whether this vehicle has departed.
MSStateHandler.h
SUMO_ATTR_REROUTE
Definition: SUMOXMLDefinitions.h:648
MSStateHandler::myDeviceAttrs
std::vector< SUMOSAXAttributes * > myDeviceAttrs
cached device attrs (used when loading vehicles)
Definition: MSStateHandler.h:109
RandHelper::loadState
static void loadState(const std::string &state, std::mt19937 *rng=0)
load rng state from string
Definition: RandHelper.h:165
SUMO_ATTR_KEY
Definition: SUMOXMLDefinitions.h:408
MSRouteHandler::getParsingRNG
static std::mt19937 * getParsingRNG()
get parsing RNG
Definition: MSRouteHandler.h:62
MSRoute.h
SUMO_ATTR_VALUE
Definition: SUMOXMLDefinitions.h:779
MSRouteHandler
Parser and container for routes during their loading.
Definition: MSRouteHandler.h:53
SUMO_TAG_RNGSTATE
Definition: SUMOXMLDefinitions.h:267
Parameterised::setParameter
void setParameter(const std::string &key, const std::string &value)
Sets a parameter.
Definition: Parameterised.cpp:46
MSInsertionControl::addFlow
bool addFlow(SUMOVehicleParameter *const pars, int index=-1)
Adds parameter for a vehicle flow for departure.
Definition: MSInsertionControl.cpp:76
MSStateHandler::saveRNGs
static void saveRNGs(OutputDevice &out)
save the state of random number generators
Definition: MSStateHandler.cpp:276
OUProcess::getRNG
static std::mt19937 * getRNG()
Definition: MSDriverState.h:79
config.h
MSVehicleControl
The class responsible for building and deletion of vehicles.
Definition: MSVehicleControl.h:71
MSVehicleTransfer::loadState
void loadState(const SUMOSAXAttributes &attrs, const SUMOTime offset, MSVehicleControl &vc)
Loads one transfer vehicle state from the given descriptionn.
Definition: MSVehicleTransfer.cpp:217
SUMORouteHandler::myCurrentVType
SUMOVTypeParameter * myCurrentVType
The currently parsed vehicle type.
Definition: SUMORouteHandler.h:230
SUMO_ATTR_END
weights: time range end
Definition: SUMOXMLDefinitions.h:680
MELoop.h
StringUtils::toLong
static long long int toLong(const std::string &sData)
converts a string into the long value described by it by calling the char-type converter,...
Definition: StringUtils.cpp:297
SUMOVehicle::getDevices
virtual const std::vector< MSVehicleDevice * > & getDevices() const =0
Returns this vehicle's devices.
MSLane.h
MSVehicleTransfer::saveState
void saveState(OutputDevice &out)
Saves the current state into the given stream.
Definition: MSVehicleTransfer.cpp:202
VERSION_STRING
#define VERSION_STRING
Definition: config.h:210
MSEdge::getAllEdges
static const MSEdgeVector & getAllEdges()
Returns all edges with a numerical id.
Definition: MSEdge.cpp:798
MSStateHandler::myVehiclesToRemove
std::set< std::string > myVehiclesToRemove
vehicles that shall be removed when loading state
Definition: MSStateHandler.h:115
SUMO_ATTR_NUMBER
Definition: SUMOXMLDefinitions.h:666
SUMOSAXAttributes
Encapsulated SAX-Attributes.
Definition: SUMOSAXAttributes.h:56
MSVehicleControl.h
MSVehicleTransfer.h
MSDevice_ToC::getResponseTimeRNG
static std::mt19937 * getResponseTimeRNG()
Definition: MSDevice_ToC.h:178
SUMO_ATTR_RNG_DEFAULT
Definition: SUMOXMLDefinitions.h:1026
SUMO_ATTR_VERSION
Definition: SUMOXMLDefinitions.h:876
SUMOXMLDefinitions.h
SUMO_ATTR_RNG_DEVICE_BT
Definition: SUMOXMLDefinitions.h:1030
MSNet::getVehicleControl
MSVehicleControl & getVehicleControl()
Returns the vehicle control.
Definition: MSNet.h:336
MSDevice_ToC.h
SUMO_ATTR_RNG_ROUTEHANDLER
Definition: SUMOXMLDefinitions.h:1027
MSVehicleDevice
Abstract in-vehicle device.
Definition: MSVehicleDevice.h:54
MSInsertionControl::alreadyDeparted
void alreadyDeparted(SUMOVehicle *veh)
stops trying to emit the given vehicle (because it already departed)
Definition: MSInsertionControl.cpp:277