# SCIP

Solving Constraint Integer Programs

heur_locks.h File Reference

## Detailed Description

locks primal heuristic

The locks heuristic is a start heuristic that first tries to fix all binary variables, then solves the resulting LP and tries to round the solution and finally solves a sub-MIP on the remaining problem if the LP solution could not be rounded. The fixing works as follows: First, all variables are sorted by their total number of rounding locks (up- and down-locks summed up). Then, looking at the variable with the highest number of locks first, the variable is fixed to the bound where there are fewer locks (in case of ties, the bound which is better w.r.t. the objective function). This fix is propagated and the activities of all LP rows are updated. If any LP row becomes redundant w.r.t. the updated bounds, we adjust the rounding locks.

Definition in file heur_locks.h.

#include "scip/def.h"
#include "scip/type_heur.h"
#include "scip/type_retcode.h"
#include "scip/type_scip.h"

Go to the source code of this file.

## Functions

SCIP_EXPORT SCIP_RETCODE SCIPincludeHeurLocks (SCIP *scip)

SCIP_EXPORT SCIP_RETCODE SCIPapplyLockFixings (SCIP *scip, SCIP_HEURDATA *heurdata, SCIP_Bool *cutoff, SCIP_Bool *allrowsfulfilled)

## ◆ SCIPapplyLockFixings()

 SCIP_EXPORT SCIP_RETCODE SCIPapplyLockFixings ( SCIP * scip, SCIP_HEURDATA * heurdata, SCIP_Bool * cutoff, SCIP_Bool * allrowsfulfilled )

apply fix-and-propagate scheme based on variable locks

Note
probing mode of SCIP needs to be enabled before
Parameters
 scip SCIP data structure heurdata primal heuristic data cutoff pointer to store if a cutoff was detected allrowsfulfilled pointer to store if all rows became redundant

Definition at line 187 of file heur_locks.c.

Referenced by applyVbounds(), and SCIP_DECL_HEUREXEC().