Scippy

SCIP

Solving Constraint Integer Programs

prop_probing.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-2021 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 scipopt.org. */
13 /* */
14 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
15 
16 /**@file prop_probing.h
17  * @ingroup PROPAGATORS
18  * @brief probing propagator
19  * @author Tobias Achterberg
20  */
21 
22 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
23 
24 #ifndef __SCIP_PROP_PROBING_H__
25 #define __SCIP_PROP_PROBING_H__
26 
27 #include "scip/def.h"
28 #include "scip/type_lp.h"
29 #include "scip/type_retcode.h"
30 #include "scip/type_scip.h"
31 #include "scip/type_var.h"
32 
33 #ifdef __cplusplus
34 extern "C" {
35 #endif
36 
37 /** creates the probing propagator and includes it in SCIP
38  *
39  * @ingroup PropagatorIncludes
40  */
43  SCIP* scip /**< SCIP data structure */
44  );
45 
46 /**@addtogroup PROPAGATORS
47  *
48  * @{
49  */
50 
51 /** applies and evaluates probing of a single variable in the given direction and bound */
54  SCIP* scip, /**< SCIP data structure */
55  SCIP_VAR** vars, /**< problem variables */
56  int nvars, /**< number of problem variables */
57  int probingpos, /**< variable number to apply probing on */
58  SCIP_BOUNDTYPE boundtype, /**< which bound should be changed */
59  SCIP_Real bound, /**< whioch bound should be set */
60  int maxproprounds, /**< maximal number of propagation rounds (-1: no limit, 0: parameter settings) */
61  SCIP_Real* impllbs, /**< array to store lower bounds after applying implications and cliques */
62  SCIP_Real* implubs, /**< array to store upper bounds after applying implications and cliques */
63  SCIP_Real* proplbs, /**< array to store lower bounds after full propagation */
64  SCIP_Real* propubs, /**< array to store upper bounds after full propagation */
65  SCIP_Bool* cutoff /**< pointer to store whether the probing direction is infeasible */
66  );
67 
68 /** analyses boundchanges resulting from probing on a variable and performs deduced fixations, aggregations, and domain tightenings
69  *
70  * Given a variable probingvar with domain [l,u] and bound tightening results from reducing the
71  * domain once to [l,leftub] and once to [rightlb,u], the method computes and applies resulting
72  * variable fixations, aggregations, implications, and bound changes. Variable probingvar does not
73  * need to be binary. The whole domain of probingvar need to be covered by the left and right
74  * branches, i.e., we assume leftub >= rightlb for continuous variables or floor(leftub) >=
75  * ceil(rightlb)-1 for discrete variables. Bounds after applying implications and cliques do not
76  * need to be provided, but if they are omitted and probingvar is a binary variable, then already
77  * existing implications may be added.
78  */
81  SCIP* scip, /**< SCIP data structure */
82  SCIP_VAR* probingvar, /**< the probing variable */
83  SCIP_Real leftub, /**< upper bound of probing variable in left branch */
84  SCIP_Real rightlb, /**< lower bound of probing variable in right branch */
85  int nvars, /**< number of variables which bound changes should be analyzed */
86  SCIP_VAR** vars, /**< variables which bound changes should be analyzed */
87  SCIP_Real* leftimpllbs, /**< lower bounds after applying implications and cliques in left branch, or NULL */
88  SCIP_Real* leftimplubs, /**< upper bounds after applying implications and cliques in left branch, or NULL */
89  SCIP_Real* leftproplbs, /**< lower bounds after applying domain propagation in left branch */
90  SCIP_Real* leftpropubs, /**< upper bounds after applying domain propagation in left branch */
91  SCIP_Real* rightimpllbs, /**< lower bounds after applying implications and cliques in right branch, or NULL */
92  SCIP_Real* rightimplubs, /**< upper bounds after applying implications and cliques in right branch, or NULL */
93  SCIP_Real* rightproplbs, /**< lower bounds after applying domain propagation in right branch */
94  SCIP_Real* rightpropubs, /**< upper bounds after applying domain propagation in right branch */
95  int* nfixedvars, /**< pointer to counter which is increased by the number of deduced variable fixations */
96  int* naggrvars, /**< pointer to counter which is increased by the number of deduced variable aggregations */
97  int* nimplications, /**< pointer to counter which is increased by the number of deduced implications */
98  int* nchgbds, /**< pointer to counter which is increased by the number of deduced bound tightenings */
99  SCIP_Bool* cutoff /**< buffer to store whether a cutoff is detected */
100  );
101 
102 /** @} */
103 
104 #ifdef __cplusplus
105 }
106 #endif
107 
108 #endif
enum SCIP_BoundType SCIP_BOUNDTYPE
Definition: type_lp.h:50
static long bound
#define SCIP_EXPORT
Definition: def.h:100
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:54
type definitions for return codes for SCIP methods
type definitions for LP management
SCIP_EXPORT SCIP_RETCODE SCIPapplyProbingVar(SCIP *scip, SCIP_VAR **vars, int nvars, int probingpos, SCIP_BOUNDTYPE boundtype, SCIP_Real bound, int maxproprounds, SCIP_Real *impllbs, SCIP_Real *implubs, SCIP_Real *proplbs, SCIP_Real *propubs, SCIP_Bool *cutoff)
type definitions for SCIP&#39;s main datastructure
type definitions for problem variables
#define SCIP_Bool
Definition: def.h:70
#define SCIP_Real
Definition: def.h:163
SCIP_EXPORT SCIP_RETCODE SCIPincludePropProbing(SCIP *scip)
SCIP_EXPORT SCIP_RETCODE SCIPanalyzeDeductionsProbing(SCIP *scip, SCIP_VAR *probingvar, SCIP_Real leftub, SCIP_Real rightlb, int nvars, SCIP_VAR **vars, SCIP_Real *leftimpllbs, SCIP_Real *leftimplubs, SCIP_Real *leftproplbs, SCIP_Real *leftpropubs, SCIP_Real *rightimpllbs, SCIP_Real *rightimplubs, SCIP_Real *rightproplbs, SCIP_Real *rightpropubs, int *nfixedvars, int *naggrvars, int *nimplications, int *nchgbds, SCIP_Bool *cutoff)
common defines and data types used in all packages of SCIP