41template<
class R,
class E,
class V>
51 virtual void setCosts(R* route,
const double costs,
const bool isActive =
false)
const = 0;
112template<
class R,
class E,
class V>
119template<
class R,
class E,
class V>
121 if (myInstance == 0) {
123 if (oc.
getString(
"route-choice-method") ==
"logit") {
125 }
else if (oc.
getString(
"route-choice-method") ==
"gawron") {
Cost calculation with Gawron's method.
Cost calculation with c-logit or logit method.
A storage for options typed value containers)
double getFloat(const std::string &name) const
Returns the double-value of the named option (only for Option_Float)
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 exists(const std::string &name) const
Returns the information whether the named option is known.
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 double rand(SumoRNG *rng=nullptr)
Returns a random real number in [0, 1)
Abstract base class providing static factory method.
bool keepAllRoutes() const
bool mySkipNewRoutes
Information whether new routes shall be computed.
bool myKeepRoutes
Information whether all routes should be saved.
virtual void calculateProbabilities(std::vector< R * > alternatives, const V *const veh, const SUMOTime time)=0
calculate the probabilities in the logit model
virtual ~RouteCostCalculator()
Destructor.
int myMaxRouteNumber
The maximum route alternatives number.
int getMaxRouteNumber() const
virtual void setCosts(R *route, const double costs, const bool isActive=false) const =0
static RouteCostCalculator< R, E, V > & getCalculator()
bool skipRouteCalculation() const
static RouteCostCalculator * myInstance
RouteCostCalculator()
Constructor.
double myKeepRouteProb
Information whether the old route shall be kept.