Originally posted by: EdKlotz
Yes, you can do the transformation you described, but CPLEX typically will do that for you by default. So you shouldn't bother spending the time to do it yourself unless you have a really need to do so. CPLEX has a qtolin parameter that you can use to control this. You can see whether CPLEX does this linearization for your MIQP by checking the presolved statistics of the run. If presolve does the linearization, you'll see that the presolved problem is a MILP, not a MIQP. Here's what I get with a QAP that's only 15x15 by default:
Problem name : HCP15.lp
Objective sense : Minimize
Variables : 225 [Binary: 225, Qobj: 225]
Objective nonzeros : 0
Objective Q nonzeros : 50625
Linear constraints : 30 [Equal: 30]
Nonzeros : 450
RHS nonzeros : 30
Variables : Min LB: 0.000000 Max UB: 1.000000
Objective nonzeros : Min : all zero Max : all zero
Objective Q nonzeros : Min : 767.8828 Max : 91769.68
Linear constraints :
Nonzeros : Min : 1.000000 Max : 1.000000
RHS nonzeros : Min : 1.000000 Max : 1.000000
CPLEX> mip
Found incumbent of value 2319411.615586 after 0.05 sec. (0.42 ticks)
Tried aggregator 1 time.
MIP Presolve added 50400 rows and 25200 columns.
Reduced MIP has 50430 rows, 25425 columns, and 101250 nonzeros.
Reduced MIP has 25425 binaries, 0 generals, 0 SOSs, and 0 indicators.
So CPLEX did the linearization, and as you pointed out, the transformation adds variables (and also constraints). You can try turning off the qtolin parameter, in which case CPLEX will instead convexify the objective, and you will see that the presolved model is then a (smaller) MIQP:
CPLEX> s pre qtolin
Present value for indicator to linearize products in the objective involving binary variables (for convex MIQP), or all products of bounded variables (for global QP): -1 (default is -1)
-1 = automatic
0 = off
1 = on
New value for indicator to linearize products in the objective involving binary variables (for convex MIQP), or all products of bounded variables (for global QP): 0
Repairing indefinite Q in the objective.
Reduced MIQP has 30 rows, 225 columns, and 450 nonzeros.
Reduced MIQP has 225 binaries, 0 generals, 0 SOSs, and 0 indicators.
Reduced MIQP objective Q matrix has 50625 nonzeros.
So basically you have a tradeoff here: solve a larger MILP, or a smaller MIQP. Since MILPs are typically easier to solve than MIQPs, this can go either way. CPLEX trieds to make the right decision by default, but sometimes you need to step in and overrule its choice. A good discussion of this can be found at
http://bob4er.blogspot.com/2015/03/quadratic-optimization-mysteries-part-1.html
Based on my experience (some of which is listed the slides I referenced above), QAPs become challenging just with dimension 15-20,so 200 is challenging, at least regarding proving optimality.
#CPLEXOptimizers#DecisionOptimization