From 80da567e639d41a36245053e5f9340575f27f6b1 Mon Sep 17 00:00:00 2001 From: Linus Date: Thu, 18 Jul 2024 09:55:36 +0200 Subject: [PATCH] Init actions and rates in constructor of Model (#37) --- stormvogel/model.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/stormvogel/model.py b/stormvogel/model.py index b944cfb..67a0f88 100644 --- a/stormvogel/model.py +++ b/stormvogel/model.py @@ -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"])