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 
588  void addVehicleStateListener(VehicleStateListener* listener);
589 
590 
594  void removeVehicleStateListener(VehicleStateListener* listener);
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*/
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 
MSNet::myShapeContainer
ShapeContainer * myShapeContainer
A container for geometrical shapes;.
Definition: MSNet.h:736
MSNet::MSNet
MSNet(MSVehicleControl *vc, MSEventControl *beginOfTimestepEvents, MSEventControl *endOfTimestepEvents, MSEventControl *insertionEvents, ShapeContainer *shapeCont=0)
Constructor.
Definition: MSNet.cpp:190
MSNet::hasInternalLinks
bool hasInternalLinks() const
return whether the network contains internal links
Definition: MSNet.h:642
MSEventControl
Stores time-dependant events and executes them at the proper time.
Definition: MSEventControl.h:50
MSNet::createTLWrapper
virtual void createTLWrapper(MSTrafficLightLogic *)
creates a wrapper for the given logic (see GUINet)
Definition: MSNet.h:525
MSNet::getEffort
static double getEffort(const MSEdge *const e, const SUMOVehicle *const v, double t)
Returns the effort to pass an edge.
Definition: MSNet.cpp:137
SUMOVehicleClass
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types.
Definition: SUMOVehicleClass.h:134
MSNet::VehicleStateListener::VehicleStateListener
VehicleStateListener()
Constructor.
Definition: MSNet.h:570
MSNet::getStoppingPlace
MSStoppingPlace * getStoppingPlace(const std::string &id, const SumoXMLTag category) const
Returns the named stopping place of the given category.
Definition: MSNet.cpp:899
MSStoppingPlace
A lane area vehicles can halt at.
Definition: MSStoppingPlace.h:60
MSNet::myHasElevation
bool myHasElevation
Whether the network contains elevation data.
Definition: MSNet.h:790
MSNet::hasPermissions
bool hasPermissions() const
Returns whether the network has specific vehicle class permissions.
Definition: MSNet.h:198
MSNet::hasBidiEdges
bool hasBidiEdges() const
return whether the network contains bidirectional rail edges
Definition: MSNet.h:657
MSNet::VEHICLE_STATE_DEPARTED
The vehicle has departed (was inserted into the network)
Definition: MSNet.h:540
PedestrianRouter
Definition: MSNet.h:82
MSNet::getDetectorControl
MSDetectorControl & getDetectorControl()
Returns the detector control.
Definition: MSNet.h:400
MSNet::hasContainers
bool hasContainers() const
Returns whether containers are simulated.
Definition: MSNet.h:370
MSNet::preSimStepOutput
void preSimStepOutput() const
Prints the current step number.
Definition: MSNet.cpp:829
SUMOTime.h
MSLane
Representation of a lane in the micro simulation.
Definition: MSLane.h:83
MSNet::getRouterTT
SUMOAbstractRouter< MSEdge, SUMOVehicle > & getRouterTT(const MSEdgeVector &prohibited=MSEdgeVector()) const
Definition: MSNet.cpp:954
MSNet::STAGE_INSERTIONS
static const std::string STAGE_INSERTIONS
Definition: MSNet.h:843
MSNet::simulationStep
void simulationStep()
Performs a single simulation step.
Definition: MSNet.cpp:457
MSNet::myVehicleControl
MSVehicleControl * myVehicleControl
Controls vehicle building and deletion;.
Definition: MSNet.h:714
MSNet::getDynamicShapeUpdater
MSDynamicShapeUpdater * getDynamicShapeUpdater()
Returns the dynamic shapes updater.
Definition: MSNet.h:467
MSNet::mySimStepDuration
long mySimStepDuration
Definition: MSNet.h:753
MSNet::cleanupStatic
static void cleanupStatic()
Place for static initializations of simulation components (called after successful net build)
Definition: MSNet.cpp:183
MSNet::removeVehicleStateListener
void removeVehicleStateListener(VehicleStateListener *listener)
Removes a vehicle states listener.
Definition: MSNet.cpp:873
MSNet::getRouterEffort
SUMOAbstractRouter< MSEdge, SUMOVehicle > & getRouterEffort(const MSEdgeVector &prohibited=MSEdgeVector()) const
Definition: MSNet.cpp:974
FXConditionalLock.h
MSNet::getShapeContainer
ShapeContainer & getShapeContainer()
Returns the shapes container.
Definition: MSNet.h:460
MSNet::myInstance
static MSNet * myInstance
Unique instance of MSNet.
Definition: MSNet.h:694
MSNet::writeOutput
void writeOutput()
Write netstate, summary and detector output.
Definition: MSNet.cpp:664
MSNet::simulationState
SimulationState simulationState(SUMOTime stopTime) const
Called after a simulation step, this method returns the current simulation state.
Definition: MSNet.cpp:578
IntermodalRouter
Definition: MSNet.h:80
MSNet::getContainerControl
virtual MSTransportableControl & getContainerControl()
Returns the container control.
Definition: MSNet.cpp:806
MSNet::informVehicleStateListener
void informVehicleStateListener(const SUMOVehicle *const vehicle, VehicleState to, const std::string &info="")
Informs all added listeners about a vehicle's state change.
Definition: MSNet.cpp:882
MSNet::VehicleStateListener
Interface for objects listening to vehicle state changes.
Definition: MSNet.h:567
MSNet::getBeginOfTimestepEvents
MSEventControl * getBeginOfTimestepEvents()
Returns the event control for events executed at the begin of a time step.
Definition: MSNet.h:430
MSDetectorControl
Detectors container; responsible for string and output generation.
Definition: MSDetectorControl.h:53
MSNet
The simulated network and simulation perfomer.
Definition: MSNet.h:92
MSNet::myEndOfTimestepEvents
MSEventControl * myEndOfTimestepEvents
Controls events executed at the end of a time step;.
Definition: MSNet.h:732
MSNet::myDynamicShapeUpdater
std::unique_ptr< MSDynamicShapeUpdater > myDynamicShapeUpdater
Updater for dynamic shapes that are tracking traffic objects (ensures removal of shape dynamics when ...
Definition: MSNet.h:836
MSNet::getInsertionControl
MSInsertionControl & getInsertionControl()
Returns the insertion control.
Definition: MSNet.h:390
MSNet::warnOnce
bool warnOnce(const std::string &typeAndID)
return whether a warning regarding the given object shall be issued
Definition: MSNet.cpp:1080
MSNet::myMaxTeleports
int myMaxTeleports
Maximum number of teleports.
Definition: MSNet.h:703
MSNet::STAGE_LANECHANGE
static const std::string STAGE_LANECHANGE
Definition: MSNet.h:842
MSNet::myEdgeDataEndTime
SUMOTime myEdgeDataEndTime
end of loaded edgeData
Definition: MSNet.h:805
SUMOTime
long long int SUMOTime
Definition: SUMOTime.h:35
SUMOVehicle
Representation of a vehicle.
Definition: SUMOVehicle.h:61
MSNet::postSimStepOutput
void postSimStepOutput() const
Prints the statistics of the step at its end.
Definition: MSNet.cpp:835
MSNet::MSIntermodalRouter
IntermodalRouter< MSEdge, MSLane, MSJunction, SUMOVehicle > MSIntermodalRouter
Definition: MSNet.h:117
ShapeContainer
Storage for geometrical objects.
Definition: ShapeContainer.h:50
MSNet::myVersion
double myVersion
the network version
Definition: MSNet.h:802
MSNet::myStateDumpTimes
std::vector< SUMOTime > myStateDumpTimes
Times at which a state shall be written.
Definition: MSNet.h:768
MSNet::hasPersons
bool hasPersons() const
Returns whether persons are simulated.
Definition: MSNet.h:354
MSNet::clearAll
static void clearAll()
Clears all dictionaries.
Definition: MSNet.cpp:639
MSChargingStation.h
MSNet::logSimulationDuration
bool logSimulationDuration() const
Returns whether duration shall be logged.
Definition: MSNet.cpp:792
NamedRTree.h
MSNet::simulate
SimulationState simulate(SUMOTime start, SUMOTime stop)
Simulates from timestep start to stop.
Definition: MSNet.cpp:334
MSNet::makeDynamicShapeUpdater
MSDynamicShapeUpdater * makeDynamicShapeUpdater()
Creates and returns a dynamic shapes updater.
Definition: MSNet.cpp:814
MSNet::VEHICLE_STATE_ARRIVED
The vehicle arrived at his destination (is deleted)
Definition: MSNet.h:546
MSNet::setCurrentTimeStep
void setCurrentTimeStep(const SUMOTime step)
Sets the current simulation step (used by state loading)
Definition: MSNet.h:292
MSNet::getStoppingPlaceID
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
MSNet::VEHICLE_STATE_NEWROUTE
The vehicle got a new route.
Definition: MSNet.h:548
MSNet::isGUINet
virtual bool isGUINet() const
Returns whether this is a GUI Net.
Definition: MSNet.h:130
MSDynamicShapeUpdater
Definition: MSDynamicShapeUpdater.h:26
MSNet::closeSimulation
void closeSimulation(SUMOTime start)
Closes the simulation (all files, connections, etc.)
Definition: MSNet.cpp:436
MSRoute
Definition: MSRoute.h:67
SumoXMLTag
SumoXMLTag
Numbers representing SUMO-XML - element names.
Definition: SUMOXMLDefinitions.h:42
MSNet::myRouterTT
SUMOAbstractRouter< MSEdge, SUMOVehicle > * myRouterTT
Definition: MSNet.h:825
MSNet::myStateDumpFiles
std::vector< std::string > myStateDumpFiles
The names for the state files.
Definition: MSNet.h:770
MSEdgeWeightsStorage
A storage for edge travel times and efforts.
Definition: MSEdgeWeightsStorage.h:44
MSNet::VEHICLE_STATE_EMERGENCYSTOP
The vehicle had to brake harder than permitted.
Definition: MSNet.h:560
MSNet::myLogExecutionTime
bool myLogExecutionTime
Information whether the simulation duration shall be logged.
Definition: MSNet.h:747
MSNet::writeChargingStationOutput
void writeChargingStationOutput() const
write charging station output
Definition: MSNet.cpp:932
MSNet::myVehiclesMoved
long long int myVehiclesMoved
The overall number of vehicle movements.
Definition: MSNet.h:759
MSTransportableControl
Definition: MSTransportableControl.h:52
MSNet::getRestrictions
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
MSNet::SIMSTATE_NO_FURTHER_VEHICLES
The simulation does not contain further vehicles.
Definition: MSNet.h:105
MSJunctionControl
Container for junctions; performs operations on all stored junctions.
Definition: MSJunctionControl.h:45
MSNet::mySimBeginMillis
long mySimBeginMillis
The overall simulation duration.
Definition: MSNet.h:756
MSNet::myAmInterrupted
bool myAmInterrupted
whether an interrupt occured
Definition: MSNet.h:706
MSNet::myStoppingPlaces
std::map< SumoXMLTag, NamedObjectCont< MSStoppingPlace * > > myStoppingPlaces
Dictionary of bus / container stops.
Definition: MSNet.h:808
MSNet::myLanesRTree
std::pair< bool, NamedRTree > myLanesRTree
An RTree structure holding lane IDs.
Definition: MSNet.h:831
MSNet::SimulationState
SimulationState
Possible states of a simulation - running or stopped with different reasons.
Definition: MSNet.h:97
MSNet::getStoppingPlaces
const NamedObjectCont< MSStoppingPlace * > & getStoppingPlaces(SumoXMLTag category) const
Definition: MSNet.cpp:922
MSNet::VEHICLE_STATE_STARTING_PARKING
The vehicles starts to park.
Definition: MSNet.h:550
MSNet::SIMSTATE_END_STEP_REACHED
The final simulation step has been performed.
Definition: MSNet.h:103
NamedObjectCont
A map of named object pointers.
Definition: NamedObjectCont.h:44
MSNet::myStep
SUMOTime myStep
Current time step.
Definition: MSNet.h:700
MSNet::getWeightsStorage
MSEdgeWeightsStorage & getWeightsStorage()
Returns the net's internal edge travel times/efforts container.
Definition: MSNet.cpp:820
MSNet::setPermissionsFound
void setPermissionsFound()
Labels the network to contain vehicle class permissions.
Definition: MSNet.h:204
MSNet::VehicleState
VehicleState
Definition of a vehicle state.
Definition: MSNet.h:536
MSJunction.h
MSNet::getEndOfTimestepEvents
MSEventControl * getEndOfTimestepEvents()
Returns the event control for events executed at the end of a time step.
Definition: MSNet.h:440
MSNet::lefthand
bool lefthand() const
return whether the network was built for lefthand traffic
Definition: MSNet.h:662
MSNet::getCurrentTimeStep
SUMOTime getCurrentTimeStep() const
Returns the current simulation step.
Definition: MSNet.h:284
MSNet::myTraCIStepDuration
long myTraCIStepDuration
The last simulation step duration.
Definition: MSNet.h:753
MSNet::~MSNet
virtual ~MSNet()
Destructor.
Definition: MSNet.cpp:275
MSNet::operator=
MSNet & operator=(const MSNet &)
Invalidated assignment operator.
MSNet::SIMSTATE_ERROR_IN_SIM
An error occurred during the simulation step.
Definition: MSNet.h:109
MSInsertionControl
Inserts vehicles into the network when their departure time is reached.
Definition: MSInsertionControl.h:62
MSNet::myStateDumpPrefix
std::string myStateDumpPrefix
name components for periodic state
Definition: MSNet.h:774
MSNet::myInserter
MSInsertionControl * myInserter
Controls vehicle insertion;.
Definition: MSNet.h:726
MSNet::myLogics
MSTLLogicControl * myLogics
Controls tls logics, realizes waiting on tls rules;.
Definition: MSNet.h:724
MSNet::addVehicleStateListener
void addVehicleStateListener(VehicleStateListener *listener)
Adds a vehicle states listener.
Definition: MSNet.cpp:865
MSNet::VehicleStateListener::~VehicleStateListener
virtual ~VehicleStateListener()
Destructor.
Definition: MSNet.h:573
MSNet::myWarnedOnce
std::map< std::string, bool > myWarnedOnce
container to record warnings that shall only be issued once
Definition: MSNet.h:819
MSNet::VEHICLE_STATE_COLLISION
The vehicle is involved in a collision.
Definition: MSNet.h:558
MSNet::addStoppingPlace
bool addStoppingPlace(const SumoXMLTag category, MSStoppingPlace *stop)
Adds a stopping place.
Definition: MSNet.cpp:893
MSNet::VEHICLE_STATE_STARTING_TELEPORT
The vehicle started to teleport.
Definition: MSNet.h:542
MSNet::VEHICLE_STATE_BUILT
The vehicle was built, but has not yet departed.
Definition: MSNet.h:538
MSNet::VEHICLE_STATE_STARTING_STOP
The vehicles starts to stop.
Definition: MSNet.h:554
MSNet::SIMSTATE_LOADING
The simulation is loading.
Definition: MSNet.h:99
UtilExceptions.h
MSNet::myJunctions
MSJunctionControl * myJunctions
Controls junctions, realizes right-of-way rules;.
Definition: MSNet.h:722
OptionsCont
A storage for options typed value containers)
Definition: OptionsCont.h:90
MSEdge
A road/street connecting two junctions.
Definition: MSEdge.h:76
MSNet::loadRoutes
void loadRoutes()
loads routes for the next few steps
Definition: MSNet.cpp:375
MSNet::checkWalkingarea
bool checkWalkingarea()
check all lanes for type walkingArea
Definition: MSNet.cpp:1059
MSTrafficLightLogic
The parent class for traffic light logics.
Definition: MSTrafficLightLogic.h:56
MSNet::myLogStepNumber
bool myLogStepNumber
Information whether the number of the simulation step shall be logged.
Definition: MSNet.h:750
MSNet::myStateDumpPeriod
SUMOTime myStateDumpPeriod
The period for writing state.
Definition: MSNet.h:772
MSNet::hasElevation
bool hasElevation() const
return whether the network contains elevation data
Definition: MSNet.h:647
MSNet::STAGE_MOVEMENTS
static const std::string STAGE_MOVEMENTS
Definition: MSNet.h:841
MSNet::myHasPedestrianNetwork
bool myHasPedestrianNetwork
Whether the network contains pedestrian network elements.
Definition: MSNet.h:793
MSNet::SIMSTATE_CONNECTION_CLOSED
The connection to a client was closed by the client.
Definition: MSNet.h:107
MSNet::MSPedestrianRouter
PedestrianRouter< MSEdge, MSLane, MSJunction, MSVehicle > MSPedestrianRouter
Definition: MSNet.h:116
MSNet::myVehicleStateListeners
std::vector< VehicleStateListener * > myVehicleStateListeners
Container for vehicle state listener.
Definition: MSNet.h:811
SUMOAbstractRouter< MSEdge, SUMOVehicle >
MSNet::STAGE_EVENTS
static const std::string STAGE_EVENTS
string constants for simstep stages
Definition: MSNet.h:840
NamedObjectCont.h
MSNet::myHasBidiEdges
bool myHasBidiEdges
Whether the network contains bidirectional rail edges.
Definition: MSNet.h:796
MSNet::myRestrictions
std::map< std::string, std::map< SUMOVehicleClass, double > > myRestrictions
The vehicle class specific speed restrictions.
Definition: MSNet.h:784
MSNet::getTLSControl
MSTLLogicControl & getTLSControl()
Returns the tls logics control.
Definition: MSNet.h:410
MSNet::isSelected
virtual bool isSelected(const MSTrafficLightLogic *) const
return wheter the given logic (or rather it's wrapper) is selected in the GUI
Definition: MSNet.h:528
MSNet::myStateDumpSuffix
std::string myStateDumpSuffix
Definition: MSNet.h:775
MSNet::getInstance
static MSNet * getInstance()
Returns the pointer to the unique instance of MSNet (singleton).
Definition: MSNet.cpp:168
MSNet::getPersonControl
virtual MSTransportableControl & getPersonControl()
Returns the person control.
Definition: MSNet.cpp:798
MSNet::SIMSTATE_RUNNING
The simulation is running.
Definition: MSNet.h:101
MSNet::VehicleStateListener::vehicleStateChanged
virtual void vehicleStateChanged(const SUMOVehicle *const vehicle, VehicleState to, const std::string &info="")=0
Called if a vehicle changes its state.
MSNet::isInterrupted
bool isInterrupted() const
Definition: MSNet.h:678
MSNet::getIntermodalRouter
MSIntermodalRouter & getIntermodalRouter(const int routingMode=0, const MSEdgeVector &prohibited=MSEdgeVector()) const
Definition: MSNet.cpp:995
MSEdgeVector
std::vector< MSEdge * > MSEdgeVector
Definition: MSEdge.h:72
MSNet::myLefthand
bool myLefthand
Whether the network was built for left-hand traffic.
Definition: MSNet.h:799
MSNet::myContainerControl
MSTransportableControl * myContainerControl
Controls container building and deletion;.
Definition: MSNet.h:718
MSNet::getInsertionEvents
MSEventControl * getInsertionEvents()
Returns the event control for insertion events.
Definition: MSNet.h:450
MSNet::VEHICLE_STATE_ENDING_PARKING
The vehicle ends to park.
Definition: MSNet.h:552
MSNet::writeRailSignalBlocks
void writeRailSignalBlocks() const
write rail signal block output
Definition: MSNet.cpp:942
MSNet::myPedestrianRouter
MSPedestrianRouter * myPedestrianRouter
Definition: MSNet.h:827
MSNet::myRouteLoaders
SUMORouteLoaderControl * myRouteLoaders
Route loader for dynamic loading of routes.
Definition: MSNet.h:697
MSNet::VEHICLE_STATE_ENDING_TELEPORT
The vehicle ended being teleported.
Definition: MSNet.h:544
MSNet::generateStatistics
const std::string generateStatistics(SUMOTime start)
Writes performance output and running vehicle stats.
Definition: MSNet.cpp:381
PolygonDynamics
Definition: PolygonDynamics.h:30
MSNet::hasInstance
static bool hasInstance()
Returns whether the network was already constructed.
Definition: MSNet.h:144
MSNet::initStatic
static void initStatic()
Place for static initializations of simulation components (called after successful net build)
Definition: MSNet.cpp:176
config.h
MSVehicleControl
The class responsible for building and deletion of vehicles.
Definition: MSVehicleControl.h:72
MSEdgeControl
Stores edges and lanes, performs moving of vehicle.
Definition: MSEdgeControl.h:73
MSNet::myDetectorControl
MSDetectorControl * myDetectorControl
Controls detectors;.
Definition: MSNet.h:728
MSTLLogicControl
A class that stores and controls tls and switching of their programs.
Definition: MSTLLogicControl.h:60
MSNet::myEdgeWeights
MSEdgeWeightsStorage * myEdgeWeights
The net's knowledge about edge efforts/travel times;.
Definition: MSNet.h:738
MSNet::checkBidiEdges
bool checkBidiEdges()
check wether bidirectional edges occur in the network
Definition: MSNet.cpp:1070
MSNet::addRestriction
void addRestriction(const std::string &id, const SUMOVehicleClass svc, const double speed)
Adds a restriction for an edge type.
Definition: MSNet.cpp:318
MSNet::myIntermodalRouter
std::map< int, MSIntermodalRouter * > myIntermodalRouter
Definition: MSNet.h:828
MSNet::closeBuilding
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's building process.
Definition: MSNet.cpp:241
MSNet::myRouterEffort
SUMOAbstractRouter< MSEdge, SUMOVehicle > * myRouterEffort
Definition: MSNet.h:826
MSNet::myInsertionEvents
MSEventControl * myInsertionEvents
Controls insertion events;.
Definition: MSNet.h:734
MSNet::getStateMessage
static std::string getStateMessage(SimulationState state)
Returns the message to show if a certain state occurs.
Definition: MSNet.cpp:614
MSNet::interrupt
void interrupt()
Definition: MSNet.h:674
MSNet::getNetworkVersion
double getNetworkVersion() const
return the network version
Definition: MSNet.h:667
MSNet::SIMSTATE_INTERRUPTED
An external interrupt occured.
Definition: MSNet.h:111
MSNet::getEdgeControl
MSEdgeControl & getEdgeControl()
Returns the edge control.
Definition: MSNet.h:380
MSNet::adaptIntermodalRouter
static void adaptIntermodalRouter(MSIntermodalRouter &router)
Definition: MSNet.cpp:1020
MSNet::myHasInternalLinks
bool myHasInternalLinks
Whether the network contains internal links/lanes/edges.
Definition: MSNet.h:787
SUMORouteLoaderControl
Definition: SUMORouteLoaderControl.h:50
SUMOAbstractRouter.h
MSNet::hasPedestrianNetwork
bool hasPedestrianNetwork() const
return whether the network contains walkingareas and crossings
Definition: MSNet.h:652
MSNet::checkElevation
bool checkElevation()
check all lanes for elevation data
Definition: MSNet.cpp:1045
MSNet::SIMSTATE_TOO_MANY_TELEPORTS
The simulation had too many teleports.
Definition: MSNet.h:113
MSNet::getTravelTime
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
MSNet::myHavePermissions
bool myHavePermissions
Whether the network contains edges which not all vehicles may pass.
Definition: MSNet.h:781
MSNet::myEdges
MSEdgeControl * myEdges
Controls edges, performs vehicle movement;.
Definition: MSNet.h:720
MSNet::VEHICLE_STATE_ENDING_STOP
The vehicle ends to stop.
Definition: MSNet.h:556
MSNet::getJunctionControl
MSJunctionControl & getJunctionControl()
Returns the junctions control.
Definition: MSNet.h:420
MSNet::getVehicleControl
MSVehicleControl & getVehicleControl()
Returns the vehicle control.
Definition: MSNet.h:337
MSNet::myPersonControl
MSTransportableControl * myPersonControl
Controls person building and deletion;.
Definition: MSNet.h:716
BinaryInputDevice
Encapsulates binary reading operations on a file.
Definition: BinaryInputDevice.h:58
MSNet::getPedestrianRouter
MSPedestrianRouter & getPedestrianRouter(const MSEdgeVector &prohibited=MSEdgeVector()) const
Definition: MSNet.cpp:985
MSNet::myBeginOfTimestepEvents
MSEventControl * myBeginOfTimestepEvents
Controls events executed at the begin of a time step;.
Definition: MSNet.h:730
MSVehicle
Representation of a vehicle in the micro simulation.
Definition: MSVehicle.h:80