-1

I have been trying to write a MILP in Matlab. I am using gurobi solver interfaced with Matlab.

It seems solver has found a heuristic optimal solution but does not stop the iterations and keep looking for it. I am posting the screenshot of the process.

enter image description here

Can anyone tell me, how to write a stopping criteria of gurobi in Matlab? I've tried to look through the documentation of gurobi, but it didn't help me much.

Micho
  • 3,929
  • 13
  • 37
  • 40
nagpalh
  • 51
  • 5

1 Answers1

1

Even though Gurobi may have found the optimal solution very quickly, it does not know yet it is optimal. Only after the gap % has become zero we are sure there are no better integer solutions. You can set a gap tolerance (parameter mipgap), but for proven optimal solutions you need to leave it at (close to) zero.

Erwin Kalvelagen
  • 15,677
  • 2
  • 14
  • 39