SUMO - Simulation of Urban MObility
|
A storage for edge travel times and efforts. More...
#include <MSEdgeWeightsStorage.h>
Public Member Functions | |
void | addEffort (const MSEdge *const e, SUMOReal begin, SUMOReal end, SUMOReal value) |
Adds an effort information for an edge and a time span. | |
void | addTravelTime (const MSEdge *const e, SUMOReal begin, SUMOReal end, SUMOReal value) |
Adds a travel time information for an edge and a time span. | |
bool | knowsEffort (const MSEdge *const e) const |
Returns the information whether any effort is known for the given edge. | |
bool | knowsTravelTime (const MSEdge *const e) const |
Returns the information whether any travel time is known for the given edge. | |
MSEdgeWeightsStorage () | |
Constructor. | |
void | removeEffort (const MSEdge *const e) |
Removes the effort information for an edge. | |
void | removeTravelTime (const MSEdge *const e) |
Removes the travel time information for an edge. | |
bool | retrieveExistingEffort (const MSEdge *const e, const SUMOVehicle *const v, SUMOReal t, SUMOReal &value) const |
Returns an effort for an edge and time if stored. | |
bool | retrieveExistingTravelTime (const MSEdge *const e, const SUMOVehicle *const v, SUMOReal t, SUMOReal &value) const |
Returns a travel time for an edge and time if stored. | |
~MSEdgeWeightsStorage () | |
Destructor. | |
Private Member Functions | |
MSEdgeWeightsStorage (const MSEdgeWeightsStorage &) | |
Invalidated copy constructor. | |
MSEdgeWeightsStorage & | operator= (const MSEdgeWeightsStorage &) |
Invalidated assignment operator. | |
Private Attributes | |
std::map< MSEdge *, ValueTimeLine< SUMOReal > > | myEfforts |
A map of edge->time->effort. | |
std::map< MSEdge *, ValueTimeLine< SUMOReal > > | myTravelTimes |
A map of edge->time->travel time. |
A storage for edge travel times and efforts.
Definition at line 52 of file MSEdgeWeightsStorage.h.
Constructor.
Definition at line 42 of file MSEdgeWeightsStorage.cpp.
Destructor.
Definition at line 46 of file MSEdgeWeightsStorage.cpp.
MSEdgeWeightsStorage::MSEdgeWeightsStorage | ( | const MSEdgeWeightsStorage & | ) | [private] |
Invalidated copy constructor.
void MSEdgeWeightsStorage::addEffort | ( | const MSEdge *const | e, |
SUMOReal | begin, | ||
SUMOReal | end, | ||
SUMOReal | value | ||
) |
Adds an effort information for an edge and a time span.
[in] | e | The described edge |
[in] | begin | The begin of the described time span |
[in] | end | The end of the described time span |
[in] | value | Theeffort value for this edge and time span |
Definition at line 96 of file MSEdgeWeightsStorage.cpp.
References myEfforts.
Referenced by NLBuilder::EdgeFloatTimeLineRetriever_EdgeEffort::addEdgeWeight(), and TraCIServerAPI_Edge::processSet().
void MSEdgeWeightsStorage::addTravelTime | ( | const MSEdge *const | e, |
SUMOReal | begin, | ||
SUMOReal | end, | ||
SUMOReal | value | ||
) |
Adds a travel time information for an edge and a time span.
[in] | e | The described edge |
[in] | begin | The begin of the described time span |
[in] | end | The end of the described time span |
[in] | value | The travel time value for this edge and time span |
Definition at line 83 of file MSEdgeWeightsStorage.cpp.
References myTravelTimes.
Referenced by NLBuilder::EdgeFloatTimeLineRetriever_EdgeTravelTime::addEdgeWeight(), and TraCIServerAPI_Edge::processSet().
bool MSEdgeWeightsStorage::knowsEffort | ( | const MSEdge *const | e | ) | const |
Returns the information whether any effort is known for the given edge.
[in] | e | The investigated edge |
Definition at line 133 of file MSEdgeWeightsStorage.cpp.
References myEfforts.
bool MSEdgeWeightsStorage::knowsTravelTime | ( | const MSEdge *const | e | ) | const |
Returns the information whether any travel time is known for the given edge.
[in] | e | The investigated edge |
Definition at line 127 of file MSEdgeWeightsStorage.cpp.
References myTravelTimes.
Referenced by GUILaneWrapper::getColorValue().
MSEdgeWeightsStorage& MSEdgeWeightsStorage::operator= | ( | const MSEdgeWeightsStorage & | ) | [private] |
Invalidated assignment operator.
void MSEdgeWeightsStorage::removeEffort | ( | const MSEdge *const | e | ) |
Removes the effort information for an edge.
[in] | e | The described edge |
Definition at line 118 of file MSEdgeWeightsStorage.cpp.
References myEfforts.
void MSEdgeWeightsStorage::removeTravelTime | ( | const MSEdge *const | e | ) |
Removes the travel time information for an edge.
[in] | e | The described edge |
Definition at line 109 of file MSEdgeWeightsStorage.cpp.
References myTravelTimes.
bool MSEdgeWeightsStorage::retrieveExistingEffort | ( | const MSEdge *const | e, |
const SUMOVehicle *const | v, | ||
SUMOReal | t, | ||
SUMOReal & | value | ||
) | const |
Returns an effort for an edge and time if stored.
[in] | e | The edge for which the effort shall be retrieved |
[in] | v | Unused |
[in] | t | The time for which the effort shall be retrieved |
[in] | value | The value if the requested edge/time is described |
Definition at line 67 of file MSEdgeWeightsStorage.cpp.
References ValueTimeLine< T >::describesTime(), ValueTimeLine< T >::getValue(), and myEfforts.
Referenced by MSNet::EdgeWeightsProxi::getEffort(), and TraCIServerAPI_Vehicle::processGet().
bool MSEdgeWeightsStorage::retrieveExistingTravelTime | ( | const MSEdge *const | e, |
const SUMOVehicle *const | v, | ||
SUMOReal | t, | ||
SUMOReal & | value | ||
) | const |
Returns a travel time for an edge and time if stored.
[in] | e | The edge for which the travel time shall be retrieved |
[in] | v | Unused |
[in] | t | The time for which the travel time shall be retrieved |
[in] | value | The value if the requested edge/time is described |
Definition at line 51 of file MSEdgeWeightsStorage.cpp.
References ValueTimeLine< T >::describesTime(), ValueTimeLine< T >::getValue(), and myTravelTimes.
Referenced by GUILaneWrapper::getColorValue(), and TraCIServerAPI_Vehicle::processGet().
std::map<MSEdge*, ValueTimeLine<SUMOReal> > MSEdgeWeightsStorage::myEfforts [private] |
A map of edge->time->effort.
Definition at line 133 of file MSEdgeWeightsStorage.h.
Referenced by addEffort(), knowsEffort(), removeEffort(), and retrieveExistingEffort().
std::map<MSEdge*, ValueTimeLine<SUMOReal> > MSEdgeWeightsStorage::myTravelTimes [private] |
A map of edge->time->travel time.
Definition at line 130 of file MSEdgeWeightsStorage.h.
Referenced by addTravelTime(), knowsTravelTime(), removeTravelTime(), and retrieveExistingTravelTime().