Skip to main content

why GRBcbsolution doesn't work

Answered

Comments

5 comments

  • Marika Karbstein
    Gurobi Staff Gurobi Staff

    Hi Dong Han,

    Do you see that your solution is accepted but just not immediately? In some Callbacks Gurobi needs to store the solution until it can be processed internally. If you need the MIPSOL callback to create your solution, you can also provide it via GRBcbsolution. It will not be faster if you keep it and provide it when in MIPNODE Callback.

    Hope this helps,
    Marika

    0
  • Dong Han
    Gurobi-versary
    Curious
    Conversationalist

    Hello Marika,

    Thank you for your response. The thing is, for example, the first solution I provided didn't be accepted when I used GRBcbsolution. And after a few iteration, the fifth solution I provided was accepted. But the fifth solution was worse than the first solution. I am not sure if the process is reasonable. If not, is there anything wrong that might cause this situation?

    0
  • Marika Karbstein
    Gurobi Staff Gurobi Staff

    Do you provide a full solution or solution values for only a subset of the variables? Either Gurobi is not able to extend the partial solution to a complete solution or your solution violates some constraints or bounds.
    Are you sure that your solution is indeed feasible and has a better objective value? Could you verify this in a different test, e.g., create an equivalent model where the variable bounds are fixed to the (not accepted) solution values and check if this is feasible?

    0
  • Dong Han
    Gurobi-versary
    Curious
    Conversationalist

    Yes, I provide a full feasible solution and its corresponding objective value to the model. And I verified in the way you suggested, the solution is absolutely feasible and the worse feasible solution show in the "incumbent" solution.

    0
  • Marika Karbstein
    Gurobi Staff Gurobi Staff

    Could you create and provide the code of a minimum reproducible example? It is not possible to attach a file to a community post; could you use a service like FilemailDropboxBoxGoogle DriveOneDrive?

    0

Please sign in to leave a comment.