60 #ifdef CHECK_MEMORY_LEAKS 62 #endif // CHECK_MEMORY_LEAKS 71 oc.
addCallExample(
"-b 0 -e 1000 -n net.xml -r routes.xml",
"start a simulation from time 0 to 1000 with given net and routes");
72 oc.
addCallExample(
"-c munich_config.cfg",
"start with a configuration file");
89 oc.
addDescription(
"net-file",
"Input",
"Load road network description from FILE");
94 oc.
addDescription(
"route-files",
"Input",
"Load routes descriptions from FILE(s)");
98 oc.
addDescription(
"additional-files",
"Input",
"Load further descriptions from FILE(s)");
102 oc.
addDescription(
"weight-files",
"Input",
"Load edge/lane weights for online rerouting from FILE");
104 oc.
addSynonyme(
"weight-attribute",
"measure",
true);
105 oc.
addDescription(
"weight-attribute",
"Input",
"Name of the xml attribute which gives the edge weight");
108 oc.
addDescription(
"load-state",
"Input",
"Loads a network state from FILE");
110 oc.
addDescription(
"load-state.offset",
"Input",
"Shifts all times loaded from a saved state by the given offset");
116 oc.
addSynonyme(
"netstate-dump",
"netstate-output");
117 oc.
addDescription(
"netstate-dump",
"Output",
"Save complete network states into FILE");
119 oc.
addSynonyme(
"netstate-dump.empty-edges",
"netstate.empty-edges");
120 oc.
addSynonyme(
"netstate-dump.empty-edges",
"netstate-output.empty-edges");
121 oc.
addSynonyme(
"netstate-dump.empty-edges",
"dump-empty-edges",
true);
122 oc.
addDescription(
"netstate-dump.empty-edges",
"Output",
"Write also empty edges completely when dumping");
124 oc.
addSynonyme(
"netstate-dump.precision",
"netstate.precision");
125 oc.
addSynonyme(
"netstate-dump.precision",
"netstate-output.precision");
126 oc.
addSynonyme(
"netstate-dump.precision",
"dump-precision",
true);
127 oc.
addDescription(
"netstate-dump.precision",
"Output",
"Write positions and speeds with the given precision (default 2)");
131 oc.
addDescription(
"emission-output",
"Output",
"Save the emission values of each vehicle");
133 oc.
addDescription(
"emission-output.precision",
"Output",
"Write emission values with the given precision (default 2)");
136 oc.
addDescription(
"battery-output",
"Output",
"Save the battery values of each vehicle");
138 oc.
addDescription(
"battery-output.precision",
"Output",
"Write battery values with the given precision (default 2)");
141 oc.
addDescription(
"fcd-output",
"Output",
"Save the Floating Car Data");
143 oc.
addDescription(
"fcd-output.geo",
"Output",
"Save the Floating Car Data using geo-coordinates (lon/lat)");
145 oc.
addDescription(
"fcd-output.signals",
"Output",
"Add the vehicle signal state to the FCD output (brake lights etc.)");
147 oc.
addDescription(
"full-output",
"Output",
"Save a lot of information for each timestep (very redundant)");
149 oc.
addDescription(
"queue-output",
"Output",
"Save the vehicle queues at the junctions (experimental)");
151 oc.
addDescription(
"vtk-output",
"Output",
"Save complete vehicle positions inclusive speed values in the VTK Format (usage: /path/out will produce /path/out_$TIMESTEP$.vtp files)");
153 oc.
addDescription(
"amitran-output",
"Output",
"Save the vehicle trajectories in the Amitran format");
158 oc.
addDescription(
"summary-output",
"Output",
"Save aggregated vehicle departure info into FILE");
162 oc.
addDescription(
"tripinfo-output",
"Output",
"Save single vehicle trip info into FILE");
165 oc.
addDescription(
"tripinfo-output.write-unfinished",
"Output",
"Write tripinfo output for vehicles which have not arrived at simulation end");
169 oc.
addDescription(
"vehroute-output",
"Output",
"Save single vehicle route info into FILE");
172 oc.
addSynonyme(
"vehroute-output.exit-times",
"vehroutes.exit-times");
173 oc.
addDescription(
"vehroute-output.exit-times",
"Output",
"Write the exit times for all edges");
176 oc.
addSynonyme(
"vehroute-output.last-route",
"vehroutes.last-route");
177 oc.
addDescription(
"vehroute-output.last-route",
"Output",
"Write the last route only");
180 oc.
addSynonyme(
"vehroute-output.sorted",
"vehroutes.sorted");
181 oc.
addDescription(
"vehroute-output.sorted",
"Output",
"Sorts the output by departure time");
184 oc.
addSynonyme(
"vehroute-output.dua",
"vehroutes.dua");
185 oc.
addDescription(
"vehroute-output.dua",
"Output",
"Write the output in the duarouter alternatives style");
188 oc.
addSynonyme(
"vehroute-output.intended-depart",
"vehroutes.intended-depart");
189 oc.
addDescription(
"vehroute-output.intended-depart",
"Output",
"Write the output with the intended instead of the real departure time");
192 oc.
addSynonyme(
"vehroute-output.route-length",
"vehroutes.route-length");
193 oc.
addDescription(
"vehroute-output.route-length",
"Output",
"Include total route length in the output");
196 oc.
addDescription(
"vehroute-output.write-unfinished",
"Output",
"Write vehroute output for vehicles which have not arrived at simulation end");
199 oc.
addDescription(
"link-output",
"Output",
"Save links states into FILE");
202 oc.
addDescription(
"bt-output",
"Output",
"Save bluetooth visibilities into FILE (in conjunction with device.btreceiver and device.btsender)");
207 oc.
addDescription(
"movereminder-output",
"Output",
"Save movereminder states of selected vehicles into FILE");
209 oc.
addDescription(
"movereminder-output.vehicles",
"Output",
"List of vehicle ids which shall save their movereminder states");
213 oc.
addDescription(
"save-state.times",
"Output",
"Use INT[] as times at which a network state written");
215 oc.
addDescription(
"save-state.prefix",
"Output",
"Prefix for network states");
217 oc.
addDescription(
"save-state.files",
"Output",
"Files for network states");
221 oc.
addDescription(
"begin",
"Time",
"Defines the begin time in seconds; The simulation starts at this time");
224 oc.
addDescription(
"end",
"Time",
"Defines the end time in seconds; The simulation ends at this time");
227 oc.
addDescription(
"step-length",
"Time",
"Defines the step duration in seconds");
231 oc.
addDescription(
"route-steps",
"Processing",
"Load routes for the next number of seconds ahead");
233 #ifdef HAVE_INTERNAL_LANES 235 oc.
addDescription(
"no-internal-links",
"Processing",
"Disable (junction) internal links");
238 oc.
addDescription(
"ignore-junction-blocker",
"Processing",
"Ignore vehicles which block the junction after they have been standing for SECONDS (-1 means never ignore)");
242 oc.
addDescription(
"ignore-accidents",
"Processing",
"Do not check whether accidents occur");
245 oc.
addDescription(
"ignore-route-errors",
"Processing",
"Do not check whether routes are connected");
248 oc.
addDescription(
"max-num-vehicles",
"Processing",
"Delay vehicle insertion to stay within the given maximum number");
251 oc.
addDescription(
"scale",
"Processing",
"Scale demand by the given factor (by discarding or duplicating vehicles)");
254 oc.
addDescription(
"time-to-teleport",
"Processing",
"Specify how long a vehicle may wait until being teleported, defaults to 300, non-positive values disable teleporting");
257 oc.
addDescription(
"time-to-teleport.highways",
"Processing",
"The waiting time after which vehicles on a fast road (speed > 69m/s) are teleported if they are on a non-continuing lane");
260 oc.
addDescription(
"waiting-time-memory",
"Processing",
"Length of time interval, over which accumulated waiting time is taken into account");
263 oc.
addDescription(
"max-depart-delay",
"Processing",
"How long vehicles wait for departure before being skipped, defaults to -1 which means vehicles are never skipped");
266 oc.
addDescription(
"sloppy-insert",
"Processing",
"Whether insertion on an edge shall not be repeated in same step once failed");
269 oc.
addDescription(
"eager-insert",
"Processing",
"Whether each vehicle is checked separately for insertion on an edge");
272 oc.
addDescription(
"random-depart-offset",
"Processing",
"Each vehicle receives a random offset to its depart value drawn uniformly from [0, TIME]");
275 oc.
addDescription(
"lanechange.allow-swap",
"Processing",
"Whether blocking vehicles trying to change lanes may be swapped");
278 oc.
addDescription(
"lanechange.duration",
"Processing",
"Duration of a lane change maneuver (default 0)");
281 oc.
addDescription(
"lanechange.overtake-right",
"Processing",
"Whether overtaking on the right on motorways is permitted");
285 oc.
addDescription(
"pedestrian.model",
"Processing",
"Select among pedestrian models ['nonInteracting', 'striping']");
288 oc.
addDescription(
"pedestrian.striping.stripe-width",
"Processing",
"Width of parallel stripes for segmenting a sidewalk (meters) for use with model 'striping'");
291 oc.
addDescription(
"pedestrian.striping.dawdling",
"Processing",
"factor for random slow-downs [0,1] for use with model 'striping'");
294 oc.
addDescription(
"pedestrian.striping.jamtime",
"Processing",
"Time in seconds after which pedestrians start squeezing through a jam when using model 'striping' (non-positive values disable squeezing)");
299 "Select among routing algorithms ['dijkstra', 'astar', 'CH', 'CHWrapper']");
301 oc.
addDescription(
"weights.random-factor",
"Routing",
"Edge weights for routing are dynamically disturbed by a random factor drawn uniformly from [1,FLOAT)");
306 oc.
addDescription(
"phemlight-path",
"Emissions",
"Determines where to load PHEMlight definitions from.");
314 oc.
addSynonyme(
"duration-log.disable",
"no-duration-log",
false);
315 oc.
addDescription(
"duration-log.disable",
"Report",
"Disable performance reports for individual simulation steps");
318 oc.
addDescription(
"duration-log.statistics",
"Report",
"Enable statistics on vehicle trips");
321 oc.
addDescription(
"no-step-log",
"Report",
"Disable console output of current simulation step");
328 oc.
addDescription(
"remote-port",
"TraCI Server",
"Enables TraCI Server if set");
331 oc.
addDescription(
"python-script",
"TraCI Server",
"Runs TraCI script with embedded python");
337 oc.
addDescription(
"mesosim",
"Mesoscopic",
"Enables mesoscopic simulation");
339 oc.
addDescription(
"meso-edgelength",
"Mesoscopic",
"Length of an edge segment in mesoscopic simulation");
341 oc.
addDescription(
"meso-tauff",
"Mesoscopic",
"Factor for calculating the free-free headway time");
343 oc.
addDescription(
"meso-taufj",
"Mesoscopic",
"Factor for calculating the free-jam headway time");
345 oc.
addDescription(
"meso-taujf",
"Mesoscopic",
"Factor for calculating the jam-free headway time");
347 oc.
addDescription(
"meso-taujj",
"Mesoscopic",
"Factor for calculating the jam-jam headway time");
350 "Minimum percentage of occupied space to consider a segment jammed. A negative argument causes thresholds to be computed based on edge speed and tauff (default)");
352 oc.
addDescription(
"meso-multi-queue",
"Mesoscopic",
"Enable multiple queues at edge ends");
354 oc.
addDescription(
"meso-junction-control",
"Mesoscopic",
"Enable mesoscopic traffic light and priority junction handling");
357 "Enable mesoscopic traffic light and priority junction handling for saturated links. This prevents faulty traffic lights from hindering flow in low-traffic situations");
360 "Apply scaled time penalties when driving across tls controlled junctions based on green split instead of checking actual phases");
362 oc.
addDescription(
"meso-overtaking",
"Mesoscopic",
"Enable mesoscopic overtaking");
364 oc.
addDescription(
"meso-recheck",
"Mesoscopic",
"Time interval for rechecking insertion into the next segment after failure");
373 oc.
addDescription(
"gui-settings-file",
"GUI Only",
"Load visualisation settings from FILE");
376 oc.
addDescription(
"quit-on-end",
"GUI Only",
"Quits the GUI when the simulation stops");
379 oc.
addDescription(
"game",
"GUI Only",
"Start the GUI in gaming mode");
382 oc.
addDescription(
"start",
"GUI Only",
"Start the simulation after loading");
385 oc.
addDescription(
"disable-textures",
"GUI Only",
"Do not load background pictures");
389 oc.
addDescription(
"osg-view",
"GUI Only",
"Start with an OpenSceneGraph view instead of the regular 2D view");
426 if (!oc.
isSet(
"net-file")) {
436 if (oc.
getBool(
"vehroute-output.exit-times") && !oc.
isSet(
"vehroute-output")) {
437 WRITE_ERROR(
"A vehroute-output file is needed for exit times.");
440 if (oc.
isSet(
"gui-settings-file") &&
441 oc.
getString(
"gui-settings-file") !=
"" &&
445 if (oc.
getBool(
"meso-junction-control.limited") && !oc.
getBool(
"meso-junction-control")) {
446 oc.
set(
"meso-junction-control",
"true");
451 WRITE_ERROR(
"The begin time should not be negative.");
456 WRITE_ERROR(
"The end time should be after the begin time.");
465 if (oc.
isSet(
"movereminder-output.vehicles") && !oc.
isSet(
"movereminder-output")) {
466 WRITE_ERROR(
"option movereminder-output.vehicles requires option movereminder-output to be set");
470 if (oc.
getBool(
"sloppy-insert")) {
471 WRITE_WARNING(
"The option 'sloppy-insert' is deprecated, because it is now activated by default, see the new option 'eager-insert'.");
473 if (oc.
getBool(
"lanechange.allow-swap")) {
474 WRITE_WARNING(
"The option 'lanechange.allow-swap' is deprecated, and will not be supported in future versions of SUMO.");
477 oc.
set(
"verbose",
"true");
488 #ifdef HAVE_INTERNAL_LANES 509 MSGlobals::gUsingInternalLanes =
false;
517 if (oc.
isSet(
"movereminder-output")) {
518 MSBaseVehicle::initMoveReminderOutput(oc);
static bool gOmitEmptyEdgesOnDump
Information whether empty edges shall be written on dump.
void doRegister(const std::string &name, Option *v)
Adds an option under the given name.
static void insertRandOptions()
Initialises the given options container with random number options.
static void addReportOptions(OptionsCont &oc)
Adds reporting options to the given container.
static void buildStreams()
Builds the streams used possibly by the simulation.
void addCallExample(const std::string &example, const std::string &desc)
Add a call example.
bool getBool(const std::string &name) const
Returns the boolean-value of the named option (only for Option_Bool)
static bool gStateLoaded
Information whether a state has been loaded.
SUMOReal getFloat(const std::string &name) const
Returns the SUMOReal-value of the named option (only for Option_Float)
static bool gMesoOvertaking
static void addConfigurationOptions(OptionsCont &oc)
Adds configuration options to the given container.
#define WRITE_WARNING(msg)
static OptionsCont & getOptions()
Retrieves the options.
static bool gCheck4Accidents
static void fillOptions()
Inserts options used by the simulation into the OptionsCont-singleton.
void addSynonyme(const std::string &name1, const std::string &name2, bool isDeprecated=false)
Adds a synonyme for an options name (any order)
std::string getString(const std::string &name) const
Returns the string-value of the named option (only for Option_String)
static void init()
Static intialization.
std::vector< int > IntVector
Definition of a vector of unsigned ints.
bool isUsableFileList(const std::string &name) const
Checks whether the named option is usable as a file list (with at least a single file) ...
SUMOTime string2time(const std::string &r)
void addOptionSubTopic(const std::string &topic)
Adds an option subtopic.
static bool gUsingInternalLanes
Information whether the simulation regards internal lanes.
static void initGlobalOptions(const OptionsCont &oc)
init global model parameters
bool isDefault(const std::string &name) const
Returns the information whether the named option has still the default value.
std::string toString(const T &t, std::streamsize accuracy=OUTPUT_ACCURACY)
static bool checkOptions()
Checks the set options.
static SUMOTime gTimeToGridlockHighways
bool set(const std::string &name, const std::string &value)
Sets the given value for the named option.
void addXMLDefault(const std::string &name, const std::string &xmlRoot="")
Adds an XML root element to handle by default. The special root "" denotes the default handler...
A storage for options typed value containers)
static SUMOTime gTimeToGridlock
static void insertOptions(OptionsCont &oc)
Inserts options for building devices.
static SUMOTime gWaitingTimeMemory
length of memory for waiting times (in millisecs)
static SUMOTime gIgnoreJunctionBlocker
Information whether the simulation regards internal lanes.
static bool createDeviceByOption(const std::string &optionName, const std::string &rootElement="", const std::string &schemaFile="")
Creates the device using the output definition stored in the named option.
static void setMSGlobals(OptionsCont &oc)
Sets the global microsim-options.
void addDescription(const std::string &name, const std::string &subtopic, const std::string &description)
Adds a description for an option.
static SUMOReal gMesoTLSPenalty
static SUMOTime gLaneChangeDuration
static bool gMesoLimitedJunctionControl
bool isSet(const std::string &name, bool failOnNonExistant=true) const
Returns the information whether the named option is set.