166 std::vector<SUMOTime> stateDumpTimes, std::vector<std::string> stateDumpFiles,
199 const std::map<SUMOVehicleClass, SUMOReal>*
getRestrictions(
const std::string&
id)
const;
The vehicle has departed (was inserted into the network)
AStarRouter< MSEdge, SUMOVehicle, prohibited_withPermissions< MSEdge, SUMOVehicle > > * myRouterTTAStar
Computes the shortest path through a network using the Dijkstra algorithm.
bool lefthand() const
return whether the network was built for lefthand traffic
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.
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.
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types...
A lane area vehicles can halt at.
The simulation contains too many vehicles (.
const std::map< SUMOVehicleClass, SUMOReal > * getRestrictions(const std::string &id) const
Returns the restrictions for an edge type If no restrictions are present, 0 is returned.
MSVehicleControl * myVehicleControl
Controls vehicle building and deletion;.
std::vector< MSEdge * > MSEdgeVector
std::vector< SUMOTime > myStateDumpTimes
Times at which a state shall be written.
The base class for an intersection.
DijkstraRouterEffort< MSEdge, SUMOVehicle, prohibited_withPermissions< MSEdge, SUMOVehicle > > * myRouterEffort
bool hasInternalLinks() const
return whether the network contains internal links
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 A* algorithm.
MSPedestrianRouterDijkstra & getPedestrianRouter(const MSEdgeVector &prohibited=MSEdgeVector()) const
MSChargingStation * getChargingStation(const std::string &id) const
Returns the named charging station.
bool addBusStop(MSStoppingPlace *busStop)
Adds a bus stop.
MSPersonControl * myPersonControl
Controls person building and deletion;.
void closeBuilding(MSEdgeControl *edges, MSJunctionControl *junctions, SUMORouteLoaderControl *routeLoaders, MSTLLogicControl *tlc, std::vector< SUMOTime > stateDumpTimes, std::vector< std::string > stateDumpFiles, bool hasInternalLinks, bool lefthand, SUMOReal version)
Closes the network's building process.
static MSNet * getInstance()
Returns the pointer to the unique instance of MSNet (singleton).
bool myHavePermissions
Whether the network contains edges which not all vehicles may pass.
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.
Storage for geometrical objects.
static const std::string STAGE_LANECHANGE
NamedObjectCont< MSStoppingPlace * > myContainerStopDict
Dictionary of container stops.
Detectors container; responsible for string and output generation.
bool myLefthand
Whether the network was built for left-hand traffic.
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.
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.
DijkstraRouterTT< MSEdge, SUMOVehicle, prohibited_withPermissions< MSEdge, SUMOVehicle > > * myRouterTTDijkstra
The vehicles starts to stop.
A class that stores and controls tls and switching of their programs.
A road/street connecting two junctions.
long long int myVehiclesMoved
The overall number of vehicle movements.
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 writeOutput()
Write netstate, summary and detector output.
The vehicle got a new route.
The vehicle arrived at his destination (is deleted)
MSStoppingPlace * getBusStop(const std::string &id) const
Returns the named bus stop.
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.
virtual MSContainerControl & getContainerControl()
Returns the container control.
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;.
void setPermissionsFound()
Labels the network to contain vehicle class permissions.
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.
std::map< std::string, std::map< SUMOVehicleClass, SUMOReal > > myRestrictions
The vehicle class specific speed restrictions.
PedestrianRouterDijkstra< MSEdge, MSLane, MSJunction, MSVehicle > MSPedestrianRouterDijkstra
The vehicle ends to park.
SUMOReal myVersion
the network version
MSDetectorControl & getDetectorControl()
Returns the detector control.
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
bool addContainerStop(MSStoppingPlace *containerStop)
Adds a container stop.
bool addChargingStation(MSChargingStation *chargingStation)
Adds a chargingg station.
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.
bool checkElevation()
check all lanes for elevation data
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;.
MSStoppingPlace * getContainerStop(const std::string &id) const
Returns the named container stop.
MSNet(MSVehicleControl *vc, MSEventControl *beginOfTimestepEvents, MSEventControl *endOfTimestepEvents, MSEventControl *insertionEvents, ShapeContainer *shapeCont=0)
Constructor.
void addRestriction(const std::string &id, const SUMOVehicleClass svc, const SUMOReal speed)
Adds a restriction for an edge type.
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.
SUMOReal version() const
return the network version
long mySimBeginMillis
The overall simulation duration.
virtual ~MSNet()
Destructor.
bool myHasElevation
Whether the network contains elevation data.
static std::string getStateMessage(SimulationState state)
Returns the message to show if a certain state occurs.
MSEdgeControl & getEdgeControl()
Returns the edge control.
NamedObjectCont< MSChargingStation * > myChargingStationDict
Dictionary of charging Stations.
bool logSimulationDuration() const
Returns whether duration shall be logged.
MSJunctionControl & getJunctionControl()
Returns the junctions control.
SUMOTime myStep
Current time step.
std::string getChargingStationID(const MSLane *lane, const SUMOReal pos) const
Returns the charging station close to the given position.
The class responsible for building and deletion of vehicles.
std::vector< MSEdge * > MSEdgeVector
void simulationStep()
Performs a single simulation step.
bool hasPermissions() const
Returns whether the network has specific vehicle class permissions.
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;.
Representation of a lane in the micro simulation.
NamedObjectCont< MSStoppingPlace * > myBusStopDict
Dictionary of bus stops.
Stores time-dependant events and executes them at the proper time.
The vehicle ended being teleported.
bool hasElevation() const
return whether the network contains internal links
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