![]() |
Eclipse SUMO - Simulation of Urban MObility
|
The simulated network and simulation perfomer. More...
#include <MSNet.h>
Data Structures | |
class | VehicleStateListener |
Interface for objects listening to vehicle state changes. More... | |
Public Types | |
typedef IntermodalRouter< MSEdge, MSLane, MSJunction, SUMOVehicle > | MSIntermodalRouter |
typedef PedestrianRouter< MSEdge, MSLane, MSJunction, MSVehicle > | MSPedestrianRouter |
enum | SimulationState { SIMSTATE_LOADING, SIMSTATE_RUNNING, SIMSTATE_END_STEP_REACHED, SIMSTATE_NO_FURTHER_VEHICLES, SIMSTATE_CONNECTION_CLOSED, SIMSTATE_ERROR_IN_SIM, SIMSTATE_INTERRUPTED, SIMSTATE_TOO_MANY_TELEPORTS } |
Possible states of a simulation - running or stopped with different reasons. More... | |
Public Member Functions | |
void | addRestriction (const std::string &id, const SUMOVehicleClass svc, const double speed) |
Adds a restriction for an edge type. More... | |
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. More... | |
void | closeSimulation (SUMOTime start) |
Closes the simulation (all files, connections, etc.) More... | |
virtual void | createTLWrapper (MSTrafficLightLogic *) |
creates a wrapper for the given logic (see GUINet) More... | |
const std::string | generateStatistics (SUMOTime start) |
Writes performance output and running vehicle stats. More... | |
SUMOTime | getCurrentTimeStep () const |
Returns the current simulation step. More... | |
MSIntermodalRouter & | getIntermodalRouter (const int routingMode=0, const MSEdgeVector &prohibited=MSEdgeVector()) const |
double | getNetworkVersion () const |
return the network version More... | |
MSPedestrianRouter & | getPedestrianRouter (const MSEdgeVector &prohibited=MSEdgeVector()) const |
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. More... | |
SUMOAbstractRouter< MSEdge, SUMOVehicle > & | getRouterEffort (const MSEdgeVector &prohibited=MSEdgeVector()) const |
SUMOAbstractRouter< MSEdge, SUMOVehicle > & | getRouterTT (const MSEdgeVector &prohibited=MSEdgeVector()) const |
const NamedObjectCont< MSStoppingPlace * > & | getStoppingPlaces (SumoXMLTag category) const |
bool | hasBidiEdges () const |
return whether the network contains bidirectional rail edges More... | |
bool | hasElevation () const |
return whether the network contains elevation data More... | |
bool | hasInternalLinks () const |
return whether the network contains internal links More... | |
bool | hasPedestrianNetwork () const |
return whether the network contains walkingareas and crossings More... | |
bool | hasPermissions () const |
Returns whether the network has specific vehicle class permissions. More... | |
void | interrupt () |
virtual bool | isGUINet () const |
Returns whether this is a GUI Net. More... | |
bool | isInterrupted () const |
virtual bool | isSelected (const MSTrafficLightLogic *) const |
return wheter the given logic (or rather it's wrapper) is selected in the GUI More... | |
bool | lefthand () const |
return whether the network was built for lefthand traffic More... | |
void | loadRoutes () |
loads routes for the next few steps More... | |
bool | logSimulationDuration () const |
Returns whether duration shall be logged. More... | |
MSNet (MSVehicleControl *vc, MSEventControl *beginOfTimestepEvents, MSEventControl *endOfTimestepEvents, MSEventControl *insertionEvents, ShapeContainer *shapeCont=0) | |
Constructor. More... | |
void | setCurrentTimeStep (const SUMOTime step) |
Sets the current simulation step (used by state loading) More... | |
void | setPermissionsFound () |
Labels the network to contain vehicle class permissions. More... | |
SimulationState | simulate (SUMOTime start, SUMOTime stop) |
Simulates from timestep start to stop. More... | |
SimulationState | simulationState (SUMOTime stopTime) const |
Called after a simulation step, this method returns the current simulation state. More... | |
void | simulationStep () |
Performs a single simulation step. More... | |
bool | warnOnce (const std::string &typeAndID) |
return whether a warning regarding the given object shall be issued More... | |
void | writeChargingStationOutput () const |
write charging station output More... | |
void | writeOutput () |
Write netstate, summary and detector output. More... | |
void | writeRailSignalBlocks () const |
write rail signal block output More... | |
virtual | ~MSNet () |
Destructor. More... | |
Output during the simulation | |
void | preSimStepOutput () const |
Prints the current step number. More... | |
void | postSimStepOutput () const |
Prints the statistics of the step at its end. More... | |
Retrieval of references to substructures | |
MSVehicleControl & | getVehicleControl () |
Returns the vehicle control. More... | |
virtual MSTransportableControl & | getPersonControl () |
Returns the person control. More... | |
bool | hasPersons () const |
Returns whether persons are simulated. More... | |
virtual MSTransportableControl & | getContainerControl () |
Returns the container control. More... | |
bool | hasContainers () const |
Returns whether containers are simulated. More... | |
MSEdgeControl & | getEdgeControl () |
Returns the edge control. More... | |
MSInsertionControl & | getInsertionControl () |
Returns the insertion control. More... | |
MSDetectorControl & | getDetectorControl () |
Returns the detector control. More... | |
MSTLLogicControl & | getTLSControl () |
Returns the tls logics control. More... | |
MSJunctionControl & | getJunctionControl () |
Returns the junctions control. More... | |
MSEventControl * | getBeginOfTimestepEvents () |
Returns the event control for events executed at the begin of a time step. More... | |
MSEventControl * | getEndOfTimestepEvents () |
Returns the event control for events executed at the end of a time step. More... | |
MSEventControl * | getInsertionEvents () |
Returns the event control for insertion events. More... | |
ShapeContainer & | getShapeContainer () |
Returns the shapes container. More... | |
MSDynamicShapeUpdater * | getDynamicShapeUpdater () |
Returns the dynamic shapes updater. More... | |
MSDynamicShapeUpdater * | makeDynamicShapeUpdater () |
Creates and returns a dynamic shapes updater. More... | |
MSEdgeWeightsStorage & | getWeightsStorage () |
Returns the net's internal edge travel times/efforts container. More... | |
Insertion and retrieval of stopping places | |
bool | addStoppingPlace (const SumoXMLTag category, MSStoppingPlace *stop) |
Adds a stopping place. More... | |
MSStoppingPlace * | getStoppingPlace (const std::string &id, const SumoXMLTag category) const |
Returns the named stopping place of the given category. More... | |
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. More... | |
Static Public Member Functions | |
static void | adaptIntermodalRouter (MSIntermodalRouter &router) |
static void | cleanupStatic () |
Place for static initializations of simulation components (called after successful net build) More... | |
static void | clearAll () |
Clears all dictionaries. More... | |
static double | getEffort (const MSEdge *const e, const SUMOVehicle *const v, double t) |
Returns the effort to pass an edge. More... | |
static MSNet * | getInstance () |
Returns the pointer to the unique instance of MSNet (singleton). More... | |
static std::string | getStateMessage (SimulationState state) |
Returns the message to show if a certain state occurs. More... | |
static double | getTravelTime (const MSEdge *const e, const SUMOVehicle *const v, double t) |
Returns the travel time to pass an edge. More... | |
static bool | hasInstance () |
Returns whether the network was already constructed. More... | |
static void | initStatic () |
Place for static initializations of simulation components (called after successful net build) More... | |
Protected Member Functions | |
bool | checkBidiEdges () |
check wether bidirectional edges occur in the network More... | |
bool | checkElevation () |
check all lanes for elevation data More... | |
bool | checkWalkingarea () |
check all lanes for type walkingArea More... | |
Protected Attributes | |
bool | myAmInterrupted |
whether an interrupt occured More... | |
std::unique_ptr< MSDynamicShapeUpdater > | myDynamicShapeUpdater |
Updater for dynamic shapes that are tracking traffic objects (ensures removal of shape dynamics when the objects are removed) More... | |
SUMOTime | myEdgeDataEndTime |
end of loaded edgeData More... | |
bool | myHasBidiEdges |
Whether the network contains bidirectional rail edges. More... | |
bool | myHasElevation |
Whether the network contains elevation data. More... | |
bool | myHasInternalLinks |
Whether the network contains internal links/lanes/edges. More... | |
bool | myHasPedestrianNetwork |
Whether the network contains pedestrian network elements. More... | |
bool | myHavePermissions |
Whether the network contains edges which not all vehicles may pass. More... | |
std::map< int, MSIntermodalRouter * > | myIntermodalRouter |
std::pair< bool, NamedRTree > | myLanesRTree |
An RTree structure holding lane IDs. More... | |
bool | myLefthand |
Whether the network was built for left-hand traffic. More... | |
int | myMaxTeleports |
Maximum number of teleports. More... | |
MSPedestrianRouter * | myPedestrianRouter |
std::map< std::string, std::map< SUMOVehicleClass, double > > | myRestrictions |
The vehicle class specific speed restrictions. More... | |
SUMORouteLoaderControl * | myRouteLoaders |
Route loader for dynamic loading of routes. More... | |
SUMOAbstractRouter< MSEdge, SUMOVehicle > * | myRouterEffort |
SUMOAbstractRouter< MSEdge, SUMOVehicle > * | myRouterTT |
SUMOTime | myStep |
Current time step. More... | |
std::map< SumoXMLTag, NamedObjectCont< MSStoppingPlace * > > | myStoppingPlaces |
Dictionary of bus / container stops. More... | |
std::vector< VehicleStateListener * > | myVehicleStateListeners |
Container for vehicle state listener. More... | |
double | myVersion |
the network version More... | |
std::map< std::string, bool > | myWarnedOnce |
container to record warnings that shall only be issued once More... | |
Substructures | |
MSVehicleControl * | myVehicleControl |
Controls vehicle building and deletion;. More... | |
MSTransportableControl * | myPersonControl |
Controls person building and deletion;. More... | |
MSTransportableControl * | myContainerControl |
Controls container building and deletion;. More... | |
MSEdgeControl * | myEdges |
Controls edges, performs vehicle movement;. More... | |
MSJunctionControl * | myJunctions |
Controls junctions, realizes right-of-way rules;. More... | |
MSTLLogicControl * | myLogics |
Controls tls logics, realizes waiting on tls rules;. More... | |
MSInsertionControl * | myInserter |
Controls vehicle insertion;. More... | |
MSDetectorControl * | myDetectorControl |
Controls detectors;. More... | |
MSEventControl * | myBeginOfTimestepEvents |
Controls events executed at the begin of a time step;. More... | |
MSEventControl * | myEndOfTimestepEvents |
Controls events executed at the end of a time step;. More... | |
MSEventControl * | myInsertionEvents |
Controls insertion events;. More... | |
ShapeContainer * | myShapeContainer |
A container for geometrical shapes;. More... | |
MSEdgeWeightsStorage * | myEdgeWeights |
The net's knowledge about edge efforts/travel times;. More... | |
data needed for computing performance values | |
bool | myLogExecutionTime |
Information whether the simulation duration shall be logged. More... | |
bool | myLogStepNumber |
Information whether the number of the simulation step shall be logged. More... | |
long | myTraCIStepDuration = 0 |
The last simulation step duration. More... | |
long | mySimStepDuration = 0 |
long | mySimBeginMillis |
The overall simulation duration. More... | |
long long int | myVehiclesMoved |
The overall number of vehicle movements. More... | |
State output variables | |
std::vector< SUMOTime > | myStateDumpTimes |
Times at which a state shall be written. More... | |
std::vector< std::string > | myStateDumpFiles |
The names for the state files. More... | |
SUMOTime | myStateDumpPeriod |
The period for writing state. More... | |
std::string | myStateDumpPrefix |
name components for periodic state More... | |
std::string | myStateDumpSuffix |
Static Protected Attributes | |
static MSNet * | myInstance = nullptr |
Unique instance of MSNet. More... | |
static const std::string | STAGE_EVENTS |
string constants for simstep stages More... | |
static const std::string | STAGE_INSERTIONS |
static const std::string | STAGE_LANECHANGE |
static const std::string | STAGE_MOVEMENTS |
Private Member Functions | |
MSNet (const MSNet &) | |
Invalidated copy constructor. More... | |
MSNet & | operator= (const MSNet &) |
Invalidated assignment operator. More... | |
Notification about vehicle state changes | |
enum | VehicleState { VEHICLE_STATE_BUILT, VEHICLE_STATE_DEPARTED, VEHICLE_STATE_STARTING_TELEPORT, VEHICLE_STATE_ENDING_TELEPORT, VEHICLE_STATE_ARRIVED, VEHICLE_STATE_NEWROUTE, VEHICLE_STATE_STARTING_PARKING, VEHICLE_STATE_ENDING_PARKING, VEHICLE_STATE_STARTING_STOP, VEHICLE_STATE_ENDING_STOP, VEHICLE_STATE_COLLISION, VEHICLE_STATE_EMERGENCYSTOP } |
Definition of a vehicle state. More... | |
void | addVehicleStateListener (VehicleStateListener *listener) |
Adds a vehicle states listener. More... | |
void | removeVehicleStateListener (VehicleStateListener *listener) |
Removes a vehicle states listener. More... | |
void | informVehicleStateListener (const SUMOVehicle *const vehicle, VehicleState to, const std::string &info="") |
Informs all added listeners about a vehicle's state change. More... | |
Possible states of a simulation - running or stopped with different reasons.
enum MSNet::VehicleState |
Definition of a vehicle state.
MSNet::MSNet | ( | MSVehicleControl * | vc, |
MSEventControl * | beginOfTimestepEvents, | ||
MSEventControl * | endOfTimestepEvents, | ||
MSEventControl * | insertionEvents, | ||
ShapeContainer * | shapeCont = 0 |
||
) |
Constructor.
This constructor builds a net of which only some basic structures are initialised. It prepares the network for being filled while loading. As soon as all edge/junction/traffic lights and other containers are build, they must be initialised using "closeBuilding".
[in] | vc | The vehicle control to use |
[in] | beginOfTimestepEvents | The event control to use for simulation step begin events |
[in] | endOfTimestepEvents | The event control to use for simulation step end events |
[in] | insertionEvents | The event control to use for insertion events |
[in] | shapeCont | The shape container to use |
ProcessError | If a network was already constructed |
Definition at line 190 of file MSNet.cpp.
References OptionsCont::getBool(), OptionsCont::getInt(), OptionsCont::getOptions(), OptionsCont::getString(), MSGlobals::gMesoNet, MSGlobals::gUseMesoSim, initStatic(), myBeginOfTimestepEvents, myContainerControl, myDetectorControl, myEdges, myEdgeWeights, myEndOfTimestepEvents, myInserter, myInsertionEvents, myInstance, myJunctions, myLanesRTree, myLogExecutionTime, myLogics, myLogStepNumber, myMaxTeleports, myPersonControl, myRouteLoaders, myShapeContainer, myStep, myVehicleControl, and string2time().
|
virtual |
Destructor.
Definition at line 275 of file MSNet.cpp.
References cleanupStatic(), clearAll(), MSGlobals::gMesoNet, MSGlobals::gUseMesoSim, myBeginOfTimestepEvents, myContainerControl, myDetectorControl, myEdges, myEdgeWeights, myEndOfTimestepEvents, myInserter, myInsertionEvents, myInstance, myIntermodalRouter, myJunctions, myLanesRTree, myLogics, myPedestrianRouter, myPersonControl, myRouteLoaders, myRouterEffort, myRouterTT, myShapeContainer, and myVehicleControl.
|
private |
Invalidated copy constructor.
|
static |
Definition at line 1020 of file MSNet.cpp.
References MSInsertionControl::adaptIntermodalRouter(), MSVehicleControl::adaptIntermodalRouter(), IntermodalNetwork< E, L, N, V >::addAccess(), EffortCalculator::addStop(), IntermodalRouter< E, L, N, V >::getExternalEffort(), getInsertionControl(), IntermodalRouter< E, L, N, V >::getNetwork(), IntermodalEdge< E, L, N, V >::getNumericalID(), IntermodalNetwork< E, L, N, V >::getStopEdge(), getVehicleControl(), myInstance, myStoppingPlaces, SUMO_TAG_BUS_STOP, and SUMO_TAG_PARKING_AREA.
Referenced by getIntermodalRouter().
void MSNet::addRestriction | ( | const std::string & | id, |
const SUMOVehicleClass | svc, | ||
const double | speed | ||
) |
Adds a restriction for an edge type.
[in] | id | The id of the type |
[in] | svc | The vehicle class the restriction refers to |
[in] | speed | The restricted speed |
Definition at line 318 of file MSNet.cpp.
References myRestrictions.
Referenced by NLHandler::myStartElement().
bool MSNet::addStoppingPlace | ( | const SumoXMLTag | category, |
MSStoppingPlace * | stop | ||
) |
Adds a stopping place.
If another stop with the same id and category exists, false is returned. Otherwise, the stop is added to the internal stopping place container.
This control gets responsible for deletion of the added stop.
[in] | stop | The stop to add |
Definition at line 893 of file MSNet.cpp.
References Named::getID(), myStoppingPlaces, SUMO_TAG_BUS_STOP, and SUMO_TAG_TRAIN_STOP.
Referenced by GUITriggerBuilder::beginParkingArea(), NLTriggerBuilder::beginParkingArea(), GUITriggerBuilder::buildChargingStation(), NLTriggerBuilder::buildChargingStation(), GUITriggerBuilder::buildStoppingPlace(), and NLTriggerBuilder::buildStoppingPlace().
void MSNet::addVehicleStateListener | ( | VehicleStateListener * | listener | ) |
Adds a vehicle states listener.
[in] | listener | The listener to add |
Definition at line 865 of file MSNet.cpp.
References myVehicleStateListeners.
Referenced by libsumo::Polygon::addDynamics(), MSDevice_Vehroutes::init(), MSVehicle::Influencer::GapControlState::init(), TraCIServer::openSocket(), and libsumo::Helper::registerVehicleStateListener().
|
protected |
check wether bidirectional edges occur in the network
Definition at line 1070 of file MSNet.cpp.
References MSEdgeControl::getEdges(), and myEdges.
Referenced by closeBuilding().
|
protected |
check all lanes for elevation data
Definition at line 1045 of file MSNet.cpp.
References MSEdgeControl::getEdges(), and myEdges.
Referenced by closeBuilding().
|
protected |
check all lanes for type walkingArea
Definition at line 1059 of file MSNet.cpp.
References EDGEFUNC_WALKINGAREA, MSEdgeControl::getEdges(), and myEdges.
Referenced by closeBuilding().
|
static |
Place for static initializations of simulation components (called after successful net build)
Definition at line 183 of file MSNet.cpp.
References MSVehicle::Influencer::cleanup(), and MSGlobals::gUseMesoSim.
Referenced by ~MSNet().
|
static |
Clears all dictionaries.
Definition at line 639 of file MSNet.cpp.
References MSTrigger::cleanup(), MSPModel::cleanup(), MSStopOut::cleanup(), MSCModel_NonInteracting::cleanup(), MSDevice_BTsender::cleanup(), MSCalibrator::cleanup(), MSDevice_ToC::cleanup(), TraCIServer::cleanup(), libsumo::Helper::cleanup(), MSDevice_SSM::cleanup(), MSDevice::cleanupAll(), MSRoute::clear(), MSEdge::clear(), MSLane::clear(), OutputDevice::closeAll(), TraCIServer::getInstance(), and MSVehicleTransfer::getInstance().
Referenced by GUILoadThread::run(), and ~MSNet().
void MSNet::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.
Assigns the structures built while loading to this network.
[in] | oc | The options to use |
[in] | edges | The control of edges which belong to this network |
[in] | junctions | The control of junctions which belong to this network |
[in] | routeLoaders | The route loaders used |
[in] | tlc | The control of traffic lights which belong to this network |
[in] | stateDumpTimes | List of time steps at which state shall be written |
[in] | stateDumpFiles | Filenames for states |
[in] | hasInternalLinks | Whether the network actually contains internal links |
[in] | lefthand | Whether the network was built for left-hand traffic |
[in] | version | The network version |
Definition at line 241 of file MSNet.cpp.
References checkBidiEdges(), checkElevation(), checkWalkingarea(), SysUtils::getCurrentMillis(), OptionsCont::getString(), MSGlobals::gLateralResolution, hasInternalLinks(), lefthand(), myEdges, myHasBidiEdges, myHasElevation, myHasInternalLinks, myHasPedestrianNetwork, myJunctions, myLefthand, myLogics, myRouteLoaders, mySimBeginMillis, myStateDumpFiles, myStateDumpPeriod, myStateDumpPrefix, myStateDumpSuffix, myStateDumpTimes, myVersion, string2time(), and WRITE_WARNING.
Referenced by NLBuilder::buildNet().
void MSNet::closeSimulation | ( | SUMOTime | start | ) |
Closes the simulation (all files, connections, etc.)
Writes also performance output
[in] | start | The step the simulation was started with |
Definition at line 436 of file MSNet.cpp.
References MSDetectorControl::close(), MSDevice_Tripinfo::generateOutputForUnfinished(), MSDevice_Vehroutes::generateOutputForUnfinished(), generateStatistics(), OptionsCont::getOptions(), myDetectorControl, myLogExecutionTime, myStep, WRITE_MESSAGE, writeChargingStationOutput(), and writeRailSignalBlocks().
Referenced by libsumo::Simulation::close(), GUIRunThread::deleteSim(), and simulate().
|
inlinevirtual |
creates a wrapper for the given logic (see GUINet)
Reimplemented in GUINet.
Definition at line 525 of file MSNet.h.
Referenced by MSTLLogicControl::TLSLogicVariants::setStateInstantiatingOnline().
const std::string MSNet::generateStatistics | ( | SUMOTime | start | ) |
Writes performance output and running vehicle stats.
[in] | start | The step the simulation was started with |
Definition at line 381 of file MSNet.cpp.
References MSVehicleControl::getCollisionCount(), SysUtils::getCurrentMillis(), MSVehicleControl::getDepartedVehicleNo(), MSVehicleControl::getEmergencyStops(), MSTransportableControl::getJammedNumber(), MSTransportableControl::getLoadedNumber(), MSVehicleControl::getLoadedVehicleNo(), OptionsCont::getOptions(), MSTransportableControl::getRunningNumber(), MSVehicleControl::getRunningVehicleNo(), MSVehicleControl::getTeleportCount(), MSVehicleControl::getTeleportsJam(), MSVehicleControl::getTeleportsWrongLane(), MSVehicleControl::getTeleportsYield(), MSInsertionControl::getWaitingVehicleNo(), joinToString(), myInserter, myPersonControl, mySimBeginMillis, myStep, myVehicleControl, myVehiclesMoved, MSDevice_Tripinfo::printStatistics(), STEPS2TIME, and toString().
Referenced by closeSimulation(), and signalHandler().
|
inline |
Returns the event control for events executed at the begin of a time step.
Definition at line 430 of file MSNet.h.
References myBeginOfTimestepEvents.
Referenced by MSPModel_NonInteracting::add(), MSPModel_Striping::add(), MSCModel_NonInteracting::add(), NLTriggerBuilder::buildVaporizer(), MSPhasedTrafficLightLogic::changeStepAndDuration(), MSSimpleTrafficLightLogic::changeStepAndDuration(), MSTLLogicControl::closeWAUT(), MSLaneSpeedTrigger::init(), MSPModel_Remote::MSPModel_Remote(), MSTrafficLightLogic::MSTrafficLightLogic(), MSTriggeredRerouter::myEndElement(), MSDevice_Routing::notifyEnter(), MSPerson::MSPersonStage_Access::proceed(), MSDevice_ToC::requestToC(), MSTriggeredRerouter::setPermissions(), MSDevice_ToC::triggerDownwardToC(), and MSDevice_ToC::triggerMRM().
|
virtual |
Returns the container control.
If the container control does not exist, yet, it is created.
Reimplemented in GUINet.
Definition at line 806 of file MSNet.cpp.
References myContainerControl.
Referenced by MSTransportable::Stage_Waiting::abort(), MSTransportable::Stage_Driving::abort(), MSRouteHandler::closeContainer(), libsumo::Simulation::getMinExpectedNumber(), MSContainer::MSContainerStage_Tranship::moveToNextEdge(), MSDevice_Transportable::notifyLeave(), MSDevice_Transportable::notifyMove(), MSContainer::MSContainerStage_Driving::proceed(), MSTransportable::Stage_Waiting::proceed(), MSVehicle::processNextStop(), MEVehicle::processStop(), and MSDevice_Transportable::~MSDevice_Transportable().
|
inline |
Returns the current simulation step.
Definition at line 284 of file MSNet.h.
References myStep.
Referenced by MSCFModel_ACC::_v(), MSCFModel_CACC::_v(), MSLCM_LC2013::_wantsChange(), MSLCM_SL2015::_wantsChangeSublane(), MSPModel_Striping::add(), libsumo::Person::add(), libsumo::Vehicle::add(), MSBaseVehicle::addContainer(), MSBaseVehicle::addPerson(), GUIEdge::addRerouter(), MSDevice_Vehroutes::addRoute(), MSTLLogicControl::addWAUTJunction(), MSTransportableControl::boardAnyWaiting(), NLDetectorBuilder::buildE2Detector(), NLJunctionControlBuilder::closeTrafficLightLogic(), MSTLLogicControl::closeWAUT(), TraCIServerAPI_Simulation::commandDistanceRequest(), MSDeterministicHiLevelTrafficLightLogic::decideNextPhase(), MSSwarmTrafficLightLogic::decideNextPhase(), MSDeterministicHiLevelTrafficLightLogic::decidePolicy(), MSSwarmTrafficLightLogic::decidePolicy(), TraCIServer::dispatchCommand(), MSActuatedTrafficLightLogic::duration(), MSVehicle::enterLaneAtInsertion(), Command_SaveTLCoupledLaneDet::execute(), Command_SaveTLCoupledDet::execute(), MSVehicle::executeMove(), MSCFModel_CC::finalizeSpeed(), libsumo::Simulation::findIntermodalRoute(), libsumo::Simulation::findRoute(), MSActuatedTrafficLightLogic::gapControl(), MSDevice_Tripinfo::generateOutputForUnfinished(), MSTransportable::getAngle(), MSLane::getCriticalLeader(), MSInductLoop::getCurrentOccupancy(), MSSOTLTrafficLightLogic::getCurrentPhaseElapsed(), GUIApplicationWindow::getCurrentSimTime(), MSLaneSpeedTrigger::getCurrentSpeed(), libsumo::Simulation::getCurrentTime(), GUIViewTraffic::getCurrentTimeStep(), MSEventControl::getCurrentTimeStep(), libsumo::Simulation::getDistance2D(), libsumo::Simulation::getDistanceRoad(), GUINet::getEdgeData(), MSTransportable::getEdgePos(), MSLane::getFirstVehicleInformation(), MSLane::getLastVehicleInformation(), MSLane::getLeaderOnConsecutive(), MSLane::getLeadersOnConsecutive(), libsumo::Lane::getLinks(), MESegment::getMeanSpeed(), MSInsertionControl::getPendingEmits(), MSVehicle::getPosition(), MSTransportable::getPosition(), MSTrafficLightLogic::getSpentDuration(), MSTransportable::getWaitingSeconds(), MSTransportable::getWaitingTime(), MSLink::getZipperSpeed(), GUIApplicationWindow::handleEvent_SimulationStep(), MSSwarmTrafficLightLogic::init(), MSLaneSpeedTrigger::init(), MSRoutingEngine::initEdgeWeights(), TraCIServer::initialiseSubscription(), MSTLLogicControl::initWautSwitch(), MSLane::isInsertionSuccess(), MSPerson::Influencer::isRemoteControlled(), MSVehicle::Influencer::isRemoteControlled(), MSTransportableControl::loadAnyWaiting(), GUIRunThread::makeStep(), MSPModel_Remote::MSPModel_Remote(), MSDevice_Vehroutes::notifyEnter(), MSDevice_Routing::notifyEnter(), MSDevice_Tripinfo::notifyEnter(), MSTriggeredRerouter::notifyEnter(), MSDevice_Transportable::notifyLeave(), MSDevice_Vehroutes::notifyLeave(), MSDevice_Tripinfo::notifyLeave(), MSDevice_Transportable::notifyMove(), GUIApplicationWindow::onCmdSaveState(), GUIApplicationWindow::onCmdTimeToggle(), MSBaseVehicle::onDepart(), TraCIServer::postProcessSimulationStep(), MESegment::prepareDetectorForWriting(), MSVehicle::processLaneAdvances(), MSVehicle::processNextStop(), MSRailSignal::LinkInfo::reroute(), MSTriggeredRerouter::rerouteParkingArea(), MSVehicle::resetActionOffset(), MSSOTLTrafficLightLogic::resetCTS(), MSTrafficLightLogic::resetLinkStates(), GUIRunThread::run(), TraCIServer::sendOutputToAll(), MSTransportable::Stage_Trip::setArrived(), libsumo::TrafficLight::setPhase(), libsumo::TrafficLight::setPhaseDuration(), MSTLLogicControl::TLSLogicVariants::setStateInstantiatingOnline(), MSPhasedTrafficLightLogic::setStep(), MSSOTLTrafficLightLogic::setupCTS(), simulate(), MSContainer::MSContainerStage_Driving::tripInfoOutput(), MSPerson::MSPersonStage_Driving::tripInfoOutput(), MSSimpleTrafficLightLogic::trySwitch(), MSDelayBasedTrafficLightLogic::trySwitch(), MSActuatedTrafficLightLogic::trySwitch(), MSSOTLTrafficLightLogic::trySwitch(), MSVehicle::updateActionOffset(), MSSOTLTrafficLightLogic::updateCTS(), MSRailCrossing::updateCurrentPhase(), MSSwarmTrafficLightLogic::updateSensitivities(), and MSVehicle::wasRemoteControlled().
|
inline |
Returns the detector control.
Definition at line 400 of file MSNet.h.
References myDetectorControl.
Referenced by MSSOTLE2Sensors::buildContinueSensior(), MSSOTLE2Sensors::buildCountSensorForLane(), MSSOTLE2Sensors::buildCountSensorForOutLane(), NLDetectorBuilder::buildE2Detector(), NLDetectorBuilder::buildInductLoop(), NLDetectorBuilder::buildInstantInductLoop(), NLDetectorBuilder::buildRouteProbe(), MSSOTLE2Sensors::buildSensorForLane(), MSSOTLE2Sensors::buildSensorForOutLane(), NLDetectorBuilder::createEdgeLaneMeanData(), NLDetectorBuilder::endE3Detector(), libsumo::LaneArea::getIDCount(), libsumo::MultiEntryExit::getIDCount(), libsumo::InductionLoop::getIDCount(), libsumo::LaneArea::getIDList(), libsumo::MultiEntryExit::getIDList(), libsumo::InductionLoop::getIDList(), MSDelayBasedTrafficLightLogic::init(), MSActuatedTrafficLightLogic::init(), and NLTriggerBuilder::parseAndBuildCalibrator().
|
inline |
Returns the dynamic shapes updater.
Definition at line 467 of file MSNet.h.
References myDynamicShapeUpdater.
|
inline |
Returns the edge control.
Definition at line 380 of file MSNet.h.
References myEdges.
Referenced by MSRoutingEngine::adaptEdgeEfforts(), NLBuilder::build(), MSLane::executeMovements(), MSLane::incorporateVehicle(), MSMeanData::init(), MSPModel_Remote::initialize(), MSVehicle::processLaneAdvances(), MSFCDExport::write(), MSQueueExport::writeEdge(), and MSFullExport::writeEdge().
|
static |
Returns the effort to pass an edge.
[in] | e | The edge for which the effort to be passed shall be returned |
[in] | v | The vehicle that is rerouted |
[in] | t | The time for which the effort shall be returned [s] |
Definition at line 137 of file MSNet.cpp.
References getInstance(), MSVehicle::getWeightsStorage(), getWeightsStorage(), and MSEdgeWeightsStorage::retrieveExistingEffort().
Referenced by getRouterEffort().
|
inline |
Returns the event control for events executed at the end of a time step.
Definition at line 440 of file MSNet.h.
References myEndOfTimestepEvents.
Referenced by libsumo::Polygon::addDynamics(), MSDevice_BTreceiver::BTreceiverUpdate::BTreceiverUpdate(), Command_SaveTLSState::Command_SaveTLSState(), Command_SaveTLSSwitches::Command_SaveTLSSwitches(), Command_SaveTLSSwitchStates::Command_SaveTLSSwitchStates(), MSCalibrator::init(), MSRoutingEngine::initWeightUpdate(), and MSVTypeProbe::MSVTypeProbe().
|
inline |
Returns the insertion control.
Definition at line 390 of file MSNet.h.
References myInserter.
Referenced by adaptIntermodalRouter(), libsumo::Vehicle::add(), MSLane::checkFailure(), libsumo::Simulation::clearPending(), MSStateHandler::closeVehicle(), MSRouteHandler::closeVehicle(), GUIEdge::getColorValue(), libsumo::Simulation::getMinExpectedNumber(), GUINet::getParameterWindow(), GUILane::getPendingEmits(), GUIEdge::getScaleValue(), GUILane::getScaleValue(), GUIApplicationWindow::handleEvent_SimulationStep(), MSLane::isInsertionSuccess(), MSVehicleTransfer::loadState(), libsumo::Vehicle::moveTo(), libsumo::Vehicle::moveToXY(), MSStateHandler::myStartElement(), MSContainer::MSContainerStage_Driving::proceed(), MSPerson::MSPersonStage_Driving::proceed(), libsumo::Vehicle::remove(), MSBaseVehicle::reroute(), and MSStateHandler::saveState().
|
inline |
Returns the event control for insertion events.
Definition at line 450 of file MSNet.h.
References myInsertionEvents.
Referenced by MSDevice_Routing::MSDevice_Routing(), MSTransportableDevice_Routing::MSTransportableDevice_Routing(), and MSTransportableDevice_Routing::setParameter().
|
static |
Returns the pointer to the unique instance of MSNet (singleton).
ProcessError | If a network was not yet constructed |
Definition at line 168 of file MSNet.cpp.
References myInstance.
Referenced by MSCFModel_ACC::_v(), MSCFModel_CACC::_v(), MSCFModel_CC::_v(), MSLCM_LC2013::_wantsChange(), MSLCM_SL2015::_wantsChangeSublane(), MSTransportable::Stage_Waiting::abort(), MSTransportable::Stage_Driving::abort(), MSRoutingEngine::adaptEdgeEfforts(), libsumo::Edge::adaptTraveltime(), libsumo::Polygon::add(), MSPModel_Striping::add(), LaneStoringVisitor::add(), libsumo::Person::add(), libsumo::POI::add(), MSVehicleTransfer::add(), libsumo::Vehicle::add(), MSChargingStation::addChargeValueForOutput(), MSBaseVehicle::addContainer(), libsumo::Polygon::addDynamics(), MSRouteHandler::addFlowPerson(), libsumo::Polygon::addHighlightPolygon(), MSTrafficLightLogic::addLink(), MSTLLogicControl::TLSLogicVariants::addLogic(), MSBaseVehicle::addPerson(), MSRouteHandler::addPersonTrip(), GUIEdge::addRerouter(), MSDevice_Vehroutes::addRoute(), MSRouteHandler::addStop(), MSVehicle::addStop(), MSVehicle::addTraciStopAtStoppingPlace(), MSTLLogicControl::addWAUTJunction(), libsumo::Person::appendDrivingStage(), libsumo::Person::appendWaitingStage(), libsumo::Person::appendWalkingStage(), GUITrafficLightLogicWrapper::begin2TrackPhases(), MSTransportableControl::boardAnyWaiting(), MSDevice_BTreceiver::BTreceiverUpdate::BTreceiverUpdate(), MSSOTLE2Sensors::buildContinueSensior(), MSSOTLE2Sensors::buildCountSensorForLane(), MSSOTLE2Sensors::buildCountSensorForOutLane(), MSSOTLE2Sensors::buildSensorForLane(), MSSOTLE2Sensors::buildSensorForOutLane(), NLTriggerBuilder::buildVaporizer(), GUIMEVehicleControl::buildVehicle(), MEVehicleControl::buildVehicle(), GUIVehicleControl::buildVehicle(), MSVehicleControl::buildVehicle(), MSSwarmTrafficLightLogic::calculateEtaDiff(), MSSwarmTrafficLightLogic::calculateEtaRatio(), MSSOTLPolicyBasedTrafficLightLogic::canRelease(), libsumo::Vehicle::changeLane(), libsumo::Vehicle::changeLaneRelative(), MSLaneChanger::changeOpposite(), MELoop::changeSegment(), MSPhasedTrafficLightLogic::changeStepAndDuration(), MSSimpleTrafficLightLogic::changeStepAndDuration(), libsumo::Vehicle::changeTarget(), MSLane::checkFailure(), GUIApplicationWindow::checkGamingEvents(), GUIApplicationWindow::checkGamingEventsDRT(), MSVehicleTransfer::checkInsertions(), MSVehicle::Influencer::GapControlState::cleanup(), libsumo::Simulation::clearPending(), libsumo::Simulation::close(), MSRouteHandler::closeContainer(), MSRouteHandler::closeFlow(), MSRouteHandler::closePerson(), MSRouteHandler::closePersonFlow(), MSRouteHandler::closeRoute(), MSStateHandler::closeVehicle(), MSRouteHandler::closeVehicle(), MSRouteHandler::closeVehicleTypeDistribution(), MSRouteHandler::closeVType(), MSTLLogicControl::closeWAUT(), Command_SaveTLSState::Command_SaveTLSState(), Command_SaveTLSSwitches::Command_SaveTLSSwitches(), Command_SaveTLSSwitchStates::Command_SaveTLSSwitchStates(), TraCIServerAPI_Simulation::commandDistanceRequest(), libsumo::Person::convertTraCIStage(), NLDetectorBuilder::createEdgeLaneMeanData(), MSCalibrator::currentFlow(), MSDeterministicHiLevelTrafficLightLogic::decideNextPhase(), MSSOTLPolicyBasedTrafficLightLogic::decideNextPhase(), MSSwarmTrafficLightLogic::decideNextPhase(), MSDeterministicHiLevelTrafficLightLogic::decidePolicy(), MSSwarmTrafficLightLogic::decidePolicy(), MSLane::detectCollisions(), MSLane::detectPedestrianJunctionCollision(), MSInsertionControl::determineCandidates(), TraCIServer::dispatchCommand(), GUITrafficLightLogicWrapper::drawGL(), GUIJunctionWrapper::drawGL(), GUIContainerStop::drawGL(), GUIBusStop::drawGL(), GUITriggeredRerouter::GUITriggeredRerouterEdge::drawGL(), GUILane::drawGL(), GUILane::drawLinkNo(), GUILane::drawLinkRules(), GUILane::drawMarkings(), GUILane::drawTLSLinkNo(), MSVehicleType::duplicateType(), MSActuatedTrafficLightLogic::duration(), GUITriggerBuilder::endParkingArea(), GUITriggerBuilder::endStoppingPlace(), MSVehicle::enterLaneAtInsertion(), MSDevice::equippedByDefaultAssignmentOptions(), METriggeredCalibrator::execute(), Command_SaveTLCoupledLaneDet::execute(), Command_SaveTLCoupledDet::execute(), MSVTypeProbe::execute(), MSCalibrator::execute(), MSPerson::MSPersonStage_Access::ProceedCmd::execute(), MSVehicle::executeMove(), MSEdgeControl::executeMovements(), MSLane::executeMovements(), libsumo::Polygon::exists(), MSCFModel_CC::finalizeSpeed(), libsumo::Simulation::findIntermodalRoute(), libsumo::Simulation::findRoute(), MSActuatedTrafficLightLogic::gapControl(), MSDevice_Tripinfo::generateOutputForUnfinished(), MSDevice_Vehroutes::generateOutputForUnfinished(), libsumo::Edge::getAdaptedTraveltime(), MSTransportable::Stage_Trip::getAngle(), MSTransportable::Stage_Waiting::getAngle(), MSTransportable::Stage_Driving::getAngle(), MSTransportable::getAngle(), MSVehicle::getBackPosition(), MSVehicle::getBackPositionOnLane(), libsumo::Simulation::getBusStopIDList(), libsumo::Simulation::getBusStopWaiting(), libsumo::Simulation::getBusStopWaitingIDList(), GUIJunctionWrapper::getColorValue(), GUIEdge::getColorValue(), GUILane::getColorValue(), MSLane::getCriticalLeader(), MSInductLoop::getCurrentLength(), MSInductLoop::getCurrentOccupancy(), MSInductLoop::getCurrentPassedNumber(), MSSOTLTrafficLightLogic::getCurrentPhaseElapsed(), MSLaneSpeedTrigger::getCurrentSpeed(), MSInductLoop::getCurrentSpeed(), libsumo::Simulation::getCurrentTime(), GUIViewTraffic::getCurrentTimeStep(), MSEventControl::getCurrentTimeStep(), MSInductLoop::getCurrentVehicleIDs(), libsumo::MultiEntryExit::getDetector(), libsumo::LaneArea::getDetector(), libsumo::InductionLoop::getDetector(), libsumo::Simulation::getDistance2D(), libsumo::Simulation::getDistanceRoad(), MSTransportable::getEdgePos(), libsumo::Edge::getEffort(), getEffort(), MSLane::getFirstVehicleInformation(), GUINet::getGUIInstance(), libsumo::LaneArea::getIDCount(), libsumo::MultiEntryExit::getIDCount(), libsumo::InductionLoop::getIDCount(), libsumo::Person::getIDCount(), libsumo::LaneArea::getIDList(), libsumo::Polygon::getIDList(), libsumo::MultiEntryExit::getIDList(), libsumo::InductionLoop::getIDList(), libsumo::Person::getIDList(), libsumo::Junction::getIDList(), libsumo::POI::getIDList(), libsumo::Vehicle::getIDList(), libsumo::TrafficLight::getIDList(), libsumo::VehicleType::getIDList(), libsumo::Junction::getJunction(), libsumo::Edge::getLastStepPersonIDs(), MSLane::getLastVehicleInformation(), MSLink::getLeaderInfo(), MSLane::getLeaderOnConsecutive(), MSLane::getLeadersOnConsecutive(), libsumo::Lane::getLinks(), GUILane::getLoadedEdgeWeight(), MSLane::getMaximumBrakeDist(), MESegment::getMeanSpeed(), MSDeterministicHiLevelTrafficLightLogic::getMeanSpeedForInputLanes(), MSDeterministicHiLevelTrafficLightLogic::getMeanSpeedForOutputLanes(), libsumo::Simulation::getMinExpectedNumber(), MSPModel::getModel(), MSCModel_NonInteracting::getModel(), MSPModel_Striping::getNextLane(), libsumo::Simulation::getParameter(), MSCFModel_CC::getParameter(), MSInsertionControl::getPendingEmits(), GUILane::getPendingEmits(), libsumo::Person::getPerson(), MSTLLogicControl::getPhaseDef(), MSSwarmTrafficLightLogic::getPheromoneForInputLanes(), MSSwarmTrafficLightLogic::getPheromoneForOutputLanes(), libsumo::POI::getPoI(), libsumo::Polygon::getPolygon(), MSPModel_NonInteracting::PState::getPosition(), MSTransportable::Stage_Trip::getPosition(), MSTransportable::Stage_Waiting::getPosition(), MSTransportable::Stage_Driving::getPosition(), MSVehicle::getPosition(), MSTransportable::getPosition(), MSVTKExport::getPositions(), MSCFModel_CC::getRadarMeasurements(), MSRoutingEngine::getRouterTT(), MSVehicle::Influencer::getRouterTT(), GUIEdge::getScaleValue(), GUILane::getScaleValue(), MSVTKExport::getSpeed(), MSTrafficLightLogic::getSpentDuration(), GUILane::getStoredEdgeTravelTime(), MSEdge::getSuccessors(), libsumo::TrafficLight::getTLS(), libsumo::Polygon::getTrafficObject(), getTravelTime(), MSEdge::getTravelTimeStatic(), libsumo::Junction::getTree(), libsumo::InductionLoop::getTree(), libsumo::Polygon::getTree(), libsumo::POI::getTree(), libsumo::Helper::getVehicle(), libsumo::InductionLoop::getVehicleData(), MSCFModel_CC::getVehicleInformation(), MSEdge::getViaSuccessors(), libsumo::VehicleType::getVType(), MSTransportable::getWaitingSeconds(), MSTransportable::getWaitingTime(), MSLink::getZipperSpeed(), GUIBusStop::GUIBusStop(), GUIContainerStop::GUIContainerStop(), GUIParkingArea::GUIParkingArea(), MSLane::handleCollisionBetween(), MSVehicle::haveValidStopEdges(), libsumo::POI::highlight(), libsumo::Vehicle::highlight(), MSPModel_Striping::PState::ignoreRed(), MSVehicle::ignoreRed(), MSLane::incorporateVehicle(), MSVehicle::influenceChangeDecision(), MSRailCrossing::init(), MSDevice_Vehroutes::init(), MSRailSignal::init(), MSDelayBasedTrafficLightLogic::init(), MSActuatedTrafficLightLogic::init(), MSSwarmTrafficLightLogic::init(), MSLaneSpeedTrigger::init(), MSCalibrator::init(), MSMeanData::init(), MSVehicle::Influencer::GapControlState::init(), MSDevice_ToC::initColorScheme(), MSRoutingEngine::initEdgeWeights(), TraCIServer::initialiseSubscription(), MSLane::initRestrictions(), MSTLLogicControl::initWautSwitch(), MSRoutingEngine::initWeightUpdate(), MSEdge::insertVehicle(), MSLane::isInsertionSuccess(), libsumo::Vehicle::isOnInit(), MSPerson::Influencer::isRemoteControlled(), MSVehicle::Influencer::isRemoteControlled(), MSTrafficLightLogic::isSelected(), MSSOTLTrafficLightLogic::isThresholdPassed(), MSAbstractLaneChangeModel::laneChangeOutput(), MSVehicle::leaveLane(), MSDevice_BTreceiver::BTreceiverUpdate::leaveRange(), MSTransportableControl::loadAnyWaiting(), MSVehicleTransfer::loadState(), makeDynamicShapeUpdater(), libsumo::Vehicle::moveTo(), MSPerson::MSPersonStage_Walking::moveToNextEdge(), MSContainer::MSContainerStage_Tranship::moveToNextEdge(), libsumo::Person::moveToXY(), libsumo::Vehicle::moveToXY(), MSDevice_ToC::MRMExecutionStep(), MSDevice_Routing::MSDevice_Routing(), MSDevice_ToC::MSDevice_ToC(), MSParkingArea::MSParkingArea(), MSTrafficLightLogic::MSTrafficLightLogic(), MSTransportableDevice_Routing::MSTransportableDevice_Routing(), MSVTypeProbe::MSVTypeProbe(), GUITriggeredRerouter::myEndElement(), MSTriggeredRerouter::myEndElement(), MSStateHandler::myStartElement(), MSRouteHandler::myStartElement(), MSCalibrator::myStartElement(), MSTriggeredRerouter::myStartElement(), MSDevice_Transportable::notifyEnter(), MSDevice_Vehroutes::notifyEnter(), MSDevice_Routing::notifyEnter(), MSDevice_Tripinfo::notifyEnter(), MSTriggeredRerouter::notifyEnter(), MSCalibrator::VehicleRemover::notifyEnter(), MSDevice_Transportable::notifyLeave(), MSDevice_Vehroutes::notifyLeave(), MSDevice_Tripinfo::notifyLeave(), MSDevice_Transportable::notifyMove(), MSDevice_Battery::notifyMove(), MSDevice_Bluelight::notifyMove(), MSE3Collector::MSE3EntryReminder::notifyMove(), GUISUMOViewParent::onCmdLocate(), GUIPerson::GUIPersonPopupMenu::onCmdRemoveObject(), GUIBaseVehicle::GUIBaseVehiclePopupMenu::onCmdRemoveObject(), GUIApplicationWindow::onCmdSaveState(), MSBaseVehicle::onDepart(), GUIViewTraffic::onGamingClick(), MSLink::opened(), TraCIServer::openSocket(), MSRouteHandler::openVehicleTypeDistribution(), MSRouteHandler::parseWalkPositions(), MSVehicle::planMoveInternal(), libsumo::Helper::postProcessRemoteControl(), MSPerson::Influencer::postProcessRemoteControl(), TraCIServer::postProcessSimulationStep(), MESegment::prepareDetectorForWriting(), MSPerson::MSPersonStage_Walking::proceed(), TraCIServer::processCommandsUntilSimStep(), MSDevice_SSM::processEncounters(), TraCIServerAPI_TrafficLight::processGet(), MSVehicle::processLaneAdvances(), MSVehicle::processNextStop(), TraCIServerAPI_Vehicle::processSet(), TraCIServerAPI_GUI::processSet(), TraCIServerAPI_Person::processSet(), MEVehicle::processStop(), MSVehicle::processTraCISpeedControl(), MSPModel_Striping::PState::PState(), MESegment::receive(), libsumo::Helper::registerVehicleStateListener(), METriggeredCalibrator::remainingVehicleCapacity(), MSCalibrator::remainingVehicleCapacity(), libsumo::Polygon::remove(), libsumo::POI::remove(), libsumo::Vehicle::remove(), MSVehicleControl::removePending(), MSCalibrator::removePending(), MSTransportable::removeStage(), MSVehicle::replaceRoute(), MEVehicle::replaceRoute(), MSBaseVehicle::replaceVehicleType(), MSTransportable::replaceVehicleType(), MSDevice_ToC::requestToC(), MSRoutingEngine::reroute(), MSBaseVehicle::reroute(), MSRailSignal::LinkInfo::reroute(), GUIVehicle::rerouteDRTStop(), libsumo::Vehicle::rerouteEffort(), MSTriggeredRerouter::rerouteParkingArea(), MSVehicle::rerouteParkingArea(), libsumo::Person::rerouteTraveltime(), libsumo::Vehicle::rerouteTraveltime(), MSVehicle::resetActionOffset(), MSSOTLTrafficLightLogic::resetCTS(), MSTrafficLightLogic::resetLinkStates(), MSVehicle::resumeFromStopping(), MSContainer::routeOutput(), MSPerson::routeOutput(), MSStateHandler::saveRNGs(), MSStateHandler::saveState(), libsumo::Simulation::saveState(), TraCIServer::sendOutputToAll(), MSVehicleType::setActionStepLength(), MSTransportable::Stage_Trip::setArrived(), MSVehicle::setBlinkerInformation(), libsumo::TrafficLight::setCompleteRedYellowGreenDefinition(), libsumo::Edge::setEffort(), GUIBaseVehicle::setFunctionalColor(), MSLaneSpeedTrigger::setOverriding(), MSLaneSpeedTrigger::setOverridingValue(), MSTransportableDevice_Routing::setParameter(), MSDevice_ToC::setParameter(), MSCFModel_CC::setParameter(), MSTriggeredRerouter::setPermissions(), libsumo::TrafficLight::setPhase(), libsumo::TrafficLight::setPhaseDuration(), libsumo::POI::setPosition(), libsumo::TrafficLight::setProgram(), libsumo::TrafficLight::setRedYellowGreenState(), libsumo::Polygon::setShape(), libsumo::Vehicle::setSpeed(), MSTLLogicControl::TLSLogicVariants::setStateInstantiatingOnline(), MSPhasedTrafficLightLogic::setStep(), libsumo::Person::setType(), libsumo::Vehicle::setType(), MSSOTLTrafficLightLogic::setupCTS(), signalHandler(), libsumo::Vehicle::slowDown(), MSLaneChangerSublane::startChangeSublane(), libsumo::Simulation::step(), MSStopOut::stopEnded(), MSStopOut::stopStarted(), MSLane::succLinkSec(), MSDevice_ToC::switchHolderType(), MSTLLogicControl::TLSLogicVariants::switchTo(), MELoop::teleportVehicle(), MSDevice_ToC::triggerDownwardToC(), MSDevice_ToC::triggerMRM(), MSContainer::MSContainerStage_Driving::tripInfoOutput(), MSPerson::MSPersonStage_Walking::tripInfoOutput(), MSPerson::MSPersonStage_Driving::tripInfoOutput(), METriggeredCalibrator::tryEmit(), MSInsertionControl::tryInsert(), MSSimpleTrafficLightLogic::trySwitch(), MSDelayBasedTrafficLightLogic::trySwitch(), MSActuatedTrafficLightLogic::trySwitch(), MSSOTLTrafficLightLogic::trySwitch(), MSVehicle::updateActionOffset(), MSSOTLTrafficLightLogic::updateCTS(), MSRailCrossing::updateCurrentPhase(), MSSOTLTrafficLightLogic::updateDecayThreshold(), MSSwarmTrafficLightLogic::updatePheromoneLevels(), MSSwarmTrafficLightLogic::updateSensitivities(), MSAbstractLaneChangeModel::updateShadowLane(), MSVehicle::updateState(), MSPModel_Remote::usingInternalLanes(), MSPModel_Striping::usingInternalLanesStatic(), MELoop::vaporizeCar(), MSDetectorFileOutput::vehicleApplies(), MSTriggeredRerouter::vehicleApplies(), MSVehicleControl::vehicleDeparted(), MSPModel_Striping::PState::walk(), MSVehicle::wasRemoteControlled(), MSEmissionExport::write(), MSBatteryExport::write(), MSFCDExport::write(), MSAmitranTrajectories::write(), MSMeanData_Emissions::MSLaneMeanDataValues::write(), MSQueueExport::writeEdge(), MSFullExport::writeEdge(), MSDevice_Vehroutes::writeOutput(), writeOutput(), MSFullExport::writeTLS(), MSFullExport::writeVehicles(), MSDevice_BTreceiver::BTreceiverUpdate::~BTreceiverUpdate(), MSDevice_Transportable::~MSDevice_Transportable(), MSTransportable::~MSTransportable(), and MSVehicle::~MSVehicle().
MSNet::MSIntermodalRouter & MSNet::getIntermodalRouter | ( | const int | routingMode = 0 , |
const MSEdgeVector & | prohibited = MSEdgeVector() |
||
) | const |
Definition at line 995 of file MSNet.cpp.
References adaptIntermodalRouter(), IntermodalNetwork< E, L, N, V >::ALL_JUNCTIONS, OptionsCont::getOptions(), OptionsCont::getString(), OptionsCont::getStringVector(), myIntermodalRouter, IntermodalNetwork< E, L, N, V >::PARKING_AREAS, IntermodalNetwork< E, L, N, V >::PT_STOPS, and libsumo::ROUTING_MODE_COMBINED.
Referenced by libsumo::Simulation::findIntermodalRoute(), and MSTransportable::Stage_Trip::setArrived().
|
inline |
Returns the junctions control.
Definition at line 420 of file MSNet.h.
References myJunctions.
Referenced by libsumo::Junction::getIDList(), and libsumo::Junction::getJunction().
|
inline |
MSNet::MSPedestrianRouter & MSNet::getPedestrianRouter | ( | const MSEdgeVector & | prohibited = MSEdgeVector() | ) | const |
Definition at line 985 of file MSNet.cpp.
References myPedestrianRouter, and PedestrianRouter< E, L, N, V >::prohibit().
Referenced by MSPModel_Striping::getNextLane(), MSPModel_Striping::PState::PState(), and libsumo::Person::rerouteTraveltime().
|
virtual |
Returns the person control.
If the person control does not exist, yet, it is created.
Reimplemented in GUINet.
Definition at line 798 of file MSNet.cpp.
References myPersonControl.
Referenced by MSTransportable::Stage_Waiting::abort(), MSTransportable::Stage_Driving::abort(), libsumo::Person::add(), MSRouteHandler::addFlowPerson(), MSRouteHandler::closePerson(), MSPerson::MSPersonStage_Access::ProceedCmd::execute(), MSDevice_Tripinfo::generateOutputForUnfinished(), MSDevice_Vehroutes::generateOutputForUnfinished(), libsumo::Person::getIDCount(), libsumo::Person::getIDList(), libsumo::Simulation::getMinExpectedNumber(), libsumo::Person::getPerson(), libsumo::Polygon::getTrafficObject(), MSPerson::MSPersonStage_Walking::moveToNextEdge(), MSDevice_Transportable::notifyLeave(), MSDevice_Transportable::notifyMove(), GUIPerson::GUIPersonPopupMenu::onCmdRemoveObject(), TraCIServer::postProcessSimulationStep(), MSPerson::MSPersonStage_Walking::proceed(), MSPerson::MSPersonStage_Driving::proceed(), MSTransportable::Stage_Waiting::proceed(), MSVehicle::processNextStop(), TraCIServerAPI_Person::processSet(), MEVehicle::processStop(), MSPModel_Striping::PState::walk(), and MSDevice_Transportable::~MSDevice_Transportable().
const std::map< SUMOVehicleClass, double > * MSNet::getRestrictions | ( | const std::string & | id | ) | const |
Returns the restrictions for an edge type If no restrictions are present, 0 is returned.
[in] | id | The id of the type |
Definition at line 324 of file MSNet.cpp.
References myRestrictions.
Referenced by MSLane::initRestrictions().
SUMOAbstractRouter< MSEdge, SUMOVehicle > & MSNet::getRouterEffort | ( | const MSEdgeVector & | prohibited = MSEdgeVector() | ) | const |
Definition at line 974 of file MSNet.cpp.
References MSEdge::getAllEdges(), getEffort(), getTravelTime(), and myRouterEffort.
SUMOAbstractRouter< MSEdge, SUMOVehicle > & MSNet::getRouterTT | ( | const MSEdgeVector & | prohibited = MSEdgeVector() | ) | const |
Definition at line 954 of file MSNet.cpp.
References MSEdge::getAllEdges(), OptionsCont::getOptions(), OptionsCont::getString(), getTravelTime(), myRouterTT, and WRITE_WARNING.
Referenced by TraCIServerAPI_Simulation::commandDistanceRequest(), libsumo::Simulation::findRoute(), libsumo::Simulation::getDistance2D(), libsumo::Simulation::getDistanceRoad(), MSVehicle::Influencer::getRouterTT(), MSTriggeredRerouter::notifyEnter(), GUIVehicle::rerouteDRTStop(), and MSTriggeredRerouter::rerouteParkingArea().
|
inline |
Returns the shapes container.
Definition at line 460 of file MSNet.h.
References myShapeContainer.
Referenced by libsumo::Polygon::add(), libsumo::POI::add(), NLHandler::addDistrict(), libsumo::Polygon::addDynamics(), libsumo::Polygon::addHighlightPolygon(), NLBuilder::build(), libsumo::Polygon::exists(), libsumo::Polygon::getIDList(), libsumo::POI::getIDList(), libsumo::POI::getPoI(), libsumo::Polygon::getPolygon(), libsumo::Polygon::getTree(), libsumo::POI::getTree(), makeDynamicShapeUpdater(), GUIApplicationWindow::onCmdOpenShapes(), libsumo::Polygon::remove(), libsumo::POI::remove(), libsumo::POI::setPosition(), and libsumo::Polygon::setShape().
|
static |
Returns the message to show if a certain state occurs.
Definition at line 614 of file MSNet.cpp.
References SIMSTATE_CONNECTION_CLOSED, SIMSTATE_END_STEP_REACHED, SIMSTATE_ERROR_IN_SIM, SIMSTATE_INTERRUPTED, SIMSTATE_LOADING, SIMSTATE_NO_FURTHER_VEHICLES, SIMSTATE_RUNNING, and SIMSTATE_TOO_MANY_TELEPORTS.
Referenced by GUIApplicationWindow::handleEvent_SimulationEnded(), GUIRunThread::makeStep(), and simulate().
MSStoppingPlace * MSNet::getStoppingPlace | ( | const std::string & | id, |
const SumoXMLTag | category | ||
) | const |
Returns the named stopping place of the given category.
[in] | id | The id of the stop to return. |
[in] | category | The type of stop |
Definition at line 899 of file MSNet.cpp.
References myStoppingPlaces.
Referenced by MSRouteHandler::addStop(), MSVehicle::addStop(), MSVehicle::addTraciStopAtStoppingPlace(), libsumo::Person::appendDrivingStage(), libsumo::Person::appendWaitingStage(), libsumo::Person::appendWalkingStage(), libsumo::Person::convertTraCIStage(), libsumo::Simulation::getBusStopWaiting(), libsumo::Simulation::getBusStopWaitingIDList(), MSRouteHandler::myStartElement(), MSRouteHandler::parseWalkPositions(), MSVehicle::rerouteParkingArea(), and MSTransportable::Stage_Trip::setArrived().
std::string MSNet::getStoppingPlaceID | ( | const MSLane * | lane, |
const double | pos, | ||
const SumoXMLTag | category | ||
) | const |
Returns the stop of the given category close to the given position.
[in] | lane | the lane of the stop to return. |
[in] | pos | the position of the stop to return. |
[in] | category | The type of stop |
Definition at line 908 of file MSNet.cpp.
References MSStoppingPlace::getBeginLanePosition(), MSStoppingPlace::getEndLanePosition(), Named::getID(), MSStoppingPlace::getLane(), myStoppingPlaces, and POSITION_EPS.
Referenced by MSDevice_Battery::notifyMove().
const NamedObjectCont< MSStoppingPlace * > & MSNet::getStoppingPlaces | ( | SumoXMLTag | category | ) | const |
Definition at line 922 of file MSNet.cpp.
References myStoppingPlaces, and toString().
Referenced by GUIViewTraffic::onGamingClick().
|
inline |
Returns the tls logics control.
Definition at line 410 of file MSNet.h.
References myLogics.
Referenced by NLBuilder::build(), NLDiscreteEventBuilder::buildSaveTLStateCommand(), NLDiscreteEventBuilder::buildSaveTLSwitchesCommand(), NLDiscreteEventBuilder::buildSaveTLSwitchStatesCommand(), GUIJunctionWrapper::drawGL(), libsumo::TrafficLight::getIDList(), NLJunctionControlBuilder::getTLLogicControlToUse(), libsumo::TrafficLight::getTLS(), GUINet::initGUIStructures(), GUINet::initTLMap(), GUIViewTraffic::onGamingClick(), TraCIServerAPI_TrafficLight::processGet(), and MSFullExport::writeTLS().
|
static |
Returns the travel time to pass an edge.
[in] | e | The edge for which the travel time to be passed shall be returned |
[in] | v | The vehicle that is rerouted |
[in] | t | The time for which the travel time shall be returned [s] |
Definition at line 151 of file MSNet.cpp.
References getInstance(), MSEdge::getMinimumTravelTime(), MSVehicle::getWeightsStorage(), getWeightsStorage(), and MSEdgeWeightsStorage::retrieveExistingTravelTime().
Referenced by getRouterEffort(), getRouterTT(), MSEdge::getTravelTimeStatic(), MSRoutingEngine::initEdgeWeights(), and MSRoutingEngine::reroute().
|
inline |
Returns the vehicle control.
Definition at line 337 of file MSNet.h.
References myVehicleControl.
Referenced by adaptIntermodalRouter(), libsumo::Person::add(), MSVehicleTransfer::add(), libsumo::Vehicle::add(), MSRouteHandler::addPersonTrip(), MELoop::changeSegment(), GUIApplicationWindow::checkGamingEvents(), GUIApplicationWindow::checkGamingEventsDRT(), MSVehicleTransfer::checkInsertions(), MSRouteHandler::closeContainer(), MSRouteHandler::closePerson(), MSRouteHandler::closePersonFlow(), MSStateHandler::closeVehicle(), MSRouteHandler::closeVehicle(), MSLane::detectCollisions(), MSLane::detectPedestrianJunctionCollision(), MSInsertionControl::determineCandidates(), MSDevice::equippedByDefaultAssignmentOptions(), METriggeredCalibrator::execute(), MSVTypeProbe::execute(), MSCalibrator::execute(), MSVehicle::executeMove(), MSEdgeControl::executeMovements(), MSLane::executeMovements(), libsumo::Simulation::findIntermodalRoute(), libsumo::Simulation::findRoute(), libsumo::Vehicle::getIDList(), libsumo::VehicleType::getIDList(), MSLane::getMaximumBrakeDist(), libsumo::Simulation::getMinExpectedNumber(), GUINet::getParameterWindow(), MSVTKExport::getPositions(), MSCFModel_CC::getRadarMeasurements(), MSVTKExport::getSpeed(), libsumo::Polygon::getTrafficObject(), libsumo::Helper::getVehicle(), libsumo::VehicleType::getVType(), MSLane::handleCollisionBetween(), GUIApplicationWindow::handleEvent_SimulationStep(), MSDevice_ToC::initColorScheme(), libsumo::Vehicle::isOnInit(), MSDevice_ToC::MSDevice_ToC(), MSStateHandler::myStartElement(), MSRouteHandler::myStartElement(), MSCalibrator::myStartElement(), MSDevice_Bluelight::notifyMove(), GUIApplicationWindow::onCmdDemandScale(), GUIBaseVehicle::GUIBaseVehiclePopupMenu::onCmdRemoveObject(), MSBaseVehicle::onDepart(), GUIViewTraffic::onGamingClick(), MSRouteHandler::openVehicleTypeDistribution(), MSContainer::MSContainerStage_Driving::proceed(), MSPerson::MSPersonStage_Driving::proceed(), MSDevice_SSM::processEncounters(), MSVehicle::processNextStop(), TraCIServerAPI_Vehicle::processSet(), TraCIServerAPI_GUI::processSet(), MEVehicle::processStop(), MESegment::receive(), METriggeredCalibrator::remainingVehicleCapacity(), MSCalibrator::remainingVehicleCapacity(), libsumo::Vehicle::remove(), MSCalibrator::removePending(), MSBaseVehicle::replaceVehicleType(), MSTransportable::replaceVehicleType(), MSVehicle::resumeFromStopping(), MSStateHandler::saveState(), MSVehicleType::setActionStepLength(), MSTransportable::Stage_Trip::setArrived(), MSDevice_ToC::setParameter(), GUINet::setSimDuration(), libsumo::Person::setType(), libsumo::Vehicle::setType(), MSDevice_ToC::switchHolderType(), MELoop::teleportVehicle(), METriggeredCalibrator::tryEmit(), MSDetectorFileOutput::vehicleApplies(), MSTriggeredRerouter::vehicleApplies(), MSEmissionExport::write(), MSBatteryExport::write(), MSFCDExport::write(), MSAmitranTrajectories::write(), MSMeanData_Emissions::MSLaneMeanDataValues::write(), writeOutput(), MSFullExport::writeVehicles(), MSTransportable::~MSTransportable(), and MSVehicle::~MSVehicle().
MSEdgeWeightsStorage & MSNet::getWeightsStorage | ( | ) |
Returns the net's internal edge travel times/efforts container.
If the net does not have such a container, it is built.
Definition at line 820 of file MSNet.cpp.
References myEdgeWeights.
Referenced by libsumo::Edge::adaptTraveltime(), NLBuilder::EdgeFloatTimeLineRetriever_EdgeEffort::addEdgeWeight(), NLBuilder::EdgeFloatTimeLineRetriever_EdgeTravelTime::addEdgeWeight(), GUILane::getColorValue(), getEffort(), GUILane::getLoadedEdgeWeight(), GUILane::getScaleValue(), GUILane::getStoredEdgeTravelTime(), getTravelTime(), and libsumo::Edge::setEffort().
|
inline |
return whether the network contains bidirectional rail edges
Definition at line 657 of file MSNet.h.
References myHasBidiEdges.
Referenced by MSRoutingEngine::getRouterTT(), and MSRoutingEngine::reroute().
|
inline |
Returns whether containers are simulated.
Definition at line 370 of file MSNet.h.
References myContainerControl.
Referenced by libsumo::Simulation::getMinExpectedNumber(), GUIApplicationWindow::handleEvent_SimulationStep(), MSVehicle::processNextStop(), and MEVehicle::processStop().
|
inline |
return whether the network contains elevation data
Definition at line 647 of file MSNet.h.
References myHasElevation.
Referenced by MSVTypeProbe::execute().
|
inlinestatic |
Returns whether the network was already constructed.
Definition at line 144 of file MSNet.h.
References myInstance.
Referenced by libsumo::Simulation::close(), MSVehicle::Influencer::GapControlState::init(), libsumo::Simulation::isLoaded(), libsumo::Helper::registerVehicleStateListener(), and signalHandler().
|
inline |
return whether the network contains internal links
Definition at line 642 of file MSNet.h.
References myHasInternalLinks.
Referenced by closeBuilding(), MSTriggeredRerouter::rerouteParkingArea(), MSPModel_Remote::usingInternalLanes(), MSPModel_Striping::usingInternalLanesStatic(), and MSDevice_Vehroutes::writeOutput().
|
inline |
return whether the network contains walkingareas and crossings
Definition at line 652 of file MSNet.h.
References myHasPedestrianNetwork.
Referenced by MSPModel_Striping::getNextLane().
|
inline |
Returns whether the network has specific vehicle class permissions.
Definition at line 198 of file MSNet.h.
References myHavePermissions.
Referenced by MSRoutingEngine::reroute().
|
inline |
Returns whether persons are simulated.
Definition at line 354 of file MSNet.h.
References myPersonControl.
Referenced by MSDevice_Tripinfo::generateOutputForUnfinished(), MSDevice_Vehroutes::generateOutputForUnfinished(), libsumo::Simulation::getMinExpectedNumber(), GUIApplicationWindow::handleEvent_SimulationStep(), MSVehicle::processNextStop(), and MEVehicle::processStop().
void MSNet::informVehicleStateListener | ( | const SUMOVehicle *const | vehicle, |
VehicleState | to, | ||
const std::string & | info = "" |
||
) |
Informs all added listeners about a vehicle's state change.
[in] | vehicle | The vehicle which changed its state |
[in] | to | The state the vehicle has changed to |
[in] | info | Information regarding the replacement |
Definition at line 882 of file MSNet.cpp.
References myVehicleStateListeners.
Referenced by MSVehicleTransfer::add(), GUIMEVehicleControl::buildVehicle(), MEVehicleControl::buildVehicle(), GUIVehicleControl::buildVehicle(), MSVehicleControl::buildVehicle(), MSVehicleTransfer::checkInsertions(), MSVehicle::executeMove(), MSLane::handleCollisionBetween(), MSVehicle::processNextStop(), MSVehicleControl::removePending(), MSVehicle::replaceRoute(), MEVehicle::replaceRoute(), MSVehicle::resumeFromStopping(), and MSVehicleControl::vehicleDeparted().
|
static |
Place for static initializations of simulation components (called after successful net build)
Definition at line 176 of file MSNet.cpp.
References MSGlobals::gUseMesoSim, and MSVehicle::Influencer::init().
Referenced by MSNet().
|
inline |
|
inlinevirtual |
|
inline |
Definition at line 678 of file MSNet.h.
References myAmInterrupted.
|
inlinevirtual |
return wheter the given logic (or rather it's wrapper) is selected in the GUI
Reimplemented in GUINet.
Definition at line 528 of file MSNet.h.
Referenced by MSTrafficLightLogic::isSelected().
|
inline |
return whether the network was built for lefthand traffic
Definition at line 662 of file MSNet.h.
References myLefthand.
Referenced by MSLaneChanger::changeOpposite(), closeBuilding(), GUIContainerStop::drawGL(), GUIBusStop::drawGL(), GUILane::drawGL(), GUILane::drawLinkNo(), GUILane::drawLinkRules(), GUILane::drawMarkings(), GUILane::drawTLSLinkNo(), MSTransportable::Stage_Trip::getAngle(), MSTransportable::Stage_Waiting::getAngle(), MSTransportable::Stage_Driving::getAngle(), MSVehicle::getBackPosition(), MSPModel_NonInteracting::PState::getPosition(), MSVehicle::getPosition(), GUIBusStop::GUIBusStop(), GUIContainerStop::GUIContainerStop(), GUIParkingArea::GUIParkingArea(), MSParkingArea::MSParkingArea(), MSLink::opened(), and MSVehicle::setBlinkerInformation().
void MSNet::loadRoutes | ( | ) |
loads routes for the next few steps
Definition at line 375 of file MSNet.cpp.
References SUMORouteLoaderControl::loadNext(), myRouteLoaders, and myStep.
Referenced by GUIRunThread::init(), NLBuilder::init(), and simulationStep().
bool MSNet::logSimulationDuration | ( | ) | const |
Returns whether duration shall be logged.
Definition at line 792 of file MSNet.cpp.
References myLogExecutionTime.
Referenced by GUINet::getParameterWindow().
MSDynamicShapeUpdater * MSNet::makeDynamicShapeUpdater | ( | ) |
Creates and returns a dynamic shapes updater.
Definition at line 814 of file MSNet.cpp.
References getInstance(), getShapeContainer(), and myDynamicShapeUpdater.
void MSNet::postSimStepOutput | ( | ) | const |
Prints the statistics of the step at its end.
Called on the end of a simulation step
Definition at line 835 of file MSNet.cpp.
References DELTA_T, MSVehicleControl::getDepartedVehicleNo(), TraCIServer::getInstance(), MSVehicleControl::getRunningVehicleNo(), MSInsertionControl::getWaitingVehicleNo(), gPrecision, myInserter, myLogExecutionTime, mySimStepDuration, myStep, myTraCIStepDuration, myVehicleControl, time2string(), and TS.
Referenced by simulate().
void MSNet::preSimStepOutput | ( | ) | const |
Prints the current step number.
Called on the begin of a simulation step
Definition at line 829 of file MSNet.cpp.
References myStep, and time2string().
Referenced by simulate().
void MSNet::removeVehicleStateListener | ( | VehicleStateListener * | listener | ) |
Removes a vehicle states listener.
[in] | listener | The listener to remove |
Definition at line 873 of file MSNet.cpp.
References myVehicleStateListeners.
Referenced by MSVehicle::Influencer::GapControlState::cleanup().
|
inline |
Sets the current simulation step (used by state loading)
step | the current simulation step |
Definition at line 292 of file MSNet.h.
References myStep.
Referenced by GUIRunThread::init().
|
inline |
Labels the network to contain vehicle class permissions.
Definition at line 204 of file MSNet.h.
References myHavePermissions.
Referenced by NLHandler::addLane().
MSNet::SimulationState MSNet::simulate | ( | SUMOTime | start, |
SUMOTime | stop | ||
) |
Simulates from timestep start to stop.
[in] | start | The begin time step of the simulation |
[in] | stop | The end time step of the simulation |
Recheck return value
What exceptions may occure?
Definition at line 334 of file MSNet.cpp.
References closeSimulation(), getCurrentTimeStep(), TraCIServer::getInstance(), TraCIServer::getLoadArgs(), getStateMessage(), myLogStepNumber, myStep, postSimStepOutput(), preSimStepOutput(), OptionsIO::setArgs(), SIMSTATE_LOADING, SIMSTATE_RUNNING, SIMTIME, simulationState(), simulationStep(), time2string(), VERSION_STRING, TraCIServer::wasClosed(), and WRITE_MESSAGE.
Referenced by main().
MSNet::SimulationState MSNet::simulationState | ( | SUMOTime | stopTime | ) | const |
Called after a simulation step, this method returns the current simulation state.
[in] | stopTime | The time the simulation shall stop at |
Definition at line 578 of file MSNet.cpp.
References MSTransportableControl::abortAnyWaitingForVehicle(), MSVehicleControl::abortWaiting(), MSVehicleControl::getActiveVehicleCount(), TraCIServer::getInstance(), MSInsertionControl::getPendingFlowCount(), MSVehicleControl::getTeleportCount(), MSTransportableControl::hasNonWaiting(), myAmInterrupted, myContainerControl, myEdgeDataEndTime, myInserter, myMaxTeleports, myPersonControl, myStep, myVehicleControl, SIMSTATE_CONNECTION_CLOSED, SIMSTATE_END_STEP_REACHED, SIMSTATE_INTERRUPTED, SIMSTATE_LOADING, SIMSTATE_NO_FURTHER_VEHICLES, SIMSTATE_RUNNING, SIMSTATE_TOO_MANY_TELEPORTS, and TraCIServer::wasClosed().
Referenced by GUIRunThread::makeStep(), and simulate().
void MSNet::simulationStep | ( | ) |
Performs a single simulation step.
Definition at line 457 of file MSNet.cpp.
References MSEdgeControl::changeLanes(), MSTLLogicControl::check2Switch(), MSVehicleTransfer::checkInsertions(), MSTransportableControl::checkWaiting(), DELTA_T, MSEdgeControl::detectCollisions(), MSInsertionControl::determineCandidates(), MSInsertionControl::emitVehicles(), MSEventControl::execute(), MSEdgeControl::executeMovements(), MSGlobals::gCheck4Accidents, SysUtils::getCurrentMillis(), TraCIServer::getInstance(), MSVehicleTransfer::getInstance(), MSVehicleControl::getRunningVehicleNo(), TraCIServer::getTargetTime(), MSGlobals::gMesoNet, MSGlobals::gUseMesoSim, MSTransportableControl::hasTransportables(), loadRoutes(), myBeginOfTimestepEvents, myContainerControl, myEdges, myEndOfTimestepEvents, myInserter, myInsertionEvents, myLogExecutionTime, myLogics, myPersonControl, mySimStepDuration, myStateDumpFiles, myStateDumpPeriod, myStateDumpPrefix, myStateDumpSuffix, myStateDumpTimes, myStep, myTraCIStepDuration, myVehicleControl, myVehiclesMoved, MSEdgeControl::patchActiveLanes(), MSEdgeControl::planMovements(), libsumo::Helper::postProcessRemoteControl(), TraCIServer::processCommandsUntilSimStep(), MSVehicleControl::removePending(), MSStateHandler::saveState(), MSEdgeControl::setJunctionApproaches(), SIMTIME, MELoop::simulate(), STAGE_EVENTS, STAGE_INSERTIONS, STAGE_LANECHANGE, STAGE_MOVEMENTS, time2string(), TraCIServer::wasClosed(), and writeOutput().
Referenced by simulate(), GUINet::simulationStep(), and libsumo::Simulation::step().
bool MSNet::warnOnce | ( | const std::string & | typeAndID | ) |
return whether a warning regarding the given object shall be issued
Definition at line 1080 of file MSNet.cpp.
References myWarnedOnce.
Referenced by MSVehicle::addStop().
void MSNet::writeChargingStationOutput | ( | ) | const |
write charging station output
Definition at line 932 of file MSNet.cpp.
References OutputDevice::getDeviceByOption(), myStoppingPlaces, and SUMO_TAG_CHARGING_STATION.
Referenced by closeSimulation().
void MSNet::writeOutput | ( | ) |
Write netstate, summary and detector output.
Definition at line 664 of file MSNet.cpp.
References OutputDevice::closeTag(), DELTA_T, MSDevice_ToC::generatesOutput(), MSVehicleControl::getArrivedVehicleNo(), MSVehicleControl::getCollisionCount(), MSVehicleControl::getDepartedVehicleNo(), OutputDevice::getDeviceByOption(), MSEdgeControl::getEdges(), MSVehicleControl::getEndedVehicleNo(), MSVehicleControl::getHaltingVehicleNo(), getInstance(), MSDevice_ToC::getInstances(), MSDevice_SSM::getInstances(), OptionsCont::getInt(), MSVehicleControl::getLoadedVehicleNo(), OptionsCont::getOptions(), MSVehicleControl::getRunningVehicleNo(), OptionsCont::getString(), MSVehicleControl::getTeleportCount(), MSVehicleControl::getTotalDepartureDelay(), MSVehicleControl::getTotalTravelTime(), getVehicleControl(), MSVehicleControl::getVehicleMeanSpeeds(), MSInsertionControl::getWaitingVehicleNo(), OptionsCont::isSet(), myDetectorControl, myEdges, myHasElevation, myInserter, myLogExecutionTime, mySimStepDuration, myStep, myVehicleControl, OutputDevice::openTag(), STEPS2TIME, SUMO_ATTR_ID, time2string(), MSDevice_SSM::updateAndWriteOutput(), MSDetectorControl::updateDetectors(), MSVTKExport::write(), MSBatteryExport::write(), MSEmissionExport::write(), MSQueueExport::write(), MSFCDExport::write(), MSFullExport::write(), MSAmitranTrajectories::write(), MSXMLRawOut::write(), OutputDevice::writeAttr(), MSDetectorControl::writeOutput(), and MSDevice_ToC::writeOutput().
Referenced by simulationStep().
void MSNet::writeRailSignalBlocks | ( | ) | const |
write rail signal block output
Definition at line 942 of file MSNet.cpp.
References MSTLLogicControl::getAllLogics(), OutputDevice::getDeviceByOption(), myLogics, and MSRailSignal::writeBlocks().
Referenced by closeSimulation().
|
protected |
whether an interrupt occured
Definition at line 706 of file MSNet.h.
Referenced by interrupt(), isInterrupted(), and simulationState().
|
protected |
Controls events executed at the begin of a time step;.
Definition at line 730 of file MSNet.h.
Referenced by getBeginOfTimestepEvents(), MSNet(), simulationStep(), and ~MSNet().
|
protected |
Controls container building and deletion;.
Definition at line 718 of file MSNet.h.
Referenced by GUINet::getContainerControl(), getContainerControl(), hasContainers(), MSNet(), simulationState(), simulationStep(), and ~MSNet().
|
protected |
Controls detectors;.
Definition at line 728 of file MSNet.h.
Referenced by closeSimulation(), getDetectorControl(), GUINet::initGUIStructures(), MSNet(), writeOutput(), and ~MSNet().
|
protected |
Updater for dynamic shapes that are tracking traffic objects (ensures removal of shape dynamics when the objects are removed)
Definition at line 836 of file MSNet.h.
Referenced by getDynamicShapeUpdater(), and makeDynamicShapeUpdater().
|
protected |
end of loaded edgeData
Definition at line 805 of file MSNet.h.
Referenced by GUINet::loadEdgeData(), and simulationState().
|
protected |
Controls edges, performs vehicle movement;.
Definition at line 720 of file MSNet.h.
Referenced by checkBidiEdges(), checkElevation(), checkWalkingarea(), closeBuilding(), getEdgeControl(), MSNet(), simulationStep(), writeOutput(), and ~MSNet().
|
protected |
The net's knowledge about edge efforts/travel times;.
Definition at line 738 of file MSNet.h.
Referenced by getWeightsStorage(), MSNet(), and ~MSNet().
|
protected |
Controls events executed at the end of a time step;.
Definition at line 732 of file MSNet.h.
Referenced by getEndOfTimestepEvents(), MSNet(), simulationStep(), and ~MSNet().
|
protected |
Whether the network contains bidirectional rail edges.
Definition at line 796 of file MSNet.h.
Referenced by closeBuilding(), and hasBidiEdges().
|
protected |
Whether the network contains elevation data.
Definition at line 790 of file MSNet.h.
Referenced by closeBuilding(), hasElevation(), and writeOutput().
|
protected |
Whether the network contains internal links/lanes/edges.
Definition at line 787 of file MSNet.h.
Referenced by closeBuilding(), and hasInternalLinks().
|
protected |
Whether the network contains pedestrian network elements.
Definition at line 793 of file MSNet.h.
Referenced by closeBuilding(), and hasPedestrianNetwork().
|
protected |
Whether the network contains edges which not all vehicles may pass.
Definition at line 781 of file MSNet.h.
Referenced by hasPermissions(), and setPermissionsFound().
|
protected |
Controls vehicle insertion;.
Definition at line 726 of file MSNet.h.
Referenced by generateStatistics(), getInsertionControl(), MSNet(), postSimStepOutput(), simulationState(), simulationStep(), writeOutput(), and ~MSNet().
|
protected |
Controls insertion events;.
Definition at line 734 of file MSNet.h.
Referenced by getInsertionEvents(), MSNet(), simulationStep(), and ~MSNet().
|
staticprotected |
Unique instance of MSNet.
Definition at line 694 of file MSNet.h.
Referenced by adaptIntermodalRouter(), getInstance(), hasInstance(), MSNet(), and ~MSNet().
|
mutableprotected |
Definition at line 828 of file MSNet.h.
Referenced by getIntermodalRouter(), and ~MSNet().
|
protected |
Controls junctions, realizes right-of-way rules;.
Definition at line 722 of file MSNet.h.
Referenced by closeBuilding(), getJunctionControl(), GUINet::getJunctionPosition(), GUINet::initGUIStructures(), MSNet(), and ~MSNet().
|
mutableprotected |
|
protected |
Whether the network was built for left-hand traffic.
Definition at line 799 of file MSNet.h.
Referenced by closeBuilding(), and lefthand().
|
protected |
Information whether the simulation duration shall be logged.
Definition at line 747 of file MSNet.h.
Referenced by closeSimulation(), logSimulationDuration(), MSNet(), postSimStepOutput(), simulationStep(), and writeOutput().
|
protected |
Controls tls logics, realizes waiting on tls rules;.
Definition at line 724 of file MSNet.h.
Referenced by closeBuilding(), GUINet::createTLWrapper(), GUINet::getLinkTLID(), GUINet::getLinkTLIndex(), getTLSControl(), MSNet(), simulationStep(), writeRailSignalBlocks(), and ~MSNet().
|
protected |
Information whether the number of the simulation step shall be logged.
Definition at line 750 of file MSNet.h.
Referenced by MSNet(), and simulate().
|
protected |
Maximum number of teleports.
Definition at line 703 of file MSNet.h.
Referenced by MSNet(), and simulationState().
|
mutableprotected |
Definition at line 827 of file MSNet.h.
Referenced by getPedestrianRouter(), and ~MSNet().
|
protected |
Controls person building and deletion;.
Definition at line 716 of file MSNet.h.
Referenced by generateStatistics(), GUINet::getParameterWindow(), GUINet::getPersonControl(), getPersonControl(), hasPersons(), MSNet(), simulationState(), simulationStep(), and ~MSNet().
|
protected |
The vehicle class specific speed restrictions.
Definition at line 784 of file MSNet.h.
Referenced by addRestriction(), and getRestrictions().
|
protected |
Route loader for dynamic loading of routes.
Definition at line 697 of file MSNet.h.
Referenced by closeBuilding(), loadRoutes(), MSNet(), and ~MSNet().
|
mutableprotected |
Definition at line 826 of file MSNet.h.
Referenced by getRouterEffort(), and ~MSNet().
|
mutableprotected |
Definition at line 825 of file MSNet.h.
Referenced by getRouterTT(), and ~MSNet().
|
protected |
A container for geometrical shapes;.
Definition at line 736 of file MSNet.h.
Referenced by getShapeContainer(), MSNet(), and ~MSNet().
|
protected |
The overall simulation duration.
Definition at line 756 of file MSNet.h.
Referenced by closeBuilding(), and generateStatistics().
|
protected |
Definition at line 753 of file MSNet.h.
Referenced by postSimStepOutput(), simulationStep(), and writeOutput().
|
protected |
The names for the state files.
Definition at line 770 of file MSNet.h.
Referenced by closeBuilding(), and simulationStep().
|
protected |
The period for writing state.
Definition at line 772 of file MSNet.h.
Referenced by closeBuilding(), and simulationStep().
|
protected |
name components for periodic state
Definition at line 774 of file MSNet.h.
Referenced by closeBuilding(), and simulationStep().
|
protected |
Definition at line 775 of file MSNet.h.
Referenced by closeBuilding(), and simulationStep().
|
protected |
Times at which a state shall be written.
Definition at line 768 of file MSNet.h.
Referenced by closeBuilding(), and simulationStep().
|
protected |
Current time step.
Definition at line 700 of file MSNet.h.
Referenced by closeSimulation(), generateStatistics(), getCurrentTimeStep(), loadRoutes(), MSNet(), postSimStepOutput(), preSimStepOutput(), setCurrentTimeStep(), simulate(), simulationState(), simulationStep(), and writeOutput().
|
protected |
Dictionary of bus / container stops.
Definition at line 808 of file MSNet.h.
Referenced by adaptIntermodalRouter(), addStoppingPlace(), getStoppingPlace(), getStoppingPlaceID(), getStoppingPlaces(), and writeChargingStationOutput().
|
protected |
The last simulation step duration.
Definition at line 753 of file MSNet.h.
Referenced by postSimStepOutput(), and simulationStep().
|
protected |
Controls vehicle building and deletion;.
Definition at line 714 of file MSNet.h.
Referenced by generateStatistics(), GUINet::getGUIMEVehicleControl(), GUINet::getGUIVehicleControl(), getVehicleControl(), MSNet(), postSimStepOutput(), simulationState(), simulationStep(), GUINet::vehicleExists(), writeOutput(), and ~MSNet().
|
protected |
The overall number of vehicle movements.
Definition at line 759 of file MSNet.h.
Referenced by generateStatistics(), GUINet::getMeanUPS(), and simulationStep().
|
protected |
Container for vehicle state listener.
Definition at line 811 of file MSNet.h.
Referenced by addVehicleStateListener(), informVehicleStateListener(), and removeVehicleStateListener().
|
protected |
the network version
Definition at line 802 of file MSNet.h.
Referenced by closeBuilding(), getNetworkVersion(), and GUINet::getParameterWindow().
|
protected |
container to record warnings that shall only be issued once
Definition at line 819 of file MSNet.h.
Referenced by warnOnce().
|
staticprotected |
string constants for simstep stages
Definition at line 840 of file MSNet.h.
Referenced by simulationStep().
|
staticprotected |
Definition at line 843 of file MSNet.h.
Referenced by simulationStep().
|
staticprotected |
Definition at line 842 of file MSNet.h.
Referenced by simulationStep().
|
staticprotected |
Definition at line 841 of file MSNet.h.
Referenced by simulationStep().