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

Remove equality constriant number check when adding constraint #509

Merged
merged 1 commit into from
May 21, 2023

Conversation

Shuenhoy
Copy link
Contributor

@Shuenhoy Shuenhoy commented May 8, 2023

Hi,

I have noticed that when the number of equality constraints exceeds the number of variables, NLOPT refuses to add them. However, this does not necessarily mean that there is no solution as there can be redundancy in the constraints that may be non-trivial to remove for the non-linear situation from the user side. Moreover, even if the number of equality constraints is less than the number of variables, this check cannot guarantee the solution's existence. So this check seems not to make a lot of sense.

Therefore, I removed the check in this PR, or do you prefer a CMake option and preprocess directive that can conditionally disable it?

@jschueller
Copy link
Collaborator

ok for me
@stevengj ?

@stevengj
Copy link
Owner

LGTM.

@stevengj stevengj merged commit f1d28c0 into stevengj:master May 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants