I have a model with quadratic objective function and linear constraints. I am using CPLEX to solve a minimization problem. I have set the gap value %0.0 and I have noticed that the model loses a lot o time around very low gap values and I have noted the objective function value at low gap values. When I set the gap those low values, I have obtained an objective function value which is much more higher than the one I have noted, and this value cannot be true according to the gap. What can be the reason? Is there any setting for quadratic programming which I might have missed? Thank you in advance. asked 17 Apr '15, 16:14 yasemin 
This sort of radical change in results is often a sign of numerical instability in the model. I don't know why changing only the gap parameter would trigger the instability, but I suppose it is possible. Two things you can try:
If turning on the numerical emphasis switch (combined with setting the gap limit) eliminates the inflated solution and lower bound, chances are high that your model is numerically unstable. If you collect kappa statistics and they reveal the presence of unstable basis matrices, that would be a clear signal of numerical problems. At least in the latest version of CPLEX, turning on the numerical emphasis parameter automatically sets the KappaStats parameter to 1 (collect a sample of condition numbers). answered 18 Apr '15, 09:52 Paul Rubin ♦♦ Thank you very much for your response. Setting the numerical emphasis parameter to 1 solved the problem. As you have said, this kind of effect of gap is really unexpected, and so, I cannot be sure about the correctness of my solutions. I am going to use the model with a reasonable gap value and collect the solutions of several runs. Because of long solution times, it is not possible to set gap value to 0%. So, should I always set numerical emphasis parameter to 1 disregarding worse performances? (I was already using EpInt and EpRhs parameters at low values. I have read your comments about numerical instabilities and possible actions to be taken on your blog. If I understand correctly, numerical instabilities may be solved by changing some parameters, but they may not be solved at the end. Is it true?)
(19 Apr '15, 16:18)
yasemin
Numerical difficulties can be mitigated to some extent by changing the numerical emphasis parameter (the other parameter I mentioned just captures statistics; it does not fix anything). The only true solution to instability is to modify the model. One common source of instability (though not the only one) is a mix of large and small coefficients in the constraint matrix. What are the largest and smallest coefficients (in absolute value) in your model?
(19 Apr '15, 16:27)
Paul Rubin ♦♦
It is a routing problem and the coefficients are 1's and costs between 1 and 20. They are not different from each other, the model is quite sparse.
(19 Apr '15, 16:52)
yasemin
So no "big M" constraints, eh? That's probably the most common source of instability and also perhaps the easiest to fix. You might want to look in the "Tutorial" section of https://www.ibm.com/developerworks/community/wikis/home?lang=en#!/wiki/W1a790e980a7d_49c5_963d_2965e5d01401/page/INFORMS%202014%20Annual%20Meeting (sorry for the long URL, not my doing). The slides for a talk by Ed Klotz on numerical instability might be helpful.
(19 Apr '15, 17:07)
Paul Rubin ♦♦
"So, should I always set numerical emphasis parameter to 1 disregarding worse performances?" For this model, yes, unless you can identify and fix the source of the instability. In general (meaning for other models), no. The usual practice is to leave it off unless something suspicious appears in the output. "I cannot be sure about the correctness of my solutions." Again, for this particular model, it might be a good idea to have your program verify that the CPLEX solution is feasible (to within tolerances) and that the objective value is what CPLEX says it is (to within rounding error).
(19 Apr '15, 17:11)
Paul Rubin ♦♦
I don't have any bigM constraints, the model forces to use a given number of routes. I think much lower values of feasibility tolerances seem to solve the problem, and I may continue to live without numerical emphasis parameter adjustment. Thank you very much for the materials and your comments.
(19 Apr '15, 17:19)
yasemin
showing 5 of 6
show 1 more comments

Is this a continuous QP or a mixed integer QP? Assuming it's mixed integer, it might help if you showed the last several lines of the node log.
It is a mixed integer QP. Here are some lines and last lines of the node log at gap %0.0:
Last lines when the gap is 0.01%:
I know the optimal objective function value is 72243, but the model with gap updates best bound in a way that I couldn't understand and finds incorrectly high z*.