AMICI icon indicating copy to clipboard operation
AMICI copied to clipboard

Handling conservation laws via solver constraints

Open dweindl opened this issue 2 years ago • 3 comments

The CVODES constraint handling (see also #2327) would also allow us to enforce conservation laws, and probably make our code quite a bit simpler.

To be discussed whether we'd want to keep the current conservation law handling anyways in order to support other solver at some point, but it seems rather unlikely that this will happen.

This would also solve the currently missing/difficult handling of non-negativity constraints in combination with conservation laws.

This will, however, first require upgrading SUNDIALS (#1565).

[1] Note: relevant memory leaks fixed in v6.4.0

dweindl avatar Feb 28 '24 10:02 dweindl

Yes getting rid of the conservation laws would indeed be great. Is constraint handling also supported by the non-linear solvers? Moreover, we would have to figure out a way of applying the constraints when computing derivatives implicitly. Not an issue with positivity but more problematic with conservation laws.

FFroehlich avatar Feb 28 '24 12:02 FFroehlich

Is constraint handling also supported by the non-linear solvers?

~~Yes~~ Wait, no. Contraints are checked after the non-linear solve.

Moreover, we would have to figure out a way of applying the constraints when computing derivatives implicitly.

That I don't know.

dweindl avatar Feb 28 '24 18:02 dweindl

Is constraint handling also supported by the non-linear solvers?

~Yes~ Wait, no. Contraints are checked after the non-linear solve.

Moreover, we would have to figure out a way of applying the constraints when computing derivatives implicitly.

That I don't know.

Both would be issues for steadystate solvers.

FFroehlich avatar Mar 02 '24 10:03 FFroehlich