|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--EASE.Agents.Engine.InstantiatedSM
Instantiation of a state machine for an agent.
Basically so that different instantiations of the one agent can be in the same state.
Very tightly coupled to State Machine.
Field Summary | |
private java.util.Hashtable |
contracts
A hashtable passed in from an instantiated manager giving all the current contracts. |
private int |
currState
|
private StateMachine |
sm
|
Constructor Summary | |
InstantiatedSM(StateMachine sm)
|
Method Summary | |
private boolean |
allContractsSuccess()
|
private boolean |
contractFailing()
|
boolean |
execute(java.util.Hashtable params)
Ask the state machine to try to execute. |
boolean |
execute(java.util.Hashtable params,
java.lang.StringBuffer sb)
Traceable version of execute |
java.util.Vector |
getCurrentContracts()
Vector representing the contracts made in this state. |
java.util.Vector |
getCurrentFactories()
Vector of strings representing factories registered in this state. |
java.lang.String |
getCurrentStateName()
Get current state name. |
double |
getOutputSatisfaction(java.lang.String factoryName,
java.util.Hashtable params,
java.lang.Object proposal)
|
double |
getSatisfaction(java.lang.String factoryName,
java.util.Hashtable params,
java.lang.Object proposal)
Get the satisfaction of some proposal. |
double |
getSatisfaction(java.lang.String factoryName,
java.util.Hashtable params,
java.lang.Object proposal,
java.lang.StringBuffer sb)
|
boolean |
isFailing()
Check if this state machine is failing by checking whether the current state is failing. |
boolean |
isSuccess()
Check if the agent is/has succeeded by checking whether it is in a success state. |
void |
setContracts(java.util.Hashtable contracts)
Allows an instantiated manager to share contract list. |
Methods inherited from class java.lang.Object |
|
Field Detail |
private java.util.Hashtable contracts
private int currState
private StateMachine sm
Constructor Detail |
public InstantiatedSM(StateMachine sm)
Method Detail |
public double getSatisfaction(java.lang.String factoryName, java.util.Hashtable params, java.lang.Object proposal)
public double getOutputSatisfaction(java.lang.String factoryName, java.util.Hashtable params, java.lang.Object proposal)
public double getSatisfaction(java.lang.String factoryName, java.util.Hashtable params, java.lang.Object proposal, java.lang.StringBuffer sb)
public java.util.Vector getCurrentFactories()
public java.util.Vector getCurrentContracts()
public java.lang.String getCurrentStateName()
public boolean execute(java.util.Hashtable params)
public boolean execute(java.util.Hashtable params, java.lang.StringBuffer sb)
public boolean isFailing()
public boolean isSuccess()
public void setContracts(java.util.Hashtable contracts)
private boolean contractFailing()
private boolean allContractsSuccess()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |