! MPEC formulation for MIN function ! y = MIN(x1,x2) returns a value y, where: ! y = x1 if x1 < x2 ! y = x2 if x2 < x1 Model Parameters x1 = -2 x2 = -1 End Parameters Variables y ! slack variables s_a >= 0 s_b >= 0 End Variables Equations ! test min operator, y = min(x1,x2) x2 - x1 = s_b - s_a y = x1 - s_a minimize s_a*s_b End Equations End Model