swarm-support
[Top][All Lists]
Advanced

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

Re: Simulation Parameters


From: Marcus G. Daniels
Subject: Re: Simulation Parameters
Date: 08 Aug 1999 23:23:22 -0700
User-agent: Gnus/5.070084 (Pterodactyl Gnus v0.84) Emacs/20.4

>>>>> "DS" == Darren Schreiber <address@hidden> writes:

DS> So, what is the best way to make simulation parameters available
DS> to all objects in the model and to also use them at compile time
DS> to create fixed arrays?

I usually make a global object, e.g.

id globals;

that is an instance of a class that has the parameters as instance 
variables, and which has methods like getNumberOfIssues.

A fancier solution is to use the initSwarmAppOptions or
initSwarmArguments startup routines.  These routines let you call a
parse function or method according to command line arguments.
In the latter case, the idea is that you set extra ivars in a
Arguments subclass which you provide.

http://www.santafe.edu/projects/swarm/swarmdocs/set/swarm.defobj.arguments.protocol.html


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