File | Date | Author | Commit |
---|---|---|---|
build | 2018-10-30 |
![]() |
[5d02f3] updated |
docs | 2018-10-30 |
![]() |
[604b12] first commit |
gui | 2018-10-30 |
![]() |
[fda538] updated |
kore | 2018-10-30 |
![]() |
[b707c2] first commit |
mapgraphics | 2018-10-30 |
![]() |
[c09a7e] updated |
readosm | 2018-10-30 |
![]() |
[fda538] updated |
resources | 2018-10-30 |
![]() |
[604b12] first commit |
utils | 2018-10-30 |
![]() |
[fda538] updated |
.travis.yml | 2018-10-30 |
![]() |
[06d3e7] first commit |
LICENSE | 2018-10-30 |
![]() |
[604b12] first commit |
Makefile | 2018-10-30 |
![]() |
[c33e7d] updated. |
README.md | 2018-11-04 |
![]() |
[57dcfe] Update README.md |
simultra.pro | 2018-10-30 |
![]() |
[5d02f3] updated |
simultra.pro.user | 2018-10-30 |
![]() |
[5d02f3] updated |
A multiagent hybrid simulator of road traffic
Simultra is an open-source, hybrid road traffic simulator designed to handle large roadmaps in real-time. It combines microscopic and mesoscopic simulations into one multiagent hybrid simulator. The large-scale maps are modelled mesoscopically in real-time, and the complex traffic interactions benefit from detailed agent-based microscopic simulations. To resolve the concurrency issues within the maps representation and the meso-micro transitions, Simultra combines an event-based mesoscopic model of the maps with a more detailed physical engine.
Watch this simulation video from AAMAS 2016.
Project structure
Simultra/
│ README.md // This file
│ LICENSE.md // GNU GENERAL PUBLIC LICENCE (v3)
│ simultra.pro // Required by qmake to build the project
│ Makefile // Automatically generated makefile
└───kore/ // Core of the simulator
| *.h *.c *.cpp
└───gui/ // UI of roads, vehicles, traffic, etc.
| | *.h *.cpp *.ui
│ └───images/ // Image manipulation routines
| *.h *.cpp
└───build/
| | simultra.app // The simulator
│ └───obj/
| *.o moc_* ui_* qrc_*
└───resources/
│ └───config/ // Configurations and simulation scenarios
│ └───RadarImages/ // Precipitation images
└───utils/
*.h *.c *.cpp // Debug, log, geometrical calculations, etc.
│
└───mapgraphics/ // Required to build/link to libMapGraphics
│
└───readosm/ // Required to build/link to libreadosm
To build MapGraphics and generate libMapGraphics
run
cd mapgraphics/
qmake MapGraphics.pro
make
To build simultra run
qmake simultra.pro
make
To configure and run a simulation you need to work on a number of files in config/
.
map.osm
.simx_map.xml
.simx_simulation.xml
by specifying the vehicles and itineraries:For each vehicle, we need to specify an XML entry:
<Vehicle type="TypeX">
<Location>450 440</Location>
<Direction>0</Direction>
<Driver type="Slow1">
<Lane>
<Intersections>A B C D E</Intersections>
</Lane>
</Driver>
</Vehicle>
which contains the initial position of the vehicle, its orientation, driver type, and the intersections that define the itinerary of the driver.
types.xml
.<VehicleType name="TypeX">
<Image>:/images/bluecar.png</Image>
<Mass>1800.0</Mass>
<Wheelbase>1</Wheelbase>
<MotForce>5000</MotForce>
</VehicleType>
The driver type specifies the velocities of two angles (straight and turn) which will later be used in the behavioural model. Example:
<DriverType name="SlowType">
<TurnVelocity>2</TurnVelocity>
<StraightVelocity>12</StraightVelocity>
</DriverType>
Set the radar images in RadarImages/
for the precipitation simulation. Current build comes with examples of .gif
images from the Japan Meteorological Agency.
It is important to set some of the parameters in config.h
.
Now, running the simulator should give something like:
with
1. Play/Pause simulation. | 11. Moving the map. |
2. Stop simulation. | 12. Adding precipitations. |
3. Simulation clock. | 13. About Simultra. |
4. Shows the OSM view of the simulation. | 14. Simulation area. |
5. Shows the physical view of the simulation. | 15. Order of the layers and rendering opacity. |
6. Zoom (OSM Map). | 16. Simulation components. |
7. Zoom (Physics engine Map). | 17. Vehicle's forces. Works in physical view. |
8. Increase/Decrease vehicle size. | 18. Flow parameters. |
9. Center the map in one particular point (specified in config.h ). |
19. Traces, mobility data, etc. |
10. Pedestrian mode. | 20. Main view window. |
etc.
Simultra was used in other project either directly or after some changes on its design and code.
config.h
too). Another way to avoid the heavy configuration is to randomly assign vehicles to the existing (OSM) paths. The assignments could be parametrised using some vehicle-per-lane distribution. Another option is to drag and drop vehicles on the OSM map.readosm
and json.c
.Comments, feedback and ideas are welcome.
If you find this project to be of any use, please let me know.
If you find bugs or omissions in the code or documentation, please do not hesitate to submit an issue or open a pull request with a fix. Thank you.
Takayuki Ito, Takanobu Otsuka, Teruyoshi Imaeda, and Rafik Hadfi. "An Implementation of Large-Scale Holonic Multi-agent Society Simulator and Agent Behavior Model." Pacific Rim International Conference on Artificial Intelligence. Springer, Cham, 2018.
Rafik Hadfi, Masayuki Hayashi, and Takayuki Ito. "A pipeline multiagent architecture for road traffic simulation." Proceedings of ITS World Congress. 2017.
Rafik Hadfi and Takayuki Ito. "Multilayered Multiagent System for Traffic Simulation." Proceedings of the 2016 International Conference on Autonomous Agents & Multiagent Systems. International Foundation for Autonomous Agents and Multiagent Systems, 2016.
Rafik Hadfi and Takayuki Ito. "Holonic multiagent simulation of complex adaptive systems." International Conference on Practical Applications of Agents and Multi-Agent Systems. Springer, Cham, 2016.
This software was developed in the hope that it would be of some use to the AI community,
and is freely available for redistribution and/or modification under the terms of the GNU General Public Licence.
It is distributed WITHOUT WARRANTY; without even the implied warranty of merchantability or fitness for a particular purpose.
See the GNU General Public License for more details.
(c) 2016-2018 Rafik Hadfi, rafik.hadfi@gmail.com