swarm-support
[Top][All Lists]
Advanced

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

Re: [Q] Noddy scheduling question


From: Ken Cline
Subject: Re: [Q] Noddy scheduling question
Date: Tue, 6 Jul 1999 23:09:29 -0400 (EDT)

On Tue, 6 Jul 1999, Marcus G. Daniels wrote:

> >>>>> "KC" == Ken Cline <address@hidden> writes:
> 
> KC> There could be an extension of the Schedule protocol that
> KC> accepts an "ActionSequence", e.g.
> KC>  @protocol ScheduleSequel <Schedule>
> KC>    USING
> KC>    -during: (id <ActionSequence>) seq createAction: (id <ActionType>) act;
> KC>      ...
> KC>  @end
> 
> How is this different from activateIn:?

Ummmm... I guess I was thinking the it would be used more
like the existing `at:createAction:' methods that Schedule
provides.  For example, if you wanted to schedule an action
that would start at time 10 and repeat until the end of the
simulation then the code would look like:
     ...
  seq = [ SimpleActionSequence createBegin: [self getZone] ];
  [ seq setStart: 10 end: TimeMax frequency: 1 ];
  seq = [ seq createEnd ];
     ...
  [ modelSchedule during: seq createActionForEach: agents
                                  message: M(recordState) ];

and only the `modelSchedule' would need to be activated.
Does that make sense?  Did I misunderstand you question?

BTW, I only picked the keyword `during' because the 
arguments to the `at' keyword always specify particular
(absolute or relative) time instant instead of a general
time interval.


_________________________________________________________
Ken Cline                             address@hidden
SAIC                                 VOICE (410) 571-0413
Annapolis, MD                          FAX (301) 261-8427



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