Skip to content

Commit

Permalink
update benchmarks to reflect new devs usage
Browse files Browse the repository at this point in the history
  • Loading branch information
quaquel committed Nov 9, 2024
1 parent 10dfb5e commit 2d09ccc
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
1 change: 1 addition & 0 deletions benchmarks/Schelling/schelling.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ def __init__(
"""
super().__init__(seed=seed)
self.simulator = simulator
self.simulator.setup()
self.happy = 0

self.grid = OrthogonalMooreGrid(
Expand Down
4 changes: 1 addition & 3 deletions benchmarks/WolfSheep/wolf_sheep.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ def __init__(
self.height = height
self.width = width
self.simulator = simulator
self.simulator.setup()

self.initial_sheep = initial_sheep
self.initial_wolves = initial_wolves
Expand Down Expand Up @@ -225,9 +226,6 @@ def step(self):
20,
seed=15,
)

simulator.setup(model)

start_time = time.perf_counter()
simulator.run(100)
print("Time:", time.perf_counter() - start_time)
1 change: 0 additions & 1 deletion benchmarks/global_benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ def run_model(model_class, seed, parameters):
else:
simulator = ABMSimulator()
model = model_class(simulator=simulator, seed=seed, **parameters)
simulator.setup(model)

end_init_start_run = timeit.default_timer()

Expand Down

0 comments on commit 2d09ccc

Please sign in to comment.