Originally posted by: SystemAdmin
Hello,
I'm solving a number of MIQP problems with binary and continuous variables. Some of the continuous variables in the objective function are multiplied by two binary variables, which results in an objective function more complex than CPlex can solve.
So I perform the following trick for every tripple a * b * x, where a and b are binary and x is continuous I introduce a new continuous variable y and the following constraints:
y >= 0, y <= x, y <= L * a, y <= b * L, y >= x - L * (1 - a) - L * (1 - b), where L is a sufficiently large constant (using L = 1e7 at the moment). If I'm not wrong, this trick should make y = a * b * x at all times. However, after optimization converges I'm getting variables y for which the above constraints are violated. So I'm wondering if I'm doing something that CPlex does not support or there's a problem in my problem formulation or I'm using Cplex incorrectly.
The optimization problem is created dynamically based on input data by using cplex though its C++ API. I have created an mps export file of the problem, which gives me trouble. For this problem Cplex often (I'm using opportunistic search mode) finds a solution with objective function value of 669, while the actual optimal (as long as I know) is smaller (I suppose it's equal to 597.189). I haven't tried running the exported MPS file from outside C++ API and do not know if it gives different results when solved differently.
Regards,
Alexey Gritsenko.
#CPLEXOptimizers#DecisionOptimization