SUMO - Simulation of Urban MObility
|
Cost calculation with c-logit or logit method. More...
#include <ROCostCalculator.h>
Public Member Functions | |
void | calculateProbabilities (const ROVehicle *const veh, std::vector< RORoute * > alternatives) |
calculate the probabilities in the logit model | |
ROLogitCalculator (const SUMOReal beta, const SUMOReal gamma, const SUMOReal theta) | |
Constructor. | |
void | setCosts (RORoute *route, const SUMOReal costs, const bool isActive=false) const |
virtual | ~ROLogitCalculator () |
Destructor. |
Static Public Member Functions | |
static void | cleanup () |
static ROCostCalculator & | getCalculator () |
Private Member Functions | |
SUMOReal | getBetaForCLogit (const std::vector< RORoute * > alternatives) const |
calculate the scaling factor in the logit model | |
SUMOReal | getThetaForCLogit (const std::vector< RORoute * > alternatives) const |
calculate the scaling factor in the logit model |
Private Attributes | |
const SUMOReal | myBeta |
logit beta - value | |
std::map< const RORoute *, SUMOReal > | myCommonalities |
The route commonality factors for c-logit. | |
const SUMOReal | myGamma |
logit gamma - value | |
const SUMOReal | myTheta |
logit theta - value |
Cost calculation with c-logit or logit method.
Definition at line 116 of file ROCostCalculator.h.
ROLogitCalculator::ROLogitCalculator | ( | const SUMOReal | beta, |
const SUMOReal | gamma, | ||
const SUMOReal | theta | ||
) |
Constructor.
Definition at line 149 of file ROCostCalculator.cpp.
|
virtual |
Destructor.
Definition at line 154 of file ROCostCalculator.cpp.
|
virtual |
calculate the probabilities in the logit model
Implements ROCostCalculator.
Definition at line 164 of file ROCostCalculator.cpp.
References getBetaForCLogit(), RORoute::getCosts(), ROVehicle::getDepartureTime(), RORoute::getEdgeVector(), getThetaForCLogit(), myBeta, myCommonalities, myGamma, myTheta, RORoute::setProbability(), STEPS2TIME, and SUMOReal.
|
staticinherited |
Definition at line 77 of file ROCostCalculator.cpp.
References ROCostCalculator::myInstance.
Referenced by computeRoutes().
|
private |
calculate the scaling factor in the logit model
Definition at line 207 of file ROCostCalculator.cpp.
References max, min, and SUMOReal.
Referenced by calculateProbabilities().
|
staticinherited |
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().
|
private |
calculate the scaling factor in the logit model
Definition at line 220 of file ROCostCalculator.cpp.
References max, min, PI, and SUMOReal.
Referenced by calculateProbabilities().
|
virtual |
Implements ROCostCalculator.
Definition at line 158 of file ROCostCalculator.cpp.
References RORoute::setCosts().
|
private |
logit beta - value
Definition at line 139 of file ROCostCalculator.h.
Referenced by calculateProbabilities().
The route commonality factors for c-logit.
Definition at line 148 of file ROCostCalculator.h.
Referenced by calculateProbabilities().
|
private |
logit gamma - value
Definition at line 142 of file ROCostCalculator.h.
Referenced by calculateProbabilities().
|
private |
logit theta - value
Definition at line 145 of file ROCostCalculator.h.
Referenced by calculateProbabilities().