SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MSNet::EdgeWeightsProxi Class Reference

A proxi for edge weights known by a vehicle/known globally. More...

#include <MSNet.h>

Public Member Functions

 EdgeWeightsProxi (const MSEdgeWeightsStorage &vehKnowledge, const MSEdgeWeightsStorage &netKnowledge)
 Constructor.
SUMOReal getEffort (const MSEdge *const e, const SUMOVehicle *const v, SUMOReal t) const
 Returns the effort to pass an edge.
SUMOReal getTravelTime (const MSEdge *const e, const SUMOVehicle *const v, SUMOReal t) const
 Returns the travel time to pass an edge.
 ~EdgeWeightsProxi ()
 Destructor.

Private Member Functions

EdgeWeightsProxioperator= (const EdgeWeightsProxi &)

Private Attributes

const MSEdgeWeightsStoragemyNetKnowledge
 The global knownledge.
const MSEdgeWeightsStoragemyVehicleKnowledge
 The vehicle's knownledge.

Detailed Description

A proxi for edge weights known by a vehicle/known globally.

Both getter methods try to return the vehicle's knowledge about the edge/time, first. If not existing,they try to retrieve it from the global knowledge. If not existing, the travel time retrieval method returns the edges' length divided by the maximum speed (information from the first lane is used). The default value for the effort is 0.

See Also
MSEdgeWeightsStorage

Definition at line 488 of file MSNet.h.

Constructor & Destructor Documentation

MSNet::EdgeWeightsProxi::EdgeWeightsProxi ( const MSEdgeWeightsStorage vehKnowledge,
const MSEdgeWeightsStorage netKnowledge 
)
inline

Constructor.

Parameters
[in]vehKnowledgeThe vehicle's edge weights knowledge
[in]netKnowledgeThe global edge weights knowledge

Definition at line 494 of file MSNet.h.

MSNet::EdgeWeightsProxi::~EdgeWeightsProxi ( )
inline

Destructor.

Definition at line 500 of file MSNet.h.

Member Function Documentation

SUMOReal MSNet::EdgeWeightsProxi::getEffort ( const MSEdge *const  e,
const SUMOVehicle *const  v,
SUMOReal  t 
) const

Returns the effort to pass an edge.

Parameters
[in]eThe edge for which the effort to be passed shall be returned
[in]vThe vehicle that is rerouted
[in]tThe time for which the effort shall be returned [s]
Returns
The effort (abstract) for an edge
See Also
DijkstraRouterTT_ByProxi

Definition at line 113 of file MSNet.cpp.

References myNetKnowledge, myVehicleKnowledge, MSEdgeWeightsStorage::retrieveExistingEffort(), and SUMOReal.

Referenced by TraCIServerAPI_Vehicle::processSet().

SUMOReal MSNet::EdgeWeightsProxi::getTravelTime ( const MSEdge *const  e,
const SUMOVehicle *const  v,
SUMOReal  t 
) const

Returns the travel time to pass an edge.

Parameters
[in]eThe edge for which the travel time to be passed shall be returned
[in]vThe vehicle that is rerouted
[in]tThe time for which the travel time shall be returned [s]
Returns
The travel time for an edge
See Also
DijkstraRouterTT_ByProxi

Definition at line 128 of file MSNet.cpp.

References MSEdge::getLanes(), MSLane::getLength(), MSLane::getMaxSpeed(), and SUMOReal.

Referenced by MSTriggeredRerouter::notifyEnter(), and TraCIServerAPI_Vehicle::processSet().

EdgeWeightsProxi& MSNet::EdgeWeightsProxi::operator= ( const EdgeWeightsProxi )
private

Field Documentation

const MSEdgeWeightsStorage& MSNet::EdgeWeightsProxi::myNetKnowledge
private

The global knownledge.

Definition at line 530 of file MSNet.h.

Referenced by getEffort().

const MSEdgeWeightsStorage& MSNet::EdgeWeightsProxi::myVehicleKnowledge
private

The vehicle's knownledge.

Definition at line 527 of file MSNet.h.

Referenced by getEffort().


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