-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SBML import: Incorrect processing of piecewise/Heaviside function #2545
Comments
Similarly for Alkan_SciSignal2018, only that there the piecewise occurs inside a kineticLaw. |
So for Beer_MolBioSystems2014 the problem is: AMICI/python/sdist/amici/de_model.py Line 2275 in e89a1de
if More or less this line of code is present since more than 4 years (#1352). However, previously these models were imported correctly. I am not yet sure what exactly caused this problem. My guess is, that before, |
What evidence do we have that models were imported correctly? Does the failed processing lead to an error? |
Amici-0.11.28-generated model code from about 2 years ago that has: void root_Beer_MolBioSystems2014(realtype *root, const realtype t, const realtype *x, const realtype *p, const realtype *k, const realtype *h, const realtype *tcl){
root[0] = t - tau;
root[1] = -t + tau;
} EDIT: Found another correct one from AMICI v0.14.0, imported Dec 19 2022.
No, no error. |
False alarm for |
Previously, if dxdt was a sympy.Heaviside, it wasn't correctly processed, because only its arguments were checked. That means, root-finding would not be enabled for this discontinuity. This would happen if a Rule or KineticLaw is a plain Piecewise function (not embedded inside a more complex expression). Fixes AMICI-dev#2545.
This bug (or suicidal optimization), did not manifest before, because a per se meaningless multiplication with This means, no AMICI-release was affected by this issue. |
Beer_MolBioSystems2014 has an assignment rule containing
piecewise
. This is correctly translated to a Heaviside function during import. However, there is no corresponding root function in the generated model.Needs further investigation.
Reminds me of #2234.
The text was updated successfully, but these errors were encountered: