Skip to content

Commit

Permalink
Fix two more cases of a missing super().__init__() in the model init (#…
Browse files Browse the repository at this point in the history
…89)

* boltzmann_wealth_model_experimental: Add super().__init__()

One more case of super().__init__()

* Another super().__init__()
  • Loading branch information
EwoutH authored Jan 22, 2024
1 parent fc13cf9 commit 2162451
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions examples/boltzmann_wealth_model_experimental/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ class BoltzmannWealthModel(mesa.Model):
"""

def __init__(self, N=100, width=10, height=10):
super().__init__()
self.num_agents = N
self.grid = mesa.space.MultiGrid(width, height, True)
self.schedule = mesa.time.RandomActivation(self)
Expand Down
2 changes: 1 addition & 1 deletion examples/caching_and_replay/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class Schelling(mesa.Model):

def __init__(self, width=20, height=20, density=0.8, minority_pc=0.2, homophily=3):
""" """

super().__init__()
self.width = width
self.height = height
self.density = density
Expand Down

0 comments on commit 2162451

Please sign in to comment.