[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: What is in initSwarm()? Was going to ask, but now propose an answer
From: |
Marcus G. Daniels |
Subject: |
Re: What is in initSwarm()? Was going to ask, but now propose an answer for FAQ or DOCS |
Date: |
10 Feb 2000 10:37:00 -0800 |
User-agent: |
Gnus/5.070084 (Pterodactyl Gnus v0.84) Emacs/20.4 |
>>>>> "PJ" == Paul Johnson <address@hidden> writes:
PJ> lispAppArchiver (??)
PJ> hdf5AppArchiver (??)
Whereas {lisp,hdf5}Archiver are used to store data in a single place
across a number of applications (e.g. ~/.swarmArchiver for saving
window positions), {lisp,hdf5}AppArchiver are used to store data about
a single application in a application-specific location. If you run a
model from its build directory, the place is that build directory. If you
run it from an installed location (e.g. the Swarm demos for Windows)
that place is $DATADIR/swarm/APPNAME/APPNAME.scm. $DATADIR is
whatever you specific as --datadir at configure time, typically it's
$SWARMHOME/share, e.g. on a Redhat machine, /usr/share.
An example of lispAppArchiver can be found in main.m of heatbugs,
for creating a batch ModelSwarm from heatbugs.scm:
if ((theTopLevelSwarm = [lispAppArchiver getWithZone: globalZone
key: "batchSwarm"]) == nil)
raiseEvent(InvalidOperation,
"Can't find the parameters to create batchSwarm");
..which loads heatbugs.scm (the name is the application name plus ".scm"):
The ``key: "batchSwarm"'' part says to use the instantiation expression
below "'batchSwarm".
(list
(cons 'batchSwarm
(make-instance 'HeatbugBatchSwarm
#:loggingFrequency 1
#:experimentDuration 250))
(cons 'modelSwarm
(make-instance 'HeatbugModelSwarm
#:numBugs 200
#:minIdealTemp 10000
#:maxIdealTemp 20000
#:minOutputHeat 10000
#:maxOutputHeat 20000
#:randomMoveProbability 0.0)))
==================================
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.