public abstract class GoalFeeder<T>
The goal feeder is a support class to facilitate bridging experiments and
models. This is to be used when your experiment cannot directly control the
clock, or does not use common reality (which, if it did, it would have
control of the clock).
It has a few elements: the goal feeder, goal constructors, goal responders,
and respond action.
The goal feeder collects constructors and responders. it is responsible for
inserting new goals into the model's goal buffer in response to some
experimental component. The actual goal chunk is built by the goal
constructor, using the experimental task.
When a model executes the respond action, the contents of the goal buffer are
passed to the goal responders and one of them actually executes the specific
The respond action expects that the goal feeder be attached to the runtime
It is up to the modeler to ensure that nextGoal() is called. The idea is that
the experiment will have some listener type interface, when a task is
started, the listener will receive the notification and then fire nextGoal().
Where you really need to think is in the area of time control. Since the
experiment does not control the clock, the model can run at break-neck speed
before the experiment actually gets going. The solution to this is to use
BlockingTimedEvents. These are inserted with each call to nextGoal(), the
goal constructor can control how much time is permitted to elapse before the
model is explicitly blocked to allow the experiment to catch up.
If your model just stops dead in its tracks, it's most likely because a goal
constructor returned 0 for the maxTimeElapse when it should have returned