Originally posted by: Perth2
I am using CPLEX with Java. In a column generation setting, I am solving an LP restricted master problem to find duals. However, I am observing a behavior of CPLEX that I do not have an explanation for.
I construct the model using IloLPMatrix, adding rows and columns. I then export the model to an .lp file to check and make sure it is correctly formulated. The original model (not the .lp file) is then solved through Java. I get a array of double containing the dual variable values for all the rows (constraints) from my IloLPMatrix object using the cplex.getDuals(lpMatrix) call.
However, these dual values (that is, the non-zero ones) do not correspond to the (non-zero) dual values found using this alternate method: I load (command "read") the exported .lp file into the interactive CPLEX optimiser and solve it (command "opt"), and query the dual values (command "display solution dual *").
The dual values differ by the two methods. Most dual values are the same, but some are different.
The log shows different solution methods (one dual simplex, one primal simplex). Also, I am setting a lot of IP-related parameters in CPLEX in the Java version of the problem (for later processing, e. g. IloCplex.Param.MIP.Tolerances.MIPGap to a higher value than default), but since the described phenomenon is occurring for an LP relaxed version of the problem (relaxed using CPLEX conversion to float), I would not expect that the IP related parameters have any effect.
Since it is the exact same model (in this sense), I would expect the exact same dual values. Would you have any idea why I am not?
Could it have anything to do with multiple optima? That one method finds one optimum, and the other another one?
But then, why does CPLEX choose different methods to solving the exact same problem?
Or is the .lp file format not conveing all information?
(I have not uploaded the .lp file since it is 16 MB.)
#CPLEXOptimizers#DecisionOptimization