-
Notifications
You must be signed in to change notification settings - Fork 1k
Open
Milestone
Description
In most cases, models are run with explicit, N number of steps. In case where it has a halting condition, it is easy to override model.run_model
like this. E.g. for forest fire
before
def step(self):
...
# Halt if no more fire
if self.count_type(self, "On Fire") == 0:
self.running = False
def run_model(self):
while self.running:
self.step()
after
def run_model(self):
while True:
self.step()
if self.count_type(self, "On Fire") == 0:
break
tpike3
Metadata
Metadata
Assignees
Labels
No labels