Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
MSStopOut Class Reference

Realises dumping the complete network state. More...

#include <MSStopOut.h>

Collaboration diagram for MSStopOut:
[legend]

Data Structures

struct  StopInfo
 

Public Member Functions

void generateOutputForUnfinished ()
 generate output for vehicles which are still stopped at simulation end
 
void loadedContainers (const SUMOVehicle *veh, int n)
 
void loadedPersons (const SUMOVehicle *veh, int n)
 
 MSStopOut (OutputDevice &dev)
 constructor.
 
void stopEnded (const SUMOVehicle *veh, const SUMOVehicleParameter::Stop &stop, const std::string &laneOrEdgeID, bool simEnd=false)
 
void stopStarted (const SUMOVehicle *veh, int numPersons, int numContainers, SUMOTime time)
 
void unloadedContainers (const SUMOVehicle *veh, int n)
 
void unloadedPersons (const SUMOVehicle *veh, int n)
 
virtual ~MSStopOut ()
 Destructor.
 

Static Public Member Functions

static bool active ()
 
static void cleanup ()
 
static MSStopOutgetInstance ()
 
static void init ()
 Static intialization.
 

Private Member Functions

 MSStopOut (const MSStopOut &)
 Invalidated copy constructor.
 
MSStopOutoperator= (const MSStopOut &)
 Invalidated assignment operator.
 

Private Attributes

OutputDevicemyDevice
 
std::map< const SUMOVehicle *, StopInfo, ComparatorNumericalIdLessmyStopped
 

Static Private Attributes

static MSStopOutmyInstance = nullptr
 

Detailed Description

Realises dumping the complete network state.

The class offers a static method, which writes the complete dump of the given network into the given OutputDevice.

Todo:
consider error-handling on write (using IOError)

Definition at line 47 of file MSStopOut.h.

Constructor & Destructor Documentation

◆ MSStopOut() [1/2]

MSStopOut::MSStopOut ( OutputDevice dev)

constructor.

Definition at line 58 of file MSStopOut.cpp.

◆ ~MSStopOut()

MSStopOut::~MSStopOut ( )
virtual

Destructor.

Definition at line 62 of file MSStopOut.cpp.

◆ MSStopOut() [2/2]

MSStopOut::MSStopOut ( const MSStopOut )
private

Invalidated copy constructor.

Member Function Documentation

◆ active()

static bool MSStopOut::active ( )
inlinestatic

Definition at line 54 of file MSStopOut.h.

References myInstance.

Referenced by MSDevice_Transportable::addTransportable(), MEVehicle::checkStop(), MSNet::closeSimulation(), MSVehicle::leaveLane(), MSDevice_Transportable::notifyMove(), MSVehicle::processNextStop(), MEVehicle::processStop(), MSDevice_Transportable::removeTransportable(), MEVehicle::resumeFromStopping(), and MSVehicle::resumeFromStopping().

Here is the caller graph for this function:

◆ cleanup()

void MSStopOut::cleanup ( )
static

Definition at line 50 of file MSStopOut.cpp.

References myInstance.

Referenced by MSNet::clearAll().

Here is the caller graph for this function:

◆ generateOutputForUnfinished()

void MSStopOut::generateOutputForUnfinished ( )

generate output for vehicles which are still stopped at simulation end

Definition at line 194 of file MSStopOut.cpp.

References SUMOTrafficObject::getEdge(), Named::getID(), Named::getIDSecure(), SUMOTrafficObject::getLane(), SUMOVehicle::getNextStopParameter(), MSGlobals::gUseMesoSim, myStopped, and stopEnded().

Referenced by MSNet::closeSimulation().

Here is the caller graph for this function:

◆ getInstance()

static MSStopOut * MSStopOut::getInstance ( )
inlinestatic

Definition at line 60 of file MSStopOut.h.

References myInstance.

Referenced by MSDevice_Transportable::addTransportable(), MEVehicle::checkStop(), MSNet::closeSimulation(), MSVehicle::leaveLane(), MSDevice_Transportable::notifyMove(), MSVehicle::processNextStop(), MEVehicle::processStop(), MSDevice_Transportable::removeTransportable(), MEVehicle::resumeFromStopping(), and MSVehicle::resumeFromStopping().

Here is the caller graph for this function:

◆ init()

void MSStopOut::init ( )
static

Static intialization.

Definition at line 43 of file MSStopOut.cpp.

References OutputDevice::getDeviceByOption(), OptionsCont::getOptions(), and myInstance.

Referenced by MSFrame::buildStreams().

Here is the caller graph for this function:

◆ loadedContainers()

void MSStopOut::loadedContainers ( const SUMOVehicle veh,
int  n 
)

Definition at line 99 of file MSStopOut.cpp.

References SUMOTrafficObject::getEdge(), Named::getID(), SUMOVehicle::hasDeparted(), myStopped, SIMSTEP, time2string(), TL, and WRITE_WARNINGF.

Referenced by MSDevice_Transportable::addTransportable().

Here is the caller graph for this function:

◆ loadedPersons()

void MSStopOut::loadedPersons ( const SUMOVehicle veh,
int  n 
)

Definition at line 76 of file MSStopOut.cpp.

References SUMOTrafficObject::getEdge(), Named::getID(), SUMOVehicle::hasDeparted(), myStopped, SIMSTEP, time2string(), TL, and WRITE_WARNINGF.

Referenced by MSDevice_Transportable::addTransportable().

Here is the caller graph for this function:

◆ operator=()

MSStopOut & MSStopOut::operator= ( const MSStopOut )
private

Invalidated assignment operator.

◆ stopEnded()

void MSStopOut::stopEnded ( const SUMOVehicle veh,
const SUMOVehicleParameter::Stop stop,
const std::string &  laneOrEdgeID,
bool  simEnd = false 
)

Definition at line 122 of file MSStopOut.cpp.

References SUMOVehicleParameter::Stop::arrival, SUMOVehicleParameter::Stop::busstop, SUMOVehicleParameter::Stop::chargingStation, OutputDevice::closeTag(), SUMOVehicleParameter::Stop::containerstop, SUMOVehicleParameter::Stop::ended, SUMOTrafficObject::getEdge(), MSVehicleType::getID(), Named::getID(), SUMOTrafficObject::getPositionOnLane(), SUMOTrafficObject::getVehicleType(), MSGlobals::gUseMesoSim, MSGlobals::gUseStopEnded, MSStopOut::StopInfo::initialNumContainers, MSStopOut::StopInfo::initialNumPersons, SUMOVehicleParameter::Stop::line, MSStopOut::StopInfo::loadedContainers, MSStopOut::StopInfo::loadedPersons, myDevice, myStopped, OutputDevice::openTag(), SUMOVehicleParameter::Stop::overheadWireSegment, SUMOVehicleParameter::Stop::parking, SUMOVehicleParameter::Stop::parkingarea, SIMSTEP, SUMOVehicleParameter::Stop::split, SUMOVehicleParameter::Stop::started, STEPS2TIME, SUMO_ATTR_ARRIVALDELAY, SUMO_ATTR_BUS_STOP, SUMO_ATTR_CHARGING_STATION, SUMO_ATTR_CONTAINER_STOP, SUMO_ATTR_EDGE, SUMO_ATTR_ENDED, SUMO_ATTR_ID, SUMO_ATTR_LANE, SUMO_ATTR_LINE, SUMO_ATTR_OVERHEAD_WIRE_SEGMENT, SUMO_ATTR_PARKING, SUMO_ATTR_PARKING_AREA, SUMO_ATTR_POSITION, SUMO_ATTR_SPLIT, SUMO_ATTR_STARTED, SUMO_ATTR_TRIP_ID, SUMO_ATTR_TYPE, SUMO_ATTR_USED_ENDED, time2string(), TL, SUMOVehicleParameter::Stop::tripId, MSStopOut::StopInfo::unloadedContainers, MSStopOut::StopInfo::unloadedPersons, SUMOVehicleParameter::Stop::until, WRITE_WARNINGF, and OutputDevice::writeAttr().

Referenced by generateOutputForUnfinished(), MEVehicle::resumeFromStopping(), and MSVehicle::resumeFromStopping().

Here is the caller graph for this function:

◆ stopStarted()

void MSStopOut::stopStarted ( const SUMOVehicle veh,
int  numPersons,
int  numContainers,
SUMOTime  time 
)

Definition at line 66 of file MSStopOut.cpp.

References SUMOTrafficObject::getEdge(), Named::getID(), myStopped, time2string(), TL, and WRITE_WARNINGF.

Referenced by MEVehicle::checkStop(), MSVehicle::leaveLane(), MSVehicle::processNextStop(), and MEVehicle::processStop().

Here is the caller graph for this function:

◆ unloadedContainers()

void MSStopOut::unloadedContainers ( const SUMOVehicle veh,
int  n 
)

Definition at line 112 of file MSStopOut.cpp.

References SUMOTrafficObject::getEdge(), Named::getID(), myStopped, SIMSTEP, time2string(), TL, and WRITE_WARNINGF.

Referenced by MSDevice_Transportable::notifyMove(), and MSDevice_Transportable::removeTransportable().

Here is the caller graph for this function:

◆ unloadedPersons()

void MSStopOut::unloadedPersons ( const SUMOVehicle veh,
int  n 
)

Definition at line 89 of file MSStopOut.cpp.

References SUMOTrafficObject::getEdge(), Named::getID(), myStopped, SIMSTEP, time2string(), TL, and WRITE_WARNINGF.

Referenced by MSDevice_Transportable::notifyMove(), and MSDevice_Transportable::removeTransportable().

Here is the caller graph for this function:

Field Documentation

◆ myDevice

OutputDevice& MSStopOut::myDevice
private

Definition at line 105 of file MSStopOut.h.

Referenced by stopEnded().

◆ myInstance

MSStopOut * MSStopOut::myInstance = nullptr
staticprivate

Definition at line 107 of file MSStopOut.h.

Referenced by active(), cleanup(), getInstance(), and init().

◆ myStopped


The documentation for this class was generated from the following files: