Skip to content

Commit

Permalink
Update model.py
Browse files Browse the repository at this point in the history
  • Loading branch information
quaquel committed Sep 14, 2024
1 parent 419c7ec commit ac00812
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion mesa/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,16 @@
class BaseClass:
def __init__(self, seed=None):
super().__init__()
self.seed = seed
self.running = True
self.schedule = None
self.steps: int = 0

self._seed = seed
if self._seed is None:
# We explicitly specify the seed here so that we know its value in
# advance.
self._seed = random.random()
self.random = random.Random(self._seed)


class Model:
Expand Down

0 comments on commit ac00812

Please sign in to comment.