Hello Marc,
please, specify which values you got in all three solvers.
My impression is that the problem is not well scaled. The coefficients
in the objective function differ by a factor of 10^16. This leads to big
rounding errors.
Do you expect the corresponding variables ever to be nonzero?
Could you use smaller penalty costs on these variables?
The effect of bad scaling can be seen when comparing the normal
precision LP solution to the exact LP solution:
glpsol --nomip -m problem.mod -d problem.dat
gives a solution of the LP relaxation of 1865 with glpk-4.44 on 32bit Linux.
glpsol --nomip --exact -m problem.mod -d problem.dat
gives a solution of the LP relaxation of 1720.
When I solve the MIP I get the following output:
$ glpsol -m problem.mod -d problem.dat
...
GLPK Simplex Optimizer, v4.44
16 rows, 240 columns, 240 non-zeros
* 0: obj = 1.600000000e+19 infeas = 0.000e+00 (0)
* 25: obj = 1.925000000e+03 infeas = 0.000e+00 (0)
OPTIMAL SOLUTION FOUND
Integer optimization begins...
+ 25: mip = not found yet >= -inf (1; 0)
+ 25: >>>>> 1.720000000e+03 >= 1.720000000e+03 0.0% (1; 0)
+ 25: mip = 1.720000000e+03 >= tree is empty 0.0% (0; 1)
INTEGER OPTIMAL SOLUTION FOUND
This output looks strange because for a minimization problem the MIP
solution should always be greater of equal to the LP solution.
*...@andrew:* Could you, please, explain why this occurs?
Best regards
Xypron
ULDRY Marc wrote:
Wrong optimal solution with Glpk-4.34Hello,
I have solved a MIP with 3 different solvers. Each solver gives an optimal
solution after a few seconds.
I want to minimize the objective function value.
The optimal solution (objective function value) given by Glpk is greater than
the optimal solution (objective function value) of the 2 other solvers (cplex
12.2 and Gurobi 3.0.1) which have both the same objective function value.
Does anybody know the reason of this difference ?
You will find in attachment the model (problem.mod) and the data (problem.dat)
of the problem and the LP file generated by Glpk from the *.mod and *.dat files
(problem.lp) which has been solved by the 3 different solvers.
Thank you for your help.
Best regards.
Marc Uldry
_______________________________________________
Help-glpk mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-glpk
_______________________________________________
Help-glpk mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-glpk