- Declared in:
- ObserverSwarm.h
The ObserverSwarm graphically displays many of these measures as Opinion is running. ObserverSwarm creates a series of rasters, one for each feature in each neighborhood. The "enableToggleRasters" button on the interface will condense this to show a particular feature for each of the neighborhoods, and a left click will toggle between features. Each raster displays the average opinion on that issue of the citizens in each cell of the homeGrid. The average opinion is represented by the color of the cell. By observing the diversity and pattern of colors in the raster, the user can get an idea of the diversity of opinion on the issue at that point in time on that issue. ObserverSwarm also creates graphs that help summarize the model's changes across time. One graph displays the number of interactions and the number of opinion changes that have occurred over time. By observing the number of changes, one can assess the degree of instability that was present at any given point in time. Another graph displays the average opinion on each issue across time. Changes in average opinion indicate instability in opinion on that issue. The third graph displays average acquaintance, harmony, identicality and multidimensional entropy over time. These measures all give the user a picture of the degree of heterogeneity in opinion that exists within the model across time. Using these graphs then, the user can assess stability and heterogeneity of the model at any given time.
Initiate the creation of the observer object
All schedules have to be woven into the larger time reference
Create the actions necessary for the observer part simulation.
Create the objects used in the display of the model.
createEnd completes the creation work
flushes the values stored in the memory rasters onto the physical screen
On raster f, at coordinates posX ,posY, draw the indicated color.
Free memory used by allocated objects
This switches the GUI dispay. Use it before the model
starts. IF NO
, then there is one
raster per feature/issue per home neighborhood. If
YES
, then only one feature/issue is
shown for each neighborhood.
Return the 2D array of rasters
Return the row of rasters that corresponds to the indicated neighborhood
Returns the value of the i'th contact sequence
Sets the parameter object from which system variables can be retrieved
Check to see if the experiment is finished. If so, set the Swarm state to stopped
Does work needed when toggle rasters is used
allocate colors
Description forthcoming.
Description forthcoming.
An ActionGroup of things done at display time
How many timesteps before display updates (usu dayLength)
Schedule of display updates
the Swarm we're observing
An Array of Arrays of feature displays. One Array for each N-hood, each of them has a display for each feature
An Array of Arrays of rasters, one for each N-hood/feature
graphs opinion levels
Description forthcoming.
checks to see if the simulation should stop
graphing widgets
are toggleRasters enabled?
2d display widget