Skip to content

Commit 689bae0

Browse files
authored
fix(examples): warehouse (#262)
* chore(pip): add requirements.txt * doc: update README.md * ref: move non-app files to warehouse/ * fix(color_patches): update for mesa refactor
1 parent 92366f9 commit 689bae0

File tree

8 files changed

+5
-5
lines changed

8 files changed

+5
-5
lines changed

examples/color_patches/color_patches/model.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import mesa
88

99

10-
class ColorCell(mesa.experimental.cell_space.CellAgent):
10+
class ColorCell(mesa.discrete_space.cell_agent.CellAgent):
1111
"""
1212
Represents a cell's opinion (visualized by a color)
1313
"""

examples/warehouse/Readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ An additional item of note is that to reference the RobotAgent created in model
2323
This model requires Mesa's recommended install
2424

2525
```
26-
$ pip install mesa[rec]
26+
$ pip install 'mesa[rec]>=3'
2727
```
2828

2929
## How to Run

examples/warehouse/app.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@
33
import solara
44
from mesa.visualization import SolaraViz
55
from mesa.visualization.utils import update_counter
6-
7-
from .agents import InventoryAgent
8-
from .model import WarehouseModel
6+
from warehouse.agents import InventoryAgent
7+
from warehouse.model import WarehouseModel
98

109
# Constants
1110
LOADING_DOCKS = [(0, 0, 0), (0, 2, 0), (0, 4, 0), (0, 6, 0), (0, 8, 0)]

examples/warehouse/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
mesa[rec]>=3
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)