这份文档是仓库的中文运行速查表,面向已经装好环境、只想快速找到当前真实入口和常用参数的人。
如果你还没装环境,先看 environment_setup.md。 如果你需要英文版命令说明,转到 how_to_run.md。 如果你想看整个文档地图,转到 README.md。
benchmark 真实入口:
python -m apps.benchmark_runner
ship 批量报告真实入口:
python ship_simulation/run_report.py
兼容层入口仍然可用,但不再是首选:
python run_experiments.pypython -m apps.ship_runner
python -m apps.benchmark_runner --quick --plot-preset paper当前 --quick 的含义:
- 重复运行:
2 - 环境变化次数:
5 - 每次变化后的进化代数:
10 - 问题集合:
FDA1,FDA3,dMOP2 - 默认 worker:
1
README 只保留这一条完整入口:
python -m apps.benchmark_runner --full --workers 4当前 --full 的含义:
- 重复运行:
5 - 环境变化次数:
10 - 每次变化后的进化代数:
20 - 问题集合:
FDA1,FDA2,FDA3,dMOP1,dMOP2,dMOP3 - 动态设置 sweep:
(5,10),(10,10),(10,20) - 默认包含消融与全部主图
- 默认启用 benchmark 任务级缓存
python -m apps.benchmark_runner --with-jy --workers 4这会在标准问题集基础上再加入 JY1, JY4。
benchmark 现在默认对完整运行启用任务级缓存,缓存粒度固定为:
(setting, algorithm, problem, run, ablation_variant)
缓存目录:
benchmark_outputs/_cache/benchmark_tasks/
同配置重跑时,默认会直接复用缓存结果。
强制忽略缓存:
python -m apps.benchmark_runner --full --force-rerun做一个明显的 warm rerun 对比:
python -m apps.benchmark_runner --quick --force-rerun
python -m apps.benchmark_runner --quick跳过消融:
python -m apps.benchmark_runner --full --skip-ablation只导出原始表格和 Markdown summary,不渲染图:
python -m apps.benchmark_runner --full --summary-only指定算法和问题子集:
python -m apps.benchmark_runner --quick --algorithms KEMM RI Tr
python -m apps.benchmark_runner --quick --problems FDA1 FDA3 dMOP2自定义输出目录:
python -m apps.benchmark_runner --full --output-dir benchmark_outputs\my_run切换图表 preset 和 SciencePlots 风格:
python -m apps.benchmark_runner --full --plot-preset ieee
python -m apps.benchmark_runner --full --science-style science,ieee,no-latex导出附录图和交互 figure bundle:
python -m apps.benchmark_runner --full --appendix-plots --interactive-figures完整运行后,优先看这些文件:
reports/summary.mdraw/summary.jsonraw/paper_table_metrics.csvraw/ablation_delta_metrics.csvfigures/benchmark_migd_table.pngfigures/benchmark_ablation.png
补充说明:
benchmark_migd_table.png是论文风格主表,对应三组动态设置。benchmark_ablation.png画的是相对KEMM-Full的MIGD退化百分比,正值表示删掉模块后更差。- 只有 canonical setting 会完整保留
igd_curve / hv_curve / change_diagnostics聚合;非 canonical setting 主要保留最终标量指标。
python run_experiments.py --quick
python run_experiments.py --full这些命令仍可用,但真实入口仍然是:
python -m apps.benchmark_runner单次 demo:
python -m apps.ship_runner完整批量报告:
python ship_simulation/run_report.py如果你要跑完整 ship 实验模块,用第二条。
python -m apps.ship_runner
python -c "from ship_simulation.main_demo import run_demo; run_demo('crossing', optimizer_name='kemm', show_animation=False)"
python -c "from ship_simulation.main_demo import run_demo; run_demo('harbor_clutter', optimizer_name='kemm', show_animation=False)"适合:
- 单场景调试
- 只看一条轨迹
- 不生成完整报告
python ship_simulation/run_report.py --quick --scenarios crossing --n-runs 1 --plot-preset paper
python ship_simulation/run_report.py --quick --scenarios crossing harbor_clutter --n-runs 1 --plot-preset paper当前 --quick 的含义:
scenario_profiles.active_profile_name = legacy_uniformrandom_search_samples = 20NSGA-style pop_size = 22NSGA-style generations = 10KEMM pop_size = 28KEMM generations = 12KEMM initial_guess_copies = 4local_horizon = 320execution_horizon = 160max_replans = 8n_runs = 1render_workers = 1
README 只保留这一条完整入口:
python ship_simulation/run_report.py --workers 4默认会跑:
- 场景:
head_on,crossing,overtaking,harbor_clutter - 算法:
kemm,nsga_style,random - 每算法每场景:
3次 - 总 episode 数:
36 - 默认图数:
4 * 19 + 2 = 78
完整模式默认启用两件事:
scenario_profiles.active_profile_name = full_tunedepisode_cache_enabled = True
同时内部执行已经改成三阶段:
- 先把 36 个 episode 全部算完并写入
raw/episode_cache/ - 再并行渲染图表
- 最后写 summary / metadata / inventory
ship episode 缓存目录:
ship_simulation/outputs/report_YYYYMMDD_HHMMSS/raw/episode_cache/
同一输出目录、同一配置再次运行时:
- 会直接复用 episode cache
- 会完整重生成图表
- 会重写 summary / metadata / inventory
metadata 里现在会写:
scenario_solve_profileepisode_compute_secondsfigure_render_secondsepisode_cache_hitsepisode_cache_misses
只跑高密港区:
python ship_simulation/run_report.py --scenarios harbor_clutter --n-runs 3 --plot-preset paper只比较 kemm 和 random:
python ship_simulation/run_report.py --algorithms kemm random --scenarios crossing overtaking追加“同预算、同重规划频率”的严格可比基线:
python ship_simulation/run_report.py --algorithms kemm random nsga_style --strict-comparable完整场景列表显式写出:
python ship_simulation/run_report.py --scenarios head_on crossing overtaking harbor_clutter --n-runs 3 --plot-preset paper--experiment-profile 控制的是滚动重规划过程中的计划变化事件,不是场景预算 profile。
可选值:
baselinedriftshockrecurring_harbor
命令示例:
python ship_simulation/run_report.py --scenarios harbor_clutter --n-runs 3 --experiment-profile drift
python ship_simulation/run_report.py --scenarios harbor_clutter --n-runs 3 --experiment-profile shock
python ship_simulation/run_report.py --scenarios harbor_clutter --n-runs 3 --experiment-profile recurring_harbor含义速记:
baseline:不额外注入计划变化drift:逐步增强环境和交通漂移shock:突发 closure 和更强扰动recurring_harbor:港区漂移后部分回到熟悉模式
ship 现在同时有第二套 profile 体系:DemoConfig.scenario_profiles。
当前口径:
- 完整模式默认:
full_tuned - quick 模式默认:
legacy_uniform
full_tuned 会按场景分别调整:
- 求解预算
- 局部/执行时域
safety_clearance- 风险相关惩罚和
domain_risk_weight objective_weights
当前 CLI 没有单独暴露切换 solve profile 的参数;如果需要做 legacy_uniform 与 full_tuned 的 A/B,对代码入口做小改或在 Python 中调用 build_default_demo_config() 再改 demo.scenario_profiles.active_profile_name。
ship 报告现在默认导出置信区间和显著性检验结果:
raw/statistical_tests.jsonraw/statistical_tests.csvreports/statistical_significance.md
检验规则:
- 样本量足够且通过正态性检查时,使用 Welch t-test
- 否则使用 Mann-Whitney U
运行扰动强度扫描并导出成功率曲线:
python ship_simulation/run_report.py --robustness-sweep --robustness-levels 0,0.25,0.5,0.75,1.0 --robustness-scenarios crossing overtaking harbor_clutter输出文件:
raw/robustness_runs.csvraw/robustness_curve.csvraw/robustness_summary.jsonreports/robustness_sweep.mdfigures/robustness_success_curve.png(启用渲染时)
ship 侧只有 pareto3d 和 spatiotemporal 会额外导出交互文件。
python ship_simulation/run_report.py --quick --scenarios crossing --interactive-figures --interactive-html说明:
*.fig.pickle:matplotlib figure bundle.html:支持浏览器旋转的交互输出- 其他 2D 图仍只导出 PNG
只导出原始结果和 Markdown summary,不渲染图:
python ship_simulation/run_report.py --summary-only切换 preset 和 SciencePlots 风格:
python ship_simulation/run_report.py --plot-preset ieee
python ship_simulation/run_report.py --science-style science,ieee,no-latex导出附录图:
python ship_simulation/run_report.py --appendix-plots如果你想用一条命令同时检查严格可比、统计导出和鲁棒性导出链路:
python ship_simulation/run_report.py --quick --summary-only --scenarios crossing --n-runs 1 --algorithms kemm random --strict-comparable --robustness-sweep --robustness-levels 0,0.5 --robustness-scenarios crossing预期关键输出:
raw/statistical_tests.jsonraw/statistical_tests.csvreports/statistical_significance.mdraw/robustness_runs.csvraw/robustness_curve.csvraw/robustness_summary.jsonreports/robustness_sweep.md
benchmark:
benchmark_outputs/benchmark_YYYYMMDD_HHMMSS/
ship:
ship_simulation/outputs/report_YYYYMMDD_HHMMSS/
两条主线共同的主子目录:
figures/raw/reports/
ship 的 raw/ 还特别值得看:
report_metadata.jsonfigure_manifest.jsonrepresentative_runs.jsonplanning_steps.jsonscenario_catalog.json
完整测试:
python -m unittest discover -s tests -vbenchmark 快速回归:
python -m apps.benchmark_runner --quick --force-rerun
python -m apps.benchmark_runner --quickship 快速回归:
python ship_simulation/run_report.py --quick --scenarios crossing harbor_clutter --n-runs 1