|
Adaptive Traffic Simulator
|
Adaptive Traffic Flow Optimization System (C++)
An Intelligent Transportation System (ITS) simulation that models and optimizes urban traffic flow using graph algorithms, congestion modeling, and adaptive signal control.
This project simulates real-world traffic conditions in major Pakistani cities such as Karachi, Lahore, Multan, and Peshawar, with the goal of reducing congestion and improving travel efficiency.
FOR UML click this link https://usman-irshad1.github.io/Adaptive-Traffic-Simulator-with-Dynamic-Rerouting-Signal-Control/
Objective
The system minimizes overall traffic cost by balancing:
Optimization Function
min Σₜ Σ₍ᵢⱼ₎ [ α Q₍ᵢⱼ₎(t) + β (f₍ᵢⱼ₎(t) / c₍ᵢⱼ₎)² ]
Where:
Q₍ᵢⱼ₎ = Queue length
f₍ᵢⱼ₎ = Traffic flow
c₍ᵢⱼ₎ = Road capacity
Core Features
1. Dynamic Graph-Based Road Network
2. Intelligent Routing (Dijkstra Algorithm)
3. BPR Congestion Model
4. Adaptive Traffic Signals (Longest Queue First)
5. Backpressure Flow Control
6. Real-Time Analytics
The system continuously tracks:
Average travel time
Traffic congestion levels
Network throughput
Performance Metrics
The simulator evaluates traffic conditions using:
Network Utilization= (1 / |E|) Σ (f₍ᵢⱼ₎ / c₍ᵢⱼ₎)
Total Delay = Σ (Tₛ d − Tₛd^free)
Where:
Tₛd = Actual travel time
Tₛd^free = Free-flow travel time
Testing Results
In a high-density simulation with 30 vehicles: