Class RetireWeibullOperation
- All Implemented Interfaces:
Operation
Each year the operation computes a unit count from the Weibull survival curve
and the recorded sales history (the cohort size at age a is the
newEquipment stream from a years ago), then retires that count
through the existing units-based retirement path. This composes with the existing
engine retirement machinery rather than duplicating it.
-
Constructor Summary
ConstructorsConstructorDescriptionRetireWeibullOperation(BigDecimal meanYears, boolean assumingNew, boolean withReplacement) Create a Weibull retire operation that applies to all years.RetireWeibullOperation(BigDecimal meanYears, boolean assumingNew, boolean withReplacement, ParsedDuring during) Create a Weibull retire operation that applies to a specific time period. -
Method Summary
Modifier and TypeMethodDescriptionvoidexecute(PushDownMachine machine) Execute the Weibull retire operation on the given push-down machine.Get a record describing this operation's semantics.
-
Constructor Details
-
RetireWeibullOperation
Create a Weibull retire operation that applies to all years.- Parameters:
meanYears- The mean equipment lifetime in years.assumingNew- Whether prior equipment should be treated as a pseudo-cohort of typical age (theassuming newmodifier).withReplacement- Whether retired equipment should be replaced to maintain population.
-
RetireWeibullOperation
public RetireWeibullOperation(BigDecimal meanYears, boolean assumingNew, boolean withReplacement, ParsedDuring during) Create a Weibull retire operation that applies to a specific time period.- Parameters:
meanYears- The mean equipment lifetime in years.assumingNew- Whether prior equipment should be treated as a pseudo-cohort of typical age (theassuming newmodifier).withReplacement- Whether retired equipment should be replaced to maintain population.during- The time period during which this operation applies.
-
-
Method Details
-
execute
Execute the Weibull retire operation on the given push-down machine.Builds a year matcher from the optional during clause, skips execution if the current year is out of range, computes the unit count from the survival history, and delegates the actual retirement to the existing units-based retirement path. With
with replacement, measures the equipment population before and after retirement and increases sales by the actual reduction to maintain population, mirroringRetireWithReplacementOperation. -
getStaticSemantics
Get a record describing this operation's semantics.Get a record describing this operation's semantics that are inferrable from its static expression in code. In other words, properties and effects which do not require inspection at time of executing the operation.
- Specified by:
getStaticSemanticsin interfaceOperation- Returns:
- Inference of common static properties found for this operation.
-