Skip to content

Commit

Permalink
..
Browse files Browse the repository at this point in the history
  • Loading branch information
dweindl committed May 7, 2024
1 parent 75a56b0 commit c4cee9a
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions python/sdist/amici/sbml_import.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit c4cee9a

Please sign in to comment.