AppSpecificCell class documentation

Authors

Generated by pauljohn

Software documentation for the AppSpecificCell class

AppSpecificCell : MultiGridCell

Declared in:
AppSpecificCell.h

When a program uses the MultiGrid2d to manage the grids, the program can customize the behavior of the cells to perform project-specific tasks. This class does that job for the Opinion model. It collects information about the status of agent opinion within the cell. If one does not need customized functionality, one can simply use the generic AVLCell or MultiGridCell classes.

Method summary

toggle

+ (int) toggle;

Sometimes we are tracking a specific issue/feature in the model. This increments by one the value of the feature being tracked. It will wrap around to 0 after it reaches the maximum.


createCollection

- (id) createCollection;

This creates an AVLSet to contain objects that are inserted in this cell


createEnd

- (id) createEnd;

finish work of creating this object


drawColor:

- (void) drawColor: (id)color;

Sometimes its useful to be able to tell a cell to draw itself in a particularcolor.


drawSelf

- (void) drawSelf;

Represent the state of opinion in this cell on a the rasters


drawSelfBatch

- (id) drawSelfBatch;

Use only for batch mode! This is the draw self method that works in batch mode. In batch mode, a special kind of raster picture is made and this does the work.


drawSelfOn:

- (void) drawSelfOn: (id<Raster>)r;

The cell draws itself on the indicated raster


getAvgCultureFeature:

- (double) getAvgCultureFeature: (int)f;

Returns the average of the issue/feature f in this cell


getCurrentFeature

- (int) getCurrentFeature;

Return the value of the feature/issue currently being monitored


getOutputValue

- (int) getOutputValue;

The output value returned is the average of agent opinions on feature/issue f


getSumCultureFeature:

- (int) getSumCultureFeature: (int)f;

Calculates the average of issue/feature f in this cell, retains that value as an IVAR, and returns the sum of features in this cell


initializeAllValues

- (id) initializeAllValues;

Sets counter and summary variables equal to 0


insertItem:

- (BOOL) insertItem: (id)obj;

Insert an item into the collection that this cell maintains


setRasterList:

- (id) setRasterList: (id<Array>)rasters;

Sets the Swarm Array of rasters that are used in GUI versions of the model


setupCultureFeatures

- (id) setupCultureFeatures;

Creates data collection frameworks for this cell