42template<
class R,
class E,
class V>
52 virtual void setCosts(std::shared_ptr<R> route,
const double costs,
const bool isActive =
false)
const = 0;
113template<
class R,
class E,
class V>
120template<
class R,
class E,
class V>
122 if (myInstance == 0) {
124 if (oc.
getString(
"route-choice-method") ==
"logit") {
126 }
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 ~RouteCostCalculator()
Destructor.
int myMaxRouteNumber
The maximum route alternatives number.
int getMaxRouteNumber() const
virtual void calculateProbabilities(const std::vector< std::shared_ptr< R > > &alternatives, const V *const veh, const SUMOTime time)=0
calculate the probabilities in the logit model
static RouteCostCalculator< R, E, V > & getCalculator()
virtual void setCosts(std::shared_ptr< R > route, const double costs, const bool isActive=false) const =0
bool skipRouteCalculation() const
static RouteCostCalculator * myInstance
RouteCostCalculator()
Constructor.
double myKeepRouteProb
Information whether the old route shall be kept.