Repository navigation
Maintenance from a part's state: option comparison, renewals, delays, layered visits - #374
Merged
Merged
Conversation
… layered visits Adds NonRepairable.compare_replacement_options, renewal_forecast, delay_effect, cost_of_waiting_for_visit, cost_of_missed_visit and slack_effect, and optimal_layered_visits / layered_cost_rate, in model time. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019Km2eWBiPJ5JNkme3vRg4B
…attribute on its own line Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019Km2eWBiPJ5JNkme3vRg4B
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
All in model time, exact where possible, on
NonRepairableunless stated.compare_replacement_options(age, due_in, every, defer_by=, shuts=, discount_rate=): replace as planned, now, deferred, moved to a shut (own price), or skipped, as present-value costs to the following planned replacement. Extendsskip_next_replacement(agrees with it to 1e-9 for a new part).renewal_forecast(window, every, resets=, age=, since_renewal=): a part renewed at every service and at failure: the chance it fails before each service, expected failures, renewals and cost over a window, against running to failure and the best age replacement (the README's seal numbers reproduce).delay_effect,cost_of_waiting_for_visit(rounding a due time up to the next visit of anOpportunityor list of times),cost_of_missed_visit,slack_effect: the risk and cost of a replacement done late.optimal_layered_visits(light, deep, visit_cost=, max_ratio=)andlayered_cost_rate: the best visit interval and depth ratio of a cheap-every-visit, deeper-every-k-th package (block replacement; one layer without a visit cost is the optimal block interval).Validated against closed forms for exponential lives, seeded simulations of each plan (within four standard errors), and an independent renewal-equation discretisation for the layered optimum. README use cases UC-11 and new UC-14..17 recorded; docs, changelog and API pages updated.
🤖 Generated with Claude Code
https://claude.ai/code/session_019Km2eWBiPJ5JNkme3vRg4B