Eclipse SUMO - Simulation of Urban MObility
GawronCalculator< R, E, V > Class Template Reference

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

#include <GawronCalculator.h>

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

Public Member Functions

void calculateProbabilities (std::vector< R * > alternatives, const V *const, const SUMOTime)
 calculate the probabilities More...
 
 GawronCalculator (const double beta, const double a)
 Constructor. More...
 
int getMaxRouteNumber () const
 
bool keepAllRoutes () const
 
bool keepRoute () const
 
void setCosts (R *route, const double costs, const bool isActive=false) const
 
bool skipRouteCalculation () const
 
virtual ~GawronCalculator ()
 Destructor. More...
 

Static Public Member Functions

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

Private Member Functions

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

Private Attributes

const double myA
 gawron a - value More...
 
const double myBeta
 gawron beta - value More...
 
double myKeepRouteProb
 Information whether the old route shall be kept. More...
 
bool myKeepRoutes
 Information whether all routes should be saved. More...
 
int myMaxRouteNumber
 The maximum route alternatives number. More...
 
bool mySkipNewRoutes
 Information whether new routes shall be computed. More...
 

Static Private Attributes

static RouteCostCalculatormyInstance = 0
 

Detailed Description

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

Cost calculation with Gawron's method.

Definition at line 37 of file GawronCalculator.h.

Constructor & Destructor Documentation

◆ GawronCalculator()

template<class R , class E , class V >
GawronCalculator< R, E, V >::GawronCalculator ( const double  beta,
const double  a 
)
inline

Constructor.

Definition at line 40 of file GawronCalculator.h.

◆ ~GawronCalculator()

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

Destructor.

Definition at line 43 of file GawronCalculator.h.

Member Function Documentation

◆ calculateProbabilities()

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

calculate the probabilities

Implements RouteCostCalculator< R, E, V >.

Definition at line 54 of file GawronCalculator.h.

References GawronCalculator< R, E, V >::gawronF(), MAX2(), and MIN2().

◆ 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:

◆ gawronF()

template<class R , class E , class V >
double GawronCalculator< R, E, V >::gawronF ( const double  pdr,
const double  pds,
const double  x 
) const
inlineprivate

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

Definition at line 83 of file GawronCalculator.h.

References GawronCalculator< R, E, V >::gawronG(), and GawronCalculator< R, E, V >::myA.

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

Here is the caller graph for this function:

◆ gawronG()

template<class R , class E , class V >
double GawronCalculator< R, E, V >::gawronG ( const double  a,
const double  x 
) const
inlineprivate

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

Definition at line 93 of file GawronCalculator.h.

Referenced by GawronCalculator< R, E, V >::gawronF().

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

◆ 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 >
GawronCalculator& GawronCalculator< R, E, V >::operator= ( const GawronCalculator< R, E, V > &  s)
private

invalidated assignment operator

◆ setCosts()

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

Implements RouteCostCalculator< R, E, V >.

Definition at line 45 of file GawronCalculator.h.

References GawronCalculator< R, E, V >::myBeta.

◆ skipRouteCalculation()

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

Field Documentation

◆ myA

template<class R , class E , class V >
const double GawronCalculator< R, E, V >::myA
private

gawron a - value

Definition at line 105 of file GawronCalculator.h.

Referenced by GawronCalculator< R, E, V >::gawronF().

◆ myBeta

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

gawron beta - value

Definition at line 102 of file GawronCalculator.h.

Referenced by GawronCalculator< R, E, V >::setCosts().

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


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