1. Summary
  2. Files
  3. Support
  4. Report Spam
  5. Create account
  6. Log in

TraCI

From sumo

Jump to: navigation, search

Contents

Introduction to TraCI

TraCI is the short term for "Traffic Control Interface". The basic idea behind is to give access to a running road traffic simulation. If you have any questions or helpful suggestions, you may use the [sumo-devel] mailing list.

SUMO startup

TraCI uses a TCP based client/server architecture to provide access to SUMO. Thereby, SUMO acts as server that is started with additional command-line options: --remote-port <INT> where <INT> isthe port SUMO will listen on for incoming connections.

When started with the --remote-port <INT> option, SUMO only prepares the simulation and waits for an external application, that takes over the control. Please note, that the --end <TIME> option is ignored when SUMO runs as a TraCI server, SUMO runs until the client demands a simulation end.

Protocol specification

Please see the TraCI Protocol Specification (including Basic Flow, Messages, Data Types).

TraCI Commands

There used to be two "generations" of TraCI commands. The first one mainly uses an internal mapping between the string-typed IDs used in SUMO and an external representation of these which is int-based. The mapping was done internally (within TraCI). The "second generation" uses string-IDs equal to those SUMO reads. If you are bound to the first generation API (for instance if you want to use TraNS) you can only use SUMO up to version 0.12.3. There is also a comparison of the two APIs available.

There are some general commands which don't use ids of any simulation objects

For the following APIs, the ID is equal to the ID defined in SUMO's input files. Here, you find their general structure.

TraCI/Vehicle Signalling explains which signals, etc. are modeled and can be retrieved.

Example use

Resources

Interface Implementations

V2X simulation

TraCI allows to use SUMO in combination with communication network simulators vor simulating vehicular communication. See Topics/V2X for a list of available solutions.

By Programming Language

Troubleshooting

Output files are not closed.

This problem occures if the client tries to access the output while the simulation is still closing down. This can be solved by letting the client wait for the simulation to shut down. The bug report was ticket524
Personal tools