SUMO - Simulation of Urban MObility
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 >:
Inheritance graph
Collaboration diagram for LogitCalculator< R, E, V >:
Collaboration graph

Public Member Functions

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

Static Public Member Functions

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

Private Member Functions

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

Private Attributes

const SUMOReal myBeta
 logit beta - value More...
 
std::map< const R *, SUMORealmyCommonalities
 The route commonality factors for c-logit. More...
 
const SUMOReal myGamma
 logit gamma - value More...
 
const SUMOReal myTheta
 logit theta - value More...
 

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 47 of file LogitCalculator.h.

Constructor & Destructor Documentation

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

Constructor.

Definition at line 50 of file LogitCalculator.h.

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

Destructor.

Definition at line 54 of file LogitCalculator.h.

Member Function Documentation

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
template<class R, class E, class V>
static void RouteCostCalculator< R, E, V >::cleanup ( )
inlinestaticinherited
template<class R , class E , class V >
SUMOReal LogitCalculator< R, E, V >::getBetaForCLogit ( const std::vector< R * >  alternatives) const
inlineprivate

calculate the scaling factor in the logit model

Definition at line 105 of file LogitCalculator.h.

References max, min, and SUMOReal.

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

template<class R , class E , class V >
RouteCostCalculator< R, E, V > & RouteCostCalculator< R, E, V >::getCalculator ( )
staticinherited
template<class R, class E, class V>
int RouteCostCalculator< R, E, V >::getMaxRouteNumber ( ) const
inlineinherited
template<class R , class E , class V >
SUMOReal LogitCalculator< R, E, V >::getThetaForCLogit ( const std::vector< R * >  alternatives) const
inlineprivate

calculate the scaling factor in the logit model

Definition at line 117 of file LogitCalculator.h.

References max, min, and SUMOReal.

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

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

invalidated assignment operator

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

Implements RouteCostCalculator< R, E, V >.

Definition at line 56 of file LogitCalculator.h.

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

Field Documentation

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

logit beta - value

Definition at line 144 of file LogitCalculator.h.

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

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

The route commonality factors for c-logit.

Definition at line 153 of file LogitCalculator.h.

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

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

logit gamma - value

Definition at line 147 of file LogitCalculator.h.

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

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

logit theta - value

Definition at line 150 of file LogitCalculator.h.

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


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