这是一个集成了驾驶仿真和实时评价的完整列车操作系统。通过实时TCP网络通信,系统可以对驾驶员的操作进行即时评估,同时支持离线数据分析和评价报告生成。
### 🎮 驾驶仿真系统 - ⚙️ 真实的列车动力学模型 - 🔄 人工/自动驾驶模式切换 - ⏱️ 1-10倍速仿真调节 - 📈 实时速度-位置曲线 - 🎯 现代风格仪表盘界面 - 📝 完整日志记录系统 | ### ⚖️ 驾驶评价系统 - 📊 实时数据评价 - 🎯 超调量分析 - 😊 舒适度评估 - ⏰ 准点率计算 - 📏 停车误差测量 - 📋 离线数据分析 - 📑 评价报告生成 |
Python >= 3.7
PyQt5
pandas
numpy
matplotlib
scipy
1️⃣ 克隆项目仓库
git clone [repository-url]
cd train-simulation-system
2️⃣ 安装依赖
pip install -r requirements.txt
对于exe版本的文件,直接双击运行即可,以下为源码版本的使用指南。
1️⃣ 启动评价系统
python evaluation.py
2️⃣ 启动仿真系统
python main.py
按键 | 功能 |
---|---|
Q | 切换至牵引工况 |
W | 切换至惰行工况 |
E | 切换至制动工况 |
O | 增加当前工况力度 |
P | 减小当前工况力度 |
最后一次仿真结束时,将生成三个文件:
定义: 实际速度超过目标速度的百分比
公式:overshoot = (actual_speed - target_speed) / target_speed * 100
| 等级 | 加速度范围 | 描述 | |:—-:|:———-:|:—-:| | 🟢 | ≤ 0.28 m/s² | 极舒适 | | 🟡 | 0.28 ~ 1.23 m/s² | 舒适 | | 🟠 | 1.23 ~ 2.12 m/s² | 不舒适 | | 🔴 | > 2.12 m/s² | 无法忍受 |
标准: 允许偏差 ±180秒(3分钟)
计算:
error = |actual_position - target_position|
graph TD
A[train-simulation-system] --> B[simulation]
A --> C[evaluation]
A --> D[data]
A --> E[logs]
B --> B1[main.py]
B --> B2[gui.py]
B --> B3[simulation.py]
B --> B4[pid.py]
B --> B5[widgets.py]
B --> B6[network_client.py]
C --> C1[evaluation_system.py]
C --> C2[metrics.py]
D --> D1[列车目标速度曲线.xlsx]
D --> D2[ATP顶棚速度数据.xls]
D --> D3[制动特性曲线.xls]
D --> D4[牵引特性曲线.xls]
TrainSimulation/
├── TrainSimulation_App/ # 可执行文件目录
│ ├── TrainEvaluator.exe # 仿真驾驶评价软件
│ ├── TrainSimulator.exe # 列车驾驶仿真软件
│ └── logs/ # 仿真输出目录
│ ├── *.png # 速度曲线图
│ ├── *.log # 操作日志
│ └── *.csv # 运行数据
│
└── TrainSimulation_Code/ # 源代码目录
├── evaluate.py # 评价系统源码
├── main.py # 主程序
├── gui.py # 图形界面
├── widgets.py # 界面组件
├── simulation.py # 仿真逻辑
└── pid.py # PID控制器
本项目采用 MIT 许可证。