Which funtion to use for QCQP?
AnsweredDear Gurobi Teams,
I am working on a project in C++, it is a qcqp problem, with continuous parameter. Both object function and constraint are convex. Which function should I use? GRBQuadExpr and GRBQConstr::set()?
Another question is that the object function is convex nonlinear like sqrt(x1^2+x2^2) with continuous parameter. Which function should I pick?
Best,
Xingyi
0
-
Official comment
This post is more than three years old. Some information may not be up to date. For current information, please check the Gurobi Documentation or Knowledge Base. If you need more help, please create a new post in the community forum. Or why not try our AI Gurobot?. -
Hi Xingyi,
You can use the addQConstr function. For an example, please have a look at our bilinear_c++ example.
For the \(\sqrt{\cdot}\), you can use the addGenConstrPow function with \(\texttt{a=0.5}\). Please note that you have to introduce an additional variable when using general constraints.
Best regards,
Jaromił0
Post is closed for comments.
Comments
2 comments