Quadratic equality constraints.
AnsweredHello,
Can Gurobi handle quadratic equality constraints? For example if one of my optimization variables is 'x', can my model have a constraint 'ax^2 + bx + c == 0'?
Thank you,
Samuel
-
Hi Samuel,
What was the result when you tested it?
- Riley
0 -
Hi Riley,
We found that the optimization worked. The time required to solve was however drastically increased.
We are unsure if this increase is due to the increased complexity of the problem when adding quadratic equality constraints, or if it is due to the fact that Gurobi cannot handle this type of constraint naturally.
The documentation on quadratic constraints contains examples only of inequality constraints. Of course an equality constraint can be converted to inequality with two inequality constraints, however we are unsure if this is what Gurobi does, and if it cause numerical issues.
- Samuel
0 -
Hi Samuel,
"...in fact, the great watershed in optimization isn't between linearity and nonlinearity, but convexity and nonconvexity."
- R. Tyrrell Rockafellar, in SIAM Review, 1993Nonlinear equality constraints are always nonconvex. So adding them to a model, which was potentially convex prior, can greatly increase the difficulty to solve (and this is not specific to Gurobi).
Of course an equality constraint can be converted to inequality with two inequality constraints
You could do this, but the presolve routine would just convert them back into one equality.
When you have time check out our Non-Convex Quadratic Optimization Webinar.
- Riley
0
Please sign in to leave a comment.
Comments
3 comments