Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
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.
 

Private Attributes

SUMOTime myMemorySize
 the maximal memory to store
 
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 182 of file MSVehicle.cpp.

Member Function Documentation

◆ cumulatedWaitingTime()

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

Definition at line 186 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 240 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 208 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 251 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: