Re-write your code so that it accepts command line arguments for the
parameters you want to vary. You need to have a command line argument for
the random seed too, since you want to adjust that.
I worked on some new Swarm tutorial on how to do that. Did not write for
Java, but maybe you can get the idea. You should find that in Swarm CVS apps
directory, look for SimpleBatchSwarm. I have a pretty recent snapshot here:
http://lark.cc.ku.edu/~pauljohn/Swarm/MySwarmCode/swarmapps_snap_20040925.tar.gz
For the scripting, you can use many alternatives. Sometimes I've used Drone,
a free program you can download that was developed at U Michigan by Ted
Belding. Also I wrote a Perl script "replicator" that also works. I've used
these with Obj-C swarm models, but I bet if you look into it and give it a
try and it does not work, you can ask again here and some Java users will
know what to do.
In the Swarm Faq Memos directory, there are some notes about writing
command-line processing into Swarm Java models.
pj
Vegard Hartmann wrote:
Hi,
I saw a post on the mailing list by Paul Johnson where he briefly mentions
that he uses scripting tools to re-start swarm models. As I am new to
Linux I do not know much about scripts. However, it would be very useful
for me to use a script to run my application as I am having some memory
leak problems. I use Fedora Core 2 and java. I read all my simulation
parameters from a scm file, and there are two values in this that needs to
be changed from one run to the other, these are in the two lines below
from my scm file:
#:loadFile "load.generation.hdf5"
#:saveFile "save.generation.hdf5"
My question is therefore how, or if it is possible, to write a script that
runs my model several times, and for each time modifies the two lines
above in my scm file?
-Vegard
_______________________________________________
Support mailing list
address@hidden
http://www.swarm.org/mailman/listinfo/support