Skip to content

Let the redundancy search take start_probability - #512

Merged
derrynknife merged 1 commit into
devfrom
build/allocation-start-probability
Nov 22, 2026
Merged

derrynknife merged 1 commit into
devfrom
build/allocation-start-probability

Conversation

@derrynknife

Copy link
Copy Markdown
Owner

Summary

allocate_redundancy and redundancy_front now take start_probability (a number, or a dict by node) for cold standby. It has the meaning StandbyModel and standby blocks already use: a spare that fails to start is skipped, and the next one is tried. Each cold design is scored as the StandbyModel it fits. So for a design with two or more spares, the reliability the search reports equals the diagram's once the design is applied. Until now the search had only switching_probability, where a failed switch ends the arrangement, and that scores such designs a little lower.

switching_probability works as before. Giving both is refused with a message that says what each means. start_probability works with any number of units required.

Tests

  • New tests in test_redundancy_strategies.py:
    • the search's reliability (and the front's) against the applied diagram, to 1e-12, with 1 and 2 units required and at least two spares;
    • a closed form for skipped spares against a failed switch;
    • validation, including both given at once.
  • Ran test_redundancy_strategies, test_api_consistency, test_allocation_trains, test_ccf_allocations and the module's doctests: all pass. Three test_public_internals failures also fail on dev without this change.

Changelog (Added) and the design guide are updated.

🤖 Generated with Claude Code

https://claude.ai/code/session_01V339RzRHo8RS8Cz3uSbQgP

allocate_redundancy and redundancy_front take start_probability for cold
standby: a spare that fails to start is skipped and the next is tried, as
StandbyModel and standby blocks mean it. The search's reliability for a
design then equals the diagram's once that design is applied. Giving it
with switching_probability is refused.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V339RzRHo8RS8Cz3uSbQgP
@derrynknife
derrynknife merged commit cb97239 into dev Nov 22, 2026
@derrynknife
derrynknife deleted the build/allocation-start-probability branch November 22, 2026 00:22
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