swarm-support
[Top][All Lists]
Advanced

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

New Swarm utility: Runtime scripting


From: Benedikt Stefansson
Subject: New Swarm utility: Runtime scripting
Date: Thu, 05 Feb 1998 23:39:44 -0800

Hi,

I'm including a small tar ball with a new utility that probably could be
of use to some Swarm users. This is a "Script" object, that allows you
to execute scripts for a Swarm simulation at runtime. I've also asked
the Hive staff to put this on the user-contrib website.

Runtime scripting can be useful for example if you have a sequence of
events that should happen at predetermined timesteps, but you need to be
able to vary the sequence and the methods that are executed without
recompiling the application. You can also write the events out to a log
for future reference, and the log can be read by Script since it is in
the same format as a script file.

For each event in the runtime script you must  provide information so
that the Script can find the target object (typically the target is
either the ModelSwarm or an object that the ModelSwarm can provide a
pointer to), the timestep at which the event should be executed, and the
method that should be called with the requisite number of arguments. As
you may have guessed this object flexes the Activity and ProbeLibrary
quite extensively. Script executes as a subswarm and it's schedules are
integrated into the activity hierarchy in the Swarm.

I would like to thank Professor Melissa Savage of UCLA's Geography
Department for supporting the work that went into this project. I've
tested scripting on Arborgames (available on the Swarm website) and some
of my own programs, with Swarm 1.0.3 and 1.0.5. Please e-mail me if you
find any bugs (one known problem - which should not affect most users -
is noted in the README file).

For further information please see the README file that comes with the
class.   I'm attaching a gzip'ed tarfile with the class, a README file
and a HTML manual.

-Benedikt
PS. Even if you _don't_ have problems it would be nice to know if people
find this useful.
--
----------------
Benedikt Stefansson                 address@hidden
Department of Economics, UCLA       Fax. (310) 825-9528
Los Angeles, CA 90095-1477          Tel. (310) 825-4126

Attachment: Script.tar.gz
Description: GNU Zip compressed data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]