Skip to content

Commit

Permalink
Update test_time.py
Browse files Browse the repository at this point in the history
  • Loading branch information
quaquel committed Sep 13, 2024
1 parent f102484 commit 4e0ea57
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions tests/test_time.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,25 +60,29 @@ def __init__(
super().__init__(seed=seed)
self.log = []
self.enable_kill_other_agent = enable_kill_other_agent
self.shuffle = shuffle

match activation:
case "random":
pass
self.schedule = RandomActivation(self)
case "staged":
pass
model_stages = ["stage_one", "model.model_stage", "stage_two"]
self.schedule = StagedActivation(
self, stage_list=model_stages, shuffle=shuffle
)
case "simultaneous":
pass
self.schedule = SimultaneousActivation(self)
case "random_by_type":
pass
self.schedule = RandomActivationByType(self)
case _:
raise ValueError(f"Unknown activation type: {activation}")
self.schedule = BaseScheduler(self)

for _ in range(2):
agent = MockAgent(self)
self.schedule.add(agent)

class MockModel(Model):
def __init__(
self, seed=None, shuffle=False, activation=STAGED, enable_kill_other_agent=False
):

def __init__(self, seed=None, shuffle=False, activation=STAGED, enable_kill_other_agent=False):
"""
Creates a Model instance with a schedule
Expand Down

0 comments on commit 4e0ea57

Please sign in to comment.