swarm-support
[Top][All Lists]
Advanced

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

RepeatingHeatbugs announcement & request too


From: Paul E. Johnson
Subject: RepeatingHeatbugs announcement & request too
Date: Thu, 11 Feb 1999 16:37:09 -0600

Dear everybody:

Have you ever wanted swarm models to "reset" without quitting and
starting again?  Have you ever needed to repeat a GUI sim and been
frustrated by the lack of infrastructure to automate that process?

I have sought to overcome these problems by introducing a "ManagerSwarm"
that sits atop the swarm hierarchy and spawns ObserverSwarms, one after
the other.  The example code is called RepeatingHeatbugs. This example
requires minimal tampering with an existing application.  It requires 
        - the creation of a "checkToStop" method in the ObserverSwarm level 
        - the creation of a "dropObjects" method in ObserverSwarm
        - the disabling of probeLibrary features in ModelSwarms. 
        - editing of main.m to make the ManagerSwarm the topLevelSwarm.
Most of the rest of the changes are in the ManagerSwarm class, which can
be plugged in to existing applications after some editing of main.m. 
The example code for Heatbugs is available here:

http://lark.cc.ukans.edu/~pauljohn/Swarm/RepeatingHeatbugs-1.4-1.tar.gz.

This runs under swarm 1.4 and 1.4.1, not earlier versions.

If you compile this code, you will see the following happen. Run
"heatbugs" and a control panel pops up.  This is the Manager Swarm's
panel.  Move it out of the way, because when you click start or next it
is likely your window manager will plop another controlpanel right on
top of it when the simulation starts.  That new one is the
ObserverSwarm's control panel. ObserverSwarms and their control panels
will come and go in front of your eyes after you click start.

After you click Start on ManagerSwarm's control panel (the one you see
at the very outset), you will see heatbugs run for 60 time periods. 
Then a new simulation will pop up and run for 60 periods.  And so forth,
until you stop it from the ManagerSwarm's control panel.

Here is the help I need.  Watch what happens if you click STOP on the
ObserverSwarm's control panel while the simulation is running.  STOP has
the same effect as QUIT.  It aborts that simulation, and starts another
one.  There is some little glitch in the way ManagerSwarm spawns these
things and I can't get through my thick head how to stop it from doing
this.  Various people have pointed me at different options in
ControlPanel or such, but I have not made them work. Perhaps this
problem can be solved within the existing Swarm framework, perhaps not,
I don't know.

It would be very nice to overcome this little bit, because it would be
convenient to be able to stop a sim and save the window positions, and
then enable pixmaps features to take snapshots every so often.  You see,
we could make beautiful movies together.

-- 
Paul E. Johnson                         email: address@hidden
Dept. of Political Science      http://lark.cc.ukans.edu/~pauljohn
University of Kansas                    Office: (785) 864-9086
Lawrence, Kansas 66045                  FAX: (785) 864-5700

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