Scippy

SCIP

Solving Constraint Integer Programs

presolve.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-2018 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 email to scip@zib.de. */
13 /* */
14 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
15 
16 /**@file presolve.h
17  * @ingroup PUBLICCOREAPI
18  * @brief methods commonly used for presolving
19  * @author Michael Winkler
20  */
21 
22 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
23 
24 #ifndef __SCIP_PRESOLVE_H__
25 #define __SCIP_PRESOLVE_H__
26 
27 
28 #include "scip/scip.h"
29 
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33 
34 /**@defgroup PublicSpecialPresolveMethods Special Methods
35  * @ingroup PublicPresolverMethods
36  * @brief methods commonly used for presolving
37  *
38  * @{
39  */
40 /** try to reduce the necessary variable in a set of variables with corresponding bounds and boundtypes for which one
41  * must be fulfilled
42  *
43  * e.g. a set of logicor or bounddisjunctive constraint variables would be such a set
44  *
45  * consider the following set:
46  *
47  * x1 >= 1, x2 >= 3, x3 >= 1, x4 <= 0
48  *
49  * by (global) implication data (cliques, implications, and variable bounds) we have also the following implications
50  * given:
51  *
52  * x1 >= 1 => x3 >= 1
53  * x2 >= 2 => x3 >= 1
54  * x4 <= 0 => x1 >= 1
55  *
56  * Because of the last implication x4 is redundant, because x1 >= 1 would also be fulfilled in the variable set, so we
57  * can reduce the set by x4.
58  * Also, the both other implications and x3 >= 1 (in the given variable set) all imply exactly x3 >= 1, so we tighten
59  * the global lower bound of x3 to 1 and the set of variables gets redundant.
60  */
61 extern
63  SCIP* scip, /**< SCIP data structure */
64  SCIP_VAR** vars, /**< variables array for which at least one must be fulfilled in the
65  * following bounds and boundtypes */
66  SCIP_Real* bounds, /**< bounds array for which at least one must be fulfilled */
67  SCIP_Bool* boundtypes, /**< boundtypes array (TRUE == SCIP_BOUNDTYPE_UPPER, FALSE == SCIP_BOUNDTYPE_LOWER)
68  * for which at least one must be fulfilled */
69  SCIP_Bool* redundants, /**< array which be filled and then indicate if a variable in the set is redundant */
70  int nvars, /**< number of variables */
71  int* nredvars, /**< pointer to store how many variables can be removed */
72  int* nglobalred, /**< pointer to store number of global reductions on variable bounds found
73  * through this set of variables */
74  SCIP_Bool* setredundant, /**< pointer to store if we found a global reduction on a variable which was part
75  * of the given set of variables, this makes this disjunction redundant */
76  SCIP_Bool* glbinfeas, /**< pointer to store if global infeasibility was detected */
77  SCIP_Bool fullshortening /**< do we want to try the shortening procedure over the whole set (which might be expensive) */
78  );
79 
80 /* @} */
81 
82 #ifdef __cplusplus
83 }
84 #endif
85 
86 #endif
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:53
#define SCIP_Bool
Definition: def.h:61
#define SCIP_Real
Definition: def.h:149
SCIP_RETCODE SCIPshrinkDisjunctiveVarSet(SCIP *scip, SCIP_VAR **vars, SCIP_Real *bounds, SCIP_Bool *boundtypes, SCIP_Bool *redundants, int nvars, int *nredvars, int *nglobalred, SCIP_Bool *setredundant, SCIP_Bool *glbinfeas, SCIP_Bool fullshortening)
Definition: presolve.c:969
SCIP callable library.