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-2016 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  SCIP_Real* bounds, /**< bounds array for which at least one must be fulfilled */
61  SCIP_Bool* boundtypes, /**< boundtypes array (TRUE == SCIP_BOUNDTYPE_UPPER, FALSE == SCIP_BOUNDTYPE_LOWER)
62  * for which at least one must be fulfilled */
63  SCIP_Bool* redundants, /**< array which be filled and then indicate if a variable in the set is redundant */
64  int nvars, /**< number of variables */
65  int* nredvars, /**< pointer to store how many variables can be removed */
66  int* nglobalred, /**< pointer to store number of global reductions on variable bounds found
67  * through this set of variables */
68  SCIP_Bool* setredundant, /**< pointer to store if we found a global reduction on a variable which was part
69  * of the given set of variables, this makes this disjunction redundant */
70  SCIP_Bool* glbinfeas, /**< pointer to store if global infeasibility was detected */
71  SCIP_Bool fullshortening /**< do we want to try the shortening procedure over the whole set (which might be expensive) */
72  );
73 
74 #ifdef __cplusplus
75 }
76 #endif
77 
78 #endif
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:53
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:953
#define SCIP_Bool
Definition: def.h:53
#define SCIP_Real
Definition: def.h:127
SCIP callable library.