The Urban Traffic Simulator is an agent-based model developed in the Unity platform. The model allows the user to simulate several autonomous vehicles (AVs) and tune granular parameters such as vehicle downforce, adherence to speed limits, top speed in mph and mass. The model allows researchers to tune these parameters, run the simulator for a given period and export data from the model for analysis (an example is provided in Jupyter Notebook).
The data the model is currently able to output are the following:
AgentID: the unique agent identifier.
xAxisPos: the x-axis position of the agent.
zAxisPos: the y axis position of the agent.
collisions: the total number of times a vehicle has collided with another.
topSpeed(mph): the top speed the vehicle is set to achieve throughout its drive cycle.
currentSpeed(mph): the current speed of the vehicle in mph.
distanceOfTravel(meters): the distance the vehicle has travelled over its drive cycle.
raycastLength: the length at which the vehicle can identify objects, 1 - very short to 10 high vision distance.
tractionControl: traction control initiated; some vehicles will have traction control others will not; this is entirely arbitrary.
VelocityMagnitude(BETA): the magnitude of the velocity for the vehicle.
VehicleMass: the vehicle weight in kg.
Downforce: the force applied to the vehicle to create more grip, 0.1 - small force to 10.0 - more force.
date-time: date and timestamps for each data point collected, currently its milliseconds and multiple actions by the raw physics engine can occur throughout the simulation. Therefore, large amounts of data points are collected for each run in short amounts of time.
NOTE! The simulation requires an adequate computer to run; as the number of agents increases, the computational complexity gets severe.
Release Notes
The Urban Traffic Simulator was developed in Unity 2019.3.03. The core model only requires Unity version 2019.3.03+ and the source code in the Assets folder to deploy. Unity can be downloaded here: https://unity3d.com/get-unity/download.
The following features are available:
- The simulator can run 1 to 500 autonomous vehicles in 3D space that applies physics laws.
- A menu UI is present, which allows the parameters to be tuned; these include the number of vehicles, maximum mass, maximum downforce, traction control.
- The output data is exported to a directory provided by the user post model run. These data include the current speed of vehicles in mph, velocity magnitude, top speed in mph, and distance travelled in meters.
- A Jupyter Notebook is provided, which runs some data analysis on data produced by the model for two example scenarios.
- N number of vehicles can be set NOT to adhere to speed limits. This allows the user to compare scenarios where vehicles may drive faster than other vehicles. The subsequent impact of these vehicles can be observed regarding congestion, energy expenditure, and pollution. Congestion will likely occur in the Urban Street Network if most vehicles do NOT adhere to speed limits as vehicles can collide at intersections, preventing other vehicles from continuing their journey.
Associated Publications
Olmez, S.; Douglas-Mann, L.; Manley, E.; Suchak, K.; Heppenstall, A.; Birks, D.; Whipp, A. Exploring the Impact of Driver Adherence to Speed Limits and the Interdependence of Roadside Collisions in an Urban Environment: An Agent-Based Modelling Approach. Appl. Sci. 2021, 11, 5336. https://doi.org/10.3390/app11125336
Sedar Olmez, Keiran Suchak (2022) Energy Calculation Extension for the article: An Agent-Based Simulation of Heterogeneous Driver Behaviour and its Impact on Electric Energy Consumption in Urban Space. [Source Code]. https://doi.org/10.24433/CO.1407289.v1
Olmez, Sedar, Whipp, Annabel, Marfleet, Ellie, Thompson, Jason, Suchak, Keiran, Heppenstall, Alison, & Vidanaarachchi, Rajith. (2022, April 2). Towards Modelling Energy Demand of Vehicles in Cities: An Agent-Based Method. 30th Annual Geographical Information Science Research UK (GISRUK), Liverpool, United Kingdom. https://doi.org/10.5281/zenodo.6408394
Olmez, S.; Thompson, J.; Marfleet, E.; Suchak, K.; Heppenstall, A.; Manley, E.; Whipp, A.; Vidanaarachchi, R. An Agent-Based Model of Heterogeneous Driver Behaviour and Its Impact on Energy Consumption and Costs in Urban Space. Energies 2022, 15, 4031. https://doi.org/10.3390/en15114031
3D Urban Traffic Simulator (ABM) in Unity 1.1.0
Submitted bySedar OlmezPublished Mar 22, 2021
Last modified Jun 23, 2022
The Urban Traffic Simulator is an agent-based model developed in the Unity platform. The model allows the user to simulate several autonomous vehicles (AVs) and tune granular parameters such as vehicle downforce, adherence to speed limits, top speed in mph and mass. The model allows researchers to tune these parameters, run the simulator for a given period and export data from the model for analysis (an example is provided in Jupyter Notebook).
The data the model is currently able to output are the following:
AgentID: the unique agent identifier.
xAxisPos: the x-axis position of the agent.
zAxisPos: the y axis position of the agent.
collisions: the total number of times a vehicle has collided with another.
topSpeed(mph): the top speed the vehicle is set to achieve throughout its drive cycle.
currentSpeed(mph): the current speed of the vehicle in mph.
distanceOfTravel(meters): the distance the vehicle has travelled over its drive cycle.
raycastLength: the length at which the vehicle can identify objects, 1 - very short to 10 high vision distance.
tractionControl: traction control initiated; some vehicles will have traction control others will not; this is entirely arbitrary.
VelocityMagnitude(BETA): the magnitude of the velocity for the vehicle.
VehicleMass: the vehicle weight in kg.
Downforce: the force applied to the vehicle to create more grip, 0.1 - small force to 10.0 - more force.
date-time: date and timestamps for each data point collected, currently its milliseconds and multiple actions by the raw physics engine can occur throughout the simulation. Therefore, large amounts of data points are collected for each run in short amounts of time.
NOTE! The simulation requires an adequate computer to run; as the number of agents increases, the computational complexity gets severe.
Release Notes
The Urban Traffic Simulator was developed in Unity 2019.3.03. The core model only requires Unity version 2019.3.03+ and the source code in the Assets folder to deploy. Unity can be downloaded here: https://unity3d.com/get-unity/download.
The following features are available:
- The simulator can run 1 to 500 autonomous vehicles in 3D space that applies physics laws.
- A menu UI is present, which allows the parameters to be tuned; these include the number of vehicles, maximum mass, maximum downforce, traction control.
- The output data is exported to a directory provided by the user post model run. These data include the current speed of vehicles in mph, velocity magnitude, top speed in mph, and distance travelled in meters.
- A Jupyter Notebook is provided, which runs some data analysis on data produced by the model for two example scenarios.
- N number of vehicles can be set NOT to adhere to speed limits. This allows the user to compare scenarios where vehicles may drive faster than other vehicles. The subsequent impact of these vehicles can be observed regarding congestion, energy expenditure, and pollution. Congestion will likely occur in the Urban Street Network if most vehicles do NOT adhere to speed limits as vehicles can collide at intersections, preventing other vehicles from continuing their journey.
Olmez, S.; Douglas-Mann, L.; Manley, E.; Suchak, K.; Heppenstall, A.; Birks, D.; Whipp, A. Exploring the Impact of Driver Adherence to Speed Limits and the Interdependence of Roadside Collisions in an Urban Environment: An Agent-Based Modelling Approach. Appl. Sci. 2021, 11, 5336. https://doi.org/10.3390/app11125336
Sedar Olmez, Keiran Suchak (2022) Energy Calculation Extension for the article: An Agent-Based Simulation of Heterogeneous Driver Behaviour and its Impact on Electric Energy Consumption in Urban Space. [Source Code]. https://doi.org/10.24433/CO.1407289.v1
Olmez, Sedar, Whipp, Annabel, Marfleet, Ellie, Thompson, Jason, Suchak, Keiran, Heppenstall, Alison, & Vidanaarachchi, Rajith. (2022, April 2). Towards Modelling Energy Demand of Vehicles in Cities: An Agent-Based Method. 30th Annual Geographical Information Science Research UK (GISRUK), Liverpool, United Kingdom. https://doi.org/10.5281/zenodo.6408394
Olmez, S.; Thompson, J.; Marfleet, E.; Suchak, K.; Heppenstall, A.; Manley, E.; Whipp, A.; Vidanaarachchi, R. An Agent-Based Model of Heterogeneous Driver Behaviour and Its Impact on Energy Consumption and Costs in Urban Space. Energies 2022, 15, 4031. https://doi.org/10.3390/en15114031
Create an Open Code Badge that links to this model more info
This model has not been reviewed by CoMSES Net and should be independently reviewed to
meet the Open Code Badge guidelines.
You can use the following HTML or Markdown code to create an Open Code Badge that links to
version 1.1.0
of this computational model.
This website uses cookies and Google Analytics to help us track user engagement and improve our site. If
you'd like to know more information about what data we collect and why, please see
our data privacy policy. If you continue to use this site, you consent to
our use of cookies.