com.xj.anylogic.engine
Class VariableDelay

java.lang.Object
  extended by com.xj.anylogic.engine.VariableDelay
All Implemented Interfaces:
java.io.Serializable

public abstract class VariableDelay
extends java.lang.Object
implements java.io.Serializable

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:
XJ Technologies Company Ltd. www.anylogic.com
See Also:
Serialized Form

Nested Class Summary
static class VariableDelay.Type
          Type of delay object, see description on items
 
Constructor Summary
VariableDelay(VariableDelay.Type type, ActiveObject ao)
          Constructor
VariableDelay(VariableDelay.Type type, ActiveObject ao, Dimension... dimensions)
           
 
Method Summary
 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
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VariableDelay

public VariableDelay(VariableDelay.Type type,
                     ActiveObject ao)
Constructor

Parameters:
type - the type of the delay
ao - reference to an active object where the delay is defined

VariableDelay

public VariableDelay(VariableDelay.Type type,
                     ActiveObject ao,
                     Dimension... dimensions)
Method Detail

storeSample

public final void storeSample()
Stores sample if needed

See Also:
getInput(), getInput(HyperArray)

getInput

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

Returns:
scalar sample

getInitialValue

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

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

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

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

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


Copyright © 1991-2008 XJ Technlogies. All Rights Reserved.