swarm-support
[Top][All Lists]
Advanced

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

Re: Displaying before running: failure


From: Sven Thommesen
Subject: Re: Displaying before running: failure
Date: Sat, 12 Jul 1997 17:48:12 -0500

At 06:14 PM 7/11/97 +0200, Nelson Minar wrote:
>Several of my students have a very natural question - they want to
>display the state of the world at time 0. That way they can see the
>initial conditions of the system.
>
>However, I can't figure out how to make that happen with the standard
>ModelSwarm / ObserverSwarm split. The problem is both schedules have
>an action at time 0. But it's magic behind the scenes which actions
>happen first.
>
>Back when we designed this whole mess we talked a lot about making
>sure that people could specify relative ordering of actions in these
>circumstanecs. Is that possible in this case? If so, how?
>
>(The quick hack - don't start the model until time 1 - doesn't work.
>For some weird reason the repeat interval can't be equal to the first
>time that action happens.)


Well, I'm sorry to report that my previous message was in error -- on
closer inspection, my app also is displaying the status *after* all actions
for time period 0 have concluded :-( 

It only *looked* like status before action, because none of the agents had
moved yet (due to the particular parameters that were in effect.)

What I have implemented in my ObserverSwarm, in -buildActions, is this
creature:

        startHaltingSchedule = [Schedule create: [self getZone]];
        [startHaltingSchedule at: 0
                  createActionTo: controlPanel
                         message: M(setStateStopped) ];

In method -activateIn: swarmContext, this schedule is activated *after*
everything else. So naturally, things had happened before the sim stopped.

*** --> I am assuming that actions and action groups will get executed in
the order they are *activated*. Is this correct, Roger ?

I tried to move activation of this schedule to the front of the queue,
which did have the effect of halting the sim a the very start -- and the
displays were empty. No bugs, no heat values. 

I then had this brainstorm: leave the display schedules as is, but go into
the model swarm and agent swarms and make their actions start at t=1 ! And
ran smack up against what Nelson mentions. The error message is:

*** event raised for error: InvalidArgument
*** function: _activity_insertAction(), file: Schedule.m, line: 201
> Cannot insert action at time greater than or equal to repeat interval
*** execution terminating
(core dump)

So, another question for Roger: why is this limitation there? From a user's
perspective, it seems pretty arbitrary. If I want to schedule an action to
start at t=20 with repeat interval 3, why can't I?

Investigations continue ...


--Sven


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