ASMBatchSwarm


Inherits From:
Swarm
Declared In:
ASMBatchSwarm.h


Class Description

If the model is started with ./asm -b, then this ASMBatchSwarm acts as the top level Swarm. The benefit here is that the model runs faster because it is not driving a graphical interface. It also turns on data-writing.


Instance Variables

int loggingFrequency;
int experimentDuration;
id <ActionGroup> displayActions;
id <Schedule> displaySchedule;
id <Schedule> stopSchedule;
ASMModelSwarm * asmModelSwarm;
id output;

loggingFrequencyhow often to write data
experimentDurationhow long should a run last
displayActionsSet of actions that update output
displayScheduleSchedule for periodic actions
stopScheduleSchedule which checks to see if the simulation has completed its requisite number of timesteps
asmModelSwarmInstance of ASMModelSwarm, where agents and the world are created and scheduled
outputReference to instance of Output class, the place where data file output is controlled


Method Types

+ createBegin:
- buildObjects
- buildActions
- activateIn:
- expostParamWrite
- go
- stopRunning
- drop


Class Methods

createBegin:

+ createBegin:aZone

No method description.


Instance Methods

activateIn:

- activateIn:swarmContext

activateIn: is required to preserve the hierarchy of schedules across many levels


buildActions

- buildActions

Create schedules. Assures that the output object writes the data when needed and checks to see if the required number of time steps has been completed


buildObjects

- buildObjects

Create a model swarm, have the model swarm build its objects, and then get the output object from the model. Later the output object is instructed to write results


drop

- (void)drop

The drop method lets objects know the simulation is coming to an end, so if they are waiting to write some data, they should do it


expostParamWrite

- expostParamWrite

Tell the objects that are keeping records on parameter values to write them to files at the end of the simulation.


go

- go

Once schedules are created and activatedIn to the right part of the hierarchy, then go makes processing start with actions at time 0, then 1, then...


stopRunning

- stopRunning

tell the top level swarm to terminate the simulation


Version 1.1 Copyright ©2001. All Rights Reserved.