Mime-Version: |
1.0 (Apple Message framework v619) |
Sender: |
|
Date: |
Tue, 5 Oct 2004 11:13:18 -0400 |
Reply-To: |
|
Subject: |
|
From: |
|
Content-Transfer-Encoding: |
7bit |
In-Reply-To: |
<Pine.GSO.4.52.0410050954170.528@cs1> |
Content-Type: |
text/plain; charset=US-ASCII; format=flowed |
Comments: |
|
Parts/Attachments: |
|
|
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.
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."
Tony
On Oct 5, 2004, at 9:57 AM, Keith Sullivan wrote:
> Another potential solution is to use the scheduleOnce method. In the
> step() method of your agents, you could test if they are alive on the
> current time step. If so, then run
> scheduleOnce(state.schedule.time()+1.0f, this)
|
|
|