# SCIP

Solving Constraint Integer Programs

Special Methods

## Detailed Description

methods commonly used by primal heuristics

## Modules

Dive sets
methods for dive sets to control the generic diving algorithm

## Functions

SCIP_EXPORT SCIP_RETCODE SCIPperformGenericDivingAlgorithm (SCIP *scip, SCIP_DIVESET *diveset, SCIP_SOL *worksol, SCIP_HEUR *heur, SCIP_RESULT *result, SCIP_Bool nodeinfeasible)

SCIP_EXPORT SCIP_RETCODE SCIPcopyLargeNeighborhoodSearch (SCIP *sourcescip, SCIP *subscip, SCIP_HASHMAP *varmap, const char *suffix, SCIP_VAR **fixedvars, SCIP_Real *fixedvals, int nfixedvars, SCIP_Bool uselprows, SCIP_Bool copycuts, SCIP_Bool *success, SCIP_Bool *valid)

## ◆ SCIPperformGenericDivingAlgorithm()

 SCIP_EXPORT SCIP_RETCODE SCIPperformGenericDivingAlgorithm ( SCIP * scip, SCIP_DIVESET * diveset, SCIP_SOL * worksol, SCIP_HEUR * heur, SCIP_RESULT * result, SCIP_Bool nodeinfeasible )

performs a diving within the limits of the diveset parameters

This method performs a diving according to the settings defined by the diving settings diveset; Contrary to the name, SCIP enters probing mode (not diving mode) and dives along a path into the tree. Domain propagation is applied at every node in the tree, whereas probing LPs might be solved less frequently.

Starting from the current LP solution, the algorithm selects candidates which maximize the score defined by the diveset and whose solution value has not yet been rendered infeasible by propagation, and propagates the bound change on this candidate.

The algorithm iteratively selects the the next (unfixed) candidate in the list, until either enough domain changes or the resolve frequency of the LP trigger an LP resolve (and hence, the set of potential candidates changes), or the last node is proven to be infeasible. It optionally backtracks and tries the other branching direction.

After the set of remaining candidates is empty or the targeted depth is reached, the node LP is solved, and the old candidates are replaced by the new LP candidates.

heur_guideddiving.c for an example implementation of a dive set controlling the diving algorithm.
Note
the node from where the algorithm is called is checked for a basic LP solution. If the solution is non-basic, e.g., when barrier without crossover is used, the method returns without performing a dive.
currently, when multiple diving heuristics call this method and solve an LP at the same node, only the first call will be executed,
SCIPgetLastDiveNode().

performs a diving within the limits of the diveset parameters

This method performs a diving according to the settings defined by the diving settings diveset; Contrary to the name, SCIP enters probing mode (not diving mode) and dives along a path into the tree. Domain propagation is applied at every node in the tree, whereas probing LPs might be solved less frequently.

Starting from the current LP solution, the algorithm selects candidates which maximize the score defined by the diveset and whose solution value has not yet been rendered infeasible by propagation, and propagates the bound change on this candidate.

The algorithm iteratively selects the the next (unfixed) candidate in the list, until either enough domain changes or the resolve frequency of the LP trigger an LP resolve (and hence, the set of potential candidates changes), or the last node is proven to be infeasible. It optionally backtracks and tries the other branching direction.

After the set of remaining candidates is empty or the targeted depth is reached, the node LP is solved, and the old candidates are replaced by the new LP candidates.

heur_guideddiving.c for an example implementation of a dive set controlling the diving algorithm.
Note
the node from where the algorithm is called is checked for a basic LP solution. If the solution is non-basic, e.g., when barrier without crossover is used, the method returns without performing a dive.
currently, when multiple diving heuristics call this method and solve an LP at the same node, only the first call will be executed,
SCIPgetLastDiveNode()
Parameters
 scip SCIP data structure diveset settings for diving worksol non-NULL working solution heur the calling primal heuristic result SCIP result pointer nodeinfeasible is the current node known to be infeasible?

Definition at line 192 of file heuristics.c.

## ◆ SCIPcopyLargeNeighborhoodSearch()

 SCIP_EXPORT SCIP_RETCODE SCIPcopyLargeNeighborhoodSearch ( SCIP * sourcescip, SCIP * subscip, SCIP_HASHMAP * varmap, const char * suffix, SCIP_VAR ** fixedvars, SCIP_Real * fixedvals, int nfixedvars, SCIP_Bool uselprows, SCIP_Bool copycuts, SCIP_Bool * success, SCIP_Bool * valid )

get a sub-SCIP copy of the transformed problem

Parameters
 sourcescip source SCIP data structure subscip sub-SCIP used by the heuristic varmap a hashmap to store the mapping of source variables to the corresponding target variables suffix suffix for the problem name fixedvars source variables whose copies should be fixed in the target SCIP environment, or NULL fixedvals array of fixing values for target SCIP variables, or NULL nfixedvars number of source variables whose copies should be fixed in the target SCIP environment, or NULL uselprows should the linear relaxation of the problem defined by LP rows be copied? copycuts should cuts be copied (only if uselprows == FALSE) success was the copying successful? valid pointer to store whether the copying was valid, or NULL

Definition at line 895 of file heuristics.c.