swarm-support
[Top][All Lists]
Advanced

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

Event driven schedules


From: Doug Donalson
Subject: Event driven schedules
Date: Sun, 13 Aug 2000 10:23:17 -0700

A little clarification of Paul's note.  Event driven or asynchronous
schedules use events (usually changing a state variable) to move the system
instead of a fixed time step.  This is the method that Law and Kelton advise
using.

Take a very simple population growth model, say exponential growth.  In its
standard ODE form it is written as

dN=rNdt

where dN is a very small change in the population and dt is a very small
increment in time.  In a population, represented by individuals, dN should
be equal to 1.  That is, populations change in discrete increments and, with
a small enough time discrimentation, the change is one individual at a time.

If you solve the above equation for dt, that is, reverse the dependent and
independent variables, and require dN to be equal to 1 (note that dN=1 is
not a hard requirement, just useful for this discussion) you get the
following equation:

dt=1/(rN)

This says that the time to the next state change is 1/(rN).  This is the
asynchronous version of the origional synchronous equation dN=rNdt.  The
asynchronous schedule works by first calculating the time to next event dt.
The time is then inserted into the schedule as an event with a message to
some agent or the model to execute a state change.

In the case of this very simple model, the time to next event would be
1/(rN)+present time and the event would send a message to the model swarm to
add one individual.  As nothing else occurs during the time period from the
present time to the next event, the system jumps to the next event and its
associated time.  Part of processing hte event is to schedule the next event
which would again be at 1/(rN) + present time but where N is now the
origional number +1.  With a slight change this is called a Stochastic
Birth-Death model.

Note that at this point nothing has been said about the floating point
schedule.  The above can be accomplished using a standard schedule with
autodrop.  The 2-tier or floating point schedule was designed because of the
possibility of needing a long simulation runtime with the possibility of a
large number of events being executed per time step.  As Paul said, it
simply ensures that you don't end up with several events occuring at the
same time.  Note that at the time of implimentation,  there was no randomize
for the synchronous time step model.  Also, this is not a trivial point, the
order of events in a time step as well as the length of the time step can
have a strong (and sometimes unexpected) affect on the simulation dynamics.

As a side note, it would be interesting to compare a "randomize" synchronize
model with an equivenent asynchronous version.  This can be done fairly
easily and maybe I'll give it a try.  I have a couple of SBD models that are
complex enough to be interesting but could be cast into the synchronous form
fairly easily.

Does the randomize work in 2.1.1?

PJ: Now, we have the variant, which works in Swarm-2.1.4.2000-07-21 or
thereabouts, in which the treatment of actions scheduled at the same
time can be customized so that actions are randomized, not executed in
the default order


There is much more to this discussion, but this is an overview and all I
have time for right now.

Cheers,

   D4

*********************************************************************
* Dr. Doug Donalson             Office: (805) 893-2962
* Ecology, Evolution,           Home:   (805) 961-4447
* and Marine Biology            email address@hidden
* UC Santa Barbara
* Santa Barbara Ca. 93106
*********************************************************************
*
*   The most exciting phrase to hear in science, the one that
*   heralds new discoveries, is not "EUREKA" (I have found it) but
*   "That's funny ...?"
*
*       Isaac Asimov
*
*********************************************************************




                  ==================================
   Swarm-Support is for discussion of the technical details of the day
   to day usage of Swarm.  For list administration needs (esp.
   [un]subscribing), please send a message to <address@hidden>
   with "help" in the body of the message.



reply via email to

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