Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
RouteCostCalculator< R, E, V > Class Template Referenceabstract

Abstract base class providing static factory method. More...

#include <RouteCostCalculator.h>

Inheritance diagram for RouteCostCalculator< R, E, V >:
[legend]
Collaboration diagram for RouteCostCalculator< R, E, V >:
[legend]

Public Member Functions

virtual void calculateProbabilities (std::vector< R * > alternatives, const V *const veh, const SUMOTime time)=0
 calculate the probabilities in the logit model
int getMaxRouteNumber () const
bool keepAllRoutes () const
bool keepRoute () const
virtual void setCosts (R *route, const double costs, const bool isActive=false) const =0
bool skipRouteCalculation () const

Static Public Member Functions

static void cleanup ()
static RouteCostCalculator< R, E, V > & getCalculator ()

Protected Member Functions

 RouteCostCalculator ()
 Constructor.
virtual ~RouteCostCalculator ()
 Destructor.

Private Attributes

double myKeepRouteProb
 Information whether the old route shall be kept.
bool myKeepRoutes
 Information whether all routes should be saved.
int myMaxRouteNumber
 The maximum route alternatives number.
bool mySkipNewRoutes
 Information whether new routes shall be computed.

Static Private Attributes

static RouteCostCalculatormyInstance

Detailed Description

template<class R, class E, class V>
class RouteCostCalculator< R, E, V >

Abstract base class providing static factory method.

Definition at line 42 of file RouteCostCalculator.h.

Constructor & Destructor Documentation

◆ RouteCostCalculator()

template<class R, class E, class V>
RouteCostCalculator< R, E, V >::RouteCostCalculator ( )
inlineprotected

Constructor.

Definition at line 80 of file RouteCostCalculator.h.

References OptionsCont::exists(), OptionsCont::getBool(), OptionsCont::getFloat(), OptionsCont::getInt(), OptionsCont::getOptions(), myKeepRouteProb, myKeepRoutes, myMaxRouteNumber, and mySkipNewRoutes.

Referenced by getCalculator().

Here is the caller graph for this function:

◆ ~RouteCostCalculator()

template<class R, class E, class V>
virtual RouteCostCalculator< R, E, V >::~RouteCostCalculator ( )
inlineprotectedvirtual

Destructor.

Definition at line 89 of file RouteCostCalculator.h.

Member Function Documentation

◆ calculateProbabilities()

template<class R, class E, class V>
virtual void RouteCostCalculator< R, E, V >::calculateProbabilities ( std::vector< R * > alternatives,
const V *const veh,
const SUMOTime time )
pure virtual

calculate the probabilities in the logit model

Implemented in GawronCalculator< R, E, V >, and LogitCalculator< R, E, V >.

◆ cleanup()

template<class R, class E, class V>
void RouteCostCalculator< R, E, V >::cleanup ( )
inlinestatic

Definition at line 46 of file RouteCostCalculator.h.

References myInstance.

Referenced by RONet::cleanup().

Here is the caller graph for this function:

◆ getCalculator()

template<class R, class E, class V>
RouteCostCalculator< R, E, V > & RouteCostCalculator< R, E, V >::getCalculator ( )
static

Definition at line 120 of file RouteCostCalculator.h.

References OptionsCont::getFloat(), OptionsCont::getOptions(), OptionsCont::getString(), myInstance, and RouteCostCalculator().

Referenced by RORouteDef::addAlternative(), RORouteDef::preComputeCurrentRoute(), and ROMAAssignments::sue().

Here is the caller graph for this function:

◆ getMaxRouteNumber()

template<class R, class E, class V>
int RouteCostCalculator< R, E, V >::getMaxRouteNumber ( ) const
inline

Definition at line 56 of file RouteCostCalculator.h.

References myMaxRouteNumber.

◆ keepAllRoutes()

template<class R, class E, class V>
bool RouteCostCalculator< R, E, V >::keepAllRoutes ( ) const
inline

Definition at line 60 of file RouteCostCalculator.h.

References myKeepRoutes.

◆ keepRoute()

template<class R, class E, class V>
bool RouteCostCalculator< R, E, V >::keepRoute ( ) const
inline

Definition at line 68 of file RouteCostCalculator.h.

References myKeepRouteProb, and RandHelper::rand().

◆ setCosts()

template<class R, class E, class V>
virtual void RouteCostCalculator< R, E, V >::setCosts ( R * route,
const double costs,
const bool isActive = false ) const
pure virtual

◆ skipRouteCalculation()

template<class R, class E, class V>
bool RouteCostCalculator< R, E, V >::skipRouteCalculation ( ) const
inline

Definition at line 64 of file RouteCostCalculator.h.

References mySkipNewRoutes.

Field Documentation

◆ myInstance

template<class R, class E, class V>
RouteCostCalculator* RouteCostCalculator< R, E, V >::myInstance
staticprivate

Definition at line 92 of file RouteCostCalculator.h.

Referenced by cleanup(), and getCalculator().

◆ myKeepRouteProb

template<class R, class E, class V>
double RouteCostCalculator< R, E, V >::myKeepRouteProb
private

Information whether the old route shall be kept.

Definition at line 104 of file RouteCostCalculator.h.

Referenced by keepRoute(), and RouteCostCalculator().

◆ myKeepRoutes

template<class R, class E, class V>
bool RouteCostCalculator< R, E, V >::myKeepRoutes
private

Information whether all routes should be saved.

Definition at line 98 of file RouteCostCalculator.h.

Referenced by keepAllRoutes(), and RouteCostCalculator().

◆ myMaxRouteNumber

template<class R, class E, class V>
int RouteCostCalculator< R, E, V >::myMaxRouteNumber
private

The maximum route alternatives number.

Definition at line 95 of file RouteCostCalculator.h.

Referenced by getMaxRouteNumber(), and RouteCostCalculator().

◆ mySkipNewRoutes

template<class R, class E, class V>
bool RouteCostCalculator< R, E, V >::mySkipNewRoutes
private

Information whether new routes shall be computed.

Definition at line 101 of file RouteCostCalculator.h.

Referenced by RouteCostCalculator(), and skipRouteCalculation().


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