Skip to content

Commit

Permalink
fix benchmark models
Browse files Browse the repository at this point in the history
  • Loading branch information
quaquel committed Sep 21, 2024
1 parent e61d4e8 commit 54ffc09
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion benchmarks/Schelling/schelling.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def __init__(self, model, agent_type, radius, homophily):
def step(self):
"""Run one step of the agent."""
similar = 0
neighborhood = self.cell.neighborhood(radius=self.radius)
neighborhood = self.cell.get_neighborhood(radius=self.radius)
for neighbor in neighborhood.agents:
if neighbor.type == self.type:
similar += 1
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/WolfSheep/wolf_sheep.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def __init__(self, model, energy, p_reproduce, energy_from_food):

def random_move(self):
"""Move to a random neighboring cell."""
self.move_to(self.cell.neighborhood().select_random_cell())
self.move_to(self.cell.get_neighborhood().select_random_cell())

def spawn_offspring(self):
"""Create offspring."""
Expand Down

0 comments on commit 54ffc09

Please sign in to comment.