Applicable Versions


Applicable Releases
v13.3
v14.0


  • Traffic Control Interface (TraCI) gives access to a running road traffic simulation in SUMO.
  • It provides APIs for users to retrieve values of simulated objects and to manipulate their behavior “on-line."
  • It uses a TCP based client/server architecture to provide access to SUMO. 


  • NetSim uses TraCI commands to step simulations and to retrieve the vehicle position coordinates periodically, eliminating the need to create traces prior to simulation. 
  • Based on the position coordinates returned by SUMO the positions of vehicles in NetSim are updated at runtime.  


Online two-way coupling:


  1. TraCI permits controlling the behavior of vehicles during simulation runtime and can be used to better understand the influence of VANET applications on traffic patterns.
  2. It allows modifying the states of Traffic objects such as vehicle information, route information, infrastructure objects such as Traffic lights, Bus stop, charging station, etc. Network objects such as Lanes, Junctions during runtime.
  3. Simulation therefore does not follow a pre-defined pattern; road traffic behavior gets altered in runtime using a feedback loop from NetSim to SUMO using TraCI. This makes the simulations more realistic since the network topology of vehicle-to-vehicle communication now changes with feedback. 
    For example: 
    • Stepping the simulation, closing the simulation, etc. are associated with simulation control.  
    • Getting the speed, angle, position etc. of a vehicle is associated with value retrieval commands. 
    • Setting the vehicle speed, triggering slow down, setting traffic signal phase, phase duration etc. are associated with state change commands.

As an example, we have Dynamic Traffic Signal Control which uses NetSim - SUMO Two-way coupling. The project is available in NetSim file exchange with source codes and documentation.


Useful Links:


1. Project Link - https://www.tetcos.com/pdf/v14/Dynamic_Traffic_Light_Control_in_NetSim_VANETs_v14.0.pdf 

2. VANET Overview - https://www.tetcos.com/vanets.html

3. VANET Documentation - https://www.tetcos.com/downloads/v14/VANETs.pdf

4. TraCI - SUMO Documentation - https://sumo.dlr.de/docs/TraCI.html