swarm-support
[Top][All Lists]
Advanced

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

Re: [Jiøí Lambert <address@hidden>] SWARM -tutorial - simpleObserverBug


From: pauljohn
Subject: Re: [Jiøí Lambert <address@hidden>] SWARM -tutorial - simpleObserverBug
Date: Fri, 22 Jun 2001 09:30:32 -0500

Dear Jiri,

As you might guess, Marcus forwarded your email to the swarm-support
list. You should send messages here in the future, there are many of us
volunteers that are glad to help you.

After you have stepped through the tutorial and  looked through the user
guide, I expect you will be able to do these exercises you describe. 
The graph for the quantity of food should be easy enough, you just need
to have some object in charge of measuring the amount of food available
and then create a graph that takes that output and plots it.  There are
plenty of examples of that sort. My favorite for that kind of thing is
Arborgames, which is described in the User Guide, and you can get it in
the ftp server.  

The automatic stop if there is no food is a little bit less obvious, but
what I'd suggest is the following.  In your observer level, create a
schedule that runs a method "checkFoodSupply" at each time step, and if
that method finds none, then it calls another method to end the
simulation.  I think if you look in the batch code for heatbugs there is
a schedule that stops a simulation. I'm pretty sure I've got something
like that in this tutorial addon as well:

http://lark.cc.ukans.edu/~pauljohn/ps909/simpleObserverBug3.tar.gz


> "Marcus G. Daniels" wrote:
> 
>     ---------------------------------------------------------------
>> I started studing of tutorial applications. I have question to
> application simpleObserverBug. I would like to do this:
> 
> 1, Automatic stop if there is no food.
> 
> 2, Make graph of quantity of food. There I may see, how much of food
> remaining. And I have information about time (number of steps)
>

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