FAQ

generated on 2015-09-02 00:02:07.728186 from the wiki page for FAQ for SUMO 0.24.0

Contents

General

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 a microscopic, space-continuous road traffic simulation. In the next time it will be extended to be multi-modal.

How can I contribute to SUMO?

  • Tell us about your extensions at sumo-devel
  • Send us patches (bug fixes as well as extensions) at sumo-devel. If you have larger contributions, ask us about write access to the code repository.
  • Report bugs (crashes, surprising behavior) or invalid documentation at sumo-user
  • The main development team at the DLR is always looking for project partners. Contact us to discuss your proposals.
  • Cite us in your publications and tell other people about SUMO.

How do I contribute to the wiki?

  • Attempt to log in with a Google OpenID
  • Send an email to [sumo-user@list.sourceforge.net] with your email adress
    • Alternatively: Send an email stating your preferred user name to sumo-user@list.sourceforge.net]
  • wait for our mail telling you that you have edit-permissions

How do I cite SUMO

Cite using Krajzewicz_et_al2012.

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.

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 sumo.cfg and all files referenced therein). 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

There is an error message but I don't know what I did wrong

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 input files for reproducing the error message is also a good idea (see question above).

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.

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.

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. Feel free to contact us for paid consultancy.

Features

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)?

There are several approaches to do this, see Topics/V2X

Can SUMO simulate lefthand traffic?

Yes. It is supported since version 0.24.0. Although although there is a NETCONVERT option --lefthand in older versions the resulting networks simply did not work yet.

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 ?

The SimTraM variant (a modified version of SUMO) supports the simulation of sub-lanes which. Among other things this allows several motorcycles to drive next to each other on a space that only allows the width of a single truck. The most up-to-date version can be found at https://sites.google.com/site/simtramsimulator/.

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?

No. However, we plan to implement this in the future in order to simulation this type of overtaking as well as emergency vehicle dynamics.

Building / Installation

How do I access the Subversion repository?

There are plenty of subversion clients for all platforms. If you use the command line client, you can checkout sumo using the following command:
 svn co https://svn.code.sf.net/p/sumo/code/trunk/sumo
For later updates go inside the sumo directory, which has been created, and simply type svn up.

Is there further documentation on Subversion?

There are the Sourceforge documentation and the Subversion book.

How to get an older version of SUMO?

see Downloads#SUMO_-_older_releases. On Linux, older versions must be built from source.

How to check out revision 5499 (or any other outdated sumo)?

You can use the SVN option "-r <REVISION_NUMBER>" together with the checkout on the command line. 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 XP using Visual Studio 2010 (32bit and 64bit) and have daily builds on Linux (CentOS 5 (64bit) and openSUSE 11.3 (32bit)). Furthermore there are nightly builds on the open build service. We would be happy to hear about successful builds on other platforms. We already heard about successful builds (without GUI) on MacOS X, 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 take 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.

Troubleshooting

See Installing/Linux Build or Installing/Windows Build.

Uninstalling

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.

Basic Usage

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, each 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 MSVC2010 Redistributable (Old versions of SUMO may also require the MSVC2008 Redistributable and MSVC2005 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).

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 charactor 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 faild to load files if the name contains characters outside the basic ASCII set.

NETCONVERT

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. There are lots of subtle interdependencies between network elements which are hard to get right with manual modifications. Always modify the input files and then rebuild the net 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.

My network looks ugyl, 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?

See Networks/Import/OpenStreetMap

The application hangs after a while (few memory consumption, most of the system time) (Windows)

You are propably 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 :-) ).

NETCONVERT aborts at step 12 (Computing node shapes)

Please check whether the network you try to import is encoded in geocoordinates. If so, try to convert it with the option --proj.utm (for UTM projection which is the most widely used) or --proj.dhdn (for "old" german data) or if you are familiar with the proj utility with a properly defined projection using --proj <PROJ_DEF>.

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-projectin. Add option --proj.utm.

NETEDIT

How can I obtain NETEDIT?

NETEDIT is currently not open, but made available for project partners only. We will notify the community once this changes.

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 the same number of vehicles in the net?

There are two methods for accomplishing this. In either case the simulation itself should be constraint using options --begin, --end.
  • You can use rerouters in the simulation. Rerouters, assign a new route for vehicles driving across them. For an example with a simple circle see http://sumo.dlr.de/trac.wsgi/browser/trunk/sumo/tests/sumo/extended/rerouter/cyclic_route/simple_example
  • 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>

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.

Simulation

How to simulate an accident

Currently, there are the following possibilities to simulate something like an 'accident':
  1. 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.
  2. 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.
  3. You may of course combine both approaches. Within TrafficOnline, we simulated traffic incidents by letting vehicles stop on one lane and reducing the speed on the other lanes.

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?

If you have a network that contains traffic lights, you can open it with a text editor. Then search for "tlLogic". You will find the definition(s) of your traffic light(s). Now, you can see a set of "phase"-definitions within each of the traffic lights definitions. You can change the time for each phase directly in here.
See also the documentation on traffic light (Traffic Lights) and (SUMO - More on... Traffic Lights).

I can not see a vehicle moving in my simulation

There may be two reasons why you do not see the cars.
1. If your simulation area is too big, cars will not be displayed unless you zoom into the net. The reason is that cars are displayed if their visible size is larger than 1 pixel in order to improve the visualization speed by avoiding drawing all the streets and cars even if the cars would not be visible. You may also change the settings by clicking to the color wheel in SUMO-GUI, selecting the "vehicles" panel and changing the value of "minimum size to show" to zero.
2. The simulation is too fast so that all vehicles disappear before being seen. To avoid this, you may increase the "Delay"-value what makes the simulation wait between simulation steps.

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...).

Save a simulation state and proceed later and/or differently

SUMO offers the possibility to save and load a complete simulation state since verion 0.18.0).
On earlier versions a possible workaround is to run SUMO within a virtual machine (VM) as the state of a VM can be saved at any time. Tests with VirtualBox on Linux have shown that SUMO does not run significantly slower in a VM as directly on the host if enough hardware resources are assigned to the VM (for example if you run another program simultaneously to communicate to SUMO via TraCI you should assign enough CPU-cores to the VM).

I want to use SUMO gui with the command line options from SUMO

Up to (and including) version 0.13.1 the SUMO-GUI accepted only very few command line options. But it understands all options sumo understands, if they are read from a config file. So if you want to use these options for example to use TraCI with remote port, you can simply write them into the config file.

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 traffic lights
  • invalid demand (too many vehicles overall, too many vehicles starting on the same edge, vehicles starting at inappropriate lanes)
  • invalid routing (only shortest path were used instead of a user assignment algorithm

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="free" 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)

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.
  • Due to the internal representation of time as milliseconds since simulation begin there is currently a hard limit on the time length of one consecutive simulation scenario. Times beyond 24.85 days cannot be represented up to version 0.23.0. If you need to simulate longer periods use a more recent version or use the options --save-state.times, --load-state, --load-state.offset to continue a simulation with a time offset.

Visualisation

SUMO-GUI breaks

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)

Loading of a jpeg/png fails

Currently (version 0.9.7), SUMO-GUI is not capable to load jpegs and pngs. We will try to add a support for these formats in the next time.

SUMO-GUI finishes with: FATAL: exception not rethrown (Linux)

This is a known bug in the pthreads library. The last link also shows how to patch fox in order to avoid this.

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

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 [1] or CamStudio [2]. 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.

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")

Next you have to glue the images together. This job can be done graphically with virtualdub [3] or via commandline with ffmpeg [4]. An example command for ffmpeg is shown below.

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.

Incomplete output

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

Upgrading

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

Python tools

tools fail with a SyntaxError or ImportError or some TypeError concerning ">>"

The python tools require python version 2.7. Please do not use Python 3.x!

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).

how do I import traci or sumolib in my own python script?

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 hehre. 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

traceExporter.py fails to work properly in verson 0.19.0

traceExporter has several known bugs in version 0.19.0. Please use a later release as soon as possible. Until then, use the latest svn revision of the SUMO tools by downloading

[5] extracting it somewhere on your computer and then copying the sumo-svn/tools folder on top of your existing sumo/tools folder.

server.py does download or run the scenario

The python tools require python version 2.7.

(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.

This page was last modified on 1 September 2015, at 13:56.