Interface ITreeAlgAgent

All Superinterfaces:
IAgent
All Known Implementing Classes:
TreeDeployAgent

public interface ITreeAlgAgent
extends IAgent


Method Summary
 java.lang.reflect.Type getAnnoteType()
          Mike, add some comments here
 IMsg getMsgAnnotation(ILogicVarBundle vars, double[] arrLfState, int nIdx)
          gets the message to annotate the TreeConstraintState recieved by neighbors in TreeConstraintAgent algorithm
 java.util.Comparator<TreeConstraintState> getPrefComp(TreeConstraintState agentSorting)
          gets a comparator for sorting ITreeAlgAgent nodes by preference
 ITreeAlgAgent 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.
 
Methods inherited from interface IAgent
checkStateValidity, getMsgs, updateState
 

Method Detail

getMsgAnnotation

IMsg getMsgAnnotation(ILogicVarBundle vars,
                      double[] arrLfState,
                      int nIdx)
gets the message to annotate the TreeConstraintState recieved by neighbors in TreeConstraintAgent algorithm

Parameters:
vars - logic state of this agent.
arrLfState - position of whole swarm (requires programmer discipline to only access current robot's position)
nIdx - index of current robot.
Returns:
something deriving form IMsg must be what this agent's getPrefComp is expecting.

getPrefComp

java.util.Comparator<TreeConstraintState> getPrefComp(TreeConstraintState agentSorting)
gets a comparator for sorting ITreeAlgAgent nodes by preference

Returns:

getAnnoteType

java.lang.reflect.Type getAnnoteType()
Mike, add some comments here

Returns:

makeCopy

ITreeAlgAgent 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. If the agent has no internal state, this function can just return "this".

Specified by:
makeCopy in interface IAgent