@@ -73,7 +73,7 @@ def __init__(self, width=20, height=20):
73
73
"""
74
74
super ().__init__ ()
75
75
self ._grid = mesa .space .SingleGrid (width , height , torus = False )
76
- self ._schedule = mesa .time .SimultaneousActivation (self )
76
+ self .schedule = mesa .time .SimultaneousActivation (self )
77
77
78
78
# self._grid.coord_iter()
79
79
# --> should really not return content + col + row
@@ -85,15 +85,15 @@ def __init__(self, width=20, height=20):
85
85
(row , col ), self , ColorCell .OPINIONS [self .random .randrange (0 , 16 )]
86
86
)
87
87
self ._grid .place_agent (cell , (row , col ))
88
- self ._schedule .add (cell )
88
+ self .schedule .add (cell )
89
89
90
90
self .running = True
91
91
92
92
def step (self ):
93
93
"""
94
94
Advance the model one step.
95
95
"""
96
- self ._schedule .step ()
96
+ self .schedule .step ()
97
97
98
98
# the following is a temporary fix for the framework classes accessing
99
99
# model attributes directly
@@ -117,13 +117,3 @@ def grid(self):
117
117
AttributeError: 'ColorPatches' object has no attribute 'grid'
118
118
"""
119
119
return self ._grid
120
-
121
- @property
122
- def schedule (self ):
123
- """
124
- mesa_ABM/examples_ABM/color_patches/mesa/visualization/ModularVisualization.py",
125
- line 278, in run_model
126
- while self.model.schedule.steps < self.max_steps and self.model.running:
127
- AttributeError: 'NoneType' object has no attribute 'steps'
128
- """
129
- return self ._schedule
0 commit comments