Skip to main content

How to insert new heuristic solution in Callback?

Comments

2 comments

  • Matthias Miltenberger
    Gurobi Staff Gurobi Staff

    Hi Yuan,

    Are you sure that your solution is feasible? You can check the solution using the cbUseSolution callback.
    Please check that you followed the guidelines for how to set solutions via callbacks.

    Cheers,
    Matthias

    0
  • Yuan Gao
    Gurobi-versary
    First Comment
    First Question

    Hi Matthias, thank you for replying.

    The solution is feasible, since it is easy to find a feasible one in the hub location problem. I have tried function "useSolution", which returned a value equal to the objective value of the feasible solution.

    Fortunately, this problem does not affect the final solution. Well, I have another question. How does Gurobi know an "incumbent" is always feasible? Note that I keep inserting new cuts, is it possible that an "incumbent" solution becomes infeasible after new cuts are inserted?

    Thank you.

    0

Please sign in to leave a comment.