From c4cee9a128df93cef0e7fdfdc2ac33e1d547e2ab Mon Sep 17 00:00:00 2001 From: Daniel Weindl Date: Tue, 7 May 2024 17:25:02 +0200 Subject: [PATCH] .. --- python/sdist/amici/sbml_import.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/python/sdist/amici/sbml_import.py b/python/sdist/amici/sbml_import.py index 6438a0d770..61ce9a0ee1 100644 --- a/python/sdist/amici/sbml_import.py +++ b/python/sdist/amici/sbml_import.py @@ -1762,9 +1762,11 @@ def get_empty_bolus_value() -> sp.Float: # 3) event assignments from events triggering at the same time # are independent # in these cases, the attribute value doesn't matter, as long - # as we don't support delays - # We can't check this in check_event_support without already processing - # all trigger expressions, so we do it here + # as we don't support delays. + # We can't check this in `check_event_support` without already + # processing all trigger expressions, so we do it here + + # are there any events with `useValuesFromTriggerTime=true`? if len(self.symbols[SymbolId.EVENT]) <= 1 or not any( event["use_values_from_trigger_time"] for event in self.symbols[SymbolId.EVENT].values() @@ -1809,9 +1811,11 @@ def get_empty_bolus_value() -> sp.Float: raise SBMLException( "Events with `useValuesFromTriggerTime=true` are not " "supported when there are multiple events.\n" - "If those events are guaranteed to not trigger at the same time, " - "you can set `useValuesFromTriggerTime=false` for those events " - "and retry." + "If it is guaranteed that 1) events do not trigger at the same " + "time, or 2) different event assignments do not affect the same " + "entities, or 3) event assignments do not depend on the " + "pre-event state, then you can set " + "`useValuesFromTriggerTime=false` and retry." ) @log_execution_time("processing SBML observables", logger)