From 30.000 feet#
netgenerate generates abstract road networks that may be used by other SUMO-applications.
- Purpose: Abstract road network generation
- System: portable (Linux/Windows is tested); runs on command line
- Input (mandatory): Command line parameter
- Output: A generated SUMO-road network; optionally also other outputs
- Programming Language: C++
Usage Description#
The usage is described at Networks/Abstract_Network_Generation
Options#
You may use a XML schema definition file for setting up a netgenerate configuration: netgenerateConfiguration.xsd.
Configuration#
All applications of the SUMO-suite handle configuration options the same way. These options are discussed at Basics/Using the Command Line Applications#Configuration Files.
Option | Description |
---|---|
-c <FILE> --configuration-file <FILE> |
Loads the named config on startup |
-C <FILE> --save-configuration <FILE> |
Saves current configuration into FILE |
--save-configuration.relative <BOOL> | Enforce relative paths when saving the configuration; default: false |
--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 |
Grid Network#
Option | Description |
---|---|
-g <BOOL> --grid <BOOL> |
Forces NETGEN to build a grid-like network; default: false |
--grid.number <INT> | The number of junctions in both dirs; default: 5 |
--grid.length <FLOAT> | The length of streets in both dirs; default: 100 |
--grid.x-number <INT> | The number of junctions in x-dir; Overrides --grid-number; default: 5 |
--grid.y-number <INT> | The number of junctions in y-dir; Overrides --grid-number; default: 5 |
--grid.x-length <FLOAT> | The length of horizontal streets; Overrides --grid-length; default: 100 |
--grid.y-length <FLOAT> | The length of vertical streets; Overrides --grid-length; default: 100 |
--grid.attach-length <FLOAT> | The length of streets attached at the boundary; 0 means no streets are attached; default: 0 |
--grid.x-attach-length <FLOAT> | The length of streets attached at the boundary in x direction; 0 means no streets are attached; default: 0 |
--grid.y-attach-length <FLOAT> | The length of streets attached at the boundary in y direction; 0 means no streets are attached; default: 0 |
Spider Network#
Option | Description |
---|---|
-s <BOOL> --spider <BOOL> |
Forces NETGEN to build a spider-net-like network; default: false |
--spider.arm-number <INT> | The number of axes within the net; default: 13 |
--spider.circle-number <INT> | The number of circles of the net; default: 20 |
--spider.space-radius <FLOAT> | The distances between the circles; default: 100 |
--spider.omit-center <BOOL> | Omit the central node of the network; default: false |
Random Network#
Note
It is not recommended to set --rand.connectivity to 1 as the algorithm may fail to terminate in this case.
Option | Description |
---|---|
-r <BOOL> --rand <BOOL> |
Forces NETGEN to build a random network; default: false |
--rand.iterations <INT> | Describes how many times an edge shall be added to the net; default: 2000 |
--bidi-probability <FLOAT> | Defines the probability to build a reverse edge; default: 1 |
--rand.max-distance <FLOAT> | The maximum distance for each edge; default: 250 |
--rand.min-distance <FLOAT> | The minimum distance for each edge; default: 100 |
--rand.min-angle <FLOAT> | The minimum angle for each pair of (bidirectional) roads in DEGREES; default: 45 |
--rand.num-tries <INT> | The number of tries for creating each node; default: 50 |
--rand.connectivity <FLOAT> | Probability for roads to continue at each node; default: 0.95 |
--rand.neighbor-dist1 <FLOAT> | Probability for a node having exactly 1 neighbor; default: 0 |
--rand.neighbor-dist2 <FLOAT> | Probability for a node having exactly 2 neighbors; default: 0 |
--rand.neighbor-dist3 <FLOAT> | Probability for a node having exactly 3 neighbors; default: 10 |
--rand.neighbor-dist4 <FLOAT> | Probability for a node having exactly 4 neighbors; default: 10 |
--rand.neighbor-dist5 <FLOAT> | Probability for a node having exactly 5 neighbors; default: 2 |
--rand.neighbor-dist6 <FLOAT> | Probability for a node having exactly 6 neighbors; default: 1 |
--random-lanenumber <BOOL> | Draw lane numbers randomly from [1,default.lanenumber]; default: false |
--random-priority <BOOL> | Draw edge priority randomly from [1,default.priority]; default: false |
--random-type <BOOL> | Draw edge type randomly from all loaded types; default: false |
--rand.grid <BOOL> | Place nodes on a regular grid with spacing rand.min-distance; default: false |
Input#
Option | Description |
---|---|
-t <FILE> --type-files <FILE> |
Read edge-type defs from FILE |
Output#
Option | Description |
---|---|
--write-license <BOOL> | Include license info into every output file; default: false |
--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 |
-H <BOOL> --human-readable-time <BOOL> |
Write time values as hour:minute:second or day:hour:minute:second rather than seconds; default: false |
--alphanumerical-ids <BOOL> | The Ids of generated nodes use an alphanumerical code for easier readability when possible; default: true |
-o <FILE> --output-file <FILE> |
The generated net will be written to FILE |
-p <FILE> --plain-output-prefix <FILE> |
Prefix of files to write plain xml nodes, edges and connections to |
--junctions.join-output <FILE> | Writes information about joined junctions to FILE (can be loaded as additional node-file to reproduce joins |
--prefix <STRING> | Defines a prefix for edge and junction names |
--amitran-output <FILE> | The generated net will be written to FILE using Amitran format |
--matsim-output <FILE> | The generated net will be written to FILE using MATsim format |
--opendrive-output <FILE> | The generated net will be written to FILE using OpenDRIVE format |
--dlr-navteq-output <FILE> | The generated net will be written to dlr-navteq files with the given PREFIX |
--dlr-navteq.precision <INT> | The network coordinates are written with the specified level of output precision; default: 2 |
--output.street-names <BOOL> | Street names will be included in the output (if available); default: false |
--output.original-names <BOOL> | Writes original names, if given, as parameter; default: false |
--street-sign-output <FILE> | Writes street signs as POIs to FILE |
--opendrive-output.straight-threshold <FLOAT> | Builds parameterized curves whenever the angular change between straight segments exceeds FLOAT degrees; default: 1e-08 |
Processing#
Normally, both netconvert and netgenerate translate the read network so that the left- and down-most node are at coordinate (0,0). The options --offset.x and --offset.y allow to disable this and to apply different offsets for both the x- and the y-axis. If there are explicit offsets given, the normalization is disabled automatically (thus there is no need to give --offset.disable-normalization if there is at least one of the offsets given).
Option | Description |
---|---|
--turn-lanes <INT> | Generate INT left-turn lanes; default: 0 |
--turn-lanes.length <FLOAT> | Set the length of generated turning lanes to FLOAT; default: 20 |
--perturb-x <STRING> | Apply random spatial perturbation in x direction according the the given distribution; default: 0 |
--perturb-y <STRING> | Apply random spatial perturbation in y direction according the the given distribution; default: 0 |
--perturb-z <STRING> | Apply random spatial perturbation in z direction according the the given distribution; default: 0 |
--numerical-ids <BOOL> | Remaps alphanumerical IDs of nodes and edges to ensure that all IDs are integers; default: false |
--numerical-ids.node-start <INT> | Remaps IDs of nodes to integers starting at INT; default: 2147483647 |
--numerical-ids.edge-start <INT> | Remaps IDs of edges to integers starting at INT; default: 2147483647 |
--reserved-ids <FILE> | Ensures that generated ids do not included any of the typed IDs from FILE (sumo-gui selection file format) |
--geometry.split <BOOL> | Splits edges across geometry nodes; default: false |
-R <BOOL> --geometry.remove <BOOL> |
Replace nodes which only define edge geometry by geometry points (joins edges); default: false |
--geometry.remove.keep-edges.explicit | Ensure that the given list of edges is not modified |
--geometry.remove.keep-edges.input-file <FILE> | Ensure that the edges in FILE are not modified (Each id on a single line. Selection files from sumo-gui are also supported) |
--geometry.remove.min-length <FLOAT> | Allow merging edges with differing attributes when their length is below min-length; default: 0 |
--geometry.remove.width-tolerance <FLOAT> | Allow merging edges with differing lane widths if the difference is below FLOAT; default: 0 |
--geometry.max-segment-length <FLOAT> | splits geometry to restrict segment length; default: 0 |
--geometry.max-grade <FLOAT> | Warn about edge geometries with a grade in % above FLOAT.; default: 10 |
--geometry.max-grade.fix <BOOL> | Smooth edge edge geometries with a grade in above the warning threshold.; default: true |
--offset.disable-normalization <BOOL> | Turn off normalizing node positions; default: false |
--offset.x <FLOAT> | Adds FLOAT to net x-positions; default: 0 |
--offset.y <FLOAT> | Adds FLOAT to net y-positions; default: 0 |
--offset.z <FLOAT> | Adds FLOAT to net z-positions; default: 0 |
--flip-y-axis <BOOL> | Flips the y-coordinate along zero; default: false |
--roundabouts.guess <BOOL> | Enable roundabout-guessing; default: true |
--roundabouts.visibility-distance <FLOAT> | Default visibility when approaching a roundabout; default: 9 |
--opposites.guess <BOOL> | Enable guessing of opposite direction lanes usable for overtaking; default: false |
--opposites.guess.fix-lengths <BOOL> | Ensure that opposite edges have the same length; default: true |
--fringe.guess <BOOL> | Enable guessing of network fringe nodes; default: false |
--lefthand <BOOL> | Assumes left-hand traffic on the network; default: false |
--edges.join <BOOL> | Merges edges which connect the same nodes and are close to each other (recommended for VISSIM import); default: false |
Building Defaults#
Option | Description |
---|---|
-L <INT> --default.lanenumber <INT> |
The default number of lanes in an edge; default: 1 |
--default.lanewidth <FLOAT> | The default width of lanes; default: -1 |
--default.spreadtype <STRING> | The default method for computing lane shapes from edge shapes; default: right |
-S <FLOAT> --default.speed <FLOAT> |
The default speed on an edge (in m/s); default: 13.89 |
--default.friction <FLOAT> | The default friction on an edge; default: 1 |
-P <INT> --default.priority <INT> |
The default priority of an edge; default: -1 |
--default.type <STRING> | The default edge type |
--default.sidewalk-width <FLOAT> | The default width of added sidewalks; default: 2 |
--default.bikelane-width <FLOAT> | The default width of added bike lanes; default: 1 |
--default.crossing-width <FLOAT> | The default width of a pedestrian crossing; default: 4 |
--default.allow <STRING> | The default for allowed vehicle classes |
--default.disallow <STRING> | The default for disallowed vehicle classes |
--default.junctions.keep-clear <BOOL> | Whether junctions should be kept clear by default; default: true |
--default.junctions.radius <FLOAT> | The default turning radius of intersections; default: 4 |
--default.connection-length <FLOAT> | The default length when overriding connection lengths; default: -1 |
--default.right-of-way <STRING> | The default algorithm for computing right of way rules ('default', 'edgePriority'); default: default |
-j <STRING> --default-junction-type <STRING> |
[traffic_light,priority,right_before_left,traffic_light_right_on_red,priority_stop,allway_stop,...] Determines junction type (see wiki/Networks/PlainXML#Node_types) |
Tls Building#
Option | Description |
---|---|
--tls.set | Interprets STR[] as list of junctions to be controlled by TLS |
--tls.unset | Interprets STR[] as list of junctions to be not controlled by TLS |
--tls.guess <BOOL> | Turns on TLS guessing; default: false |
--tls.guess.threshold <FLOAT> | Sets minimum value for the sum of all incoming lane speeds when guessing TLS; default: 69.4444 |
--tls.guess.joining <BOOL> | Includes node clusters into guess; default: false |
--tls.join <BOOL> | Tries to cluster tls-controlled nodes; default: false |
--tls.join-dist <FLOAT> | Determines the maximal distance for joining traffic lights (defaults to 20); default: 20 |
--tls.uncontrolled-within <BOOL> | Do not control edges that lie fully within a joined traffic light. This may cause collisions but allows old traffic light plans to be used; default: false |
--tls.ignore-internal-junction-jam <BOOL> | Do not build mutually conflicting response matrix, potentially ignoring vehicles that are stuck at an internal junction when their phase has ended; default: false |
--tls.cycle.time <INT> | Use INT as cycle duration; default: 90 |
--tls.green.time <INT> | Use INT as green phase duration; default: 31 |
-D <FLOAT> --tls.yellow.min-decel <FLOAT> |
Defines smallest vehicle deceleration; default: 3 |
--tls.yellow.patch-small <BOOL> | Given yellow times are patched even if being too short; default: false |
--tls.yellow.time <INT> | Set INT as fixed time for yellow phase durations; default: -1 |
--tls.red.time <INT> | Set INT as fixed time for red phase duration at traffic lights that do not have a conflicting flow; default: 5 |
--tls.allred.time <INT> | Set INT as fixed time for intermediate red phase after every switch; default: 0 |
--tls.minor-left.max-speed <FLOAT> | Use FLOAT as threshold for allowing left-turning vehicles to move in the same phase as oncoming straight-going vehicles; default: 19.44 |
--tls.left-green.time <INT> | Use INT as green phase duration for left turns (s). Setting this value to 0 disables additional left-turning phases; default: 6 |
--tls.nema.vehExt <INT> | Set INT as fixed time for intermediate vehext phase after every switch; default: 2 |
--tls.nema.yellow <INT> | Set INT as fixed time for intermediate NEMA yelow phase after every switch; default: 3 |
--tls.nema.red <INT> | Set INT as fixed time for intermediate NEMA red phase after every switch; default: 2 |
--tls.crossing-min.time <INT> | Use INT as minimum green duration for pedestrian crossings (s).; default: 4 |
--tls.crossing-clearance.time <INT> | Use INT as clearance time for pedestrian crossings (s).; default: 5 |
--tls.scramble.time <INT> | Use INT as green phase duration for pedestrian scramble phase (s).; default: 5 |
--tls.half-offset | TLSs in STR[] will be shifted by half-phase |
--tls.quarter-offset | TLSs in STR[] will be shifted by quarter-phase |
--tls.default-type <STRING> | TLSs with unspecified type will use STR as their algorithm; default: static |
--tls.layout <STRING> | Set phase layout four grouping opposite directions or grouping all movements for one incoming edge ['opposites', 'incoming']; default: opposites |
--tls.no-mixed <BOOL> | Avoid phases with green and red signals for different connections from the same lane; default: false |
--tls.min-dur <INT> | Default minimum phase duration for traffic lights with variable phase length; default: 5 |
--tls.max-dur <INT> | Default maximum phase duration for traffic lights with variable phase length; default: 50 |
--tls.group-signals <BOOL> | Assign the same tls link index to connections that share the same states; default: false |
--tls.ungroup-signals <BOOL> | Assign a distinct tls link index to every connection; default: false |
--tls.discard-simple <BOOL> | Does not instatiate traffic lights at geometry-like nodes; default: false |
Edge Removal#
Option | Description |
---|---|
--keep-edges.min-speed <FLOAT> | Only keep edges with speed in meters/second > FLOAT; default: -1 |
--remove-edges.explicit | Remove edges in STR[] |
--keep-edges.explicit | Only keep edges in STR[] or those which are kept due to other keep-edges or remove-edges options |
--keep-edges.input-file <FILE> | Only keep edges in FILE (Each id on a single line. Selection files from sumo-gui are also supported) or those which are kept due to other keep-edges or remove-edges options |
--remove-edges.input-file <FILE> | Remove edges in FILE. (Each id on a single line. Selection files from sumo-gui are also supported) |
--keep-edges.in-boundary | Only keep edges which are located within the given boundary (given either as CARTESIAN corner coordinates |
--keep-edges.in-geo-boundary | Only keep edges which are located within the given boundary (given either as GEODETIC corner coordinates |
Unregulated Nodes#
Option | Description |
---|---|
--keep-nodes-unregulated <BOOL> | All nodes will be unregulated; default: false |
--keep-nodes-unregulated.explicit | Do not regulate nodes in STR[] |
--keep-nodes-unregulated.district-nodes <BOOL> | Do not regulate district nodes; default: false |
Junctions#
Option | Description |
---|---|
--junctions.right-before-left.speed-threshold <FLOAT> | Allow building right-before-left junctions when the incoming edge speeds are below FLOAT (m/s); default: 13.6111 |
--no-internal-links <BOOL> | Omits internal links; default: false |
--no-turnarounds <BOOL> | Disables building turnarounds; default: false |
--no-turnarounds.tls <BOOL> | Disables building turnarounds at tls-controlled junctions; default: false |
--no-turnarounds.geometry <BOOL> | Disables building turnarounds at geometry-like junctions; default: true |
--no-turnarounds.except-deadend <BOOL> | Disables building turnarounds except at dead end junctions; default: false |
--no-turnarounds.except-turnlane <BOOL> | Disables building turnarounds except at at junctions with a dedicated turning lane; default: false |
--no-turnarounds.fringe <BOOL> | Disables building turnarounds at fringe junctions; default: false |
--no-left-connections <BOOL> | Disables building connections to left; default: false |
--junctions.join <BOOL> | Joins junctions that are close to each other (recommended for OSM import); default: false |
--junctions.join-dist <FLOAT> | Determines the maximal distance for joining junctions (defaults to 10); default: 10 |
--junctions.join-same <BOOL> | Joins junctions that have the same coordinates even if not connected; default: false |
--max-join-ids <INT> | Abbreviate junction or TLS id if it joins more than INT junctions; default: 4 |
--junctions.corner-detail <INT> | Generate INT intermediate points to smooth out intersection corners; default: 5 |
--junctions.internal-link-detail <INT> | Generate INT intermediate points to smooth out lanes within the intersection; default: 5 |
--junctions.scurve-stretch <FLOAT> | Generate longer intersections to allow for smooth s-curves when the number of lanes changes; default: 0 |
--junctions.join-turns <BOOL> | Builds common edges for turning connections with common from- and to-edge. This causes discrepancies between geometrical length and assigned length due to averaging but enables lane-changing while turning; default: false |
--junctions.limit-turn-speed <FLOAT> | Limits speed on junctions to an average lateral acceleration of at most FLOAT m/s^2); default: 5.5 |
--junctions.limit-turn-speed.min-angle <FLOAT> | Do not limit turn speed for angular changes below FLOAT (degrees). The value is subtracted from the geometric angle before computing the turning radius.; default: 15 |
--junctions.limit-turn-speed.min-angle.railway <FLOAT> | Do not limit turn speed for angular changes below FLOAT (degrees) on railway edges. The value is subtracted from the geometric angle before computing the turning radius.; default: 35 |
--junctions.limit-turn-speed.warn.straight <FLOAT> | Warn about turn speed limits that reduce the speed of straight connections by more than FLOAT; default: 5 |
--junctions.limit-turn-speed.warn.turn <FLOAT> | Warn about turn speed limits that reduce the speed of turning connections (no u-turns) by more than FLOAT; default: 22 |
--junctions.small-radius <FLOAT> | Default radius for junctions that do not require wide vehicle turns; default: 1.5 |
--junctions.higher-speed <BOOL> | Use maximum value of incoming and outgoing edge speed on junction instead of average; default: false |
--internal-junctions.vehicle-width <FLOAT> | Assumed vehicle width for computing internal junction positions; default: 1.8 |
--rectangular-lane-cut <BOOL> | Forces rectangular cuts between lanes and intersections; default: false |
--check-lane-foes.roundabout <BOOL> | Allow driving onto a multi-lane road if there are foes on other lanes (at roundabouts); default: true |
--check-lane-foes.all <BOOL> | Allow driving onto a multi-lane road if there are foes on other lanes (everywhere); default: false |
Pedestrian#
Option | Description |
---|---|
--sidewalks.guess <BOOL> | Guess pedestrian sidewalks based on edge speed; default: false |
--sidewalks.guess.max-speed <FLOAT> | Add sidewalks for edges with a speed equal or below the given limit; default: 13.89 |
--sidewalks.guess.min-speed <FLOAT> | Add sidewalks for edges with a speed above the given limit; default: 5.8 |
--sidewalks.guess.from-permissions <BOOL> | Add sidewalks for edges that allow pedestrians on any of their lanes regardless of speed; default: false |
--sidewalks.guess.exclude | Do not guess sidewalks for the given list of edges |
--crossings.guess <BOOL> | Guess pedestrian crossings based on the presence of sidewalks; default: false |
--crossings.guess.speed-threshold <FLOAT> | At uncontrolled nodes, do not build crossings across edges with a speed above the threshold; default: 13.89 |
--walkingareas <BOOL> | Always build walking areas even if there are no crossings; default: false |
--walkingareas.join-dist <FLOAT> | Do not create a walkingarea between sidewalks that are connected by a pedestrian junction within FLOAT; default: 15 |
Bicycle#
Option | Description |
---|---|
--bikelanes.guess <BOOL> | Guess bike lanes based on edge speed; default: false |
--bikelanes.guess.max-speed <FLOAT> | Add bike lanes for edges with a speed equal or below the given limit; default: 22.22 |
--bikelanes.guess.min-speed <FLOAT> | Add bike lanes for edges with a speed above the given limit; default: 5.8 |
--bikelanes.guess.from-permissions <BOOL> | Add bike lanes for edges that allow bicycles on any of their lanes regardless of speed; default: false |
--bikelanes.guess.exclude | Do not guess bikelanes for the given list of edges |
Report#
All applications of the SUMO-suite handle most of the reporting options the same way. These options are discussed at Basics/Using the Command Line Applications#Reporting Options.
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 or selected topics; 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", "local", "auto" or "always"); default: local |
-W <BOOL> --no-warnings <BOOL> |
Disables output of warnings; default: false |
--aggregate-warnings <INT> | Aggregate warnings of the same type whenever more than INT occur; default: -1 |
-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 |
Random Number#
All applications of the SUMO-suite handle randomisation options the same way. These options are discussed at Basics/Using the Command Line Applications#Random Number Options.
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 |