Repository navigation
Value a service on dates: no effect by default, or a stated effect - #504
Merged
Merged
Conversation
task_value takes Services(plan, effect=). With no effect the service is an accepted cost, valued exactly at minus its cost's present value. A maintenance.Restoration or a fitted schedule.Condition credits a benefit: the plan's one-node diagram is simulated with the service on its dates and without it on common random numbers, each run priced with the plan's prices by period, and the value comes with its interval. Use case UC-67 in the schedule README. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L6RpnXB87vwhYETeh7ihtA
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.
Summary
schedule.task_valuenow values a service (lubricate, adjust, clean, overhaul) withServices(plan, effect=). Use case UC-67 was written in the schedule README first.maintenance.Restoration: a Kijima I or II factor from 0 (as new at 0 under Kijima II, harmful above 1), a virtual age, or a fitted process;schedule.Condition(life, fresh=, stale=, lasts=): a regression life fitted with a serviced-or-overdue covariate. The service dates become a covariate schedule on the diagram's clock.UnitPlan.diagram, on aCalendarContextthat gives it its duty) is simulated with the service as a no-duration task at the dated times, and again without it, from one seed. The node draws the same random numbers in both runs, as incompare_npv. Each run is priced by_npv_runs.priced_chunkwith the plan's prices, through the money module'sLedger, by calendar period. The service's own cost is the exact amount, the same as in the default case.TaskValuegainsmethod("exact"/"simulated"),value_lower,value_upper,confidence,n_simulationsandseed.task_valuetakesmc_samples=,seed=andconfidence=, with a 90% two-sided interval by default.Type of change
Checklist
test_schedule_services.py, 11 tests):CHANGELOG.mdupdatedNotes for reviewers
Tests run, one process each:
test_schedule_services: 11 passed, all on their first run with seeds fixed beforehand.test_schedule_value,test_schedule_finds,test_help,test_messages, andtest_docs_examplesfor the schedule pages, plus the doctests of_value.pyand_service.py: 73 passed.test_api_docstrings: the new names pass. Its failures for theUnitPlantask classes (missing parameter docs, and the API page) already fail ondev, and this change does not touch them.Generated by Claude Code