Skip to content

Commit

Permalink
paper: Move discrete agents part
Browse files Browse the repository at this point in the history
  • Loading branch information
EwoutH committed Dec 28, 2024
1 parent 7836ae1 commit 8bb921e
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions paper/paper.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,12 @@ grid = OrthogonalVonNeumannGrid(
)
```

Mesa provides specialized agent classes for spatial interactions in the discrete spaces:

- `FixedAgent`: Remains at its assigned cell
- `CellAgent`: Can move between cells and access its current location
- `Grid2DMovingAgent`: Extends `CellAgent` with directional movement methods

All discrete spaces support PropertyLayers - efficient numpy-based arrays for storing environmental data:
```python
grid.create_property_layer("elevation", default_value=10)
Expand All @@ -97,14 +103,6 @@ space = ContinuousSpace(x_max, y_max, torus=True)
space.move_agent(agent, (new_x, new_y))
```

Mesa provides specialized agent classes for spatial interactions:

- `FixedAgent`: Remains at its assigned cell
- `CellAgent`: Can move between cells and access its current location
- `Grid2DMovingAgent`: Extends `CellAgent` with directional movement methods

These agent types interface with Mesa's spaces while enforcing appropriate movement constraints and cell access patterns.

### Time advancement
Typically, agent-based models rely on incremental time progression or ticks. For each tick, the step method of the model is called. This activates the agents in some way. The most frequently implemented approach is shown below, which runs a model for 100 ticks.

Expand Down

0 comments on commit 8bb921e

Please sign in to comment.