Scippy

SCIP

Solving Constraint Integer Programs

type_sepa.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-2022 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 type_sepa.h
17  * @ingroup TYPEDEFINITIONS
18  * @brief type definitions for separators
19  * @author Tobias Achterberg
20  */
21 
22 /** @defgroup DEFPLUGINS_SEPA Default Separators
23  * @ingroup DEFPLUGINS
24  * @brief implementation files (.c files) of the default separators of SCIP
25  */
26 
27 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
28 
29 #ifndef __SCIP_TYPE_SEPA_H__
30 #define __SCIP_TYPE_SEPA_H__
31 
32 #include "scip/def.h"
33 #include "scip/type_retcode.h"
34 #include "scip/type_result.h"
35 #include "scip/type_sol.h"
36 #include "scip/type_scip.h"
37 
38 #ifdef __cplusplus
39 extern "C" {
40 #endif
41 
42 typedef struct SCIP_Sepa SCIP_SEPA; /**< separator */
43 typedef struct SCIP_SepaData SCIP_SEPADATA; /**< locally defined separator data */
44 
45 
46 /** copy method for separator plugins (called when SCIP copies plugins)
47  *
48  * input:
49  * - scip : SCIP main data structure
50  * - sepa : the separator itself
51  */
52 #define SCIP_DECL_SEPACOPY(x) SCIP_RETCODE x (SCIP* scip, SCIP_SEPA* sepa)
53 
54 /** destructor of separator to free user data (called when SCIP is exiting)
55  *
56  * input:
57  * - scip : SCIP main data structure
58  * - sepa : the separator itself
59  */
60 #define SCIP_DECL_SEPAFREE(x) SCIP_RETCODE x (SCIP* scip, SCIP_SEPA* sepa)
61 
62 /** initialization method of separator (called after problem was transformed)
63  *
64  * input:
65  * - scip : SCIP main data structure
66  * - sepa : the separator itself
67  */
68 #define SCIP_DECL_SEPAINIT(x) SCIP_RETCODE x (SCIP* scip, SCIP_SEPA* sepa)
69 
70 /** deinitialization method of separator (called before transformed problem is freed)
71  *
72  * input:
73  * - scip : SCIP main data structure
74  * - sepa : the separator itself
75  */
76 #define SCIP_DECL_SEPAEXIT(x) SCIP_RETCODE x (SCIP* scip, SCIP_SEPA* sepa)
77 
78 /** solving process initialization method of separator (called when branch and bound process is about to begin)
79  *
80  * This method is called when the presolving was finished and the branch and bound process is about to begin.
81  * The separator may use this call to initialize its branch and bound specific data.
82  *
83  * input:
84  * - scip : SCIP main data structure
85  * - sepa : the separator itself
86  */
87 #define SCIP_DECL_SEPAINITSOL(x) SCIP_RETCODE x (SCIP* scip, SCIP_SEPA* sepa)
88 
89 /** solving process deinitialization method of separator (called before branch and bound process data is freed)
90  *
91  * This method is called before the branch and bound process is freed.
92  * The separator should use this call to clean up its branch and bound data.
93  *
94  * input:
95  * - scip : SCIP main data structure
96  * - sepa : the separator itself
97  */
98 #define SCIP_DECL_SEPAEXITSOL(x) SCIP_RETCODE x (SCIP* scip, SCIP_SEPA* sepa)
99 
100 /** LP solution separation method of separator
101  *
102  * Searches for cutting planes that separate the current LP solution. The method is called in the LP solving loop,
103  * which means that a valid LP solution exists.
104  *
105  * input:
106  * - scip : SCIP main data structure
107  * - sepa : the separator itself
108  * - result : pointer to store the result of the separation call
109  * - allowlocal : should the separator allow local cuts?
110  * - depth : preteneded depth of current node
111  *
112  * @note The depth argument shouldn't be use to determine whether the cut is globally valid or not. The value of depth
113  * could be 0 even though we are not in the root node! The purpose of depth is to control the behavior of the
114  * separator. Usually separators will have different limits on the number of cuts to be applied in the root node, etc.
115  * These limits should be checked against depth and not against the actual depth of the current node.
116  *
117  * possible return values for *result (if more than one applies, the first in the list should be used):
118  * - SCIP_CUTOFF : the node is infeasible in the variable's bounds and can be cut off
119  * - SCIP_CONSADDED : an additional constraint was generated
120  * - SCIP_REDUCEDDOM : a variable's domain was reduced
121  * - SCIP_SEPARATED : a cutting plane was generated
122  * - SCIP_NEWROUND : a cutting plane was generated and a new separation round should immediately start
123  * - SCIP_DIDNOTFIND : the separator searched, but did not find domain reductions, cutting planes, or cut constraints
124  * - SCIP_DIDNOTRUN : the separator was skipped
125  * - SCIP_DELAYED : the separator was skipped, but should be called again
126  */
127 #define SCIP_DECL_SEPAEXECLP(x) SCIP_RETCODE x (SCIP* scip, SCIP_SEPA* sepa, SCIP_RESULT* result, SCIP_Bool allowlocal, int depth)
128 
129 /** arbitrary primal solution separation method of separator
130  *
131  * Searches for cutting planes that separate the given primal solution. The method is called outside the LP solution
132  * loop (e.g., by a relaxator or a primal heuristic), which means that there is no valid LP solution.
133  *
134  * input:
135  * - scip : SCIP main data structure
136  * - sepa : the separator itself
137  * - sol : primal solution that should be separated
138  * - result : pointer to store the result of the separation call
139  * - allowlocal : should the separator allow local cuts?
140  * - depth : preteneded depth of current node
141  *
142  * @note The depth argument shouldn't be use to determine whether the cut is globally valid or not. The value of depth
143  * could be 0 even though we are not in the root node! The purpose of depth is to control the behavior of the
144  * separator. Usually separators will have different limits on the number of cuts to be applied in the root node, etc.
145  * These limits should be checked against depth and not against the actual depth of the current node.
146  *
147  * possible return values for *result (if more than one applies, the first in the list should be used):
148  * - SCIP_CUTOFF : the node is infeasible in the variable's bounds and can be cut off
149  * - SCIP_CONSADDED : an additional constraint was generated
150  * - SCIP_REDUCEDDOM : a variable's domain was reduced
151  * - SCIP_SEPARATED : a cutting plane was generated
152  * - SCIP_NEWROUND : a cutting plane was generated and a new separation round should immediately start
153  * - SCIP_DIDNOTFIND : the separator searched, but did not find domain reductions, cutting planes, or cut constraints
154  * - SCIP_DIDNOTRUN : the separator was skipped
155  * - SCIP_DELAYED : the separator was skipped, but should be called again
156  */
157 #define SCIP_DECL_SEPAEXECSOL(x) SCIP_RETCODE x (SCIP* scip, SCIP_SEPA* sepa, SCIP_SOL* sol, SCIP_RESULT* result, SCIP_Bool allowlocal, int depth)
158 
159 #ifdef __cplusplus
160 }
161 #endif
162 
163 #endif
type definitions for return codes for SCIP methods
type definitions for SCIP&#39;s main datastructure
type definitions for storing primal CIP solutions
result codes for SCIP callback methods
common defines and data types used in all packages of SCIP
struct SCIP_SepaData SCIP_SEPADATA
Definition: type_sepa.h:43