|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.ObjectTreeDeployAgent
public class TreeDeployAgent
| Constructor Summary | |
|---|---|
TreeDeployAgent()
|
|
TreeDeployAgent(double lfCommRad)
|
|
TreeDeployAgent(double lfCommRad,
double lfVel)
|
|
TreeDeployAgent(TreeDeployAgent src)
|
|
| Method Summary | |
|---|---|
boolean |
checkStateValidity(StateBundle state)
checks that a particular discrete state is valid for this agent |
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 |
void |
getMsgs(ILogicVarBundle discreteState,
IDiscreteDynamicsCallback dynCallback,
double[] arrLfStateCont,
double lfCurrTime,
int nIdxStateOffset,
java.util.Iterator<CommLink> channelsToSendOn)
Given the state of an agent, and the channels it can send messages on, push the next set of messages onto the appropriate channels. |
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. |
StateBundle |
updateState(ILogicVarBundle statePrev,
double[] arrLfStateCont,
double lfCurrTime,
int idxStateOffset,
IEnvironment env,
java.util.Iterator<CommLink> channelsRecieveFrom)
Given the previous state of an agent, and the channels to recieve messages from, recieve messages (destructively) and return new state (non-destructively). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TreeDeployAgent()
public TreeDeployAgent(double lfCommRad)
public TreeDeployAgent(double lfCommRad,
double lfVel)
public TreeDeployAgent(TreeDeployAgent src)
| Method Detail |
|---|
public boolean checkStateValidity(StateBundle state)
IAgent
checkStateValidity in interface IAgentpublic void getMsgs(ILogicVarBundle discreteState,
IDiscreteDynamicsCallback dynCallback,
double[] arrLfStateCont,
double lfCurrTime,
int nIdxStateOffset,
java.util.Iterator<CommLink> channelsToSendOn)
Given the state of an agent, and the channels it can send messages on, push the next set of messages onto the appropriate channels. Channels are assumed to be modified by this operation. One weakness of this signature is that it requires programmer discipline not to look at the continuous state of agents other then your neighbors.
getMsgs in interface IAgentdiscreteState - discrete component of agent statearrLfStateCont - global vector of continuous statenIdxStateOffset - 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).for type handled by iteratorpublic ITreeAlgAgent makeCopy()
IAgent
makeCopy in interface IAgentmakeCopy in interface ITreeAlgAgentpublic StateBundle updateState(ILogicVarBundle statePrev,
double[] arrLfStateCont,
double lfCurrTime,
int idxStateOffset,
IEnvironment env,
java.util.Iterator<CommLink> channelsRecieveFrom)
IAgentGiven the previous state of an agent, and the channels to recieve messages from, recieve messages (destructively) and return new state (non-destructively).
updateState in interface IAgentstatePrev - 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 variableschannelsRecieveFrom - iterator storing CommLink
classes corresponding incoming channels
for type handled by iteratorpublic IMsg getMsgAnnotation(ILogicVarBundle vars,
double[] arrLfState,
int nIdx)
ITreeAlgAgent
getMsgAnnotation in interface ITreeAlgAgentvars - 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.
public java.lang.reflect.Type getAnnoteType()
ITreeAlgAgent
getAnnoteType in interface ITreeAlgAgentpublic java.util.Comparator<TreeConstraintState> getPrefComp(TreeConstraintState agentSorting)
getPrefComp in interface ITreeAlgAgent
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||