swarm-support
[Top][All Lists]
Advanced

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

Re: Sub-swarm schedule activation/swarmContext question


From: Ken Cline
Subject: Re: Sub-swarm schedule activation/swarmContext question
Date: Tue, 24 Jun 1997 12:20:17 -0400 (EDT)

Thanks, glen.

Some follow-up:

On Mon, 23 Jun 1997, glen e. p. ropella wrote:

> Another, totally outoftheblue question... but I have to ask...
> AgentObserver *is* a Swarm, right?

Yep! (Not a GUISwarm, of course.)


> You might be able to get around this by specifying several
> actions in the displaySchedule such that some of the actions
> get merged into the modelObserver's schedule before the next
> modelObserver action and some get merged after the next
> modelObserver action.  I think you should be able to do this
> by specifying something like:
> 
> In AgentObserver.m
> ------------------
> -buildActions {
>    [ super buildActions ];
> 
>    displaySchedule = [ Schedule createBegin: [self getZone] ];
>       [ displaySchedule setRepeatInterval: displayFrequency ];
>    displaySchedule = [ displaySchedule createEnd ];
>       
>    displayActions = [ ActionGroup create: [self getZone] ];
>       [ displayActions createActionTo: self message: M(grin1) ];
> 
>    [ displaySchedule at: 0 createAction: displayActions ];
>    [ displaySchedule at: 1 createActionTo: self message: M(grin2) ];
>    [ displaySchedule at: 2 createActionTo: self message: M(grin3) ];
>    [ displaySchedule at: 3 createActionTo: self message: M(grin4) ];
>    [ displaySchedule at: 4 createActionTo: self message: M(grin5) ];
>       ...
> }
> 
> // and change the activateIn pointer back to "self"
> 
> -activateIn: (id) swarmContext {
>       ...
>    [ super           activateIn: swarmContext ];
>    [ displaySchedule activateIn: self ];
>    return [ self getSwarmActivity ];
> }

Another approach I thought of is to eliminate the Agent-
Observer's schedule and then have all the AgentObserver's
displayActions placed directly onto the ModelObserver's
schedule (i.e. a manual merge of the two schedules).

I'm not sure from a design point of view whether one way is
any better than the other.  You could argue it is simpler to
have only one displaySchedule (in the ModelObserver).
Alternatively, it might be simpler to have all Observers
have the same basic features (e.g. displayActions,
displaySchedule. etc.).

What do you think, just a matter of preference?  (Or is this
a question for the modelling list?)

BTW, now that you mention it, I do remember discussion of
the scheduling bug.  It never occurred to me that that might
be the cause of my problem.


> p.s. You might benefit from Doug Donaldson's schedule browser
> if any of this gets any more complex.  Doug?

I did try the xfprint(displaySchedule) function that Roger
had suggested to Doug (list-archive.9703/0156.html) but then
had some other ideas and never got back to figuring out how
to use it (i.e. I got stuff like "object is 0x1fb230:
ActionTo_0" and I need to spend some time turning this into
something a little more useful).

So what's this schedule browser like?


Ken.


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