60 #ifdef CHECK_MEMORY_LEAKS
62 #endif // CHECK_MEMORY_LEAKS
71 oc.
addCallExample(
"-b 0 -e 1000 -n net.xml -r routes.xml",
"start a simulation from time 0 to 1000 with given net and routes");
72 oc.
addCallExample(
"-c munich_config.cfg",
"start with a configuration file");
88 oc.
addDescription(
"net-file",
"Input",
"Load road network description from FILE");
92 oc.
addDescription(
"route-files",
"Input",
"Load routes descriptions from FILE(s)");
96 oc.
addDescription(
"additional-files",
"Input",
"Load further descriptions from FILE(s)");
100 oc.
addDescription(
"weight-files",
"Input",
"Load edge/lane weights for online rerouting from FILE");
102 oc.
addSynonyme(
"weight-attribute",
"measure",
true);
103 oc.
addDescription(
"weight-attribute",
"Input",
"Name of the xml attribute which gives the edge weight");
106 oc.
addDescription(
"load-state",
"Input",
"Loads a network state from FILE");
108 oc.
addDescription(
"load-state.offset",
"Input",
"Sets the time offset for vehicle segment exit times");
114 oc.
addDescription(
"netstate-dump",
"Output",
"Save complete network states into FILE");
116 oc.
addSynonyme(
"netstate-dump.empty-edges",
"netstate.empty-edges");
117 oc.
addSynonyme(
"netstate-dump.empty-edges",
"dump-empty-edges",
true);
118 oc.
addDescription(
"netstate-dump.empty-edges",
"Output",
"Write also empty edges completely when dumping");
122 oc.
addDescription(
"emission-output",
"Output",
"Save the emission values of each vehicle");
124 oc.
addDescription(
"fcd-output",
"Output",
"Save the Floating Car Data");
126 oc.
addDescription(
"fcd-output.geo",
"Output",
"Save the Floating Car Data using geo-coordinates (lon/lat)");
128 oc.
addDescription(
"fcd-output.signals",
"Output",
"Add the vehicle signal state to the FCD output (brake lights etc.)");
130 oc.
addDescription(
"full-output",
"Output",
"Save a lot of information for each timestep (very redundant)");
132 oc.
addDescription(
"queue-output",
"Output",
"Save the vehicle queues at the junctions (experimental)");
134 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)");
139 oc.
addSynonyme(
"summary-output",
"emissions-output",
true);
140 oc.
addSynonyme(
"summary-output",
"emissions",
true);
141 oc.
addDescription(
"summary-output",
"Output",
"Save aggregated vehicle departure info into FILE");
145 oc.
addDescription(
"tripinfo-output",
"Output",
"Save single vehicle trip info into FILE");
149 oc.
addDescription(
"vehroute-output",
"Output",
"Save single vehicle route info into FILE");
152 oc.
addSynonyme(
"vehroute-output.exit-times",
"vehroutes.exit-times");
153 oc.
addDescription(
"vehroute-output.exit-times",
"Output",
"Write the exit times for all edges");
156 oc.
addSynonyme(
"vehroute-output.last-route",
"vehroutes.last-route");
157 oc.
addDescription(
"vehroute-output.last-route",
"Output",
"Write the last route only");
160 oc.
addSynonyme(
"vehroute-output.sorted",
"vehroutes.sorted");
161 oc.
addDescription(
"vehroute-output.sorted",
"Output",
"Sorts the output by departure time");
164 oc.
addDescription(
"vehroute-output.write-unfinished",
"Output",
"Write vehroute output for vehicles which have not arrived at simulation end");
167 oc.
addDescription(
"link-output",
"Output",
"Save links states into FILE");
170 oc.
addDescription(
"bt-output",
"Output",
"Save bt visibilities into FILE");
175 oc.
addDescription(
"movereminder-output",
"Output",
"Save movereminder states of selected vehicles into FILE");
177 oc.
addDescription(
"movereminder-output.vehicles",
"Output",
"List of vehicle ids which shall save their movereminder states");
181 oc.
addDescription(
"save-state.times",
"Output",
"Use INT[] as times at which a network state written");
183 oc.
addDescription(
"save-state.prefix",
"Output",
"Prefix for network states");
185 oc.
addDescription(
"save-state.files",
"Output",
"Files for network states");
189 oc.
addDescription(
"begin",
"Time",
"Defines the begin time; The simulation starts at this time");
192 oc.
addDescription(
"end",
"Time",
"Defines the end time; The simulation ends at this time");
194 #ifdef HAVE_SUBSECOND_TIMESTEPS
196 oc.
addDescription(
"step-length",
"Time",
"Defines the step duration");
202 oc.
addDescription(
"route-steps",
"Processing",
"Load routes for the next number of seconds ahead");
204 #ifdef HAVE_INTERNAL_LANES
206 oc.
addDescription(
"no-internal-links",
"Processing",
"Disable (junction) internal links");
209 oc.
addDescription(
"ignore-junction-blocker",
"Processing",
"Ignore vehicles which block the junction after they have been standing for SECONDS (-1 means never ignore)");
213 oc.
addDescription(
"ignore-accidents",
"Processing",
"Do not check whether accidents occure more deeply");
216 oc.
addDescription(
"ignore-route-errors",
"Processing",
"Do not check whether routes are connected");
219 oc.
addSynonyme(
"max-num-vehicles",
"too-many-vehicles",
true);
220 oc.
addDescription(
"max-num-vehicles",
"Processing",
"Quit simulation if this number of vehicles is exceeded");
223 oc.
addDescription(
"incremental-dua-step",
"Processing",
"Perform the simulation as a step in incremental DUA");
225 oc.
addDescription(
"incremental-dua-base",
"Processing",
"Base value for incremental DUA");
227 oc.
addDescription(
"scale",
"Processing",
"Scale demand by the given factor (0..1)");
230 oc.
addDescription(
"time-to-teleport",
"Processing",
"Specify how long a vehicle may wait until being teleported, defaults to 300, non-positive values disable teleporting");
232 oc.
addDescription(
"time-to-teleport.highways",
"Processing",
"The teleport time on highways");
235 oc.
addDescription(
"max-depart-delay",
"Processing",
"How long vehicles wait for departure before being skipped, defaults to -1 which means vehicles are never skipped");
238 oc.
addDescription(
"sloppy-insert",
"Processing",
"Whether insertion on an edge shall not be repeated in same step once failed");
241 oc.
addDescription(
"eager-insert",
"Processing",
"Whether each vehicle is checked separately for insertion on an edge");
244 oc.
addDescription(
"lanechange.allow-swap",
"Processing",
"Whether blocking vehicles trying to change lanes may be swapped");
247 oc.
addDescription(
"lanechange.duration",
"Processing",
"Duration of a lane change maneuver (default 0)");
251 "Select among routing algorithms ['dijkstra', 'astar']");
255 std::string plp = getenv(
"PHEMLIGHT_PATH")==0 ?
"./PHEMlight/" : std::string(getenv(
"PHEMLIGHT_PATH"));
257 oc.
addDescription(
"phemlight-path",
"Emissions",
"Determines where to load PHEMlight definitions from.");
264 oc.
addDescription(
"no-duration-log",
"Report",
"Disable performance reports for individual simulation steps");
267 oc.
addDescription(
"no-step-log",
"Report",
"Disable console output of current simulation step");
274 oc.
addDescription(
"remote-port",
"TraCI Server",
"Enables TraCI Server if set");
277 oc.
addDescription(
"python-script",
"TraCI Server",
"Runs TraCI script with embedded python");
284 oc.
addDescription(
"mesosim",
"Mesoscopic",
"Enables mesoscopic simulation");
286 oc.
addDescription(
"meso-edgelength",
"Mesoscopic",
"Length of an edge segment in mesoscopic simulation");
288 oc.
addDescription(
"meso-tauff",
"Mesoscopic",
"Factor for calculating the free-free headway time");
290 oc.
addDescription(
"meso-taufj",
"Mesoscopic",
"Factor for calculating the free-jam headway time");
292 oc.
addDescription(
"meso-taujf",
"Mesoscopic",
"Factor for calculating the jam-free headway time");
294 oc.
addDescription(
"meso-taujj",
"Mesoscopic",
"Factor for calculating the jam-jam headway time");
296 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)");
298 oc.
addDescription(
"meso-multi-queue",
"Mesoscopic",
"Enable multiple queues at edge ends");
300 oc.
addDescription(
"meso-junction-control",
"Mesoscopic",
"Enable mesoscopic traffic light and priority junction handling");
302 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");
304 oc.
addDescription(
"meso-recheck",
"Mesoscopic",
"Time interval for rechecking insertion into the next segment after failure");
314 oc.
addDescription(
"gui-settings-file",
"GUI Only",
"Load visualisation settings from FILE");
317 oc.
addDescription(
"quit-on-end",
"GUI Only",
"Quits the GUI when the simulation stops");
320 oc.
addDescription(
"game",
"GUI Only",
"Start the GUI in gaming mode");
323 oc.
addDescription(
"start",
"GUI Only",
"Start the simulation after loading");
326 oc.
addDescription(
"disable-textures",
"GUI Only",
"Do not load background pictures");
330 oc.
addDescription(
"osg-view",
"GUI Only",
"Start with an OpenSceneGraph view instead of the regular 2D view");
365 if (!oc.
isSet(
"net-file")) {
369 if (oc.
isSet(
"incremental-dua-step") && oc.
isSet(
"incremental-dua-base")) {
370 WRITE_WARNING(
"The options 'incremental-dua-step' and 'incremental-dua-base' are deprecated, use 'scale' instead.");
371 if (oc.
getInt(
"incremental-dua-step") > oc.
getInt(
"incremental-dua-base")) {
382 if (oc.
getBool(
"vehroute-output.exit-times") && !oc.
isSet(
"vehroute-output")) {
383 WRITE_ERROR(
"A vehroute-output file is needed for exit times.");
386 if (oc.
isSet(
"gui-settings-file") &&
387 oc.
getString(
"gui-settings-file") !=
"" &&
392 if (oc.
getBool(
"meso-junction-control.limited") && !oc.
getBool(
"meso-junction-control")) {
393 oc.
set(
"meso-junction-control",
"true");
396 #ifdef HAVE_SUBSECOND_TIMESTEPS
403 if (oc.
isSet(
"movereminder-output.vehicles") && !oc.
isSet(
"movereminder-output")) {
404 WRITE_ERROR(
"option movereminder-output.vehicles requires option movereminder-output to be set");
408 if (oc.
getBool(
"sloppy-insert")) {
409 WRITE_WARNING(
"The option 'sloppy-insert' is deprecated, because it is now activated by default, see the new option 'eager-insert'.");
420 #ifdef HAVE_INTERNAL_LANES
438 MSGlobals::gMesoLimitedJunctionControl = oc.
getBool(
"meso-junction-control.limited");
440 MSGlobals::gUsingInternalLanes =
false;
444 #ifdef HAVE_SUBSECOND_TIMESTEPS
448 if (oc.
isSet(
"movereminder-output")) {
449 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 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.
A storage for options typed value containers)
static SUMOTime gTimeToGridlock
static void insertOptions(OptionsCont &oc)
Inserts options for building devices.
static SUMOTime gIgnoreJunctionBlocker
Information whether the simulation regards internal lanes.
static bool createDeviceByOption(const std::string &optionName, const std::string &rootElement="", const std::string &schemaFile="")
Creates the device using the output definition stored in the named option.
static 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.