vitro
Class SequentialController
java.lang.Object
vitro.Controller
vitro.SequentialController
public class SequentialController
- extends Controller
A Controller implementation in which each Agent
has the opportunity to choose an Action and then
it is immediately applied. Thus, subsequent
Agents will observe a different Model state
within the same round. Agents may move in
a completely arbitrary order.
Method Summary |
List<Action> |
nextRound()
This method is used to determine the order in which
Actions will be applied. |
Methods inherited from class vitro.Controller |
actors, annotations, bind, bind, getAction, getAgent, hasNext, hasPrev, index, next, prev, previousActions |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SequentialController
public SequentialController(Model model)
- Create a new SequentialController to drive
a specified Model.
- Parameters:
model
- the Model this Controller will drive.
nextRound
public List<Action> nextRound()
- Description copied from class:
Controller
- This method is used to determine the order in which
Actions will be applied. Controller implementations may
provide different behaviors here such as evaluating
Actions concurrently or sequentially.
The List returned by this method is stored for rollback
purposes- the Actions themselves should be applied in
the body of this method.
- Specified by:
nextRound
in class Controller
- Returns:
- a record of Actions applied as the state is advanced.