AnyLogic AnyLogic
Expand
Font size
  • java.lang.Object
    • com.anylogic.engine.VariableDelay
All Implemented Interfaces:
java.io.Serializable

@AnyLogicInternalCodegenAPI
public abstract class VariableDelay
extends java.lang.Object
implements java.io.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

Nested Classes 
static class  VariableDelay.Type
Type of delay object, see description on items
Modifier and Type Class Description

Constructor Summary

Constructors 
VariableDelay​(VariableDelay.Type type, Agent ao)
Constructor
VariableDelay​(VariableDelay.Type type, Agent ao, Dimension... dimensions)  
Constructor Description

Method Summary

All Methods Instance Methods Abstract Methods Concrete Methods 
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​(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
double getInput()
Returns value of the expression being delayed
This method should be overridden in scalar delays
void getInput​(HyperArray array)
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​(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
double getScalar()
Returns scalar delayed value
This method should be called only for scalar delays
void storeSample()
Stores sample if needed
Modifier and Type Method Description

Methods inherited from class java.lang.Object

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

Constructor Detail

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 Detail

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
How can we improve this article?