Class: RetireCommand

RetireCommand(value, duration, withReplacement, assumingNew)

Retire command with optional replacement capability. Retire command with value, duration, and withReplacement flag indicating whether retired equipment should be replaced to maintain population.

Constructor

new RetireCommand(value, duration, withReplacement, assumingNew)

Create a new RetireCommand.
Parameters:
Name Type Description
value EngineNumber Retirement rate/amount.
duration YearMatcher | null Duration specification or null for all years.
withReplacement boolean Whether to maintain equipment via replacement.
assumingNew boolean Whether prior equipment is treated as a pseudo-cohort of typical age (the "assuming new" modifier).
Source:

Methods

getAssumingNew() → {boolean}

Get whether this retire command uses the "assuming new" modifier.
Source:
Returns:
True if prior equipment is treated as a pseudo-cohort of typical age.
Type
boolean

getDuration() → {YearMatcher|null}

Get the duration for which this command applies.
Source:
Returns:
The duration specification, or null for all years.
Type
YearMatcher | null

getIsCompatible() → {boolean}

Check if this command is compatible with UI editing.
Source:
Returns:
Retire commands are UI-compatible except when the "assuming new" modifier is set, which the Basic Editor cannot express.
Type
boolean

getTypeName() → {string}

Get the type name of this command.
Source:
Returns:
Always returns "retire".
Type
string

getValue() → {EngineNumber}

Get the value associated with this command.
Source:
Returns:
The retirement rate/amount with units.
Type
EngineNumber

getWithReplacement() → {boolean}

Get whether this retire command uses replacement.
Source:
Returns:
True if retire should maintain equipment via replacement.
Type
boolean