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