Scippy

GCG

Branch-and-Price & Column Generation for Everyone

type_branchgcg.h
Go to the documentation of this file.
1 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2 /* */
3 /* This file is part of the program */
4 /* GCG --- Generic Column Generation */
5 /* a Dantzig-Wolfe decomposition based extension */
6 /* of the branch-cut-and-price framework */
7 /* SCIP --- Solving Constraint Integer Programs */
8 /* */
9 /* Copyright (C) 2010-2021 Operations Research, RWTH Aachen University */
10 /* Zuse Institute Berlin (ZIB) */
11 /* */
12 /* This program is free software; you can redistribute it and/or */
13 /* modify it under the terms of the GNU Lesser General Public License */
14 /* as published by the Free Software Foundation; either version 3 */
15 /* of the License, or (at your option) any later version. */
16 /* */
17 /* This program is distributed in the hope that it will be useful, */
18 /* but WITHOUT ANY WARRANTY; without even the implied warranty of */
19 /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
20 /* GNU Lesser General Public License for more details. */
21 /* */
22 /* You should have received a copy of the GNU Lesser General Public License */
23 /* along with this program; if not, write to the Free Software */
24 /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.*/
25 /* */
26 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
27 
28 /**@file type_branchgcg.h
29  * @ingroup TYPEDEFINITIONS
30  * @brief type definitions for branching rules in GCG projects
31  * @author Gerald Gamrath
32  */
33 
34 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
35 
36 #ifndef GCG_TYPE_BRANCHGCG_H__
37 #define GCG_TYPE_BRANCHGCG_H__
38 
39 #include "scip/def.h"
40 #include "scip/type_result.h"
41 #include "scip/type_scip.h"
42 
43 #ifdef __cplusplus
44 extern "C" {
45 #endif
46 
47 typedef struct GCG_BranchData GCG_BRANCHDATA; /**< branching data */
48 typedef struct GCG_Branchrule GCG_BRANCHRULE; /**< branching rule */
49 
50 /** type of variable bound: lower or upper bound */
52 {
53  GCG_BOUNDTYPE_LOWER = 0, /**< lower bound */
54  GCG_BOUNDTYPE_UPPER = 1, /**< upper bound */
55  GCG_BOUNDTYPE_FIXED = 2, /**< variable fixed */
56  GCG_BOUNDTYPE_NONE = 3 /**< no bound */
57 };
59 
60 /** activation method for branchrule, called when a node in the master problem is activated,
61  * should perform changes to the current node's problem due to the branchdata
62  *
63  * input:
64  * - scip : SCIP main data structure of the master problem
65  * - branchdata : the branching data
66  */
67 #define GCG_DECL_BRANCHACTIVEMASTER(x) SCIP_RETCODE x (SCIP* scip, GCG_BRANCHDATA* branchdata)
68 
69 /** deactivation method for branchrule, called when a node in the master problem is deactivated,
70  * should undo changes to the current node's problem due to the branchdata
71  *
72  * input:
73  * - scip : SCIP main data structure of the master problem
74  * - branchdata : the branching data
75  */
76 #define GCG_DECL_BRANCHDEACTIVEMASTER(x) SCIP_RETCODE x (SCIP* scip, GCG_BRANCHDATA* branchdata)
77 
78 /** propagation method for branchrule, called when a node in the master problem is propagated,
79  * should perform propagation at the current node due to the branchdata
80  *
81  * input:
82  * - scip : SCIP main data structure of the master problem
83  * - branchdata : the branching data
84  * - node : the activated node
85  * - result : pointer to store the result of the propagation call
86  *
87  * possible return values for *result:
88  * - SCIP_CUTOFF : the node is infeasible in the variable's bounds and can be cut off
89  * - SCIP_REDUCEDDOM : at least one domain reduction was found
90  * - SCIP_DIDNOTFIND : the propagator searched but did not find any domain reductions
91  * - SCIP_DIDNOTRUN : the propagator was skipped
92  * - SCIP_DELAYED : the propagator was skipped, but should be called again
93 
94  */
95 #define GCG_DECL_BRANCHPROPMASTER(x) SCIP_RETCODE x (SCIP* scip, GCG_BRANCHDATA* branchdata, SCIP_RESULT* result)
96 
97 /** method for branchrule, called when the master LP is solved at one node,
98  * can store pseudocosts for the branching decisions
99  *
100  * input:
101  * - scip : SCIP main data structure of the original problem
102  * - branchdata : the branching data
103  * - newlowerbound : the new local lower bound
104  *
105  */
106 #define GCG_DECL_BRANCHMASTERSOLVED(x) SCIP_RETCODE x (SCIP* scip, GCG_BRANCHDATA* branchdata, SCIP_Real newlowerbound)
107 
108 /** frees branching data of an origbranch constraint (called when the origbranch constraint is deleted)
109  *
110  * input:
111  * scip : SCIP main data structure of the original problem
112  * branchdata : pointer to the branching data to free
113  */
114 #define GCG_DECL_BRANCHDATADELETE(x) SCIP_RETCODE x (SCIP* scip, GCG_BRANCHDATA** branchdata)
115 
116 #ifdef __cplusplus
117 }
118 #endif
119 
120 #endif
@ GCG_BOUNDTYPE_LOWER
GCG_BoundType
@ GCG_BOUNDTYPE_NONE
enum GCG_BoundType GCG_BOUNDTYPE
@ GCG_BOUNDTYPE_UPPER
@ GCG_BOUNDTYPE_FIXED