Skip to content

做什么(One-liner)

库级 primitive:scipy solve_ivp(RK45)求解 Pangura 4D 反身性 ODE (利率 / 投资 / 通胀 / 信心)。不在 Canvas picker;供上层 reflexivity 节点作为基础算法层。

怎么用

非 Canvas UI。调用方式:

  • Python 直调:from services.reflexivity import solve_4d_ode
  • REST 端点:POST /reflexivity/simulate
  • 被动上游:reflexivity_agent_simulate 内部 step_agent 用 _rk4_step(与本 operator 的 solve_ivp 不同,单步 RK4)

核心公式

见 frontmatter。4 个 ODE 耦合方程:

  • dx/dt = z + (y − a)x + m1·w
  • dy/dt = 1 − b·y − x² + m2·w
  • dz/dt = −x − c·z + m3·w
  • dw/dt = −x·y·z + m4·w

假设与适用场景

假设:scipy ≥ 1.10 + ODE 非刚性 + 参数物理合理。

适用:上层 reflexivity 节点的基础算法层、paper reproduction、教学。

不适用:Canvas 终端用户、刚性 ODE、自定义方程。

已知局限

详见 frontmatter limitations。关键 6 点:库级 primitive / 公式硬编码 / RK45 非 stiff 最优 / scipy 版本漂移(<1e-7)/ n_points 非精度 / error 字段 contract。

参考文献

  • Soros (1987) Alchemy of Finance — 反身性
  • Pangura Research Note 2026-03(pending)— 4D ODE 规范

Golden Test

tests/golden/fixtures/tier4/reflexivity_4d_ode/captured_snapshot(pinned scipy),1e-6 tolerance。10 tests

5 Scenarios

  • default_stable_short / default_stable_medium / high_coupling_divergent / damped_fast / negative_w_start

5 Contract tests

  • result_structure / t_monotonic / determinism / y0_initial_condition / params_echoed

Changelog

  • 1.0.0 (2026-04-21) — 首次 Active(Tier 4 batch 2.3)

Verifiable intelligence for the decisions that demand scrutiny.