Package com.anylogic.engine
- java.lang.Object
- com.anylogic.engine.VariableDelay
- All Implemented Interfaces:
Serializable
@AnyLogicInternalCodegenAPI public abstract class VariableDelay extends Object implements Serializable
This class is designed for internal use inside AnyLogic code generation,
it shouldn't be explicitly accessed by users.
VariableDelay object accumulates a history of an expression (of type double or HyperArray and generates delayed values of the expression using the accumulated information. The capacity depends on engine integration step. An object registers itself in continuous engine upon creation and then is updated by the engine.
Is designed for fixed step integration
VariableDelay object accumulates a history of an expression (of type double or HyperArray and generates delayed values of the expression using the accumulated information. The capacity depends on engine integration step. An object registers itself in continuous engine upon creation and then is updated by the engine.
Is designed for fixed step integration
- Author:
- AnyLogic North America, LLC https://anylogic.com
- See Also:
- Serialized Form
Modifier and Type | Class | Description |
---|---|---|
static enum | VariableDelay.Type |
Type of delay object, see description on items
|
Constructor | Description |
---|---|
VariableDelay |
Constructor
|
VariableDelay |
Modifier and Type | Method | Description |
---|---|---|
final HyperArray | getArray() |
Returns delayed arrayed value
This method should be called only for arrayed delays |
abstract double | getDelayTime() |
This method should be overridden
|
double | getInitialValue() |
Returns value of the expression being delayed
This method should be overridden in scalar delays having custom (non-zero) initial value |
void | getInitialValue |
Tags default arrayed sample into
array This method should be overridden in arrayed delays with custom (non-zero) initial value to fill the whole array data |
double | getInput() |
Returns value of the expression being delayed
This method should be overridden in scalar delays |
void | getInput |
Tags arrayed sample into
array This method should be overridden in arrayed delays to fill the whole array data |
double | getMissingValue() |
Returns value to be returned by this object
when delay time increases and when no output
is available at the time
This method should be overridden in scalar delays with variable delay time which have custom 'missing value' |
void | getMissingValue |
Tags arrayed value to be returned by this object
when delay time increases and when no output
is available at the time
This method should be overridden in arrayed delays with variable delay time which have custom 'missing value' to fill the whole array data |
final double | getScalar() |
Returns scalar delayed value
This method should be called only for scalar delays |
final void | storeSample() |
Stores sample if needed
|
public VariableDelay(VariableDelay.Type type, Agent ao)
Constructor
- Parameters:
type
- the type of the delayao
- reference to an agent where the delay is defined
public VariableDelay(VariableDelay.Type type, Agent ao, Dimension... dimensions)
@AnyLogicInternalCodegenAPI public final void storeSample()
Stores sample if needed
- See Also:
-
getInput()
getInput(HyperArray)
@AnyLogicInternalCodegenAPI public double getInput()
Returns value of the expression being delayed
This method should be overridden in scalar delays
This method should be overridden in scalar delays
- Returns:
- scalar sample
@AnyLogicInternalCodegenAPI public double getInitialValue()
Returns value of the expression being delayed
This method should be overridden in scalar delays having custom (non-zero) initial value
This method should be overridden in scalar delays having custom (non-zero) initial value
- Returns:
- scalar sample
@AnyLogicInternalCodegenAPI public double getMissingValue()
Returns value to be returned by this object
when delay time increases and when no output
is available at the time
This method should be overridden in scalar delays with variable delay time which have custom 'missing value'
This method should be overridden in scalar delays with variable delay time which have custom 'missing value'
- Returns:
- scalar sample
@AnyLogicInternalCodegenAPI public void getInput(HyperArray array)
Tags arrayed sample into
This method should be overridden in arrayed delays to fill the whole
array
This method should be overridden in arrayed delays to fill the whole
array
data- Parameters:
array
- an existingHyperArray
(notnull
) which is to be filled
@AnyLogicInternalCodegenAPI public void getInitialValue(HyperArray array)
Tags default arrayed sample into
This method should be overridden in arrayed delays with custom (non-zero) initial value to fill the whole
array
This method should be overridden in arrayed delays with custom (non-zero) initial value to fill the whole
array
data- Parameters:
array
- an existingHyperArray
(notnull
) which is to be filled
@AnyLogicInternalCodegenAPI public void getMissingValue(HyperArray array)
Tags arrayed value to be returned by this object
when delay time increases and when no output
is available at the time
This method should be overridden in arrayed delays with variable delay time which have custom 'missing value' to fill the whole
This method should be overridden in arrayed delays with variable delay time which have custom 'missing value' to fill the whole
array
data- Parameters:
array
- an existingHyperArray
(notnull
) which is to be filled
public abstract double getDelayTime()
This method should be overridden
- Returns:
- delay time
public final double getScalar()
Returns scalar delayed value
This method should be called only for scalar delays
This method should be called only for scalar delays
- Returns:
- the scalar delayed value
public final HyperArray getArray()
Returns delayed arrayed value
This method should be called only for arrayed delays
This method should be called only for arrayed delays
- Returns:
- the delayed arrayed value