Scippy

SCIP

Solving Constraint Integer Programs

type_branch.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-2024 Zuse Institute Berlin (ZIB) */
7 /* */
8 /* Licensed under the Apache License, Version 2.0 (the "License"); */
9 /* you may not use this file except in compliance with the License. */
10 /* You may obtain a copy of the License at */
11 /* */
12 /* http://www.apache.org/licenses/LICENSE-2.0 */
13 /* */
14 /* Unless required by applicable law or agreed to in writing, software */
15 /* distributed under the License is distributed on an "AS IS" BASIS, */
16 /* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */
17 /* See the License for the specific language governing permissions and */
18 /* limitations under the License. */
19 /* */
20 /* You should have received a copy of the Apache-2.0 license */
21 /* along with SCIP; see the file LICENSE. If not visit scipopt.org. */
22 /* */
23 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
24 
25 /**@file type_branch.h
26  * @ingroup TYPEDEFINITIONS
27  * @brief type definitions for branching rules
28  * @author Tobias Achterberg
29  *
30  * This file defines the interface for branching rules implemented in C.
31  *
32  * - \ref BRANCH "Instructions for implementing a branching rule"
33  * - \ref PRIMALHEURISTICS "List of available branching rule"
34  * - \ref scip::ObjBranchrule "C++ wrapper class"
35  */
36 
37 /** @defgroup DEFPLUGINS_BRANCH Default branching rules
38  * @ingroup DEFPLUGINS
39  * @brief implementation files (.c files) of the default branching rules of SCIP
40  */
41 
42 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
43 
44 #ifndef __SCIP_TYPE_BRANCH_H__
45 #define __SCIP_TYPE_BRANCH_H__
46 
47 #include "scip/def.h"
48 #include "scip/type_result.h"
49 #include "scip/type_scip.h"
50 
51 #ifdef __cplusplus
52 extern "C" {
53 #endif
54 
55 typedef struct SCIP_BranchCand SCIP_BRANCHCAND; /**< branching candidate storage */
56 typedef struct SCIP_Branchrule SCIP_BRANCHRULE; /**< branching method data structure */
57 typedef struct SCIP_BranchruleData SCIP_BRANCHRULEDATA; /**< branching method specific data */
58 typedef struct SCIP_Treemodel SCIP_TREEMODEL; /**< parameter storage for the Treemodel branching rules */
59 
60 
61 /** copy method for branchrule plugins (called when SCIP copies plugins)
62  *
63  * input:
64  * - scip : SCIP main data structure
65  * - branchrule : the branching rule itself
66  */
67 #define SCIP_DECL_BRANCHCOPY(x) SCIP_RETCODE x (SCIP* scip, SCIP_BRANCHRULE* branchrule)
68 
69 /** destructor of branching method to free user data (called when SCIP is exiting)
70  *
71  * input:
72  * - scip : SCIP main data structure
73  * - branchrule : the branching rule itself
74  */
75 #define SCIP_DECL_BRANCHFREE(x) SCIP_RETCODE x (SCIP* scip, SCIP_BRANCHRULE* branchrule)
76 
77 /** initialization method of branching rule (called after problem was transformed)
78  *
79  * input:
80  * - scip : SCIP main data structure
81  * - branchrule : the branching rule itself
82  */
83 #define SCIP_DECL_BRANCHINIT(x) SCIP_RETCODE x (SCIP* scip, SCIP_BRANCHRULE* branchrule)
84 
85 /** deinitialization method of branching rule (called before transformed problem is freed)
86  *
87  * input:
88  * - scip : SCIP main data structure
89  * - branchrule : the branching rule itself
90  */
91 #define SCIP_DECL_BRANCHEXIT(x) SCIP_RETCODE x (SCIP* scip, SCIP_BRANCHRULE* branchrule)
92 
93 /** solving process initialization method of branching rule (called when branch and bound process is about to begin)
94  *
95  * This method is called when the presolving was finished and the branch and bound process is about to begin.
96  * The branching rule may use this call to initialize its branch and bound specific data.
97  *
98  * input:
99  * - scip : SCIP main data structure
100  * - branchrule : the branching rule itself
101  */
102 #define SCIP_DECL_BRANCHINITSOL(x) SCIP_RETCODE x (SCIP* scip, SCIP_BRANCHRULE* branchrule)
103 
104 /** solving process deinitialization method of branching rule (called before branch and bound process data is freed)
105  *
106  * This method is called before the branch and bound process is freed.
107  * The branching rule should use this call to clean up its branch and bound data.
108  *
109  * input:
110  * - scip : SCIP main data structure
111  * - branchrule : the branching rule itself
112  */
113 #define SCIP_DECL_BRANCHEXITSOL(x) SCIP_RETCODE x (SCIP* scip, SCIP_BRANCHRULE* branchrule)
114 
115 /** branching execution method for fractional LP solutions
116  *
117  * input:
118  * - scip : SCIP main data structure
119  * - branchrule : the branching rule itself
120  * - allowaddcons : is the branching rule allowed to add constraints to the current node in order to cut off the
121  * current solution instead of creating a branching?
122  * - result : pointer to store the result of the branching call
123  *
124  * possible return values for *result (if more than one applies, the first in the list should be used):
125  * - SCIP_CUTOFF : the current node was detected to be infeasible
126  * - SCIP_CONSADDED : an additional constraint (e.g. a conflict constraint) was generated; this result code must not be
127  * returned, if allowaddcons is FALSE
128  * - SCIP_REDUCEDDOM : a domain was reduced that rendered the current LP solution infeasible
129  * - SCIP_SEPARATED : a cutting plane was generated
130  * - SCIP_BRANCHED : branching was applied
131  * - SCIP_DIDNOTFIND : the branching rule searched, but did not find a branching
132  * - SCIP_DIDNOTRUN : the branching rule was skipped
133  */
134 #define SCIP_DECL_BRANCHEXECLP(x) SCIP_RETCODE x (SCIP* scip, SCIP_BRANCHRULE* branchrule, SCIP_Bool allowaddcons, SCIP_RESULT* result)
135 
136 
137 /** branching execution method for external candidates
138  *
139  * input:
140  * - scip : SCIP main data structure
141  * - branchrule : the branching rule itself
142  * - allowaddcons : is the branching rule allowed to add constraints to the current node in order to cut off the
143  * current solution instead of creating a branching?
144  * - result : pointer to store the result of the branching call
145  *
146  * possible return values for *result (if more than one applies, the first in the list should be used):
147  * - SCIP_CUTOFF : the current node was detected to be infeasible
148  * - SCIP_CONSADDED : an additional constraint (e.g. a conflict constraint) was generated; this result code must not be
149  * returned, if allowaddcons is FALSE
150  * - SCIP_REDUCEDDOM : a domain was reduced that rendered the current pseudo solution infeasible
151  * - SCIP_BRANCHED : branching was applied
152  * - SCIP_DIDNOTFIND : the branching rule searched, but did not find a branching
153  * - SCIP_DIDNOTRUN : the branching rule was skipped
154  */
155 #define SCIP_DECL_BRANCHEXECEXT(x) SCIP_RETCODE x (SCIP* scip, SCIP_BRANCHRULE* branchrule, SCIP_Bool allowaddcons, SCIP_RESULT* result)
156 
157 
158 /** branching execution method for not completely fixed pseudo solutions
159  *
160  * input:
161  * - scip : SCIP main data structure
162  * - branchrule : the branching rule itself
163  * - allowaddcons : is the branching rule allowed to add constraints to the current node in order to cut off the
164  * current solution instead of creating a branching?
165  * - result : pointer to store the result of the branching call
166  *
167  * possible return values for *result (if more than one applies, the first in the list should be used):
168  * - SCIP_CUTOFF : the current node was detected to be infeasible
169  * - SCIP_CONSADDED : an additional constraint (e.g. a conflict constraint) was generated; this result code must not be
170  * returned, if allowaddcons is FALSE
171  * - SCIP_REDUCEDDOM : a domain was reduced that rendered the current pseudo solution infeasible
172  * - SCIP_BRANCHED : branching was applied
173  * - SCIP_DIDNOTFIND : the branching rule searched, but did not find a branching
174  * - SCIP_DIDNOTRUN : the branching rule was skipped
175  */
176 #define SCIP_DECL_BRANCHEXECPS(x) SCIP_RETCODE x (SCIP* scip, SCIP_BRANCHRULE* branchrule, SCIP_Bool allowaddcons, SCIP_RESULT* result)
177 
178 #ifdef __cplusplus
179 }
180 #endif
181 
182 #endif
struct SCIP_BranchruleData SCIP_BRANCHRULEDATA
Definition: type_branch.h:57
type definitions for SCIP&#39;s main datastructure
result codes for SCIP callback methods
common defines and data types used in all packages of SCIP