SUMO - Simulation of Urban MObility
|
Cost calculation with Gawron's method. More...
#include <ROCostCalculator.h>
Public Member Functions | |
void | calculateProbabilities (const ROVehicle *const veh, std::vector< RORoute * > alternatives) |
calculate the probabilities | |
ROGawronCalculator (const SUMOReal beta, const SUMOReal a) | |
Constructor. | |
void | setCosts (RORoute *route, const SUMOReal costs, const bool isActive=false) const |
virtual | ~ROGawronCalculator () |
Destructor. | |
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...". | |
SUMOReal | gawronG (const SUMOReal a, const SUMOReal x) const |
Performs the gawron - g() function From "Dynamic User Equilibria...". | |
Private Attributes | |
const SUMOReal | myA |
gawron a - value | |
const SUMOReal | myBeta |
gawron beta - value |
Cost calculation with Gawron's method.
Definition at line 80 of file ROCostCalculator.h.
ROGawronCalculator::ROGawronCalculator | ( | const SUMOReal | beta, |
const SUMOReal | a | ||
) |
Constructor.
Definition at line 83 of file ROCostCalculator.cpp.
ROGawronCalculator::~ROGawronCalculator | ( | ) | [virtual] |
Destructor.
Definition at line 87 of file ROCostCalculator.cpp.
void ROGawronCalculator::calculateProbabilities | ( | const ROVehicle *const | veh, |
std::vector< RORoute * > | alternatives | ||
) | [virtual] |
calculate the probabilities
Implements ROCostCalculator.
Definition at line 101 of file ROCostCalculator.cpp.
References gawronF(), RORoute::getCosts(), RORoute::getProbability(), ISNAN(), MAX2(), MIN2(), RORoute::setProbability(), and SUMOReal.
void ROCostCalculator::cleanup | ( | ) | [static, inherited] |
Definition at line 77 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 129 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 139 of file ROCostCalculator.cpp.
Referenced by gawronF().
ROCostCalculator & ROCostCalculator::getCalculator | ( | ) | [static, inherited] |
Definition at line 63 of file ROCostCalculator.cpp.
References OptionsCont::getBool(), OptionsCont::getFloat(), OptionsCont::getOptions(), and ROCostCalculator::myInstance.
Referenced by RORouteDef_Alternatives::addAlternative(), and RORouteDef_Alternatives::preComputeCurrentRoute().
void ROGawronCalculator::setCosts | ( | RORoute * | route, |
const SUMOReal | costs, | ||
const bool | isActive = false |
||
) | const [virtual] |
Implements ROCostCalculator.
Definition at line 91 of file ROCostCalculator.cpp.
References RORoute::getCosts(), myBeta, RORoute::setCosts(), and SUMOReal.
const SUMOReal ROGawronCalculator::myA [private] |
const SUMOReal ROGawronCalculator::myBeta [private] |