swarm-support
[Top][All Lists]
Advanced

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

Re: Synchronous scheduling


From: D. D. Donalson
Subject: Re: Synchronous scheduling
Date: Sun, 22 Apr 2001 18:09:57 -0700

HJ,

> Yes, the model will eventually have stage structure and spatial structure,
> such that individuals advance through 3 stages with one dispersal event in
> the interim, before reproducing and dying (if they live that long).  So,
> ultimately, I will probably need to keep track of individuals as agents.
> To clarify, you are suggesting that I move the "step" method from Moth.m
to
> ModelSwarm.m?

Yes

> MGD> I would suggest you have a `nextGenerationMothList' list that you
> MGD> build, and assign to the `mothList' variable when it is time for the
> MGD> next generation to start.
> ...
>

All Marcus is saying (I think) is for you to have 2 lists, say childList and
adultList.
Traverse adultList creating the juveniles and adding them to the
juvenileList.  Then clear the adultList and do
adultList=juvenileList.  Now empty the juvenile list and repeat.

> Can you give an example of how to tell mothList when the next generation
> should start?  I tried coding up something similar to that using
> getCurrentTime(), but wasn't having much luck with it.

Doesn't the nextGeneration (Commander Data would help here) change to adults
synchronously?  If so then why can't you just do it at the end of modelStep?

pseudo code (invented on the spot)
-step
{

    while( not at end of adult list)
    {
        if(bug survives)
           add new bugs to juve list

     }
      clear adult bug list
      adult bug list=juve bug list
      clear juve bug list
}

Cheers,

    D4


                  ==================================
   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]