[Scip] How to solve the root LP associated to an MIP
Martin Bergner
mbergner at mathematik.tu-darmstadt.de
Mon Mar 15 14:36:03 MET 2010
Hello All,
> So what is the canonical way to construct and solve the root LP of an
> MIP before actually starting the branch and cut algorithm?
One idea that came to my mind is, that I could use the following code
snippet:
/***********************************/
int solvefreq = 0;
long long int nodelimit = 0;
SCIP_CALL(SCIPgetIntParam(scip, "lp/solvefreq", &solvefreq));
SCIP_CALL(SCIPgetLongintParam(scip, "limits/nodes", &nodelimit));
SCIP_CALL(SCIPsetIntParam(scip, "lp/solvefreq", 0));
SCIP_CALL(SCIPsetLongintParam(scip, "limits/nodes", 0));
SCIP_CALL(SCIPsolve(scip));
/* Access dual solution values here*/
SCIP_CALL(SCIPfreeSolve(scip, true));
SCIP_CALL(SCIPsetLongintParam(scip, "limits/nodes", nodelimit));
SCIP_CALL(SCIPsetIntParam(scip, "lp/solvefreq", solvefreq));
SCIP_CALL(SCIPsolve(scip));
/***********************************/
That is short enough for me and works. In fact however, I do not
construct the lp after constructing the MIP and solve it which would
have been nice.
There is still one open question for me: While there is a way for a
relaxation handler to construct the lp in the exec method, how can you
solve it without using the probing/diving solving methods. They both
don't seem right to me at that point, just by the name which suggests
another use.
Regards
Martin
More information about the Scip
mailing list