Files
SystemSimulationApp/tests/manual/local_probe_experiment.md
T
ljz 7611f13208 修复循环信号与事件采样并接入 LSTP 接触定位,补充八路验证及复用实验
相较上一版 Jacobian 确定性复用更新,本次补齐事件边界一致性、结果两侧采样及接触事件定位;保留已有物性复用和组件力学公式。

- 统一 UD00 信号求值与下一事件查询的绝对时间边界,修复循环边界浮点舍入导致的阶段错位、重复或漏报,并覆盖零时长、多阶段及长周期场景。
- 引入原生输出语义 v2:保留规则网格真实时间,补充内部时间事件和状态事件的左邻及事件后采样,按保存时间、状态和离散模式重放结果。
- 两条代码生成路径均发出 LSTP 接触描述,默认定位间隙过零及非负力模式的力截断;仅在接受事件时更新防重复记录,增加 contactEvents 诊断计数。
- 补充 MASS/LSTP 独立事件实验、八路全曲线与驱动阶段配对评估,以及 Amesim 不连续点输出对照和力差定位报告;MASS 新增释放机制仍保留为独立实验。
- 保存局部 probe、context 访问与回退、shadow replay、R288 real skip/typed replay 及阀门数值尾部诊断工具和报告;未证明净收益的实验不启用为生产默认优化。
- 更新原生运行说明和元件建模规范,补充信号边界、输出语义、接触事件和实验依赖回归测试。

验证:五组专项回归共 34 项全部通过;37 个待提交 Python 文件语法检查通过;git diff --cached --check 通过。
2026-09-17 23:50:13 +08:00

41 lines
3.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
**局部 Jacobian probe 实验的运行说明**
这是独立 Windows native worker 实验,不改变生产默认求解路径。输入默认为八路模型 `tests/data/test-mql-8-corrected.json`。生成源码、可执行文件、计数、二进制结果及报告保存在 `test/local-probe-20260917/`。
先构建验证版本,再按 group 26 → group 18–26 → 全部 group 验证;发现任意 dy/w 差异时程序立即终止。
```powershell
& .venv-win/Scripts/python.exe -B tests/manual/local_probe_experiment.py prepare --audit
& .venv-win/Scripts/python.exe -B tests/manual/local_probe_experiment.py run --audit --label reference-audit --mask 0
& .venv-win/Scripts/python.exe -B tests/manual/local_probe_experiment.py run --audit --label group26-final-audit --mask 0x4000000
& .venv-win/Scripts/python.exe -B tests/manual/local_probe_experiment.py run --audit --label small-final-audit --mask 0x7fc0000
& .venv-win/Scripts/python.exe -B tests/manual/local_probe_experiment.py run --audit --label all-audit --mask 0x7ffffff
& .venv-win/Scripts/python.exe -B tests/manual/local_probe_experiment.py guard
& .venv-win/Scripts/python.exe -B -m unittest tests.test_local_probe_experiment
```
再构建不含影子计算、矩阵落盘和内核入口计数的性能版本。先预热,然后交替运行五对;测量期间不要并行编译或启动其他仿真。
```powershell
& .venv-win/Scripts/python.exe -B tests/manual/local_probe_experiment.py prepare
& .venv-win/Scripts/python.exe -B tests/manual/local_probe_experiment.py run --label reference-warmup --mask 0
& .venv-win/Scripts/python.exe -B tests/manual/local_probe_experiment.py run --label all-warmup --mask 0x7ffffff
for ($probePair = 0; $probePair -lt 5; $probePair++) {
if ($probePair % 2 -eq 0) {
& .venv-win/Scripts/python.exe -B tests/manual/local_probe_experiment.py run --label "reference-run-$probePair" --mask 0
& .venv-win/Scripts/python.exe -B tests/manual/local_probe_experiment.py run --label "all-run-$probePair" --mask 0x7ffffff
} else {
& .venv-win/Scripts/python.exe -B tests/manual/local_probe_experiment.py run --label "all-run-$probePair" --mask 0x7ffffff
& .venv-win/Scripts/python.exe -B tests/manual/local_probe_experiment.py run --label "reference-run-$probePair" --mask 0
}
}
& .venv-win/Scripts/python.exe -B tests/manual/local_probe_experiment.py cold
& .venv-win/Scripts/python.exe -B tests/manual/compare_local_probe.py
```
重复使用相同 label 会覆盖该实验目录下的同名运行证据。比较器针对默认八路、0–10 s 的验收集,其他模型或终止时间应使用独立输出目录和对应验收配置,不能混入当前比较集。
`plan.json` 保存每组扰动状态、保守依赖范围、执行区间、上下文检查点及操作输入输出;`comparison.json` 包含逐组实际执行/跳过计数、所有矩阵比对结果和全部计时样本;`report.md` 为中文分析。
实验限制:只接受已有 canonical Jacobian reuse 且无循环调度块的生成模型;支持最多63组。property context 和 pipe cache 采用逐位保护,时间或组外状态变化会失效。运行期对象属于独立单次 worker,不能直接将该代码嵌入同进程并行求解。audit额外计算不进入求解器nfev,单独计入auditComparisons;性能测量必须使用未开启audit的worker。