Interface ISimpAgent<TMsg extends IMsg,TVars extends ILogicVarBundle>

All Known Implementing Classes:
SimpAgentTreeTopo

public interface ISimpAgent<TMsg extends IMsg,TVars extends ILogicVarBundle>

IAgent was too cumbersome -- this requires functions which do equivalent things but with simpler signatures.


Method Summary
 TMsg getMsg(TVars varsPrev, int nIdDst)
          Gets one individual IMsg to send to one specific agent.
 TVars stateNext(TVars varsPrev, java.util.Collection<TMsg> bagMsg)
          Given a collection of messages, calculates the next state of the logic variables for this agent.
 

Method Detail

stateNext

TVars stateNext(TVars varsPrev,
                java.util.Collection<TMsg> bagMsg)
Given a collection of messages, calculates the next state of the logic variables for this agent. IAgent wrapper would call this after running AccumMsgs to create the message bag.

Parameters:
bagMsg - collection of messages to process (usually these should include the id of the sending agent!!!)
Returns:
next state of the logic variables for this agent (no control function)

getMsg

TMsg getMsg(TVars varsPrev,
            int nIdDst)
Gets one individual IMsg to send to one specific agent. IAgent wrapper for this class would call this in a loop and push the results onto CommLink objects.

Parameters:
varsPrev - current state of this agent
nIdDst - UID of agent to send message to
Returns:
message to send to agent nIdDst