Skip to main content

How to test if a feasible solution is optimal



1 comment

  • Riley Clement
    Gurobi Staff Gurobi Staff

    Hi Jack,

    You can certainly provide Gurobi with a feasible solution (aka MIP start), although there is no guarantee that Gurobi will use it.  In determining whether your feasible solution is an optimal solution there are two possible answers: "yes" and "no".  

    An answer of "no" is given whenever a better solution is found.  An answer of "yes" can only be given when the gap between the dual bound and the objective of your feasible solution is reduced to zero - and this is "fully optimizing" as you put it, and may be time consuming depending on the strength of your model.

    One approach you could use to reduce time for a "no" answer is to manually calculate the objective of your feasible solution then use the BestObjStop parameter, with a value a tiny bit better than your feasible solution objective, to terminate the solve as soon as a better solution is found.

    - Riley


Please sign in to leave a comment.