完善模块#7628
Open
liuhuatao123 wants to merge 44 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
1.奖励函数核心实现:实现速度奖励、距离奖励(分段线性,临界距离 5m / 安全距离 15m)、舒适性奖励(二次惩罚 ),通过 config.yaml 统一管理参数




工具函数模块:实现 YAML 配置加载、200 步随机场景仿真数据生成(速度+正弦波动+噪声)、批量奖励计算(速度+距离+舒适性+总奖励)、输出目录管理
可视化模块:使用 Matplotlib 实现理论曲线图(1行3列,含阈值标注)、仿真对比图(4行1列时序)、参数敏感性分析(不同目标速度/安全距离对比),支持中文渲染,150 DPI 输出 PNG
主程序入口:通过 argparse 支持 --mode all/plot/sim 三种模式,串联 7 步完整分析流程(加载配置→理论曲线→仿真数据→奖励计算→统计输出→仿真曲线→参数对比)
多场景输出:基线/恶劣天气/城市低速/舒适优先/高速激进 5 个场景共 10 张分析图表
模块文档:编写完整 README,含项目简介、数学公式、运行指南、文件说明、参考资料
2.经过了什么样的测试?
操作系统:Windows 11
Python 版本:Python 3.10+
基础校验:运行 python main.py --mode all,成功生成 200 步仿真数据,完成 7 步分析流程,输出 4 张图表和统计信息(mean/std/min/max);--mode plot 和 --mode sim 模式均正常;修改 config.yaml 参数后图表和统计数据相应变化
运行效果(动图、视频、图片、链接等)