- Declared in:
- Parameters.h
Parameters is an "overarching" object that has parameters that are needed by many classes in the simulation. It works together with MyArguments to process command line parameters that are given at start time. In GUI mode, it creates a probe display that allows the user to enter parameter values before the simulation begins. 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.
Parameters has all of the same instance variables as MyArguments , plus a few more. It exists as a separate class only because MyArguments, the command line argument processor, carries along with it some baggage that makes it difficult to serialize. So I opt to just copy parameters out of the default arguments object and keep them here in Parameters because I can control its features.
The variable "numNeighborhoods" is the number of homeGrids. The number of workPlaces is set by the numWorkplaces parameter. The dimensions of each homeGrids are (worldXSize by worldYSize) and the dimensions of workGrid are (workXSize by workYSize).
If variableCellSize is 0, then the number of citizens in each cell is set at the parameter pplPerCell. If variableCellSize is 1, then the number of citizens in a given cell is a draw from Uniform[0, 2*pplPerCell].
Parochialism is the probability that someone looks for a discussant in their own cell rather than looking to a neighbor. This affects Axelrod and Coleman selection models.
wrapAround and oneAtATime control the nature of the basic simulation model. If wrapAround is 1, agents are situated in a toroidal world in which none are on the "edge." If wraparound is 0, as in Axelrod's original model, citizens on the edge have fewer possible discussants. If oneAtATime is 1, Axelrod's approach is followed of randomly selecting one agent to act at each step. When oneAtATime is 0, we have a Knight's tour of all agents before any agent repeats its step. Unless randomizeCitizenUpdateOrder is 0, the tour of agents will traverse a randomly mixed list of agents each time through.
Daylength determines the number of Swarm time steps that occur during the "day" of an agent. A "day" is broken into steps, during which the agent can move from one neighborhood to another or initiate an interaction.
Begin the creation of the Parameter object
Returns a sanitized character string for today's date
If it is the case that two agents are allowed to change their opinions, then should we require that their changes are consistent? Should we rule out the possibility that each might copy the other and they would part still disagreeing? This returns an indicator if the consistentAdjustment flag is yes or no
Return the Boolean variable oneAtATime
Is it possible that both agents who interact might
change their minds. If so, then onlyOneAdjusts
should be NO
. THe logic that determins
which (or both) changes has to be set within the
Citizen class (or its descendants)
When an agent initiates an interaction, is that agent the only one that can change its opinion after?
Returns the number of agents per cell in the neighborhood
Return the Boolean variable randomOrder
Returns the run number
Returns the value of the random seed, either from the command line or graphical interface
Returns the variable indiciating if the number of agents per cell is variable or not
Indicates whether the grid is seen as a wrap around torus or not.
Description forthcoming.
Description forthcoming.
Sets the value of the random seed.
Toggles the way the citizenList is processed at each step. If the list is processed oneAtATime, then it is the Axelrod method. That means one makes N draws (with replacement) from the collection and tells each agent to step. Otherwise, a tour through the whole list is made before beginning again.
In case the oneAtATime method is not used, this assures that the list of agents is processed in random order at the beginning of each day
If variableCellSize = NO
, then all home
neighborhoods have the same number of cells.
If YES
, then the agents are distributed
unevenly over the neighborhood.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.