SUMO

From Sumo
Jump to: navigation, search

From 30.000 feet

SUMO is the simulation itself; it is a microscopic, space-continuous, and time-discrete traffic flow simulation.

Purpose: Simulates a defined scenario
System: portable (Linux/Windows is tested); runs on command line
Input (mandatory):
A) a road network as generated via NETCONVERT or NETGENERATE, see Building Networks
B) a set of routes (as generated by DUAROUTER, JTRROUTER, DFROUTER, or ACTIVITYGEN, see also Definition of Vehicles, Vehicle Types, and Routes)
Input (optional): Additional definitions of traffic lights, variable speed signs, output detectors etc.
Output: SUMO allows to generate a wide set of outputs; visualization is done using SUMO-GUI
Programming Language: C++

Usage Description

For a brief overview see Simulation/Basic_Definition. Model details and feature documentation can be found at Simulation topics.

Options

You may use a XML schema definition file for setting up a SUMO configuration: sumoConfiguration.xsd.

Configuration

Option Description
-c <FILE>
--configuration-file <FILE>
Loads the named config on startup
--save-configuration <FILE> Saves current configuration into FILE
--save-template <FILE> Saves a configuration template (empty) into FILE
--save-schema <FILE> Saves the configuration schema into FILE
--save-commented <BOOL> Adds comments to saved template, configuration, or schema; default: false

Input

Option Description
-n <FILE>
--net-file <FILE>
Load road network description from FILE
-r <FILE>
--route-files <FILE>
Load routes descriptions from FILE(s)
-a <FILE>
--additional-files <FILE>
Load further descriptions from FILE(s)
-w <FILE>
--weight-files <FILE>
Load edge/lane weights for online rerouting from FILE
-x <STRING>
--weight-attribute <STRING>
Name of the xml attribute which gives the edge weight; default: traveltime
--load-state <FILE> Loads a network state from FILE
--load-state.offset <TIME> Shifts all times loaded from a saved state by the given offset; default: 0
--load-state.remove-vehicles <STRING> Removes vehicles with the given IDs from the loaded state

Output

Option Description
--output-prefix <STRING> Prefix which is applied to all output files. The special string 'TIME' is replaced by the current time.
--precision <INT> Defines the number of digits after the comma for floating point output; default: 2
--precision.geo <INT> Defines the number of digits after the comma for lon,lat output; default: 6
--netstate-dump <FILE> Save complete network states into FILE
--netstate-dump.empty-edges <BOOL> Write also empty edges completely when dumping; default: false
--netstate-dump.precision <INT> Write positions and speeds with the given precision (default 2); default: 2
--emission-output <FILE> Save the emission values of each vehicle
--emission-output.precision <INT> Write emission values with the given precision (default 2); default: 2
--battery-output <FILE> Save the battery values of each vehicle
--battery-output.precision <INT> Write battery values with the given precision (default 2); default: 2
--chargingstations-output <FILE> Write data of charging stations
--fcd-output <FILE> Save the Floating Car Data
--fcd-output.geo <BOOL> Save the Floating Car Data using geo-coordinates (lon/lat); default: false
--fcd-output.signals <BOOL> Add the vehicle signal state to the FCD output (brake lights etc.); default: false
--full-output <FILE> Save a lot of information for each timestep (very redundant)
--queue-output <FILE> Save the vehicle queues at the junctions (experimental)
--vtk-output <FILE> Save complete vehicle positions inclusive speed values in the VTK Format (usage: /path/out will produce /path/out_$TIMESTEP$.vtp files)
--amitran-output <FILE> Save the vehicle trajectories in the Amitran format
--summary-output <FILE> Save aggregated vehicle departure info into FILE
--tripinfo-output <FILE> Save single vehicle trip info into FILE
--tripinfo-output.write-unfinished <BOOL> Write tripinfo output for vehicles which have not arrived at simulation end; default: false
--vehroute-output <FILE> Save single vehicle route info into FILE
--vehroute-output.exit-times <BOOL> Write the exit times for all edges; default: false
--vehroute-output.last-route <BOOL> Write the last route only; default: false
--vehroute-output.sorted <BOOL> Sorts the output by departure time; default: false
--vehroute-output.dua <BOOL> Write the output in the duarouter alternatives style; default: false
--vehroute-output.intended-depart <BOOL> Write the output with the intended instead of the real departure time; default: false
--vehroute-output.route-length <BOOL> Include total route length in the output; default: false
--vehroute-output.write-unfinished <BOOL> Write vehroute output for vehicles which have not arrived at simulation end; default: false
--link-output <FILE> Save links states into FILE
--bt-output <FILE> Save bluetooth visibilities into FILE (in conjunction with device.btreceiver and device.btsender)
--lanechange-output <FILE> Record lane changes and their motivations for all vehicles into FILE
--stop-output <FILE> Record stops and loading/unloading of passenger and containers for all vehicles into FILE
--save-state.times {{DT_INT[]}} Use INT[] as times at which a network state written
--save-state.period <TIME> save state repeatedly after TIME period; default: -1
--save-state.prefix <FILE> Prefix for network states; default: state
--save-state.suffix <FILE> Suffix for network states (.sbx or .xml); default: .sbx
--save-state.files <FILE> Files for network states

Time

Option Description
-b <TIME>
--begin <TIME>
Defines the begin time in seconds; The simulation starts at this time; default: 0
-e <TIME>
--end <TIME>
Defines the end time in seconds; The simulation ends at this time; default: -1
--step-length <TIME> Defines the step duration in seconds; default: 1

Processing

Option Description
--step-method.ballistic <BOOL> Whether to use ballistic method for the positional update of vehicles (default is a semi-implicit Euler method).; default: false
--lateral-resolution <FLOAT> Defines the resolution in m when handling lateral positioning within a lane (with -1 all vehicles drive at the center of their lane; default: -1
--carfollow.model <STRING> Select default car following model (Krauss, IDM, ...); default: Krauss
-s <TIME>
--route-steps <TIME>
Load routes for the next number of seconds ahead; default: 200
--no-internal-links <BOOL> Disable (junction) internal links; default: false
--ignore-junction-blocker <TIME> Ignore vehicles which block the junction after they have been standing for SECONDS (-1 means never ignore); default: -1
--ignore-route-errors <BOOL> Do not check whether routes are connected; default: false
--ignore-accidents <BOOL> Do not check whether accidents occur; default: false
--collision.action <STRING> How to deal with collisions: [none,warn,teleport,remove]; default: teleport
--collision.stoptime <TIME> Let vehicle stop for TIME before performing collision.action (except for action 'none'); default: 0
--collision.check-junctions <BOOL> Enables collisions checks on junctions; default: false
--max-num-vehicles <INT> Delay vehicle insertion to stay within the given maximum number; default: -1
--max-num-teleports <INT> Abort the simulation if the given maximum number of teleports is exceeded; default: -1
--scale <FLOAT> Scale demand by the given factor (by discarding or duplicating vehicles); default: 1
--time-to-teleport <TIME> Specify how long a vehicle may wait until being teleported, defaults to 300, non-positive values disable teleporting; default: 300
--time-to-teleport.highways <TIME> The waiting time after which vehicles on a fast road (speed > 69m/s) are teleported if they are on a non-continuing lane; default: 0
--waiting-time-memory <TIME> Length of time interval, over which accumulated waiting time is taken into account (default is 100s.); default: 100
--max-depart-delay <TIME> How long vehicles wait for departure before being skipped, defaults to -1 which means vehicles are never skipped; default: -1
--sloppy-insert <BOOL> Whether insertion on an edge shall not be repeated in same step once failed; default: false
--eager-insert <BOOL> Whether each vehicle is checked separately for insertion on an edge; default: false
--random-depart-offset <TIME> Each vehicle receives a random offset to its depart value drawn uniformly from [0, TIME]; default: 0
--lanechange.duration <TIME> Duration of a lane change maneuver (default 0); default: 0
--lanechange.overtake-right <BOOL> Whether overtaking on the right on motorways is permitted; default: false
--tls.all-off <BOOL> Switches off all traffic lights.; default: false
--time-to-impatience <TIME> Specify how long a vehicle may wait until impatience grows from 0 to 1, defaults to 300, non-positive values disable impatience growth; default: 300
--pedestrian.model <STRING> Select among pedestrian models ['nonInteracting', 'striping', 'remote']; default: striping
--pedestrian.striping.stripe-width <FLOAT> Width of parallel stripes for segmenting a sidewalk (meters) for use with model 'striping'; default: 0.65
--pedestrian.striping.dawdling <FLOAT> factor for random slow-downs [0,1] for use with model 'striping'; default: 0.2
--pedestrian.striping.jamtime <TIME> Time in seconds after which pedestrians start squeezing through a jam when using model 'striping' (non-positive values disable squeezing); default: 300
--pedestrian.remote.address <STRING> The address (host:port) of the external simulation; default: localhost:9000
--astar.landmark-distances <FILE> Initialize lookup table for astar ALT-variant from the given file

Routing

Option Description
--routing-algorithm <STRING> Select among routing algorithms ['dijkstra', 'astar', 'CH', 'CHWrapper']; default: dijkstra
--weights.random-factor <FLOAT> Edge weights for routing are dynamically disturbed by a random factor drawn uniformly from [1,FLOAT); default: 1
--astar.all-distances <FILE> Initialize lookup table for astar from the given file (generated by marouter --all-pairs-output)
--device.rerouting.probability <FLOAT> The probability for a vehicle to have a 'rerouting' device; default: 0
--device.rerouting.explicit <STRING> Assign a 'rerouting' device to named vehicles
--device.rerouting.deterministic <BOOL> The 'rerouting' devices are set deterministic using a fraction of 1000; default: false
--device.rerouting.period <TIME> The period with which the vehicle shall be rerouted; default: 0
--device.rerouting.pre-period <TIME> The rerouting period before depart; default: 1
--device.rerouting.adaptation-weight <FLOAT> The weight of prior edge weights for exponential moving average; default: 0.5
--device.rerouting.adaptation-steps <INT> The number of steps for moving average weight of prior edge weights; default: 0
--device.rerouting.adaptation-interval <TIME> The interval for updating the edge weights; default: 1
--device.rerouting.with-taz <BOOL> Use zones (districts) as routing start- and endpoints; default: false
--device.rerouting.init-with-loaded-weights <BOOL> Use weight files given with option --weight-files for initializing edge weights; default: false
--device.rerouting.threads <INT> The number of parallel execution threads used for rerouting; default: 0
--device.rerouting.output <FILE> Save adapting weights to FILE

Report

Option Description
-v <BOOL>
--verbose <BOOL>
Switches to verbose output; default: false
--print-options <BOOL> Prints option values before processing; default: false
-? <BOOL>
--help <BOOL>
Prints this screen; default: false
-V <BOOL>
--version <BOOL>
Prints the current version; default: false
-X <STRING>
--xml-validation <STRING>
Set schema validation scheme of XML inputs ("never", "auto" or "always"); default: auto
--xml-validation.net <STRING> Set schema validation scheme of SUMO network inputs ("never", "auto" or "always"); default: never
-W <BOOL>
--no-warnings <BOOL>
Disables output of warnings; default: false
-l <FILE>
--log <FILE>
Writes all messages to FILE (implies verbose)
--message-log <FILE> Writes all non-error messages to FILE (implies verbose)
--error-log <FILE> Writes all warnings and errors to FILE
--duration-log.disable <BOOL> Disable performance reports for individual simulation steps; default: false
--duration-log.statistics <BOOL> Enable statistics on vehicle trips; default: false
--no-step-log <BOOL> Disable console output of current simulation step; default: false

Emissions

Option Description
--phemlight-path <FILE> Determines where to load PHEMlight definitions from.; default: ./PHEMlight/
--device.emissions.probability <FLOAT> The probability for a vehicle to have a 'emissions' device; default: 0
--device.emissions.explicit <STRING> Assign a 'emissions' device to named vehicles
--device.emissions.deterministic <BOOL> The 'emissions' devices are set deterministic using a fraction of 1000; default: false

Communication

Option Description
--device.btreceiver.probability <FLOAT> The probability for a vehicle to have a 'btreceiver' device; default: 0
--device.btreceiver.explicit <STRING> Assign a 'btreceiver' device to named vehicles
--device.btreceiver.deterministic <BOOL> The 'btreceiver' devices are set deterministic using a fraction of 1000; default: false
--device.btreceiver.range <FLOAT> The range of the bt receiver; default: 300
--device.btreceiver.all-recognitions <BOOL> Whether all recognition point shall be written; default: false
--device.btreceiver.offtime <FLOAT> The offtime used for calculating detection probability (in seconds); default: 0.64
--device.btsender.probability <FLOAT> The probability for a vehicle to have a 'btsender' device; default: 0
--device.btsender.explicit <STRING> Assign a 'btsender' device to named vehicles
--device.btsender.deterministic <BOOL> The 'btsender' devices are set deterministic using a fraction of 1000; default: false

Battery

Option Description
--device.battery.probability <FLOAT> The probability for a vehicle to have a 'battery' device; default: 0
--device.battery.explicit <STRING> Assign a 'battery' device to named vehicles
--device.battery.deterministic <BOOL> The 'battery' devices are set deterministic using a fraction of 1000; default: false

Example Device

Option Description
--device.example.probability <FLOAT> The probability for a vehicle to have a 'example' device; default: 0
--device.example.explicit <STRING> Assign a 'example' device to named vehicles
--device.example.deterministic <BOOL> The 'example' devices are set deterministic using a fraction of 1000; default: false
--device.example.parameter <FLOAT> An exemplary parameter which can be used by all instances of the example device; default: 0

Ssm Device

Option Description
--device.ssm.probability <FLOAT> The probability for a vehicle to have a 'ssm' device; default: 0
--device.ssm.explicit <STRING> Assign a 'ssm' device to named vehicles
--device.ssm.deterministic <BOOL> The 'ssm' devices are set deterministic using a fraction of 1000; default: false
--device.ssm.measures <STRING> Specifies which measures will be logged (as a space seperated sequence of IDs in ('TTC', 'DRAC', 'PET')).
--device.ssm.thresholds <STRING> Specifies thresholds corresponding to the specified measures (see documentation and watch the order!). Only events exceeding the thresholds will be logged.
--device.ssm.trajectories <BOOL> Specifies whether trajectories will be logged (if false, only the extremal values and times are reported, this is the default).; default: false
--device.ssm.range <FLOAT> Specifies the detection range in meters (default is 50.00m.). For vehicles below this distance from the equipped vehicle, SSM values are traced.; default: 50
--device.ssm.extratime <FLOAT> Specifies the time in seconds to be logged after a conflict is over (default is 5.00secs.). Required >0 if PET is to be calculated for crossing conflicts.; default: 5
--device.ssm.geo <BOOL> Whether to use coordinates of the original reference system in output (default is false).; default: false

Bluelight Device

Option Description
--device.bluelight.probability <FLOAT> The probability for a vehicle to have a 'bluelight' device; default: 0
--device.bluelight.explicit <STRING> Assign a 'bluelight' device to named vehicles
--device.bluelight.deterministic <BOOL> The 'bluelight' devices are set deterministic using a fraction of 1000; default: false
--device.bluelight.parameter <FLOAT> An exemplary parameter which can be used by all instances of the example device; default: 0

Traci Server

Option Description
--remote-port <INT> Enables TraCI Server if set; default: 0
--num-clients <INT> Expected number of connecting clients; default: 1
--python-script <STRING> Runs TraCI script with embedded python

Mesoscopic

Option Description
--mesosim <BOOL> Enables mesoscopic simulation; default: false
--meso-edgelength <FLOAT> Length of an edge segment in mesoscopic simulation; default: 98
--meso-tauff <TIME> Factor for calculating the net free-free headway time; default: 1.13
--meso-taufj <TIME> Factor for calculating the net free-jam headway time; default: 1.13
--meso-taujf <TIME> Factor for calculating the jam-free headway time; default: 1.73
--meso-taujj <TIME> Factor for calculating the jam-jam headway time; default: 1.4
--meso-jam-threshold <FLOAT> 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); default: -1
--meso-multi-queue <BOOL> Enable multiple queues at edge ends; default: true
--meso-junction-control <BOOL> Enable mesoscopic traffic light and priority junction handling; default: false
--meso-junction-control.limited <BOOL> Enable mesoscopic traffic light and priority junction handling for saturated links. This prevents faulty traffic lights from hindering flow in low-traffic situations; default: false
--meso-tls-penalty <FLOAT> Apply scaled time penalties when driving across tls controlled junctions based on green split instead of checking actual phases; default: 0
--meso-minor-penalty <TIME> 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.; default: 0
--meso-overtaking <BOOL> Enable mesoscopic overtaking; default: false
--meso-recheck <TIME> Time interval for rechecking insertion into the next segment after failure; default: 0

Random Number

Option Description
--random <BOOL> Initialises the random number generator with the current system time; default: false
--seed <INT> Initialises the random number generator with the given value; default: 23423

Gui Only

Option Description
--gui-settings-file <FILE> Load visualisation settings from FILE
-Q <BOOL>
--quit-on-end <BOOL>
Quits the GUI when the simulation stops; default: false
-G <BOOL>
--game <BOOL>
Start the GUI in gaming mode; default: false
-S <BOOL>
--start <BOOL>
Start the simulation after loading; default: false
-D <BOOL>
--demo <BOOL>
Restart the simulation after ending (demo mode); default: false
-T <BOOL>
--disable-textures <BOOL>
Do not load background pictures; default: false
--window-size <STRING> Create initial window with the given x,y size
--window-pos <STRING> Create initial window at the given x,y position
--osg-view <BOOL> Start with an OpenSceneGraph view instead of the regular 2D view; default: false
--tracker-interval <FLOAT> The aggregation period for value tracker windows; default: 1
--gui-testing <BOOL> Enable ovelay for screen recognition; default: false
--gui-testing-debug <BOOL> Enable output messages during GUI-Testing; default: false

Loading order of input files

Whenever a simulation object A (such as a vehicle) defined in an input file refers to another simulation object B (such as a vehicle type), the corresponding object B must be defined before A either by being put into a file that is loaded earlier, or by being put into the same file on an earlier line.

This is of particular importance in regard to files loaded with the options --route-files <FILE> and --additional-files <FILE>. The most important feature of the option --route-files <FILE> is that it loads the files incrementally thus saving memory. However, this means vehicles and flows must be sorted by their departure and begin times.

The option --additional-files <FILE> is handled before option --route-files <FILE> and the given files are fully loaded before the simulation starts. All items which can be put into a route-file can also be put into an additional-file (no vehicle sorting is necessary). Some objects must be available at the start of the simulation (such as output objects) and thus need to be loaded with this option, but is also useful for loading things referenced by route files such as <vType>-elements, named <route> elements or <routeDistribution>.

When multiple files are given as a comma-separated list, they are loaded from left to right.

Format of additional files

Files loaded with the option --additional-files <FILE> may included a wide range of network elements such as traffic light programs, detector definitions, variable speed signs and bus stops. Also, any element permitted in a route file such as vTypes, routes and vehicles can be added. All elements may be put into the same additional file or they may be grouped into multiple files as convenient.

The additional file always needs a top level tag with arbitrary name (additional is customary). An example file is given below:

 <additional>
    <inductionLoop id="myLoop1" lane="foo_0" pos="42" freq="900" file="out.xml"/>
    <inductionLoop id="myLoop2" lane="foo_2" pos="42" freq="900" file="out.xml"/>
 
    <busStop id="station1" lane="foo_0" startPos="5" endPos="20"/>

    <vType id="bus" maxSpeed="20" length="12"/>
 </additional>


Subtopics