Skip to content

Commit 1ea707c

Browse files
authored
Update imports to use mesa.discrete_space module (#282)
Replaced imports from mesa.experimental.cell_space with mesa.discrete_space across multiple example models and agents. This follows the stabilization of the discrete spaces. This makes all the examples require Mesa 3.2 or above.
1 parent 130d3d5 commit 1ea707c

File tree

16 files changed

+17
-17
lines changed

16 files changed

+17
-17
lines changed

examples/aco_tsp/aco_tsp/model.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import mesa
44
import networkx as nx
55
import numpy as np
6-
from mesa.experimental.cell_space import CellAgent, Network
6+
from mesa.discrete_space import CellAgent, Network
77

88

99
@dataclass

examples/bank_reserves/bank_reserves/agents.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
Northwestern University, Evanston, IL.
1010
"""
1111

12-
from mesa.experimental.cell_space import CellAgent
12+
from mesa.discrete_space import CellAgent
1313

1414

1515
class Bank:

examples/bank_reserves/bank_reserves/model.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
import mesa
1313
import numpy as np
14-
from mesa.experimental.cell_space import OrthogonalMooreGrid
14+
from mesa.discrete_space import OrthogonalMooreGrid
1515

1616
from .agents import Bank, Person
1717

examples/caching_and_replay/model.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""This file was copied over from the original Schelling mesa example."""
22

33
import mesa
4-
from mesa.experimental.cell_space import CellAgent, OrthogonalMooreGrid
4+
from mesa.discrete_space import CellAgent, OrthogonalMooreGrid
55

66

77
class SchellingAgent(CellAgent):

examples/charts/charts/agents.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
Northwestern University, Evanston, IL.
1010
"""
1111

12-
from mesa.experimental.cell_space import CellAgent
12+
from mesa.discrete_space import CellAgent
1313

1414

1515
class Bank:

examples/charts/charts/model.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
import mesa
1313
import numpy as np
14-
from mesa.experimental.cell_space import OrthogonalMooreGrid
14+
from mesa.discrete_space import OrthogonalMooreGrid
1515

1616
from .agents import Bank, Person
1717

examples/forest_fire/Forest Fire Model.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
},
7979
"outputs": [],
8080
"source": [
81-
"from mesa.experimental.cell_space import FixedAgent\n",
81+
"from mesa.discrete_space import FixedAgent\n",
8282
"\n",
8383
"\n",
8484
"class TreeCell(FixedAgent):\n",
@@ -129,7 +129,7 @@
129129
"metadata": {},
130130
"outputs": [],
131131
"source": [
132-
"from mesa.experimental.cell_space import OrthogonalMooreGrid\n",
132+
"from mesa.discrete_space import OrthogonalMooreGrid\n",
133133
"\n",
134134
"\n",
135135
"class ForestFire(Model):\n",

examples/forest_fire/forest_fire/agent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from mesa.experimental.cell_space import FixedAgent
1+
from mesa.discrete_space import FixedAgent
22

33

44
class TreeCell(FixedAgent):

examples/forest_fire/forest_fire/model.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import mesa
2-
from mesa.experimental.cell_space import OrthogonalMooreGrid
2+
from mesa.discrete_space import OrthogonalMooreGrid
33

44
from .agent import TreeCell
55

examples/hex_snowflake/hex_snowflake/cell.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from mesa.experimental.cell_space import FixedAgent
1+
from mesa.discrete_space import FixedAgent
22

33

44
class Cell(FixedAgent):

0 commit comments

Comments
 (0)