Interface IControlFunc

All Known Implementing Classes:
ControlFuncDoNothing, ControlFuncMoveDir, ControlFuncMoveTowards, ControlFuncRotateAbout, ControlFuncRotateAboutByTheta

public interface IControlFunc

Interface for control functions. These functions change at discrete time events corresponding to communication rounds, but do not persist beyond that, influence the next control func, or feed back into the next communication round.

Since:
1.0

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).
 

Method Detail

makeCopy

IControlFunc makeCopy()
clones this object (similar to "clone" supported by IClonable interface).


getDerivs

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

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

boolean directionConstantQ(double lfCurrTime,
                           double[] arrLfStateSrc,
                           ISensor sensors,
                           IEnvironment env,
                           ILogicVarBundle logicVars,
                           int nIdxOffsetState)

getNumStateVars

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

Returns:
dimensionality of the state vector corresponding to one agent