swarm-support
[Top][All Lists]
Advanced

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

Parameter passing in batch mode


From: Sven Thommesen
Subject: Parameter passing in batch mode
Date: Mon, 19 Aug 1996 13:21:39 -0700

I see that we will soon have the ability in 
Swarm to read in parameters from disk to use 
in multiple batch runs. 

This brings up the following programming 
question: I can see two ways to pass 
parameters from the disk file to the 
different objects (agents, spaces, swarms) in 
a simulation. 

One is to read all the relevant parameters 
into a big object (struct) and pass the 
address of this struct along to everyone. 

The other is to define in each swarm/object 
any parameter needed (a) internally, (b) for 
the creation of sub-objects, or (c) to be 
passed along unchanged to sub-objects, and 
then to pass parameters down from the 
batch-swarm / observer-swarm in the 
'regulation' Objective-C fashion (using 
'setParameter' messages).

No doubt the first method is easier on the 
programmer. Are there arguments (beyond 
concerns for O-O purity) for using the second 
method?

If anyone has experience or strong 
theoretical opinions on this one way or 
the other, I'd appreciate your input. 

Cheers,
Sven


reply via email to

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