swarm-support
[Top][All Lists]
Advanced

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

Re: var change at runtime.


From: Rick Riolo
Subject: Re: var change at runtime.
Date: Mon, 26 Jul 1999 08:08:24 -0400 (EDT)

The way the heatbugs probe into the model object and parameters
is done, changing those values after a run has started has no
effect, because
a) some are just used to contruct the bugs and the world, 
   which happens just once in the run
b) some, like the heatspace parameters, are sent to the
   heatspace just once, at the start of the run.

There are several ways you can get around this
that I can think of off-hand:

1) for the heatspace parameters, you can following a link
   from the model object probe to bring up a heatspace
   object probe, and change the values directly in the heatspace
   object.  this of course involves no programming.
   In principle I suppose you could do this to change most
   anything in the various objects in a model, but it could
   get messy.

2) you could do what (I think) marcus suggested, i.e., add
   a method to the model object to change those values,
   i.e., to send the values to the heatspace object.
   (sometimes objects will already have the proper methods
   for setting IVs, but I don't think the model object in
   heatbugs has one for heatspace, so this won't work for
   your example without doing a little programming.

3) you could use this method:
     - eventOccurredOn: (id) anObject
                   via: (id) aProbe
         withProbeType: (const char *)aProbeType
                    on: (const char *)probedElement
                ofType: (char)dataType
              withData: (void *)data 
   to catch changes made via probes, and then have some special
   method you write transmit that change to the appropriate
   objects, eg heatspace or the bugs themselves.

- r



Rick Riolo                           address@hidden
Center for Study of Complex Systems (CSCS)
4477 Randall Lab                
University of Michigan         Ann Arbor MI 48109-1120
Phone: 734 763 3323                  Fax: 734 763 9267
http://www.pscs.umich.edu/PEOPLE/rlr-home.html

On Sun, 25 Jul 1999, Faiz ul Haque Zeya wrote:

> Date: Sun, 25 Jul 1999 16:33:25 -0500
> From: Faiz ul Haque Zeya <address@hidden>
> Reply-To: address@hidden
> To: address@hidden
> Subject: var change at runtime.
> 
> hi,
>    i would like to confirm if it is possible  to change parameters at runtime 
> (when the simulation is running)  thorugh control panel /probe. for example 
> diffusion constant in heatbugs. any example showing/demonstating that.
> thanks and regards
> faiz
> --------
> address@hidden
> 1-918-631-4382
> http://www.mcs.utulsa.edu/~faiz
> 
> 


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