|
SUMO - Simulation of Urban MObility
|
Cost calculation with c-logit or logit method. More...
#include <ROCostCalculator.h>
Public Member Functions | |
| void | calculateProbabilities (std::vector< RORoute * > alternatives, const ROVehicle *const veh, const SUMOTime time) |
| 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 ROCostCalculator & | getCalculator () |
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... | |
| ROLogitCalculator & | operator= (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... | |
Cost calculation with c-logit or logit method.
Definition at line 141 of file ROCostCalculator.h.
| ROLogitCalculator::ROLogitCalculator | ( | const SUMOReal | beta, |
| const SUMOReal | gamma, | ||
| const SUMOReal | theta | ||
| ) |
Constructor.
Definition at line 154 of file ROCostCalculator.cpp.
|
virtual |
Destructor.
Definition at line 159 of file ROCostCalculator.cpp.
|
virtual |
calculate the probabilities in the logit model
Implements ROCostCalculator.
Definition at line 169 of file ROCostCalculator.cpp.
References getBetaForCLogit(), RORoute::getCosts(), RORoute::getEdgeVector(), getThetaForCLogit(), myBeta, myCommonalities, myGamma, myTheta, RORoute::setProbability(), STEPS2TIME, and SUMOReal.
|
staticinherited |
Definition at line 82 of file ROCostCalculator.cpp.
References ROCostCalculator::myInstance.
Referenced by computeRoutes().
|
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().
|
staticinherited |
Definition at line 68 of file ROCostCalculator.cpp.
References OptionsCont::getFloat(), OptionsCont::getOptions(), OptionsCont::getString(), and ROCostCalculator::myInstance.
Referenced by RORouteDef::addAlternative(), and RORouteDef::preComputeCurrentRoute().
|
inlineinherited |
Definition at line 63 of file ROCostCalculator.h.
References ROCostCalculator::myMaxRouteNumber.
Referenced by RORouteDef::addAlternative().
|
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().
|
inlineinherited |
Definition at line 67 of file ROCostCalculator.h.
References ROCostCalculator::myKeepRoutes.
Referenced by RORouteDef::addAlternative().
|
private |
invalidated assignment operator
|
virtual |
Implements ROCostCalculator.
Definition at line 163 of file ROCostCalculator.cpp.
References RORoute::setCosts().
|
inlineinherited |
Definition at line 71 of file ROCostCalculator.h.
References ROCostCalculator::mySkipRouteCalculation.
|
private |
logit beta - value
Definition at line 164 of file ROCostCalculator.h.
Referenced by calculateProbabilities().
The route commonality factors for c-logit.
Definition at line 173 of file ROCostCalculator.h.
Referenced by calculateProbabilities().
|
private |
logit gamma - value
Definition at line 167 of file ROCostCalculator.h.
Referenced by calculateProbabilities().
|
private |
logit theta - value
Definition at line 170 of file ROCostCalculator.h.
Referenced by calculateProbabilities().