Autonomous City Traffic Simulation

   page       attach   
sommario

ACTS is an advanced, agent-based smart city simulation focused on decentralized intersection management. Built in Python using the Mesa multiagent framework and NetworkX, the project models dynamic urban traffic flow where intersections operate autonomously without a central command server.  

At the core of the project is a procedural topology generator that constructs a directed graph representing a realistic road network, complete with external arterial roads and complex internal turning lanes. The simulation features two primary entities: Vehicle Agents that navigate the network, and Smart Traffic Light Agents deployed at intersection nodes.  

Instead of relying on rigid, pre-programmed timers, the smart traffic lights utilize a distributed consensus algorithm to negotiate the ”GREEN” state. Each agent continuously monitors its local environment, detecting queued vehicles, calculating waiting times, and receiving messages about incoming traffic waves from neighboring nodes. Based on this telemetry, each traffic light calculates a dynamic priority score.  

To ensure physical safety and prevent collisions, the system implements Signal Phasing (conflict matrices). Traffic lights communicate their scores and intentions through a distributed messaging channel, utilizing Lamport clocks for event synchronization. Agents assigned to non-conflicting trajectories (identical phases) can concurrently grant themselves permission to turn green. Conflicting requests are dynamically resolved by comparing real-time traffic scores and enforcing minimum safety durations.  

Ultimately, ACTS serves as a robust sandbox for testing distributed systems architectures, agent-based modeling, and modern traffic optimization algorithms in a highly reactive urban environment.

prodotti