mesa_frames.Grid.__init__#

Grid.__init__(model: mesa_frames.concrete.model.Model, dimensions: Sequence[int], torus: bool = False, capacity: int | None = None, neighborhood_type: str = 'moore')#

Create a new AbstractGrid.

Parameters:
  • model (mesa_frames.concrete.model.Model) – The model to which the space belongs

  • dimensions (Sequence[int]) – The dimensions of the grid

  • torus (bool, optional) – If the grid is a torus, by default False

  • capacity (int | None, optional) – The maximum capacity for cells (default is infinite), by default None

  • neighborhood_type (str, optional) – The type of neighborhood to consider, by default “moore”