- 1 General
- 1.1 What is SUMO?
- 1.2 What does "SUMO" mean?
- 1.3 What kind of a traffic simulation is SUMO?
- 1.4 What is the best way to read the documentation and find out about specific topics
- 1.5 How can I contribute to SUMO?
- 1.6 How do code contributions work?
- 1.7 How do I contribute to the wiki?
- 1.8 How do I cite SUMO
- 1.9 How do I unsubscribe from the mailing list?
- 2 General Problem Solving
- 2.1 An application crashed. What should I do?
- 2.2 Why does SUMO not behave as documented in this wiki?
- 2.3 There is an error message but I don't know what I did wrong
- 2.4 How do I report erroneous behavior of a SUMO application?
- 2.5 SUMO does not do what I want and I don't know how to solve the issue
- 2.6 What should I do to get helpful answers on the mailing list?
- 2.7 I asked a question on the mailing list and did not get an answer within X days. Why?
- 2.8 I want to do a project with SUMO can you help me with the implementation?
- 3 TraCI
- 4 Features
- 4.1 Does SUMO support traffic within the junctions?
- 4.2 Is it possible to connect SUMO to an external application (f.e. ns-2)?
- 4.3 Can SUMO simulate lefthand traffic?
- 4.4 Can SUMO generate movement traces?
- 4.5 Can SUMO simulate heterogeneous traffic / lane-free traffic ?
- 4.6 Can SUMO simulate driving in reverse?
- 4.7 Can SUMO simulate driving through the oncoming lane?
- 4.8 Can SUMO be run in parallel (on multiple cores or computers)?
- 5 Building / Installation
- 5.1 How do I access the code repository?
- 5.2 Is there further documentation on Git and Subversion?
- 5.3 How to get an older version of SUMO?
- 5.4 How to check out revision 5499 (or any other outdated sumo)?
- 5.5 Which platforms are supported?
- 5.6 Can I run multiple versions of SUMO alongside each other?
- 5.7 Letters and words are represented as squares in SUMO-GUI and Netedit
- 5.8 Troubleshooting
- 5.9 Uninstalling
- 6 Basic Usage
- 6.1 What measures are used/represented?
- 6.2 What does the following error mean?
- 6.3 How do I work around a file not found / command not found error?
- 6.4 How do I work around missing dll errors on windows?
- 6.5 What is the meaning of the different exit codes (linux command line)
- 6.6 What's the deal with schema resolution warnings / xsd errors?
- 6.7 What causes Error: unable to resolve host/address 'sumo.dlr.de' ?
- 6.8 Why can my input-XML files not be read even though they look OK to me?
- 6.9 Why do I get errors about missing files / file not found even though the file exists?
- 7 NETCONVERT
- 7.1 I made changes to the .net.xml-file but it did not work as expected. Why?
- 7.2 My network looks ugly, All the junction shapes are wrong. How come?
- 7.3 Some junctions in my network look ugly. What can I do?
- 7.4 Can I import the free network of Osnabrück "Frida"?
- 7.5 Are there any other free networks available I can use?
- 7.6 The application hangs after a while (few memory consumption, most of the system time) (Windows)
- 7.7 Many errors of the form Edge's 'x' from- and to-node are at the same position
- 7.8 Many errors of the form Error: Type 'x' used by edge 'y' was not defined
- 7.9 Error: SUMO was compiled without GDAL support
- 8 NETEDIT
- 9 Traffic Demand Generation
- 10 Simulation
- 10.1 How to simulate an accident
- 10.2 I have changed my network and now SUMO does not load it.
- 10.3 How do I change the duration of cycles and phases?
- 10.4 I can not see a vehicle moving in my simulation
- 10.5 Different departure times with different time step size
- 10.6 How to save a simulation state and proceed later and/or differently
- 10.7 How can I make the simulation run faster?
- 10.8 The simulation gets slow with many vehicles waiting for insertion
- 10.9 The simulation runs slow on the command line
- 10.10 The simulation has lots of jams/deadlocks. What can I do?
- 10.11 Why do the vehicles perform unexpected lane-changing maneuvers?
- 10.12 How do I get high flows/vehicle densities?
- 10.13 How do I force a lane change?
- 10.14 Are there any limits in regard to the size of a simulation scenario?
- 11 Visualisation
- 11.1 SUMO-GUI breaks
- 11.2 Display flickers in the area of the mouse pointer (Windows)
- 11.3 SUMO-GUI windows and buttons appear but no net/cars are visible / Vehicles are not visible or flicker / Roads are drawn on top of vehicles
- 11.4 Building videos from SUMO-GUI
- 11.5 Incomplete output
- 11.6 Incompatibility with DisplayLink devices
- 12 Upgrading
- 13 Python tools
- 13.1 How do I run the python tools?
- 13.2 tools fail with a SyntaxError or ImportError or some TypeError concerning ">>"
- 13.3 tools fail with an ImportError
- 13.4 how do I import traci or sumolib in my own python script?
- 13.5 the python scripts do not accept command line arguments (windows only)
- 13.6 osmWebWizard.py fails to generate Scenario on Windows 10
- 14 (Communication) Network Simulators
- 15 Outdated (Questions for very old versions of SUMO)
What is SUMO?
- SUMO is a traffic simulation package. It is meant to be used to simulate networks of a city's size, but you can of course use it for smaller networks and larger, too, if your computer power is large enough.
What does "SUMO" mean?
- "SUMO" is an acronym for "Simulation of Urban MObility".
What kind of a traffic simulation is SUMO?
- SUMO is mainly a microscopic, space-continuous road traffic simulation. It supports multi-modal and inter-modal ground based traffic. SUMO models individual vehicles and their interactions using models for car-following, lane-changing and intersection behavior. It also uses pedestrian models to simulate the movement of persons and their interactions with vehicles.
- To allow for the efficient simulation of very large scenarios, it is also possible to run SUMO as a mesoscopic simulation.
- SUMO also supports macroscopic traffic assignment using the MAROUTER application.
What is the best way to read the documentation and find out about specific topics
- The main page for getting an overview over the various topics is the outline SUMO_User_Documentation. If you do not find the topic of interest listed there it is often useful to use google for searching the wiki (it tends to be a lot smarter than the wiki-internal search). Add sumo and wiki to your search terms and it will generally find the relevant pages.
How can I contribute to SUMO?
- Tell us about your extensions on the developer mailing list
- Send us patches (bug fixes as well as extensions) either to the same list or as pull requests at https://github.com/eclipse/sumo (also see next question).
- Report bugs (crashes, surprising behavior) or invalid documentation at sumo-user or at https://github.com/eclipse/sumo/issues
- The main development team at the DLR is always looking for project partners. Contact us to discuss your proposals.
- Make your SUMO simulation scenarios publicly available
- Cite us in your publications and tell other people about SUMO.
- Answer questions on the sumo-user mailing list whenever you know the answer
- Contribute to this wiki (contact us, so we can give you editing rights)
- Create a video tutorial and tell us about it
- Join us at the annual SUMO User Conference
How do code contributions work?
- We need to make sure that you have the necessary rights on the code and that you agree that your contribution is put under the Eclipse Public License v2. The easiest way to do achieve this is
- Create a GitHub account
- Configure the git client on your computer to use the email address that you used when registering for your acount:
git config --global user.email "email@example.com"
- Create an Eclipse account if you do not already have one. Make sure to use the same email address as for GitHub
- Fill out a simple online form, called the Eclipse Contributor Agreement (ECA, this is mandatory)
- Fork the sumo repository on GitHub
- Clone the forked repository to your computer
git clone https://github.com/yourgithubid/sumo.git
- Modify the files in the created sumo clone directory
- From within this directory Commit your changes with
git add src git commit -m "your change message" -s
- Push your changes to your fork on GitHub with
- Send us a pull request on GitHub
- More info may be found at https://wiki.eclipse.org/Development_Resources/Contributing_via_Git
How do I contribute to the wiki?
- Alternatively: Send an email stating your preferred user name to firstname.lastname@example.org
- wait for our mail telling you that you have edit-permissions
How do I cite SUMO
- Cite using "Microscopic Traffic Simulation using SUMO"; Pablo Alvarez Lopez, Michael Behrisch, Laura Bieker-Walz, Jakob Erdmann, Yun-Pang Flötteröd, Robert Hilbrich, Leonhard Lücken, Johannes Rummel, Peter Wagner, and Evamarie Wießner. IEEE Intelligent Transportation Systems Conference (ITSC), 2018.
How do I unsubscribe from the mailing list?
Go to https://lists.sourceforge.net/lists/listinfo/sumo-user. At the bottom of the page you will find a form that allows you to enter your email address to unsubscribe it from the list.
General Problem Solving
An application crashed. What should I do?
The applications in the SUMO suite may crash when running out of memory. Monitor the memory usage of your applicatons to check whether that may be your problem. 32bit-applications may only use 2GB of RAM. Use the 64bit version and ensure sufficient memory on your machine in order to work with larger files. If this does not fix the crash, please report this as a bug as explained below.
Why does SUMO not behave as documented in this wiki?
This wiki documents the behavior of the latest development version. This is usually quite close the the latest release (differences are explicitly listed in the ChangeLog. If you are using an older version of SUMO, you need to refert to the documentation that is packaged with that version. Note that we do not back-port bugfixes to older version of SUMO. If possible you should always use the latest version of SUMO.
There is an error message but I don't know what I did wrong
- Activate XML-Validation on your input files. If that does not solve your problem feel free to ask on the mailing list but please remember to copy / screenshot the error message itself and attach it to your question. Attaching (zipped!) input files for reproducing the error message is also a good idea (see question above).
How do I report erroneous behavior of a SUMO application?
- If you suspect a bug in one of the applications you should report your findings by sending the following items to the mailing list:
- a description of the SUMO-version and the operating system you are using
- a screenshot or error output showing the unexpected behavior (this may allow us to diagnose the problem at a single glance)
- the complete input files for reproducing the error (i.e. a .sumocfg and all files referenced therein) in a zip-archive. Please remove unnecessary inputs (i.e. only 2 vehicles instead of 2000) and try to find the minimum input example which still shows the problem.
- a description at which time step (for simulations) and on which edge/junction the problem occurs
SUMO does not do what I want and I don't know how to solve the issue
- See above but please give enough details when asking on the mailing list.
What should I do to get helpful answers on the mailing list?
- Make your question specific (avoid vague terms).
- Phrase your question using familiar terms (not everyone is an expert in your domain).
- Don't ask for too many things in a single post.
- Do some research on your own before you post the question (otherwise you may appear to be lazy).
- read the FAQ
- read the documentation
- check out the Tutorials
- do a web search (past questions and answers from the mailing list can be found by google)
- Do not ask the same thing twice in a short span of time. If you are in a hurry and cannot get an answer, try to change your question according to the above suggestions.
- Be polite
I asked a question on the mailing list and did not get an answer within X days. Why?
- Community support is provided on a best effort basis. Questions are mostly answered by the developers when they find time between their projects. Thus, response times can vary between hours and weeks (especially during holidays). Sometimes, when there is a high volume of questions on the mailing list, your question may have been lost. Feel free to repost your question if you did not get an answer within a week. Response times also vary with the difficulty of the question (because the person answering it needs to find a bigger time slice to tackle the problem). Also, follow the advice given above when phrasing your questions to increase the chance for quick answers.
I want to do a project with SUMO can you help me with the implementation?
- Unfortunately, we do not have the resources to do other peoples projects for free. Contact us for paid consultancy.
- We try to help out with bugs and give pointers to the relevant documentation but this free support is limited to what we can do in our spare time.
My TraCI-program is not working as intended. Can you help me debug it?
- Unfortunately, we do not have the resources to debug other peoples code. If you suspect a bug in TraCI itself, the general rules of bug-reporting apply. Feel free to post your code to the mailing list as there may be other programmers present who could help. Be aware that someone who wants to reproduce your problem needs all your input files to do so.
My TraCI-program is not working as intended. How do I debug it?
When using TraCI there are two processes that can raise errors: SUMO and the TraCI script being run. Here are some guidelines for figuring out what is happening:
- The SUMO error connection reset by peer indicates a problem in the script. The python strack trace should point to the problem (in the simplest case, the script ends without calling traci.close())
- The error TraCIFatalError connection closed by SUMO indicates a problem with SUMO
- The error TraCIException indicates a minor problem with the script. (e.g. asking for a vehicle that does not exist). This type of error can be safely handled by the script with try/except
- It is a good idea to run SUMO with the option --log <FILE> to figure out what went wrong in a simulation run or why the simulation aborted.
- If SUMO crashes (just stops instead of quiting with an error message) here is how to debug it:
- in the options to traci.start() add ['--save-configuration', 'debug.sumocfg']
- run your script (sumo will not start and the script will try to connect repeatedly)
- run the debug version of sumo with the saved configuration in a debugger while the script is still trying to connect
gdb --args sumoD -c debug.sumocfg
Error: tcpip::Storage::readIsSafe: want to read 8 bytes from Storage, but only 4 remaining
The TraCI protocal changed in version 1.0.0. Please make sure that TraCI client version and SUMO version match.
Does SUMO support traffic within the junctions?
- Yes, SUMO supports inner-junction traffic since version 0.9.5.
Is it possible to connect SUMO to an external application (f.e. ns-2)?
Can SUMO simulate lefthand traffic?
- Yes. It is supported since version 0.24.0. To build a network for lefthand traffic, the option --lefthand must be set. Note, that this option exists in earlier versions but only works correctly since 0.24.0.
Can SUMO generate movement traces?
- Yes. This is accomplished by using the traceExporter tool to convert SUMO outputs into the appropriate format. Also see Topics/V2X
Can SUMO simulate heterogeneous traffic / lane-free traffic ?
- Yes (since version 0.27.0). The Sublane-Model is activated by setting the option --lateral-resolution <FLOAT>.
Can SUMO simulate driving in reverse?
- No. While it is possible to move a vehicle backwards using TraCI, other vehicles will not react in a sensible manner to this.
Can SUMO simulate driving through the oncoming lane?
- Yes. (since version 0.27.0). The opposite-direction-driving feature is activated by using a network with additional information.
Can SUMO be run in parallel (on multiple cores or computers)?
- The simulation itself always runs on a single core. However, routing in SUMO or DUAROUTER can be parallelized by setting the option --device.rerouting.threads <INT> and --routing-threads <INT> respectively.
- The python TraCI library allows controlling multiple simulations from a single script either by calling traci.connect and storing the returned connection object or by calling traci.start(label=...) and retrieving the connection object with traci.getConnection(label).
Building / Installation
How do I access the code repository?
- Since 2018-04-10 SUMO moved to the organizational Eclipse account at GitHub. You have the choice to access the repository using git or subversion. There are plenty of clients for all platforms. If you use the command line client, you can checkout sumo using the following command (for git):
git clone --recursive https://github.com/eclipse/sumo
If you want to see the full project history in your git checkout please change to the created directory and call
git fetch origin refs/replace/*:refs/replace/*
For later updates go inside the sumo directory, which has been created, and simply type
Is there further documentation on Git and Subversion?
How to get an older version of SUMO?
How to check out revision 5499 (or any other outdated sumo)?
- You can use the subversion option "-r <REVISION_NUMBER>" together with the checkout on the command line. If you are using git you can find the correct hash using the git log. You have to consult your client's documentation if you use a graphical interface. Please be aware of the fact that we can only give very limited support for older versions.
Which platforms are supported?
- We compile regularly under Windows 7 and Windows Server 2012 R2 using Visual Studio 2013 (32bit and 64bit) and have daily builds on Linux (openSUSE Leap 42.1 (64bit) and openSUSE 13.1 (32bit)). Furthermore there are nightly builds on the open build service. SUMO can be installed on macOS via Homebrew (or built from source). We would be happy to hear about successful builds on other platforms. We already heard about successful builds on Solaris and Cygwin.
Can I run multiple versions of SUMO alongside each other?
- Different versions of SUMO generally do not interfere with each other. When setting environment variables such as SUMO_HOME or PATH, care must be taken to reference the desired directory. On linux, the package manager will generally only offer a single version. All other versions must be built from source.
Letters and words are represented as squares in SUMO-GUI and Netedit
- Make sure that your computer supports 3D Acceleration and graphical drivers are correctly installed and configured.
- In most cases you can simply delete the sumo folder. If you installed sumo via a package manager on linux, uninstall it via the package manager as well.
What measures are used/represented?
- All time values are given in seconds. All length values are given in meters. This means that speed should be given in m/s, etc.
- Currently, the default simulation time step is one second long (to be exact: in each simulation step one second real time is simulated).
What does the following error mean?
- Warning: No types defined, using defaults... Error: An exception occurred! Type:RuntimeException, Message:The primary document entity could not be opened. Id=<PATH> Error: (At line/column 1/0). Error: Quitting (conversion failed).
- Answer: Simply that the file you try to use (<PATH>) does not exist. This is xerces' way to say "file not found".
How do I work around a file not found / command not found error?
- To run the command-line programs your operating system must be able to find them.
- If you are using Windows please consult Basics/Basic Computer Skills#running_programs_from_the_command_line
- If you are using Linux run
export PATH=$PATH:/path/to/sumo/bin(replace /path/to/sumo/bin with the path to the bin directory of your sumo installation)
How do I work around missing dll errors on windows?
- Install MSVC2013 Redistributable (Old versions of SUMO may also require the MSVC2010 Redistributable)
What is the meaning of the different exit codes (linux command line)
- 0 is success, 1 is a recognized error and anything above is an unorderly termination (crash). If you see exit codes other than 0 or 1 please tell us about it
What's the deal with schema resolution warnings / xsd errors?
- Since version 0.20.0 sumo performs XML-validation on input files with schema information. This helps to detect common mistakes during manual preparation of XML input files. Files generated by sumo applications such as DUAROUTER always add schema information. The schema files which are needed for checking are retrieved from the local sumo installation if the environment variable SUMO_HOME is set. Otherwise the files will be retrieved from sumo.dlr.de which is slower. Validation can be disabled by using the option --xml-validation never or by deleting the schema information at the top of the XML input file(s).
What causes Error: unable to resolve host/address 'sumo.dlr.de' ?
- This is related to XML-validation (see above). When the the environment variable SUMO_HOME is not set, applications will try to retrieve the xsd schema files online. If there is no internet connection. The above error results. The solution is to either
- disable validation or
- declare SUMO_HOME or
- ensure internet connectivity
Why can my input-XML files not be read even though they look OK to me?
- Errors such as
Error: attribute name expected at At line/column 10/46
- can be caused by non-printing characters in the XML-file. Open your XML-file in a document editor and activate the option for showing line-breaks and other non-printing characters to find them.
Why do I get errors about missing files / file not found even though the file exists?
- Sumo uses the space character to separate file paths. This means it will not be able to load files with a path such as C:\Program Files\foo.xml (even when adding quotation marks). Additionally, SUMO may fail to load files if the name contains characters outside the basic ASCII set.
I made changes to the .net.xml-file but it did not work as expected. Why?
- As a general rule, you should never modify the .net.xml file directly nor try to generate one with a custom process. There are lots of subtle interdependencies between network elements which are hard to get right with manual modifications. Even if your .net.xml can be loaded by SUMO it could fail in ways that are less obvious:
- By having right-of-way rules that work somewhat differently than expected (this part of the .net.xml file is particularly complex)
- By losing properties when later being edited with NETEDIT
- By failing to work with updated versions of SUMO
If you need to modify a network there are several possibilities:
- Edit the network with NETEDIT
- Modify the original input files and then rebuild the net with NETCONVERT.
- Patch the network with NETCONVERT. You can load a .net.xml file together with small XML-files to patch individual edges, nodes and connections. Additional possibilities are described here. For changing traffic light plans or timings see Simulation/Traffic_Lights. If you cannot figure out how to accomplish the desired changes this way, contact us!.
- Use NETCONVERT-option --plain-output-prefix to convert the network into it's plain XML representation. Then modify these files and rebuild the network
If you need to build a network from custom input data it is recommended to generate plain-xml-files (nodes, edges, connections) with a custom process and build your network with NETCONVERT from these files. These input files allow for many customization of geometrical and structural network properties. If you cannot get them to represent the network you need, ask for help on the mailing list. Alternatively you could also add another import module to NETCONVERT (which we would be happy to integrate if possible).
My network looks ugly, All the junction shapes are wrong. How come?
- This currently happens up to version 0.23.0 if you import networks with left-handed traffic. See #Can_SUMO_simulate_lefthand_traffic.3F.
Some junctions in my network look ugly. What can I do?
- See Joining Junctions. If that doesn't help, check for invalid edge geometry. A sharp turn in front of an intersection (even if the segment is only centimeters long) may mess up the shape computation. Read the NETCONVERT warnings about sharp angles and consider using NETCONVERT option --geometry.min-radius.fix.
- If that still doesn't help you may specify the shape of the junction manually using the shape-attribute.
Can I import the free network of Osnabrück "Frida"?
- Yes and no. You can import it using NETCONVERT, a description is available at Networks/Import/ArcView.
- This may be a good gis-network but lacks some needed information in order to be usable for simulations (see discussion at the link above).
Are there any other free networks available I can use?
The application hangs after a while (few memory consumption, most of the system time) (Windows)
- You are probably running a program compiled in the debug-mode. This yields in at least the triple of normal memory usage and your system may not be able to solve. Try to use the normal version, build in Release-mode (or buy more RAM :-) ).
Many errors of the form Edge's 'x' from- and to-node are at the same position
- You are probably trying to import a network with geo-coordinates without specifying a geo-projection. Add option --proj.utm.
Many errors of the form Error: Type 'x' used by edge 'y' was not defined
- You are probably trying to re-import an OSM-network written to plain XML data. Add --ignore-errors.edge-type or provide a type file.
Error: SUMO was compiled without GDAL support
The default windows release is currently provided without GDAL support due to EPL2 Licensing issues. If you need to import shapefiles, either use the Linux version or download the nightly-extra version
How can I obtain NETEDIT?
- NETEDIT is available as part of the regular distribution since version 0.25.0.
Traffic Demand Generation
How do I generate random routes?
- First of all you should know that random routes are probably quite unrealistic.
- If you wish to use them anyway, use the script <SUMO_HOME>/tools/trip/randomTrips.py to generate random trips as explained here Tools/Trip#randomTrips.py.
- You can also call the script without options to get additional help.
- See Demand/Shortest or Optimal Path Routing#Usage_Examples for more information on turning trips into routes.
How do I maintain a constant number of vehicles in the net?
- There are different methods for accomplishing this. In either case the simulation itself should be constraint using options --begin, --end.
- You can use the option --max-num-vehicles to set the desired number. Vehicle insertions are delayed whenever this number would be exceeded. To avoid a large number of delayed vehicles it is recommended to also use the option --max-depart-delay. When using this approach you must ensure that there is a sufficient number of vehicles that are ready for insertion at all times. Note, that the number of distinct vehicle IDs over the whole simulation is much larger the specified value because some vehicles leave the simulation and new vehicles with distinct IDs are inserted to replace them.
- You can use rerouters in the simulation. Rerouters, assign a new route for vehicles driving across them and thus prevent them from leaving the network. For an example with a simple circle see <SUMO_HOME>/tests/sumo/cf_model/drive_in_circles
- If the networks is not circular to begin with (i.e a single road) you can make the network circular in a non-geometrical way by adding a return edge and declaring it's length to be very short (minimum 0.1m).
- You can generate long trips going around the network with lots of detours. This can be accomplished using randomTrips.py by setting the options below. If the network contains disconnected parts, not all random trips will be viable. In this case, simply generate more trips and delete superfluous vehicles from the output route file.
- --begin <your desired begin time>
- --end <begin + time in which vehicles shall be inserted to then network>
- --period <(end - begin) / number of vehicles desired>
- --intermediate <INT> set to a large value to ensure that vehicles remain in the simulation long enough
- -r <output route file>
- You can use JTRROUTER to generate vehicles which drive randomly around the network with configurable turning ratios
A vehicle cannot reach its target or takes a circuitous route. Why?
- Unexpected routes are often caused by invalid lane-to-lane connections or vClass-restrictions. Even if there are some lanes on every edge that permit the vehicle, they may not be connected. If the vehicle has the default type, it will ignore access restrictions and travel on all lanes. The netcheck tool can be used to visualize connectivity from a starting edge and to discover missing connections. It may be necessary to delete some detour edges from the network to discover the relevant connectivity boundaries.
- To investigate connectivity SUMO-GUI can be made to show lane-to-lane connections when customizing the visualization options for junctions. To investigate lane-permission issues, the menu option Edit->Select lanes which allow... can be used for visualizing selected permissions.
How do I generate SUMO routes from GPS traces?
- The answer largely depends on the quality of your input data mainly on the frequency / distance of your location updates and how precise the locations fit your street network. In the best case there is a location update on each edge of the route in the street network and you can simply read off the route by mapping the location to the street. This mapping can be done using the python sumolib coming with sumo, see Tools/Sumolib#locate_nearby_edges_based_on_the_geo-coordinate.
- This will fail when there is an edge in the route which did not get hit by a data point or if you have a mismatch (for instance matching an edge which goes in the "wrong" direction). In the former case you can easily repair the route using DUAROUTER with --repair. Another small script which helps here is Tools/Routes#tracemapper.py. You can also use the map matching plugin from Contributed/SUMOPy here.
- For more complex cases (i.e. large temporal gaps or spatial errors) the problem is known as Map Matching. Open source tools exist to facilitate this (MatchGPX2OSM graphhopper).
- To exactly reproduce high-resolution trajectories, it is possible to map exact vehicle locations (including lateral positioning) and also to move vehicles beyond the road space by using the TraCI moveToXY function.
How to simulate an accident
Often, the effects of an accident are required instead of the accident itself. Without using TraCI the following approaches may be useful:
- Let a vehicle halt on the lane for some time (see Definition of Vehicles, Vehicle Types, and Routes#Stops). This works quite nice for simulating accidents.
- Put a variable speed sign of the lane where the accident is meant to be and let it reduce the speed (see Simulation/Variable Speed Signs). This method will reduce the throughput on the lane, but further dynamics will rather not fit to what one would expect from an accident situation.
- You may of course combine both approaches. Within a project we simulated traffic incidents by letting vehicles stop on one lane and reducing the speed on the other lanes.
- Alternatively, you may close one or more of the lanes on an edge
- If you close the whole edge, rerouting may be triggered as well
- By setting the option --collision.stoptime, traffic jams may be created after a registered collision.
I have changed my network and now SUMO does not load it.
- Actually, SUMO-networks are not meant to be edited by hand. You have to describe everything within your input properly and let NETCONVERT build your network. Editing networks by hand is very complicated and error-prone.
How do I change the duration of cycles and phases?
- use NETEDIT
I can not see a vehicle moving in my simulation
- There may be several reasons why you do not see the cars.
- The simulation is not yet running (click the "play" button (), see SUMO-GUI#Usage_Description)
- If your simulation area is too big, cars will not be displayed unless you zoom into the net. Cars are simply to small when looking from far away. To change this you may also set the option Draw with constant size when zoomed out (see visualization settings for vehicles).
- The simulation is too fast so that all vehicles disappear before being seen. To avoid this, you may increase the Delay-value to slow down the simulation.
- You might have outdated graphic card drivers
Different departure times with different time step size
- Vehicles are entering the network earlier with decreasing time step lengths.
- The reason for this behaviour is that a vehicle is emitted at the end of a time step. For one second time steps, this means that a vehicle which has the depart time of 0 will be inserted into the network at the end of the time step between 0 and 1, this means almost on second 1 (0.99...). If time steps of 0.1 seconds are used, the same vehicle is inserted into the network at the end of the time step between 0 and 0.1, this means almost on 0.1 (0.099...).
How to save a simulation state and proceed later and/or differently
How can I make the simulation run faster?
- make sure there are no unwanted jams The more vehicles there are in the simulion, the slower it gets.
- if your network is very large, build it with option --no-internal-links (simplified intersection model)
- If you are using trips or periodic rerouting, enable parallel routing
- use the default step-lenght of 1s (using --step-length 0.1 slows down the simulation by a factor of 10)
- if your simulation is very larger. consider using the mesoscopic simulation model
- see below for further tips on slow-down
The simulation gets slow with many vehicles waiting for insertion
- SUMO keeps checking continuously for possible vehicle insertions. If the network is jammed the number of necessary checks grows quickly. The option --max-depart-delay <TIME> may be used to discard vehicles which could not be inserted within <TIME> seconds.
The simulation runs slow on the command line
- when running on the windows operating system, the command-line output which is refreshed every simulation step slows the simulation down significantly. Use option --no-step-log to avoid this.
The simulation has lots of jams/deadlocks. What can I do?
Deadlocks in a scenario can have many causes:
- invalid network
- invalid lane numbers
- missing turning lanes
- invalid connections
- invalid junctions (big clusters of small junctions should be joined)
- invalid traffic lights (see Improving generated traffic lights)
- invalid demand (too many vehicles overall, too many vehicles starting on the same edge).
- invalid routing
- invalid insertion (vehicles being inserted on the wrong lane close to the end of an edge where they need to change to another turn lane). This can be fixed by setting the vehicle attribute departLane="best"
If the network was imported from OpenStreetMap, it is highly recommended to use the recommended import options. The best course of action typically is to observe the simulation using SUMO-GUI and figure out where the first jam develops.
Why do the vehicles perform unexpected lane-changing maneuvers?
- This may be caused by invalid lane-to-lane connections. Check the connections in SUMO-GUI by activating Junctions->show lane to lane connections in the gui settings dialog.
How do I get high flows/vehicle densities?
The following parameters will allow flows in the range of 2500 vehicles/hour/lane
- <vType speedDev="0.1" .../> (needed to allow vehicles to catch up with their leader which is impossible if all drive at the same speed)
- <vehicle departSpeed="max" departPos="last" departLane="best" ../>
To increase flows even further the following settings can be used (potentially sacrificing some realism)
- <vType sigma="0" minGap="1" length="3" .../>
- --step-length 0.5
- <vType tau="0.5" .../> (should not be lower than step-length)
How do I force a lane change?
- There are several options to force a vehicle onto a lane:
- setting vehicle attributes 'departLane' and 'arrivalLane'
- setting a <stop> on the desired lane (also affects speed)
- setting a route that requires lane-changing to a specific lane for continuation
- setting the vehicle class of the vehicle and forbidding that class from using the other lanes of an edge
- trigger the lane-change via TraCI
Are there any limits in regard to the size of a simulation scenario?
- There are no hard limits on the number of streets, intersections or vehicles in SUMO. Make sure that you have enough RAM when trying to build or run scenarios beyond city-size. It may be necessary to use the 64bit version of SUMO to make use of available RAM.
- The maximum length of a simulation scenario is 285 million years (or 278 thousand years at millisecond time resolution). If you need to simulate longer time periods you must save and reload the simulation state
- Sometimes SUMO-GUI terminates with no reason. In most cases, an update of the opengl-driver solves this problem.
Display flickers in the area of the mouse pointer (Windows)
- Newer Windows-Versions seem to cache the area under the mouse to apply the mouse shadow afterwards. To avoid this, go to your Systemmenu, then Mouse->Pointers and disable the mouse shadows. That's the only solution so far. (Origin: Till Oliver Knoll, via QT Interest List)
- This problem may occur when using outdated/wrong openGL drivers. Please try to update the drivers for you graphics hardware.
Building videos from SUMO-GUI
There are several ways to build videos from your SUMO simulation. You can use screen capturing tools like VLC Player . The disadvantage of this approach is the requirement of a (very) fast CPU to capture the video in real time, it depends on the chosen resolution and screen size of the simulation.
The second approach needs a SUMO-GUI version which has support for ffmpeg compiled in (for the windows downloads this is the extra version). When in doubt open the about dialog (press F2) and read the line mentioning the compiled features (like Proj) whether it includes FFmpeg. If so, you can use the screenshot button to start video recording. Just enter a filename ending with ".h264" or ".hevc" depending on the encoder you want. Please be aware that this will slow down your simulation sometimes to the point of halting.
Another approach is the use of single images for every simulation timestep. This can be done with an additional traci command for building screenshots. A small python snippet shows the usage of this TraCI command to get a new image for each new timestep.
for i in range(duration): traci.simulationStep() traci.gui.screenshot("View #0", "images/"+str(i)+".png")
ffmpeg -r 10 -i images/%d.png -b:v 1500k -vcodec wmv2 sumo.wmv
The parameters -r set the value for the fps and -b:v the bitrate for the video.
When using the GUI or TraCI the output files seem sometimes incomplete because the files are only flushed when everything is closed. For the GUI you can either use the close item from the menu or close the whole GUI. In TraCI it is always a good idea to wait for the sumo process to be finished using some kind of process.wait() mechanism
Incompatibility with DisplayLink devices
How do I upgrade SUMO?
- The easiest way is to download the latest sumo release to a directory of your choices and start using it from there. You may have to update the environment variables PATH and SUMO_HOME to ensure that the correct version of the application is called from the command line (see Basics/Basic_Computer_Skills#Configuring_Path_Settings).
SUMO warns about deprecated networks or fails to load them
- In major versions (whenever the 1st or 2nd digit of the version number changes) there may be changes to the network format. In this case we provide scripts in <SUMO_HOME> /tools/net which can be used to upgrade your networks automatically. The current version of NETCONVERT can also be used to upgrade most network files to the current version. Simply call
netconvert -s old.net.xml -o new.net.xml
How do I run the python tools?
- See here
tools fail with a SyntaxError or ImportError or some TypeError concerning ">>"
- Many python tools require python version 2.7. We aim to have Python 3 compatibility for sumolib and traci however.
tools fail with an ImportError
- Make sure to set the environment variable SUMO_HOME to point at the base directory of your SUMO installation (the directory that contains tools and bin).
In order to import these libraries the folder <SUMO_HOME>/tools must be in your python search path. This can be accomplished by modifying the python variable sys.path as explained here and here. Alternatively you can hard-code the path to your SUMO-installation into your script:
import sys sys.path.append('/your/path/to/sumo/tools') import traci import sumolib
the python scripts do not accept command line arguments (windows only)
This is a known issue with some python installations. The usual workaround if you are not allowed to do edit the registry, is to call the python interpreter explicitly, e.g. instead of
python script.py <argument>
osmWebWizard.py fails to generate Scenario on Windows 10
This can happen with an outdated version of python 2.7. Updating to 2.715 (64bit) has been reported as fixing this problem.
(Communication) Network Simulators
How do I use .tcl files with NS2?
- Questions regarding NS2 should be put to the NS2 mailing list.
How do I combine SUMO with a network simulator?
- Check out veins.
Outdated (Questions for very old versions of SUMO)
Vehicles do not drive on the last edge of their route
- Up to (and including) version 0.13.1 a vehicle finished its route (per default) on position 0 of the last edge. You can change this by setting the attribute departPos in the vehicle definition (see Definition_of_Vehicles,_Vehicle_Types,_and_Routes). Negative values count backwards from the end of the edge, thus setting departPos="-1" will make the vehicle drive (almost) to the end of the last edge. The new default in more recent versions is the end of the edge, which should disable this behavior.
Vehicle jumps backward
- When I try to evaluate my vehicle dump, sometimes vehicle seem to jump backward (their position is smaller than in the previous step)
- To avoid jams due to an inappropriate lane changing behavior, vehicles may swap their lanes. In this case each vehicle obtains the position and speed of the other vehicle. As the position of the vehicles may differ a bit, one of the vehicles may seem to jump backwards.
- This should not happen from Version0.8 on.