# data[].attributes.attachment_link.readable_text
Tutorials/Trace File Generation

This tutorial describes how to generate vehicular trace files. Besides SUMO, the Tools/TraceExporter will be used. It requires Python to be executed and currently allows to generate trace files for ns2/ns3, Shawn, OMNET, and PHEM.

For generating vehicular traces, You need a simulation scenario, consisting at least of a road network and routes. You may visit Tutorials/Hello Sumo, Tutorials/quick start or Tutorials/Quick Start old style to learn how to get a scenario.

We assume You have the scenario and a configuration file named "myConfig.sumocfg". It may have a different name, of course. You should be able to start SUMO using Your configuration like this:

sumo -c myConfig.sumocfg

Now, we use the simulation to get an fcd output, a trace file in a SUMO-format. This file will be later converted into a trace file for one of the applications supported by Tools/TraceExporter. We generate an fcd output as following:

sumo -c myConfig.sumocfg --fcd-output sumoTrace.xml

And we will obtain the file "sumoTrace.xml".

We can now convert the vehicular traces in SUMO format into another format. For now, let's assume You would like to have a ns2 mobility file. We can generate one from the obtained fcd output using:

traceExporter.py --fcd-input sumoTrace.xml --ns2mobility-output ns2mobility.tcl

We obtain the file "ns2mobility.tcl", which we can give ns2 as input.

Output Options

Tools/TraceExporter generates files for ns2/ns3, OMNET, Shawn, and PHEM. Please visit the Tools/TraceExporter manual page for further information about how to generate these files. Look for "output options".

Different Penetration Rates

Tools/TraceExporter allows to define different equipment / penetration rates using the--penetration . will be the amount of vehicles that are exported, where 1 is equal to 100 %. This means, if You want to have 10 % of vehicles to show up in Your ns2-trace, use:

traceExporter.py --penetration 0.1 \  --fcd-input sumoTrace.xml --ns2-mobilityoutput ns2mobility.tcl

The --seed allows You to give different random number initialisations for choosing the vehicles to export.

Limiting the Time

You may limit the time steps to export using the options --begin and --end . All time steps before--begin and all after --end will be dismissed.

Additionally, You may force Tools/TraceExporter to convert only every n th time step using the option --delta . Please note that the value should be a multiple of the time step length used within the simulation.

# data[].attributes.attachment_link.title
Tutorials/Trace File Generation - SUMO Documentation

# data[].attributes.attachment_link.description
Tutorials/Trace File Generation This tutorial describes how to generate vehicular trace files. Besides SUMO, the Tools/TraceExporter will be used. It requires Python to be executed and currently allows to generate trace files for ns2/ns3, Shawn, OMNET, and PHEM. For generating vehicular traces, You need a simulation scenario, consisting at least of a road network and routes.

# data[].attributes.body
https://www.codespeedy.com/build-a-feed-forward-neural-network-in-python-numpy/

# data[].attributes.attachment_link.readable_text
The derivation of the backpropagation algorithm is fairly straightforward. It follows from the use of the chain rule and product rule in differential calculus. Application of these rules is dependent on the differentiation of the activation function, one of the reasons the heaviside step function is not used (being discontinuous and thus, non-differentiable).
Preliminaries
To see that this is equivalent to the original formulation, note that

where the left side is the original formulation and the right side is the new formulation.

Using the notation above, backpropagation attempts to minimize the following error function with respect to the neural network's weights:

Thus, for the purposes of derivation, the backpropagation algorithm will concern itself with only one input-output pair. Once this is derived, the general form for all input-output pairs in can be generated by combining the individual gradients. Thus, the error function in question for derivation is
Error Function Derivatives
The derivation of the backpropagation algorithm begins by applying the chain rule to the error function partial derivative

The first term is usually called the error, for reasons discussed below. It is denoted

Thus, the partial derivative of a weight is a product of the error term at node in layer , and the output of node in layer . This makes intuitive sense since the weight connects the output of node in layer to the input of node in layer in the computation graph.
The Output Layer
Starting from the final layer, backpropagation attempts to define the value , where is the final layer the subscript is and not because this derivation concerns a one-output neural network, so there is only one output node For example, a four-layer neural network will have for the final layer, for the second to last layer, and so on. Expressing the error function in terms of the value since is a partial derivative with respect to gives

Thus, applying the partial derivative and using the chain rule gives
The Hidden Layers
where is the activation function for the hidden layers,

Plugging this into the above equation yields a final equation for the error term in the hidden layers, called the backpropagation formula:
Backpropagation as Backwards Computation
This backwards propagation of errors is very similar to the forward computation that calculates the neural network's output. Thus, calculating the output is often called the forward phase while calculating the error terms and derivatives is often called the backward phase. While going in the forward direction, the inputs are repeatedly recombined from the first layer to the last by product sums dependent on the weights and transformed by nonlinear activation functions and . In the backward direction, the "inputs" are the final layer's error terms, which are repeatedly recombined from the last layer to the first by product sums dependent on the weights and transformed by nonlinear scaling factors and .

# data[].attributes.attachment_link.title
Backpropagation | Brilliant Math & Science Wiki

# data[].attributes.attachment_link.description
Backpropagation, short for "backward propagation of errors," is an algorithm for supervised learning of artificial neural networks using gradient descent. Given an artificial neural network and an error function, the method calculates the gradient of the error function with respect to the neural network's weights.

# data[].attributes.headline
page 76 peut nous justifier le choix du Sigmoid 

# data[].attributes.subject
page 76 peut nous justifier le choix du Sigmoid 

# data[].attributes.attachment_link.description
code for this: https://github.com/stmorgan/pythonNNexample I created a Slack channel for us, sign up here: https://wizards.herokuapp.com/ I recently created a Patreon page. If you like my videos, feel free to help support my effort here!: https://www.patreon.com/user?ty=h&u=3191693 2 Great Neural Net Tutorials: (please subscribe for more videos like these! ) 1. https://medium.com/technology-invention-and-more/how-to-build-a-simple-neural-network-in-9-lines-of-python-code-cc8f23647ca1#.l51z38s7f 2.

# data[].attributes.body
Récupération des données à partir de SUMO
de 5 min à 13 min

# data[].attributes.headline
En gros , f trafic kayban liya f les papers li kaytsta3mlo homa FNN , CNN ,RNN c est surtout had les  3 .....Mais CNN et RNN fhmt bli kay3tamdo 3la photos et les images ( data en termes d'image ) par contre dans notre cas data = nbr de vehicules par lanes ..... donc c est pour cette r

# data[].attributes.subject
En gros , f trafic kayban liya f les papers li kaytsta3mlo homa FNN , CNN ,RNN c est surtout had les  3 .....Mais CNN et RNN fhmt bli kay3tamdo 3la photos et les images ( data en termes d'image ) par contre dans notre cas data = nbr de vehicules par lanes ..... donc c est pour cette r

# data[].attributes.body
hada fih lasse9 dyal les types b les sources ...mnin jbd kola whda

# data[].attributes.body
https://stats.stackexchange.com/questions/182734/what-is-the-difference-between-a-neural-network-and-a-deep-neural-network-and-w?rq=1

# data[].attributes.attachment_link.readable_text
Tutorials/quick start

This tutorial covers a basic application and essential functions of SUMO for traffic analysis using an example network.

All files mentioned here can also be found in the /docs/tutorial/quickstart directory. The most recent version can be found in the repository at <SUMO_HOME>/tests/complex/tutorial/quickstart/data.

Example description

In this example, the traffic state will be analyzed with the application of SUMO. The example network includes four origins, four destinations as well as two unsignalized intersections. In the investigated area, each road for outbound traffic has three lanes and the allowed traffic movements on each lane are restricted. U-turn behaviors are prohibited at all intersections. Moreover, a higher priority has been given to the eastbound and westbound traffic. The corresponding network layout is shown in Figure 1.1.
Figure 1.1. Network layout
Data Preparation

Before conducting the traffic analysis in SUMO, the example network in Figure 1.1 should be first built with the information listed in Table 1.2. (Please note! Fig. 1.1 is not true to scale with the specifications given in Table 1.2!)
Table 1.2. Coordinate data of the example network
Network Editing with NETEDIT

Based on the coordinate data in Table 1.2 and the node-link-based network layout in Figure 1.1, the intersections, origins, and destinations are coded, respectively, as nodes 1-6 and nodes 91-94 by giving the respective x- and y-coordinates with the program NETEDIT. Open NETEDIT, which you can find in the bin directory of the SUMO-package. First, create a new network ("File" -> "New Network...").

Then choose the Edit mode, which is possible in two ways:

Or you can use shortcuts to switch between modes, which you can see in the dropdown menu of the edit button:

First of all, you create one node and then a second one by clicking on the canvas. Both will be connected automatically and you will get your first edge.

Next step is to switch to the Inspection mode and replace the name and the position of the nodes as defined in Table 1.2 above. Roads are represented as links in SUMO like in other traffic simulation software. To define link characteristics, the identification (id) of each link has to be defined first either with numbers, word strings, or both. To edit these values, click on the red circle representing the junction using the left mouse button.

If you press Enter, you will get the new positions.

Now it is time to save your network: You are able to find a selection in the dropdown menu of File. For our purpose here, the Save Network As... is adequate. Please choose a suitable name for your network, for instance quickstart.net.xml. You will use this name later on when referring to the network from your configuration.

As you can see in the given example, there are streets in both directions. To give your edge this information, you can either right-click on your created edge and choose Add reverse direction or select the option during the creation process of an edge.

Furthermore, one attribute must be changed to get a similar output as in the example description: the number of lanes. You can change the number of lanes easily if you are in the Inspect Mode and click on the relevant edge and change it directly.

Now you should be able to create the rest of the given nodes and edges in this example and change the names, the number of lanes, and reset the positions. Don't forget to save your work from time to time. The Dummy nodes 911-914 are needed for analyzing the traffic performance on the incoming and outgoing links in the network. More dummy nodes can be applied if needed (such as for accurate geometric alignment or for the specification of detector locations).

Next step would be to define the connections between the edges. To see which connections are already build automatically, please select the box show connections.

The default in SUMO is based on the given geometric design of all possible and logical traffic movements. U-turns are allowed if there is no corresponding specification. The default setting is that the right-most lane of each link is aligned to the right-most lane of the respective downstream link. In our example, the following connections are expected:
Table 1.3. The connections between the edges
With the meaning of each attribute as follows:

(a) from: ID of the link for which the traffic movements will be specified.

(b) to: ID of the downstream link of the above defined link.

(c) fromLane/toLane: lane number of the defined link in (a) and the lane number of the link in (b), which are connected.

If you change to the Connection Mode, you are able to specify new connections or change existing connections. This is possible by clicking on the chosen edge. As you can see on the left side of the following picture, the different meanings of the dyed edges are shown in the Legend. For further information and a deeper sight, please go to NETEDIT.

- Another topic is the priority of each edge. In our example, the priority is 1 by default. To change the priority, please select the edges you want to modify (see picture below). Switch to the Inspect mode. Then you are able to change the priority information of all selected edges by clicking on one of the selected edges. The eastbound and westbound roads in the example with 3 lanes and 2 lanes should have priority 3 and the northbound (L16) and southbound (L15) roads the (lower) priority 2.

Traffic demand

For traffic demand, there are four vehicle types (Cars A, B, C, and D) in the example network. All drivers are 50% perfect in driving. The corresponding information is listed in Table 1.1. One vehicle per vehicle type is going to leave from each origin to each destination every 30 seconds in the period under investigation from 15:00 to 15:15.
Table 1.1. Vehicle types and vehicular characteristics in the example network
Traffic demand and route data is defined together with vehicle type data in a file with the extension .rou.xml. The corresponding format for the example network is shown in Listing 1.5.

Vehicle Types

Listing 1.5 shows that all vehicle types are first defined according to the information in Table 1.1. The related attributes include:

(a) id: ID of the vehicle type, defined by users with numbers, word strings, or both;

(b) accel: maximum acceleration of the respective vehicle type (in m/s2);

(c) decel: maximum deceleration of the respective vehicle type (in m/s2);

(d) sigma: drivers' imperfection in driving (between 0 and 1);

(e) length: vehicle length (in meters);

(f) maxSpeed: maximum vehicular velocity (in m/s);

(g) color: color of the vehicle type. It is defined with 3 numbers (between 0 and 1) for red, green, and blue, respectively. Values are separated by comma and in quotes with no space between the values. For example, 1,0,0 represents the color red, 0,1,0 represents green, and0,0,1 represents blue.

The sequence of the attributes can be changed. The attribute sigma is assigned as 0.5 for all vehicle types.
Listing 1.5. Traffic demand and route data (quickstart.rou.xml)
Traffic routes

Following the vehicle type information, traffic route data needs to be defined, as well. The input attributes include:

(a) id: ID of a certain route and defined by users with numbers, word strings, or both.

(b) edges: The sequence of the names of the links, composing the defined route.

Traffic demand

Traffic demand data are defined with four attributes:

(a) depart: departure time of a certain vehicle.

(b) id: ID of a certain vehicle and defined by users with numbers, word strings, or both.

(c) route: the route used by the defined vehicle.

(d) type: ID of the defined vehicle type.

Simulation

Traffic simulation in SUMO can be conducted in two ways as described below. The overview of the simulation process is given in Figure 1.8.

All file names in brackets are the file names used in the example.
Figure 1.8. Overview of traffic simulation process
Command line

An efficient traffic simulation execution can be achieved with the use of the command line, especially when dealing with large and sophisticated traffic networks. To simplify the execution process, it is recommended that all the required execution actions, e.g. the path and the name of the input files, the output types, the output directory, and the simulation time period is specified in a configuration file.
Listing 1.7. Configuration file for the traffic simulation of the example network (quickstart.sumocfg)
<?xml version="1.0" encoding="iso-8859-1"?> <configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://sumo.dlr.de/xsd/sumoConfiguration.xsd"> <input> <net-file value="quickstart.net.xml"/> <route-files value="quickstart.rou.xml"/> </input> <time> <begin value="54000"/> <end value="54900"/> </time> <time-to-teleport value="-1"/> </configuration>

We use the <time-to-teleport value="-1"/> option here to disable the automatic removal of vehicles which wait too long in front of an intersection.

For the example network, the respective configuration file is shown in Listing 1.7 and the traffic simulation can then be carried out with the use of the following command:

sumo -c quickstart.sumocfg

SUMO-GUI

The application of SUMO-GUI is the other way to execute the traffic simulation with SUMO. During the execution, each vehicular movement and the traffic progression can be observed and the possible bottlenecks can be visually identified. A configuration file for all execution actions, e.g. the one in Listing 1.7, is required for SUMO-GUI. Double-click on the Program sumo-gui.exe and a SUMO-GUI work window will automatically open. The investigated network can be activated by opening the corresponding configuration file under the File-Menu of the menu bar. Traffic simulation can then be performed by pressing the green triangle button in the main tool bar. The simulation can be stopped any time when the user presses the red squared button. A stopped simulation can be resumed by pressing green triangle if the simulation time is not up. An illustration example is given in Figure 1.9.
Figure 1.9. Illustration of the example network in SUMO-GUI
Note

If you start the tutorial with SUMO-GUI, the whole network is visible at first but no vehicles can be seen because the view is zoomed out very far. You need to zoom in by holding the right mouse button and moving the mouse to be able to see any vehicles. Furthermore, you need not set the delay value to something greater than 0. Otherwise, the simulation may be over very quickly and you do not get to see vehicle movements.

Back to Tutorials

# data[].attributes.attachment_link.title
Tutorials/quick start - SUMO Documentation

# data[].attributes.attachment_link.description
Tutorials/quick start This tutorial covers a basic application and essential functions of SUMO for traffic analysis using an example network. All files mentioned here can also be found in the /docs/tutorial/quickstart directory. The most recent version can be found in the repository at /tests/complex/tutorial/quickstart/data.

# data[].attributes.body
types of  NN

# data[].attributes.attachment_link.readable_text
SUMO-GUI is basically the same application as SUMO, just extended by a graphical user interface.

Purpose: Simulates a defined scenario

System: portable (Linux/Windows is tested); opens a window

Input (mandatory): A SUMO-configuration file (see SUMO)

Output: SUMO-GUI generates the same output as SUMO

Programming Language: C++

Initial appearence of SUMO-GUI; may differ from what you see
Being a window-based application, SUMO-GUI is started by a double click with the left mouse button on Windows, on Linux probably with a single click. After this, an empty window should show up, similar to the one shown in the image.

Using either the "File->Open Simulation..." menu entry or by using the "open"-icon ( ), you should be able to load an existing SUMO configuration file, if it has the proper extension".sumocfg". If the SUMO configuration file is erroneous, the errors are reported, otherwise your network referenced within the configuration file should be shown. Now you can start to simulate by pressing the "play" button ( ). The simulation works as if being started on the command line. The simulation can be halted using the "stop" button ( ) and continued by pressing the "play" button again. When stopped, also single steps may be performed by pressing the "single step" button ( ).

If the simulation is running, the current simulation second is shown in the "digital digits" field, right to "Time:" ( ). By clicking on the word "Time:", the display can be toggled between showing <seconds> and <hour:minute:seconds>.

Next to the time display is the delay control ( ). This allows you to slow down the simulation by waiting for the given number of milliseconds between simulation steps.

Note

By default the delay is set to 0. This can result in a simulation that runs too fast to see any vehicles. Increase the delay value if this happens.

Besides loading simulation configurations, it is also possible to load networks by using either the "File->Open Network..." menu entry or by using the "open network"-icon ( ). Please note, that normally SUMO-GUI assumes networks have the extension ".net.xml", but also accepts other extensions.

Both, the loaded simulation or the loaded network may be reloaded using the "reload" button ( ) or the menu entry "File->Reload".

If a network or a simulation are loaded, the navigation through the network is possible with the mouse or with the keyboard. One can drag the network with the left mouse button pressed into all directions and zoom either by using the mouse wheel or by pressing the right mouse button and moving the mouse up and down. For fine grained zooming (half zoom speed) press the "Control" key while using the mouse wheel, for double speed use "Shift".

As soon as a network is displayed, one can interact with the view. Pressing the left mouse button within the view and moving the mouse with the button pressed, will shift the network. Moving the mouse up and down while pressing the right mouse button changes the zoom of the network. It is also possible to change the zoom by using the mouse wheel (holding <SHIFT> increases the zooming speed and holding <CTRL> lowers it). Zooming is either focused on the center of the screen or on the cursor position. The zoom style can be selected with the button.

You can also control which part of the network is visible by directly setting the network coordinates which shall be at the center of the screen along with the zoom (given a value of 100 the whole network will fit onto the screen). These settings can be changed by opening the viewport editor using the button. From this editor, it is possible to save the current settings ( ) or load previously saved ones ( within the viewport editor).

The viewport is defined as following: <viewport zoom="<ZOOM>" x="<X>" y="<Y>"/>. It can be loaded as a part of viewsettings.

Pressing the center-button ( ) from the menu bar at the top of the view, will reset the viewport so that the complete network is shown.

Breakpoints

The simulation can be stopped automatically to allow investigating specific points in time. Breakpoints can be set via any of the following methods:

via menu Edit->Breakpoints

by setting option --breakpoints TIME1,TIME2,...

by loading #Configuration_Files with breakpoint information

Keyboard Shortcuts

Various menu items are accessible via keyboard shortcuts. These are documented directly in the menu. (i.e. Ctrl-l Ctrl-e opens the edge locator, Ctrl-d performs a single simulation step). Additional shortcuts are listed below:

Ctrl-LeftClick: toggle selection status of object under cursor

Arrow Keys: move the view

Ctrl + Arrow keys: move the view less

PageUp / PageDow: move the view up/down (a lot)

Shift + PageUp / PageDow: move the view left/right (a lot)

+/-, Keypad +/-: zoom in/out

Home/Keypad Home: recenter view

Ctrl + v: open view settings dialog

Object Properties / Right-Click-Functions

Right-clicking simulation objects gives access to additional information:

copy object id

object parameter dialog (menu item Show Parameter)

position information (x,y and lat,lon)

select/deselect object

The following objects can be accessed by right-click:

The following additional functions are available via right-click:

Activate additional visualizations (persons and vehicles)

Select junction foe vehicles (vehicles). Requires coloring vehicles by selection to be visible

Close for traffic (edges and lanes)

Switch programs (traffic lights)

Set speed limit (variable speed sign)

Selecting Objects

SUMO-GUI allows for the selection of arbitrary network elements such as edges, lanes and junctions, which can be saved to a file (and also loaded from a file) for further processing. Selection is done by either choosing "Add To Selected" from the context menu (right click) of the element or by clicking left on an element while pressing the "Control" key.

The selected elements can be saved / loaded and looked at in the "Edit Selected" dialog available from the edit menu. The list contains entries of the form objectType:objectId with each of these entries on a separate line:

edge:someEdge edge:someOtherEdge junction:myJunction

Most network objects can be colored according to their selection status ( color by selection) and selected network elements may be manipulated as a group in NETEDIT.

Locating Objects

All simulation objects can be located based on their ID by using the locate dialog . By clicking this button a sub-menu for selecting the object type is openend. The following types are available:

After selecting the object type, a dialog opens that provides a text box for entering the object ID. Search for objects starts after the first characters are entered until an object ID that starts with these characters is found. Once selected in the object list, the view can be centered on that object.

The button Hide unselected, restricts the object list to selected objects of that type. The Locate Menu in the main menu bar also contains a check-box that toggles whether internal edges and internal junctions shall be listed in the object locator dialog.

Currently, there is only very little interaction that can be done from the GUI. This will change in the future (see below)

Switching Traffic Lights

By right-clicking on the colored bars at an intersection, a popup-menu allows switching between all signal plans that have been loaded. The special program off is always available and can be used to switch the intersection into a priority-intersection.

Closing and Opening Edges and Lanes

By right clicking on a lane, each lane (or the corresponding edge) can be closed for all traffic (except vClass authority and ignoring) by selecting the option Close lane or Close edge. In the same way lanes or edges can be reopened for traffic by selecting Reopen lane or Reopen edge.

Planned Interactions

In the future more interactions are planned for exploratory simulation:

changing simulation options dynamically (i.e. --scale, --time-to-teleport, ....)

adding traffic

changing vehicle or vehicle type parameters

testing TraCI function calls

Right of way

At the end of every lane and at the outset of a junction there is a little colored bar which indicates right of way. When there are multiple target lanes from one lane, the bar is split in smaller parts each indication the rules for one connection. The colors a defined as follows:

FOO Traffic light, green phase, vehicle has right of way

FOO Traffic light, green phase, vehicle has to yield to some streams

FOO Traffic light, red phase, vehicle has to wait

FOO Traffic light, red/yellow phase, indicates upcoming green phase, vehicle has to wait

FOO Traffic light, yellow phase, vehicle should stop if possible

FOO Traffic light, off-blinking, vehicle has to yield

FOO Traffic light, off-no-signal, vehicle has right of way

FOO uncontrolled, vehicle has right of way

FOO uncontrolled, vehicle has to yield to some streams

FOO uncontrolled, right-before-left rules, all vehicles yield to the rightmost incoming lane

FOO uncontrolled, stop-sign / controlled, right-turn arrow, vehicle has to stop and then yield

FOO uncontrolled, allway-stop, all vehicles have to stop and then drive in the order of arrival

FOO uncontrolled, zipper, vehicles have to perform zipper merging

FOO dead-end, vehicle may not drive there

Note

If a vehicle is braking in the simulation, the responsible foe vehicle (if any) can also be identified directly by taking the following steps:

set vehicle coloring to color by selection

right-click the braking vehicle and then click Select Foes The foe vehicles will then be color with the selection color (typically blue).

Road Access Permissions

Road access permissions are an important tool for building multi-modal scenarios. To better understand the road network configuration there are various ways to support coloring according to permissions.

Default Coloring

The default coloring scheme ( uniform) aims to color roads in a realistic way and also show some basic access permissions. The road colors have to following meaning:

Color by permission code

Each possible set of access combinations is represented by a unique numerical code. The code for each lane can be retrieved from the lane parameter dialog (permission code). The lane coloring scheme permission code allows assigning an individual color for each of code. This can be used for arbitrary coloring according to the users needs (the default coloring scheme can be regarded as a special case of this coloring type).

Show permissions for a specific vehicle class

To investigate connectivity in the network, it is often useful to quickly highlight lanes that allow a specific vehicle class. This can be done from the main menu by selecting Edit-> Select lanes which allow ...-> the desired vehicle class.

This changes the current selection to the set of all lanes that allow the specified vehicle class and also changes the coloring scheme to color by selection. All lanes that allow the selected vehicle class will be shown in blue (by default).

Connectivity

At each intersection all incoming lanes that allow driving across the intersection have one or more white arrows to show the allowed driving directions. However, these arrows only give partial information since every lane may have more connections than the number of arrows. For example, when a lane targets two lanes one the same edge beyond the intersection, only one arrow will be drawn even though two distinct connections exist.

To see all connections, activate the junction visualization option Show lane to lane connections. The collors of the connection lines correspond to the#Right_of_way-colors.

Each connection at an intersection has a unique index starting at 0 and going clockwise around the intersection. These indices can be shown using the junction visualization option Show link junction index.

Each connection that is controlled by a traffic light has a unique index with regard to that traffic light. By default each traffic light controls one intersection and these indices are identical to the link junction index mentioned above. In the case of joined traffic lights which control multiple intersections, the indices are different. Also, the indices may be freely customized by the user (e.g. to define signal groups). These indices are shown using the junction visualization optionShow link tls index.

The View Settings menu allows to change and customize the simulations' appearance and visualization. To open the visualization settings use in the menu bar at the top of the view.

For customizing the simulation one can make changes e.g. to the background coloring, streets and vehicle appearance as well as the visualization of POIs. Furthermore one can save ( ) and delete ( ‎) settings to the registry or export ( ) custom made settings files and load previews settings again . So one can use different favorite settings files for any simulation.

The current settings file is shown in a drop down menu in the top bar of the View Settings window where you can switch back to default settings.

Common Visualization Settings

Separate settings exist for different simulation objects such as vehicle, lanes, persons and detectors. Some options exist for all (or most) of these objects:

Size options

Exaggerate by: Draws objects bigger to make them more visible

Minimum Size: Do not draw objects below a minimum size

Draw with constant size when zoomed out: Automatically increase the drawing size when zooming out to keep the visual size constant.

Name options

Show name: Disable drawing of object IDs

Size: Size of the drawn ID (visual size will stay constant when zooming)

Color: Color of drawn ID

Coloring options: Color by some attribute and change the color value/range
Show color value: show the numerical value that is used for coloring

Vehicle Visualisation Settings
Table 1.1 Vehicle shape schemes

triangle

All vehicles are shaped triangular

boxes

All vehicles are shaped square

simple shapes

All vehicles have simple car shape

raster images

All vehicles are drawn with a loaded bitmap defined for their type using attribute imgFile (using simple shapes as fallback)

Table 1.2 Vehicle coloring schemes and boundaries
In addition to the vehicle shape and coloring one can display blinker and brake lights, the minimum gap, and the vehicle name. The vehicle names will always be scaled to the chosen size, no matter which zoom step is chosen.

Edge/Lane Visualisation Settings
Table 2.1 Lane coloring schemes Table 2.2 Lane scaling schemes
In addition to the lane / edge coloring one can display lane borders, link decals, rails, edge names, street names, internal edge names, and hide macro connectors. The edge names as well as the street and internal edge names will always be scaled to the chosen size, no matter which zoom step is chosen.

Loading Shapes and POIs

Polygonal shapes and Points of Interests (POIs) can either be loaded in a.sumocfg configuration file or interactively through the Open Shapes option in the File-menu.

Shapes and POIs can be located based on their unique ID and their appearance can be customized as well.

Showing Background Images

In addition to changing the appearance of simulated structures, one may also load additional background images ("decals") into SUMO-GUI. For this, open the visualisation settings using and - if you are not yet here - choose the "Background" panel (figure 1.1). You will see a table with following columns: picture file, center x, center y, width, height, and rotation.
Fig. 1.1: The decals GUI.
Now, if you click into the first row of the "picture file" column, you should be able to enter the complete path of an image file. Confirming the path by pressing RETURN should force SUMO-GUI to load and display the file below the road network, as shown in figure 1.2.
Fig. 1.2: Example of a background image (decal).
Currently, SUMO-GUI may load .gif, .png and .bmp files. If built with gdal-support further formats such as .tif are also usable.

Now, you may position/stretch/rotate the image using the columns center x, center y, width, height, and rotation.

When setting the column relative to 1, position and size values will be taken as screen-relative pixel values instead of network-relative meter values.

After aligning your decals, you can save them using the "Save Decals" button located in the dialog. Accordingly, previously saved decals can be loaded by pressing the "Load Decals" button.

When defining decals in XML a single line which looks like this:

The following attributes are supported

Note

The contents of a decal-configuration can also be embedded in a view-settings file and thus loaded on startup. see Configuration Files

Transparency

All image files in the visualization support transparency. For vehicles, pois and polygons, this transparency can be set dynamically by changing the color via TraCI and setting the alpha-channel.

All objects that have their color set (via input files or visualisation settings) support (Red,Green,Blue,Alpha) color values.

SUMO-GUI uses the same configuration files as SUMO. The recognized options can be obtained by calling sumo --help or you save a configuration file with default settings by calling sumo --save-template <file> --save-commented. The option --gui-settings-file is specific to SUMO-GUI. It allows you to load a previously saved gui-settings file. The easiest way to obtain a gui-settings file is via the View Settings-Dialog . Simply modify the settings and save .

Note, that the gui-settings-file obtained this way only contain information about the viewport (zoom and offset), delay, breakpoints and decals if the corresponding check-boxes are activated before saving. When you are done the configuration files should look like below:
example.sumocfg gui-settings.cfg
 <viewsettings> <scheme name="... ... </scheme> <viewport zoom="200" x="100" y="-100"/> <delay value="42"/> <decal filename="background.gif" centerX="550.00" centerY="1530.00" width="64.00" height="64.00" rotation="0.00"/> <breakpoint value="42"/> <breakpoint value="1337"/> </viewsettings>

Alternatively, you can manually add a breakpoint-file definition to your settings

A file, suitable for loading breakpoints can be obtained by setting breakpoints in the gui and using the menu-option for saving (Edit->Edit Breakpoints->save).

You may either load example.sumocfg using the open simulation-dialog or by using the command-line sumo-gui -c example.sumocfg.

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

It is also possible to reference a predefined scheme by it's name alone:

Screenshots

It is possible to take screenshots at predefined times by adding elements to the configuration:

Using the ( )-button, multple viewing windows onto the same simulation can be opened. The visualization settings can be set independently for each view. The viewing windows can be managed using the Windows menu in the main menu bar.

When passing multiple files to the SUMO-option --gui-settings-file, one viewing window is opened for each file at the start of the simulation.

3D Visualization

When SUMO-GUI was compiled with OSG (OpenSceneGraph) support an additional ( )-button is present which can be used to open a 3D-View.

Caution

The 3D-Visualization is highly experimental

An pre-compiled windows version for testing is available here.

Several applications generated edge-related measures for one or more time-intervals.

These files can be used with DUAROUTER and with SUMO to affect vehicle routing. When running SUMO-GUI, these files can be visualized by setting the edge coloring by loaded weight.

SUMO-GUI can also be used to visualize the contained data to see how various traffic measures changed over time (without running a simulation at the same time).

Note

In the gui-settings dialog, the function 'Recalibrate Rainbow' can be used to adapt the coloring to the data range of the current attribute.

Version 1.2.0 and later

Edgedata files for visualization can be loaded by setting option --edgedata-files. All attributes will be loaded and can be selected in the edge visualization settings They can also be loaded in SUMO-GUI from the menu using File->Open EdgeData. The simulation end time will be automatically adjusted to the end of the data range.

To make use of the loaded data, edge coloring must be set to color by edgeData. The button Recalibrate Rainbow can be used to generate a coloring scheme to show the whole data range.

Note

edgeData is time based so it will only be shown when the simulation time has advance to the begin time of the respective data interval. Make sure to advance the simulation to time 0 (step once) or to whatever begin time was used for edgeData generation before using Recalibrate Rainbow. To see further data frames, advance the simulation by using delay or breakpoints.

When defining a color scheme two data values can be used to diagnose missing data:

-2: the attribute does not exist in the loaded data for that particular edge

-1: the attribute exists but no data is available for that edge for the current time

Note

It may be useful to hide edges with attribute value -1 and -2 by setting the alpha channel to 0. To Make this work, a distinct color value must be set for 0 to avoid interpolation.

Version 1.1.0 and older

sumo-gui -n net.net.xml --weight-files edgedata.xml -e 86400 --weight-attribute <ATTR>

When using edgeData-output <ATTR> could be arrived or departed to investigate traffic sources and sinks in the network.

When using SUMO-GUI for visualizing weight files with values that change over time (files containing multiple intervals) and no vehicles are being simulated, it is helpful to load the simulation with option--end to avoid premature simulation and to set a delay value or #Breakpoints because the simulation will otherwise exit quickly when running without vehicles).

Visualizing Shapes and Points of Interest

see Using additional Polygons and POIs within the Simulation

To show the route(s) of a vehicle in the simulation, right-click and select Show Current Route or Show all Routes. To show only the remaining portion of the current route, selectShow Future Route.

Thow show the route of person, right click and select Show Current Route. To show the trajectory on a walkingarea, select Show Walkingarea Path.

To highlight an arbitrary set of edges in the simulation create a selection file and color edges by selection

To Visualize all routes in a route file use the tool Tools/Routes#route2poly.py orTools/Routes#route2sel.py

To Visualize the number of vehicles arriving or departing at any edge use the tool Tools/Routes#showDepartsAndArrivalsPerEdge

Investigating internal edges and lanes

Internal Edges define the movements across an intersection. By default they are hidden behind the shape of the junction to give a prettier visualisation. Occasionally it is of interest to understand which internal lane corresponds to which movement as their IDs may be referenced in the output or in error messages. The following visualisation settings are helpful:

Junction settings:

disable draw junction shape

show internal edge name

show internal junction name

show link junction index (to see the correspondence between IDs and link indices)

Edge settings:

Exaggerate width by 0.1 (otherwise the shapes overlap which makes it hard to understand them)

Color by selection (coloring individual lanes makes it easier to understand geometry before and afterinternal junctions)

Investigation Stopping At Intersections

1. Select Vehicle visualization settings "color by selection"

2. Right-Click on a vehicle and activate "Select Foes"

The foe vehicles which cause a vehicle to stop or slow down will be highlighted.

# data[].attributes.attachment_link.description
SUMO-GUI is basically the same application as SUMO, just extended by a graphical user interface. Purpose: Simulates a defined scenario System: portable (Linux/Windows is tested); opens a window Input (mandatory): A SUMO-configuration file (see SUMO) Output: SUMO-GUI generates the same output as SUMO Programming Language: C++ Initial appearence of SUMO-GUI; may differ from what you see Being a window-based application, SUMO-GUI is started by a double click with the left mouse button on Windows, on Linux probably with a single click.

# data[].attributes.attachment_link.title
Sumo (Simulation of Urban Mobility) Tutorial Part 1: Manually Creation of Network

# data[].attributes.attachment_link.readable_text
SUMO is the simulation itself; it is a microscopic, space-continuous, and time-discrete traffic flow simulation.

Purpose: Simulates a defined scenario

System: portable (Linux/Windows is tested); runs on command line

Input (mandatory):

A) a road network as generated via NETCONVERT or NETGENERATE, see Building Networks

B) a set of routes (as generated by DUAROUTER, JTRROUTER, DFROUTER, or ACTIVITYGEN, see also Definition of Vehicles, Vehicle Types, and Routes)

Input (optional): Additional definitions of traffic lights, variable speed signs, output detectors etc.

Output: SUMO allows to generate a wide set of outputs; visualization is done using SUMO-GUI

Programming Language: C++

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

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

Configuration

Processing

Communication

Example Device

Driver State Device

Bluelight Device

Traci Server

Mesoscopic

Random Number

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

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

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

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

Files loaded with the option may included a wide range of network elements such as traffic light programs, detector definitions, variable speed signs and bus stops. These files are also used to configure simulation outputs such as edge-based traffic measures or traffic light switching information. Furthermore, any element permitted in a route file such as vTypes, routes and vehicles can be added. All elements may be put into the same additional file or they may be grouped into multiple files as convenient.

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

 <additional>
    <inductionLoop id="myLoop1" lane="foo_0" pos="42" freq="900" file="out.xml"/>
    <inductionLoop id="myLoop2" lane="foo_2" pos="42" freq="900" file="out.xml"/>

    <busStop id="station1" lane="foo_0" startPos="5" endPos="20"/>

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

# data[].attributes.attachment_link.description
SUMO is the simulation itself; it is a microscopic, space-continuous, and time-discrete traffic flow simulation. Purpose: Simulates a defined scenario System: portable (Linux/Windows is tested); runs on command lineInput (mandatory): A) a road network as generated via NETCONVERT or NETGENERATE, see Building Networks B) a set of routes (as generated by DUAROUTER, JTRROUTER, DFROUTER, or ACTIVITYGEN, see also Definition of Vehicles, Vehicle Types, and Routes) Input (optional): Additional definitions of traffic lights, variable speed signs, output detectors etc.