Different optimal solutions (cplex and gurobi). Gurobi solution is wrong

304 views
Skip to first unread message

Javier F.

unread,
Jun 24, 2014, 12:47:46 PM6/24/14
to am...@googlegroups.com

Hello,

I am dealing with a set of instances regarding production optimization. I am working from AMPL with CPLEX and Gurobi and my problem is that for several instances the optimum is different for both solvers (Gurobi obtains better optimum in these minimization instances). I read in this group some similar cases and Dr. Fourer recommended to adjust the mipgap and other parameters. I have tested in this sense, by varying the  relative mipgap and integrality
tolerance, and the results do not change. Besides, I have checked both solutions and Gurobi´s is wrong, does not meet the constraints of the problem. Of other hand, CPLEX solutions are correct. Solutions from LPSolve are similar to CPLEX. I will appreciate your comments.


Thank you in advance,

Javier

Javier F.

unread,
Jun 24, 2014, 2:23:49 PM6/24/14
to am...@googlegroups.com
Regarding my question, I have just performed several instances directly in Gurobi, without using AMPL, and optimal solutions now do agree with those obtained previously by AMPL-CPLEX. I wonder if it may be any problem with the interface between AMPL and Gurobi. Thanks for your answers.

Robert Fourer

unread,
Jun 25, 2014, 12:50:13 AM6/25/14
to am...@googlegroups.com
Can you post an example of a model and data which when sent from AMPL to Gurobi results in a solution that is not feasible in all the constraints? Once we can reproduce the error on our computers, we can work with the Gurobi developers to get it fixed.

Note that Gurobi has a feasibility tolerance (specified by feastol in gurobi_options) with a default of 1e-6, and as long as constraints are satisfied within that amount, the solution will be considered feasible by Gurobi. This is in addition to the integer feasibility tolerance (specified by intfeastol).

Bob Fourer
am...@googlegroups.com

=======

Javier Farinós

unread,
Jun 25, 2014, 1:18:17 PM6/25/14
to am...@googlegroups.com
Thank you very much for your reply Mr. Fourer. In addition to varying the relative mipgap and the integer feasibility tolerance, I have also tried to vary the parameter you mentioned, the feasibility tolerance (feastol). Fixing the 3 parameters to its minimum value (1e-9) in Gurobi, this solver now provides the same optimal solutions as those obtained by CPLEX.

Thank you for your help.
Javier


--
You received this message because you are subscribed to a topic in the Google Groups "AMPL Modeling Language" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ampl/np3MHqvaugU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ampl+uns...@googlegroups.com.
To post to this group, send email to am...@googlegroups.com.
Visit this group at http://groups.google.com/group/ampl.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages