swarm-modeling
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Swarm-Modelling] Non-integer timesteps


From: Paul Johnson
Subject: Re: [Swarm-Modelling] Non-integer timesteps
Date: Fri, 22 Apr 2005 14:24:12 -0500
User-agent: Mozilla Thunderbird 1.0.2-1.3.2 (X11/20050324)

This is not an easy one, but it has been done.

The person that can show exactly how to do this is Doug Donalson, an ecologist. He was doing that kind of scheduling when I started with Swarm before the turn of the century. At the time, I could not quite understand it, but my recollection is that it worked basically like this. Take a floating point number, say

7.124

and look at it as two integers 7 and 124. Then build a schedule in which, for each integer valued timestep, there is an integer valued schedule inside it. So if you want something at 7.124, you grab the schedule at time 7, and then throw something at time 124 inside that schedule.

I'm sorry I don't have a working code example. I never did have a full working model showing this, but Doug had posted a snippit to the swarm list that showed how it was done. But can't find it. I've changed computers 2 or 3 times since then, I suppose. But I'm googling right now and I see he made a Swarmfest presentation on this in 2001

http://www.swarm.org/pipermail/modelling/2001-March/002843.html

I know for sure that Dough described it to the support email list, but without a search engine, I can't find it.

http://www.swarm.org/pipermail/support/

pj

address@hidden wrote:
Hello,

I sent a message to the support mailing list a few days ago asking about
asynchronous schedules.

I have a much more specific question now: is it possible to schedule
events at non-integer timesteps in swarm? The schedule method
at$createActionTo$message only accepts integer values... I know I could
just convert everything to integers and forget about what shows up in the
x-axis of the EZgraph, but that would complicate things and cost a lot of
computation time. Is there some simple way to do this?

Thank you,

Dinis Gökaydin

P.S.-Thank you for the answers the last time, they were very helpful, I've
studied the Mousetrap code and I think I understand roughly how dynamic
schedule works.

_______________________________________________
Modelling mailing list
address@hidden
http://www.swarm.org/mailman/listinfo/modelling


--
Paul E. Johnson                       email: address@hidden
Dept. of Political Science            http://lark.cc.ku.edu/~pauljohn
1541 Lilac Lane, Rm 504
University of Kansas                  Office: (785) 864-9086
Lawrence, Kansas 66044-3177           FAX: (785) 864-5700


reply via email to

[Prev in Thread] Current Thread [Next in Thread]