When a DEModel Event is constructed, Sympy attempts to solve the event trigger expression for t:
|
try: |
|
self._t_root = sp.solve(self.get_val(), amici_time_symbol) |
|
except NotImplementedError: |
|
# the trigger can't be solved for `t` |
|
pass |
)
In the case of PEtab events (as of PEtab v2) the trigger expression takes the form of a piecewise expression e.g.
Min(1/2 - _petab_preequilibration_indicator, _petab_experiment_indicator_e0 - 1/2, t - 10)
Sympy fails to solve expressions like this for $t$ with the following error:
*** NotImplementedError:
No algorithms are implemented to solve equation Min(1/2 - _petab_preequilibration_indicator, _petab_experiment_indicator_e0 - 1/2, t - 10)
AMICI passes on this error and leaves _t_root empty. So there is no immediate error, but this means the function to check if an event has explicit trigger times does not work as expected.
|
def has_explicit_trigger_times( |
When a
DEModelEventis constructed, Sympy attempts to solve the event trigger expression fort:AMICI/python/sdist/amici/_symbolic/de_model_components.py
Lines 768 to 772 in 20b07e9
In the case of PEtab events (as of PEtab v2) the trigger expression takes the form of a piecewise expression e.g.
Sympy fails to solve expressions like this for$t$ with the following error:
AMICI passes on this error and leaves
_t_rootempty. So there is no immediate error, but this means the function to check if an event has explicit trigger times does not work as expected.AMICI/python/sdist/amici/_symbolic/de_model_components.py
Line 843 in 126e936