Warm start in callback to improve solution
AnsweredHello,
I have developed a C++ code where a relaxation of original formulation is solved and violated inequalities are separated and added via lazy cuts.
I have also developed a heuristic technique which could possibly improve the incumbent solution in a branch-and -bound node. As such, I am trying to implement something similar to warm start (start attribute) in callback. Then I can use the heuristic to suggest a solution that might be better than incumbent in callback. This could help me to improve my runtime.
Directly using "variable.set(GRB_DoubleAttr_Start, 1.0);" does not seem to work in callback function. So my question is this:
Is there a way use start attribute (or something synonymous) in callback function?
I would really appreciate any feedback. Thank you in advance.
-
Have you looked at the method GRBCallback::setSolution?
0 -
Hi,
Thank you so much for the helpful reply. I tried setsolution after your response. It worked for me perfectly. However, I am not able to use it multiple times as it results in error code 10011. I only needed to do it once, so it works for my purpose. I really appreciate the comment.
0
Please sign in to leave a comment.
Comments
2 comments