edu.brook.ascape.rule
Class Propogate

java.lang.Object
  |
  +--edu.brook.ascape.model.AscapeObject
        |
        +--edu.brook.ascape.rule.Rule
              |
              +--edu.brook.ascape.rule.Propogate
Direct Known Subclasses:
PropogateScapeOnly

public class Propogate
extends Rule

A rule that executes on the target scape, all children of the target scape, and (if desired) all members of this or any children of the target scape. Any scape with members active set to false will not be propagated to. If isScapeOnly returns true, the rule will be propogated down to scapes, and will not be executed on any non-scape member cells.

Since:
1.0
Version:
1.5
See Also:
edu.brook.ascape.model.Scape#isMemberActive, Serialized Form

Fields inherited from class edu.brook.ascape.model.AscapeObject
ARBITRARY_SEED, count, name, scape
 
Constructor Summary
Propogate(java.lang.String name)
          Constructs a propogate rule with the provided name.
 
Method Summary
 void execute(Agent agent)
          Execute rule on child scapes and (optionally) agents.
 boolean isRandomExecution()
          Returns false.
 boolean isScapeOnly()
          Is this rule intended only to be propogated to scapes?
 
Methods inherited from class edu.brook.ascape.rule.Rule
getScape, isCauseRemoval, isIterateAll, setScape
 
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
 

Constructor Detail

Propogate

public Propogate(java.lang.String name)
Constructs a propogate rule with the provided name. It is strongly encouraged to provide a name for all rules.
Parameters:
name - the name of this object
Method Detail

execute

public void execute(Agent agent)
Execute rule on child scapes and (optionally) agents.
Parameters:
agent - the target agent
Overrides:
execute in class Rule

isScapeOnly

public boolean isScapeOnly()
Is this rule intended only to be propogated to scapes?

isRandomExecution

public boolean isRandomExecution()
Returns false. Initialization should not need to be random, since it should not depend on the state of any other agent.
Overrides:
isRandomExecution in class Rule

(c) 1998-2000 The Brookings Insitution
Webpage