Class TreeDepthAgentDefault

java.lang.Object
  extended by TreeDepthAgentDefault
All Implemented Interfaces:
IAgent, ITreeDepAlg
Direct Known Subclasses:
TreeDepthAgentCycle

public class TreeDepthAgentDefault
extends java.lang.Object
implements ITreeDepAlg


Constructor Summary
TreeDepthAgentDefault()
           
 
Method Summary
 boolean checkStateValidity(StateBundle state)
          checks that a particular discrete state is valid for this agent
 void getMsgs(ILogicVarBundle discreteState, IDiscreteDynamicsCallback dynCallback, double[] arrLfStateCont, double lfCurrTime, int idxStateOffset, java.util.Iterator<CommLink> channelsToSendOn)
          I don't think we need this for this class.
 boolean isViableTarget(TreeConstraintState currState, TreeConstraintState stateTarget)
           
 ITreeDepAlg makeCopy()
          in case the agent has some internal state, this allows synchronized wrapper calls to cache a snapshot of the agent at some rational point in time.
 StateBundle updateState(ILogicVarBundle statePrev, double[] arrLfStateCont, double lfCurrTime, int idxStateOffset, IEnvironment env, java.util.Iterator<CommLink> channelsRecieveFrom)
          This we do need to over-ride
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TreeDepthAgentDefault

public TreeDepthAgentDefault()
Method Detail

checkStateValidity

public boolean checkStateValidity(StateBundle state)
Description copied from interface: IAgent
checks that a particular discrete state is valid for this agent

Specified by:
checkStateValidity in interface IAgent

getMsgs

public void getMsgs(ILogicVarBundle discreteState,
                    IDiscreteDynamicsCallback dynCallback,
                    double[] arrLfStateCont,
                    double lfCurrTime,
                    int idxStateOffset,
                    java.util.Iterator<CommLink> channelsToSendOn)
I don't think we need this for this class. Leaving blank for now.

Specified by:
getMsgs in interface IAgent
Parameters:
discreteState - discrete component of agent state
arrLfStateCont - global vector of continuous state
idxStateOffset - offset into global state vector corresonding to this agent.
channelsToSendOn - Iterator containing objects of type CommLink corresponding to channels to send messages on (neighbor indices can be ascertained from channels).
See Also:
for type handled by iterator

makeCopy

public ITreeDepAlg makeCopy()
Description copied from interface: IAgent
in case the agent has some internal state, this allows synchronized wrapper calls to cache a snapshot of the agent at some rational point in time. If the agent has no internal state, this function can just return "this".

Specified by:
makeCopy in interface IAgent
Specified by:
makeCopy in interface ITreeDepAlg

updateState

public StateBundle updateState(ILogicVarBundle statePrev,
                               double[] arrLfStateCont,
                               double lfCurrTime,
                               int idxStateOffset,
                               IEnvironment env,
                               java.util.Iterator<CommLink> channelsRecieveFrom)
This we do need to over-ride

Specified by:
updateState in interface IAgent
Parameters:
statePrev - previous state (do not modify)
arrLfStateCont - vector of all continuous states (do not modify)
idxStateOffset - offset into arrLfStateCont corresponding to start of this agents continuous variables
channelsRecieveFrom - iterator storing CommLink classes corresponding incoming channels
Returns:
new state bundle containing discrete state of agent and new control function
See Also:
for type handled by iterator

isViableTarget

public boolean isViableTarget(TreeConstraintState currState,
                              TreeConstraintState stateTarget)
Specified by:
isViableTarget in interface ITreeDepAlg