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.booleanWhether prior equipment is treated as a pseudo-cohort of typical age.
-
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
-
getAssumingNew
public boolean getAssumingNew()Whether prior equipment is treated as a pseudo-cohort of typical age.- Returns:
- true if the
assuming newmodifier is set
-
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.
-