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

Change error to warning when particular solution to linear constraints does not satisfy them to the specified error threshold #921

Closed
dpanici opened this issue Mar 2, 2024 · 0 comments · Fixed by #931
Assignees
Labels
hackathon Stuff to work on during hackathon

Comments

@dpanici
Copy link
Collaborator

dpanici commented Mar 2, 2024

Right now we have a pretty tight error tolerance when we check that a set of linear constraints is satisfiable (

np.testing.assert_allclose(
) and we throw an error if this assert fails.

However there are cases where the error is on the order of say rtol=1e-13, which can happen just due to poor scaling when different constraints have highly varying orders of magnitude, or when the geometric scale of an equilibrium becomes very large. We probably want the solver to continue in these cases, so it might be better to use a warnif statement here instead of throwing an error, so that the user is aware then this is violated but then can use their judgement to see if it is because two fundamentally incompatible constraints were used (in which case error would be very large), or if it is just due to scaling issues between the variables (in which case the rtol would still be quite low)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hackathon Stuff to work on during hackathon
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants