TraCI4Matlab: User's Manual
Versión 1
March 2014
TraCI4Matlab: User Manual
2
Modifications by document version
Version history
Version
Authors
Date
Modification
description
1
Andrés Felipe Acosta
Gil
11/03/2014
Document creation
TraCI4Matlab: User Manual
3
Contents
1. What is TraCI4Matlab? .................................................................................................................... 4
2. TraCI4Matlab Installation ................................................................................................................ 4
2.1 Prerequisites ............................................................................................................................. 4
2.2 Installation ................................................................................................................................. 4
3. Using TraCI4Matlab ......................................................................................................................... 8
3.1 Creating the simulation scenario in SUMO ............................................................................... 8
3.2 Configure SUMO in server mode .............................................................................................. 8
3.3 Creating the application in Matlab ............................................................................................ 8
TraCI4Matlab: User Manual
4
1. What is TraCI4Matlab?
TraCI4Matlab is an API (Application Programming Interface) developed in Matlab that allows the
communication between any application developed in this language and the urban traffic
simulator SUMO (Simulation of Urban Mobility). The functions that comprise TraCI4Matlab
implement the TraCI (Traffic Control Interface) application level protocol, which is built on top of
the TCP/IP stack, so the application developed in Matlab, which is the client, can access and
modify the simulation environment provided by the server (SUMO). TraCI4Matlab allows
controlling SUMO objects such as vehicles, traffic lights, junctions, etc, enabling applications like
traffic lights predictive control and dynamic route assignment, among others.
2. TraCI4Matlab Installation
2.1 Prerequisites
Operating System: Windows 7 x64 or higher
Matlab R2011b x64 or higher
SUMO 0.19.0 or higher. Installation instructions can be found at http://sumo-
sim.org/userdoc/Installing.html
2.2 Installation
Step 1: Setting up the environment
Set up the SUMO_HOME environment variable with system scope, with a value
corresponding to the SUMO installation root directory. For example, if the SUMO version
0.19.0 was installed in C:\, then the SUMO_HOME environment variable would have a
value of C:\sumo-0.19.0. Environment variables can be configured as follows: First, click in
the Windows start button, then right click in "My computer" and click in the properties
option, as shown in figure 1. On the left side of the window that opens, click in the link
"Advanced system configuration", as shown in figure 2. After that, in the window that
opens, click in the button "Environment variables". In the "System variables" field, click on
the button "New" and configure the variable according to the SUMO installation, as shown
in figure 3. Finally, in the same field, look for the "path" variable and add the route to the
bin directory of the SUMO installation. It can be accomplished by adding a semicolon to
the current value and then the corresponding route, as shown in figure 4.