Mixed Integer Programming, Sos2, Piecewise Linear Modeling, Cplex, Gurobi.
return us this optimal value for x once the piecewise linear approximation of y is encoded. The following snippet encodes the problem and solves it with Gurobi. Note that, again, we introduce a SOS2 of weights to link x and y as described before. Then, we use y as our objective and are able to