## Discrepancy solution reports solver Gurobi vs. CPLEX Topic is solved

Solver related questions
Liza
User
Posts: 7
Joined: 1 year ago

### Discrepancy solution reports solver Gurobi vs. CPLEX

Dear All,

I am currently working on an MIP to minimize emissions for a vehicle routing problem.
When running my model with solver Gurobi as well as with CPLEX, both solution reports show different solutions.

For solver CPLEX an optimal solution is provided without any gap:
For solver Gurobi it says that the same solution is "only" a integer solution and there seems to be another best possible solution:
Can someone explain to me why Gubori shows two different solutions (final solve and best possible) and why CPLEX shows the objective value as optimal but Gurobi shows it as integer solution?

Best regards
Liza
bussieck
Moderator
Posts: 1026
Joined: 7 years ago

### Re: Discrepancy solution reports solver Gurobi vs. CPLEX

What optCR tolerance did you set? From the Gurobi log it seems that you have something >0 since Gurobi did not close the gap entirely. The "best possible" is a bound, not a solution and it follows directly from the branch-and-bound algorithm which you find described in any decent text book on optimization.

-Michael
Liza
User
Posts: 7
Joined: 1 year ago

### Re: Discrepancy solution reports solver Gurobi vs. CPLEX

Hi Michael, hi All,

At first, many thanks for your response. You are right, I have not set the optCR to zero.

But in the meantime I ran my model with several test instances and scenarios where I got a further strange solver output:
• Extract from solver Gurobi with using PoolSearchMode 2 with PoolSolutions 100 to identify the 100 best solutions of my model:
MODEL CEVRP OBJECTIVE F1
TYPE MIP DIRECTION MINIMIZE
SOLVER GUROBI FROM LINE 173

**** SOLVER STATUS 1 Normal Completion
**** MODEL STATUS 1 Optimal
**** OBJECTIVE VALUE 2650.6724
[...]
GAMS/Gurobi demo/community requires a Gurobi license from Gurobi Optimization.
Gurobi library version 9.5.0
>> solnpool cevrp.gdx
>> PoolSearchMode 2
>> PoolSolutions 100
Space for names approximately 0.27 Mb
MIP status(2): Model was solved to optimality (subject to tolerances)
[...]
Fixed MIP status(3): Model was proven to be infeasible.
• Afterwards I tried to solve the model with CPLEX solver where I set optcr = 0 to ensure that I will get the optimal solution, which is possible and the same as with solver Gurobi.
Now I am unsure how to understand the statement that based on MIP status (2) optimal solution is possible and Fixed MIP status (3) says that it is infeasible to solve the model.

I hope it is not a stupid question, but can someone help me how to understand that?

Best regards
Lisa
Liza
User
Posts: 7
Joined: 1 year ago

### Re: Discrepancy solution reports solver Gurobi vs. CPLEX

Short update:
I just tried to run my model again with Solver Gurobi and PoolSolutions 800.
Because of whatever reason, besides MIP status also Fixed MIP Status now says that my model has been solved to optimality.

So no further help is required

Best regards & have a nice day
Lisa