Scippy

SCIP

Solving Constraint Integer Programs

heur_locks.h
Go to the documentation of this file.
1 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2 /* */
3 /* This file is part of the program and library */
4 /* SCIP --- Solving Constraint Integer Programs */
5 /* */
6 /* Copyright (C) 2002-2019 Konrad-Zuse-Zentrum */
7 /* fuer Informationstechnik Berlin */
8 /* */
9 /* SCIP is distributed under the terms of the ZIB Academic License. */
10 /* */
11 /* You should have received a copy of the ZIB Academic License */
12 /* along with SCIP; see the file COPYING. If not visit scip.zib.de. */
13 /* */
14 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
15 
16 /**@file heur_locks.h
17  * @ingroup PRIMALHEURISTICS
18  * @brief locks primal heuristic
19  * @author Michael Winkler
20  * @author Gerald Gamrath
21  *
22  * The locks heuristic is a start heuristic that first tries to fix all binary variables, then solves the resulting LP
23  * and tries to round the solution and finally solves a sub-MIP on the remaining problem if the LP solution could not be
24  * rounded. The fixing works as follows: First, all variables are sorted by their total number of rounding locks (up-
25  * and down-locks summed up). Then, looking at the variable with the highest number of locks first, the variable is
26  * fixed to the bound where there are fewer locks (in case of ties, the bound which is better w.r.t. the objective
27  * function). This fix is propagated and the activities of all LP rows are updated. If any LP row becomes redundant
28  * w.r.t. the updated bounds, we adjust the rounding locks.
29  */
30 
31 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
32 
33 #ifndef __SCIP_HEUR_LOCKS_H__
34 #define __SCIP_HEUR_LOCKS_H__
35 
36 #include "scip/def.h"
37 #include "scip/type_heur.h"
38 #include "scip/type_retcode.h"
39 #include "scip/type_scip.h"
40 
41 #ifdef __cplusplus
42 extern "C" {
43 #endif
44 
45 /** creates the locks primal heuristic and includes it in SCIP
46  *
47  * @ingroup PrimalHeuristicIncludes
48  */
51  SCIP* scip /**< SCIP data structure */
52  );
53 
54 
55 /** apply fix-and-propagate scheme based on variable locks
56  *
57  * @note probing mode of SCIP needs to be enabled before
58  */
61  SCIP* scip, /**< SCIP data structure */
62  SCIP_HEURDATA* heurdata, /**< primal heuristic data */
63  SCIP_Bool* cutoff, /**< pointer to store if a cutoff was detected */
64  SCIP_Bool* allrowsfulfilled /**< pointer to store if all rows became redundant */
65  );
66 
67 #ifdef __cplusplus
68 }
69 #endif
70 
71 #endif
#define SCIP_EXPORT
Definition: def.h:98
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:53
struct SCIP_HeurData SCIP_HEURDATA
Definition: type_heur.h:51
type definitions for return codes for SCIP methods
SCIP_EXPORT SCIP_RETCODE SCIPapplyLockFixings(SCIP *scip, SCIP_HEURDATA *heurdata, SCIP_Bool *cutoff, SCIP_Bool *allrowsfulfilled)
Definition: heur_locks.c:234
type definitions for primal heuristics
type definitions for SCIP&#39;s main datastructure
#define SCIP_Bool
Definition: def.h:70
SCIP_EXPORT SCIP_RETCODE SCIPincludeHeurLocks(SCIP *scip)
Definition: heur_locks.c:1101
common defines and data types used in all packages of SCIP