Second Order Programming
AnsweredHi,
I am trying to code a SOCP constraint, (the constraint is:
where s is the variable and mu, sigma, alpha are parameters, fi is a function with known values) in C# language. However, when I use Math.Pow to model the square root expression I take the error message saying "The Gurobi.GRBQuad.Expr canot be transformed to double". Any help will be appreciated. Thanks in advance.
-
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 try Gurobot, our chatbot interface offering instant, expert-level support. -
Hi,
Gurobi can only deal with linear and quadratic terms, more complicated functions like the square root expression can only be approximated with general constraints. To use those you might need to introduce additional (continuous) variables to represent partial terms of your expression.
Best regards,
Mario0 -
Dear Mario, thank you very much for the response.
Best regards.
0
Post is closed for comments.
Comments
3 comments