Hi,
I have an AMPL linear program where CPLEX and GUROBI give different optimal values. The model file is attached, the data file can be found at
http://homepages.rpi.edu/~mitchj/matp4700/wfp/wfp.dat
The problem seems to be with the constraint cons11. The constraint is active in the cplex solution, but satisfied with a positive slack in the gurobi solution. If I comment out cons11 then cplex returns the same solution as gurobi. I am confident the gurobi solution is correct: it agrees with that obtained by a different model file for the same problem.
This is a course assignment and the result first showed up in the version of AMPL you provided for the course. I also had the same discrepancy when I submitted the job to the NEOS server. Here are the outputs returned from the NEOS server with the 2 solvers, with no options specified:
=====================
You are using the solver gurobi_ampl.
%% COMMENTS %%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Checking ampl.mod for gurobi_options...
Executing AMPL.
processing data.
processing commands.
Executing on
prod-exec-7.neos-server.org
Presolve eliminates 266 constraints and 374 variables.
Adjusted problem:
2061 variables, all linear
1244 constraints, all linear; 6813 nonzeros
1102 equality constraints
142 inequality constraints
1 linear objective; 1 nonzero.
Gurobi 9.1.1: threads=4
Gurobi 9.1.1: optimal solution; objective 0.
9547767264
760 simplex iterations
=====================
=====================
You are using the solver cplexamp.
%% COMMENTS %%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Checking ampl.mod for cplex_options...
Executing AMPL.
processing data.
processing commands.
Executing on
prod-exec-7.neos-server.org
Presolve eliminates 266 constraints and 374 variables.
Adjusted problem:
2061 variables, all linear
1244 constraints, all linear; 6813 nonzeros
1102 equality constraints
142 inequality constraints
1 linear objective; 1 nonzero.
CPLEX
20.1.0.0: threads=4
CPLEX
20.1.0.0: optimal solution; objective 0.9520810777
1219 dual simplex iterations (1 in phase I)
=====================
Thanks,
—John
----
John E. Mitchell
mit...@rpi.edu http://www.rpi.edu/~mitchj
ph:
518-276-6915 fax:
518-276-4824
Professor and Graduate Program Director
Department of Mathematical Sciences
Amos Eaton 325
Rensselaer (RPI)
110 Eighth St
Troy, NY 12180 USA