MyArguments class documentation

Authors

Generated by pauljohn

Software documentation for the MyArguments class

MyArguments : Arguments_c

Declared in:
MyArguments.h

A global object called arguments is created by the initSwarmArguments() function in main.m. The way in which the command line arguments are parsed is controlled by this class, MyArguments. Swarm can read in and process command line parameters that are given at start time. Command line argument processing opens the possibility of running batches of simulations that automatically change parameter values with each experiment. This can be done by using Swarm with an auxiliary program called Drone.

If you want to see which command line arguments are defined, run the program with the arguments --help or --usage. That will list all of the command line options.

Method summary

createBegin:

+ (id) createBegin: (id)aZone;

This initiates the work of creating the arguments object. It defines a structure that controls argument parsing. It also sets the default values of many parameters, so in case they are not set from the command line, then there is a fall back value.


getConsistentAdjustment

- (BOOL) getConsistentAdjustment;

Returns YES or NO, depending on the consistentAdjustment parameter


getFilename

- (char*) getFilename;

Returns the input filename of the lisp serialization file, if there was one. Otherwise nil.


getOneAtATime

- (BOOL) getOneAtATime;

Returns the command-line value set for oneAtATime. See Parameters


getOnlyOneAdjusts

- (BOOL) getOnlyOneAdjusts;

Returns YES or NO, depending on whether only one agent may change its opinion.


getOnlySelfAdjusts

- (BOOL) getOnlySelfAdjusts;

Returns YES or NO, depending on whether the agent who initiates the conversation is the only one that can change its opinion.


getPplPerCellArg

- (int) getPplPerCellArg;

Returns the value of pplPerCell (people per cell).


getRandomOrder

- (BOOL) getRandomOrder;

Returns an indicator that citizens are told to step in a randomized order


getRunArg

- (int) getRunArg;

Returns the run number


getSeedArg

- (int) getSeedArg;

Returns the seed number


getVariableCellSize

- (BOOL) getVariableCellSize;

Returns whether or not cells may have a variable number of members when the citizens are created.


getWrapAround

- (BOOL) getWrapAround;

Returns YES or NO, depending on whether the grid is seen as a flat square or a torus


sayHello

- (id) sayHello;

Diagnostic output prints to the screen if you call this