|
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.
| ROLogitCalculator::~ROLogitCalculator | ( | ) | [virtual] |
Destructor.
Definition at line 154 of file ROCostCalculator.cpp.
| void ROLogitCalculator::calculateProbabilities | ( | const ROVehicle *const | veh, |
| std::vector< RORoute * > | alternatives | ||
| ) | [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.
| void ROCostCalculator::cleanup | ( | ) | [static, inherited] |
Definition at line 77 of file ROCostCalculator.cpp.
References ROCostCalculator::myInstance.
Referenced by computeRoutes().
| SUMOReal ROLogitCalculator::getBetaForCLogit | ( | const std::vector< RORoute * > | alternatives | ) | const [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().
| 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().
| SUMOReal ROLogitCalculator::getThetaForCLogit | ( | const std::vector< RORoute * > | alternatives | ) | const [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().
| void ROLogitCalculator::setCosts | ( | RORoute * | route, |
| const SUMOReal | costs, | ||
| const bool | isActive = false |
||
| ) | const [virtual] |
Implements ROCostCalculator.
Definition at line 158 of file ROCostCalculator.cpp.
References RORoute::setCosts().
const SUMOReal ROLogitCalculator::myBeta [private] |
logit beta - value
Definition at line 139 of file ROCostCalculator.h.
Referenced by calculateProbabilities().
std::map<const RORoute*, SUMOReal> ROLogitCalculator::myCommonalities [private] |
The route commonality factors for c-logit.
Definition at line 148 of file ROCostCalculator.h.
Referenced by calculateProbabilities().
const SUMOReal ROLogitCalculator::myGamma [private] |
logit gamma - value
Definition at line 142 of file ROCostCalculator.h.
Referenced by calculateProbabilities().
const SUMOReal ROLogitCalculator::myTheta [private] |
logit theta - value
Definition at line 145 of file ROCostCalculator.h.
Referenced by calculateProbabilities().