论文完成

This commit is contained in:
2026-09-13 18:05:59 +08:00
parent 9fb15f53f5
commit 89021eb9f8
234 changed files with 28597 additions and 2164 deletions
+5 -1
View File
@@ -152,10 +152,12 @@ def write_outputs(rows: list[dict], out: Path) -> None:
count = sum(r["cleared_jammer_count"] for r in group)
total = sum(Decimal(r["virtual_time_us"]) / 1_000_000 for r in group)
mean = sum(Decimal(r["virtual_time_us"]) / 1_000_000 / r["cleared_jammer_count"] for r in group) / len(group)
run_total = sum(r["program_run_duration_ms"] for r in group) / 1000
constants.extend([f"\\newcommand{{\\Q{word}Count}}{{{count}}}",
f"\\newcommand{{\\Q{word}Total}}{{{fixed(total, 6)}}}",
f"\\newcommand{{\\Q{word}Weighted}}{{{fixed(total/count)}}}",
f"\\newcommand{{\\Q{word}Mean}}{{{fixed(mean)}}}"])
f"\\newcommand{{\\Q{word}Mean}}{{{fixed(mean)}}}",
f"\\newcommand{{\\Q{word}ProgramTotal}}{{{fixed(Decimal(run_total))}}}"])
shares = [Decimal(r["derived"]["movement_share_percent"]) for r in rows]
runtimes = [Decimal(r["program_run_duration_ms"]) / 1000 for r in rows]
constants.extend([
@@ -164,6 +166,8 @@ def write_outputs(rows: list[dict], out: Path) -> None:
f"\\newcommand{{\\FormalMovementMax}}{{{fixed(max(shares), 2)}}}",
f"\\newcommand{{\\FormalRunMin}}{{{fixed(min(runtimes))}}}",
f"\\newcommand{{\\FormalRunMax}}{{{fixed(max(runtimes))}}}",
f"\\newcommand{{\\FormalVirtualTotal}}"
f"{{{fixed(sum(Decimal(r['virtual_time_us']) / 1_000_000 for r in rows), 6)}}}",
])
(out / "formal-macros.tex").write_text("\n".join(constants) + "\n", "utf-8")
audit = ["# 正式测试数据核对", "", f"本次汇总 `Jammers-simulator-full/test` 中的 {len(rows)} 份正式导出包。",