Originally posted by: AmyliaZ
I'm solving integer(binary) problems in a cutting plane fashion. I started by defining the problem as the linear relaxation (original constraint has integer coefficients and right hand side), after some iterations of adding cuts (with cplex.addLe() ), I used cplex.conversion to force variables (x) back to integers just to see the integer results.
- Since x was defined with 0 and 1 as lower and upper bounds, I used cplex.add(cplex.conversion(x, IloNumVarType.Int)) to make it integer array. However, I'm not getting the correct integer solution (the difference was 0.002%, but there were value/solution differences which bothers me), unless I define the original right hand side 1e-5 higher than its true value. But this makes the optimal value (and one of x_ j's ) about .000001 higher than the true integer value.
- If I convert x values to IloNumVarType.Bool, it gives me the true optimal value/solution, but with significantly longer run time.
I guess my question in general is, what is the best way of defining the integer problem and variables if I need the relaxed version to generate cuts and the integer version to get the integer solution.
I'm using Concert, Java.
Thank you.
#CPLEXOptimizers#DecisionOptimization