164 std::vector<SUMOTime> stateDumpTimes, std::vector<std::string> stateDumpFiles,
The vehicle has departed (was inserted into the network)
Computes the shortest path through a network using the Dijkstra algorithm.
void postSimStepOutput() const
Prints the statistics of the step at its end.
Representation of a vehicle in the micro simulation.
Interface for objects listening to vehicle state changes.
A lane area vehicles can halt at and load and unload containers.
void removeVehicleStateListener(VehicleStateListener *listener)
Removes a vehicle states listener.
MSEventControl * myEndOfTimestepEvents
Controls events executed at the end of a time step;.
static SUMOReal getEffort(const MSEdge *const e, const SUMOVehicle *const v, SUMOReal t)
Returns the effort to pass an edge.
void setRestrictionFound()
Labels the network to contain vehicle class restrictions.
The simulation contains too many vehicles (.
MSVehicleControl * myVehicleControl
Controls vehicle building and deletion;.
std::vector< MSEdge * > MSEdgeVector
NamedObjectCont< MSContainerStop * > myContainerStopDict
Dictionary of container stops.
std::vector< SUMOTime > myStateDumpTimes
Times at which a state shall be written.
The base class for an intersection.
bool hasInternalLinks() const
return whether the network contains internal links
PedestrianRouterDijkstra< MSEdge, MSLane, MSJunction > MSPedestrianRouterDijkstra
std::string getContainerStopID(const MSLane *lane, const SUMOReal pos) const
Returns the container stop close to the given position.
int simulate(SUMOTime start, SUMOTime stop)
Simulates from timestep start to stop.
virtual void vehicleStateChanged(const SUMOVehicle *const vehicle, VehicleState to)=0
Called if a vehicle changes its state.
A RT-tree for efficient storing of SUMO's Named objects.
Computes the shortest path through a network using the Dijkstra algorithm.
MSPedestrianRouterDijkstra & getPedestrianRouter(const MSEdgeVector &prohibited=MSEdgeVector()) const
MSPersonControl * myPersonControl
Controls person building and deletion;.
static MSNet * getInstance()
Returns the pointer to the unique instance of MSNet (singleton).
MSEdgeControl * myEdges
Controls edges, performs vehicle movement;.
void setCurrentTimeStep(const SUMOTime step)
Sets the current simulation step (used by state loading)
The final simulation step has been performed.
std::vector< std::string > myStateDumpFiles
The names for the state files.
bool myLogExecutionTime
Information whether the simulation duration shall be logged.
MSContainerStop * getContainerStop(const std::string &id) const
Returns the named container stop.
Storage for geometrical objects.
static const std::string STAGE_LANECHANGE
Detectors container; responsible for string and output generation.
A storage for edge travel times and efforts.
SUMOTime getCurrentTimeStep() const
Returns the current simulation step.
std::string getBusStopID(const MSLane *lane, const SUMOReal pos) const
Returns the bus stop close to the given position.
void addVehicleStateListener(VehicleStateListener *listener)
Adds a vehicle states listener.
SimulationState
Possible states of a simulation - running or stopped with different reasons.
MSPedestrianRouterDijkstra * myPedestrianRouter
The simulated network and simulation perfomer.
Computes the shortest path through a network using the Dijkstra algorithm.
SUMOLong myVehiclesMoved
The overall number of vehicle movements.
DijkstraRouterTT< MSEdge, SUMOVehicle, prohibited_withRestrictions< MSEdge, SUMOVehicle > > * myRouterTTDijkstra
ShapeContainer * myShapeContainer
A container for geometrical shapes;.
std::pair< bool, NamedRTree > myLanesRTree
An RTree structure holding lane IDs.
Container for junctions; performs operations on all stored junctions.
DijkstraRouterEffort< MSEdge, SUMOVehicle, prohibited_withRestrictions< MSEdge, SUMOVehicle > > * myRouterEffort
bool addBusStop(MSBusStop *busStop)
Adds a bus stop.
The vehicles starts to stop.
A class that stores and controls tls and switching of their programs.
A road/street connecting two junctions.
long mySimStepBegin
The last simulation step begin, end and duration.
The simulation does not contain further vehicles.
An error occured during the simulation step.
void closeBuilding(MSEdgeControl *edges, MSJunctionControl *junctions, SUMORouteLoaderControl *routeLoaders, MSTLLogicControl *tlc, std::vector< SUMOTime > stateDumpTimes, std::vector< std::string > stateDumpFiles, bool hasInternalLinks)
Closes the network's building process.
void writeOutput()
Write netstate, summary and detector output.
The vehicle got a new route.
The vehicle arrived at his destination (is deleted)
The vehicles starts to park.
MSInsertionControl * myInserter
Controls vehicle insertion;.
Representation of a vehicle.
SUMORouteLoaderControl * myRouteLoaders
Route loader for dynamic loading of routes.
ShapeContainer & getShapeContainer()
Returns the shapes container.
void closeSimulation(SUMOTime start)
Closes the simulation (all files, connections, etc.)
bool myLogStepNumber
Information whether the number of the simulation step shall be logged.
MSTLLogicControl & getTLSControl()
Returns the tls logics control.
A lane area vehicles can halt at.
virtual MSContainerControl & getContainerControl()
Returns the container control.
bool addContainerStop(MSContainerStop *containerStop)
Adds a container stop.
MSVehicleControl & getVehicleControl()
Returns the vehicle control.
MSEventControl * getBeginOfTimestepEvents()
Returns the event control for events executed at the begin of a time step.
static SUMOReal getTravelTime(const MSEdge *const e, const SUMOVehicle *const v, SUMOReal t)
Returns the travel time to pass an edge.
MSDetectorControl * myDetectorControl
Controls detectors;.
Stores edges and lanes, performs moving of vehicle.
MSTLLogicControl * myLogics
Controls tls logics, realizes waiting on tls rules;.
The connection to a client was closed by the client.
The simulation is running.
MSNet & operator=(const MSNet &)
Invalidated assignment operator.
The vehicle started to teleport.
void preSimStepOutput() const
Prints the current step number.
MSBusStop * getBusStop(const std::string &id) const
Returns the named bus stop.
The vehicle ends to park.
bool myHaveRestrictions
Whether the network contains edges which not all vehicles may pass.
MSDetectorControl & getDetectorControl()
Returns the detector control.
bool hasRestrictions() const
Returns whether the network has vehicle class restrictions.
MSContainerControl * myContainerControl
Controls container building and deletion;.
Inserts vehicles into the network when their departure time is reached.
VehicleState
Definition of a vehicle state.
SUMOAbstractRouter< MSEdge, SUMOVehicle > & getRouterTT(const MSEdgeVector &prohibited=MSEdgeVector()) const
MSEventControl * getEndOfTimestepEvents()
Returns the event control for events executed at the end of a time step.
static const std::string STAGE_MOVEMENTS
VehicleStateListener()
Constructor.
The vehicle was built, but has not yet departed.
std::vector< VehicleStateListener * > myVehicleStateListeners
Container for vehicle state listener.
static MSNet * myInstance
Unique instance of MSNet.
static void clearAll()
Clears all dictionaries.
bool myRouterTTInitialized
SimulationState simulationState(SUMOTime stopTime) const
Called after a simulation step, this method returns the current simulation state. ...
MSJunctionControl * myJunctions
Controls junctions, realizes right-of-way rules;.
virtual MSPersonControl & getPersonControl()
Returns the person control.
MSInsertionControl & getInsertionControl()
Returns the insertion control.
MSEventControl * myBeginOfTimestepEvents
Controls events executed at the begin of a time step;.
virtual ~VehicleStateListener()
Destructor.
MSEdgeWeightsStorage * myEdgeWeights
The net's knowledge about edge efforts/travel times;.
MSNet(MSVehicleControl *vc, MSEventControl *beginOfTimestepEvents, MSEventControl *endOfTimestepEvents, MSEventControl *insertionEvents, ShapeContainer *shapeCont=0)
Constructor.
The vehicle ends to stop.
MSEventControl * getInsertionEvents()
Returns the event control for insertion events.
void informVehicleStateListener(const SUMOVehicle *const vehicle, VehicleState to)
Informs all added listeners about a vehicle's state change.
const NamedRTree & getLanesRTree() const
Returns an RTree that contains lane IDs.
long mySimBeginMillis
The overall simulation duration.
virtual ~MSNet()
Destructor.
static std::string getStateMessage(SimulationState state)
Returns the message to show if a certain state occurs.
MSEdgeControl & getEdgeControl()
Returns the edge control.
bool logSimulationDuration() const
Returns whether duration shall be logged.
MSJunctionControl & getJunctionControl()
Returns the junctions control.
AStarRouter< MSEdge, SUMOVehicle, prohibited_withRestrictions< MSEdge, SUMOVehicle > > * myRouterTTAStar
SUMOTime myStep
Current time step.
The class responsible for building and deletion of vehicles.
std::vector< MSEdge * > MSEdgeVector
NamedObjectCont< MSBusStop * > myBusStopDict
Dictionary of bus stops.
void simulationStep()
Performs a single simulation step.
void loadRoutes()
loads routes for the next few steps
SUMOAbstractRouter< MSEdge, SUMOVehicle > & getRouterEffort(const MSEdgeVector &prohibited=MSEdgeVector()) const
static const std::string STAGE_INSERTIONS
MSEventControl * myInsertionEvents
Controls insertion events;.
int myTooManyVehicles
Storage for maximum vehicle number.
Representation of a lane in the micro simulation.
Stores time-dependant events and executes them at the proper time.
The vehicle ended being teleported.
bool myHasInternalLinks
Whether the network contains internal links/lanes/edges.
MSEdgeWeightsStorage & getWeightsStorage()
Returns the net's internal edge travel times/efforts container.
static const std::string STAGE_EVENTS
string constants for simstep stages