Originally posted by: SystemAdmin
Unfortunately, this is not so easy. Namely, the region has to be convex in the full variable space, including the auxiliary variables used to model the piece-wise construct. And since the id58 and id71 variables are linked to quadratic terms by means of equations, this is not the case.
Unfortunately, it is not possible to use quadratic terms in an indicator constraint, so removing the auxiliary variables and equations by substituting the auxiliary variables for their quadratic terms is not an option.
But I think in the special case of your "model.lp" there is a solution. Namely, one can observe the following:
1. id54 = 0 and id67 = 0 dominate id54 = 1 and id67 = 1 in terms of the objective function and the regular constraints (i.e., if you have a feasible solution with id54 = 1 or id67 = 1, then you can just set id54 = id67 = 0 to get an equivalent feasible solution). The only constraints that could force the two variables to 1 are the indicators i1 and i3. Consequently, the indicator direction that forces them to 0 is redundant and you can remove the "->" direction of the indicator constraints.
2. Similary, the "<-" direction of the indicator constraints i2 and i4 can be removed.
3. Now, id58 and id71 are only required to be large enough by the indicator constraints, and only the quadratic constraints id64 and id81 bound the variables from above. Consequently, the ">=" direction of the quadratic equations is not needed in the model and you can relax the equation to "<=" inequalities. Namely, if for example id58 is smaller than its corresponding quadratic expression, you could always (in a postprocessing step) increase it to be equal to the quadratic expression without violating any constraints and without changing the objective value. Thus, the relaxation to "<=" is valid.
The resulting model is this:
Minimize obj: 17.6200008392334 id1 + id53 + 0 id58 + 0 id71 + [ 0.000620000006165355 id1 ^2 ] / 2 Subject To id15: id2 >= 150 id17: id2 <= 455 id19: id3 >= 150 id21: id3 <= 455 id23: id2 = 300 id26: - id2 + id3 <= 200 id28: - id2 + id3 >= -200 id30: id1 = 300 id66: id54 - id56 <= 0 id83: id67 - id69 <= 0 id64: id58 + [ 0.0025 id2 ^2 + 0.0025 id3 ^2 ] <= 0 id81: id71 + [ 0.00125 id2 ^2 - 0.0025 id2 * id3 + 0.00125 id3 ^2 ] <= 0 i1: id54 = 0 -> id3 + id2 >= 500.000001 i2: id56 = 1 -> 0.75 id2 + 0.75 id3 + id1 + id58 >= 262.5 i3: id67 = 0 -> id3 + id2 <= 499.999999 i4: id69 = 1 -> id1 + id71 >= -50 Bounds id53 = 970 0 <= id54 <= 1 0 <= id56 <= 1 id58 Free 0 <= id67 <= 1 0 <= id69 <= 1 id71 Free Binaries id54 id56 id67 id69 End
And this solves easily, with the solution
MIP - Integer optimal solution: Objective = 6.2839002520e+03 Solution time = 0.03 sec. Iterations = 7 Nodes = 0 CPLEX> disp sol var - Incumbent solution Variable Name Solution Value id1 300.000000 id53 970.000000 id58 -394.218931 id71 -68.295780 id2 300.000000 id3 214.700604 id54 1.000000 id56 1.000000 id67 1.000000 id69 1.000000
Tobias
#DecisionOptimization#MathematicalProgramming-General