From 21624513c6ad94faabbb1cb4b97d73b897f9afae Mon Sep 17 00:00:00 2001 From: Ewout ter Hoeven Date: Mon, 22 Jan 2024 13:32:37 +0100 Subject: [PATCH] Fix two more cases of a missing super().__init__() in the model init (#89) * boltzmann_wealth_model_experimental: Add super().__init__() One more case of super().__init__() * Another super().__init__() --- examples/boltzmann_wealth_model_experimental/model.py | 1 + examples/caching_and_replay/model.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/boltzmann_wealth_model_experimental/model.py b/examples/boltzmann_wealth_model_experimental/model.py index 0f61b883..11a3e958 100644 --- a/examples/boltzmann_wealth_model_experimental/model.py +++ b/examples/boltzmann_wealth_model_experimental/model.py @@ -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) diff --git a/examples/caching_and_replay/model.py b/examples/caching_and_replay/model.py index 95c26b6a..028707e6 100644 --- a/examples/caching_and_replay/model.py +++ b/examples/caching_and_replay/model.py @@ -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