Agent-Based Modeling and Simulation of Connected and Automated Vehicles Using Game Engine: A Cooperative On-Ramp Merging Study

Agent-Based Modeling and Simulation of Connected and Automated Vehicles   Using Game Engine: A Cooperative On-Ramp Merging Study
Notice: This research summary and analysis were automatically generated using AI technology. For absolute accuracy, please refer to the [Original Paper Viewer] below or the Original ArXiv Source.

Agent-based modeling and simulation (ABMS) has been a popular approach to modeling autonomous and interacting agents in a multi-agent system. Specifically, ABMS can be applied to connected and automated vehicles (CAVs), since CAVs can be driven autonomously with the help of on-board sensors, and cooperate with each other through vehicle-to-everything (V2X) communications. In this work, we apply ABMS to CAVs using the game engine Unity3D, taking advantage of its visualization capability and other capabilities. Agent-based models of CAVs are built in the Unity3D environment, where vehicles are enabled with connectivity and autonomy by C#-based scripting API. We also build a simulation network in Unity3D based on the city of Mountain View, California. A case study of cooperative on-ramp merging has been carried out with the proposed distributed consensus-based protocol, and then compared with the human-in-the-loop simulation where the on-ramp vehicle is driven by four different human drivers on a driving simulator. The benefits of introducing the proposed protocol are evaluated in terms of travel time, energy consumption, and pollutant emissions. It is shown from the results that the proposed cooperative on-ramp merging protocol can reduce average travel time by 7%, reduce energy consumption and pollutant emissions by 8% and 58%, respectively, and guarantee the driving safety when compared to the human-in-the-loop scenario.


💡 Research Summary

This paper presents a novel framework for agent‑based modeling and simulation (ABMS) of Connected and Automated Vehicles (CAVs) using the Unity3D game engine, and applies it to a cooperative on‑ramp merging scenario. The authors first review the essential characteristics of agents—identifiability, interactivity, goal‑directedness, autonomy, and flexibility—and argue that CAVs naturally satisfy these traits, making ABMS a suitable paradigm for transportation research. Unity3D is chosen because of its high‑fidelity rendering, PhysX‑based physics engine, C# scripting interface, extensive asset store, and active developer community, all of which enable rapid development of realistic 3‑D road networks, vehicle models, sensor suites, and V2X communication modules.

A digital replica of Mountain View, California, is built within Unity3D, and each vehicle is instantiated as an autonomous agent equipped with on‑board sensors and V2X capabilities. The core contribution lies in the design of a distributed consensus‑based cooperative on‑ramp merging system, which consists of two tightly coupled sub‑modules: (1) a vehicle sequencing protocol and (2) a longitudinal control protocol.

In the sequencing stage, vehicles entering the V2I communication range periodically broadcast their instantaneous speed, acceleration, and global position. The roadside infrastructure aggregates these data, estimates each vehicle’s time‑to‑merge (TTM) using a simplified linear acceleration model, and sorts the vehicles at a low frequency (≈0.2 Hz) to avoid instability caused by frequent resequencing. Sequence identifiers are then assigned, and a small temporal offset is added when two vehicles would otherwise obtain the same estimated arrival time, guaranteeing a strict ordering.

The longitudinal control stage adopts a distributed consensus algorithm inspired by Cooperative Adaptive Cruise Control (CACC). Each vehicle identifies its predecessor based on the assigned sequence number, regardless of physical adjacency, and computes its acceleration as a linear combination of position‑error and speed‑error terms, weighted by two tunable gains (α, β). V2V communication latency is explicitly modeled as a headway term (Δt) and compensated in the control law, ensuring robustness against realistic network delays.

To evaluate the proposed approach, the authors conduct a Human‑in‑the‑Loop (HIL) experiment in which four different human drivers operate the on‑ramp vehicle via a driving simulator, and compare it with the fully automated scenario using the distributed consensus protocol. All simulations are performed on the same road geometry, traffic demand, and environmental conditions. Results show that the cooperative merging protocol reduces average travel time by 7 %, energy consumption by 8 %, and pollutant emissions (CO₂, NOₓ) by 58 % relative to the HIL baseline. Importantly, no safety violations such as hard braking or collisions are observed, indicating that the protocol maintains or improves safety while delivering efficiency gains.

The paper’s contributions are threefold: (1) a practical methodology for building CAV agents in Unity3D, integrating perception, communication, and control within a single, visually rich environment; (2) a low‑frequency, V2I‑based vehicle sequencing mechanism that mitigates the instability issues of high‑frequency resequencing; (3) a distributed consensus longitudinal controller that scales to arbitrary vehicle strings and tolerates V2V latency. The authors also discuss limitations and future work, including extending the framework to multi‑ramp, multi‑lane networks, incorporating non‑connected vehicles, applying reinforcement‑learning‑based sequence optimization, and validating the system with real‑world V2X hardware. Overall, the study demonstrates that game‑engine‑based ABMS can serve as an effective testbed for advanced CAV coordination strategies, delivering measurable benefits in travel efficiency, energy use, and environmental impact.


Comments & Academic Discussion

Loading comments...

Leave a Comment