45 oc.
addCallExample(
"-c <CONFIGURATION>",
"run routing with options from file");
68 oc.
addSynonyme(
"alternatives-output",
"alternatives");
69 oc.
addDescription(
"alternatives-output",
"Output",
TL(
"Write generated route alternatives to FILE"));
72 oc.
addDescription(
"intermodal-network-output",
"Output",
TL(
"Write edge splits and connectivity to FILE"));
75 oc.
addDescription(
"intermodal-weight-output",
"Output",
TL(
"Write intermodal edges with lengths and travel times to FILE"));
78 oc.
addDescription(
"write-trips",
"Output",
TL(
"Write trips instead of vehicles (for validating trip input)"));
81 oc.
addDescription(
"write-trips.geo",
"Output",
TL(
"Write trips with geo-coordinates"));
84 oc.
addDescription(
"write-trips.junctions",
"Output",
TL(
"Write trips with fromJunction and toJunction"));
87 oc.
addDescription(
"write-costs",
"Output",
TL(
"Include the cost attribute in route output"));
92 oc.
addDescription(
"weights.random-factor",
"Processing",
TL(
"Edge weights for routing are dynamically disturbed by a random factor drawn uniformly from [1,FLOAT)"));
95 oc.
addDescription(
"weight-period",
"Processing",
TL(
"Aggregation period for the given weight files; triggers rebuilding of Contraction Hierarchy"));
98 oc.
addDescription(
"weights.priority-factor",
"Processing",
TL(
"Consider edge priorities in addition to travel times, weighted by factor"));
101 oc.
addDescription(
"astar.all-distances",
"Processing",
TL(
"Initialize lookup table for astar from the given file (generated by marouter --all-pairs-output)"));
104 oc.
addDescription(
"astar.landmark-distances",
"Processing",
TL(
"Initialize lookup table for astar ALT-variant from the given file"));
107 oc.
addDescription(
"astar.save-landmark-distances",
"Processing",
TL(
"Save lookup table for astar ALT-variant to the given file"));
110 oc.
addDescription(
"scale",
"Processing",
TL(
"Scale demand by the given factor (by discarding or duplicating vehicles)"));
113 oc.
addDescription(
"scale-suffix",
"Processing",
TL(
"Suffix to be added when creating ids for cloned vehicles"));
124 oc.
addDescription(
"gawron.beta",
"Processing",
TL(
"Use FLOAT as Gawron's beta"));
131 oc.
addDescription(
"exit-times",
"Output",
TL(
"Write exit times (weights) for each edge"));
134 oc.
addDescription(
"route-length",
"Output",
TL(
"Include total route length in the output"));
137 oc.
addDescription(
"keep-all-routes",
"Processing",
TL(
"Save routes with near zero probability"));
140 oc.
addDescription(
"skip-new-routes",
"Processing",
TL(
"Only reuse routes from input, do not calculate new ones"));
143 oc.
addDescription(
"keep-route-probability",
"Processing",
TL(
"The probability of keeping the old route"));
146 oc.
addDescription(
"ptline-routing",
"Processing",
TL(
"Route all public transport input"));
149 oc.
addDescription(
"route-choice-method",
"Processing",
TL(
"Choose a route choice method: gawron, logit, or lohse"));
152 oc.
addDescription(
"logit",
"Processing",
TL(
"Use c-logit model (deprecated in favor of --route-choice-method logit)"));
156 oc.
addDescription(
"logit.beta",
"Processing",
TL(
"Use FLOAT as logit's beta"));
160 oc.
addDescription(
"logit.gamma",
"Processing",
TL(
"Use FLOAT as logit's gamma"));
164 oc.
addDescription(
"logit.theta",
"Processing",
TL(
"Use FLOAT as logit's theta (negative values mean auto-estimation)"));
167 oc.
addDescription(
"persontrip.walkfactor",
"Processing",
TL(
"Use FLOAT as a factor on pedestrian maximum speed during intermodal routing"));
170 oc.
addDescription(
"persontrip.walk-opposite-factor",
"Processing",
TL(
"Use FLOAT as a factor on walking speed against vehicle traffic direction"));
174 "Where are mode changes from car to walking allowed (possible values: 'parkingAreas', 'ptStops', 'allJunctions' and combinations)");
177 oc.
addDescription(
"persontrip.transfer.taxi-walk",
"Processing",
TL(
"Where taxis can drop off customers ('allJunctions, 'ptStops')"));
180 oc.
addDescription(
"persontrip.transfer.walk-taxi",
"Processing",
TL(
"Where taxis can pick up customers ('allJunctions, 'ptStops')"));
183 oc.
addDescription(
"persontrip.taxi.waiting-time",
"Processing",
TL(
"Estimated time for taxi pickup"));
186 oc.
addDescription(
"railway.max-train-length",
"Processing",
TL(
"Use FLOAT as a maximum train length when initializing the railway router"));
222 if (oc.
getString(
"routing-algorithm") !=
"dijkstra" && oc.
getString(
"weight-attribute") !=
"traveltime") {
226 if (oc.
getBool(
"bulk-routing") && (oc.
getString(
"routing-algorithm") ==
"CH" || oc.
getString(
"routing-algorithm") ==
"CHWrapper")) {
230 if (oc.
isDefault(
"routing-algorithm") && (oc.
isSet(
"astar.all-distances") || oc.
isSet(
"astar.landmark-distances") || oc.
isSet(
"astar.save-landmark-distances"))) {
234 if (oc.
getString(
"route-choice-method") !=
"gawron" && oc.
getString(
"route-choice-method") !=
"logit") {
239 WRITE_WARNING(
TL(
"The --logit option is deprecated, please use --route-choice-method logit."));
240 oc.
set(
"route-choice-method",
"logit");
243 if (oc.
isSet(
"output-file") && !oc.
isSet(
"alternatives-output")) {
244 const std::string& filename = oc.
getString(
"output-file");
245 const int len = (int)filename.length();
246 if (len > 4 && filename.substr(len - 4) ==
".xml") {
247 oc.
setDefault(
"alternatives-output", filename.substr(0, len - 4) +
".alt.xml");
248 }
else if (len > 4 && filename.substr(len - 3) ==
".gz") {
249 oc.
setDefault(
"alternatives-output", filename.substr(0, len - 3) +
".alt.gz");
251 WRITE_WARNING(
TL(
"Cannot derive file name for alternatives output, skipping it."));
254 if (oc.
getBool(
"write-trips.junctions")) {
257 }
else if (!oc.
getBool(
"write-trips")) {
258 WRITE_WARNING(
TL(
"Option --write-trips.junctions takes no affect when --write-trips is disabled."));
#define WRITE_ERRORF(...)
#define WRITE_WARNING(msg)
std::vector< std::string > StringVector
Definition of a vector of strings.
A storage for options typed value containers)
void addDescription(const std::string &name, const std::string &subtopic, const std::string &description)
Adds a description for an option.
bool isSet(const std::string &name, bool failOnNonExistant=true) const
Returns the information whether the named option is set.
std::string getString(const std::string &name) const
Returns the string-value of the named option (only for Option_String)
void addSynonyme(const std::string &name1, const std::string &name2, bool isDeprecated=false)
Adds a synonyme for an options name (any order)
bool isDefault(const std::string &name) const
Returns the information whether the named option has still the default value.
bool setDefault(const std::string &name, const std::string &value)
Sets the given value for the named option as new default value.
void doRegister(const std::string &name, Option *o)
Adds an option under the given name.
bool set(const std::string &name, const std::string &value, const bool append=false)
Sets the given value for the named option.
void addOptionSubTopic(const std::string &topic)
Adds an option subtopic.
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.
void addCallExample(const std::string &example, const std::string &desc)
Add a call example.
static void addImportOptions()
Inserts import options used by duarouter into the OptionsCont-singleton.
static void addDUAOptions()
Inserts dua options used by duarouter into the OptionsCont-singleton.
static void fillOptions()
Inserts options used by duarouter into the OptionsCont-singleton.
static bool checkOptions()
Checks set options from the OptionsCont-singleton for being valid for usage within duarouter.
static bool checkOptions(OptionsCont &oc)
Checks whether options are valid.
static void fillOptions(OptionsCont &oc, const bool isDUA=false, const bool isMA=false)
Inserts options used by routing applications into the OptionsCont-singleton.
static void insertRandOptions(OptionsCont &oc)
Initialises the given options container with random number options.
Structure representing possible vehicle parameter.
int departLane
(optional) The lane the vehicle shall depart from (index in edge)
ArrivalSpeedDefinition arrivalSpeedProcedure
Information how the vehicle's end speed shall be chosen.
double departSpeed
(optional) The initial speed of the vehicle
static bool parseArrivalLane(const std::string &val, const std::string &element, const std::string &id, int &lane, ArrivalLaneDefinition &ald, std::string &error)
Validates a given arrivalLane value.
ArrivalLaneDefinition arrivalLaneProcedure
Information how the vehicle shall choose the lane to arrive on.
DepartLaneDefinition departLaneProcedure
Information how the vehicle shall choose the lane to depart from.
static bool parseDepartSpeed(const std::string &val, const std::string &element, const std::string &id, double &speed, DepartSpeedDefinition &dsd, std::string &error)
Validates a given departSpeed value.
static bool parseArrivalPos(const std::string &val, const std::string &element, const std::string &id, double &pos, ArrivalPosDefinition &apd, std::string &error)
Validates a given arrivalPos value.
static bool parseArrivalSpeed(const std::string &val, const std::string &element, const std::string &id, double &speed, ArrivalSpeedDefinition &asd, std::string &error)
Validates a given arrivalSpeed value.
double departPos
(optional) The position the vehicle shall depart from
DepartSpeedDefinition departSpeedProcedure
Information how the vehicle's initial speed shall be chosen.
double arrivalPos
(optional) The position the vehicle shall arrive on
static bool parseDepartLane(const std::string &val, const std::string &element, const std::string &id, int &lane, DepartLaneDefinition &dld, std::string &error)
Validates a given departLane value.
ArrivalPosDefinition arrivalPosProcedure
Information how the vehicle shall choose the arrival position.
double arrivalSpeed
(optional) The final speed of the vehicle (not used yet)
static bool parseDepartPos(const std::string &val, const std::string &element, const std::string &id, double &pos, DepartPosDefinition &dpd, std::string &error)
Validates a given departPos value.
DepartPosDefinition departPosProcedure
Information how the vehicle shall choose the departure position.
static void addConfigurationOptions(OptionsCont &oc)
Adds configuration options to the given container.