-
Notifications
You must be signed in to change notification settings - Fork 22
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
Too many constraints when using ipopt #156
Comments
Based on my experience using solvers like Ipopt, I think it's best to handle these issues at the modeling later and not the solver layer. Every time I have ran into the "too few degrees of freedom." message there has been a fairly significant issue in my model. Your proposed fix,
Will work for some cases, like the one you suggest, but the same issue can come up only when using continuous variables. One fairly generic solution would be to develop an NLP pre-solver that can help clean up a JuMP model before sending it to a solver, but I think that feature would be better in JuMP, than in Juniper. |
+1 on the NLP presolver. There's a lot of scope for cleaning up user-provided models into ones that the solvers more readily accept. |
Yes, that gets a little closer to a constraint management system. The use case I have here is looking at using juniper inside of a cutting plane algorithm where cuts are generated dynamically and those cuts look like 1 = 1 or 0 <= 1 to ipopt. |
In that specific case I would double check that |
This would happen internally in juniper after binary variables are resolved... Example Cutting plane method generates a constraint like
At a leaf, juniper generates a candidate solution of |
closing in favor of the original pre-solver issue #87. |
If you create a model with many constraints on the binary variables, you can create an artificial situation where a convex solver like ipopt will complain there are too few degrees of freedom. However, given a fixed solution on the binary variables, these constraints are just constant tautologies.
This situation can come up in cutting plane methods where many constraints are added on the integer variables that are never active in the convex solver. And if you have too many, the convex solver will throw an artificial error. Without knowing the details of the internal architecture, I suggest simply dropping all constraints that only consist of binary variables when creating the continuous problem.
example (silly) code
The text was updated successfully, but these errors were encountered: