152 std::vector<SUMOTime> stateDumpTimes, std::vector<std::string> stateDumpFiles);
486 const std::vector<MSEdge*>& prohibited = std::vector<MSEdge*>())
const;
488 const std::vector<MSEdge*>& prohibited = std::vector<MSEdge*>())
const;
The vehicle has departed (was inserted into the network)
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.
The simulation contains too many vehicles (.
MSEventControl & getEndOfTimestepEvents()
Returns the event control for events executed at the end of a time step.
MSVehicleControl * myVehicleControl
Controls vehicle building and deletion;.
std::vector< SUMOTime > myStateDumpTimes
Times at which a state shall be written.
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.
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;.
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.
Detectors container; responsible for string and output generation.
A storage for edge travel times and efforts.
SUMOTime getCurrentTimeStep() const
Returns the current simulation step (in s)
SUMOAbstractRouter< MSEdge, SUMOVehicle > & getRouterEffort(const std::vector< MSEdge * > &prohibited=std::vector< MSEdge * >()) const
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.
The simulated network and simulation perfomer.
SUMOLong myVehiclesMoved
The overall number of vehicle movements.
ShapeContainer * myShapeContainer
A container for geometrical shapes;.
Container for junctions; performs operations on all stored junctions.
bool addBusStop(MSBusStop *busStop)
Adds a bus 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 writeOutput()
Write netstate, summary and detector output.
The vehicle got a new route.
The vehicle arrived at his destination (is deleted)
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.
MSVehicleControl & getVehicleControl()
Returns the vehicle control.
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.
DijkstraRouterTT_ByProxi< MSEdge, SUMOVehicle, prohibited_withRestrictions< MSEdge, SUMOVehicle > > * myRouterTTDijkstra
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.
AStarRouterTT_ByProxi< MSEdge, SUMOVehicle, prohibited_withRestrictions< MSEdge, SUMOVehicle > > * myRouterTTAStar
MSDetectorControl & getDetectorControl()
Returns the detector control.
Inserts vehicles into the network when their departure time is reached.
VehicleState
Definition of a vehicle state.
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.
MSEventControl & getInsertionEvents()
Returns the event control for insertion events.
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.
SUMOAbstractRouter< MSEdge, SUMOVehicle > & getRouterTT(const std::vector< MSEdge * > &prohibited=std::vector< MSEdge * >()) const
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.
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.
SUMOTime myStep
Current time step.
The class responsible for building and deletion of vehicles.
void closeBuilding(MSEdgeControl *edges, MSJunctionControl *junctions, SUMORouteLoaderControl *routeLoaders, MSTLLogicControl *tlc, std::vector< SUMOTime > stateDumpTimes, std::vector< std::string > stateDumpFiles)
Closes the network's building process.
NamedObjectCont< MSBusStop * > myBusStopDict
Dictionary of bus stops.
void simulationStep()
Performs a single simulation step.
MSEventControl & getBeginOfTimestepEvents()
Returns the event control for events executed at the begin of a time step.
void loadRoutes()
loads routes for the next few steps
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.
MSEdgeWeightsStorage & getWeightsStorage()
Returns the net's internal edge travel times/efforts container.
DijkstraRouterEffort_ByProxi< MSEdge, SUMOVehicle, prohibited_withRestrictions< MSEdge, SUMOVehicle > > * myRouterEffort