polynomial terms in objective

114 views
Skip to first unread message

Tooran BM

unread,
Jun 10, 2021, 4:16:02 PM6/10/21
to YALMIP
Dear Johan
I have a term like this J = (u1-u2)*u3 in the objective function where u1,u2, and u3 are all decision variables.  When I call Gurobi to solve the problem, I get this error:
'Solver not applicable (gurobi does not support polynomial terms in objective)'
Is there any way to resolve this?

Thank you for your support

Johan Löfberg

unread,
Jun 10, 2021, 4:23:09 PM6/10/21
to YALMIP
you are not telling the full story, as you have written it it gives us the impression it is bilinear which gurobi supports) but the message tells us it is polynomial

if it is polynomial, you have to use a general nonlinear solver, local or global, or introduce auxiliary variables and bilinear equality constraint to lift it to a bilinear problem which gurobi supports

Tooran BM

unread,
Jun 10, 2021, 4:31:21 PM6/10/21
to YALMIP
Thank you for your reply. Yes, It was my mistake. Finally, the term that goes to the objective function is (J-Jref)^2. 
I tried 'bmibnb' but it takes a long time and no solution is returned. Are there any examples in the website that helps me with the second option to introduce auxiliary variables and bilinear equality constraint?  

Thank you

Johan Löfberg

unread,
Jun 11, 2021, 1:10:36 AM6/11/21
to YALMIP
Using a global solver (bmibnb/gurobi7baron) will simply be extremely computationally demanding, so if global optimality isn't of utmost you should simply use a local solver

If you still want to use the global nonconvex quadratic solver in gurobi, assuming J and Jref are quadratic, you simply introduce a new variable e, use the  objective e^2, and add the constraint e==J-Jref

Tooran BM

unread,
Jun 12, 2021, 2:31:41 AM6/12/21
to YALMIP
Thank you very much.
Reply all
Reply to author
Forward
0 new messages