SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MSFrame.cpp
Go to the documentation of this file.
1 /****************************************************************************/
13 // Sets and checks options for microsim; inits global outputs and settings
14 /****************************************************************************/
15 // SUMO, Simulation of Urban MObility; see http://sumo-sim.org/
16 // Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors
17 /****************************************************************************/
18 //
19 // This file is part of SUMO.
20 // SUMO is free software: you can redistribute it and/or modify
21 // it under the terms of the GNU General Public License as published by
22 // the Free Software Foundation, either version 3 of the License, or
23 // (at your option) any later version.
24 //
25 /****************************************************************************/
26 
27 
28 // ===========================================================================
29 // included modules
30 // ===========================================================================
31 #ifdef _MSC_VER
32 #include <windows_config.h>
33 #else
34 #include <config.h>
35 #endif
36 
37 #include <iostream>
38 #include <iomanip>
39 #include <fstream>
40 #include <ctime>
42 #include <utils/options/Option.h>
45 #include <utils/common/ToString.h>
48 #include <microsim/MSBaseVehicle.h>
49 #include <microsim/MSJunction.h>
50 #include <microsim/MSRoute.h>
51 #include <microsim/MSNet.h>
52 #include <microsim/MSGlobals.h>
56 #include "MSFrame.h"
58 
59 #ifdef CHECK_MEMORY_LEAKS
60 #include <foreign/nvwa/debug_new.h>
61 #endif // CHECK_MEMORY_LEAKS
62 
63 
64 // ===========================================================================
65 // method definitions
66 // ===========================================================================
67 void
70  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");
71  oc.addCallExample("-c munich_config.cfg", "start with a configuration file");
72  oc.addCallExample("--help", "print help");
73 
74  // insert options sub-topics
75  SystemFrame::addConfigurationOptions(oc); // fill this subtopic, too
76  oc.addOptionSubTopic("Input");
77  oc.addOptionSubTopic("Output");
78  oc.addOptionSubTopic("Time");
79  oc.addOptionSubTopic("Processing");
80  SystemFrame::addReportOptions(oc); // fill this subtopic, too
81 
82 
83  // register configuration options
84  // register input options
85  oc.doRegister("net-file", 'n', new Option_FileName());
86  oc.addSynonyme("net-file", "net");
87  oc.addDescription("net-file", "Input", "Load road network description from FILE");
88 
89  oc.doRegister("route-files", 'r', new Option_FileName());
90  oc.addSynonyme("route-files", "routes");
91  oc.addDescription("route-files", "Input", "Load routes descriptions from FILE(s)");
92 
93  oc.doRegister("additional-files", 'a', new Option_FileName());
94  oc.addSynonyme("additional-files", "additional");
95  oc.addDescription("additional-files", "Input", "Load further descriptions from FILE(s)");
96 
97  oc.doRegister("weight-files", 'w', new Option_FileName());
98  oc.addSynonyme("weight-files", "weights");
99  oc.addDescription("weight-files", "Input", "Load edge/lane weights for online rerouting from FILE");
100  oc.doRegister("weight-attribute", 'x', new Option_String("traveltime"));
101  oc.addSynonyme("weight-attribute", "measure", true);
102  oc.addDescription("weight-attribute", "Input", "Name of the xml attribute which gives the edge weight");
103 
104  oc.doRegister("load-state", new Option_FileName());
105  oc.addDescription("load-state", "Input", "Loads a network state from FILE");
106  oc.doRegister("load-state.offset", new Option_String("0", "TIME"));
107  oc.addDescription("load-state.offset", "Input", "Sets the time offset for vehicle segment exit times.");
108 
109  // register output options
110  oc.doRegister("netstate-dump", new Option_FileName());
111  oc.addSynonyme("netstate-dump", "ndump");
112  oc.addSynonyme("netstate-dump", "netstate");
113  oc.addDescription("netstate-dump", "Output", "Save complete network states into FILE");
114  oc.doRegister("netstate-dump.empty-edges", new Option_Bool(false));
115  oc.addSynonyme("netstate-dump.empty-edges", "netstate.empty-edges");
116  oc.addSynonyme("netstate-dump.empty-edges", "dump-empty-edges", true);
117  oc.addDescription("netstate-dump.empty-edges", "Output", "Write also empty edges completely when dumping");
118 
119 
120  oc.doRegister("emission-output", new Option_FileName());
121  oc.addDescription("emission-output", "Output", "Save the emission values of each vehicle");
122  oc.doRegister("fcd-output", new Option_FileName());
123  oc.addDescription("fcd-output", "Output", "Save the Floating Car Data");
124  oc.doRegister("fcd-output.geo", new Option_Bool(false));
125  oc.addDescription("fcd-output.geo", "Output", "Save the Floating Car Data using geo-coordinates (lon/lat)");
126  oc.doRegister("fcd-output.signals", new Option_Bool(false));
127  oc.addDescription("fcd-output.signals", "Output", "Add the vehicle signal state to the FCD output (brake lights etc.)");
128  oc.doRegister("full-output", new Option_FileName());
129  oc.addDescription("full-output", "Output", "Save a lot of information for each timestep (very redundant)");
130  oc.doRegister("queue-output", new Option_FileName());
131  oc.addDescription("queue-output", "Output", "Save the vehicle queues at the junctions (experimental)");
132  oc.doRegister("vtk-output", new Option_FileName());
133  oc.addDescription("vtk-output", "Output", "Save complete vehicle positions in VTK Format (usage: /file/out will produce /file/out_$NR$.vtp files)");
134 
135 
136  oc.doRegister("summary-output", new Option_FileName());
137  oc.addSynonyme("summary-output", "summary");
138  oc.addSynonyme("summary-output", "emissions-output", true);
139  oc.addSynonyme("summary-output", "emissions", true);
140  oc.addDescription("summary-output", "Output", "Save aggregated vehicle departure info into FILE");
141 
142  oc.doRegister("tripinfo-output", new Option_FileName());
143  oc.addSynonyme("tripinfo-output", "tripinfo");
144  oc.addDescription("tripinfo-output", "Output", "Save single vehicle trip info into FILE");
145 
146  oc.doRegister("vehroute-output", new Option_FileName());
147  oc.addSynonyme("vehroute-output", "vehroutes");
148  oc.addDescription("vehroute-output", "Output", "Save single vehicle route info into FILE");
149 
150  oc.doRegister("vehroute-output.exit-times", new Option_Bool(false));
151  oc.addSynonyme("vehroute-output.exit-times", "vehroutes.exit-times");
152  oc.addDescription("vehroute-output.exit-times", "Output", "Write the exit times for all edges");
153 
154  oc.doRegister("vehroute-output.last-route", new Option_Bool(false));
155  oc.addSynonyme("vehroute-output.last-route", "vehroutes.last-route");
156  oc.addDescription("vehroute-output.last-route", "Output", "Write the last route only");
157 
158  oc.doRegister("vehroute-output.sorted", new Option_Bool(false));
159  oc.addSynonyme("vehroute-output.sorted", "vehroutes.sorted");
160  oc.addDescription("vehroute-output.sorted", "Output", "Sorts the output by departure time");
161 
162  oc.doRegister("vehroute-output.write-unfinished", new Option_Bool(false));
163  oc.addDescription("vehroute-output.write-unfinished", "Output", "Write vehroute output for vehicles which have not arrived at simulation end");
164 
165  oc.doRegister("link-output", new Option_FileName());
166  oc.addDescription("link-output", "Output", "Save links states into FILE");
167 
168 #ifdef _DEBUG
169  oc.doRegister("movereminder-output", new Option_FileName());
170  oc.addDescription("movereminder-output", "Output", "Save movereminder states of selected vehicles into FILE");
171  oc.doRegister("movereminder-output.vehicles", new Option_String());
172  oc.addDescription("movereminder-output.vehicles", "Output", "List of vehicle ids which shall save their movereminder states");
173 #endif
174 
175  oc.doRegister("save-state.times", new Option_IntVector(IntVector()));
176  oc.addDescription("save-state.times", "Output", "Use INT[] as times at which a network state written");
177  oc.doRegister("save-state.prefix", new Option_FileName("state"));
178  oc.addDescription("save-state.prefix", "Output", "Prefix for network states");
179  oc.doRegister("save-state.files", new Option_FileName());
180  oc.addDescription("save-state.files", "Output", "Files for network states");
181 
182  // register the simulation settings
183  oc.doRegister("begin", 'b', new Option_String("0", "TIME"));
184  oc.addDescription("begin", "Time", "Defines the begin time; The simulation starts at this time");
185 
186  oc.doRegister("end", 'e', new Option_String("-1", "TIME"));
187  oc.addDescription("end", "Time", "Defines the end time; The simulation ends at this time");
188 
189 #ifdef HAVE_SUBSECOND_TIMESTEPS
190  oc.doRegister("step-length", new Option_String("1", "TIME"));
191  oc.addDescription("step-length", "Time", "Defines the step duration");
192 #endif
193 
194 
195  // register the processing options
196  oc.doRegister("route-steps", 's', new Option_String("200", "TIME"));
197  oc.addDescription("route-steps", "Processing", "Load routes for the next number of seconds ahead");
198 
199 #ifdef HAVE_INTERNAL_LANES
200  oc.doRegister("no-internal-links", new Option_Bool(false));
201  oc.addDescription("no-internal-links", "Processing", "Disable (junction) internal links");
202 #endif
203 
204  oc.doRegister("ignore-accidents", new Option_Bool(false));
205  oc.addDescription("ignore-accidents", "Processing", "Do not check whether accidents occure more deeply");
206 
207  oc.doRegister("ignore-route-errors", new Option_Bool(false));
208  oc.addDescription("ignore-route-errors", "Processing", "Do not check whether routes are connected");
209 
210  oc.doRegister("max-num-vehicles", new Option_Integer(-1));
211  oc.addSynonyme("max-num-vehicles", "too-many-vehicles", true);
212  oc.addDescription("max-num-vehicles", "Processing", "Quit simulation if this number of vehicles is exceeded");
213 
214  oc.doRegister("incremental-dua-step", new Option_Integer());
215  oc.addDescription("incremental-dua-step", "Processing", "Perform the simulation as a step in incremental DUA");
216  oc.doRegister("incremental-dua-base", new Option_Integer(10));
217  oc.addDescription("incremental-dua-base", "Processing", "Base value for incremental DUA");
218  oc.doRegister("scale", new Option_Float());
219  oc.addDescription("scale", "Processing", "Scale demand by the given factor (0..1)");
220 
221  oc.doRegister("time-to-teleport", new Option_String("300", "TIME"));
222  oc.addDescription("time-to-teleport", "Processing", "Specify how long a vehicle may wait until being teleported, defaults to 300, non-positive values disable teleporting");
223  oc.doRegister("time-to-teleport.highways", new Option_String("0", "TIME"));
224  oc.addDescription("time-to-teleport.highways", "Processing", "The teleport time on highways");
225 
226  oc.doRegister("max-depart-delay", new Option_String("-1", "TIME"));
227  oc.addDescription("max-depart-delay", "Processing", "How long vehicles wait for departure before being skipped, defaults to -1 which means vehicles are never skipped");
228 
229  oc.doRegister("sloppy-insert", new Option_Bool(false));
230  oc.addDescription("sloppy-insert", "Processing", "Whether insertion on an edge shall not be repeated in same step once failed.");
231 
232  oc.doRegister("eager-insert", new Option_Bool(false));
233  oc.addDescription("eager-insert", "Processing", "Whether each vehicle is checked separately for insertion on an edge.");
234 
235  oc.doRegister("lanechange.allow-swap", new Option_Bool(false));
236  oc.addDescription("lanechange.allow-swap", "Processing", "Whether blocking vehicles trying to change lanes may be swapped.");
237 
238  oc.doRegister("lanechange.duration", new Option_String("0", "TIME"));
239  oc.addDescription("lanechange.duration", "Processing", "Duration of a lane change maneuver (default 0).");
240 
241  oc.doRegister("routing-algorithm", new Option_String("dijkstra"));
242  oc.addDescription("routing-algorithm", "Processing",
243  "Select among routing algorithms ['dijkstra', 'astar']");
244 
245  oc.doRegister("routeDist.maxsize", new Option_Integer());
246  oc.addDescription("routeDist.maxsize", "Processing", "Restrict the maximum size of route distributions");
247 
248  // devices
249  oc.addOptionSubTopic("Emissions");
251 
252 
253  // register report options
254  oc.doRegister("no-duration-log", new Option_Bool(false));
255  oc.addDescription("no-duration-log", "Report", "Disable performance reports for individual simulation steps");
256 
257  oc.doRegister("no-step-log", new Option_Bool(false));
258  oc.addDescription("no-step-log", "Report", "Disable console output of current simulation step");
259 
260 
261 #ifndef NO_TRACI
262  //remote port 0 if not used
263  oc.addOptionSubTopic("TraCI Server");
264  oc.doRegister("remote-port", new Option_Integer(0));
265  oc.addDescription("remote-port", "TraCI Server", "Enables TraCI Server if set");
266 #ifdef HAVE_PYTHON
267  oc.doRegister("python-script", new Option_String());
268  oc.addDescription("python-script", "TraCI Server", "Runs TraCI script with embedded python");
269 #endif
270 #endif
271  //
272 #ifdef HAVE_INTERNAL
273  oc.addOptionSubTopic("Mesoscopic");
274  oc.doRegister("mesosim", new Option_Bool(false));
275  oc.addDescription("mesosim", "Mesoscopic", "Enables mesoscopic simulation");
276  oc.doRegister("meso-edgelength", new Option_Float(98.0f));
277  oc.addDescription("meso-edgelength", "Mesoscopic", "Length of an edge segment in mesoscopic simulation");
278  oc.doRegister("meso-tauff", new Option_String("1.4", "TIME"));
279  oc.addDescription("meso-tauff", "Mesoscopic", "Factor for calculating the free-free headway time");
280  oc.doRegister("meso-taufj", new Option_String("1.4", "TIME"));
281  oc.addDescription("meso-taufj", "Mesoscopic", "Factor for calculating the free-jam headway time");
282  oc.doRegister("meso-taujf", new Option_String("2", "TIME"));
283  oc.addDescription("meso-taujf", "Mesoscopic", "Factor for calculating the jam-free headway time");
284  oc.doRegister("meso-taujj", new Option_String("2", "TIME"));
285  oc.addDescription("meso-taujj", "Mesoscopic", "Factor for calculating the jam-jam headway time");
286  oc.doRegister("meso-jam-threshold", new Option_Float(-1));
287  oc.addDescription("meso-jam-threshold", "Mesoscopic", "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)");
288  oc.doRegister("meso-multi-queue", new Option_Bool(false));
289  oc.addDescription("meso-multi-queue", "Mesoscopic", "Enable multiple queues at edge ends");
290  oc.doRegister("meso-junction-control", new Option_Bool(false));
291  oc.addDescription("meso-junction-control", "Mesoscopic", "Enable mesoscopic traffic light and priority junction handling");
292  oc.doRegister("meso-junction-control.limited", new Option_Bool(false));
293  oc.addDescription("meso-junction-control.limited", "Mesoscopic", "Enable mesoscopic traffic light and priority junction handling for saturated links. This prevents faulty traffic lights from hindering flow in low-traffic situations");
294  oc.doRegister("meso-recheck", new Option_String("0", "TIME"));
295  oc.addDescription("meso-recheck", "Mesoscopic", "Time interval for rechecking insertion into the next segment after failure");
296 #endif
297 
298  // add rand options
300 
301  // add GUI options
302  // the reason that we include them in vanilla sumo as well is to make reusing config files easy
303  oc.addOptionSubTopic("GUI Only");
304  oc.doRegister("gui-settings-file", new Option_FileName());
305  oc.addDescription("gui-settings-file", "GUI Only", "Load visualisation settings from FILE");
306 
307  oc.doRegister("quit-on-end", 'Q', new Option_Bool(false));
308  oc.addDescription("quit-on-end", "GUI Only", "Quits the GUI when the simulation stops");
309 
310  oc.doRegister("game", 'G', new Option_Bool(false));
311  oc.addDescription("game", "GUI Only", "Start the GUI in gaming mode");
312 
313  oc.doRegister("start", 'S', new Option_Bool(false));
314  oc.addDescription("start", "GUI Only", "Start the simulation after loading");
315 
316  oc.doRegister("disable-textures", 'T', new Option_Bool(false));
317  oc.addDescription("disable-textures", "GUI Only", "Do not load background pictures");
318 
319 #ifdef HAVE_INTERNAL
320  oc.doRegister("osg-view", new Option_Bool(false));
321  oc.addDescription("osg-view", "GUI Only", "Start with an OpenSceneGraph view instead of the regular 2D view");
322 #endif
323 
324 }
325 
326 
327 void
329  // standard outputs
330  OutputDevice::createDeviceByOption("netstate-dump", "netstate");
331  OutputDevice::createDeviceByOption("summary-output", "summary");
332  OutputDevice::createDeviceByOption("tripinfo-output", "tripinfos");
333 
334  //extended
335  OutputDevice::createDeviceByOption("fcd-output", "fcd-export");
336  OutputDevice::createDeviceByOption("emission-output", "emission-export");
337  OutputDevice::createDeviceByOption("full-output", "full-export");
338  OutputDevice::createDeviceByOption("queue-output", "queue-export");
339  OutputDevice::createDeviceByOption("vtk-output", "vtk-export");
340  OutputDevice::createDeviceByOption("link-output", "link-output");
341 #ifdef _DEBUG
342  OutputDevice::createDeviceByOption("movereminder-output", "movereminder-output");
343 #endif
344 
346 }
347 
348 
349 bool
352  bool ok = true;
353  if (!oc.isSet("net-file")) {
354  WRITE_ERROR("No network file (-n) specified.");
355  ok = false;
356  }
357  if (oc.isSet("incremental-dua-step") && oc.isSet("incremental-dua-base")) {
358  WRITE_WARNING("The options 'incremental-dua-step' and 'incremental-dua-base' are deprecated, use 'scale' instead.");
359  if (oc.getInt("incremental-dua-step") > oc.getInt("incremental-dua-base")) {
360  WRITE_ERROR("Invalid dua step.");
361  ok = false;
362  }
363  }
364  if (!oc.isDefault("scale")) {
365  if (oc.getFloat("scale") < 0. || oc.getFloat("scale") > 1.) {
366  WRITE_ERROR("Invalid scaling factor.");
367  ok = false;
368  }
369  }
370  if (oc.getBool("vehroute-output.exit-times") && !oc.isSet("vehroute-output")) {
371  WRITE_ERROR("A vehroute-output file is needed for exit times.");
372  ok = false;
373  }
374  if (oc.isSet("gui-settings-file") &&
375  oc.getString("gui-settings-file") != "" &&
376  !oc.isUsableFileList("gui-settings-file")) {
377  ok = false;
378  }
379  if (oc.isSet("routeDist.maxsize") && oc.getInt("routeDist.maxsize") <= 0) {
380  WRITE_ERROR("routeDist.maxsize must be positive");
381  ok = false;
382  }
383 #ifdef HAVE_INTERNAL
384  if (oc.getBool("meso-junction-control.limited") && !oc.getBool("meso-junction-control")) {
385  oc.set("meso-junction-control", "true");
386  }
387 #endif
388 #ifdef HAVE_SUBSECOND_TIMESTEPS
389  if (string2time(oc.getString("step-length")) <= 0) {
390  WRITE_ERROR("the minimum step-length is 0.001");
391  ok = false;
392  }
393 #endif
394 #ifdef _DEBUG
395  if (oc.isSet("movereminder-output.vehicles") && !oc.isSet("movereminder-output")) {
396  WRITE_ERROR("option movereminder-output.vehicles requires option movereminder-output to be set");
397  ok = false;
398  }
399 #endif
400  if (oc.getBool("sloppy-insert")) {
401  WRITE_WARNING("The option 'sloppy-insert' is deprecated, because it is now activated by default, see the new option 'eager-insert'.");
402  }
403  return ok;
404 }
405 
406 
407 void
409  // pre-initialise the network
410  // set whether empty edges shall be printed on dump
411  MSGlobals::gOmitEmptyEdgesOnDump = !oc.getBool("netstate-dump.empty-edges");
412 #ifdef HAVE_INTERNAL_LANES
413  // set whether internal lanes shall be used
414  MSGlobals::gUsingInternalLanes = !oc.getBool("no-internal-links");
415 #else
417 #endif
418  // set the grid lock time
419  MSGlobals::gTimeToGridlock = string2time(oc.getString("time-to-teleport")) < 0 ? 0 : string2time(oc.getString("time-to-teleport"));
420  MSGlobals::gTimeToGridlockHighways = string2time(oc.getString("time-to-teleport.highways")) < 0 ? 0 : string2time(oc.getString("time-to-teleport.highways"));
421  MSGlobals::gCheck4Accidents = !oc.getBool("ignore-accidents");
422  MSGlobals::gCheckRoutes = !oc.getBool("ignore-route-errors");
423  MSGlobals::gLaneChangeDuration = string2time(oc.getString("lanechange.duration"));
424  MSGlobals::gStateLoaded = oc.isSet("load-state");
425 #ifdef HAVE_INTERNAL
426  MSGlobals::gUseMesoSim = oc.getBool("mesosim");
427  MSGlobals::gMesoLimitedJunctionControl = oc.getBool("meso-junction-control.limited");
430  }
431 #endif
432 
433 #ifdef HAVE_SUBSECOND_TIMESTEPS
434  DELTA_T = string2time(oc.getString("step-length"));
435 #endif
436  if (oc.isSet("routeDist.maxsize")) {
437  MSRoute::setMaxRouteDistSize(oc.getInt("routeDist.maxsize"));
438  }
439 #ifdef _DEBUG
440  if (oc.isSet("movereminder-output")) {
441  MSBaseVehicle::initMoveReminderOutput(oc);
442  }
443 #endif
444 }
445 
446 
447 
448 /****************************************************************************/
449 
static bool gOmitEmptyEdgesOnDump
Information whether empty edges shall be written on dump.
Definition: MSGlobals.h:60
void doRegister(const std::string &name, Option *v)
Adds an option under the given name.
Definition: OptionsCont.cpp:84
static void insertRandOptions()
Initialises the given options container with random number options.
Definition: RandHelper.cpp:53
static void addReportOptions(OptionsCont &oc)
Adds reporting options to the given container.
Definition: SystemFrame.cpp:74
static void buildStreams()
Builds the streams used possibly by the simulation.
Definition: MSFrame.cpp:328
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.
Definition: MSGlobals.h:82
SUMOReal getFloat(const std::string &name) const
Returns the SUMOReal-value of the named option (only for Option_Float)
static void addConfigurationOptions(OptionsCont &oc)
Adds configuration options to the given container.
Definition: SystemFrame.cpp:50
#define WRITE_WARNING(msg)
Definition: MsgHandler.h:196
static OptionsCont & getOptions()
Retrieves the options.
Definition: OptionsCont.cpp:67
static bool gCheck4Accidents
Definition: MSGlobals.h:73
static void fillOptions()
Inserts options used by the simulation into the OptionsCont-singleton.
Definition: MSFrame.cpp:68
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.
Definition: Option.h:47
static bool gCheckRoutes
Definition: MSGlobals.h:76
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)
Definition: SUMOTime.cpp:48
void addOptionSubTopic(const std::string &topic)
Adds an option subtopic.
static bool gUsingInternalLanes
Information whether the simulation regards internal lanes.
Definition: MSGlobals.h:70
bool isDefault(const std::string &name) const
Returns the information whether the named option has still the default value.
static void setMaxRouteDistSize(unsigned int size)
Definition: MSRoute.h:196
static bool checkOptions()
Checks the set options.
Definition: MSFrame.cpp:350
#define WRITE_ERROR(msg)
Definition: MsgHandler.h:201
static SUMOTime gTimeToGridlockHighways
Definition: MSGlobals.h:67
bool set(const std::string &name, const std::string &value)
Sets the given value for the named option.
An integer-option.
Definition: Option.h:308
static bool createDeviceByOption(const std::string &optionName, const std::string &rootElement="")
Creates the device using the output definition stored in the named option.
A storage for options typed value containers)
Definition: OptionsCont.h:108
static SUMOTime gTimeToGridlock
Definition: MSGlobals.h:64
static void insertOptions(OptionsCont &oc)
Inserts options for building devices.
Definition: MSDevice.cpp:58
static const bool gUseMesoSim
Definition: MSGlobals.h:95
static void setMSGlobals(OptionsCont &oc)
Sets the global microsim-options.
Definition: MSFrame.cpp:408
#define DELTA_T
Definition: SUMOTime.h:50
void addDescription(const std::string &name, const std::string &subtopic, const std::string &description)
Adds a description for an option.
int getInt(const std::string &name) const
Returns the int-value of the named option (only for Option_Integer)
static SUMOTime gLaneChangeDuration
Definition: MSGlobals.h:79
bool isSet(const std::string &name, bool failOnNonExistant=true) const
Returns the information whether the named option is set.