Class ControlFuncDoNothing

java.lang.Object
  extended by ControlFuncDoNothing
All Implemented Interfaces:
IControlFunc

public class ControlFuncDoNothing
extends java.lang.Object
implements IControlFunc

Control function for agents which don't move. Specifies dimensionality.

Since:
1.0

Nested Class Summary
 class ControlFuncDoNothing.DimensionNotSet
          Indicates that box boundaries were set with mismatched dimensionality.
 
Constructor Summary
protected ControlFuncDoNothing()
           
  ControlFuncDoNothing(ControlFuncDoNothing src)
           
  ControlFuncDoNothing(int nDim)
           
 
Method Summary
 boolean directionConstantQ(double lfCurrTime, double[] arrLfStateSrc, ISensor sensors, IEnvironment env, ILogicVarBundle logicVars, int nIdxOffsetState)
           
 void getDerivs(double lfCurrTime, double[] arrLfStateSrc, ISensor sensors, IEnvironment env, ILogicVarBundle logicVars, double[] arrLfDerivDst, int nIdxOffsetState)
           Updates arrLfDerivDst with the instantaneous derivatives of the continuous-time component of the agent's state given its current state and sensor readings.
 int getNumStateVars()
          returns dimensionality of the state vector corresponding to one agent
 IControlFunc makeCopy()
          clones this object (similar to "clone" supported by IClonable interface).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ControlFuncDoNothing

protected ControlFuncDoNothing()

ControlFuncDoNothing

public ControlFuncDoNothing(int nDim)
Parameters:
nDim - dimensionality agent lives in

ControlFuncDoNothing

public ControlFuncDoNothing(ControlFuncDoNothing src)
Method Detail

makeCopy

public IControlFunc makeCopy()
clones this object (similar to "clone" supported by IClonable interface). in this case, just returns a copy of self,

Specified by:
makeCopy in interface IControlFunc

getDerivs

public void getDerivs(double lfCurrTime,
                      double[] arrLfStateSrc,
                      ISensor sensors,
                      IEnvironment env,
                      ILogicVarBundle logicVars,
                      double[] arrLfDerivDst,
                      int nIdxOffsetState)

Updates arrLfDerivDst with the instantaneous derivatives of the continuous-time component of the agent's state given its current state and sensor readings. In the case of this control function, the derivative is set to zero, and the states and sensors are ignored.

Specified by:
getDerivs in interface IControlFunc
Parameters:
lfCurrTime - current time (for time-varying systems)
arrLfStateSrc - vector of global state of the system
sensors - sensors
env - environment
logicVars - discrete components of agent internal state
arrLfDerivDst - Destination for storing derivative values.
nIdxOffsetState - Offset index into the global state vector corresponding to the beginning of the parameters for this agent.
Since:
1.0

directionConstantQ

public boolean directionConstantQ(double lfCurrTime,
                                  double[] arrLfStateSrc,
                                  ISensor sensors,
                                  IEnvironment env,
                                  ILogicVarBundle logicVars,
                                  int nIdxOffsetState)
Specified by:
directionConstantQ in interface IControlFunc

getNumStateVars

public int getNumStateVars()
returns dimensionality of the state vector corresponding to one agent

Specified by:
getNumStateVars in interface IControlFunc
Returns:
dimensionality of the state vector corresponding to one agent