How nt505-p21-kltn/trafficcontrolmodel works
Project type and purpose
• This is a full-stack traffic simulation and control system built around SUMO (Simulation of Urban MObility).
• agent_new: Python agents that interact with SUMO to train and test traffic-signal control models.
• central_server: A Flask-based server providing a dashboard, data storage, and coordination for multiple agents.
File structure
• Top level
• agent_new/ – the client-side agent code, training & testing scripts, model files, SUMO configuration and route files.
• central_server/ – the server-side application, with static assets (JS/CSS), HTML templates, data storage under server_data/.
• server_data/, static/, templates/ – mirror or deployment copies of central_server’s data, UI, and views.
• agent_new substructure
• agent_communicator.py – handles HTTP or socket comms with central_server.
• training_main.py, testing_main.py – orchestration scripts for training and evaluation loops.
• intersection/ – SUMO network topology & route definitions (.net.xml, .rou.xml, .sumocfg).
• model.py, memory.py, generator.py, utils.py – core RL/DL components.
• models/ – saved model binaries (h5), training/test logs.
• central_server substructure
• central_server.py – Flask app entrypoint.
• server_data/agent_data.json – persistent JSON data store.
• static/ – dashboard.js, CSS, map HTML.
• templates/ – Jinja2 HTML views for index, map.
README
• Minimal README (# TrafficControlModel) – confirms project focus is on traffic control modeling with a custom agent and server.
Detail
• Training vs. testing scripts as separate subprocesses of the Agent Service.
• Model storage separately to reflect where trained_model.h5 lives.