![]() |
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 |
SUMOTime | getMemorySize () const |
const waitingIntervalList & | getWaitingIntervals () const |
bool | operator!= (const WaitingTimeCollector &wt) const |
Operator !=. More... | |
WaitingTimeCollector & | operator= (const WaitingTimeCollector &wt) |
Assignment operator. More... | |
WaitingTimeCollector & | operator= (SUMOTime t) |
Assignment operator (in place!) More... | |
void | passTime (SUMOTime dt, bool waiting) |
WaitingTimeCollector (SUMOTime memory=MSGlobals::gWaitingTimeMemory) | |
Constructor. More... | |
WaitingTimeCollector (const WaitingTimeCollector &wt) | |
Copy constructor. More... | |
Private Types | |
typedef std::list< std::pair< SUMOTime, SUMOTime > > | waitingIntervalList |
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... | |
waitingIntervalList | myWaitingIntervals |
Friends | |
class | MSVehicle |
Stores the waiting intervals over the previous seconds (memory is to be specified in ms.).
Definition at line 168 of file MSVehicle.h.
|
private |
Definition at line 171 of file MSVehicle.h.
MSVehicle::WaitingTimeCollector::WaitingTimeCollector | ( | SUMOTime | memory = MSGlobals::gWaitingTimeMemory | ) |
Constructor.
Definition at line 155 of file MSVehicle.cpp.
MSVehicle::WaitingTimeCollector::WaitingTimeCollector | ( | const WaitingTimeCollector & | wt | ) |
Copy constructor.
Definition at line 157 of file MSVehicle.cpp.
|
private |
append an amount of dt millisecs to the stored waiting times
Definition at line 174 of file MSVehicle.cpp.
References myMemorySize, and myWaitingIntervals.
Referenced by MSVehicle::getAccumulatedWaitingTime().
|
inline |
Definition at line 196 of file MSVehicle.h.
Referenced by operator=().
|
inline |
Definition at line 201 of file MSVehicle.h.
Referenced by operator=().
bool MSVehicle::WaitingTimeCollector::operator!= | ( | const WaitingTimeCollector & | wt | ) | const |
Operator !=.
MSVehicle::WaitingTimeCollector & MSVehicle::WaitingTimeCollector::operator= | ( | const WaitingTimeCollector & | wt | ) |
Assignment operator.
Definition at line 160 of file MSVehicle.cpp.
References getMemorySize(), getWaitingIntervals(), myMemorySize, and myWaitingIntervals.
MSVehicle::WaitingTimeCollector & MSVehicle::WaitingTimeCollector::operator= | ( | SUMOTime | t | ) |
Assignment operator (in place!)
Definition at line 167 of file MSVehicle.cpp.
References myWaitingIntervals, and passTime().
void MSVehicle::WaitingTimeCollector::passTime | ( | SUMOTime | dt, |
bool | waiting | ||
) |
Definition at line 195 of file MSVehicle.cpp.
References myMemorySize, and myWaitingIntervals.
Referenced by MSVehicle::executeMove(), and operator=().
|
friend |
Definition at line 169 of file MSVehicle.h.
|
private |
the maximal memory to store
Definition at line 207 of file MSVehicle.h.
Referenced by cumulatedWaitingTime(), operator=(), and passTime().
|
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 212 of file MSVehicle.h.
Referenced by cumulatedWaitingTime(), operator=(), and passTime().