 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
18 #ifndef RouteCostCalculator_h
19 #define RouteCostCalculator_h
42 template<
class R,
class E,
class V>
52 virtual void setCosts(R* route,
const double costs,
const bool isActive =
false)
const = 0;
99 template<
class R,
class E,
class V>
106 template<
class R,
class E,
class V>
108 if (myInstance == 0) {
110 if (oc.
getString(
"route-choice-method") ==
"logit") {
112 }
else if (oc.
getString(
"route-choice-method") ==
"gawron") {
int myMaxRouteNumber
The maximum route alternatives number.
int getInt(const std::string &name) const
Returns the int-value of the named option (only for Option_Integer)
std::string getString(const std::string &name) const
Returns the string-value of the named option (only for Option_String)
bool getBool(const std::string &name) const
Returns the boolean-value of the named option (only for Option_Bool)
static OptionsCont & getOptions()
Retrieves the options.
static RouteCostCalculator< R, E, V > & getCalculator()
Cost calculation with c-logit or logit method.
Abstract base class providing static factory method.
static RouteCostCalculator * myInstance
virtual void calculateProbabilities(std::vector< R * > alternatives, const V *const veh, const SUMOTime time)=0
calculate the probabilities in the logit model
virtual void setCosts(R *route, const double costs, const bool isActive=false) const =0
A storage for options typed value containers)
int getMaxRouteNumber() const
bool mySkipRouteCalculation
Information whether new routes should be calculated.
double getFloat(const std::string &name) const
Returns the double-value of the named option (only for Option_Float)
bool skipRouteCalculation() const
Cost calculation with Gawron's method.
virtual ~RouteCostCalculator()
Destructor.
bool myKeepRoutes
Information whether all routes should be saved.
RouteCostCalculator()
Constructor.