Chapter 7. Simulation-GUI

The simulation-GUI (graphical user interface) is basically a wrapper around the command line simulation. The normal procedure is to start the gui-version like any other Window-based application (double-click on it) and to load a simulation's description specified using a "normal" configuration-file as used by the simulation's command line version. After loading it - what may dure a longer time if the network is large or the simulation is forced to load many routes at once - the network shall appear. Your application should then look like displayed below (with your own network, of course).

Figure 7.1. The GUI-Window with a loaded simulation (violet: names of the controls as used below)

The GUI-Window with a loaded simulation (violet: names of the controls as used below)

You can now start your simulation using the "play"-button and/or manoeuvre within the network pressing one of the mouse buttons and moving the mouse. When moving the mouse within the window with the left button pressed, you'll move the network to the direction you move the mouse. When the mouse is moved with the right button pressed, you change the scale the network is displayed in, zooming into and out of the network.

We will now discuss the different possibilities to use the graphical user interface more deeply.

7.1. Main Window Interface

7.1.1. Menu Bar

7.1.1.1. File-Menu

  • Open Simulation...

    Opens a file dialog that lets you choose a SUMO-configuration file that describes a complete simulation. The simulation described within this file will be loaded. Remark that you have to describe the simulation in full - no further extension is possible.

    You can of course load a simulation if another one is already loaded. In this case, the previous simulation will be closed.

  • Reload Simulation

    Reloads the previously opened simulation.

  • Close

    Closes the loaded simulation.

  • [RECENT FILES]

    if you have opened at least one file before, it will be displayed within this list. The list may contain up to ten files read previously.

  • Clear Recent Files

    Clears the list of recent files.

  • Quit

    Quits the application.

7.1.1.2. Edit-Menu

  • Edit Chosen...

    Opens a dialog that lets you load/save and edit the list of chosen items.

  • Edit Additional Weights...

    This menu enables you to edit additional weights for edges. These additional weight descriptions may be saved into a file and read by the DUAROUTER and his variants.

  • Edit Breakpoints...

    This menu enables you to edit, load and save breakpoints. By now, the simulation will stop at one of the given brekpoints (simulation time steps) and can be then continued by pressing the "play"-button ().

7.1.1.3. Settings-Menu

  • Application Settings...

    By now, one can only set whether the application shall be closed automatically when the loaded simulation ends.

  • Simulation Settings...

    Displays the settings as read from the configuration file. This item is only accessible if a simulation has been loaded.

    [Caution]Caution

    Under current development. (Better do not use it)

7.1.1.4. Windows-Menu

  • Show Status Line

    By pressing this menu item, you can switch the status line off and on.

  • Show Message Window

    By pressing this menu item, you can switch the message window off and on.

  • Show Tool Bar

    By pressing this menu item, you can switch the toolbar off and on.

  • Tile Horizontally

    Reorders the position of windows.

  • Tile Vertically

    Reorders the position of windows.

  • Cascade

    Reorders the position of windows.

  • Close

    Closes the uppermost window.

  • Clear Message Window

    Deletes all contents from the message window.

7.1.1.5. Help-Menu

  • About

    Shows a small window with some information about SUMO.

7.1.2. Tool Bar

7.1.2.1. File Operations

  • Open Button

    Opens a file dialog that lets you choose a SUMO-configuration file that describes a complete simulation. The simulation described within this file will be loaded. Remark that you have to describe the simulation in full - no further extension is possible.

    You can of course load a simulation if another one is already loaded. In this case, the previous simulation will be closed.

  • Reload Button

    Reloads the previously opened simulation.

7.1.2.2. Simulation Operations

  • Play Button

    Starts the simulation. If a loaded simulation was not started before, it will begin with the step described by the b(egin)-parameter within the loaded configuration file. If the simulation was started and stopped, it will continue.

    [Caution]Caution

    It is not possible to restart a simulation, you have to reload it.

  • Stop Button

    Stops a running application. A stopped application can be continued using the play-button (see above).

  • Single Step Button

    Performs a single simulation step.

  • Current Step Field

    After the loaded simulation has been started, the information about the current time step is displayed herein.

  • Simulation Speed Control

    The value you can change using this control is the time the application waits between two simulation steps. The higher the value, the slower the simulation will run.

7.1.2.3. Window Operations

  • New Microscopic View - Button

    Opens a new window which displays the streets and vehicles moving on them.

  • New Lane-Aggregated View - Button

    Opens a new window which displays the streets and vehicles moving on them.

7.2. Simulation Window Interfaces

SUMO-GUI provides different views on the simulation. The microscopic view shows the vehicles running just the way as the simulation performs his work. Aggregated views show the situation on the streets by coloring lanes by an aggregated value. Vehicles are not shown within the aggregated view.

7.2.1. Common Controls

7.2.1.1. Tracking Settings

  • Locate Junction - Button

    Opens a window that allows to choose a junction name from the set of junctions the network consists of. Pressing ok with a chosen junction zooms the view to this junction.

  • Locate Edge - Button

    Opens a window that allows to choose an edge name from the set of junctions the network consists of. Pressing ok with a chosen edge zooms the view to this edge.

7.2.1.2. View Settings

  • Recenter View - Button

    You can use this button to reset the view to show the whole network. After pressing this button, the view will be the same as after loading the simulation: The zoom factor will be reset to a value that lets the window display the whole simulation area and the middle of the loaded network will be place into the middle of the view.

7.3. Interacting with Objects

7.3.1. Display an Object's Name

Each view has the possibility to display tool tips. If enabled using the "Show Tool Tips"-Button () the name of an object will pop up in a yellow windows if the cursor is over the object. A second click on the "Show Tool Tips"-Button disables this feature.

[Caution]Caution

This feature does slow down the visualisation. Use should use this carefully and disable if not needed.

7.3.2. Object Popup Menus

If the cursor is over an object you can press down the right mouse button and after ahlf a second a popup menu will be shown that allows you some further interaction with the object. Normally, the following functions are available:

  • Center

    Changes the view in a manner that the current object lies within the the view's center.

Further, some objects allow an interaction, that means to change some of the object's parameter. You can access this using the command:

  • Manipulate

7.3.3. Object Selection

From version 0.8. you are able to add every object that has a name (as shown if turning Tool Tips on) into a list of selected objects. You can select an object by holding the Alt-key and pressing the left mouse button when the mouse is over the object. Doing the same a second time will deselect the object again. You may wonder whether an object is selected or not. Use the lane colouring "by selection" from "Change Lane Colouring Scheme". When this colouring scheme is used, selected lanes are shown blueish, the other black.

The menu entry Edit->Edit Chosen... allows you to edit the list of selected objects by deselected ones you don't need. It also allows you to save the list of selected objects. The resulting file contains the names of the selected objects predeccesed by the object's type, one per line.

[Caution]Caution

Load is not implemented, yet.

[Caution]Caution

The handling of selected items is not yet designed cmopletely. Parts of the gui's behavior may change in the next time.

7.3.4. Parameter Windows

If you choose the option "Show Parameter" from an object's popup menu, a window like the one displayed below will appear:

Figure 7.2. A sample Parameter Window (for an induction loop in this case)

A sample Parameter Window (for an induction loop in this case)

This window conatins some of each object's parameter, including the parameter's name, its current value and the information is static (marked with a ) or dynamic (marked with a ) within a simulation run.

Pressing the right mouse button when being over a line marked as dynamic will show a small popup window with only a single command: "Open in new Tracker". Choosing this option will allow you to open another window where this parameter's values will be shown as a time line over the simulation run.

Figure 7.3. A sample Parameter Window (for the number of vehicles within a simulation in this case)

A sample Parameter Window (for the number of vehicles within a simulation in this case)

You can change the aggregation time of the tracked values within this window using the combobox in this window's menu.

Figure 7.4. A sample usage of the aggregation option (for an induction loop in this case, for aggregation times of 1s, 1min, 5min (from left to right))

A sample usage of the aggregation option (for an induction loop in this case, for aggregation times of 1s, 1min, 5min (from left to right))

7.3.5. TL-Tracker Windows

If you position your mouse over one of the red, green or yellow traffic light-bars that show the state of the traffic light and press the right mouse button for at least one second, the appearing pop-up includes a menu entry "Show Phases". Choosing this menu item will show up a diagram that shows the states of the tl chronologically. Each pixel in x-direction shows the state of the tls of one second. The display contains the tl-states from the time the tracker has been opened, no scrolling aorund is supported.

Figure 7.5. A sample usage of the tls-tracker

A sample usage of the tls-tracker

7.4. Additional Geometry Files

Since version 0.9.4 it is possible to load additional geometry files into GUISIM which may contain definition of polygons or points of interest. These shapes are currently meant to improve a simulation's appearence and to allow an easier debugging. No special interaction with them is implemented, yet.

Both polygons and points-of-interest may be located at a "layer". Shapes with lowest layer values are drawn first so that they can be below those with a higher layer number. The network itself is drawn as layer 0. An additional file may contain definitions for both points-of-interest and polygons. Any name may be used for the embedding element.

In the following subchapters, it is described how polygons and points-of-interest may be defined.

7.4.1. Polygon Definitions

A polygon is defined as following:

<poly id="<POLYGON_ID>" type="<TYPENAME>" color="<RED>,<GREEN>,<BLUE>" \
   fill="<FILL_OPTION>" layer="<LAYER_NO>"><POINT> [<POINT>]+</poly>

These attributes have the following meanings:

  • id: The id (a unique name) of the polygon; mandatory string

  • type: A typename for the polygon. This value has no meaning; optional string, default: ""

  • color: The color with which the polygon shall be displayed; <RED>, <GREEN>, and <BLUE> must be floating point numbers between 0 and 1. They are devided using a ',' (no space); mandatory

  • fill: An information whether the polygon shall be filled; optional bool, default: false

  • layer: The number of the layer in which the polygon lies; optional int, default: -1

7.4.2. Point-of-interest Definitions

A point-of-interest is defined as following:

<poi id="<POLYGON_ID>" type="<TYPENAME>" color="<RED>,<GREEN>,<BLUE>" \
   layer="<LAYER_NO>" [(x="<X_POS>" y="<Y_POS>") | (lane="<LANE_ID>" pos="<LANE_POS>")]/>

It means that the position a point-of-interest is located at may be given either using explicite x/y-coordinates or a lane name and a position on this lane. So, the attributes have the following meanings:

  • id: The id (a unique name) of the poi; mandatory string

  • type: A typename for the poi. This value has no meaning; optional string, default: ""

  • color: The color with which the poi shall be displayed; <RED>, <GREEN>, and <BLUE> must be floating point numbers between 0 and 1. They are devided using a ',' (no space); optional, default "1,0,0"

  • layer: The number of the layer in which the polygon lies; optional int, default: 1

  • x: The position of the poi along the x-axis; float

  • y: The position of the poi along the y-axis; float

  • lane: The name of the lane the poi is located at; string, the lane must be a part of the loaded network

  • pos: The position on the named lane at which the poi is located at; float


last change: Sunday, 11-Jan-2009 16:00:44 UTC