Eclipse SUMO - Simulation of Urban MObility
MSFrame.cpp
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2002-2019 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials
5 // are made available under the terms of the Eclipse Public License v2.0
6 // which accompanies this distribution, and is available at
7 // http://www.eclipse.org/legal/epl-v20.html
8 // SPDX-License-Identifier: EPL-2.0
9 /****************************************************************************/
20 // Sets and checks options for microsim; inits global outputs and settings
21 /****************************************************************************/
22 
23 
24 // ===========================================================================
25 // included modules
26 // ===========================================================================
27 #include <config.h>
28 
29 #include <iostream>
30 #include <iomanip>
31 #include <fstream>
32 #include <ctime>
34 #include <utils/options/Option.h>
37 #include <utils/common/ToString.h>
42 #include <microsim/MSBaseVehicle.h>
43 #include <microsim/MSJunction.h>
44 #include <microsim/MSRoute.h>
45 #include <microsim/MSNet.h>
46 #include <microsim/MSGlobals.h>
52 #include "MSFrame.h"
54 
55 
56 // ===========================================================================
57 // method definitions
58 // ===========================================================================
59 void
62  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");
63  oc.addCallExample("-c munich_config.cfg", "start with a configuration file");
64  oc.addCallExample("--help", "print help");
65 
66  // insert options sub-topics
67  SystemFrame::addConfigurationOptions(oc); // fill this subtopic, too
68  oc.addOptionSubTopic("Input");
69  oc.addOptionSubTopic("Output");
70  oc.addOptionSubTopic("Time");
71  oc.addOptionSubTopic("Processing");
72  oc.addOptionSubTopic("Routing");
73  SystemFrame::addReportOptions(oc); // fill this subtopic, too
74 
75 
76  // register configuration options
77  // register input options
78  oc.doRegister("net-file", 'n', new Option_FileName());
79  oc.addSynonyme("net-file", "net");
80  oc.addDescription("net-file", "Input", "Load road network description from FILE");
81  oc.addXMLDefault("net-file", "net");
82 
83  oc.doRegister("route-files", 'r', new Option_FileName());
84  oc.addSynonyme("route-files", "routes");
85  oc.addDescription("route-files", "Input", "Load routes descriptions from FILE(s)");
86 
87  oc.doRegister("additional-files", 'a', new Option_FileName());
88  oc.addSynonyme("additional-files", "additional");
89  oc.addDescription("additional-files", "Input", "Load further descriptions from FILE(s)");
90 
91  oc.doRegister("weight-files", 'w', new Option_FileName());
92  oc.addSynonyme("weight-files", "weights");
93  oc.addDescription("weight-files", "Input", "Load edge/lane weights for online rerouting from FILE");
94  oc.doRegister("weight-attribute", 'x', new Option_String("traveltime"));
95  oc.addSynonyme("weight-attribute", "measure", true);
96  oc.addDescription("weight-attribute", "Input", "Name of the xml attribute which gives the edge weight");
97 
98  oc.doRegister("load-state", new Option_FileName());
99  oc.addDescription("load-state", "Input", "Loads a network state from FILE");
100  oc.doRegister("load-state.offset", new Option_String("0", "TIME"));
101  oc.addDescription("load-state.offset", "Input", "Shifts all times loaded from a saved state by the given offset");
102  oc.doRegister("load-state.remove-vehicles", new Option_StringVector(StringVector({""})));
103  oc.addDescription("load-state.remove-vehicles", "Input", "Removes vehicles with the given IDs from the loaded state");
104 
105  // register output options
106  oc.doRegister("netstate-dump", new Option_FileName());
107  oc.addSynonyme("netstate-dump", "ndump");
108  oc.addSynonyme("netstate-dump", "netstate");
109  oc.addSynonyme("netstate-dump", "netstate-output");
110  oc.addDescription("netstate-dump", "Output", "Save complete network states into FILE");
111  oc.doRegister("netstate-dump.empty-edges", new Option_Bool(false));
112  oc.addSynonyme("netstate-dump.empty-edges", "netstate.empty-edges");
113  oc.addSynonyme("netstate-dump.empty-edges", "netstate-output.empty-edges");
114  oc.addSynonyme("netstate-dump.empty-edges", "dump-empty-edges", true);
115  oc.addDescription("netstate-dump.empty-edges", "Output", "Write also empty edges completely when dumping");
116  oc.doRegister("netstate-dump.precision", new Option_Integer(2));
117  oc.addSynonyme("netstate-dump.precision", "netstate.precision");
118  oc.addSynonyme("netstate-dump.precision", "netstate-output.precision");
119  oc.addSynonyme("netstate-dump.precision", "dump-precision", true);
120  oc.addDescription("netstate-dump.precision", "Output", "Write positions and speeds with the given precision (default 2)");
121 
122 
123  oc.doRegister("emission-output", new Option_FileName());
124  oc.addDescription("emission-output", "Output", "Save the emission values of each vehicle");
125  oc.doRegister("emission-output.precision", new Option_Integer(2));
126  oc.addDescription("emission-output.precision", "Output", "Write emission values with the given precision (default 2)");
127 
128  oc.doRegister("battery-output", new Option_FileName());
129  oc.addDescription("battery-output", "Output", "Save the battery values of each vehicle");
130  oc.doRegister("battery-output.precision", new Option_Integer(2));
131  oc.addDescription("battery-output.precision", "Output", "Write battery values with the given precision (default 2)");
132 
133  oc.doRegister("chargingstations-output", new Option_FileName());
134  oc.addDescription("chargingstations-output", "Output", "Write data of charging stations");
135 
136  oc.doRegister("fcd-output", new Option_FileName());
137  oc.addDescription("fcd-output", "Output", "Save the Floating Car Data");
138  oc.doRegister("fcd-output.geo", new Option_Bool(false));
139  oc.addDescription("fcd-output.geo", "Output", "Save the Floating Car Data using geo-coordinates (lon/lat)");
140  oc.doRegister("fcd-output.signals", new Option_Bool(false));
141  oc.addDescription("fcd-output.signals", "Output", "Add the vehicle signal state to the FCD output (brake lights etc.)");
142  oc.doRegister("fcd-output.distance", new Option_Bool(false));
143  oc.addDescription("fcd-output.distance", "Output", "Add kilometrage to the FCD output (linear referencing)");
144  oc.doRegister("fcd-output.filter-edges.input-file", new Option_FileName());
145  oc.addDescription("fcd-output.filter-edges.input-file", "Output", "Restrict fcd output to the edge selection from the given input file");
146 
147 
148  oc.doRegister("full-output", new Option_FileName());
149  oc.addDescription("full-output", "Output", "Save a lot of information for each timestep (very redundant)");
150  oc.doRegister("queue-output", new Option_FileName());
151  oc.addDescription("queue-output", "Output", "Save the vehicle queues at the junctions (experimental)");
152  oc.doRegister("vtk-output", new Option_FileName());
153  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)");
154  oc.doRegister("amitran-output", new Option_FileName());
155  oc.addDescription("amitran-output", "Output", "Save the vehicle trajectories in the Amitran format");
156 
157 
158  oc.doRegister("summary-output", new Option_FileName());
159  oc.addSynonyme("summary-output", "summary");
160  oc.addDescription("summary-output", "Output", "Save aggregated vehicle departure info into FILE");
161 
162  oc.doRegister("tripinfo-output", new Option_FileName());
163  oc.addSynonyme("tripinfo-output", "tripinfo");
164  oc.addDescription("tripinfo-output", "Output", "Save single vehicle trip info into FILE");
165 
166  oc.doRegister("tripinfo-output.write-unfinished", new Option_Bool(false));
167  oc.addDescription("tripinfo-output.write-unfinished", "Output", "Write tripinfo output for vehicles which have not arrived at simulation end");
168 
169  oc.doRegister("vehroute-output", new Option_FileName());
170  oc.addSynonyme("vehroute-output", "vehroutes");
171  oc.addDescription("vehroute-output", "Output", "Save single vehicle route info into FILE");
172 
173  oc.doRegister("vehroute-output.exit-times", new Option_Bool(false));
174  oc.addSynonyme("vehroute-output.exit-times", "vehroutes.exit-times");
175  oc.addDescription("vehroute-output.exit-times", "Output", "Write the exit times for all edges");
176 
177  oc.doRegister("vehroute-output.last-route", new Option_Bool(false));
178  oc.addSynonyme("vehroute-output.last-route", "vehroutes.last-route");
179  oc.addDescription("vehroute-output.last-route", "Output", "Write the last route only");
180 
181  oc.doRegister("vehroute-output.sorted", new Option_Bool(false));
182  oc.addSynonyme("vehroute-output.sorted", "vehroutes.sorted");
183  oc.addDescription("vehroute-output.sorted", "Output", "Sorts the output by departure time");
184 
185  oc.doRegister("vehroute-output.dua", new Option_Bool(false));
186  oc.addSynonyme("vehroute-output.dua", "vehroutes.dua");
187  oc.addDescription("vehroute-output.dua", "Output", "Write the output in the duarouter alternatives style");
188 
189  oc.doRegister("vehroute-output.cost", new Option_Bool(false));
190  oc.addDescription("vehroute-output.cost", "Output", "Write costs for all routes");
191 
192  oc.doRegister("vehroute-output.intended-depart", new Option_Bool(false));
193  oc.addSynonyme("vehroute-output.intended-depart", "vehroutes.intended-depart");
194  oc.addDescription("vehroute-output.intended-depart", "Output", "Write the output with the intended instead of the real departure time");
195 
196  oc.doRegister("vehroute-output.route-length", new Option_Bool(false));
197  oc.addSynonyme("vehroute-output.route-length", "vehroutes.route-length");
198  oc.addDescription("vehroute-output.route-length", "Output", "Include total route length in the output");
199 
200  oc.doRegister("vehroute-output.write-unfinished", new Option_Bool(false));
201  oc.addDescription("vehroute-output.write-unfinished", "Output", "Write vehroute output for vehicles which have not arrived at simulation end");
202 
203  oc.doRegister("vehroute-output.skip-ptlines", new Option_Bool(false));
204  oc.addDescription("vehroute-output.skip-ptlines", "Output", "Skip vehroute output for public transport vehicles");
205 
206  oc.doRegister("vehroute-output.incomplete", new Option_Bool(false));
207  oc.addDescription("vehroute-output.incomplete", "Output", "Include invalid routes and route stubs in vehroute output");
208 
209  oc.doRegister("link-output", new Option_FileName());
210  oc.addDescription("link-output", "Output", "Save links states into FILE");
211 
212  oc.doRegister("railsignal-block-output", new Option_FileName());
213  oc.addDescription("railsignal-block-output", "Output", "Save railsignal-blocks into FILE");
214 
215  oc.doRegister("bt-output", new Option_FileName());
216  oc.addDescription("bt-output", "Output", "Save bluetooth visibilities into FILE (in conjunction with device.btreceiver and device.btsender)");
217 
218  oc.doRegister("lanechange-output", new Option_FileName());
219  oc.addDescription("lanechange-output", "Output", "Record lane changes and their motivations for all vehicles into FILE");
220 
221  oc.doRegister("lanechange-output.started", new Option_Bool(false));
222  oc.addDescription("lanechange-output.started", "Output", "Record start of lane change manoeuvres");
223 
224  oc.doRegister("lanechange-output.ended", new Option_Bool(false));
225  oc.addDescription("lanechange-output.ended", "Output", "Record end of lane change manoeuvres");
226 
227  oc.doRegister("stop-output", new Option_FileName());
228  oc.addDescription("stop-output", "Output", "Record stops and loading/unloading of passenger and containers for all vehicles into FILE");
229 
230 #ifdef _DEBUG
231  oc.doRegister("movereminder-output", new Option_FileName());
232  oc.addDescription("movereminder-output", "Output", "Save movereminder states of selected vehicles into FILE");
233  oc.doRegister("movereminder-output.vehicles", new Option_StringVector());
234  oc.addDescription("movereminder-output.vehicles", "Output", "List of vehicle ids which shall save their movereminder states");
235 #endif
236 
237  oc.doRegister("save-state.times", new Option_IntVector(IntVector()));
238  oc.addDescription("save-state.times", "Output", "Use INT[] as times at which a network state written");
239  oc.doRegister("save-state.period", new Option_String("-1", "TIME"));
240  oc.addDescription("save-state.period", "Output", "save state repeatedly after TIME period");
241  oc.doRegister("save-state.prefix", new Option_FileName(StringVector({ "state" })));
242  oc.addDescription("save-state.prefix", "Output", "Prefix for network states");
243  oc.doRegister("save-state.suffix", new Option_String(".sbx"));
244  oc.addDescription("save-state.suffix", "Output", "Suffix for network states (.sbx or .xml)");
245  oc.doRegister("save-state.files", new Option_FileName());//
246  oc.addDescription("save-state.files", "Output", "Files for network states");
247 
248  // register the simulation settings
249  oc.doRegister("begin", 'b', new Option_String("0", "TIME"));
250  oc.addDescription("begin", "Time", "Defines the begin time in seconds; The simulation starts at this time");
251 
252  oc.doRegister("end", 'e', new Option_String("-1", "TIME"));
253  oc.addDescription("end", "Time", "Defines the end time in seconds; The simulation ends at this time");
254 
255  oc.doRegister("step-length", new Option_String("1", "TIME"));
256  oc.addDescription("step-length", "Time", "Defines the step duration in seconds");
257 
258  oc.doRegister("step-method.ballistic", new Option_Bool(false));
259  oc.addDescription("step-method.ballistic", "Processing", "Whether to use ballistic method for the positional update of vehicles (default is a semi-implicit Euler method).");
260 
261  oc.doRegister("threads", new Option_Integer(1));
262  oc.addDescription("threads", "Processing", "Defines the number of threads for parallel simulation");
263 
264  oc.doRegister("lateral-resolution", new Option_Float(-1));
265  oc.addDescription("lateral-resolution", "Processing", "Defines the resolution in m when handling lateral positioning within a lane (with -1 all vehicles drive at the center of their lane");
266 
267  // register the processing options
268  oc.doRegister("route-steps", 's', new Option_String("200", "TIME"));
269  oc.addDescription("route-steps", "Processing", "Load routes for the next number of seconds ahead");
270 
271  oc.doRegister("no-internal-links", new Option_Bool(false));
272  oc.addDescription("no-internal-links", "Processing", "Disable (junction) internal links");
273 
274  oc.doRegister("ignore-junction-blocker", new Option_String("-1", "TIME"));
275  oc.addDescription("ignore-junction-blocker", "Processing", "Ignore vehicles which block the junction after they have been standing for SECONDS (-1 means never ignore)");
276 
277  oc.doRegister("ignore-route-errors", new Option_Bool(false));
278  oc.addDescription("ignore-route-errors", "Processing", "(1) Do not check whether routes are connected. (2) Allow inserting a vehicle in a situation which requires emergency braking.");
279 
280  oc.doRegister("ignore-accidents", new Option_Bool(false));
281  oc.addDescription("ignore-accidents", "Processing", "Do not check whether accidents occur");
282 
283  oc.doRegister("collision.action", new Option_String("teleport"));
284  oc.addDescription("collision.action", "Processing", "How to deal with collisions: [none,warn,teleport,remove]");
285 
286  oc.doRegister("collision.stoptime", new Option_String("0", "TIME"));
287  oc.addDescription("collision.stoptime", "Processing", "Let vehicle stop for TIME before performing collision.action (except for action 'none')");
288 
289  oc.doRegister("collision.check-junctions", new Option_Bool(false));
290  oc.addDescription("collision.check-junctions", "Processing", "Enables collisions checks on junctions");
291 
292  oc.doRegister("collision.mingap-factor", new Option_Float(-1));
293  oc.addDescription("collision.mingap-factor", "Processing", "Sets the fraction of minGap that must be maintained to avoid collision detection. If a negative value is given, the carFollowModel parameter is used");
294 
295  oc.doRegister("max-num-vehicles", new Option_Integer(-1));
296  oc.addDescription("max-num-vehicles", "Processing", "Delay vehicle insertion to stay within the given maximum number");
297 
298  oc.doRegister("max-num-teleports", new Option_Integer(-1));
299  oc.addDescription("max-num-teleports", "Processing", "Abort the simulation if the given maximum number of teleports is exceeded");
300 
301  oc.doRegister("scale", new Option_Float(1.));
302  oc.addDescription("scale", "Processing", "Scale demand by the given factor (by discarding or duplicating vehicles)");
303 
304  oc.doRegister("time-to-teleport", new Option_String("300", "TIME"));
305  oc.addDescription("time-to-teleport", "Processing", "Specify how long a vehicle may wait until being teleported, defaults to 300, non-positive values disable teleporting");
306 
307  oc.doRegister("time-to-teleport.highways", new Option_String("0", "TIME"));
308  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");
309 
310  oc.doRegister("waiting-time-memory", new Option_String("100", "TIME"));
311  oc.addDescription("waiting-time-memory", "Processing", "Length of time interval, over which accumulated waiting time is taken into account (default is 100s.)");
312 
313  oc.doRegister("max-depart-delay", new Option_String("-1", "TIME"));
314  oc.addDescription("max-depart-delay", "Processing", "How long vehicles wait for departure before being skipped, defaults to -1 which means vehicles are never skipped");
315 
316  oc.doRegister("sloppy-insert", new Option_Bool(false));
317  oc.addDescription("sloppy-insert", "Processing", "Whether insertion on an edge shall not be repeated in same step once failed");
318 
319  oc.doRegister("eager-insert", new Option_Bool(false));
320  oc.addDescription("eager-insert", "Processing", "Whether each vehicle is checked separately for insertion on an edge");
321 
322  oc.doRegister("random-depart-offset", new Option_String("0", "TIME"));
323  oc.addDescription("random-depart-offset", "Processing", "Each vehicle receives a random offset to its depart value drawn uniformly from [0, TIME]");
324 
325  oc.doRegister("lanechange.duration", new Option_String("0", "TIME"));
326  oc.addDescription("lanechange.duration", "Processing", "Duration of a lane change maneuver (default 0)");
327 
328  oc.doRegister("lanechange.overtake-right", new Option_Bool(false));
329  oc.addDescription("lanechange.overtake-right", "Processing", "Whether overtaking on the right on motorways is permitted");
330 
331  oc.doRegister("tls.all-off", new Option_Bool(false));
332  oc.addDescription("tls.all-off", "Processing", "Switches off all traffic lights.");
333 
334  oc.doRegister("tls.actuated.show-detectors", new Option_Bool(false));
335  oc.addDescription("tls.actuated.show-detectors", "Processing", "Sets default visibility for actuation detectors");
336 
337  oc.doRegister("tls.delay_based.detector-range", new Option_Float(100));
338  oc.addDescription("tls.delay_based.detector-range", "Processing", "Sets default range for detecting delayed vehicles");
339 
340  oc.doRegister("time-to-impatience", new Option_String("300", "TIME"));
341  oc.addDescription("time-to-impatience", "Processing", "Specify how long a vehicle may wait until impatience grows from 0 to 1, defaults to 300, non-positive values disable impatience growth");
342 
343  oc.doRegister("default.action-step-length", new Option_Float(0.0));
344  oc.addDescription("default.action-step-length", "Processing", "Length of the default interval length between action points for the car-following and lane-change models (in seconds). If not specified, the simulation step-length is used per default. Vehicle- or VType-specific settings override the default. Must be a multiple of the simulation step-length.");
345 
346  oc.doRegister("default.carfollowmodel", new Option_String("Krauss"));
347  oc.addDescription("default.carfollowmodel", "Processing", "Select default car following model (Krauss, IDM, ...)");
348  oc.addSynonyme("default.carfollowmodel", "carfollow.model", false);
349 
350  oc.doRegister("default.speeddev", new Option_Float(-1));
351  oc.addDescription("default.speeddev", "Processing", "Select default speed deviation. A negative value implies vClass specific defaults (0.1 for the default passenger class");
352 
353  oc.doRegister("default.emergencydecel", new Option_String("default"));
354  oc.addDescription("default.emergencydecel", "Processing", "Select default emergencyDecel value among ('decel', 'default', FLOAT) which sets the value either to the same as the deceleration value, a vClass-class specific default or the given FLOAT in m/s^2");
355 
356  oc.doRegister("emergencydecel.warning-threshold", new Option_Float(1));
357  oc.addDescription("emergencydecel.warning-threshold", "Processing", "Sets the fraction of emergency decel capability that must be used to trigger a warning.");
358 
359  oc.doRegister("parking.maneuver", new Option_Bool(false));
360  oc.addDescription("parking.maneuver", "Processing", "Whether parking simulation includes manoeuvering time and associated lane blocking");
361 
362  // pedestrian model
363  oc.doRegister("pedestrian.model", new Option_String("striping"));
364  oc.addDescription("pedestrian.model", "Processing", "Select among pedestrian models ['nonInteracting', 'striping', 'remote']");
365 
366  oc.doRegister("pedestrian.striping.stripe-width", new Option_Float(0.64));
367  oc.addDescription("pedestrian.striping.stripe-width", "Processing", "Width of parallel stripes for segmenting a sidewalk (meters) for use with model 'striping'");
368 
369  oc.doRegister("pedestrian.striping.dawdling", new Option_Float(0.2));
370  oc.addDescription("pedestrian.striping.dawdling", "Processing", "Factor for random slow-downs [0,1] for use with model 'striping'");
371 
372  oc.doRegister("pedestrian.striping.jamtime", new Option_String("300", "TIME"));
373  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)");
374  oc.doRegister("pedestrian.striping.jamtime.crossing", new Option_String("10", "TIME"));
375  oc.addDescription("pedestrian.striping.jamtime.crossing", "Processing", "Time in seconds after which pedestrians start squeezing through a jam while on a pedestrian crossing when using model 'striping' (non-positive values disable squeezing)");
376 
377  oc.doRegister("pedestrian.remote.address", new Option_String("localhost:9000"));
378  oc.addDescription("pedestrian.remote.address", "Processing", "The address (host:port) of the external simulation");
379 
380  oc.doRegister("ride.stop-tolerance", new Option_Float(10.));
381  oc.addDescription("ride.stop-tolerance", "Processing", "Tolerance to apply when matching pedestrian and vehicle positions on boarding at individual stops");
382 
383  // generic routing options
384  oc.doRegister("routing-algorithm", new Option_String("dijkstra"));
385  oc.addDescription("routing-algorithm", "Routing",
386  "Select among routing algorithms ['dijkstra', 'astar', 'CH', 'CHWrapper']");
387  oc.doRegister("weights.random-factor", new Option_Float(1.));
388  oc.addDescription("weights.random-factor", "Routing", "Edge weights for routing are dynamically disturbed by a random factor drawn uniformly from [1,FLOAT)");
389  oc.doRegister("weights.minor-penalty", new Option_Float(1.5));
390  oc.addDescription("weights.minor-penalty", "Routing", "Apply the given time penalty when computing minimum routing costs for minor-link internal lanes");
391 
392  oc.doRegister("astar.all-distances", new Option_FileName());
393  oc.addDescription("astar.all-distances", "Routing", "Initialize lookup table for astar from the given file (generated by marouter --all-pairs-output)");
394 
395  oc.doRegister("astar.landmark-distances", new Option_FileName());
396  oc.addDescription("astar.landmark-distances", "Routing", "Initialize lookup table for astar ALT-variant from the given file");
397 
398  oc.doRegister("persontrip.walkfactor", new Option_Float(double(0.75)));
399  oc.addDescription("persontrip.walkfactor", "Routing", "Use FLOAT as a factor on pedestrian maximum speed during intermodal routing");
400 
401  oc.doRegister("persontrip.transfer.car-walk", new Option_StringVector(StringVector({ "parkingAreas" })));
402  oc.addDescription("persontrip.transfer.car-walk", "Routing", "Where are mode changes from car to walking allowed (possible values: 'parkingAreas', 'ptStops', 'allJunctions' and combinations)");
403 
404  // devices
405  oc.addOptionSubTopic("Emissions");
406  oc.doRegister("phemlight-path", new Option_FileName(StringVector({ "./PHEMlight/" })));
407  oc.addDescription("phemlight-path", "Emissions", "Determines where to load PHEMlight definitions from.");
408 
409  oc.addOptionSubTopic("Communication");
410  oc.addOptionSubTopic("Battery");
412 
413  // register report options
414  oc.doRegister("duration-log.disable", new Option_Bool(false));
415  oc.addSynonyme("duration-log.disable", "no-duration-log", false);
416  oc.addDescription("duration-log.disable", "Report", "Disable performance reports for individual simulation steps");
417 
418  oc.doRegister("duration-log.statistics", 't', new Option_Bool(false));
419  oc.addDescription("duration-log.statistics", "Report", "Enable statistics on vehicle trips");
420 
421  oc.doRegister("no-step-log", new Option_Bool(false));
422  oc.addDescription("no-step-log", "Report", "Disable console output of current simulation step");
423 
424  //remote port 0 if not used
425  oc.addOptionSubTopic("TraCI Server");
426  oc.doRegister("remote-port", new Option_Integer(0));
427  oc.addDescription("remote-port", "TraCI Server", "Enables TraCI Server if set");
428  oc.doRegister("num-clients", new Option_Integer(1));
429  oc.addDescription("num-clients", "TraCI Server", "Expected number of connecting clients");
430 
431  oc.addOptionSubTopic("Mesoscopic");
432  oc.doRegister("mesosim", new Option_Bool(false));
433  oc.addDescription("mesosim", "Mesoscopic", "Enables mesoscopic simulation");
434  oc.doRegister("meso-edgelength", new Option_Float(98.0f));
435  oc.addDescription("meso-edgelength", "Mesoscopic", "Length of an edge segment in mesoscopic simulation");
436  oc.doRegister("meso-tauff", new Option_String("1.13", "TIME"));
437  oc.addDescription("meso-tauff", "Mesoscopic", "Factor for calculating the net free-free headway time");
438  oc.doRegister("meso-taufj", new Option_String("1.13", "TIME"));
439  oc.addDescription("meso-taufj", "Mesoscopic", "Factor for calculating the net free-jam headway time");
440  oc.doRegister("meso-taujf", new Option_String("1.73", "TIME"));
441  oc.addDescription("meso-taujf", "Mesoscopic", "Factor for calculating the jam-free headway time");
442  oc.doRegister("meso-taujj", new Option_String("1.4", "TIME"));
443  oc.addDescription("meso-taujj", "Mesoscopic", "Factor for calculating the jam-jam headway time");
444  oc.doRegister("meso-jam-threshold", new Option_Float(-1));
445  oc.addDescription("meso-jam-threshold", "Mesoscopic",
446  "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)");
447  oc.doRegister("meso-multi-queue", new Option_Bool(true));
448  oc.addDescription("meso-multi-queue", "Mesoscopic", "Enable multiple queues at edge ends");
449  oc.doRegister("meso-junction-control", new Option_Bool(false));
450  oc.addDescription("meso-junction-control", "Mesoscopic", "Enable mesoscopic traffic light and priority junction handling");
451  oc.doRegister("meso-junction-control.limited", new Option_Bool(false));
452  oc.addDescription("meso-junction-control.limited", "Mesoscopic",
453  "Enable mesoscopic traffic light and priority junction handling for saturated links. This prevents faulty traffic lights from hindering flow in low-traffic situations");
454  oc.doRegister("meso-tls-penalty", new Option_Float(0));
455  oc.addDescription("meso-tls-penalty", "Mesoscopic",
456  "Apply scaled time penalties when driving across tls controlled junctions based on green split instead of checking actual phases");
457  oc.doRegister("meso-minor-penalty", new Option_String("0", "TIME"));
458  oc.addDescription("meso-minor-penalty", "Mesoscopic",
459  "Apply fixed time penalty when driving across a minor link. When using --meso-junction-control.limited, the penalty is not applied whenever limited control is active.");
460  oc.doRegister("meso-overtaking", new Option_Bool(false));
461  oc.addDescription("meso-overtaking", "Mesoscopic", "Enable mesoscopic overtaking");
462  oc.doRegister("meso-recheck", new Option_String("0", "TIME"));
463  oc.addDescription("meso-recheck", "Mesoscopic", "Time interval for rechecking insertion into the next segment after failure");
464 
465  // add rand options
467  oc.doRegister("thread-rngs", new Option_Integer(64));
468  oc.addDescription("thread-rngs", "Random Number",
469  "Number of pre-allocated random number generators to ensure repeatable multi-threaded simulations (should be at least the number of threads for repeatable simulations).");
470 
471  // add GUI options
472  // the reason that we include them in vanilla sumo as well is to make reusing config files easy
473  oc.addOptionSubTopic("GUI Only");
474  oc.doRegister("gui-settings-file", 'g', new Option_FileName());
475  oc.addDescription("gui-settings-file", "GUI Only", "Load visualisation settings from FILE");
476 
477  oc.doRegister("quit-on-end", 'Q', new Option_Bool(false));
478  oc.addDescription("quit-on-end", "GUI Only", "Quits the GUI when the simulation stops");
479 
480  oc.doRegister("game", 'G', new Option_Bool(false));
481  oc.addDescription("game", "GUI Only", "Start the GUI in gaming mode");
482 
483  oc.doRegister("game.mode", new Option_String("tls"));
484  oc.addDescription("game.mode", "GUI Only", "Select the game type ('tls', 'drt')");
485 
486  oc.doRegister("start", 'S', new Option_Bool(false));
487  oc.addDescription("start", "GUI Only", "Start the simulation after loading");
488 
489  oc.doRegister("breakpoints", 'B', new Option_StringVector());
490  oc.addDescription("breakpoints", "GUI Only", "Use TIME[] as times when the simulation should halt");
491 
492  oc.doRegister("edgedata-files", new Option_FileName());
493  oc.addDescription("edgedata-files", "GUI Only", "Load edge/lane weights for visualization from FILE");
494 
495  oc.doRegister("demo", 'D', new Option_Bool(false));
496  oc.addDescription("demo", "GUI Only", "Restart the simulation after ending (demo mode)");
497 
498  oc.doRegister("disable-textures", 'T', new Option_Bool(false));
499  oc.addDescription("disable-textures", "GUI Only", "Do not load background pictures");
500 
501  oc.doRegister("registry-viewport", new Option_Bool(false));
502  oc.addDescription("registry-viewport", "GUI Only", "Load current viewport from registry");
503 
504  oc.doRegister("window-size", new Option_StringVector());
505  oc.addDescription("window-size", "GUI Only", "Create initial window with the given x,y size");
506 
507  oc.doRegister("window-pos", new Option_StringVector());
508  oc.addDescription("window-pos", "GUI Only", "Create initial window at the given x,y position");
509 
510  oc.doRegister("tracker-interval", new Option_Float(1.0));
511  oc.addDescription("tracker-interval", "GUI Only", "The aggregation period for value tracker windows");
512 
513 #ifdef HAVE_OSG
514  oc.doRegister("osg-view", new Option_Bool(false));
515  oc.addDescription("osg-view", "GUI Only", "Start with an OpenSceneGraph view instead of the regular 2D view");
516 #endif
517 
518  // gui testing
519  oc.doRegister("gui-testing", new Option_Bool(false));
520  oc.addDescription("gui-testing", "GUI Only", "Enable ovelay for screen recognition");
521 
522  // gui testing - debug
523  oc.doRegister("gui-testing-debug", new Option_Bool(false));
524  oc.addDescription("gui-testing-debug", "GUI Only", "Enable output messages during GUI-Testing");
525 
526  // gui testing - settings output
527  oc.doRegister("gui-testing.setting-output", new Option_FileName());
528  oc.addDescription("gui-testing.setting-output", "GUI Only", "Save gui settings in the given settingsoutput file");
529 }
530 
531 
532 void
534  // standard outputs
535  OutputDevice::createDeviceByOption("netstate-dump", "netstate", "netstate_file.xsd");
536  OutputDevice::createDeviceByOption("summary-output", "summary", "summary_file.xsd");
537  OutputDevice::createDeviceByOption("tripinfo-output", "tripinfos", "tripinfo_file.xsd");
538 
539  //extended
540  OutputDevice::createDeviceByOption("fcd-output", "fcd-export", "fcd_file.xsd");
541  OutputDevice::createDeviceByOption("emission-output", "emission-export", "emission_file.xsd");
542  OutputDevice::createDeviceByOption("battery-output", "battery-export");
543  OutputDevice::createDeviceByOption("chargingstations-output", "chargingstations-export");
544  OutputDevice::createDeviceByOption("full-output", "full-export", "full_file.xsd");
545  OutputDevice::createDeviceByOption("queue-output", "queue-export", "queue_file.xsd");
546  OutputDevice::createDeviceByOption("amitran-output", "trajectories", "amitran/trajectories.xsd\" timeStepSize=\"" + toString(STEPS2MS(DELTA_T)));
547 
548  //OutputDevice::createDeviceByOption("vtk-output", "vtk-export");
549  OutputDevice::createDeviceByOption("link-output", "link-output");
550  OutputDevice::createDeviceByOption("railsignal-block-output", "railsignal-block-output");
551  OutputDevice::createDeviceByOption("bt-output", "bt-output");
552  OutputDevice::createDeviceByOption("lanechange-output", "lanechanges");
553  OutputDevice::createDeviceByOption("stop-output", "stops", "stopinfo_file.xsd");
554 
555 #ifdef _DEBUG
556  OutputDevice::createDeviceByOption("movereminder-output", "movereminder-output");
557 #endif
558 
560  MSStopOut::init();
561 }
562 
563 
564 bool
567  bool ok = true;
568  if (!oc.isSet("net-file")) {
569  WRITE_ERROR("No network file (-n) specified.");
570  ok = false;
571  }
572  if (oc.getFloat("scale") < 0.) {
573  WRITE_ERROR("Invalid scaling factor.");
574  ok = false;
575  }
576  if (oc.getBool("vehroute-output.exit-times") && !oc.isSet("vehroute-output")) {
577  WRITE_ERROR("A vehroute-output file is needed for exit times.");
578  ok = false;
579  }
580  if (oc.isSet("gui-settings-file") &&
581  oc.getString("gui-settings-file") != "" &&
582  !oc.isUsableFileList("gui-settings-file")) {
583  ok = false;
584  }
585  if (oc.getBool("demo") && oc.isDefault("start")) {
586  oc.set("start", "true");
587  }
588  if (oc.getBool("demo") && oc.getBool("quit-on-end")) {
589  WRITE_ERROR("You can either restart or quit on end.");
590  ok = false;
591  }
592  if (oc.getBool("meso-junction-control.limited") && !oc.getBool("meso-junction-control")) {
593  oc.set("meso-junction-control", "true");
594  }
595  if (oc.getBool("mesosim")) {
596  if (oc.isDefault("pedestrian.model")) {
597  oc.set("pedestrian.model", "nonInteracting");
598  }
599  }
600  const SUMOTime begin = string2time(oc.getString("begin"));
601  const SUMOTime end = string2time(oc.getString("end"));
602  if (begin < 0) {
603  WRITE_ERROR("The begin time should not be negative.");
604  ok = false;
605  }
606  checkStepLengthMultiple(begin, " for begin");
607  if (end != string2time("-1")) {
608  if (end < begin) {
609  WRITE_ERROR("The end time should be after the begin time.");
610  ok = false;
611  }
612  }
613  if (string2time(oc.getString("step-length")) <= 0) {
614  WRITE_ERROR("the minimum step-length is 0.001");
615  ok = false;
616  }
617  const SUMOTime period = string2time(oc.getString("device.fcd.period"));
618  if (period > 0) {
619  checkStepLengthMultiple(period, " for device.fcd.period");
620  }
621  const SUMOTime statePeriod = string2time(oc.getString("save-state.period"));
622  if (statePeriod > 0) {
623  checkStepLengthMultiple(period, " for save-state.period");
624  }
625 #ifdef _DEBUG
626  if (oc.isSet("movereminder-output.vehicles") && !oc.isSet("movereminder-output")) {
627  WRITE_ERROR("option movereminder-output.vehicles requires option movereminder-output to be set");
628  ok = false;
629  }
630 #endif
631  if (oc.getBool("sloppy-insert")) {
632  WRITE_WARNING("The option 'sloppy-insert' is deprecated, because it is now activated by default, see the new option 'eager-insert'.");
633  }
634  if (string2time(oc.getString("lanechange.duration")) > 0 && oc.getFloat("lateral-resolution") > 0) {
635  WRITE_ERROR("Only one of the options 'lanechange.duration' or 'lateral-resolution' may be given.");
636  }
637  if (oc.getBool("ignore-accidents")) {
638  WRITE_WARNING("The option 'ignore-accidents' is deprecated. Use 'collision.action none' instead.");
639  }
640  if (oc.getBool("duration-log.statistics") && oc.isDefault("verbose")) {
641  oc.set("verbose", "true");
642  }
643  if (oc.isDefault("precision") && string2time(oc.getString("step-length")) < 10) {
644  oc.set("precision", "3");
645  }
646  if (oc.isDefault("tracker-interval") && !oc.isDefault("step-length")) {
647  oc.set("tracker-interval", oc.getString("step-length"));
648  }
649  if (oc.getInt("precision") > 2) {
650  if (oc.isDefault("netstate-dump.precision")) {
651  oc.set("netstate-dump.precision", toString(oc.getInt("precision")));
652  }
653  if (oc.isDefault("emission-output.precision")) {
654  oc.set("emission-output.precision", toString(oc.getInt("precision")));
655  }
656  if (oc.isDefault("battery-output.precision")) {
657  oc.set("battery-output.precision", toString(oc.getInt("precision")));
658  }
659  }
660  if (!SUMOXMLDefinitions::CarFollowModels.hasString(oc.getString("carfollow.model"))) {
661  WRITE_ERROR("Unknown model '" + oc.getString("carfollow.model") + "' for option 'carfollow.model'.");
662  ok = false;
663  }
664  if (oc.isSet("default.emergencydecel")) {
665  const std::string val = oc.getString("default.emergencydecel");
666  if (val != "default" && val != "decel") {
667  try {
669  } catch (NumberFormatException&) {
670  WRITE_ERROR("Invalid value '" + val + "' for option 'default.emergencydecel'. Must be a FLOAT or 'default' or 'decel'");
671  ok = false;
672  }
673  }
674  }
675  for (const std::string& val : oc.getStringVector("breakpoints")) {
676  try {
677  string2time(val);
678  } catch (ProcessError& e) {
679  WRITE_ERROR("Invalid time '" + val + "' for option 'breakpoints'." + e.what());
680  ok = false;
681  }
682  };
683 #ifndef HAVE_FOX
684  if (oc.getInt("threads") > 1) {
685  WRITE_ERROR("Parallel simulation is only possible when compiled with Fox.");
686  ok = false;
687  }
688 #endif
689  if (oc.getInt("threads") > oc.getInt("thread-rngs")) {
690  WRITE_WARNING("Number of threads exceeds number of thread-rngs. Simulation runs with the same seed may produce different results");
691  }
692  if (oc.getString("game.mode") != "tls" && oc.getString("game.mode") != "drt") {
693  WRITE_ERROR("game.mode must be one of ['tls', 'drt']");
694  }
695 
696  if (oc.isSet("persontrip.transfer.car-walk")) {
697  for (const std::string& opt : OptionsCont::getOptions().getStringVector("persontrip.transfer.car-walk")) {
698  if (opt != "parkingAreas" && opt != "ptStops" && opt != "allJunctions") {
699  WRITE_ERROR("Invalid transfer option '" + opt + "'. Must be one of 'parkingAreas', 'ptStops' and 'allJunctions'");
700  ok = false;
701  }
702  }
703  }
704 
705  ok &= MSDevice::checkOptions(oc);
707 
708  return ok;
709 }
710 
711 
712 void
714  // pre-initialise the network
715  // set whether empty edges shall be printed on dump
716  MSGlobals::gOmitEmptyEdgesOnDump = !oc.getBool("netstate-dump.empty-edges");
717  // set whether internal lanes shall be used
718  MSGlobals::gUsingInternalLanes = !oc.getBool("no-internal-links");
719  MSGlobals::gIgnoreJunctionBlocker = string2time(oc.getString("ignore-junction-blocker")) < 0 ?
720  std::numeric_limits<SUMOTime>::max() : string2time(oc.getString("ignore-junction-blocker"));
721  // set the grid lock time
722  MSGlobals::gTimeToGridlock = string2time(oc.getString("time-to-teleport")) < 0 ? 0 : string2time(oc.getString("time-to-teleport"));
723  MSGlobals::gTimeToImpatience = string2time(oc.getString("time-to-impatience"));
724  MSGlobals::gTimeToGridlockHighways = string2time(oc.getString("time-to-teleport.highways")) < 0 ? 0 : string2time(oc.getString("time-to-teleport.highways"));
725  MSGlobals::gCheck4Accidents = !oc.getBool("ignore-accidents");
726  MSGlobals::gCheckRoutes = !oc.getBool("ignore-route-errors");
727  MSGlobals::gLaneChangeDuration = string2time(oc.getString("lanechange.duration"));
728  MSGlobals::gLateralResolution = oc.getFloat("lateral-resolution");
730  MSGlobals::gStateLoaded = oc.isSet("load-state");
731  MSGlobals::gUseMesoSim = oc.getBool("mesosim");
732  MSGlobals::gMesoLimitedJunctionControl = oc.getBool("meso-junction-control.limited");
733  MSGlobals::gMesoOvertaking = oc.getBool("meso-overtaking");
734  MSGlobals::gMesoTLSPenalty = oc.getFloat("meso-tls-penalty");
735  MSGlobals::gMesoMinorPenalty = string2time(oc.getString("meso-minor-penalty"));
738  }
739  MSGlobals::gWaitingTimeMemory = string2time(oc.getString("waiting-time-memory"));
742 
743  DELTA_T = string2time(oc.getString("step-length"));
744 
745 
746  bool integrationMethodSet = !oc.isDefault("step-method.ballistic");
747  bool actionStepLengthSet = !oc.isDefault("default.action-step-length");
748  MSGlobals::gSemiImplicitEulerUpdate = !oc.getBool("step-method.ballistic");
749  // Init default value for gActionStepLength
750  if (MSGlobals::gSemiImplicitEulerUpdate && actionStepLengthSet && !integrationMethodSet) {
751  WRITE_MESSAGE("Integration method was set to 'ballistic', since a default action step length was specified.");
753  }
754  double givenDefaultActionStepLength = oc.getFloat("default.action-step-length");
756 
757  const std::string defaultEmergencyDecelOption = OptionsCont::getOptions().getString("default.emergencydecel");
758  if (defaultEmergencyDecelOption == "default") {
760  } else if (defaultEmergencyDecelOption == "decel") {
762  } else {
763  // value already checked in checkOptions()
764  MSGlobals::gDefaultEmergencyDecel = StringUtils::toDouble(defaultEmergencyDecelOption);
765  }
766  MSGlobals::gNumSimThreads = oc.getInt("threads");
767  MSGlobals::gNumThreads = MAX2(MSGlobals::gNumSimThreads, oc.getInt("device.rerouting.threads"));
768 
769  MSGlobals::gEmergencyDecelWarningThreshold = oc.getFloat("emergencydecel.warning-threshold");
770  MSGlobals::gMinorPenalty = oc.getFloat("weights.minor-penalty");
771 
772  MSGlobals::gModelParkingManoeuver = oc.getBool("parking.maneuver");
773 
774  MSGlobals::gStopTolerance = oc.getFloat("ride.stop-tolerance");
775 
776 #ifdef _DEBUG
777  if (oc.isSet("movereminder-output")) {
778  MSBaseVehicle::initMoveReminderOutput(oc);
779  }
780 #endif
781 }
782 
783 
784 /****************************************************************************/
OptionsCont::isSet
bool isSet(const std::string &name, bool failOnNonExistant=true) const
Returns the information whether the named option is set.
Definition: OptionsCont.cpp:135
OutputDevice::createDeviceByOption
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.
Definition: OutputDevice.cpp:101
MSFrame::fillOptions
static void fillOptions()
Inserts options used by the simulation into the OptionsCont-singleton.
Definition: MSFrame.cpp:60
OptionsCont::getInt
int getInt(const std::string &name) const
Returns the int-value of the named option (only for Option_Integer)
Definition: OptionsCont.cpp:215
ToString.h
SystemFrame::addConfigurationOptions
static void addConfigurationOptions(OptionsCont &oc)
Adds configuration options to the given container.
Definition: SystemFrame.cpp:39
MSStopOut.h
WRITE_WARNING
#define WRITE_WARNING(msg)
Definition: MsgHandler.h:275
MSNet.h
Option_Bool
Definition: Option.h:538
MSFrame::setMSGlobals
static void setMSGlobals(OptionsCont &oc)
Sets the global microsim-options.
Definition: MSFrame.cpp:713
STEPS2MS
#define STEPS2MS(x)
Definition: SUMOTime.h:60
DELTA_T
SUMOTime DELTA_T
Definition: SUMOTime.cpp:36
SUMOVehicleParserHelper.h
OptionsCont.h
MSDevice_Vehroutes::init
static void init()
Static intialization.
Definition: MSDevice_Vehroutes.cpp:64
OptionsCont::set
bool set(const std::string &name, const std::string &value)
Sets the given value for the named option.
Definition: OptionsCont.cpp:241
MSGlobals::gStateLoaded
static bool gStateLoaded
Information whether a state has been loaded.
Definition: MSGlobals.h:87
StringUtils::toDouble
static double toDouble(const std::string &sData)
converts a string into the double value described by it by calling the char-type converter
Definition: StringUtils.cpp:345
MSGlobals::gMinorPenalty
static double gMinorPenalty
time penalty for passing a minor link when routing
Definition: MSGlobals.h:132
MsgHandler.h
OptionsCont::getString
std::string getString(const std::string &name) const
Returns the string-value of the named option (only for Option_String)
Definition: OptionsCont.cpp:201
MSGlobals::gNumSimThreads
static int gNumSimThreads
how many threads to use for simulation
Definition: MSGlobals.h:123
SUMOTime
long long int SUMOTime
Definition: SUMOTime.h:34
GeoConvHelper.h
OptionsCont::getBool
bool getBool(const std::string &name) const
Returns the boolean-value of the named option (only for Option_Bool)
Definition: OptionsCont.cpp:222
OptionsCont::getOptions
static OptionsCont & getOptions()
Retrieves the options.
Definition: OptionsCont.cpp:57
MSGlobals::gUseMesoSim
static bool gUseMesoSim
Definition: MSGlobals.h:90
VTYPEPARS_DEFAULT_EMERGENCYDECEL_DECEL
const int VTYPEPARS_DEFAULT_EMERGENCYDECEL_DECEL
Definition: SUMOVTypeParameter.h:77
MSDevice.h
MSGlobals::gEmergencyDecelWarningThreshold
static double gEmergencyDecelWarningThreshold
treshold for warning about strong deceleration
Definition: MSGlobals.h:129
MSGlobals::gLateralResolution
static double gLateralResolution
Definition: MSGlobals.h:84
IntVector
std::vector< int > IntVector
Definition of a vector of ints.
Definition: Option.h:40
OptionsCont::getStringVector
const StringVector & getStringVector(const std::string &name) const
Returns the list of string-value of the named option (only for Option_StringVector)
Definition: OptionsCont.cpp:235
SystemFrame::addReportOptions
static void addReportOptions(OptionsCont &oc)
Adds reporting options to the given container.
Definition: SystemFrame.cpp:64
SUMOXMLDefinitions::CarFollowModels
static StringBijection< SumoXMLTag > CarFollowModels
car following models
Definition: SUMOXMLDefinitions.h:1398
MAX2
T MAX2(T a, T b)
Definition: StdDefs.h:79
MSGlobals::gNumThreads
static int gNumThreads
how many threads to use
Definition: MSGlobals.h:126
MSGlobals::gMesoOvertaking
static bool gMesoOvertaking
Definition: MSGlobals.h:96
NumberFormatException
Definition: UtilExceptions.h:95
MSStopOut::init
static void init()
Static intialization.
Definition: MSStopOut.cpp:40
SUMOVehicleParserHelper::processActionStepLength
static SUMOTime processActionStepLength(double given)
Checks and converts given value for the action step length from seconds to miliseconds assuring it be...
Definition: SUMOVehicleParserHelper.cpp:1456
OptionsCont::addDescription
void addDescription(const std::string &name, const std::string &subtopic, const std::string &description)
Adds a description for an option.
Definition: OptionsCont.cpp:469
OptionsCont::isUsableFileList
bool isUsableFileList(const std::string &name) const
Checks whether the named option is usable as a file list (with at least a single file)
Definition: OptionsCont.cpp:356
MSGlobals::gMesoTLSPenalty
static double gMesoTLSPenalty
Definition: MSGlobals.h:99
StringVector
std::vector< std::string > StringVector
Definition of a vector of strings.
Definition: Option.h:45
MSGlobals::gCheck4Accidents
static bool gCheck4Accidents
Definition: MSGlobals.h:75
MSGlobals::gDefaultEmergencyDecel
static double gDefaultEmergencyDecel
encoding of the string-option default.emergencydecel
Definition: MSGlobals.h:114
SystemFrame.h
OptionsCont::addSynonyme
void addSynonyme(const std::string &name1, const std::string &name2, bool isDeprecated=false)
Adds a synonyme for an options name (any order)
Definition: OptionsCont.cpp:95
MSJunction.h
MSGlobals::gMesoMinorPenalty
static SUMOTime gMesoMinorPenalty
Definition: MSGlobals.h:102
MSDevice::checkOptions
static bool checkOptions(OptionsCont &oc)
check device-specific options
Definition: MSDevice.cpp:86
OutputDevice.h
OptionsCont::doRegister
void doRegister(const std::string &name, Option *v)
Adds an option under the given name.
Definition: OptionsCont.cpp:74
MSGlobals::gIgnoreJunctionBlocker
static SUMOTime gIgnoreJunctionBlocker
Definition: MSGlobals.h:72
ProcessError
Definition: UtilExceptions.h:39
MSGlobals::gModelParkingManoeuver
static bool gModelParkingManoeuver
whether parking simulation includes manoeuver time and any associated lane blocking
Definition: MSGlobals.h:135
Option_String
Definition: Option.h:399
MSGlobals.h
UtilExceptions.h
OptionsCont
A storage for options typed value containers)
Definition: OptionsCont.h:89
MSGlobals::gCheckRoutes
static bool gCheckRoutes
Definition: MSGlobals.h:78
OptionsCont::addXMLDefault
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.
Definition: OptionsCont.cpp:123
string2time
SUMOTime string2time(const std::string &r)
Definition: SUMOTime.cpp:44
OptionsCont::isDefault
bool isDefault(const std::string &name) const
Returns the information whether the named option has still the default value.
Definition: OptionsCont.cpp:163
MSGlobals::gActionStepLength
static SUMOTime gActionStepLength
default value for the interval between two action points for MSVehicle (defaults to DELTA_T)
Definition: MSGlobals.h:111
OptionsCont::addOptionSubTopic
void addOptionSubTopic(const std::string &topic)
Adds an option subtopic.
Definition: OptionsCont.cpp:519
MSGlobals::gUsingInternalLanes
static bool gUsingInternalLanes
Information whether the simulation regards internal lanes.
Definition: MSGlobals.h:68
OptionsCont::getFloat
double getFloat(const std::string &name) const
Returns the double-value of the named option (only for Option_Float)
Definition: OptionsCont.cpp:208
MSGlobals::gTimeToImpatience
static SUMOTime gTimeToImpatience
Definition: MSGlobals.h:65
toString
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
Definition: ToString.h:47
StringUtils.h
Option_StringVector
Definition: Option.h:720
MSGlobals::gTimeToGridlock
static SUMOTime gTimeToGridlock
Definition: MSGlobals.h:59
Option.h
MSGlobals::gWaitingTimeMemory
static SUMOTime gWaitingTimeMemory
length of memory for waiting times (in millisecs)
Definition: MSGlobals.h:108
Option_Float
Definition: Option.h:470
OptionsCont::addCallExample
void addCallExample(const std::string &example, const std::string &desc)
Add a call example.
Definition: OptionsCont.cpp:495
VTYPEPARS_DEFAULT_EMERGENCYDECEL_DEFAULT
const int VTYPEPARS_DEFAULT_EMERGENCYDECEL_DEFAULT
Definition: SUMOVTypeParameter.h:76
MSRoute.h
MSGlobals::gStopTolerance
static double gStopTolerance
The tolerance to apply when matching waiting persons and vehicles.
Definition: MSGlobals.h:141
checkStepLengthMultiple
bool checkStepLengthMultiple(const SUMOTime t, const std::string &error)
Definition: SUMOTime.cpp:108
MSFrame::buildStreams
static void buildStreams()
Builds the streams used possibly by the simulation.
Definition: MSFrame.cpp:533
MSDevice_Vehroutes.h
MSFrame.h
config.h
Option_FileName
Definition: Option.h:783
MSGlobals::gMesoLimitedJunctionControl
static bool gMesoLimitedJunctionControl
Definition: MSGlobals.h:93
RandHelper::insertRandOptions
static void insertRandOptions()
Initialises the given options container with random number options.
Definition: RandHelper.cpp:45
Option_IntVector
Definition: Option.h:650
RandHelper.h
SystemFrame::checkOptions
static bool checkOptions()
checks shared options and sets StdDefs
Definition: SystemFrame.cpp:120
MSGlobals::gLaneChangeDuration
static SUMOTime gLaneChangeDuration
Definition: MSGlobals.h:81
MSDevice::insertOptions
static void insertOptions(OptionsCont &oc)
Inserts options for building devices.
Definition: MSDevice.cpp:66
MSBaseVehicle.h
MSGlobals::gSemiImplicitEulerUpdate
static bool gSemiImplicitEulerUpdate
Definition: MSGlobals.h:55
MSGlobals::gOmitEmptyEdgesOnDump
static bool gOmitEmptyEdgesOnDump
Information whether empty edges shall be written on dump.
Definition: MSGlobals.h:51
MSGlobals::gSublane
static bool gSublane
whether sublane simulation is enabled (sublane model or continuous lanechanging)
Definition: MSGlobals.h:138
Option_Integer
An integer-option.
Definition: Option.h:331
WRITE_ERROR
#define WRITE_ERROR(msg)
Definition: MsgHandler.h:283
MSFrame::checkOptions
static bool checkOptions()
Checks the set options.
Definition: MSFrame.cpp:565
MSAbstractLaneChangeModel::initGlobalOptions
static void initGlobalOptions(const OptionsCont &oc)
init global model parameters
Definition: MSAbstractLaneChangeModel.cpp:62
WRITE_MESSAGE
#define WRITE_MESSAGE(msg)
Definition: MsgHandler.h:277
MSGlobals::gTimeToGridlockHighways
static SUMOTime gTimeToGridlockHighways
Definition: MSGlobals.h:62
MSAbstractLaneChangeModel.h
MSLane::initCollisionOptions
static void initCollisionOptions(const OptionsCont &oc)
Definition: MSLane.cpp:3610