169 std::vector<SUMOTime> stateDumpTimes, std::vector<std::string> stateDumpFiles,
201 const std::map<SUMOVehicleClass, double>*
getRestrictions(
const std::string&
id)
const;
std::string myStateDumpSuffix
The vehicle has departed (was inserted into the network)
A lane area vehicles can halt at.
AStarRouter< MSEdge, SUMOVehicle, prohibited_withPermissions< MSEdge, SUMOVehicle > > * myRouterTTAStar
Computes the shortest path through a network using the Dijkstra algorithm.
Representation of a vehicle in the micro simulation.
Interface for objects listening to vehicle state changes.
bool hasPersons() const
Returns whether persons are simulated.
void removeVehicleStateListener(VehicleStateListener *listener)
Removes a vehicle states listener.
MSEventControl * myEndOfTimestepEvents
Controls events executed at the end of a time step;.
NamedObjectCont< MSParkingArea * > myParkingAreaDict
Dictionary of parking areas.
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types...
A lane area vehicles can halt at.
bool hasPermissions() const
Returns whether the network has specific vehicle class permissions.
const NamedRTree & getLanesRTree() const
Returns an RTree that contains lane IDs.
std::string getParkingAreaID(const MSLane *lane, const double pos) const
Returns the parking area close to the given position.
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
SimulationState simulate(SUMOTime start, SUMOTime stop)
Simulates from timestep start to stop.
bool logSimulationDuration() const
Returns whether duration shall be logged.
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.
bool addBusStop(MSStoppingPlace *busStop)
Adds a bus stop.
bool hasNeighs() const
return whether the network contains explicit neighbor lanes
static MSNet * getInstance()
Returns the pointer to the unique instance of MSNet (singleton).
MSPedestrianRouterDijkstra & getPedestrianRouter(const MSEdgeVector &prohibited=MSEdgeVector()) const
bool myHavePermissions
Whether the network contains edges which not all vehicles may pass.
std::string getChargingStationID(const MSLane *lane, const double pos) const
Returns the charging station close to the given position.
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.
double myVersion
the network version
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.
bool addParkingArea(MSParkingArea *parkingArea)
Adds a parking area.
static const std::string STAGE_LANECHANGE
std::string getContainerStopID(const MSLane *lane, const double pos) const
Returns the container stop close to the given position.
NamedObjectCont< MSStoppingPlace * > myContainerStopDict
Dictionary of container stops.
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.
A storage for edge travel times and efforts.
MSChargingStation * getChargingStation(const std::string &id) const
Returns the named charging station.
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.
std::string getBusStopID(const MSLane *lane, const double pos) const
Returns the bus stop close to the given position.
DijkstraRouterTT< MSEdge, SUMOVehicle, prohibited_withPermissions< MSEdge, SUMOVehicle > > * myRouterTTDijkstra
virtual MSTransportableControl & getContainerControl()
Returns the container control.
The vehicles starts to stop.
void writeChargingStationOutput() const
write charging station output
A class that stores and controls tls and switching of their programs.
A road/street connecting two junctions.
double version() const
return the network version
long long int myVehiclesMoved
The overall number of vehicle movements.
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)
The vehicles starts to park.
SimulationState simulationState(SUMOTime stopTime) const
Called after a simulation step, this method returns the current simulation state. ...
MSInsertionControl * myInserter
Controls vehicle insertion;.
Representation of a vehicle.
bool myHasNeighs
Whether the network contains explicit neighbor lanes.
SUMORouteLoaderControl * myRouteLoaders
Route loader for dynamic loading of routes.
virtual MSTransportableControl & getPersonControl()
Returns the person control.
static double getTravelTime(const MSEdge *const e, const SUMOVehicle *const v, double t)
Returns the travel time to pass an edge.
ShapeContainer & getShapeContainer()
Returns the shapes container.
void closeSimulation(SUMOTime start)
Closes the simulation (all files, connections, etc.)
std::map< std::string, std::map< SUMOVehicleClass, double > > myRestrictions
The vehicle class specific speed restrictions.
bool myLogStepNumber
Information whether the number of the simulation step shall be logged.
MSTLLogicControl & getTLSControl()
Returns the tls logics control.
MSVehicleControl & getVehicleControl()
Returns the vehicle control.
MSEventControl * getBeginOfTimestepEvents()
Returns the event control for events executed at the begin of a time step.
MSDetectorControl * myDetectorControl
Controls detectors;.
void setPermissionsFound()
Labels the network to contain vehicle class permissions.
void postSimStepOutput() const
Prints the statistics of the step at its end.
bool hasContainers() const
Returns whether containers are simulated.
Stores edges and lanes, performs moving of vehicle.
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.
MSTLLogicControl * myLogics
Controls tls logics, realizes waiting on tls rules;.
The connection to a client was closed by the client.
The simulation is running.
SUMOTime getCurrentTimeStep() const
Returns the current simulation step.
void addRestriction(const std::string &id, const SUMOVehicleClass svc, const double speed)
Adds a restriction for an edge type.
MSNet & operator=(const MSNet &)
Invalidated assignment operator.
The vehicle started to teleport.
bool hasInternalLinks() const
return whether the network contains internal links
PedestrianRouterDijkstra< MSEdge, MSLane, MSJunction, MSVehicle > MSPedestrianRouterDijkstra
The vehicle ends to park.
MSDetectorControl & getDetectorControl()
Returns the detector control.
bool hasElevation() const
return whether the network contains elevation data
bool lefthand() const
return whether the network was built for lefthand traffic
SUMOTime myStateDumpPeriod
The period for writing state.
Inserts vehicles into the network when their departure time is reached.
long myTraCIStepDuration
The last simulation step duration.
int myMaxTeleports
Maximum number of teleports.
VehicleState
Definition of a vehicle state.
MSEventControl * getEndOfTimestepEvents()
Returns the event control for events executed at the end of a time step.
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.
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.
MSStoppingPlace * getContainerStop(const std::string &id) const
Returns the named container stop.
static void clearAll()
Clears all dictionaries.
The simulation is loading.
bool myRouterTTInitialized
bool addContainerStop(MSStoppingPlace *containerStop)
Adds a container stop.
bool addChargingStation(MSChargingStation *chargingStation)
Adds a chargingg station.
MSTransportableControl * myContainerControl
Controls container building and deletion;.
MSJunctionControl * myJunctions
Controls junctions, realizes right-of-way rules;.
MSInsertionControl & getInsertionControl()
Returns the insertion control.
MSTransportableControl * myPersonControl
Controls person building and deletion;.
bool checkElevation()
check all lanes for elevation data
void preSimStepOutput() const
Prints the current step number.
MSEventControl * myBeginOfTimestepEvents
Controls events executed at the begin of a time step;.
A storage for options typed value containers)
virtual ~VehicleStateListener()
Destructor.
MSEdgeWeightsStorage * myEdgeWeights
The net's knowledge about edge efforts/travel times;.
The simulation had too many teleports.
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.
long mySimBeginMillis
The overall simulation duration.
virtual ~MSNet()
Destructor.
bool myHasElevation
Whether the network contains elevation data.
std::string myStateDumpPrefix
name components for periodic state
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.
MSJunctionControl & getJunctionControl()
Returns the junctions control.
SUMOTime myStep
Current time step.
SUMOAbstractRouter< MSEdge, SUMOVehicle > & getRouterTT(const MSEdgeVector &prohibited=MSEdgeVector()) const
The class responsible for building and deletion of vehicles.
std::vector< MSEdge * > MSEdgeVector
void simulationStep()
Performs a single simulation step.
void loadRoutes()
loads routes for the next few steps
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.
MSStoppingPlace * getBusStop(const std::string &id) const
Returns the named bus stop.
SUMOAbstractRouter< MSEdge, SUMOVehicle > & getRouterEffort(const MSEdgeVector &prohibited=MSEdgeVector()) const
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.
static double getEffort(const MSEdge *const e, const SUMOVehicle *const v, double t)
Returns the effort to pass an edge.
MSEdgeWeightsStorage & getWeightsStorage()
Returns the net's internal edge travel times/efforts container.
static const std::string STAGE_EVENTS
string constants for simstep stages
MSParkingArea * getParkingArea(const std::string &id) const
Returns the named parking area.