swarm-support
[Top][All Lists]
Advanced

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

Re: Skipping schedule items


From: glen e. p. ropella
Subject: Re: Skipping schedule items
Date: Tue, 25 May 1999 17:24:21 -0600

At 03:38 PM 5/25/99 -0700, you wrote:
>We want to skip migrantActions for the first n time steps. 
>
>Can we do it with:
>
>(a) some fancy toe-tapping in the schedule, or do we best 
>(b) put some kind of bypass inside the migrant code? Or 
>(c) have one modelAction group (without the migrantActions) that
>executes for n time steps, then another that starts up with both
>migrants and predators?

Hey Steve,
You should probably dynamically add the migrantActions after
so many steps have gone by, using:

  [modelActions createAction: migrantActions];
  [modelSchedule remove: triggerAction];

You would add the migrantActions group to the main actionGroup
in some routine that was triggered at the appropriate time.
Then you'd have to forcibly drop that trigger action so that
it didn't get repeated.  Adding the action might look like:

 triggerAction = [modelSchedule at: 100 
         createActionTo: self message: M(triggerMigrants)];


I think something like this would work.

glen

--
glen e. p. ropella                =><=          Hail Eris!
Home: http://www.trail.com/~gepr/home.html  (505) 424-0448
Work: http://www.swarm.com                  (505) 995-0818  

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