Eclipse SUMO - Simulation of Urban MObility
MSNet.h
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2001-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 /****************************************************************************/
22 // The simulated network and simulation performer
23 /****************************************************************************/
24 #ifndef MSNet_h
25 #define MSNet_h
26 
27 
28 // ===========================================================================
29 // included modules
30 // ===========================================================================
31 #include <config.h>
32 
33 #include <typeinfo>
34 #include <vector>
35 #include <map>
36 #include <string>
37 #include <fstream>
38 #include <iostream>
39 #include <cmath>
40 #include <iomanip>
41 #include <memory>
42 #include <utils/common/SUMOTime.h>
48 #include "MSJunction.h"
49 
50 #ifdef HAVE_FOX
52 #endif
53 
54 
55 // ===========================================================================
56 // class declarations
57 // ===========================================================================
58 class MSEdge;
59 class MSEdgeControl;
60 class MSEventControl;
61 class MSVehicleControl;
62 class MSJunctionControl;
63 class MSInsertionControl;
66 class MSVehicle;
67 class MSRoute;
68 class MSLane;
69 class MSTLLogicControl;
71 class MSDetectorControl;
72 class ShapeContainer;
74 class PolygonDynamics;
75 class BinaryInputDevice;
77 class SUMOVehicle;
78 class MSStoppingPlace;
79 template<class E, class L, class N, class V>
81 template<class E, class L, class N, class V>
83 
84 
85 // ===========================================================================
86 // class definitions
87 // ===========================================================================
92 class MSNet {
93 public:
114  };
115 
118 
119 
120 public:
125  static MSNet* getInstance();
126 
130  virtual bool isGUINet() const {
131  return false;
132  }
133 
135  static void initStatic();
136 
138  static void cleanupStatic();
139 
140 
144  static bool hasInstance() {
145  return myInstance != nullptr;
146  }
147 
148 
163  MSNet(MSVehicleControl* vc, MSEventControl* beginOfTimestepEvents,
164  MSEventControl* endOfTimestepEvents,
165  MSEventControl* insertionEvents,
166  ShapeContainer* shapeCont = 0);
167 
168 
170  virtual ~MSNet();
171 
172 
188  void closeBuilding(const OptionsCont& oc, MSEdgeControl* edges, MSJunctionControl* junctions,
189  SUMORouteLoaderControl* routeLoaders, MSTLLogicControl* tlc,
190  std::vector<SUMOTime> stateDumpTimes, std::vector<std::string> stateDumpFiles,
191  bool hasInternalLinks, bool hasNeighs, bool lefthand,
192  double version);
193 
194 
198  bool hasPermissions() const {
199  return myHavePermissions;
200  }
201 
202 
205  myHavePermissions = true;
206  }
207 
208 
214  void addRestriction(const std::string& id, const SUMOVehicleClass svc, const double speed);
215 
216 
222  const std::map<SUMOVehicleClass, double>* getRestrictions(const std::string& id) const;
223 
224 
228  static void clearAll();
229 
230 
239 
240 
244  void simulationStep();
245 
246 
248  void loadRoutes();
249 
250 
255  const std::string generateStatistics(SUMOTime start);
256 
257 
264  void closeSimulation(SUMOTime start);
265 
266 
272  SimulationState simulationState(SUMOTime stopTime) const;
273 
274 
278  static std::string getStateMessage(SimulationState state);
279 
280 
284  inline SUMOTime getCurrentTimeStep() const {
285  return myStep;
286  }
287 
288 
292  inline void setCurrentTimeStep(const SUMOTime step) {
293  myStep = step;
294  }
295 
296 
300  void writeOutput();
301 
302 
306  bool logSimulationDuration() const;
307 
308 
309 
311 
312 
317  void preSimStepOutput() const;
318 
319 
324  void postSimStepOutput() const;
325  //}
326 
327 
328 
331 
338  return *myVehicleControl;
339  }
340 
341 
351 
354  bool hasPersons() const {
355  return myPersonControl != 0;
356  }
357 
367 
370  bool hasContainers() const {
371  return myContainerControl != 0;
372  }
373 
374 
381  return *myEdges;
382  }
383 
384 
391  return *myInserter;
392  }
393 
394 
401  return *myDetectorControl;
402  }
403 
404 
411  return *myLogics;
412  }
413 
414 
421  return *myJunctions;
422  }
423 
424 
432  }
433 
434 
441  return myEndOfTimestepEvents;
442  }
443 
444 
451  return myInsertionEvents;
452  }
453 
454 
461  return *myShapeContainer;
462  }
463 
468  return myDynamicShapeUpdater.get();
469  }
470 
475 
483 
486 
497  bool addStoppingPlace(const SumoXMLTag category, MSStoppingPlace* stop);
498 
499 
505  MSStoppingPlace* getStoppingPlace(const std::string& id, const SumoXMLTag category) const;
506 
513  std::string getStoppingPlaceID(const MSLane* lane, const double pos, const SumoXMLTag category) const;
515 
517 
519  void writeChargingStationOutput() const;
520 
522  void writeRailSignalBlocks() const;
523 
526 
528  virtual bool isSelected(const MSTrafficLightLogic*) const {
529  return false;
530  }
531 
534 
561  };
562 
563 
568  public:
571 
573  virtual ~VehicleStateListener() { }
574 
580  virtual void vehicleStateChanged(const SUMOVehicle* const vehicle, VehicleState to, const std::string& info = "") = 0;
581 
582  };
583 
584 
589 
590 
595 
596 
603  void informVehicleStateListener(const SUMOVehicle* const vehicle, VehicleState to, const std::string& info = "");
605 
606 
607 
615  static double getTravelTime(const MSEdge* const e, const SUMOVehicle* const v, double t);
616 
617 
625  static double getEffort(const MSEdge* const e, const SUMOVehicle* const v, double t);
626 
627 
628  /* @brief get the router, initialize on first use
629  * @param[in] prohibited The vector of forbidden edges (optional)
630  */
632  const MSEdgeVector& prohibited = MSEdgeVector()) const;
634  const MSEdgeVector& prohibited = MSEdgeVector()) const;
635  MSPedestrianRouter& getPedestrianRouter(const MSEdgeVector& prohibited = MSEdgeVector()) const;
636  MSIntermodalRouter& getIntermodalRouter(const int routingMode = 0, const MSEdgeVector& prohibited = MSEdgeVector()) const;
637 
638  static void adaptIntermodalRouter(MSIntermodalRouter& router);
639 
640 
642  bool hasInternalLinks() const {
643  return myHasInternalLinks;
644  }
645 
647  bool hasElevation() const {
648  return myHasElevation;
649  }
650 
652  bool hasPedestrianNetwork() const {
653  return myHasPedestrianNetwork;
654 
655  }
657  bool hasBidiEdges() const {
658  return myHasBidiEdges;
659  }
660 
662  bool lefthand() const {
663  return myLefthand;
664  }
665 
667  double getNetworkVersion() const {
668  return myVersion;
669  }
670 
672  bool warnOnce(const std::string& typeAndID);
673 
674  void interrupt() {
675  myAmInterrupted = true;
676  }
677 
678  bool isInterrupted() const {
679  return myAmInterrupted;
680  }
681 
682 protected:
684  bool checkElevation();
685 
687  bool checkWalkingarea();
688 
690  bool checkBidiEdges();
691 
692 protected:
694  static MSNet* myInstance;
695 
698 
701 
704 
707 
708 
709 
712 
740 
741 
742 
745 
748 
751 
754 
757 
759  long long int myVehiclesMoved;
760  //}
761 
762 
763 
766 
768  std::vector<SUMOTime> myStateDumpTimes;
770  std::vector<std::string> myStateDumpFiles;
774  std::string myStateDumpPrefix;
775  std::string myStateDumpSuffix;
777 
778 
779 
782 
784  std::map<std::string, std::map<SUMOVehicleClass, double> > myRestrictions;
785 
788 
791 
794 
797 
800 
802  double myVersion;
803 
806 
808  std::map<SumoXMLTag, NamedObjectCont<MSStoppingPlace*> > myStoppingPlaces;
809 
811  std::vector<VehicleStateListener*> myVehicleStateListeners;
812 
813 #ifdef HAVE_FOX
814  FXMutex myStateListenerMutex;
816 #endif
817 
819  std::map<std::string, bool> myWarnedOnce;
820 
821  /* @brief The router instance for routing by trigger and by traci
822  * @note MSDevice_Routing has its own instance since it uses a different weight function
823  * @note we provide one member for every switchable router type
824  * because the class structure makes it inconvenient to use a superclass*/
827  mutable MSPedestrianRouter* myPedestrianRouter;
828  mutable std::map<int, MSIntermodalRouter*> myIntermodalRouter;
829 
831  mutable std::pair<bool, NamedRTree> myLanesRTree;
832 
836  std::unique_ptr<MSDynamicShapeUpdater> myDynamicShapeUpdater;
837 
838 
840  static const std::string STAGE_EVENTS;
841  static const std::string STAGE_MOVEMENTS;
842  static const std::string STAGE_LANECHANGE;
843  static const std::string STAGE_INSERTIONS;
844 
845 private:
847  MSNet(const MSNet&);
848 
850  MSNet& operator=(const MSNet&);
851 
852 
853 };
854 
855 
856 #endif
857 
858 /****************************************************************************/
859 
std::string myStateDumpSuffix
Definition: MSNet.h:775
The vehicle has departed (was inserted into the network)
Definition: MSNet.h:540
SumoXMLTag
Numbers representing SUMO-XML - element names.
bool myHasPedestrianNetwork
Whether the network contains pedestrian network elements.
Definition: MSNet.h:793
Representation of a vehicle in the micro simulation.
Definition: MSVehicle.h:80
long long int SUMOTime
Definition: SUMOTime.h:35
Interface for objects listening to vehicle state changes.
Definition: MSNet.h:567
bool hasPersons() const
Returns whether persons are simulated.
Definition: MSNet.h:354
MSDynamicShapeUpdater * makeDynamicShapeUpdater()
Creates and returns a dynamic shapes updater.
Definition: MSNet.cpp:814
bool checkBidiEdges()
check wether bidirectional edges occur in the network
Definition: MSNet.cpp:1070
void informVehicleStateListener(const SUMOVehicle *const vehicle, VehicleState to, const std::string &info="")
Informs all added listeners about a vehicle&#39;s state change.
Definition: MSNet.cpp:882
void removeVehicleStateListener(VehicleStateListener *listener)
Removes a vehicle states listener.
Definition: MSNet.cpp:873
MSPedestrianRouter * myPedestrianRouter
Definition: MSNet.h:827
MSEventControl * myEndOfTimestepEvents
Controls events executed at the end of a time step;.
Definition: MSNet.h:732
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types...
MSStoppingPlace * getStoppingPlace(const std::string &id, const SumoXMLTag category) const
Returns the named stopping place of the given category.
Definition: MSNet.cpp:899
std::string getStoppingPlaceID(const MSLane *lane, const double pos, const SumoXMLTag category) const
Returns the stop of the given category close to the given position.
Definition: MSNet.cpp:908
A lane area vehicles can halt at.
bool hasPermissions() const
Returns whether the network has specific vehicle class permissions.
Definition: MSNet.h:198
bool warnOnce(const std::string &typeAndID)
return whether a warning regarding the given object shall be issued
Definition: MSNet.cpp:1080
MSVehicleControl * myVehicleControl
Controls vehicle building and deletion;.
Definition: MSNet.h:714
std::vector< SUMOTime > myStateDumpTimes
Times at which a state shall be written.
Definition: MSNet.h:768
SimulationState simulate(SUMOTime start, SUMOTime stop)
Simulates from timestep start to stop.
Definition: MSNet.cpp:334
SUMOAbstractRouter< MSEdge, SUMOVehicle > * myRouterEffort
Definition: MSNet.h:826
bool logSimulationDuration() const
Returns whether duration shall be logged.
Definition: MSNet.cpp:792
MSIntermodalRouter & getIntermodalRouter(const int routingMode=0, const MSEdgeVector &prohibited=MSEdgeVector()) const
Definition: MSNet.cpp:995
std::map< SumoXMLTag, NamedObjectCont< MSStoppingPlace * > > myStoppingPlaces
Dictionary of bus / container stops.
Definition: MSNet.h:808
void writeRailSignalBlocks() const
write rail signal block output
Definition: MSNet.cpp:942
virtual void createTLWrapper(MSTrafficLightLogic *)
creates a wrapper for the given logic (see GUINet)
Definition: MSNet.h:525
static MSNet * getInstance()
Returns the pointer to the unique instance of MSNet (singleton).
Definition: MSNet.cpp:168
virtual bool isGUINet() const
Returns whether this is a GUI Net.
Definition: MSNet.h:130
bool myHavePermissions
Whether the network contains edges which not all vehicles may pass.
Definition: MSNet.h:781
MSEdgeControl * myEdges
Controls edges, performs vehicle movement;.
Definition: MSNet.h:720
void setCurrentTimeStep(const SUMOTime step)
Sets the current simulation step (used by state loading)
Definition: MSNet.h:292
The final simulation step has been performed.
Definition: MSNet.h:103
SUMOTime myEdgeDataEndTime
end of loaded edgeData
Definition: MSNet.h:805
double myVersion
the network version
Definition: MSNet.h:802
std::vector< std::string > myStateDumpFiles
The names for the state files.
Definition: MSNet.h:770
bool myLogExecutionTime
Information whether the simulation duration shall be logged.
Definition: MSNet.h:747
Storage for geometrical objects.
static const std::string STAGE_LANECHANGE
Definition: MSNet.h:842
bool myHasBidiEdges
Whether the network contains bidirectional rail edges.
Definition: MSNet.h:796
A map of named object pointers.
Detectors container; responsible for string and output generation.
bool myLefthand
Whether the network was built for left-hand traffic.
Definition: MSNet.h:799
A storage for edge travel times and efforts.
std::map< int, MSIntermodalRouter * > myIntermodalRouter
Definition: MSNet.h:828
void addVehicleStateListener(VehicleStateListener *listener)
Adds a vehicle states listener.
Definition: MSNet.cpp:865
SimulationState
Possible states of a simulation - running or stopped with different reasons.
Definition: MSNet.h:97
bool addStoppingPlace(const SumoXMLTag category, MSStoppingPlace *stop)
Adds a stopping place.
Definition: MSNet.cpp:893
The simulated network and simulation perfomer.
Definition: MSNet.h:92
void interrupt()
Definition: MSNet.h:674
ShapeContainer * myShapeContainer
A container for geometrical shapes;.
Definition: MSNet.h:736
std::pair< bool, NamedRTree > myLanesRTree
An RTree structure holding lane IDs.
Definition: MSNet.h:831
Container for junctions; performs operations on all stored junctions.
std::unique_ptr< MSDynamicShapeUpdater > myDynamicShapeUpdater
Updater for dynamic shapes that are tracking traffic objects (ensures removal of shape dynamics when ...
Definition: MSNet.h:836
virtual MSTransportableControl & getContainerControl()
Returns the container control.
Definition: MSNet.cpp:806
bool hasPedestrianNetwork() const
return whether the network contains walkingareas and crossings
Definition: MSNet.h:652
The vehicles starts to stop.
Definition: MSNet.h:554
void writeChargingStationOutput() const
write charging station output
Definition: MSNet.cpp:932
A class that stores and controls tls and switching of their programs.
A road/street connecting two junctions.
Definition: MSEdge.h:76
long long int myVehiclesMoved
The overall number of vehicle movements.
Definition: MSNet.h:759
The simulation does not contain further vehicles.
Definition: MSNet.h:105
bool hasBidiEdges() const
return whether the network contains bidirectional rail edges
Definition: MSNet.h:657
static void cleanupStatic()
Place for static initializations of simulation components (called after successful net build) ...
Definition: MSNet.cpp:183
An error occurred during the simulation step.
Definition: MSNet.h:109
bool myAmInterrupted
whether an interrupt occured
Definition: MSNet.h:706
void writeOutput()
Write netstate, summary and detector output.
Definition: MSNet.cpp:664
The vehicle got a new route.
Definition: MSNet.h:548
The vehicle arrived at his destination (is deleted)
Definition: MSNet.h:546
The vehicles starts to park.
Definition: MSNet.h:550
The vehicle is involved in a collision.
Definition: MSNet.h:558
SimulationState simulationState(SUMOTime stopTime) const
Called after a simulation step, this method returns the current simulation state. ...
Definition: MSNet.cpp:578
static bool hasInstance()
Returns whether the network was already constructed.
Definition: MSNet.h:144
MSInsertionControl * myInserter
Controls vehicle insertion;.
Definition: MSNet.h:726
Representation of a vehicle.
Definition: SUMOVehicle.h:61
The vehicle had to brake harder than permitted.
Definition: MSNet.h:560
SUMORouteLoaderControl * myRouteLoaders
Route loader for dynamic loading of routes.
Definition: MSNet.h:697
virtual MSTransportableControl & getPersonControl()
Returns the person control.
Definition: MSNet.cpp:798
static double getTravelTime(const MSEdge *const e, const SUMOVehicle *const v, double t)
Returns the travel time to pass an edge.
Definition: MSNet.cpp:151
ShapeContainer & getShapeContainer()
Returns the shapes container.
Definition: MSNet.h:460
void closeSimulation(SUMOTime start)
Closes the simulation (all files, connections, etc.)
Definition: MSNet.cpp:436
std::map< std::string, std::map< SUMOVehicleClass, double > > myRestrictions
The vehicle class specific speed restrictions.
Definition: MSNet.h:784
bool myLogStepNumber
Information whether the number of the simulation step shall be logged.
Definition: MSNet.h:750
MSTLLogicControl & getTLSControl()
Returns the tls logics control.
Definition: MSNet.h:410
MSVehicleControl & getVehicleControl()
Returns the vehicle control.
Definition: MSNet.h:337
bool isInterrupted() const
Definition: MSNet.h:678
MSEventControl * getBeginOfTimestepEvents()
Returns the event control for events executed at the begin of a time step.
Definition: MSNet.h:430
MSDetectorControl * myDetectorControl
Controls detectors;.
Definition: MSNet.h:728
void setPermissionsFound()
Labels the network to contain vehicle class permissions.
Definition: MSNet.h:204
void postSimStepOutput() const
Prints the statistics of the step at its end.
Definition: MSNet.cpp:835
bool hasContainers() const
Returns whether containers are simulated.
Definition: MSNet.h:370
Stores edges and lanes, performs moving of vehicle.
Definition: MSEdgeControl.h:73
const std::map< SUMOVehicleClass, double > * getRestrictions(const std::string &id) const
Returns the restrictions for an edge type If no restrictions are present, 0 is returned.
Definition: MSNet.cpp:324
MSTLLogicControl * myLogics
Controls tls logics, realizes waiting on tls rules;.
Definition: MSNet.h:724
The connection to a client was closed by the client.
Definition: MSNet.h:107
The simulation is running.
Definition: MSNet.h:101
SUMOTime getCurrentTimeStep() const
Returns the current simulation step.
Definition: MSNet.h:284
std::map< std::string, bool > myWarnedOnce
container to record warnings that shall only be issued once
Definition: MSNet.h:819
void addRestriction(const std::string &id, const SUMOVehicleClass svc, const double speed)
Adds a restriction for an edge type.
Definition: MSNet.cpp:318
virtual void vehicleStateChanged(const SUMOVehicle *const vehicle, VehicleState to, const std::string &info="")=0
Called if a vehicle changes its state.
MSNet & operator=(const MSNet &)
Invalidated assignment operator.
The vehicle started to teleport.
Definition: MSNet.h:542
bool hasInternalLinks() const
return whether the network contains internal links
Definition: MSNet.h:642
const NamedObjectCont< MSStoppingPlace * > & getStoppingPlaces(SumoXMLTag category) const
Definition: MSNet.cpp:922
The vehicle ends to park.
Definition: MSNet.h:552
MSDetectorControl & getDetectorControl()
Returns the detector control.
Definition: MSNet.h:400
bool hasElevation() const
return whether the network contains elevation data
Definition: MSNet.h:647
MSPedestrianRouter & getPedestrianRouter(const MSEdgeVector &prohibited=MSEdgeVector()) const
Definition: MSNet.cpp:985
bool lefthand() const
return whether the network was built for lefthand traffic
Definition: MSNet.h:662
SUMOTime myStateDumpPeriod
The period for writing state.
Definition: MSNet.h:772
virtual bool isSelected(const MSTrafficLightLogic *) const
return wheter the given logic (or rather it&#39;s wrapper) is selected in the GUI
Definition: MSNet.h:528
Inserts vehicles into the network when their departure time is reached.
long myTraCIStepDuration
The last simulation step duration.
Definition: MSNet.h:753
int myMaxTeleports
Maximum number of teleports.
Definition: MSNet.h:703
PedestrianRouter< MSEdge, MSLane, MSJunction, MSVehicle > MSPedestrianRouter
Definition: MSNet.h:116
VehicleState
Definition of a vehicle state.
Definition: MSNet.h:536
MSEventControl * getEndOfTimestepEvents()
Returns the event control for events executed at the end of a time step.
Definition: MSNet.h:440
void closeBuilding(const OptionsCont &oc, MSEdgeControl *edges, MSJunctionControl *junctions, SUMORouteLoaderControl *routeLoaders, MSTLLogicControl *tlc, std::vector< SUMOTime > stateDumpTimes, std::vector< std::string > stateDumpFiles, bool hasInternalLinks, bool hasNeighs, bool lefthand, double version)
Closes the network&#39;s building process.
Definition: MSNet.cpp:241
static const std::string STAGE_MOVEMENTS
Definition: MSNet.h:841
VehicleStateListener()
Constructor.
Definition: MSNet.h:570
The vehicle was built, but has not yet departed.
Definition: MSNet.h:538
std::vector< VehicleStateListener * > myVehicleStateListeners
Container for vehicle state listener.
Definition: MSNet.h:811
static MSNet * myInstance
Unique instance of MSNet.
Definition: MSNet.h:694
static void clearAll()
Clears all dictionaries.
Definition: MSNet.cpp:639
The simulation is loading.
Definition: MSNet.h:99
MSTransportableControl * myContainerControl
Controls container building and deletion;.
Definition: MSNet.h:718
MSJunctionControl * myJunctions
Controls junctions, realizes right-of-way rules;.
Definition: MSNet.h:722
bool checkWalkingarea()
check all lanes for type walkingArea
Definition: MSNet.cpp:1059
MSInsertionControl & getInsertionControl()
Returns the insertion control.
Definition: MSNet.h:390
MSTransportableControl * myPersonControl
Controls person building and deletion;.
Definition: MSNet.h:716
bool checkElevation()
check all lanes for elevation data
Definition: MSNet.cpp:1045
An external interrupt occured.
Definition: MSNet.h:111
void preSimStepOutput() const
Prints the current step number.
Definition: MSNet.cpp:829
MSEventControl * myBeginOfTimestepEvents
Controls events executed at the begin of a time step;.
Definition: MSNet.h:730
A storage for options typed value containers)
Definition: OptionsCont.h:90
virtual ~VehicleStateListener()
Destructor.
Definition: MSNet.h:573
static void initStatic()
Place for static initializations of simulation components (called after successful net build) ...
Definition: MSNet.cpp:176
MSEdgeWeightsStorage * myEdgeWeights
The net&#39;s knowledge about edge efforts/travel times;.
Definition: MSNet.h:738
The simulation had too many teleports.
Definition: MSNet.h:113
MSNet(MSVehicleControl *vc, MSEventControl *beginOfTimestepEvents, MSEventControl *endOfTimestepEvents, MSEventControl *insertionEvents, ShapeContainer *shapeCont=0)
Constructor.
Definition: MSNet.cpp:190
The vehicle ends to stop.
Definition: MSNet.h:556
MSEventControl * getInsertionEvents()
Returns the event control for insertion events.
Definition: MSNet.h:450
long mySimBeginMillis
The overall simulation duration.
Definition: MSNet.h:756
virtual ~MSNet()
Destructor.
Definition: MSNet.cpp:275
bool myHasElevation
Whether the network contains elevation data.
Definition: MSNet.h:790
The parent class for traffic light logics.
std::string myStateDumpPrefix
name components for periodic state
Definition: MSNet.h:774
static std::string getStateMessage(SimulationState state)
Returns the message to show if a certain state occurs.
Definition: MSNet.cpp:614
double getNetworkVersion() const
return the network version
Definition: MSNet.h:667
MSEdgeControl & getEdgeControl()
Returns the edge control.
Definition: MSNet.h:380
IntermodalRouter< MSEdge, MSLane, MSJunction, SUMOVehicle > MSIntermodalRouter
Definition: MSNet.h:117
MSJunctionControl & getJunctionControl()
Returns the junctions control.
Definition: MSNet.h:420
SUMOTime myStep
Current time step.
Definition: MSNet.h:700
SUMOAbstractRouter< MSEdge, SUMOVehicle > & getRouterTT(const MSEdgeVector &prohibited=MSEdgeVector()) const
Definition: MSNet.cpp:954
The class responsible for building and deletion of vehicles.
std::vector< MSEdge * > MSEdgeVector
Definition: MSEdge.h:72
void simulationStep()
Performs a single simulation step.
Definition: MSNet.cpp:457
void loadRoutes()
loads routes for the next few steps
Definition: MSNet.cpp:375
static const std::string STAGE_INSERTIONS
Definition: MSNet.h:843
MSEventControl * myInsertionEvents
Controls insertion events;.
Definition: MSNet.h:734
Representation of a lane in the micro simulation.
Definition: MSLane.h:83
MSDynamicShapeUpdater * getDynamicShapeUpdater()
Returns the dynamic shapes updater.
Definition: MSNet.h:467
long mySimStepDuration
Definition: MSNet.h:753
Encapsulates binary reading operations on a file.
SUMOAbstractRouter< MSEdge, SUMOVehicle > & getRouterEffort(const MSEdgeVector &prohibited=MSEdgeVector()) const
Definition: MSNet.cpp:974
Stores time-dependant events and executes them at the proper time.
The vehicle ended being teleported.
Definition: MSNet.h:544
bool myHasInternalLinks
Whether the network contains internal links/lanes/edges.
Definition: MSNet.h:787
SUMOAbstractRouter< MSEdge, SUMOVehicle > * myRouterTT
Definition: MSNet.h:825
static void adaptIntermodalRouter(MSIntermodalRouter &router)
Definition: MSNet.cpp:1020
const std::string generateStatistics(SUMOTime start)
Writes performance output and running vehicle stats.
Definition: MSNet.cpp:381
static double getEffort(const MSEdge *const e, const SUMOVehicle *const v, double t)
Returns the effort to pass an edge.
Definition: MSNet.cpp:137
MSEdgeWeightsStorage & getWeightsStorage()
Returns the net&#39;s internal edge travel times/efforts container.
Definition: MSNet.cpp:820
static const std::string STAGE_EVENTS
string constants for simstep stages
Definition: MSNet.h:840