Class: LimitCommand

LimitCommand(typeName, target, value, duration, displacing, displacingType)

Limit command with displacement capability.

Constructor

new LimitCommand(typeName, target, value, duration, displacing, displacingType)

Create a new LimitCommand.
Parameters:
Name Type Description
typeName string Type of limit (cap/floor).
target string Target of the limit.
value EngineNumber Limit value.
duration YearMatcher Duration of limit.
displacing string Substance/stream being displaced.
displacingType string Type of displacement ("", "by volume", "by units").
Source:

Methods

getDisplacing() → {string|null}

Get the substance being displaced by this limit.
Source:
Returns:
Name of substance being displaced, or null if none.
Type
string | null

getDisplacingType() → {string}

Get the type of displacement.
Source:
Returns:
The displacement type ("", "by volume", "by units").
Type
string

getDuration() → {YearMatcher}

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

getIsCompatible() → {boolean}

Check if this limit command is compatible with UI editing.
Source:
Returns:
Always returns true as limit commands are UI-compatible.
Type
boolean

getTarget() → {string}

Get the target of this limit command.
Source:
Returns:
The target name (e.g. "domestic", "import", etc).
Type
string

getTypeName() → {string}

Get the type name of this limit command.
Source:
Returns:
The command type ("cap" or "floor").
Type
string

getValue() → {EngineNumber}

Get the value associated with this limit.
Source:
Returns:
The limit value with units.
Type
EngineNumber