 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
46 oc.
addCallExample(
"-c <CONFIGURATION>",
"run routing with options from file");
72 oc.
addSynonyme(
"alternatives-output",
"alternatives");
73 oc.
addDescription(
"alternatives-output",
"Output",
"Write generated route alternatives to FILE");
76 oc.
addDescription(
"intermodal-network-output",
"Output",
"Write edge splits and connectivity to FILE");
79 oc.
addDescription(
"intermodal-weight-output",
"Output",
"Write intermodal edges with lengths and travel times to FILE");
82 oc.
addDescription(
"write-trips",
"Output",
"Write trips instead of vehicles (for validating trip input)");
85 oc.
addDescription(
"write-trips.geo",
"Output",
"Write trips with geo-coordinates");
90 oc.
addDescription(
"weight-files",
"Input",
"Read network weights from FILE(s)");
93 oc.
addDescription(
"lane-weight-files",
"Input",
"Read lane-based network weights from FILE(s)");
96 oc.
addSynonyme(
"weight-attribute",
"measure",
true);
97 oc.
addDescription(
"weight-attribute",
"Input",
"Name of the xml attribute which gives the edge weight");
102 oc.
addSynonyme(
"weights.expand",
"expand-weights",
true);
103 oc.
addDescription(
"weights.expand",
"Processing",
"Expand weights behind the simulation's end");
106 oc.
addDescription(
"weights.random-factor",
"Processing",
"Edge weights for routing are dynamically disturbed by a random factor drawn uniformly from [1,FLOAT)");
109 oc.
addDescription(
"routing-algorithm",
"Processing",
"Select among routing algorithms ['dijkstra', 'astar', 'CH', 'CHWrapper']");
112 oc.
addDescription(
"weight-period",
"Processing",
"Aggregation period for the given weight files; triggers rebuilding of Contraction Hierarchy");
115 oc.
addDescription(
"astar.all-distances",
"Processing",
"Initialize lookup table for astar from the given file (generated by marouter --all-pairs-output)");
118 oc.
addDescription(
"astar.landmark-distances",
"Processing",
"Initialize lookup table for astar ALT-variant from the given file");
121 oc.
addDescription(
"astar.save-landmark-distances",
"Processing",
"Save lookup table for astar ALT-variant to the given file");
131 oc.
addDescription(
"gawron.beta",
"Processing",
"Use FLOAT as Gawron's beta");
135 oc.
addDescription(
"gawron.a",
"Processing",
"Use FLOAT as Gawron's a");
138 oc.
addDescription(
"exit-times",
"Output",
"Write exit times (weights) for each edge");
141 oc.
addDescription(
"keep-all-routes",
"Processing",
"Save routes with near zero probability");
144 oc.
addDescription(
"skip-new-routes",
"Processing",
"Only reuse routes from input, do not calculate new ones");
147 oc.
addDescription(
"ptline-routing",
"Processing",
"Route all public transport input");
150 oc.
addDescription(
"logit",
"Processing",
"Use c-logit model (deprecated in favor of --route-choice-method logit)");
153 oc.
addDescription(
"route-choice-method",
"Processing",
"Choose a route choice method: gawron, logit, or lohse");
157 oc.
addDescription(
"logit.beta",
"Processing",
"Use FLOAT as logit's beta");
161 oc.
addDescription(
"logit.gamma",
"Processing",
"Use FLOAT as logit's gamma");
165 oc.
addDescription(
"logit.theta",
"Processing",
"Use FLOAT as logit's theta (negative values mean auto-estimation)");
168 oc.
addDescription(
"persontrip.walkfactor",
"Processing",
"Use FLOAT as a factor on pedestrian maximum speed during intermodal routing");
172 "Where are mode changes from car to walking allowed (possible values: 'parkingAreas', 'ptStops', 'allJunctions' and combinations)");
209 if (oc.
getString(
"routing-algorithm") !=
"dijkstra" && oc.
getString(
"weight-attribute") !=
"traveltime") {
210 WRITE_ERROR(
"Routing algorithm '" + oc.
getString(
"routing-algorithm") +
"' does not support weight-attribute '" + oc.
getString(
"weight-attribute") +
"'.");
213 if (oc.
getBool(
"bulk-routing") && (oc.
getString(
"routing-algorithm") ==
"CH" || oc.
getString(
"routing-algorithm") ==
"CHWrapper")) {
214 WRITE_ERROR(
"Routing algorithm '" + oc.
getString(
"routing-algorithm") +
"' does not support bulk routing.");
217 if (oc.
isDefault(
"routing-algorithm") && (oc.
isSet(
"astar.all-distances") || oc.
isSet(
"astar.landmark-distances") || oc.
isSet(
"astar.save-landmark-distances"))) {
218 oc.
set(
"routing-algorithm",
"astar");
221 if (oc.
getString(
"route-choice-method") !=
"gawron" && oc.
getString(
"route-choice-method") !=
"logit") {
226 WRITE_WARNING(
"The --logit option is deprecated, please use --route-choice-method logit.");
227 oc.
set(
"route-choice-method",
"logit");
230 if (oc.
isSet(
"output-file") && !oc.
isSet(
"alternatives-output")) {
231 const std::string& filename = oc.
getString(
"output-file");
232 const int len = (int)filename.length();
233 if (len > 4 && filename.substr(len - 4) ==
".xml") {
234 oc.
set(
"alternatives-output", filename.substr(0, len - 4) +
".alt.xml");
235 }
else if (len > 4 && filename.substr(len - 4) ==
".sbx") {
236 oc.
set(
"alternatives-output", filename.substr(0, len - 4) +
".alt.sbx");
238 WRITE_WARNING(
"Cannot derive file name for alternatives output, skipping it.");
bool isSet(const std::string &name, bool failOnNonExistant=true) const
Returns the information whether the named option is set.
static void addConfigurationOptions(OptionsCont &oc)
Adds configuration options to the given container.
#define WRITE_WARNING(msg)
ArrivalSpeedDefinition arrivalSpeedProcedure
Information how the vehicle's end speed shall be chosen.
bool set(const std::string &name, const std::string &value)
Sets the given value for the named option.
double departSpeed
(optional) The initial speed of the vehicle
DepartPosDefinition departPosProcedure
Information how the vehicle shall choose the departure position.
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.
std::string getString(const std::string &name) const
Returns the string-value of the named option (only for Option_String)
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.
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.
Structure representing possible vehicle parameter.
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 void addReportOptions(OptionsCont &oc)
Adds reporting options to the given container.
static void addDUAOptions()
Inserts dua options used by duarouter into the OptionsCont-singleton.
void addDescription(const std::string &name, const std::string &subtopic, const std::string &description)
Adds a description for an option.
std::vector< std::string > StringVector
Definition of a vector of strings.
ArrivalLaneDefinition arrivalLaneProcedure
Information how the vehicle shall choose the lane to arrive on.
void addSynonyme(const std::string &name1, const std::string &name2, bool isDeprecated=false)
Adds a synonyme for an options name (any order)
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.
double arrivalPos
(optional) The position the vehicle shall arrive on
void doRegister(const std::string &name, Option *v)
Adds an option under the given name.
ArrivalPosDefinition arrivalPosProcedure
Information how the vehicle shall choose the arrival position.
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.
A storage for options typed value containers)
static void addImportOptions()
Inserts import 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.
bool isDefault(const std::string &name) const
Returns the information whether the named option has still the default value.
void addOptionSubTopic(const std::string &topic)
Adds an option subtopic.
static bool checkOptions(OptionsCont &oc)
Checks whether options are valid.
int departLane
(optional) The lane the vehicle shall depart from (index in edge)
DepartLaneDefinition departLaneProcedure
Information how the vehicle shall choose the lane to depart from.
void addCallExample(const std::string &example, const std::string &desc)
Add a call example.
static void fillOptions(OptionsCont &oc)
Inserts options used by routing applications into the OptionsCont-singleton.
static void insertRandOptions()
Initialises the given options container with random number options.
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.
static void fillOptions()
Inserts options used by duarouter into the OptionsCont-singleton.
double departPos
(optional) The position the vehicle shall depart from
DepartSpeedDefinition departSpeedProcedure
Information how the vehicle's initial speed shall be chosen.
double arrivalSpeed
(optional) The final speed of the vehicle (not used yet)