
Security News
Crates.io Implements Trusted Publishing Support
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
The pure python version of the TraCI API to communicate with the traffic simulation Eclipse SUMO
TraCI (short for Traffic Control Interface) is an API that provides access to a SUMO traffic simulation, enabling controlling the behavior of multiple simulation objects during a live simulation. It allows for external scripts to interact with the simulation and its vehicles, pedestrians, and infrastructure.
To use TraCI, you must first have an Eclipse SUMO installation. Install TraCI by simply executing:
pip install traci
A daily version is also available in TestPyPI:
pip install -i https://test.pypi.org/simple/ traci
To use TraCI in your Python code, import the traci
module. The following code snippet shows a basic example
of how to connect to a running SUMO simulation using TraCI:
import traci
# Connect to SUMO simulation
traci.start(["sumo", "-c", "path/to/your/sumocfg/file.sumocfg"])
# Simulation loop
step = 0
while step < 1000:
traci.simulationStep()
# Your simulation logic here
step += 1
# Close TraCI connection
traci.close()
Once connected to the SUMO simulation, TraCI provides a range of functions that can be used to query and modify the state of the simulation. For example, you can use TraCI to control the behavior of individual vehicles, modify the traffic light phases, or query the current state of the simulation.
The TraCI documentation is available online at http://sumo.dlr.de/docs/TraCI.html. The documentation provides detailed information on the TraCI API, including a list of available functions and their parameters.
There are some TraCI Tutorials available.
If you find a bug in TraCI or have a suggestion for a new feature, please report it on the SUMO issue tracker at https://github.com/eclipse-sumo/sumo/issues. If you would like to contribute code to TraCI, please submit a pull request to the SUMO repository at https://github.com/eclipse-sumo/sumo.
TraCI is released under the Eclipse Public License 2.0 (EPL-2.0).
FAQs
The pure python version of the TraCI API to communicate with the traffic simulation Eclipse SUMO
We found that traci demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
Research
/Security News
Undocumented protestware found in 28 npm packages disrupts UI for Russian-language users visiting Russian and Belarusian domains.
Research
/Security News
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.