From 1d00f74a41a222fbde888baff52039233c7373b3 Mon Sep 17 00:00:00 2001 From: Bryan Rumsey Date: Mon, 29 Nov 2021 16:19:11 -0500 Subject: [PATCH] Fixed issue with parameters without values. --- gillespy2/sbml/SBMLimport.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gillespy2/sbml/SBMLimport.py b/gillespy2/sbml/SBMLimport.py index d0ad55d49..a89362b45 100644 --- a/gillespy2/sbml/SBMLimport.py +++ b/gillespy2/sbml/SBMLimport.py @@ -125,7 +125,10 @@ def __get_parameters(sbml_model, gillespy_model): for i in range(sbml_model.getNumParameters()): parameter = sbml_model.getParameter(i) name = parameter.getId() - value = parameter.getValue() + if parameter.isSetValue(): + value = parameter.getValue() + else: + value = 0 init_state[name] = value # GillesPy2 represents non-constant parameters as species