-
Notifications
You must be signed in to change notification settings - Fork 30
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
Handling (non-negativity) constraints #2327
Comments
Oh, for the handling of plain (non)negativity/positivity constraints we don't need to upgrade sundials. We have CVodeSetConstraints already available. Only for the more general constraint handling (#2329) we'll have to upgrade. |
Okay, after a brief test, this won't help with cases where the Jacobian cannot be evaluated (produces NaN) for negative |
In addition to the current `Model.setStateIsNonNegative`, this adds the option to set additional (non)negativity/positivity constraints to be enforced by the solver. See [CVodeSetConstraints](https://sundials.readthedocs.io/en/latest/cvode/Usage/index.html#c.CVodeSetConstraints) for details. Related to AMICI-dev#2327.
In addition to the current `Model.setStateIsNonNegative`, this adds the option to set additional (non)negativity/positivity constraints to be enforced by the solver. See [CVodeSetConstraints](https://sundials.readthedocs.io/en/latest/cvode/Usage/index.html#c.CVodeSetConstraints) for details. Related to #2327.
Note:
|
In many applications, our models are subject to physical constraint, such that the model state has to be non-negative. Due to numerical issues, this is however not always ensured in practice. Currently, this is optionally handled via
Model.{setStateIsNonNegative|allStatesNonNegative}
, which boils down to takingmax(0, state)
.As of v6.2.0[1], SUNDIALS supports handling such constraints via projection functions. This would be the preferable mechanism for handling non-negativity- or more general constraints.
This will, however, first require upgrading SUNDIALS (#1565).[1] Note: relevant memory leaks fixed in v6.4.0The text was updated successfully, but these errors were encountered: