AMICI icon indicating copy to clipboard operation
AMICI copied to clipboard

Additional check for steady-state convergence

Open plakrisenko opened this issue 3 years ago • 1 comments

Feature description Currently WrmsNorm is used with the formula

Figure, where Figure

Maybe it would make sense to add possibility to check individual elements and not the sum:

Figure

plakrisenko avatar Apr 07 '22 08:04 plakrisenko

I would also suggest Euclidean distance and, independently of this issue, that $\mathrm{rtol}$ and $\mathrm{atol}$ are checked independently, e.g. for Euclidean distance:

$$ \sqrt{\sum_i \dot x^2_i} < \mathrm{rtol} \times \sqrt{\sum_i x^2_i} \qquad \mathrm{OR} \qquad \sqrt{\sum_i \dot x^2_i} < \mathrm{atol} $$

Here's the downsides of each approach

  • WrmsNorm: permits large $\dot x_i$ at large $n_\mathbf{x}$
  • individual elements: permits large $\mathbf{\dot x}$ at large $n_\mathbf{x}$
  • Euclidean distance: users might need to relax tolerances at large $n_\mathbf{x}$, or steady-state computation might fail due to numerical issues

Unless additional checks are implemented to identify the issues for WrmsNorm and individual elements, then users may fail to see that these issues are occurring.

The Euclidean distance fails noticeably: the steady-state computation will fail, so users will be forced to relax tolerances, if they expect a steady-state.

dilpath avatar Jun 19 '23 21:06 dilpath