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