Use Yalmip+Gurobi to solve an MINLP problem

84 views
Skip to first unread message

常远

unread,
Dec 6, 2023, 8:25:54 AM12/6/23
to YALMIP

Dear Professor,

I am a beginner in using Yalmip+Gurobi, and I would like to seek your assistance with the following questions, if possible.

In my MINLP problem, there are nonlinear constraints involving terms such as the product of three variables and trigonometric functions. I learned in the Document of Gurobi that I shoud use genconsingenconpoly, etc. to approximate these non-linear terms. However, only an example for Gurobi was provided, and not for YALMIP.

Could you please guide me on how to utilize Gurobi+yalmip in MATLAB to invoke functions like genconsin and genconpoly? Alternatively, Are there  any other approaches available to incorporate these nonlinear terms within the constraints?

Thank you very much for your kind attention and support.

约束.png

报错.png

Johan Löfberg

unread,
Dec 6, 2023, 9:14:09 AM12/6/23
to YALMIP
those specialized gurobi commands to generate piecewise affine functions are not supported

you have to implement it using the interp1 operator, in particular the 'graph'/'LP'/'MILP'/'SOS' versions interp1 - YALMIP

To implement quadratics, you you either just keep them and let gutrobi struggle with the quadratics, or you approximate quadratics using interp1 and bilinears by the trick of writing x*y as (u^2-v^2)/4 where u==x+y and v == x-y and model the those two quadratics using interp1

Johan Löfberg

unread,
Dec 6, 2023, 9:15:04 AM12/6/23
to YALMIP
and consequently cubics is done by repeated applications of tricks on quadratics with new variables
Reply all
Reply to author
Forward
0 new messages