|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.agentfactory.cldc.logic.Commitment
public class Commitment
In AFME, behaviour is modelled throught the use of beliefs and commitments. The commitment class contains the functionality for managing the commitment life cycle process.
| Constructor Summary | |
|---|---|
Commitment(FOS inAgent,
java.util.Calendar inTime,
FOS maintenance,
FOS inActivity,
Commitment inParent,
FOS val,
FOS cost,
FOS ident)
Creates an instance of Commitment. |
|
| Method Summary | |
|---|---|
void |
addChild(Agent agent)
For each child commitment of this commitment, add a child commitment to the agent. |
void |
addValues(int[] val,
int[] cost,
int i)
Adds the value and cost of the commitment to the specified arrays and the specified index. |
void |
append(java.lang.StringBuffer buffer)
Appends the commitment to the specified string buffer. |
boolean |
process(Agent agent,
java.util.Hashtable actuators)
Manages the current commitment state. |
void |
removeVarVals(Agent agent)
Removes the commitment from the table of commitments that are to have their values and costs altered. |
FOS |
toCommitBelief()
Coverts the commitment to a commitment belief. |
void |
updateValues(FOS val,
FOS cost)
Updates the values and cost of the commitment. |
void |
variableVals(Agent agent)
Adds the commitment to the table of commitments that are to have their values and costs altered. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Commitment(FOS inAgent,
java.util.Calendar inTime,
FOS maintenance,
FOS inActivity,
Commitment inParent,
FOS val,
FOS cost,
FOS ident)
inAgent - the agent that the commitment belongs to.inTime - the time before which the commitment will not be executed.maintenance - the maintenance condition of the commitment.inActivity - the activity (action or plan) of the commitment.inParent - the commitment's parent commitment.val - the value of the commitment.cost - the cost of the commitment.ident - the identifier for the commitment.| Method Detail |
|---|
public void variableVals(Agent agent)
agent - the agent that has made the commitment.public void removeVarVals(Agent agent)
agent - the agent that has made the commitment.
public void updateValues(FOS val,
FOS cost)
val - the new value of the commitment.cost - the new cost of the commitment.
public void addValues(int[] val,
int[] cost,
int i)
val - the value array.cost - the cost array.i - the index of the value and cost array to update.
public boolean process(Agent agent,
java.util.Hashtable actuators)
throws MalformedLogicException
agent - the agent that has made the commitment.actuators - the hash table that matches actuators to their triggers.
MalformedLogicException - if there is a logic error.
public void addChild(Agent agent)
throws MalformedLogicException
agent - the agent that has made the commitment.
MalformedLogicException - if there is a logic error.
public FOS toCommitBelief()
throws MalformedLogicException
MalformedLogicException - if there is a logic error.public void append(java.lang.StringBuffer buffer)
buffer - the string buffer the commitment will be appended to.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||