[Scip] Making a deep copy of SCIP

Pierre Le Bodic lebodic at gatech.edu
Tue Nov 13 20:33:30 MET 2012


Hi,

I would like to be able to interrupt the B&B tree search at a branching node, say A, and try different branching variables. At A, for each variable that I try, I would like to be able to solve the problem to optimality. With a basic implementation, this would mean I have to solve the entire problem for each variable I try to branch on. However, the tree search before reaching node A would always be identical. It would therefore make sense to make a deep copy of SCIP at node A, solve the rest of the problem on the SCIP copy for a variable, and do this for each variable. I have coded the latter implementation.

I have used a method called SCIPcopy (http://scip.zib.de/doc/html/scip_8h.shtml#ae0f9695c2985d240e1f09ec6a6fb640a), which supposedly "copies a source SCIP to a target SCIP". However, it does not seem possible to warm start the copy. As a matter of fact, and this is consistent with the documentation, the stage of the SCIP copy in not copied from the original SCIP. Therefore, when calling SCIPsolve on the copy, the whole solving process is started all over again (but it's faster, probably because the preprocessing doesn't have to be done from scratch). More importantly, the reported optimal solution values are not equal to the optimal value you get from solving the problem with the vanilla scip program. My hypothesis is that scip reports the optimal solution in the subtree rooted at A.

If I just try to manually set the current stage of the SCIP copy that I get from SCIPCopy, then an assertion fails and indicates that the pointer to the event handler should not be NULL. If I try to correct this, then the following assertion fails as well, indicating that the pointer to the tree should not be NULL. It seems copies of these fields in the original SCIP were not copied during SCIPcopy. So, apparently, SCIPcopy is neither a shallow copy (because the pointer to the tree should then point to the old tree) nor a deep copy (because then there should be a new tree on which to point). I would like to know what kind of copy is actually done during SCIPcopy, and what can be done with such a copy. Also, are there any way to make a warm-startable deep copy of SCIP without modifying the source?

Sorry for the long read. Thanks in advance.

Pierre


More information about the Scip mailing list