|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object LambdaConstraintAgent
public class LambdaConstraintAgent
Constructor Summary | |
---|---|
LambdaConstraintAgent()
|
|
LambdaConstraintAgent(double lfMaxVel)
|
|
LambdaConstraintAgent(double lfMaxVel,
ICommStrengthFunc commFunc)
|
|
LambdaConstraintAgent(IAgent agentToWrap,
double lfMaxVel)
|
|
LambdaConstraintAgent(IAgent agentToWrap,
double lfMaxVel,
double lfTCom,
ICommStrengthFunc commFunc)
|
|
LambdaConstraintAgent(LambdaConstraintAgent src)
|
Method Summary | |
---|---|
boolean |
checkStateValidity(StateBundle state)
checks that a particular discrete state is valid for this agent |
IBcastAlg |
getBcastAlg()
|
java.lang.Double |
getLastBoundTime(int nAgent)
|
double |
getLastLambdaLowBound(int nAgent)
|
java.util.Vector<Jama.Matrix> |
getLastMatBounds(int nAgent)
|
java.util.Vector<Jama.Matrix> |
getLastVelBounds(int nAgent)
|
java.util.Vector<Jama.Matrix> |
getMatrixBounds(IPosBcast bcastPos,
double lfCurrTime)
temporarily making this public. |
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. |
IAgent |
getWrappedAgent()
|
IAgent |
makeCopy()
in case the agent has some internal state, this allows syncrhonized wrapper calls to cache a snapshot of the agent at some rational point in time. |
void |
setBcastAlg(IBcastAlg bcastAlg)
|
void |
setLambdaBounds(double lfLambdaMin,
double lfLambdaMax)
Sets lambda_+ and lambda_- |
void |
setLambdaIncrease(double lfLambdaIncrease)
|
void |
setProjectParams(boolean bProject,
double lfProjMax,
double lfProjStep)
sets parameters for projecting on to good motion. |
void |
setWrappedAgent(IAgent agentToWrap)
|
StateBundle |
updateState(ILogicVarBundle statePrev,
double[] arrLfStateCont,
double lfCurrTime,
int nIdxStateOffset,
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 LambdaConstraintAgent()
public LambdaConstraintAgent(IAgent agentToWrap, double lfMaxVel)
public LambdaConstraintAgent(IAgent agentToWrap, double lfMaxVel, double lfTCom, ICommStrengthFunc commFunc)
public LambdaConstraintAgent(double lfMaxVel)
public LambdaConstraintAgent(double lfMaxVel, ICommStrengthFunc commFunc)
public LambdaConstraintAgent(LambdaConstraintAgent src)
Method Detail |
---|
public void setProjectParams(boolean bProject, double lfProjMax, double lfProjStep)
lfProjMax
- maximum amount to rotate anglelfProjStep
- step anglepublic java.util.Vector<Jama.Matrix> getLastVelBounds(int nAgent)
public java.util.Vector<Jama.Matrix> getLastMatBounds(int nAgent)
public java.lang.Double getLastBoundTime(int nAgent)
public double getLastLambdaLowBound(int nAgent)
public void setLambdaIncrease(double lfLambdaIncrease)
public void setLambdaBounds(double lfLambdaMin, double lfLambdaMax)
public boolean checkStateValidity(StateBundle state)
checkStateValidity
in interface IAgent
public IAgent getWrappedAgent()
public void setWrappedAgent(IAgent agentToWrap)
public IBcastAlg getBcastAlg()
public void setBcastAlg(IBcastAlg bcastAlg)
public 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 IAgent
discreteState
- 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 iterator
public StateBundle updateState(ILogicVarBundle statePrev, double[] arrLfStateCont, double lfCurrTime, int nIdxStateOffset, 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).
updateState
in interface IAgent
statePrev
- previous state (do not modify)arrLfStateCont
- vector of all continuous states (do not modify)nIdxStateOffset
- offset into arrLfStateCont corresponding to
start of this agents continuous variableschannelsRecieveFrom
- iterator storing CommLink
classes corresponding incoming channels
for type handled by iterator
public java.util.Vector<Jama.Matrix> getMatrixBounds(IPosBcast bcastPos, double lfCurrTime)
bcastPos
- lfCurrTime
-
public IAgent makeCopy()
makeCopy
in interface IAgent
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |