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

Cost calculation with Gawron's method. More...

#include <ROCostCalculator.h>

Inheritance diagram for ROGawronCalculator:
ROCostCalculator

Public Member Functions

void calculateProbabilities (std::vector< RORoute * > alternatives, const ROVehicle *const veh, const SUMOTime time)
 calculate the probabilities More...
 
unsigned int getMaxRouteNumber () const
 
bool keepRoutes () const
 
 ROGawronCalculator (const SUMOReal beta, const SUMOReal a)
 Constructor. More...
 
void setCosts (RORoute *route, const SUMOReal costs, const bool isActive=false) const
 
bool skipRouteCalculation () const
 
virtual ~ROGawronCalculator ()
 Destructor. More...
 

Static Public Member Functions

static void cleanup ()
 
static ROCostCalculator & getCalculator ()
 

Private Member Functions

SUMOReal gawronF (const SUMOReal pdr, const SUMOReal pds, const SUMOReal x) const
 Performs the gawron - f() function From "Dynamic User Equilibria...". More...
 
SUMOReal gawronG (const SUMOReal a, const SUMOReal x) const
 Performs the gawron - g() function From "Dynamic User Equilibria...". More...
 
ROGawronCalculator & operator= (const ROGawronCalculator &s)
 invalidated assignment operator More...
 

Private Attributes

const SUMOReal myA
 gawron a - value More...
 
const SUMOReal myBeta
 gawron beta - value More...
 

Detailed Description

Cost calculation with Gawron's method.

Definition at line 101 of file ROCostCalculator.h.

Constructor & Destructor Documentation

ROGawronCalculator::ROGawronCalculator ( const SUMOReal  beta,
const SUMOReal  a 
)

Constructor.

Definition at line 88 of file ROCostCalculator.cpp.

ROGawronCalculator::~ROGawronCalculator ( )
virtual

Destructor.

Definition at line 92 of file ROCostCalculator.cpp.

Member Function Documentation

void ROGawronCalculator::calculateProbabilities ( std::vector< RORoute * >  alternatives,
const ROVehicle *const  veh,
const SUMOTime  time 
)
virtual

calculate the probabilities

Implements ROCostCalculator.

Definition at line 106 of file ROCostCalculator.cpp.

References gawronF(), RORoute::getCosts(), RORoute::getProbability(), ISNAN(), MAX2(), MIN2(), RORoute::setProbability(), and SUMOReal.

void ROCostCalculator::cleanup ( )
staticinherited

Definition at line 82 of file ROCostCalculator.cpp.

References ROCostCalculator::myInstance.

Referenced by computeRoutes().

SUMOReal ROGawronCalculator::gawronF ( const SUMOReal  pdr,
const SUMOReal  pds,
const SUMOReal  x 
) const
private

Performs the gawron - f() function From "Dynamic User Equilibria...".

Definition at line 134 of file ROCostCalculator.cpp.

References gawronG(), max, and myA.

Referenced by calculateProbabilities().

SUMOReal ROGawronCalculator::gawronG ( const SUMOReal  a,
const SUMOReal  x 
) const
private

Performs the gawron - g() function From "Dynamic User Equilibria...".

Definition at line 144 of file ROCostCalculator.cpp.

References max, and SUMOReal.

Referenced by gawronF().

unsigned int ROCostCalculator::getMaxRouteNumber ( ) const
inlineinherited

Definition at line 63 of file ROCostCalculator.h.

References ROCostCalculator::myMaxRouteNumber.

Referenced by RORouteDef::addAlternative().

bool ROCostCalculator::keepRoutes ( ) const
inlineinherited

Definition at line 67 of file ROCostCalculator.h.

References ROCostCalculator::myKeepRoutes.

Referenced by RORouteDef::addAlternative().

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

invalidated assignment operator

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

Implements ROCostCalculator.

Definition at line 96 of file ROCostCalculator.cpp.

References RORoute::getCosts(), myBeta, RORoute::setCosts(), and SUMOReal.

bool ROCostCalculator::skipRouteCalculation ( ) const
inlineinherited

Definition at line 71 of file ROCostCalculator.h.

References ROCostCalculator::mySkipRouteCalculation.

Field Documentation

const SUMOReal ROGawronCalculator::myA
private

gawron a - value

Definition at line 128 of file ROCostCalculator.h.

Referenced by gawronF().

const SUMOReal ROGawronCalculator::myBeta
private

gawron beta - value

Definition at line 125 of file ROCostCalculator.h.

Referenced by setCosts().


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