Skip to content

Commit

Permalink
Fix potentially incorrect disabling of Newton's method by `SteadyStat…
Browse files Browse the repository at this point in the history
…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.
  • Loading branch information
dweindl committed Nov 9, 2024
1 parent 0009c4a commit 13c01a5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/steadystateproblem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,8 @@ void SteadystateProblem::findSteadyState(
= model.getSteadyStateComputationMode()
== SteadyStateComputationMode::integrationOnly
|| solver.getNewtonMaxSteps() == 0
|| (model.getSteadyStateSensitivityMode()
|| (solver.getSensitivityOrder() >= SensitivityOrder::first
&& model.getSteadyStateSensitivityMode()
== SteadyStateSensitivityMode::integrationOnly
&& ((it == -1
&& solver.getSensitivityMethodPreequilibration()
Expand Down

0 comments on commit 13c01a5

Please sign in to comment.