edu.brook.ascape.rule
Class ExecuteThenUpdate
java.lang.Object
|
+--edu.brook.ascape.model.AscapeObject
|
+--edu.brook.ascape.rule.Rule
|
+--edu.brook.ascape.rule.ExecuteThenUpdate
- Direct Known Subclasses:
- Diffusion
- public abstract class ExecuteThenUpdate
- extends Rule
A rule that should be executed in two phases; executing (calculating), and
then updating. Assumes by rule execution, allowing for a form of by rule synchronous
operation. (Please let me know if you can think of any reason why this might be useful
in by agent execution.)
See subclass Diffusion for the raison d'être of this class.
- Since:
- 1.0
- Version:
- 1.0
- See Also:
- Serialized Form
|
Constructor Summary |
ExecuteThenUpdate()
Constructs an execute and update rule. |
ExecuteThenUpdate(java.lang.String name)
Constructs an execute and update rule with the provided name. |
|
Method Summary |
abstract void |
execute(Agent agent)
Execute phase of the rule. |
abstract void |
update(Agent agent)
Execute update phase. |
| Methods inherited from class edu.brook.ascape.model.AscapeObject |
clone,
getName,
getRandom,
getRandomSeed,
randomInRange,
randomInRange,
randomIs,
randomToLimit,
reseed,
setName,
setRandom,
setRandomSeed,
toString |
| Methods inherited from class java.lang.Object |
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
ExecuteThenUpdate
public ExecuteThenUpdate()
- Constructs an execute and update rule.
ExecuteThenUpdate
public ExecuteThenUpdate(java.lang.String name)
- Constructs an execute and update rule with the provided name.
It is strongly encouraged to provide a name for all rules.
- Parameters:
name - the name of this object
execute
public abstract void execute(Agent agent)
- Execute phase of the rule. Here you perform a calculation based on dependent values
in other cells.
- Parameters:
agent - the playing agent- Overrides:
- execute in class Rule
update
public abstract void update(Agent agent)
- Execute update phase. Here you update the cell's values, after all cells have had there
next step values calculated.
- Parameters:
agent - the playing agent