Grids

In this document:
Defining grid cell size
Viewing and using grid maps

A grid is a structure for holding model data that varies across space. You can picture a grid by thinking of a spreadsheet. Each cell in the spreadsheet holds a distinct value which is identified by location coordinates (row and column numbers). Behaviors use grids to store data and to share it between behaviors.

Defining grid cell size

Grids are always exactly the same size as the plot. Grids have an X and a Y axis, which match the orientation and size of the plot's axes. Each cell within the grid is a rectangle with a separate X and Y size. If the chosen grid cell sizes do not divide evenly into the X and Y plot lengths, the length of the cells in the last rows in each direction will be the remainder value. Grids can, and usually do, carry more than one value per cell. Grid cell size applies to all values in the grid. The amount of memory required for a grid cell is proportional to the number of total values it holds, which is the number of values per cell multiplied by the number of cells.

For most grids, you can define the size of the cells in the X and Y directions by using the Grid setup window. You do not have to choose the size of a grid's cells; all grids have default values. However, there are times when it makes sense to adjust these values. When choosing a cell size, you should pick the largest possible value that adequately captures the resolution of the process being modeled, to minimize the model's memory requirements and maximize its speed. If you have a set of behaviors that work together and you are defining cell sizes for multiple grids, picking even multiples of a number for different grids (such as 2, 4, 8...) will help maximize the efficiency of data transfer between them.

Viewing and using grid maps

During the simulation, the model can write out a grid map (the data in a grid) into a detailed output file. You can choose what you would like saved from a grid by using the Output setup window.

Things you can do with grid maps:

25-Jan-2005 01:02 PM