|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--EASE.Agents.Engine.StateMachine
This is currently the state machine used by both managers and engineers it is ugly because satisfactions are particular to engineers and contracts particular to managers but this is only handled by leaving one of them null.
Field Summary | |
private Debugger |
debugger
|
private EnvironmentImport |
e
|
private int |
startIndex
|
private java.util.Vector |
states
|
private java.util.Vector |
transitionInstantiatedParams
|
Constructor Summary | |
StateMachine(java.util.Vector statesS,
java.util.Vector transitionsS,
Engine sensing)
Deprecated. Use version with name for debugging purposes. |
Method Summary | |
int |
execute(java.util.Hashtable params,
int state)
|
int |
execute(java.util.Hashtable params,
int state,
boolean contractFailing,
boolean allSuccess)
Ask the stateMachine to see if it should change states. |
int |
execute(java.util.Hashtable params,
int state,
boolean contractFailing,
boolean allSuccess,
java.lang.StringBuffer sb)
Traceable version of execute |
int |
execute(java.util.Hashtable params,
int state,
java.lang.StringBuffer sb)
|
java.util.Vector |
getContracts(int state)
Get the made contracts for some state. |
java.util.Vector |
getFactories(int state)
Get the factories for registration in some state. |
InstantiatedSM |
getInstantiated()
Get an instantiation of this state machine. |
java.util.Vector |
getInstantiatedParams()
Get all the instantiations of parameters for the SM |
ListSensorData |
getListType()
Returns a ListSensor Type if there is one involved with this SM. |
java.lang.String |
getName(int state)
Get the name of some state. |
double |
getOutputSatisfaction(java.lang.String name,
java.util.Hashtable params,
java.lang.Object proposal,
int state)
Actually does the same as getSatisfaction, difference is only so that the state can work out whether its failing or not (i.e. |
double |
getSatisfaction(java.lang.String name,
java.util.Hashtable params,
java.lang.Object proposal,
int state)
I can't get no satisfaction . |
double |
getSatisfaction(java.lang.String name,
java.util.Hashtable params,
java.lang.Object proposal,
int state,
java.lang.StringBuffer sb)
|
int |
getStartState()
Get the starting state of the state machine |
boolean |
isFailing(int state)
Returns whether the state is failing. |
boolean |
isSuccess(int state)
Returns whether the state is a success(final) state. |
Methods inherited from class java.lang.Object |
|
Field Detail |
private EnvironmentImport e
private java.util.Vector states
private int startIndex
private Debugger debugger
private java.util.Vector transitionInstantiatedParams
Constructor Detail |
public StateMachine(java.util.Vector statesS, java.util.Vector transitionsS, Engine sensing)
Method Detail |
public double getSatisfaction(java.lang.String name, java.util.Hashtable params, java.lang.Object proposal, int state)
public double getOutputSatisfaction(java.lang.String name, java.util.Hashtable params, java.lang.Object proposal, int state)
public double getSatisfaction(java.lang.String name, java.util.Hashtable params, java.lang.Object proposal, int state, java.lang.StringBuffer sb)
public int execute(java.util.Hashtable params, int state, boolean contractFailing, boolean allSuccess)
Given parameters and the current state.
For an engineer the contract failing parameter is irrelevant. It only applies to managers that have contracts. Returns a new state.
public int execute(java.util.Hashtable params, int state)
public int execute(java.util.Hashtable params, int state, java.lang.StringBuffer sb)
public int execute(java.util.Hashtable params, int state, boolean contractFailing, boolean allSuccess, java.lang.StringBuffer sb)
public InstantiatedSM getInstantiated()
public int getStartState()
public java.util.Vector getFactories(int state)
public java.util.Vector getContracts(int state)
public java.lang.String getName(int state)
public java.util.Vector getInstantiatedParams()
public ListSensorData getListType()
Assumes there is only one.
public boolean isFailing(int state)
Does NOT consider whether contracts are failing (done in instantiated SM).
public boolean isSuccess(int state)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |