Eclipse SUMO - Simulation of Urban MObility
MSVehicle::WaitingTimeCollector Class Reference

Stores the waiting intervals over the previous seconds (memory is to be specified in ms.). More...

#include <MSVehicle.h>

Public Member Functions

SUMOTime cumulatedWaitingTime (SUMOTime memory=-1) const
 
const std::string getState () const
 
void passTime (SUMOTime dt, bool waiting)
 
void setState (const std::string &state)
 
 WaitingTimeCollector (SUMOTime memory=MSGlobals::gWaitingTimeMemory)
 Constructor. More...
 

Private Member Functions

void appendWaitingTime (SUMOTime dt)
 append an amount of dt millisecs to the stored waiting times More...
 

Private Attributes

SUMOTime myMemorySize
 the maximal memory to store More...
 
std::deque< std::pair< SUMOTime, SUMOTime > > myWaitingIntervals
 

Detailed Description

Stores the waiting intervals over the previous seconds (memory is to be specified in ms.).

Definition at line 162 of file MSVehicle.h.

Constructor & Destructor Documentation

◆ WaitingTimeCollector()

MSVehicle::WaitingTimeCollector::WaitingTimeCollector ( SUMOTime  memory = MSGlobals::gWaitingTimeMemory)

Constructor.

Definition at line 179 of file MSVehicle.cpp.

Member Function Documentation

◆ appendWaitingTime()

void MSVehicle::WaitingTimeCollector::appendWaitingTime ( SUMOTime  dt)
private

append an amount of dt millisecs to the stored waiting times

◆ cumulatedWaitingTime()

SUMOTime MSVehicle::WaitingTimeCollector::cumulatedWaitingTime ( SUMOTime  memory = -1) const

Definition at line 183 of file MSVehicle.cpp.

Referenced by MSVehicle::getWaitingTime().

Here is the caller graph for this function:

◆ getState()

const std::string MSVehicle::WaitingTimeCollector::getState ( ) const

Definition at line 237 of file MSVehicle.cpp.

Referenced by MSVehicle::saveState().

Here is the caller graph for this function:

◆ passTime()

void MSVehicle::WaitingTimeCollector::passTime ( SUMOTime  dt,
bool  waiting 
)

Definition at line 205 of file MSVehicle.cpp.

Referenced by MSVehicle::updateWaitingTime().

Here is the caller graph for this function:

◆ setState()

void MSVehicle::WaitingTimeCollector::setState ( const std::string &  state)

Definition at line 248 of file MSVehicle.cpp.

Referenced by MSVehicle::loadState().

Here is the caller graph for this function:

Field Documentation

◆ myMemorySize

SUMOTime MSVehicle::WaitingTimeCollector::myMemorySize
private

the maximal memory to store

Definition at line 179 of file MSVehicle.h.

◆ myWaitingIntervals

std::deque<std::pair<SUMOTime, SUMOTime> > MSVehicle::WaitingTimeCollector::myWaitingIntervals
private

the stored waiting intervals within the last memory milliseconds If the current (ongoing) waiting interval has begun at time t - dt (where t is the current time) then waitingIntervalList[0]->first = 0., waitingIntervalList[0]->second = dt

Definition at line 184 of file MSVehicle.h.


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