Parameters


Inherits From:
Arguments_c
Declared In:
Parameters.h


Class Description

The Artificial Stock Market model has a very large set of parameters. Until ASM-2.2, these paramters were set inside various implementation files, making them difficult to find/maintain. Now all parameters are set through separate objects, which can be called upon whenever needed.

The Parameters class is an example of a general purpose Swarm command-line processing class. In case one is designing batch simulations, this is the place to customize the command line options and read them into the program. From the command line, type "./asm --help" to see a list of command line arguments this program will respond to. You should see all default Swarm command line parameters as well as --run, which is specific to this project. More parameters can be added in the parseKey:arg: method of this class.

This class also takes responsibility for making sure that objects to manager parameters for the ASMModelSwarm and the BFagents are created.


Instance Variables

ASMModelParams * asmModelParams;
BFParams * bfParams;
int run;

asmModelParamsparameter object used by ASMModelSwarm
bfParamsparameter object used by BFagent and its various objects, such as BFCast
runNo description.


Method Types

+ createBegin:
- getModelParams
- getBFParams
- sayHello
- init


Class Methods

createBegin:

+ createBegin:aZone

No method description.


Instance Methods

getBFParams

- (BFParams*)getBFParams

Returns an instance of the BFParams class, an object which holds the default parameter of the BFagents. If they desire to do so, BFagents can create their own instances of BFParams, copy default settings, and then allow their parameters to 'wander'. (As far as I know, this potential did not exist before and has not been used. PJ-2001-10-31)


getModelParams

- (ASMModelParams*)getModelParams

Returns an instance of ASMModelParams, the object which holds the model-level input parameters


init

- init

This performs the vital job of using the lispAppArchiver to read the baseline values of the parameters out of the asm.scm file and then creating the parameter objects--asmModelParms and bfParams--that hold those values and make them avalable to the various objects in the model


sayHello

- sayHello

Sometimes we worry that the Parameter object did not get created properly, so this method tells it to speak to the command line with a warm greeting


Version 1.1 Copyright ©2001. All Rights Reserved.