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

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

#include <ROCostCalculator.h>

Inheritance diagram for ROLogitCalculator:
ROCostCalculator

Public Member Functions

void calculateProbabilities (const ROVehicle *const veh, std::vector< RORoute * > alternatives)
 calculate the probabilities in the logit model More...
 
unsigned int getMaxRouteNumber () const
 
bool keepRoutes () const
 
 ROLogitCalculator (const SUMOReal beta, const SUMOReal gamma, const SUMOReal theta)
 Constructor. More...
 
void setCosts (RORoute *route, const SUMOReal costs, const bool isActive=false) const
 
bool skipRouteCalculation () const
 
virtual ~ROLogitCalculator ()
 Destructor. More...
 

Static Public Member Functions

static void cleanup ()
 
static ROCostCalculatorgetCalculator ()
 

Private Member Functions

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

Private Attributes

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

Detailed Description

Cost calculation with c-logit or logit method.

Definition at line 141 of file ROCostCalculator.h.

Constructor & Destructor Documentation

ROLogitCalculator::ROLogitCalculator ( const SUMOReal  beta,
const SUMOReal  gamma,
const SUMOReal  theta 
)

Constructor.

Definition at line 154 of file ROCostCalculator.cpp.

ROLogitCalculator::~ROLogitCalculator ( )
virtual

Destructor.

Definition at line 159 of file ROCostCalculator.cpp.

Member Function Documentation

void ROLogitCalculator::calculateProbabilities ( const ROVehicle *const  veh,
std::vector< RORoute * >  alternatives 
)
virtual
void ROCostCalculator::cleanup ( )
staticinherited

Definition at line 82 of file ROCostCalculator.cpp.

References ROCostCalculator::myInstance.

Referenced by computeRoutes().

SUMOReal ROLogitCalculator::getBetaForCLogit ( const std::vector< RORoute * >  alternatives) const
private

calculate the scaling factor in the logit model

Definition at line 212 of file ROCostCalculator.cpp.

References max, min, and SUMOReal.

Referenced by calculateProbabilities().

unsigned int ROCostCalculator::getMaxRouteNumber ( ) const
inlineinherited

Definition at line 63 of file ROCostCalculator.h.

References ROCostCalculator::myMaxRouteNumber.

Referenced by RORouteDef::addAlternative().

SUMOReal ROLogitCalculator::getThetaForCLogit ( const std::vector< RORoute * >  alternatives) const
private

calculate the scaling factor in the logit model

Definition at line 225 of file ROCostCalculator.cpp.

References M_PI, max, min, and SUMOReal.

Referenced by calculateProbabilities().

bool ROCostCalculator::keepRoutes ( ) const
inlineinherited

Definition at line 67 of file ROCostCalculator.h.

References ROCostCalculator::myKeepRoutes.

ROLogitCalculator& ROLogitCalculator::operator= ( const ROLogitCalculator s)
private

invalidated assignment operator

void ROLogitCalculator::setCosts ( RORoute route,
const SUMOReal  costs,
const bool  isActive = false 
) const
virtual

Implements ROCostCalculator.

Definition at line 163 of file ROCostCalculator.cpp.

References RORoute::setCosts().

bool ROCostCalculator::skipRouteCalculation ( ) const
inlineinherited

Definition at line 71 of file ROCostCalculator.h.

References ROCostCalculator::mySkipRouteCalculation.

Field Documentation

const SUMOReal ROLogitCalculator::myBeta
private

logit beta - value

Definition at line 164 of file ROCostCalculator.h.

Referenced by calculateProbabilities().

std::map<const RORoute*, SUMOReal> ROLogitCalculator::myCommonalities
private

The route commonality factors for c-logit.

Definition at line 173 of file ROCostCalculator.h.

Referenced by calculateProbabilities().

const SUMOReal ROLogitCalculator::myGamma
private

logit gamma - value

Definition at line 167 of file ROCostCalculator.h.

Referenced by calculateProbabilities().

const SUMOReal ROLogitCalculator::myTheta
private

logit theta - value

Definition at line 170 of file ROCostCalculator.h.

Referenced by calculateProbabilities().


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