Repository navigation
Expected net present value and equivalent annual cost on the exact curves - #378
Merged
Merged
Conversation
…sent value of an age replacement RepairableRBD.expected_npv: exact discounted cost and value, equivalent annual cost and a cash-flow table. NonRepairable.age_replacement_value: Fox's discounted age replacement. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019Km2eWBiPJ5JNkme3vRg4B
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019Km2eWBiPJ5JNkme3vRg4B
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.
What
The first part of a net present value valuation, in model time, exact (no simulation):
RepairableRBD.expected_npv(horizon, *, discount_rate=0.0, value_rate=0.0, periods=None, working_nodes=None, broken_nodes=None, method="p", state=None)returningExpectedNPV: the net present value, its value and cost, the equivalent annual cost (eac, annuity form, tending toexpected_cost_rateover a long horizon), the undiscounted totals, the cost by category and component, and a cash-flow table by period, category and component (present value and undiscounted, signed, adding up tonpv).expected_cost(discount_rate=)'s, so scheduled events are discounted at their exact times; the value isvalue_ratetimes the integral ofexp(-r t) A(t)(the mission-availability quadrature gained arate, with the settled level and period summed in closed form). Works from new or fromstate=.NonRepairable.age_replacement_value(age, *, discount_rate=0.0)returningAgeReplacementValue: Fox's (1966) present value and equivalent annual cost of an age replacement over for ever; undiscounted it iscost_rate.analysis_routes(), the capability matrix, the costs guide (a "Net present value" section), the maintenance use-case record (UC-19) and the CHANGELOG are updated.Checks
test_expected_npv.py(closed forms: exponential availability discounted; repair cost as price x failure rate x discounted time up; block replacements at exact times; age replacement against Fox integrated independently; cost rate as the rate goes to 0; the table adding up; input checks). Run locally with the routes, docstring, docs-example, help, result-object and README-capability tests; not the full suite.Not in this part
Value that varies in time and escalation, plans of actions at given times, the simulated distribution, crews as cash flows, NPV as an optimiser objective, and an infinite horizon.
🤖 Generated with Claude Code
https://claude.ai/code/session_019Km2eWBiPJ5JNkme3vRg4B