An intelligent traffic control system using Deep Q-Learning to optimize traffic signal timing. This project achieved a 50% reduction in average wait times and a 34.9% increase in traffic flow speed.
Trafficient uses reinforcement learning to dynamically control traffic signals, adapting to real-time traffic conditions. The system is built on SUMO (Simulation of Urban MObility) and PyTorch, implementing a Deep Q-Network (DQN) for intelligent decision-making.
- Real-time traffic signal optimization
- Predictive queue management
- Dynamic phase timing
- Multi-intersection support
- Performance metrics tracking
- Python 3.8+
- SUMO (Simulation of Urban MObility)
- PyTorch
- NumPy
- Matplotlib
- Install SUMO:
# Set SUMO_HOME environment variable
export SUMO_HOME="path/to/sumo"- Install Python dependencies:
pip install torch numpy matplotlib- Clone the repository:
git clone [repository-url]
cd trafficient- Run the reinforcement learning model:
python rl_traffic_control.py- Compare with traditional methods:
python compare_methods.py- Generate random traffic patterns:
python random_trips.pytrafficient/
├── rl_traffic_control.py # Main RL implementation
├── traditional_traffic.net.xml # Network configuration
├── traditional_traffic.sumo.cfg # SUMO configuration
├── random_trips.py # Traffic generation
├── traditional_traffic_control.py # Traditional Traffic control
├── random_traffic.rou.xml # Traditional Traffic control
└── compare_methods.py # Performance comparison
- Average wait time reduction: 50%
- Traffic flow speed increase: 34.9%
- Improved throughput across 8+ traffic approaches
- SUMO Traffic Simulation
- PyTorch Team
- Traffic Control Research Community