Subject: | |
From: | |
Reply To: | |
Date: | Tue, 5 Oct 2004 11:59:10 -0400 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
On Oct 5, 2004, at 11:13 AM, Tony Bigbee wrote:
> Thanks Rob and Keith for the suggestions. If the Stoppable.stop()
> method actually does remove the agent from the schedule, that would
> seem to be ideal.
stop() does not remove the agent from the schedule. Agents are removed
from the schedule when their step() method is scheduled to be called.
So what happens is that stop() simply lobotomizes the agent so its
step() method is never called when it's scheduled -- instead the agent
just drops out of the schedule.
> Keith ---I don't know how computationally efficient dynamically adding
> the living agents each step is, but it seems live a clever approach. I
> hadn't considered resurrection, but it's a good thought. The float
> value used in your sample might be an issue to due to floating point
> accuracy/resolution issues, but I also note that there is no
> scheduleOnce method signature that takes a float for the time. There
> is some discussion in the javadoc about real-valued time steps (as
> doubles) via the toReals() and fromReals() methods, but caution is
> recommended --"You have to be careful using a real-valued schedule."
We may yet move to a real-valued schedule. In the meantime, Gabriel
Balan has put together a real-valued schedule (a subclass of Schedule)
which handles the toReals() and fromReals() stuff for you.
The big problem with real-valued schedules is properly handling
repeating events. That and the fact that longs have a much bigger
integral domain than doubles. I have to give this some further
thought.
Sean
|
|
|