52 #ifdef CHECK_MEMORY_LEAKS 54 #endif // CHECK_MEMORY_LEAKS 65 oc.
addSynonyme(
"default.lanenumber",
"lanenumber",
true);
66 oc.
addDescription(
"default.lanenumber",
"Building Defaults",
"The default number of lanes in an edge");
69 oc.
addSynonyme(
"default.lanewidth",
"lanewidth",
true);
70 oc.
addDescription(
"default.lanewidth",
"Building Defaults",
"The default width of lanes");
74 oc.
addDescription(
"default.speed",
"Building Defaults",
"The default speed on an edge (in m/s)");
77 oc.
addSynonyme(
"default.priority",
"priority",
true);
78 oc.
addDescription(
"default.priority",
"Building Defaults",
"The default priority of an edge");
81 oc.
addDescription(
"default.sidewalk-width",
"Building Defaults",
"The default width of added sidewalks");
84 oc.
addDescription(
"default.disallow",
"Building Defaults",
"The default for disallowed vehicle classes");
87 oc.
addDescription(
"default.junctions.keep-clear",
"Building Defaults",
"Whether junctions should be kept clear by default");
90 oc.
addDescription(
"default.junctions.radius",
"Building Defaults",
"The default turning radius of intersections");
94 oc.
addDescription(
"no-internal-links",
"Processing",
"Omits internal links");
97 oc.
addDescription(
"numerical-ids",
"Processing",
"Remaps alphanumerical IDs of nodes and edges to ensure that all IDs are integers");
101 oc.
addDescription(
"dismiss-vclasses",
"Processing",
"Removes vehicle class restrictions from imported edges");
105 oc.
addDescription(
"no-turnarounds",
"Processing",
"Disables building turnarounds");
108 oc.
addSynonyme(
"no-turnarounds.tls",
"no-tls-turnarounds",
true);
109 oc.
addDescription(
"no-turnarounds.tls",
"Processing",
"Disables building turnarounds at tls-controlled junctions");
112 oc.
addDescription(
"no-left-connections",
"Processing",
"Disables building connections to left");
116 oc.
addSynonyme(
"geometry.split",
"split-geometry",
true);
117 oc.
addDescription(
"geometry.split",
"Processing",
"Splits edges across geometry nodes");
120 oc.
addSynonyme(
"geometry.remove",
"remove-geometry",
true);
121 oc.
addDescription(
"geometry.remove",
"Processing",
"Replace nodes which only define edge geometry by geometry points (joins edges)");
124 oc.
addDescription(
"geometry.remove.keep-edges.explicit",
"Processing",
"Ensure that the given list of edges is not modified");
127 oc.
addDescription(
"geometry.remove.keep-edges.input-file",
"Processing",
128 "Ensure that the edges in FILE are not modified (Each id on a single line. Selection files from SUMO-GUI are also supported)");
131 oc.
addDescription(
"geometry.max-segment-length",
"Processing",
"splits geometry to restrict segment length");
134 oc.
addDescription(
"geometry.min-dist",
"Processing",
"reduces too similar geometry points");
137 oc.
addDescription(
"geometry.max-angle",
"Processing",
"Warn about edge geometries with an angle above DEGREES in successive segments");
140 oc.
addDescription(
"geometry.min-radius",
"Processing",
"Warn about edge geometries with a turning radius less than METERS at the start or end");
143 oc.
addDescription(
"geometry.min-radius.fix",
"Processing",
"Straighten edge geometries to avoid turning radii less than geometry.min-radius");
146 oc.
addDescription(
"geometry.junction-mismatch-threshold",
"Processing",
"Warn if the junction shape is to far away from the original node position");
150 oc.
addSynonyme(
"offset.disable-normalization",
"disable-normalize-node-positions",
true);
151 oc.
addDescription(
"offset.disable-normalization",
"Processing",
"Turn off normalizing node positions");
154 oc.
addSynonyme(
"offset.x",
"x-offset-to-apply",
true);
155 oc.
addDescription(
"offset.x",
"Processing",
"Adds FLOAT to net x-positions");
158 oc.
addSynonyme(
"offset.y",
"y-offset-to-apply",
true);
159 oc.
addDescription(
"offset.y",
"Processing",
"Adds FLOAT to net y-positions");
163 oc.
addDescription(
"flip-y-axis",
"Processing",
"Flips the y-coordinate along zero");
166 oc.
addSynonyme(
"roundabouts.guess",
"guess-roundabouts",
true);
167 oc.
addDescription(
"roundabouts.guess",
"Processing",
"Enable roundabout-guessing");
170 oc.
addDescription(
"opposites.guess",
"Processing",
"Enable guessing of opposite direction lanes usable for overtaking");
173 oc.
addDescription(
"lefthand",
"Processing",
"Assumes left-hand traffic on the network");
177 "Merges edges which connect the same nodes and are close to each other (recommended for VISSIM import)");
181 "Joins junctions that are close to each other (recommended for OSM import)");
185 "Determines the maximal distance for joining junctions (defaults to 10)");
189 oc.
addDescription(
"junctions.join-exclude",
"Processing",
"Interprets STR as list of junctions to exclude from joining");
192 oc.
addDescription(
"speed.offset",
"Processing",
"Modifies all edge speeds by adding FLOAT");
195 oc.
addDescription(
"speed.factor",
"Processing",
"Modifies all edge speeds by multiplying by FLOAT");
198 oc.
addDescription(
"speed.minimum",
"Processing",
"Modifies all edge speeds to at least FLOAT");
202 oc.
addDescription(
"junctions.corner-detail",
"Processing",
"Generate INT intermediate points to smooth out intersection corners");
205 oc.
addDescription(
"junctions.internal-link-detail",
"Processing",
"Generate INT intermediate points to smooth out lanes within the intersection");
208 oc.
addDescription(
"junctions.scurve-stretch",
"Processing",
"Generate longer intersections to allow for smooth s-curves when the number of lanes changes");
211 oc.
addDescription(
"rectangular-lane-cut",
"Processing",
"Forces rectangular cuts between lanes and intersections");
215 "Allow driving onto a multi-lane road if there are foes on other lanes (at roundabouts)");
219 "Allow driving onto a multi-lane road if there are foes on other lanes (everywhere)");
223 "Guess pedestrian sidewalks based on edge speed");
227 "Add sidewalks for edges with a speed equal or below the given limit");
231 "Add sidewalks for edges with a speed above the given limit");
234 oc.
addDescription(
"sidewalks.guess.from-permissions",
"Processing",
235 "Add sidewalks for edges that allow pedestrians on any of their lanes regardless of speed");
239 "Do not guess sidewalks for the given list of edges");
243 "Guess pedestrian crossings based on the presence of sidewalks");
246 oc.
addDescription(
"crossings.guess.speed-threshold",
"Processing",
247 "At uncontrolled nodes, do not build crossings across edges with a speed above the threshold");
253 oc.
addDescription(
"tls.set",
"TLS Building",
"Interprets STR as list of junctions to be controlled by TLS");
256 oc.
addSynonyme(
"tls.unset",
"explicite-no-tls",
true);
257 oc.
addDescription(
"tls.unset",
"TLS Building",
"Interprets STR as list of junctions to be not controlled by TLS");
262 oc.
addDescription(
"tls.guess",
"TLS Building",
"Turns on TLS guessing");
266 oc.
addSynonyme(
"tls.taz-nodes",
"tls-guess.district-nodes",
true);
267 oc.
addDescription(
"tls.taz-nodes",
"TLS Building",
"Sets district nodes as tls-controlled");
271 oc.
addDescription(
"tls-guess.joining",
"TLS Building",
"Includes node clusters into guess");
275 oc.
addDescription(
"tls.join",
"TLS Building",
"Tries to cluster tls-controlled nodes");
279 "Determines the maximal distance for joining traffic lights (defaults to 20)");
283 "Do not control edges that lie fully within a joined traffic light. This may cause collisions but allows old traffic light plans to be used");
287 oc.
addDescription(
"tls.guess-signals",
"TLS Building",
"Interprets tls nodes surrounding an intersection as signal positions for a larger TLS. This is typical pattern for OSM-derived networks");
290 oc.
addDescription(
"tls.guess-signals.dist",
"TLS Building",
"Distance for interpreting nodes as signal locations");
296 oc.
addDescription(
"tls.cycle.time",
"TLS Building",
"Use INT as cycle duration");
299 oc.
addSynonyme(
"tls.green.time",
"traffic-light-green",
true);
300 oc.
addDescription(
"tls.green.time",
"TLS Building",
"Use INT as green phase duration");
303 oc.
addSynonyme(
"tls.yellow.min-decel",
"min-decel",
true);
304 oc.
addDescription(
"tls.yellow.min-decel",
"TLS Building",
"Defines smallest vehicle deceleration");
307 oc.
addSynonyme(
"tls.yellow.patch-small",
"patch-small-tyellow",
true);
308 oc.
addDescription(
"tls.yellow.patch-small",
"TLS Building",
"Given yellow times are patched even if being too short");
311 oc.
addSynonyme(
"tls.yellow.time",
"traffic-light-yellow",
true);
312 oc.
addDescription(
"tls.yellow.time",
"TLS Building",
"Set INT as fixed time for yellow phase durations");
315 oc.
addDescription(
"tls.left-green.time",
"TLS Building",
"Use INT as green phase duration for left turns (s). Setting this value to 0 disables additional left-turning phases");
319 oc.
addSynonyme(
"tls.half-offset",
"tl-logics.half-offset",
true);
320 oc.
addDescription(
"tls.half-offset",
"TLS Building",
"TLSs in STR will be shifted by half-phase");
323 oc.
addSynonyme(
"tls.quarter-offset",
"tl-logics.quarter-offset",
true);
324 oc.
addDescription(
"tls.quarter-offset",
"TLS Building",
"TLSs in STR will be shifted by quarter-phase");
328 oc.
addDescription(
"tls.default-type",
"TLS Building",
"TLSs with unspecified type will use STR as their algorithm");
333 oc.
addSynonyme(
"keep-edges.min-speed",
"edges-min-speed",
true);
334 oc.
addDescription(
"keep-edges.min-speed",
"Edge Removal",
"Only keep edges with speed in meters/second > FLOAT");
337 oc.
addSynonyme(
"remove-edges.explicit",
"remove-edges");
338 oc.
addDescription(
"remove-edges.explicit",
"Edge Removal",
"Remove edges in STR");
341 oc.
addSynonyme(
"keep-edges.explicit",
"keep-edges");
342 oc.
addDescription(
"keep-edges.explicit",
"Edge Removal",
"Only keep edges in STR");
345 oc.
addDescription(
"keep-edges.input-file",
"Edge Removal",
"Only keep edges in FILE (Each id on a single line. Selection files from SUMO-GUI are also supported)");
348 oc.
addDescription(
"remove-edges.input-file",
"Edge Removal",
"Remove edges in FILE. (Each id on a single line. Selection files from SUMO-GUI are also supported)");
352 oc.
addDescription(
"keep-edges.postload",
"Edge Removal",
"Remove edges after joining");
356 oc.
addDescription(
"keep-edges.in-boundary",
"Edge Removal",
"Only keep edges which are located within the given boundary (given either as CARTESIAN corner coordinates <xmin,ymin,xmax,ymax> or as polygon <x0,y0,x1,y1,...>)");
359 oc.
addDescription(
"keep-edges.in-geo-boundary",
"Edge Removal",
"Only keep edges which are located within the given boundary (given either as GEODETIC corner coordinates <lon-min,lat-min,lon-max,lat-max> or as polygon <lon0,lat0,lon1,lat1,...>)");
363 oc.
addDescription(
"keep-edges.by-vclass",
"Edge Removal",
"Only keep edges which allow one of the vclasss in STR");
366 oc.
addDescription(
"remove-edges.by-vclass",
"Edge Removal",
"Remove edges which allow only vclasses from STR");
369 oc.
addDescription(
"keep-edges.by-type",
"Edge Removal",
"Only keep edges where type is in STR");
372 oc.
addDescription(
"remove-edges.by-type",
"Edge Removal",
"Remove edges where type is in STR");
375 oc.
addSynonyme(
"remove-edges.isolated",
"remove-isolated",
true);
376 oc.
addDescription(
"remove-edges.isolated",
"Edge Removal",
"Removes isolated edges");
383 oc.
addSynonyme(
"keep-nodes-unregulated",
"keep-unregulated");
384 oc.
addDescription(
"keep-nodes-unregulated",
"Unregulated Nodes",
"All nodes will be unregulated");
387 oc.
addSynonyme(
"keep-nodes-unregulated.explicit",
"keep-unregulated.explicit");
388 oc.
addSynonyme(
"keep-nodes-unregulated.explicit",
"keep-unregulated.nodes",
true);
389 oc.
addDescription(
"keep-nodes-unregulated.explicit",
"Unregulated Nodes",
"Do not regulate nodes in STR");
392 oc.
addSynonyme(
"keep-nodes-unregulated.district-nodes",
"keep-unregulated.district-nodes");
393 oc.
addDescription(
"keep-nodes-unregulated.district-nodes",
"Unregulated Nodes",
"Do not regulate district nodes");
398 oc.
addSynonyme(
"ramps.guess",
"guess-ramps",
true);
399 oc.
addDescription(
"ramps.guess",
"Ramp Guessing",
"Enable ramp-guessing");
402 oc.
addSynonyme(
"ramps.max-ramp-speed",
"ramp-guess.max-ramp-speed",
true);
403 oc.
addDescription(
"ramps.max-ramp-speed",
"Ramp Guessing",
"Treat edges with speed > FLOAT as no ramps");
406 oc.
addSynonyme(
"ramps.min-highway-speed",
"ramp-guess.min-highway-speed",
true);
407 oc.
addDescription(
"ramps.min-highway-speed",
"Ramp Guessing",
"Treat edges with speed < FLOAT as no highways");
410 oc.
addSynonyme(
"ramps.ramp-length",
"ramp-guess.ramp-length",
true);
411 oc.
addDescription(
"ramps.ramp-length",
"Ramp Guessing",
"Use FLOAT as ramp-length");
414 oc.
addSynonyme(
"ramps.set",
"ramp-guess.explicite",
true);
415 oc.
addDescription(
"ramps.set",
"Ramp Guessing",
"Tries to handle the given edges as ramps");
418 oc.
addDescription(
"ramps.unset",
"Ramp Guessing",
"Do not consider the given edges as ramps");
421 oc.
addSynonyme(
"ramps.no-split",
"ramp-guess.no-split",
true);
422 oc.
addDescription(
"ramps.no-split",
"Ramp Guessing",
"Avoids edge splitting");
432 if (!oc.
isDefault(
"tls-guess.joining")) {
433 WRITE_WARNING(
"'--tls-guess.joining' was joined with '--tls.join'.\n Please use '--tls.join' in future only.");
434 if (!oc.
isSet(
"tls.join")) {
435 oc.
set(
"tls.join",
"true");
439 WRITE_ERROR(
"unsupported value '" + oc.
getString(
"tls.default-type") +
"' for option '--tls.default-type'");
442 if (oc.
isSet(
"keep-edges.in-boundary") && oc.
isSet(
"keep-edges.in-geo-boundary")) {
443 WRITE_ERROR(
"only one of the options 'keep-edges.in-boundary' or 'keep-edges.in-geo-boundary' may be given");
446 if (oc.
getBool(
"no-internal-links") && oc.
getBool(
"crossings.guess")) {
447 WRITE_ERROR(
"only one of the options 'no-internal-links' or 'crossings.guess' may be given");
451 WRITE_ERROR(
"only one of the options 'tls.green.time' or 'tls.cycle.time' may be given");
454 if (oc.
getInt(
"junctions.internal-link-detail") < 2) {
455 WRITE_ERROR(
"junctions.internal-link-detail must >= 2");
458 if (oc.
getFloat(
"junctions.scurve-stretch") > 0) {
459 if (oc.
getBool(
"no-internal-links")) {
460 WRITE_WARNING(
"option 'junctions.scurve-stretch' requires internal lanes to work. Option '--no-internal-links' was disabled.");
463 oc.
set(
"no-internal-links",
"false");
void doRegister(const std::string &name, Option *v)
Adds an option under the given name.
static const SUMOReal UNSPECIFIED_WIDTH
unspecified lane width
static bool checkOptions()
Checks set options from the OptionsCont-singleton for being valid.
int getInt(const std::string &name) const
Returns the int-value of the named option (only for Option_Integer)
bool getBool(const std::string &name) const
Returns the boolean-value of the named option (only for Option_Bool)
bool isDefault(const std::string &name) const
Returns the information whether the named option has still the default value.
#define WRITE_WARNING(msg)
static OptionsCont & getOptions()
Retrieves the options.
void addSynonyme(const std::string &name1, const std::string &name2, bool isDeprecated=false)
Adds a synonyme for an options name (any order)
bool isSet(const std::string &name, bool failOnNonExistant=true) const
Returns the information whether the named option is set.
static StringBijection< TrafficLightType > TrafficLightTypes
std::string getString(const std::string &name) const
Returns the string-value of the named option (only for Option_String)
bool set(const std::string &name, const std::string &value)
Sets the given value for the named option.
A storage for options typed value containers)
static void fillOptions(bool forNetgen)
Inserts options used by the network converter.
void addDescription(const std::string &name, const std::string &subtopic, const std::string &description)
Adds a description for an option.
SUMOReal getFloat(const std::string &name) const
Returns the SUMOReal-value of the named option (only for Option_Float)