Conic formulation with binary variables in Gurobi

71 Views Asked by At

I have a constraint of the following form

$$x^2 \leq yz$$

where $z$ is binary, $y \geq 0$, and $x$ is free. Can Gurobi handle this constraint?

1

There are 1 best solutions below

0
On BEST ANSWER

This is a (mixed integer) rotated quadratic cone. This can be handled in Gurobi. See for instance http://www.gurobi.com/documentation/8.1/refman/c_grbaddqconstr.html and https://www.gurobi.com/documentation/8.1/examples/qcp_py.html .

Alternatively, presuming there is a known upper bound for y, the right-hand side can be linearized per section 2.8 of "FICO MIP formulations and linearizations Quick reference" https://www.gurobi.com/documentation/8.1/examples/qcp_py.html, in which case it can be handled as a quadratic inequality constraint, plus the linearization constraints.