We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ec55af6 commit 21444afCopy full SHA for 21444af
1 file changed
python/sdist/amici/sbml_import.py
@@ -1875,9 +1875,16 @@ def get_empty_bolus_value() -> sp.Float:
1875
return
1876
1877
# check if events are guaranteed to not trigger at the same time
1878
+ def try_solve_t(expr: sp.Expr) -> list:
1879
+ """Try to solve the expression for time."""
1880
+ try:
1881
+ sp.solve(expr, sbml_time_symbol)
1882
+ except NotImplementedError:
1883
+ return []
1884
+
1885
trigger_times = [
- sp.solve(event["value"], sbml_time_symbol)
- for event_sym, event in self.symbols[SymbolId.EVENT].items()
1886
+ try_solve_t(event["value"])
1887
+ for event in self.symbols[SymbolId.EVENT].values()
1888
]
1889
# for now, we only check for single/fixed/unique time points, but there
1890
# are probably other cases we could cover
0 commit comments