A multiagent hybrid simulator for large-scale road traffic
Built with Qt/C++ Β· Powered by OpenStreetMap
π¬ Watch the demo (AAMAS 2016)
Simultra is an open-source road traffic simulator that seamlessly combines microscopic and mesoscopic simulation models into a single multiagent framework. It is designed to handle large real-world roadmaps in real-time:
- Mesoscopic model handles large-scale map regions efficiently using an event-based approach.
- Microscopic model provides detailed, agent-based physical simulation for complex traffic interactions (intersections, lane changes, etc.).
- A hybrid engine resolves concurrency issues and manages smooth transitions between the two scales.
- π Programmable agents β emulate vehicles, drivers, and intelligent traffic signals with configurable behaviors.
- πΊοΈ Real-world maps β render and simulate on actual road networks via OpenStreetMap.
- π§οΈ Weather overlay β layer precipitation radar data on top of the traffic simulation.
- β‘ Real-time performance β designed for large-scale maps without sacrificing interactivity.
| Dependency | Version |
|---|---|
| Qt | 5.11.2+ |
| C++ standard | C++11 |
| Readosm | 1.0.0e |
| MapGraphics | 1.0 |
1. Build MapGraphics
cd mapgraphics/
qmake MapGraphics.pro
make2. Build Readosm
cd readosm/
make3. Build Simultra
qmake simultra.pro
makeThe compiled binary will be at build/simultra.app.
Simultra/
βββ kore/ # Core simulation engine
βββ gui/ # UI components (roads, vehicles, traffic layers)
β βββ images/ # Image manipulation routines
βββ build/ # Compiled binary + object files
βββ resources/
β βββ config/ # Configuration files & simulation scenarios
β βββ RadarImages/ # Precipitation overlay images
βββ utils/ # Debug, logging, geometry utilities
βββ mapgraphics/ # MapGraphics library source
βββ readosm/ # Readosm library source
βββ simultra.pro # qmake project file
βββ Makefile
Configuration files live in resources/config/. Follow these steps:
1. Get your map
Download an area from openstreetmap.org/export and save it as map.osm.
2. Define the road topology in simx_map.xml.
3. Define the scenario in simx_simulation.xml. Each vehicle is specified as:
<Vehicle type="TypeX">
<Location>450 440</Location>
<Direction>0</Direction>
<Driver type="Slow1">
<Lane>
<Intersections>A B C D E</Intersections>
</Lane>
</Driver>
</Vehicle>4. Configure vehicle & driver types in types.xml:
<!-- Vehicle: mass, wheelbase, engine force, appearance -->
<VehicleType name="TypeX">
<Image>:/images/bluecar.png</Image>
<Mass>1800.0</Mass>
<Wheelbase>1</Wheelbase>
<MotForce>5000</MotForce>
</VehicleType>
<!-- Driver: behavioral velocity parameters -->
<DriverType name="SlowType">
<TurnVelocity>2</TurnVelocity>
<StraightVelocity>12</StraightVelocity>
</DriverType>5. Add weather data (optional) β place radar .gif images in RadarImages/. Sample images from the Japan Meteorological Agency are included.
6. Review config.h for global simulation parameters (map center, zoom defaults, etc.).
Launch the built binary. The GUI provides full interactive control:
| # | Control | # | Control |
|---|---|---|---|
| 1 | Play / Pause | 11 | Pan the map |
| 2 | Stop simulation | 12 | Toggle precipitation overlay |
| 3 | Simulation clock | 13 | About Simultra |
| 4 | OSM view | 14 | Simulation area |
| 5 | Physics engine view | 15 | Layer order & opacity |
| 6 | Zoom (OSM) | 16 | Simulation components |
| 7 | Zoom (Physics) | 17 | Vehicle forces (physics view) |
| 8 | Vehicle size +/β | 18 | Flow parameters |
| 9 | Center map | 19 | Traces & mobility data |
| 10 | Pedestrian mode | 20 | Main viewport |
Simultra has been adapted and deployed in other research projects:
Pipelined distributed architecture β itolab-hayashi-rafik/Simultra
Large-scale testbed β Deployed on StarBED (NICT)
- Consolidate configuration files into a single JSON or auto-generate them in a pre-simulation phase.
- Support drag-and-drop vehicle placement on the OSM map.
- Integrate traffic light data from OSM.
- Fetch precipitation data dynamically via a weather API.
- Improve coordinate conversion between (lat, lon) and (x, y).
- Merge
readosmandjson.cutilities. - Expand test coverage.
If you use Simultra in your research, please cite one of the following:
@inproceedings{hadfi2016multilayered,
title = {Multilayered Multiagent System for Traffic Simulation},
author = {Hadfi, Rafik and Ito, Takayuki},
booktitle = {Proceedings of the International Conference on Autonomous Agents \& Multiagent Systems (AAMAS)},
year = {2016}
}
@inproceedings{hadfi2017pipeline,
title = {A Pipeline Multiagent Architecture for Road Traffic Simulation},
author = {Hadfi, Rafik and Hayashi, Masayuki and Ito, Takayuki},
booktitle = {Proceedings of ITS World Congress},
year = {2017}
}
@inproceedings{ito2018holonic,
title = {An Implementation of Large-Scale Holonic Multi-agent Society Simulator and Agent Behavior Model},
author = {Ito, Takayuki and Otsuka, Takanobu and Imaeda, Teruyoshi and Hadfi, Rafik},
booktitle = {Pacific Rim International Conference on Artificial Intelligence (PRICAI)},
publisher = {Springer},
year = {2018}
}
@inproceedings{hadfi2016holonic,
title = {Holonic Multiagent Simulation of Complex Adaptive Systems},
author = {Hadfi, Rafik and Ito, Takayuki},
booktitle = {International Conference on Practical Applications of Agents and Multi-Agent Systems (PAAMS)},
publisher = {Springer},
year = {2016}
}Contributions, bug reports, and ideas are welcome! Feel free to open an issue or submit a pull request.
Distributed under the GNU General Public License v3.0. See LICENSE for details.
Β© 2016β2018 Rafik Hadfi




