22 #ifndef RouteCostCalculator_h 23 #define RouteCostCalculator_h 46 template<
class R,
class E,
class V>
56 virtual void setCosts(R* route,
const SUMOReal costs,
const bool isActive =
false)
const = 0;
103 template<
class R,
class E,
class V>
110 template<
class R,
class E,
class V>
114 if (oc.
getString(
"route-choice-method") ==
"logit") {
116 }
else if (oc.
getString(
"route-choice-method") ==
"gawron") {
Cost calculation with c-logit or logit method.
unsigned int myMaxRouteNumber
The maximum route alternatives number.
RouteCostCalculator()
Constructor.
virtual void setCosts(R *route, const SUMOReal costs, const bool isActive=false) const =0
bool getBool(const std::string &name) const
Returns the boolean-value of the named option (only for Option_Bool)
SUMOReal getFloat(const std::string &name) const
Returns the SUMOReal-value of the named option (only for Option_Float)
unsigned int getMaxRouteNumber() const
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)