AnyLogic
Expand
Font size
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
Author:
AnyLogic North America, LLC https://anylogic.com
See Also:
Serialized Form

Nested Class Summary

Modifier and TypeClassDescription
static enum VariableDelay.Type
Type of delay object, see description on items

Constructor Summary

ConstructorDescription
VariableDelay(VariableDelay.Type type, Agent ao)
Constructor
VariableDelay(VariableDelay.Type type, Agent ao, Dimension... dimensions) 

Method Summary

Modifier and TypeMethodDescription
final HyperArraygetArray()
Returns delayed arrayed value
This method should be called only for arrayed delays
abstract doublegetDelayTime()
This method should be overridden
doublegetInitialValue()
Returns value of the expression being delayed
This method should be overridden in scalar delays having custom (non-zero) initial value
voidgetInitialValue(HyperArray array)
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
doublegetInput()
Returns value of the expression being delayed
This method should be overridden in scalar delays
voidgetInput(HyperArray array)
Tags arrayed sample into array
This method should be overridden in arrayed delays to fill the whole array data
doublegetMissingValue()
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'
voidgetMissingValue(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 array data
final doublegetScalar()
Returns scalar delayed value
This method should be called only for scalar delays
final voidstoreSample()
Stores sample if needed

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Details

VariableDelay

public VariableDelay(VariableDelay.Type type,
 Agent ao)
Constructor
Parameters:
type - the type of the delay
ao - reference to an agent where the delay is defined

VariableDelay

public VariableDelay(VariableDelay.Type type,
 Agent ao,
 Dimension... dimensions)

Method Details

storeSample

@AnyLogicInternalCodegenAPI
public final void storeSample()
Stores sample if needed
See Also:
getInput()getInput(HyperArray)

getInput

@AnyLogicInternalCodegenAPI
public double getInput()
Returns value of the expression being delayed
This method should be overridden in scalar delays
Returns:
scalar sample

getInitialValue

@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
Returns:
scalar sample

getMissingValue

@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'
Returns:
scalar sample

getInput

@AnyLogicInternalCodegenAPI
public void getInput(HyperArray array)
Tags arrayed sample into array
This method should be overridden in arrayed delays to fill the whole array data
Parameters:
array - an existing HyperArray (not null) which is to be filled

getInitialValue

@AnyLogicInternalCodegenAPI
public void getInitialValue(HyperArray array)
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
Parameters:
array - an existing HyperArray (not null) which is to be filled

getMissingValue

@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 array data
Parameters:
array - an existing HyperArray (not null) which is to be filled

getDelayTime

public abstract double getDelayTime()
This method should be overridden
Returns:
delay time

getScalar

public final double getScalar()
Returns scalar delayed value
This method should be called only for scalar delays
Returns:
the scalar delayed value

getArray

public final HyperArray getArray()
Returns delayed arrayed value
This method should be called only for arrayed delays
Returns:
the delayed arrayed value