Skip to content
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

Model::setSteadyStateSensitivityMode affects model simulation even when not computing sensitivities #2575

Closed
dweindl opened this issue Nov 9, 2024 · 0 comments
Assignees

Comments

@dweindl
Copy link
Member

dweindl commented Nov 9, 2024

While working on #2574, I noticed that to keep python/tests/test_pregenerated_models.py::test_pregenerated_model[model_steadystate-nosensi] working,
one needs both

amici_model.setSteadyStateComputationMode(amici.SteadyStateComputationMode.integrateIfNewtonFails)
amici_model.setSteadyStateSensitivityMode(amici.SteadyStateSensitivityMode.integrateIfNewtonFails)

although the test does not compute any sensitivities.

Changing SteadyStateComputationMode alone, will result in

FAILED python/tests/test_pregenerated_models.py::test_pregenerated_model[model_steadystate-nosensi] - AssertionError: Regression check failed for J for 2 indices:
        at (np.int64(0), np.int64(0)): Expected -2.0455670563167567, got -2.045567126527688
        at (np.int64(2), np.int64(0)): Expected 0.2189886877484498, got 0.21898870409183105

I don't think Model::setSteadyStateSensitivityMode should affect model simulation in case no sensitivities are computed.

@dweindl dweindl self-assigned this Nov 9, 2024
dweindl added a commit to dweindl/AMICI that referenced this issue Nov 9, 2024
…eSensitivityMode::integrationOnly`

Fixes a bug that would result in disabling Newton's method for
steady-state computation when steady-state sensitivity mode is set
to `integrationOnly`, even if no senitivities are computed.

Fixes AMICI-dev#2575.
dweindl added a commit to dweindl/AMICI that referenced this issue Nov 9, 2024
…eSensitivityMode::integrationOnly`

Fixes a bug that would result in disabling Newton's method for
steady-state computation when steady-state sensitivity mode is set
to `integrationOnly`, even if no senitivities are computed.

This was because only the sensitivity method was checked, but not the sensitivity order.

Fixes AMICI-dev#2575.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant