Community Grid Model Class
Community Grid Model Class
A community_model whose pattern is a regular, rectangular grid of points.
SimComm::community_model -> community_gridmodel
tessA tessellation of the window containing the points, used to plot the model.
neighborhoodA character string defining what is the neighborhood of a cell: "von Neumann 1" or "4" for the closest four neighbors (North, West, South, East); "Moore 1" or "8" for all adjacent cells (the first four and North-West, etc.); "Moore 2" or "24" for two rings of neighbors.
new()Create a new instance of this R6 class.
community_gridmodel$new(
pattern = pattern_grid(),
timeline = 0,
type = "Species",
neighborhood = "von Neumann 1"
)patternThe pattern which describes the location of agents.
timelineA numeric vector that contains the points of time of interest.
typeThe type of individuals. Informational only.
neighborhoodA character string defining what is the neighborhood of a cell: "von Neumann 1" or "4" for the closest four neighbors (North, West, South, East); "Moore 1" or "8" for all adjacent cells (the first four and North-West, etc.); "Moore 2" or "24" for two rings of neighbors.
plot()Plots the pattern.
timeThe point of the timeline considered.
Its value should be in timeline.
sleepThe time (in ms) to sleep between each step of the evolution of the model.
which.marksThe marks to plot, that must be a the name of a column of the mark dataframe.
...Extra arguments to be passed to methods.