61 #ifdef CHECK_MEMORY_LEAKS
63 #endif // CHECK_MEMORY_LEAKS
72 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");
73 oc.
addCallExample(
"-c munich_config.cfg",
"start with a configuration file");
89 oc.
addDescription(
"net-file",
"Input",
"Load road network description from FILE");
93 oc.
addDescription(
"route-files",
"Input",
"Load routes descriptions from FILE(s)");
97 oc.
addDescription(
"additional-files",
"Input",
"Load further descriptions from FILE(s)");
101 oc.
addDescription(
"weight-files",
"Input",
"Load edge/lane weights for online rerouting from FILE");
103 oc.
addSynonyme(
"weight-attribute",
"measure",
true);
104 oc.
addDescription(
"weight-attribute",
"Input",
"Name of the xml attribute which gives the edge weight");
107 oc.
addDescription(
"load-state",
"Input",
"Loads a network state from FILE");
109 oc.
addDescription(
"load-state.offset",
"Input",
"Sets the time offset for vehicle segment exit times");
115 oc.
addDescription(
"netstate-dump",
"Output",
"Save complete network states into FILE");
117 oc.
addSynonyme(
"netstate-dump.empty-edges",
"netstate.empty-edges");
118 oc.
addSynonyme(
"netstate-dump.empty-edges",
"dump-empty-edges",
true);
119 oc.
addDescription(
"netstate-dump.empty-edges",
"Output",
"Write also empty edges completely when dumping");
123 oc.
addDescription(
"emission-output",
"Output",
"Save the emission values of each vehicle");
125 oc.
addDescription(
"fcd-output",
"Output",
"Save the Floating Car Data");
127 oc.
addDescription(
"fcd-output.geo",
"Output",
"Save the Floating Car Data using geo-coordinates (lon/lat)");
129 oc.
addDescription(
"fcd-output.signals",
"Output",
"Add the vehicle signal state to the FCD output (brake lights etc.)");
131 oc.
addDescription(
"full-output",
"Output",
"Save a lot of information for each timestep (very redundant)");
133 oc.
addDescription(
"queue-output",
"Output",
"Save the vehicle queues at the junctions (experimental)");
135 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)");
137 oc.
addDescription(
"amitran-output",
"Output",
"Save the vehicle trajectories in the Amitran format");
142 oc.
addSynonyme(
"summary-output",
"emissions-output",
true);
143 oc.
addSynonyme(
"summary-output",
"emissions",
true);
144 oc.
addDescription(
"summary-output",
"Output",
"Save aggregated vehicle departure info into FILE");
148 oc.
addDescription(
"tripinfo-output",
"Output",
"Save single vehicle trip info into FILE");
152 oc.
addDescription(
"vehroute-output",
"Output",
"Save single vehicle route info into FILE");
155 oc.
addSynonyme(
"vehroute-output.exit-times",
"vehroutes.exit-times");
156 oc.
addDescription(
"vehroute-output.exit-times",
"Output",
"Write the exit times for all edges");
159 oc.
addSynonyme(
"vehroute-output.last-route",
"vehroutes.last-route");
160 oc.
addDescription(
"vehroute-output.last-route",
"Output",
"Write the last route only");
163 oc.
addSynonyme(
"vehroute-output.sorted",
"vehroutes.sorted");
164 oc.
addDescription(
"vehroute-output.sorted",
"Output",
"Sorts the output by departure time");
167 oc.
addDescription(
"vehroute-output.write-unfinished",
"Output",
"Write vehroute output for vehicles which have not arrived at simulation end");
170 oc.
addDescription(
"link-output",
"Output",
"Save links states into FILE");
173 oc.
addDescription(
"bt-output",
"Output",
"Save bt visibilities into FILE");
178 oc.
addDescription(
"movereminder-output",
"Output",
"Save movereminder states of selected vehicles into FILE");
180 oc.
addDescription(
"movereminder-output.vehicles",
"Output",
"List of vehicle ids which shall save their movereminder states");
184 oc.
addDescription(
"save-state.times",
"Output",
"Use INT[] as times at which a network state written");
186 oc.
addDescription(
"save-state.prefix",
"Output",
"Prefix for network states");
188 oc.
addDescription(
"save-state.files",
"Output",
"Files for network states");
192 oc.
addDescription(
"begin",
"Time",
"Defines the begin time; The simulation starts at this time");
195 oc.
addDescription(
"end",
"Time",
"Defines the end time; The simulation ends at this time");
197 #ifdef HAVE_SUBSECOND_TIMESTEPS
199 oc.
addDescription(
"step-length",
"Time",
"Defines the step duration");
205 oc.
addDescription(
"route-steps",
"Processing",
"Load routes for the next number of seconds ahead");
207 #ifdef HAVE_INTERNAL_LANES
209 oc.
addDescription(
"no-internal-links",
"Processing",
"Disable (junction) internal links");
212 oc.
addDescription(
"ignore-junction-blocker",
"Processing",
"Ignore vehicles which block the junction after they have been standing for SECONDS (-1 means never ignore)");
216 oc.
addDescription(
"ignore-accidents",
"Processing",
"Do not check whether accidents occure more deeply");
219 oc.
addDescription(
"ignore-route-errors",
"Processing",
"Do not check whether routes are connected");
222 oc.
addSynonyme(
"max-num-vehicles",
"too-many-vehicles",
true);
223 oc.
addDescription(
"max-num-vehicles",
"Processing",
"Quit simulation if this number of vehicles is exceeded");
226 oc.
addDescription(
"scale",
"Processing",
"Scale demand by the given factor (0..1)");
229 oc.
addDescription(
"time-to-teleport",
"Processing",
"Specify how long a vehicle may wait until being teleported, defaults to 300, non-positive values disable teleporting");
231 oc.
addDescription(
"time-to-teleport.highways",
"Processing",
"The teleport time on highways");
234 oc.
addDescription(
"max-depart-delay",
"Processing",
"How long vehicles wait for departure before being skipped, defaults to -1 which means vehicles are never skipped");
237 oc.
addDescription(
"sloppy-insert",
"Processing",
"Whether insertion on an edge shall not be repeated in same step once failed");
240 oc.
addDescription(
"eager-insert",
"Processing",
"Whether each vehicle is checked separately for insertion on an edge");
243 oc.
addDescription(
"random-depart-offset",
"Processing",
"Each vehicle receives a random offset to its depart value drawn uniformly from [0, TIME]");
246 oc.
addDescription(
"lanechange.allow-swap",
"Processing",
"Whether blocking vehicles trying to change lanes may be swapped");
249 oc.
addDescription(
"lanechange.duration",
"Processing",
"Duration of a lane change maneuver (default 0)");
252 oc.
addDescription(
"lanechange.overtake-right",
"Processing",
"Whether overtaking on the right on motorways is permitted");
256 "Select among routing algorithms ['dijkstra', 'astar']");
259 oc.
addDescription(
"pedestrian.model",
"Processing",
"Select among pedestrian models ['nonInteracting', 'striping']");
262 oc.
addDescription(
"pedestrian.striping.stripe-width",
"Processing",
"Width of parallel stripes for segmenting a sidewalk (meters) for use with model 'striping'");
265 oc.
addDescription(
"pedestrian.striping.dawdling",
"Processing",
"factor for random slow-downs [0,1] for use with model 'striping'");
269 std::string plp = getenv(
"PHEMLIGHT_PATH") == 0 ?
"./PHEMlight/" : std::string(getenv(
"PHEMLIGHT_PATH"));
271 oc.
addDescription(
"phemlight-path",
"Emissions",
"Determines where to load PHEMlight definitions from.");
278 oc.
addDescription(
"no-duration-log",
"Report",
"Disable performance reports for individual simulation steps");
281 oc.
addDescription(
"no-step-log",
"Report",
"Disable console output of current simulation step");
288 oc.
addDescription(
"remote-port",
"TraCI Server",
"Enables TraCI Server if set");
291 oc.
addDescription(
"python-script",
"TraCI Server",
"Runs TraCI script with embedded python");
298 oc.
addDescription(
"mesosim",
"Mesoscopic",
"Enables mesoscopic simulation");
300 oc.
addDescription(
"meso-edgelength",
"Mesoscopic",
"Length of an edge segment in mesoscopic simulation");
302 oc.
addDescription(
"meso-tauff",
"Mesoscopic",
"Factor for calculating the free-free headway time");
304 oc.
addDescription(
"meso-taufj",
"Mesoscopic",
"Factor for calculating the free-jam headway time");
306 oc.
addDescription(
"meso-taujf",
"Mesoscopic",
"Factor for calculating the jam-free headway time");
308 oc.
addDescription(
"meso-taujj",
"Mesoscopic",
"Factor for calculating the jam-jam headway time");
310 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)");
312 oc.
addDescription(
"meso-multi-queue",
"Mesoscopic",
"Enable multiple queues at edge ends");
314 oc.
addDescription(
"meso-junction-control",
"Mesoscopic",
"Enable mesoscopic traffic light and priority junction handling");
316 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");
318 oc.
addDescription(
"meso-recheck",
"Mesoscopic",
"Time interval for rechecking insertion into the next segment after failure");
328 oc.
addDescription(
"gui-settings-file",
"GUI Only",
"Load visualisation settings from FILE");
331 oc.
addDescription(
"quit-on-end",
"GUI Only",
"Quits the GUI when the simulation stops");
334 oc.
addDescription(
"game",
"GUI Only",
"Start the GUI in gaming mode");
337 oc.
addDescription(
"start",
"GUI Only",
"Start the simulation after loading");
340 oc.
addDescription(
"disable-textures",
"GUI Only",
"Do not load background pictures");
344 oc.
addDescription(
"osg-view",
"GUI Only",
"Start with an OpenSceneGraph view instead of the regular 2D view");
380 if (!oc.
isSet(
"net-file")) {
390 if (oc.
getBool(
"vehroute-output.exit-times") && !oc.
isSet(
"vehroute-output")) {
391 WRITE_ERROR(
"A vehroute-output file is needed for exit times.");
394 if (oc.
isSet(
"gui-settings-file") &&
395 oc.
getString(
"gui-settings-file") !=
"" &&
400 if (oc.
getBool(
"meso-junction-control.limited") && !oc.
getBool(
"meso-junction-control")) {
401 oc.
set(
"meso-junction-control",
"true");
407 WRITE_ERROR(
"The begin time should not be negative.");
412 WRITE_ERROR(
"The end time should be after the begin time.");
416 #ifdef HAVE_SUBSECOND_TIMESTEPS
423 if (oc.
isSet(
"movereminder-output.vehicles") && !oc.
isSet(
"movereminder-output")) {
424 WRITE_ERROR(
"option movereminder-output.vehicles requires option movereminder-output to be set");
428 if (oc.
getBool(
"sloppy-insert")) {
429 WRITE_WARNING(
"The option 'sloppy-insert' is deprecated, because it is now activated by default, see the new option 'eager-insert'.");
440 #ifdef HAVE_INTERNAL_LANES
458 MSGlobals::gMesoLimitedJunctionControl = oc.
getBool(
"meso-junction-control.limited");
460 MSGlobals::gUsingInternalLanes =
false;
465 #ifdef HAVE_SUBSECOND_TIMESTEPS
469 if (oc.
isSet(
"movereminder-output")) {
470 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.
static void initGlobalOptions(const OptionsCont &oc)
init global model parameters
bool isDefault(const std::string &name) const
Returns the information whether the named option has still the default value.
std::string toString(const T &t, std::streamsize accuracy=OUTPUT_ACCURACY)
static bool checkOptions()
Checks the set options.
static SUMOTime gTimeToGridlockHighways
bool set(const std::string &name, const std::string &value)
Sets the given value for the named option.
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.
static SUMOTime gLaneChangeDuration
bool isSet(const std::string &name, bool failOnNonExistant=true) const
Returns the information whether the named option is set.