swarm-support
[Top][All Lists]
Advanced

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

Re: Parameter Managers and all that...


From: mcmullin
Subject: Re: Parameter Managers and all that...
Date: Fri, 4 Apr 1997 16:47:55 -0700 (MST)

On 31 Mar, address@hidden wrote:
[...]
>   Those of you who have implemented parameter managers of one sort
> or another, could you summarize your approach and your implementation?

Belated response on this:

I have implemented a very simplistic parameter manager
in a few of my models.  It provides instance variables
for all parameters (all simple data types in my case)
so that I can put a probeDisplay on it for user viewing
and setting.  It also provides support for storing and
loading these from a disk file (layered on top ot
InFile and OutFile).

The only technically interesting issue here is how to
make these values available where they are needed in
the sim.  My earlier approach was to typically to use
pseudo-call variables in relevant classes to hold the
"real" parameter values; there were class methods for
setting (and getting, if necessary) these values.  I
used class variables because it seemed the appropriate
way of having a single value that could control the
behaviour of all objects of a given class (rather than,
for example, having an instance variable in every
instance which would have to be separately updated if
the parameter were changed). The parameter manager was
responsible for updating all these class variables,
based on the "mirrored" values in its instance vars,
whenever necessary.  I have since found this mechanism
(pseudo class vars) was just too cumbersome; and,
somewhat against my normal principles, I have started
making all my "real" parameters simple global variables
(of course, the parameter manager must still keep its
instance vars and these global vars consistent with
each other).

Just my tuppence worth...

-  Barry.

PS: I always try to distinguish between things which
are part of the "state" of my model - i.e. autonomously
change as part of the model dynamics - and things which
can only change through external manipulation by a
"user"; I reserve the term "parameter" for the latter.
With this usage, anything to do with random number
generator or distribution "states" are part of "model
state" and not the responsibility of the parameter
manager (in my case they are looked after by a "world
manager" object)...

-- 

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
| Barry McMullin, ALife Group,               |    address@hidden |
| Santa Fe Institute, 1399 Hyde Park Road,   |  Voice: +1-505-984-8800 |
| Santa Fe, NM 87501, USA.                   |  FAX:   +1-505-982-0565 |
| http://www.eeng.dcu.ie/~mcmullin           |                         |
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



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