From 75a56b020de99c3e3243f8f0b502e13430bda7b9 Mon Sep 17 00:00:00 2001 From: Daniel Weindl Date: Tue, 7 May 2024 17:06:56 +0200 Subject: [PATCH] .. --- python/sdist/amici/sbml_import.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/python/sdist/amici/sbml_import.py b/python/sdist/amici/sbml_import.py index 393bd95e35..6438a0d770 100644 --- a/python/sdist/amici/sbml_import.py +++ b/python/sdist/amici/sbml_import.py @@ -1796,6 +1796,16 @@ def get_empty_bolus_value() -> sp.Float: if len(assigned_to_species) == len(set(assigned_to_species)): return + # if all assignments are absolute (not referring to other non-constant + # model entities), we are fine. + if all( + update.is_zero or (update + variable).is_Number + for event in self.symbols[SymbolId.EVENT].values() + for variable, update in zip(state_vector, event["state_update"]) + if not update.is_zero + ): + return + raise SBMLException( "Events with `useValuesFromTriggerTime=true` are not " "supported when there are multiple events.\n"