Skip to content

The measured value of an affine decision rule

This page reports on one restricted affine decision rule — not general multistage stochastic programming. The rule is u_t = a_t + Σ_j B_tj ŵ_j, evaluated primarily at an in-sample-selected 2-regime lookback (L=2) that this phase's own evidence shows is not the best available lookback in closed loop (a cheaper L=1 rule wins — see Lookback below), of which only the intercept a_0 is ever committed as the applied control action at each replan. It is measured on one study instance (studies/offtake_two_layer, 112 days, nine cumulative-offtake contracts, seed 7). Every number below is stated before any of that is forgotten, and every number links to the tracked artifact it comes from.

Headline

A real, well-powered, positive effect on both plants this repository can simulate: the linear macro surrogate (t = 10.32, p = 3.2×10⁻¹¹, n = 30) and the full nonlinear physics model (t = 15.41, p = 3.19×10⁻²³, n = 65). This is not a null. It is also not the Core Value claim in full — see R10 below.

Correction, 2026-09-08 — the physics arm ran on a plant that could not exchange air

The physics column below, and every physics number on this page, was produced by a greenhouse whose vents never open. The study path resolves its weather through a converter that discards the measured vent, screen and CO₂ record, so roof_opening falls back to a hard 0.0 for the whole season. Measured consequence: the plant sits at 131 ppm CO₂ against 1041 ppm measured in the real Bleiswijk compartment, which was CO₂-enriched, and wiring a single ventilation actuator recovers +139 % of season biomass.

What this does and does not touch. Both arms of the paired comparison run on the same plant, so the difference still measures something — but it measures it in an operating region the real greenhouse never occupies, against contracts sized for a starved plant. Treat the magnitudes as pending re-measurement, and do not read any number here as a statement about greenhouses. The surrogate column is unaffected by this particular defect; it has its own, described in the limitations below.

The question

The project's own planning record framed this repository's two off-take studies — and the external manuscript they were built to test — as sharing an undeclared two-stage approximation: the planner commits an entire remaining control trajectory as a here-and-now decision each time it replans, then discards all but the first day (open-loop feedback control), rather than deciding "one day at a time as a policy" that adapts to information not yet available. Removing that approximation is, per that record, "the one axis on which this repository can say something the manuscript cannot." Before rebuilding anything on that axis, this phase asked the cheaper question first: is going multistage worth anything, on this problem, measurably?

Phases 1 and 2 of this project (see the route not taken below) had already ruled out the harder answer to that question — a full stochastic dual dynamic programming (SDDP) formulation — on convexity grounds, before this phase started. What remained open was whether a restricted multistage formulation, an affine decision rule bolted onto the existing two-stage LP, captured a measurable share of whatever value going multistage has. That is what this page reports.

What was measured

The paired difference adaptive_mpc − stochastic_mpc: the affine-rule closed-loop mode against the existing two-stage closed-loop mode, replanned daily over the same 112-day season, on the same realized weather paths, same seeds, same conditioned weather sampler (use_weather_process=True on both arms). Both modes call the same shared make_mode_plan_remaining builder — affine_rule is the only thing that differs between them.

Surrogate (linear macro plant) Physics (full nonlinear plant)
n (paired paths) 30 65
mean difference +0.6050 +1.0492
standard error 0.05862 0.06806
t 10.32 15.41
p (two-sided) 3.2×10⁻¹¹ 3.19×10⁻²³
95% CI [+0.4851, +0.7249] [+0.9132, +1.1851]
% of that plant's own baseline season margin 6.68% 13.45%

Margin unit on both rows: margin_closed_loop_112d_cumulative_offtake — the closed-loop unit, never mixed with the open-loop numbers referenced below. Full detail: outputs/planning/affine_rule_closed_loop_value.json (r6 block), which reads rather than recomputes outputs/planning/affine_value_surrogate.json and outputs/planning/affine_value_physics.json.

Both results are far from the smallest effect this design could have detected. A prior measurement pass in this phase found the design (n=65, upper standard-deviation bound) cannot reliably resolve differences below about 1.13% of baseline season margin (outputs/planning/affine_value_pilot.json). The surrogate result is ~5.9× that floor; the physics result is ~11.9× it. Neither finding is a marginal detection.

The two plants agree in sign and both clear significance by a wide margin. The physics effect (13.45% of its own baseline) is roughly double the surrogate effect (6.68% of its own baseline). That is flagged as a finding, not smoothed away: the most plausible reading is that the physics plant's effect size and its noise floor scaled up together relative to the linear surrogate (the physics paired standard deviation is ~2.86× the surrogate pilot's, and the physics mean is ~2× the surrogate pilot's mean) — consistent with a nonlinear plant reacting more strongly, in both directions, to the same committed day-1 intercept. That is a plausible explanation, not a proven one; the two plants were not run on a controlled decomposition designed to isolate the cause. The two numbers are never averaged into one pooled statistic.

What it does not license

The L=2 lookback's in-sample selection does not survive closed-loop scrutiny. L=2 is the lookback Phase 4's own review process selected — in-sample, on the open-loop objective — as the gate's recommendation, and it is the lookback the headline numbers above are measured at. This phase built the comparison the Phase 4 selection never received: adaptive(L=2) − adaptive(L=1), paired per path at the calibrated sigma. Result: mean −0.352 (se 0.046, t = −7.62, p = 2.1×10⁻⁸, n = 30) — L=2 loses to L=1. L=1 is both cheaper to solve (a narrower regressor, n_rule=333 against L=2's wider block) and higher-margin on this instance. The pattern across all three lookbacks this project has measured is L=1 > L=2 > L=None. The headline numbers above are still reported at L=2, because that is what this phase's design committed to before the comparison was run — but L=2's advantage should be read as an in-sample-selected upper bound, not an unbiased estimate of what a properly re-selected lookback would achieve.

The physics arm's configuration differs from the study's own shipped defaults on three parameters, not two. Beyond the intended two (n_physics_paths: 24 → 65, power-sized; temperature_season_sigma_c: the study's shipped 2.0 → the calibrated 0.3521728515625), a third had to give: the realized-path draw was widened from the study's own n_realized_paths=60 to 65, because the harness requires n_physics_paths ≤ n_realized_paths and the power-sized n exceeds 60. This was checked, not assumed, to be safe — paths 0–59 are bit-identical between the 60-draw and 65-draw configurations — but it is a real third deviation from the study's shipped configuration, and this page states all three rather than the two originally planned for.

The physics standard-deviation transfer assumption did not hold, though the design was adequately powered anyway. The n=65 physics design was sized using a paired standard deviation measured on the surrogate plant (0.192). The physics standard deviation actually measured at n=65 is 0.549 — about 2.86× larger. Power held up only because the physics effect size scaled up by roughly the same proportion, not because the cross-plant transfer assumption was correct. This is a limit on how the design was justified, not on the result itself — the physics result clears the detectable-effect floor by roughly 12×.

The perfect-foresight comparison raised a genuine puzzle, investigated and resolved to the extent verifiable without touching the physics of src/. A closed-loop perfect-foresight arm (WS_closed, each replan given the true realized future at probability 1) was built alongside the main measurement to give a same-unit value-of-information reference: WS_closed − RP_closed = +0.253 (barely separated from zero, p = 0.038, n = 30). Read naively, gap_fraction_r6_over_evpi_closed = 2.39 — the affine rule's measured gain looks like it exceeds perfect information's own advantage over the same baseline, which should not be possible for a restricted, non-anticipative policy. Checking independently from the raw per-path checkpoints (not the summary artifact's own scalars): the path indices are exactly aligned across both arms (confirmed to <10⁻⁹ at all 30 indices), and on 29 of the 30 individual realized paths, the affine rule's realized margin strictly exceeds the perfect-foresight arm's realized margin on that same path — the sole exception being the one heavy-tailed path where perfect information matters enormously. That per-path pattern is only possible because the perfect-foresight arm, as built, is a receding-horizon re-solve of the same two-stage recourse LP used for the baseline (replanned daily, only the first day committed, state advanced by simulation) rather than a single-shot global optimum computed once — so it is not a genuine upper bound on realized margin. It is a strong but lossy proxy for the true information ceiling. Full working: affine_rule_closed_loop_value.json's headroom.perfect_foresight_investigation block.

The macro surrogate is linear; its yield response has no diminishing returns or saturation, so its numbers should be read as a structural sanity check for the physics result, not a substitute for it — which is exactly why the physics arm exists and why the value claim rests on it.

mode_divergence — confirmation that the two modes commit materially different day-1 actions — is a surrogate-only claim. The physics sweep's multiprocessing layer (mpc_physics_sweep._picklable_outcome) does not carry per-replan setpoints across the process-pool boundary, so this cannot be checked on the physics plant with the current harness.

The calibrated season sigma (0.3521728515625) targets a ~4.7% coefficient of variation on heating degree-days that has no source inside this repository. The dataset held here is 113 days — one partial season — so that figure cannot be verified from the repository's own data; see the Phase 3 record for the full context.

One solver build. Per Phase 4's review, the affine LP's objective is not backend-portable across solvers (cross_solver_objective_spread_observed = 1.9×10⁻⁶ > the reference tolerance). Every number on this page comes from HiGHS 1.15.1 via cvxpy 1.9.2 on one host; no cross-solver check was repeated for Phase 5.

A second physics sigma was considered and declined, on a threshold fixed before this phase's measurements existed. the phase's own context document pre-committed: "The largest cross-sigma difference in the paired mean exceeds 2× the pooled within-cell SE" as the bar for materiality. The measured ratio is 0.786 — the four-sigma surrogate sweep (all reaching a significant positive result independently) shows no material sigma-dependence, so the physics arm was not re-run at the study's own shipped sigma (2.0). This decision is recorded in affine_rule_closed_loop_value.json's second_physics_sigma block, traceable to the threshold that predates the data.

The route not taken, and why

This project's Phases 1 and 2 tested whether a full stochastic dual dynamic programming (SDDP) formulation was viable, before this phase measured what a cheaper approximation was worth. Both answers were negative on convexity, not on the size of the affine gap:

  • Phase 1: the incumbent stage transition's cost-to-go is not jointly concave in (state, control) — outputs/planning/convexity_gate.json.
  • Phase 2: the one reformulation that could have restored joint concavity (dropping cumulative light from the state) makes it structural, but the plant's own measured per-day yield response is non-concave on 19 of 112 measured days — outputs/planning/reformulation_gate.json.

SDDP requires the stage problem convex in (state, control); without it, the backward pass does not produce valid lower-bound cuts. Both routes were closed before this phase began, and the user cut Phases 6–8 (SDDP, an exact validation reference, and the off-take-study re-run) on that evidence on 2026-08-06. This page's headline result does not reopen that decision — it answers the separate question those phases left open: given that SDDP is out, is the affine restriction that remains worth anything? The answer measured here is yes.

R10: the replication rebuild — not delivered

The project's planning record named its Core Value as rebuilding the two off-take studies (and, by extension, the comparison the external manuscript rests on) on a formulation that does not share the manuscript's own undeclared two-stage approximation. That rebuild — R10 — was not attempted in this phase and is not delivered by this page. It was cut alongside Phase 8 on 2026-08-06, when SDDP itself was ruled out and the project's live scope closed at Phase 5.

What this page does establish is a precondition for R10: that the mechanism R10 would rest on — an affine decision rule in place of the two-stage plan — has a measurable, positive, well-powered effect on both plants this repository can simulate. Affine decision rules are themselves a restricted multistage formulation, so R10 remains deliverable on the existing affine planner, with no SDDP required. Concretely, it would take:

  1. Re-running studies/offtake_two_layer and studies/offtake_two_layer_agc end-to-end with the affine rule (adaptive_mpc) in place of the two-stage mode, using the harness this phase already exercised at scale.
  2. Choosing the lookback this phase's own evidence recommends — likely L=1, not the in-sample- selected L=2 this page's headline number uses — rather than inheriting the Phase 4 selection without re-examining it.
  3. Deciding, explicitly, which plant(s) to run on and reporting a compute budget measured on the actual host, not transferred from a different instance — this project's own history includes compute-basis estimates that were later found wrong by 30×, 5.9× and 2.86× when transferred across instances or hosts.
  4. If the per-day yield surrogate (a carried-forward note in the planning record) is adopted in either study, scoring a third arm (two-stage on the per-day form), or the comparison confounds multistage-vs-two-stage with daily-vs-cumulative surrogate.

The honest bottom line

A reader should believe, with real confidence, that a restricted affine decision rule — of which only the intercept is ever applied, reaching its advantage solely through the LP's own valuation of downstream recourse rather than through direct reaction to observed disturbances — produces a measurable, positive improvement over the existing two-stage closed-loop plan, on this study instance, on both a linear surrogate plant and the full nonlinear physics plant, at effect sizes many multiples above what this design could have missed. That is a genuine, not a marginal, result, and Milestone 1 closes on it.

A reader should not believe that this settles what going fully multistage (SDDP or otherwise) is worth in general — this measurement is upper-bounded by an in-sample lookback selection whose own closed-loop advantage this phase found to be smaller than a cheaper alternative, is built on one study instance and one solver build, and does not include the replication rebuild (R10) that the planning record named as this project's Core Value. What closes here is the measurement that R10 would need before it could be undertaken with any confidence that the underlying mechanism is worth the engineering cost — not R10 itself.