Skip to main content

How to insert new heuristic solution in Callback?

Comments

3 comments

  • Official comment
    Simranjit Kaur
    Gurobi Staff Gurobi Staff
    This post is more than three years old. Some information may not be up to date. For current information, please check the Gurobi Documentation or Knowledge Base. If you need more help, please create a new post in the community forum. Or why not try our AI Gurobot?.
  • 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

Post is closed for comments.