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 = 0
 

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()

◆ ~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 LogitCalculator< R, E, V >, and GawronCalculator< R, E, V >.

◆ cleanup()

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

Definition at line 46 of file RouteCostCalculator.h.

References RouteCostCalculator< R, E, V >::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(), and OptionsCont::getString().

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

◆ keepAllRoutes()

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

◆ keepRoute()

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

◆ 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

Field Documentation

◆ myInstance

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

Definition at line 92 of file RouteCostCalculator.h.

Referenced by RouteCostCalculator< R, E, V >::cleanup().

◆ 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 RouteCostCalculator< R, E, V >::keepRoute(), and RouteCostCalculator< R, E, V >::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 RouteCostCalculator< R, E, V >::keepAllRoutes(), and RouteCostCalculator< R, E, V >::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 RouteCostCalculator< R, E, V >::getMaxRouteNumber(), and RouteCostCalculator< R, E, V >::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< R, E, V >::RouteCostCalculator(), and RouteCostCalculator< R, E, V >::skipRouteCalculation().


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