Skip to content

Commit

Permalink
Init actions and rates in constructor of Model (#37)
Browse files Browse the repository at this point in the history
  • Loading branch information
linusheck authored Jul 18, 2024
1 parent 7cd4cfc commit 80da567
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions stormvogel/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,10 +197,14 @@ def __init__(self, name: str | None, model_type: ModelType):
# Initialize actions if those are supported by the model type
if self.supports_actions():
self.actions = {}
else:
self.actions = None

# Initialize rates if those are supported by the model type
if self.supports_rates():
self.rates = {}
else:
self.rates = None

# Add the initial state
self.new_state(["init"])
Expand Down

0 comments on commit 80da567

Please sign in to comment.