# Model of Quadratic Uncapacitated Facility Location (UFL) all formulations
# from G&L 2012
var x >=0, := 1;
var y, := 1;
var z binary, := 0.5;
minimize cost: z + y;
subject to
linear: x <= z;
# ... different formulations of perspective
F1: x^2 <= y*z;
F2: x^2/z <= y;
F3: x^2 <= y*z;
F4: (4*x^2 + (y - z)^2)^(1/2) <= y + z;
F5: x^2/(z + 0.0001) <= y;
F6: x^2/((1 - 0.0001)*z + 0.0001) <= y;
# ... define a problem for each formulation
problem Formulation1: x, y, z, cost, linear, F1;
problem Formulation2: x, y, z, cost, linear, F2;
problem Formulation3: x, y, z, cost, linear, F3;
problem Formulation4: x, y, z, cost, linear, F4;
problem Formulation5: x, y, z, cost, linear, F5;
problem Formulation6: x, y, z, cost, linear, F6;