Callback for Initial solution's incumbency
AnsweredHello,
I'm using var.Start methods to set the initial values of a problem. Sometimes the initial values might be infeasible or does not provide an incumbent solution at all. If that is the case, Gurobi tells "User MIP start did not produce a new incumbent solution" and starts from scratch. Is there a callback to grab this, so if this is the case (start solution is not useful) I want to stop and dont even want Gurobi to run from there. This is for the C# case.
-
Official comment
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 try Gurobot, our chatbot interface offering instant, expert-level support. -
Hi Evren,
I don't think there is a nice way to do this.
You can however check the message in the callback when you are in \(\texttt{where = GRB.Callback.MESSAGE}\) for the text you want and call \(\texttt{Abort()}\) if appropriate.if (where == GRB.Callback.MESSAGE) {
// Message callback
string msg = GetStringInfo(GRB.Callback.MSG_STRING);
// Find required pattern in msg and terminate if approapriate
}Please see the callback_cs.cs example.
Cheers,
David0
Post is closed for comments.
Comments
2 comments