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

Export the queueing length in front of a junction (very experimental!) More...

#include <MSQueueExport.h>

Static Public Member Functions

static void write (OutputDevice &of, SUMOTime timestep)
 Export the queueing length in front of a junction (very experimental!)
 

Private Member Functions

 MSQueueExport (const MSQueueExport &)
 Invalidated copy constructor.
 
MSQueueExportoperator= (const MSQueueExport &)
 Invalidated assignment operator.
 

Static Private Member Functions

static void writeEdge (OutputDevice &of)
 Iterates through all the edges and extract the lanes.
 
static void writeLane (OutputDevice &of, const MSLane &lane)
 Iterates through the lanes and check for available vehicle queues.
 

Detailed Description

Export the queueing length in front of a junction (very experimental!)

The class offers a static method, which writes the actual queueing length of the network into the given OutputDevice.

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

Definition at line 47 of file MSQueueExport.h.

Constructor & Destructor Documentation

◆ MSQueueExport()

MSQueueExport::MSQueueExport ( const MSQueueExport )
private

Invalidated copy constructor.

Member Function Documentation

◆ operator=()

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

Invalidated assignment operator.

◆ write()

void MSQueueExport::write ( OutputDevice of,
SUMOTime  timestep 
)
static

Export the queueing length in front of a junction (very experimental!)

Opens the current time step, goes through the lanes check for a traffic jam in front of a junction

Parameters
[in]ofThe output device to use
[in]timestepThe current time step
Exceptions
IOErrorIf an error on writing occurs (!!! not yet implemented)

Definition at line 40 of file MSQueueExport.cpp.

References OutputDevice::closeTag(), OptionsCont::getOptions(), OutputDevice::openTag(), string2time(), time2string(), OutputDevice::writeAttr(), and writeEdge().

Referenced by MSNet::writeOutput().

Here is the caller graph for this function:

◆ writeEdge()

void MSQueueExport::writeEdge ( OutputDevice of)
staticprivate

Iterates through all the edges and extract the lanes.

Definition at line 53 of file MSQueueExport.cpp.

References OutputDevice::closeTag(), MSNet::getEdgeControl(), MSEdgeControl::getEdges(), MSNet::getInstance(), MSEdge::getLanes(), OutputDevice::openTag(), and writeLane().

Referenced by write().

Here is the caller graph for this function:

◆ writeLane()

void MSQueueExport::writeLane ( OutputDevice of,
const MSLane lane 
)
staticprivate

Iterates through the lanes and check for available vehicle queues.

Definition at line 69 of file MSQueueExport.cpp.

References OutputDevice::closeTag(), MSLane::empty(), Named::getID(), MSVehicle::getLane(), MSLane::getLength(), MSVehicleType::getLength(), MSVehicle::getPositionOnLane(), MSVehicle::getSpeed(), MSBaseVehicle::getVehicleType(), MSBaseVehicle::getWaitingSeconds(), MSVehicle::isOnRoad(), MAX2(), MSLane::myVehicles, OutputDevice::openTag(), and OutputDevice::writeAttr().

Referenced by writeEdge().

Here is the caller graph for this function:

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