# simulation_platform **Repository Path**: fzzf7478/simulation_platform ## Basic Information - **Project Name**: simulation_platform - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-10-29 - **Last Updated**: 2025-10-29 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 单交叉口延误/排队长度/信控研究与演示 ## 运行步骤(Windows) - 创建虚拟环境并安装依赖: ```powershell python -m venv .venv .\.venv\Scripts\activate pip install -r requirements.txt ``` - 离线演示(基于样例数据): ```powershell python tools/offline_demo.py --data data/sample --out output ``` - 启动API服务: ```powershell uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload ``` ## API - GET `/metrics/delay?intersection_id=...` 按样例聚合轨迹估算延误 - GET `/metrics/queue?intersection_id=...&window_s=30` 队长估算 - POST `/control/optimize` 输入可选参数,返回相位绿信比 ## 目录结构 - `src/algorithms/` 延误、排队长度、信控算法 - `src/adapters/` 数据与仿真适配(含SUMO适配器桩) - `src/utils/` 坐标与几何工具 - `app/` FastAPI服务 - `tools/` CLI演示 - `data/` 数据样例与元数据 - `output/` 输出结果 - `report/` XeLaTeX技术报告 ## SUMO二次开发 - 本项目提供`src/adapters/sumo_adapter.py`桩代码和统一接口;如需联动SUMO,请安装SUMO并配置`SUMO_HOME`,然后在适配器中实现状态采集与配时下发。