Eclipse SUMO - Simulation of Urban MObility
|
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 |
Stores the waiting intervals over the previous seconds (memory is to be specified in ms.).
Definition at line 162 of file MSVehicle.h.
MSVehicle::WaitingTimeCollector::WaitingTimeCollector | ( | SUMOTime | memory = MSGlobals::gWaitingTimeMemory | ) |
Constructor.
Definition at line 182 of file MSVehicle.cpp.
Definition at line 186 of file MSVehicle.cpp.
Referenced by MSVehicle::getWaitingTime().
const std::string MSVehicle::WaitingTimeCollector::getState | ( | ) | const |
Definition at line 240 of file MSVehicle.cpp.
Referenced by MSVehicle::saveState().
void MSVehicle::WaitingTimeCollector::passTime | ( | SUMOTime | dt, |
bool | waiting | ||
) |
Definition at line 208 of file MSVehicle.cpp.
Referenced by MSVehicle::updateWaitingTime().
void MSVehicle::WaitingTimeCollector::setState | ( | const std::string & | state | ) |
Definition at line 251 of file MSVehicle.cpp.
Referenced by MSVehicle::loadState().
|
private |
the maximal memory to store
Definition at line 179 of file MSVehicle.h.
|
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.