3coding-visual

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

编程实现、结果验证与数据图

Programming Implementation, Result Validation, and Data Figures

本阶段承接
reports/ANALYSIS_MODELING_REPORT.md
和
reports/MODEL_SELECTION_REPORT.md
。若 CUMCM 2026 的 H2 未明确通过,停止并返回
2analysis-modeling
,不得自行选定核心模型。
按需读取
../_references/math_modeling_norms.md
的“题型防错速查”“代码实现与结果”“编码阶段常见错误”和“图表与可视化”。
This phase follows
reports/ANALYSIS_MODELING_REPORT.md
and
reports/MODEL_SELECTION_REPORT.md
. If H2 for CUMCM 2026 has not been explicitly approved, stop and return to
2analysis-modeling
; do not select a core model on your own.
As needed, read the “Question-Type Error-Prevention Quick Reference,” “Code Implementation and Results,” “Common Coding Errors,” and “Charts and Visualization” sections of
../_references/math_modeling_norms.md
.

产物与边界

Outputs and Scope

负责:可运行源码、环境清单、实验输出、结果记录、约束检查、baseline、灵敏度分析和数据驱动图表。不负责流程图、架构图或论文正文。
至少创建:
text
code/
├── run_all.py
├── problem1.py
├── ...
├── utils.py
├── requirements.txt            # 或 environment.yml
└── outputs/
    ├── preprocessing_summary.json
    ├── model_parameters.json
    ├── constraint_check.json
    ├── sensitivity.csv
    ├── figure_data/
    └── logs/
results/
├── final_results.json
└── constraint_check.json
reports/RESULTS_REPORT.md
figures/*.pdf
按实际题目删减不适用的中间文件,但
run_all.py
、环境清单、
final_results.json
、约束/有效性检查记录和
RESULTS_REPORT.md
是 CUMCM 模式的必需产物。
Responsible for: runnable source code, environment manifest, experiment outputs, result records, constraint checks, baseline, sensitivity analysis, and data-driven figures. Not responsible for flowcharts, architecture diagrams, or the paper body.
At least create:
text
code/
├── run_all.py
├── problem1.py
├── ...
├── utils.py
├── requirements.txt            # 或 environment.yml
└── outputs/
    ├── preprocessing_summary.json
    ├── model_parameters.json
    ├── constraint_check.json
    ├── sensitivity.csv
    ├── figure_data/
    └── logs/
results/
├── final_results.json
└── constraint_check.json
reports/RESULTS_REPORT.md
figures/*.pdf
Remove inapplicable intermediate files as appropriate for the actual problem, but
run_all.py
, the environment manifest,
final_results.json
, constraint/validity check records, and
RESULTS_REPORT.md
are required outputs in CUMCM mode.

1. 建立统一复现入口

1. Establish a Unified Reproducibility Entry Point

code/run_all.py
应从原始输入开始,按依赖顺序执行预处理、各子问题、baseline、验证、灵敏度分析、结果表和图表生成。不得依赖 IDE 中的隐藏状态、手工修改中间文件或未记录的交互操作。
环境清单只列实际使用依赖并记录 Python 版本。随机过程固定种子;需要稳定性结论时使用多次独立运行并记录分布。相对路径以项目根或脚本位置明确解析,避免只在作者机器上运行。
code/run_all.py
should start from the raw inputs and execute preprocessing, each subproblem, baseline, validation, sensitivity analysis, result tables, and figure generation in dependency order. It must not rely on hidden IDE state, manually modified intermediate files, or undocumented interactive operations.
The environment manifest must list only dependencies actually used and record the Python version. Fix seeds for stochastic processes; when stability conclusions are needed, use multiple independent runs and record the distributions. Resolve relative paths explicitly from the project root or script location so that the workflow does not run only on the author’s machine.

2. 逐问实现并持续运行

2. Implement and Run Each Subproblem Iteratively

每个子问题按“读取数据 → 实现 → 小样本测试 → 主运行 → 独立验证 → 保存结果”的顺序推进。若实现与 H2 确认方案不同,先在报告中解释原因和影响,并在 CUMCM 模式请求队员确认实质变更。
优化问题先构造可行解再优化;预测问题使用正确的训练/验证边界;评价问题记录指标方向、标准化和权重来源;仿真问题检查单位、边界条件和收敛性。
For each subproblem, proceed in this order: read data → implement → small-sample test → main run → independent validation → save results. If the implementation differs from the H2-approved approach, first explain the reasons and impact in the report, and, in CUMCM mode, request team confirmation of substantive changes.
For optimization problems, construct a feasible solution before optimization; for prediction problems, use correct training/validation boundaries; for evaluation problems, record metric direction, normalization, and the source of weights; for simulation problems, check units, boundary conditions, and convergence.

3. Baseline 与快速对照

3. Baseline and Rapid Comparison

为核心结论实现与任务匹配的简单 baseline 或小规模精确对照,例如:
  • 预测:naive、线性或经典时序基线对比复杂模型;
  • 优化:贪心或小规模精确解对比启发式/高级求解;
  • 评价:简单权重对比组合权重。
比较必须使用相同数据划分、约束和评价口径。若 baseline 不适用,记录具体原因,不得只写“主模型更高级”。
For each core conclusion, implement a task-appropriate simple baseline or small-scale exact reference solution, for example:
  • Prediction: compare naive, linear, or classical time-series baselines with the complex model;
  • Optimization: compare greedy or small-scale exact solutions with a heuristic/advanced solver;
  • Evaluation: compare simple weighting with composite weighting.
Comparisons must use the same data splits, constraints, and evaluation criteria. If a baseline is not applicable, document the specific reason; do not merely state that the main model is more advanced.

4. 独立验证结果

4. Independently Validate Results

求解器
success
不等于模型解有效。用独立于目标求解的检查逻辑逐条回代:
  • 变量上下界、整数/0-1 条件;
  • 每条约束、容量、时间窗、守恒与单位;
  • 物理边界、空值/极端输入;
  • 结果数量级和子问题间递进关系;
  • 论文将引用的关键指标。
将约束值、允许边界、松弛量和通过状态写入
results/constraint_check.json
;验证逻辑本身不得复用可能出错的同一表达式而失去独立性。失败的约束必须阻止结果被标为最终结果。
results/final_results.json
作为论文数值的单一汇总来源,记录口径、单位和精度;图表数据保存到
code/outputs/figure_data/
。
RESULTS_REPORT.md
说明运行环境、数据处理、各问结果、baseline、验证、灵敏度、与建模报告的一致性及完整运行命令。
A solver’s
success
does not mean that the model solution is valid. Use validation logic independent of the objective solver to plug back and check each item:
  • variable upper and lower bounds, integer/0–1 conditions;
  • every constraint, capacity, time window, conservation relation, and unit;
  • physical bounds, null/extreme inputs;
  • orders of magnitude of results and progression relationships between subproblems;
  • key metrics that will be cited in the paper.
Write constraint values, permitted bounds, slack, and pass status to
results/constraint_check.json
. The validation logic itself must not reuse the same potentially erroneous expression in a way that compromises independence. Failed constraints must prevent results from being marked final.
results/final_results.json
serves as the single source of truth for numerical values in the paper and records their definitions, units, and precision; chart data is saved to
code/outputs/figure_data/
.
RESULTS_REPORT.md
documents the runtime environment, data processing, results for each question, baseline, validation, sensitivity, consistency with the modeling reports, and the complete execution command.

5. 生成数据驱动图表

5. Generate Data-Driven Figures

根据实际论证需要生成矢量 PDF 到
figures/
。预测可用真实/预测对比和误差分布,优化可用收敛、资源利用与方案对比,评价可用排名、热力图和敏感性图。每张图必须来自保存的数据并在
RESULTS_REPORT.md
中引用。
图内不写大标题;文字、坐标轴和图例与论文语言一致;保证灰度可辨。不要生成流程图、架构图或为凑数量画图。
Generate vector PDF figures in
figures/
as needed to support the actual analysis. For prediction, use actual-vs-predicted comparisons and error distributions; for optimization, use convergence, resource utilization, and solution comparisons; for evaluation, use rankings, heatmaps, and sensitivity plots. Every figure must be generated from saved data and referenced in
RESULTS_REPORT.md
.
Do not place large titles inside figures; text, axes, and legends must use the same language as the paper; ensure that figures remain distinguishable in grayscale. Do not generate flowcharts, architecture diagrams, or charts merely to increase the number of figures.

6. CUMCM H3:核心结果核验

6. CUMCM H3: Core Result Review

CUMCM 2026 模式下,完成可复现运行和独立验证后,在
compliance/HUMAN_REVIEW_LOG.md
写:
text
STATUS: WAITING_FOR_HUMAN_RESULT_REVIEW
向参赛队提供最少但充分的核验材料:完整运行命令、关键结果与单位、baseline 对比、约束检查、边界情况、灵敏度结果和核心图表。只有队员明确复跑或核验并说明修改后,才记录
STATUS: HUMAN_APPROVED
。Agent 不得代勾核验项;未通过 H3 不得把结果交给论文阶段作为最终结论。
In CUMCM 2026 mode, after completing a reproducible run and independent validation, write the following to
compliance/HUMAN_REVIEW_LOG.md
:
text
STATUS: WAITING_FOR_HUMAN_RESULT_REVIEW
Provide the competition team with the minimum sufficient materials for review: the complete execution command, key results and units, baseline comparison, constraint checks, edge cases, sensitivity results, and core figures. Only after team members have explicitly rerun or verified the results and explained any modifications may
STATUS: HUMAN_APPROVED
be recorded. The Agent must not check review items on the team’s behalf; if H3 is not approved, the results must not be handed to the paper stage as final conclusions.

AI 使用留痕

AI Usage Audit Trail

CUMCM 2026 模式下,按重要编码任务向
compliance/AI_USAGE_LOG.md
追加:工具名称及版本/模型、使用阶段、用途、主要提示方式、AI 产出、采用/未采用内容、人工修改和核验。语言润色以外的代码与分析必须记录人工检查;未知信息不得猜测。
In CUMCM 2026 mode, append an entry to
compliance/AI_USAGE_LOG.md
for each significant coding task, recording the tool name and version/model, workflow stage, purpose, main prompting approach, AI output, adopted/not adopted content, human modifications, and verification. All code and analysis other than language polishing must undergo a recorded human review; unknown information must not be guessed.

完成标准

Completion Criteria

  • run_all.py
    可从干净输入复现核心结果和图表。
  • 主模型相对 baseline 的收益有证据,或无 baseline 的理由充分。
  • 关键结果逐条通过独立约束/有效性检查。
  • 报告、JSON、表格和图表采用同一数值口径。
  • CUMCM 模式下 H3 有真实队员确认;否则保持等待状态。
  • run_all.py
    can reproduce the core results and figures from clean inputs.
  • The main model’s improvement over the baseline is evidence-based, or there is a sufficient reason for having no baseline.
  • Every key result passes independent constraint/validity checks item by item.
  • The report, JSON, tables, and figures use the same numerical conventions.
  • In CUMCM mode, H3 has genuine confirmation from the team; otherwise, it remains in the waiting state.