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

Cost calculation with c-logit or logit method. More...

#include <LogitCalculator.h>

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

Public Member Functions

void calculateProbabilities (std::vector< R * > alternatives, const V *const veh, const SUMOTime time)
 calculate the probabilities in the logit model
 
int getMaxRouteNumber () const
 
bool keepAllRoutes () const
 
bool keepRoute () const
 
 LogitCalculator (const double beta, const double gamma, const double theta)
 Constructor.
 
void setCosts (R *route, const double costs, const bool) const
 
bool skipRouteCalculation () const
 
virtual ~LogitCalculator ()
 Destructor.
 

Static Public Member Functions

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

Private Member Functions

double getBetaForCLogit (const std::vector< R * > alternatives) const
 calculate the scaling factor in the logit model
 
double getThetaForCLogit (const std::vector< R * > alternatives) const
 calculate the scaling factor in the logit model
 
LogitCalculatoroperator= (const LogitCalculator &s)
 invalidated assignment operator
 

Private Attributes

const double myBeta
 logit beta - value
 
std::map< const R *, double > myCommonalities
 The route commonality factors for c-logit.
 
const double myGamma
 logit gamma - value
 
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.
 
const double myTheta
 logit theta - value
 

Static Private Attributes

static RouteCostCalculatormyInstance = 0
 

Detailed Description

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

Cost calculation with c-logit or logit method.

Definition at line 37 of file LogitCalculator.h.

Constructor & Destructor Documentation

◆ LogitCalculator()

template<class R , class E , class V >
LogitCalculator< R, E, V >::LogitCalculator ( const double  beta,
const double  gamma,
const double  theta 
)
inline

Constructor.

Definition at line 40 of file LogitCalculator.h.

◆ ~LogitCalculator()

template<class R , class E , class V >
virtual LogitCalculator< R, E, V >::~LogitCalculator ( )
inlinevirtual

Destructor.

Definition at line 44 of file LogitCalculator.h.

Member Function Documentation

◆ calculateProbabilities()

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

◆ cleanup()

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

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:

◆ getBetaForCLogit()

template<class R , class E , class V >
double LogitCalculator< R, E, V >::getBetaForCLogit ( const std::vector< R * >  alternatives) const
inlineprivate

calculate the scaling factor in the logit model

Definition at line 91 of file LogitCalculator.h.

Referenced by LogitCalculator< R, E, V >::calculateProbabilities().

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

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
inlineinherited

◆ getThetaForCLogit()

template<class R , class E , class V >
double LogitCalculator< R, E, V >::getThetaForCLogit ( const std::vector< R * >  alternatives) const
inlineprivate

calculate the scaling factor in the logit model

Definition at line 103 of file LogitCalculator.h.

Referenced by LogitCalculator< R, E, V >::calculateProbabilities().

Here is the caller graph for this function:

◆ keepAllRoutes()

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

◆ keepRoute()

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

◆ operator=()

template<class R , class E , class V >
LogitCalculator & LogitCalculator< R, E, V >::operator= ( const LogitCalculator< R, E, V > &  s)
private

invalidated assignment operator

◆ setCosts()

template<class R , class E , class V >
void LogitCalculator< R, E, V >::setCosts ( R *  route,
const double  costs,
const bool   
) const
inlinevirtual

Implements RouteCostCalculator< R, E, V >.

Definition at line 46 of file LogitCalculator.h.

◆ skipRouteCalculation()

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

Field Documentation

◆ myBeta

template<class R , class E , class V >
const double LogitCalculator< R, E, V >::myBeta
private

logit beta - value

Definition at line 130 of file LogitCalculator.h.

Referenced by LogitCalculator< R, E, V >::calculateProbabilities().

◆ myCommonalities

template<class R , class E , class V >
std::map<const R*, double> LogitCalculator< R, E, V >::myCommonalities
private

The route commonality factors for c-logit.

Definition at line 139 of file LogitCalculator.h.

Referenced by LogitCalculator< R, E, V >::calculateProbabilities().

◆ myGamma

template<class R , class E , class V >
const double LogitCalculator< R, E, V >::myGamma
private

logit gamma - value

Definition at line 133 of file LogitCalculator.h.

Referenced by LogitCalculator< R, E, V >::calculateProbabilities().

◆ myInstance

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

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
privateinherited

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
privateinherited

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
privateinherited

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
privateinherited

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

◆ myTheta

template<class R , class E , class V >
const double LogitCalculator< R, E, V >::myTheta
private

logit theta - value

Definition at line 136 of file LogitCalculator.h.

Referenced by LogitCalculator< R, E, V >::calculateProbabilities().


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