TRACI4MATLAB - USER’S MANUAL
Project: Modelamiento y control de tr´afico en la ciud ad de
Medell´ın - Segunda Et apa
Acronym: MOYCOT E2
Web site: www.moycot.org
UNIVERSIDAD NACIONAL DE COLOMBIA
Authors: Andr´es Acosta, Jorge Espinosa, Jairo Espinosa.
c
Copyright Universidad Nacional de Colombia, Polit´ecnico Jaime Isaza Cadavid
TraCI4Matlab - User’s Manual
Contents
Abstract 3
1 What is TraCI4Matlab? 4
1.1 Citing TraCI4Matlab . . . . . . . . . . . . . . . . . . . . . . . . 4
2 Installing TraCI4Matlab 6
2.1 Prerequisites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.2 Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.2.1 Step 1: Setting up the environment . . . . . . . . . . . . . 6
2.2.2 Step 2: Getting TraCI4Matlab . . . . . . . . . . . . . . . 9
2.2.3 Step 3: A dding the additional dependencies to the Matlab’s
static Java path
. . . . . . . . . . . . . . . . . . . . . . . 9
2.2.4 Step 4: Adding TraCI4Matlab to the Matlab’s path . . . . 9
2.2.5 Step 5: Testing TraCI4Matlab . . . . . . . . . . . . . . . 10
3 Using TraCI4Matlab 13
3.1 Building the simulation scenario in SUMO . . . . . . . . . . . . . 13
3.2 Developing the application in Matlab . . . . . . . . . . . . . . . . 13
3.2.1 Step 1: Executing SUMO in server mode from Matlab and
initializing the connection
. . . . . . . . . . . . . . . . . 13
3.2.2 Step 2: Developing the application . . . . . . . . . . . . . 14
3.2.3 Step 3: Closing the connection . . . . . . . . . . . . . . . 16
Bibliography 16
Page 2/17
TraCI4Matlab - User’s Manual
Abstract
This user’s manual describes the installation procedure of the TraCI4Matlab
package and a brief description of its usage. TraCI4Matlab is an implemen-
tation of the Traffic Control Interface (TraCI) for the Matlab
R
programming
language, which allows the interaction with the Simulation of Urban M obility
(SUMO) microscopic road traffi c simulator.
Page 3/17
Chapter 1
What is TraCI4Matlab?
TraCI4Matlab is an Application Programming Interface (API) developed in Mat-
lab which allows the communication between any application developed in this lan-
guage and the Simulation of Urban Mobility (SUMO) microscopic road traffic sim-
ulator. The functions comprising TraCI4Matlab implement the Traffic C ontrol In-
terface (TraCI) application level protocol which is built on top of the TCP/IP stack,
so that 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, en-
abling applications like traffic lights predictive control, dynamic route assignment
and vehicular communications, among others.
1.1 Citing TraCI4Matlab
If you use TraCI4Matlab in your research reports, articles and conferences, please
use
this book chapter [1] to cite it, as follows:
@ i n c o l l e c t i o n { a c o s t a
e t a l 2 0 1 5 ,
t i t l e = {{ TraC I }4 Mat lab : { E n a b l i n g } t h e
{ I n t e g r a t i o n } o f t h e {SUMO} { Road} { T r a f f i c }
{ S i m u l a t o r } and { M atl ab } { Thro ugh } a
{ S o f t w a r e } {Re}− e n g i n e e r i n g { P r o c e s s }} ,
u r l = { h t t p : / / l i n k . s p r i n g e r . com /
10.1007/978−3 −319 −15024 −6
9 } ,
u r l d a t e = {2017 −03 −06},
b o o k t i t l e = { Modelin g { M o b i l i t y } w i th {Open }
{ Data }} ,
p u b l i s h e r = { S p r i n g e r } ,
a u t h o r = { Ac osta , Andr \ ’ e s F . and E s pino s a ,
J o r g e E . and Espi n o s a , J a i r o } ,
y e a r = {2 015 } ,
p ages = {155−−170}
4