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-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 type_branch.h
17  * @ingroup TYPEDEFINITIONS
18  * @brief type definitions for branching rules
19  * @author Tobias Achterberg
20  *
21  * This file defines the interface for branching rules implemented in C.
22  *
23  * - \ref BRANCH "Instructions for implementing a branching rule"
24  * - \ref PRIMALHEURISTICS "List of available branching rule"
25  * - \ref scip::ObjBranchrule "C++ wrapper class"
26  */
27 
28 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
29 
30 #ifndef __SCIP_TYPE_BRANCH_H__
31 #define __SCIP_TYPE_BRANCH_H__
32 
33 #include "scip/def.h"
34 #include "scip/type_result.h"
35 #include "scip/type_scip.h"
36 
37 #ifdef __cplusplus
38 extern "C" {
39 #endif
40 
41 typedef struct SCIP_BranchCand SCIP_BRANCHCAND; /**< branching candidate storage */
42 typedef struct SCIP_Branchrule SCIP_BRANCHRULE; /**< branching method data structure */
43 typedef struct SCIP_BranchruleData SCIP_BRANCHRULEDATA; /**< branching method specific data */
44 
45 
46 /** copy method for branchrule plugins (called when SCIP copies plugins)
47  *
48  * input:
49  * - scip : SCIP main data structure
50  * - branchrule : the branching rule itself
51  */
52 #define SCIP_DECL_BRANCHCOPY(x) SCIP_RETCODE x (SCIP* scip, SCIP_BRANCHRULE* branchrule)
53 
54 /** destructor of branching method to free user data (called when SCIP is exiting)
55  *
56  * input:
57  * - scip : SCIP main data structure
58  * - branchrule : the branching rule itself
59  */
60 #define SCIP_DECL_BRANCHFREE(x) SCIP_RETCODE x (SCIP* scip, SCIP_BRANCHRULE* branchrule)
61 
62 /** initialization method of branching rule (called after problem was transformed)
63  *
64  * input:
65  * - scip : SCIP main data structure
66  * - branchrule : the branching rule itself
67  */
68 #define SCIP_DECL_BRANCHINIT(x) SCIP_RETCODE x (SCIP* scip, SCIP_BRANCHRULE* branchrule)
69 
70 /** deinitialization method of branching rule (called before transformed problem is freed)
71  *
72  * input:
73  * - scip : SCIP main data structure
74  * - branchrule : the branching rule itself
75  */
76 #define SCIP_DECL_BRANCHEXIT(x) SCIP_RETCODE x (SCIP* scip, SCIP_BRANCHRULE* branchrule)
77 
78 /** solving process initialization method of branching rule (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 branching rule may use this call to initialize its branch and bound specific data.
82  *
83  * input:
84  * - scip : SCIP main data structure
85  * - branchrule : the branching rule itself
86  */
87 #define SCIP_DECL_BRANCHINITSOL(x) SCIP_RETCODE x (SCIP* scip, SCIP_BRANCHRULE* branchrule)
88 
89 /** solving process deinitialization method of branching rule (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 branching rule should use this call to clean up its branch and bound data.
93  *
94  * input:
95  * - scip : SCIP main data structure
96  * - branchrule : the branching rule itself
97  */
98 #define SCIP_DECL_BRANCHEXITSOL(x) SCIP_RETCODE x (SCIP* scip, SCIP_BRANCHRULE* branchrule)
99 
100 /** branching execution method for fractional LP solutions
101  *
102  * input:
103  * - scip : SCIP main data structure
104  * - branchrule : the branching rule itself
105  * - allowaddcons : is the branching rule allowed to add constraints to the current node in order to cut off the
106  * current solution instead of creating a branching?
107  * - result : pointer to store the result of the branching call
108  *
109  * possible return values for *result (if more than one applies, the first in the list should be used):
110  * - SCIP_CUTOFF : the current node was detected to be infeasible
111  * - SCIP_CONSADDED : an additional constraint (e.g. a conflict constraint) was generated; this result code must not be
112  * returned, if allowaddcons is FALSE
113  * - SCIP_REDUCEDDOM : a domain was reduced that rendered the current LP solution infeasible
114  * - SCIP_SEPARATED : a cutting plane was generated
115  * - SCIP_BRANCHED : branching was applied
116  * - SCIP_DIDNOTFIND : the branching rule searched, but did not find a branching
117  * - SCIP_DIDNOTRUN : the branching rule was skipped
118  */
119 #define SCIP_DECL_BRANCHEXECLP(x) SCIP_RETCODE x (SCIP* scip, SCIP_BRANCHRULE* branchrule, SCIP_Bool allowaddcons, SCIP_RESULT* result)
120 
121 
122 /** branching execution method for external candidates
123  *
124  * input:
125  * - scip : SCIP main data structure
126  * - branchrule : the branching rule itself
127  * - allowaddcons : is the branching rule allowed to add constraints to the current node in order to cut off the
128  * current solution instead of creating a branching?
129  * - result : pointer to store the result of the branching call
130  *
131  * possible return values for *result (if more than one applies, the first in the list should be used):
132  * - SCIP_CUTOFF : the current node was detected to be infeasible
133  * - SCIP_CONSADDED : an additional constraint (e.g. a conflict constraint) was generated; this result code must not be
134  * returned, if allowaddcons is FALSE
135  * - SCIP_REDUCEDDOM : a domain was reduced that rendered the current pseudo solution infeasible
136  * - SCIP_BRANCHED : branching was applied
137  * - SCIP_DIDNOTFIND : the branching rule searched, but did not find a branching
138  * - SCIP_DIDNOTRUN : the branching rule was skipped
139  */
140 #define SCIP_DECL_BRANCHEXECEXT(x) SCIP_RETCODE x (SCIP* scip, SCIP_BRANCHRULE* branchrule, SCIP_Bool allowaddcons, SCIP_RESULT* result)
141 
142 
143 /** branching execution method for not completely fixed pseudo solutions
144  *
145  * input:
146  * - scip : SCIP main data structure
147  * - branchrule : the branching rule itself
148  * - allowaddcons : is the branching rule allowed to add constraints to the current node in order to cut off the
149  * current solution instead of creating a branching?
150  * - result : pointer to store the result of the branching call
151  *
152  * possible return values for *result (if more than one applies, the first in the list should be used):
153  * - SCIP_CUTOFF : the current node was detected to be infeasible
154  * - SCIP_CONSADDED : an additional constraint (e.g. a conflict constraint) was generated; this result code must not be
155  * returned, if allowaddcons is FALSE
156  * - SCIP_REDUCEDDOM : a domain was reduced that rendered the current pseudo solution infeasible
157  * - SCIP_BRANCHED : branching was applied
158  * - SCIP_DIDNOTFIND : the branching rule searched, but did not find a branching
159  * - SCIP_DIDNOTRUN : the branching rule was skipped
160  */
161 #define SCIP_DECL_BRANCHEXECPS(x) SCIP_RETCODE x (SCIP* scip, SCIP_BRANCHRULE* branchrule, SCIP_Bool allowaddcons, SCIP_RESULT* result)
162 
163 #ifdef __cplusplus
164 }
165 #endif
166 
167 #endif
struct SCIP_BranchruleData SCIP_BRANCHRULEDATA
Definition: type_branch.h:43
type definitions for SCIP&#39;s main datastructure
struct SCIP_BranchCand SCIP_BRANCHCAND
Definition: type_branch.h:41
result codes for SCIP callback methods
common defines and data types used in all packages of SCIP
struct SCIP_Branchrule SCIP_BRANCHRULE
Definition: type_branch.h:42