Can I solve bilevel optimization problems in Gurobi?
AnsweredLet us say we are trying to solve this problem [Source],
For example, in GAMS, this can be solved as :
Positive Variables x, y1, y2;
Variables objout, objin;
Equations defout, defin, e1, e2, e3, e4;
defout.. objout =e= sqr(x1) + 2*sqr(y1)  2*x;
defin.. objin =e= sqr(2*y14) + sqr(2*y21) + x*y1;
e1.. 4*x + 5*y1 + 4*y2 =l= 12;
e2..  4*x  5*y1 + 4*y2 =l= 4;
e3.. 4*x  4*y1 + 5*y2 =l= 4;
e4..  4*x + 4*y1 + 5*y2 =l= 4;
Model bard / all /;
$echo bilevel x min objin y1 y2 defin e1 e2 e3 e4 > "%emp.info%"
solve bard use emp min objout;
Is there an equivalent solver for Gurobi?

No, Gurobi does not support bilevel programming. In rare cases, you can translate a bilevel program into a singlelevel program and then solve this with Gurobi. But in general, bilevel programming is not supported by Gurobi.
3 
@Tobias Achterberg In the case provided here (I guess it is one of your "rare" cases) of QP inner and outer, the KKT conditions for the inner will be an LP other than the complementarity condition, which can be expressed as mixedinteger linear (using Big M) or LP + indicator constraints. So altogether, the outer + KKT for inner can be expressed as singlelevel MIQP or QP with indicator constraints. So this should be doable in Gurobi.
1 
Thank you @Tobias and @Mark. I am trying to rewrite the bilevel programs as a single level program which will let Gurobi solve it.
0
Please sign in to leave a comment.
Comments
3 comments