Skip to content

RepairableRBD: expected work and cost in each of a run of windows - #375

Merged
derrynknife merged 2 commits into
devfrom
feat/window-forecasts
Nov 3, 2026
Merged

derrynknife merged 2 commits into
devfrom
feat/window-forecasts

Conversation

@derrynknife

Copy link
Copy Markdown
Owner

Adds two methods answering a planner's budget questions window by window, from the system's state now:

  • expected_events_by_window(ends=None, *, width=None, count=None, state=None, ...) returns EventsByWindow: each window's own expected counts (not running totals), exact, by component and for the system. Uneven windows are fine.
  • cost_by_window(ends=None, *, width=None, count=None, state=None, mc_samples=None, seed=None, engine='auto', levels=(10, 50, 90), ...) returns CostByWindow: each window's exact mean (differenced expected_cost) and its spread from one seeded set of histories cut at every window's end, so all windows are of the same histories. Also percentile(q), total_percentile(q), probability_above(budget) and outcomes(window) (each distinct cost and its share, since costs come in steps).

Checked: windows add to expected_events/expected_cost over the span; the pump/valve/sensor year reproduces the hand-worked table; a never-failing bearing costs exactly one price per shut; simulated means within 4 standard errors (seeded); the windows' simulated costs add exactly to one run to the end; no window cost is negative. Routes, capability matrix, guide, README use cases and changelog updated.

🤖 Generated with Claude Code

https://claude.ai/code/session_019Km2eWBiPJ5JNkme3vRg4B

derrynknife and others added 2 commits November 3, 2026 18:52
Keep both sides of the __init__ exports; split grouped docstring
parameters so the API docstring test passes.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019Km2eWBiPJ5JNkme3vRg4B
@derrynknife
derrynknife merged commit b211c35 into dev Nov 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant