59 #ifdef CHECK_MEMORY_LEAKS
61 #endif // CHECK_MEMORY_LEAKS
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");
87 oc.
addDescription(
"net-file",
"Input",
"Load road network description from FILE");
91 oc.
addDescription(
"route-files",
"Input",
"Load routes descriptions from FILE(s)");
95 oc.
addDescription(
"additional-files",
"Input",
"Load further descriptions from FILE(s)");
99 oc.
addDescription(
"weight-files",
"Input",
"Load edge/lane weights for online rerouting from FILE");
101 oc.
addSynonyme(
"weight-attribute",
"measure",
true);
102 oc.
addDescription(
"weight-attribute",
"Input",
"Name of the xml attribute which gives the edge weight");
105 oc.
addDescription(
"load-state",
"Input",
"Loads a network state from FILE");
107 oc.
addDescription(
"load-state.offset",
"Input",
"Sets the time offset for vehicle segment exit times.");
113 oc.
addDescription(
"netstate-dump",
"Output",
"Save complete network states into FILE");
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");
121 oc.
addDescription(
"emission-output",
"Output",
"Save the emission values of each vehicle");
123 oc.
addDescription(
"fcd-output",
"Output",
"Save the Floating Car Data");
125 oc.
addDescription(
"fcd-output.geo",
"Output",
"Save the Floating Car Data using geo-coordinates (lon/lat)");
127 oc.
addDescription(
"fcd-output.signals",
"Output",
"Add the vehicle signal state to the FCD output (brake lights etc.)");
129 oc.
addDescription(
"full-output",
"Output",
"Save a lot of information for each timestep (very redundant)");
131 oc.
addDescription(
"queue-output",
"Output",
"Save the vehicle queues at the junctions (experimental)");
133 oc.
addDescription(
"vtk-output",
"Output",
"Save complete vehicle positions in VTK Format (usage: /file/out will produce /file/out_$NR$.vtp files)");
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");
144 oc.
addDescription(
"tripinfo-output",
"Output",
"Save single vehicle trip info into FILE");
148 oc.
addDescription(
"vehroute-output",
"Output",
"Save single vehicle route info into FILE");
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");
155 oc.
addSynonyme(
"vehroute-output.last-route",
"vehroutes.last-route");
156 oc.
addDescription(
"vehroute-output.last-route",
"Output",
"Write the last route only");
159 oc.
addSynonyme(
"vehroute-output.sorted",
"vehroutes.sorted");
160 oc.
addDescription(
"vehroute-output.sorted",
"Output",
"Sorts the output by departure time");
163 oc.
addDescription(
"vehroute-output.write-unfinished",
"Output",
"Write vehroute output for vehicles which have not arrived at simulation end");
166 oc.
addDescription(
"link-output",
"Output",
"Save links states into FILE");
170 oc.
addDescription(
"movereminder-output",
"Output",
"Save movereminder states of selected vehicles into FILE");
172 oc.
addDescription(
"movereminder-output.vehicles",
"Output",
"List of vehicle ids which shall save their movereminder states");
176 oc.
addDescription(
"save-state.times",
"Output",
"Use INT[] as times at which a network state written");
178 oc.
addDescription(
"save-state.prefix",
"Output",
"Prefix for network states");
180 oc.
addDescription(
"save-state.files",
"Output",
"Files for network states");
184 oc.
addDescription(
"begin",
"Time",
"Defines the begin time; The simulation starts at this time");
187 oc.
addDescription(
"end",
"Time",
"Defines the end time; The simulation ends at this time");
189 #ifdef HAVE_SUBSECOND_TIMESTEPS
191 oc.
addDescription(
"step-length",
"Time",
"Defines the step duration");
197 oc.
addDescription(
"route-steps",
"Processing",
"Load routes for the next number of seconds ahead");
199 #ifdef HAVE_INTERNAL_LANES
201 oc.
addDescription(
"no-internal-links",
"Processing",
"Disable (junction) internal links");
205 oc.
addDescription(
"ignore-accidents",
"Processing",
"Do not check whether accidents occure more deeply");
208 oc.
addDescription(
"ignore-route-errors",
"Processing",
"Do not check whether routes are connected");
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");
215 oc.
addDescription(
"incremental-dua-step",
"Processing",
"Perform the simulation as a step in incremental DUA");
217 oc.
addDescription(
"incremental-dua-base",
"Processing",
"Base value for incremental DUA");
219 oc.
addDescription(
"scale",
"Processing",
"Scale demand by the given factor (0..1)");
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");
224 oc.
addDescription(
"time-to-teleport.highways",
"Processing",
"The teleport time on highways");
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");
230 oc.
addDescription(
"sloppy-insert",
"Processing",
"Whether insertion on an edge shall not be repeated in same step once failed.");
233 oc.
addDescription(
"eager-insert",
"Processing",
"Whether each vehicle is checked separately for insertion on an edge.");
236 oc.
addDescription(
"lanechange.allow-swap",
"Processing",
"Whether blocking vehicles trying to change lanes may be swapped.");
239 oc.
addDescription(
"lanechange.duration",
"Processing",
"Duration of a lane change maneuver (default 0).");
243 "Select among routing algorithms ['dijkstra', 'astar']");
246 oc.
addDescription(
"routeDist.maxsize",
"Processing",
"Restrict the maximum size of route distributions");
255 oc.
addDescription(
"no-duration-log",
"Report",
"Disable performance reports for individual simulation steps");
258 oc.
addDescription(
"no-step-log",
"Report",
"Disable console output of current simulation step");
265 oc.
addDescription(
"remote-port",
"TraCI Server",
"Enables TraCI Server if set");
268 oc.
addDescription(
"python-script",
"TraCI Server",
"Runs TraCI script with embedded python");
275 oc.
addDescription(
"mesosim",
"Mesoscopic",
"Enables mesoscopic simulation");
277 oc.
addDescription(
"meso-edgelength",
"Mesoscopic",
"Length of an edge segment in mesoscopic simulation");
279 oc.
addDescription(
"meso-tauff",
"Mesoscopic",
"Factor for calculating the free-free headway time");
281 oc.
addDescription(
"meso-taufj",
"Mesoscopic",
"Factor for calculating the free-jam headway time");
283 oc.
addDescription(
"meso-taujf",
"Mesoscopic",
"Factor for calculating the jam-free headway time");
285 oc.
addDescription(
"meso-taujj",
"Mesoscopic",
"Factor for calculating the jam-jam headway time");
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)");
289 oc.
addDescription(
"meso-multi-queue",
"Mesoscopic",
"Enable multiple queues at edge ends");
291 oc.
addDescription(
"meso-junction-control",
"Mesoscopic",
"Enable mesoscopic traffic light and priority junction handling");
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");
295 oc.
addDescription(
"meso-recheck",
"Mesoscopic",
"Time interval for rechecking insertion into the next segment after failure");
305 oc.
addDescription(
"gui-settings-file",
"GUI Only",
"Load visualisation settings from FILE");
308 oc.
addDescription(
"quit-on-end",
"GUI Only",
"Quits the GUI when the simulation stops");
311 oc.
addDescription(
"game",
"GUI Only",
"Start the GUI in gaming mode");
314 oc.
addDescription(
"start",
"GUI Only",
"Start the simulation after loading");
317 oc.
addDescription(
"disable-textures",
"GUI Only",
"Do not load background pictures");
321 oc.
addDescription(
"osg-view",
"GUI Only",
"Start with an OpenSceneGraph view instead of the regular 2D view");
353 if (!oc.
isSet(
"net-file")) {
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")) {
370 if (oc.
getBool(
"vehroute-output.exit-times") && !oc.
isSet(
"vehroute-output")) {
371 WRITE_ERROR(
"A vehroute-output file is needed for exit times.");
374 if (oc.
isSet(
"gui-settings-file") &&
375 oc.
getString(
"gui-settings-file") !=
"" &&
379 if (oc.
isSet(
"routeDist.maxsize") && oc.
getInt(
"routeDist.maxsize") <= 0) {
384 if (oc.
getBool(
"meso-junction-control.limited") && !oc.
getBool(
"meso-junction-control")) {
385 oc.
set(
"meso-junction-control",
"true");
388 #ifdef HAVE_SUBSECOND_TIMESTEPS
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");
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'.");
412 #ifdef HAVE_INTERNAL_LANES
427 MSGlobals::gMesoLimitedJunctionControl = oc.
getBool(
"meso-junction-control.limited");
433 #ifdef HAVE_SUBSECOND_TIMESTEPS
436 if (oc.
isSet(
"routeDist.maxsize")) {
440 if (oc.
isSet(
"movereminder-output")) {
441 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 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.
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)
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.
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)
static SUMOTime gTimeToGridlock
static void insertOptions(OptionsCont &oc)
Inserts options for building devices.
static const bool gUseMesoSim
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.
int getInt(const std::string &name) const
Returns the int-value of the named option (only for Option_Integer)
static SUMOTime gLaneChangeDuration
bool isSet(const std::string &name, bool failOnNonExistant=true) const
Returns the information whether the named option is set.