Search code examples
scip

SCIP: Getting lower bounds and upper bounds in various modes at a specific node


I want to get lower bounds and upper bounds at a specific node of the branch-and-bound tree in various modes. It will help me compare the various emphasis settings.

For this (an example for lower bounds),

  • I made a global copy of the MIP at that node obtaining a separate SCIP instance using SCIPCopy()
  • Then set separating/emphasis as aggressive, presolve as False, and limits/nodes as 1
  • optimize the model

This procedure does several iterations of simplex on a single node before exiting.

  • Will this lower bound be similar to the lower bound obtained if the settings were set to separating/emphasis/aggressive just before the node was processed in the branch-and-bound tree? ( a similar doubt is for upper bounds by changing heuristics/emphasis/aggressive )

  • Is there a function - SCIPComputeLowerBound(setting=1) for a SCIP_NODE. (similarly, for SCIPComputeUpperBound(setting=1)?

  • If I decide to go with aggressive or fast in separating, how can I copy the results of the node back to the original SCIP's node? (and similarly for "heuristics" where I will need to update the original solution). I can think of changing the settings to a desired level in the original SCIP tree, and let it solve with the changed settings, but this will require solving that node twice.


Solution

  • The lower bounds will probably not be the same, especially for separating. The reason is that many separators run longer during the root node than further down in the tree. Additionally separators and heuristics in SCIP have a frequency which means that they will not be called at every node. So it could be that at your current node no heuristics will be run, but if you create a new subscip and solve the root node there heuristics will run.

    What should this function SCIPcomputeLowerBound do? Solve the whole node but not change anything? (that does not exist)

    You can copy definitely copy a solution back over, e.g. look at createNewSolution in heur_rens.c. What would you want to copy over from the separation?