Scippy

GCG

Branch-and-Price & Column Generation for Everyone

type_detector.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_detector.h
29  * @ingroup TYPEDEFINITIONS
30  * @brief type definitions for detectors in GCG projects
31  * @author Martin Bergner
32  * @author Christian Puchert
33  */
34 
35 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
36 
37 #ifndef GCG_TYPE_DETECTOR_H__
38 #define GCG_TYPE_DETECTOR_H__
39 
40 #include "scip/type_retcode.h"
41 #include "scip/type_scip.h"
42 #include "scip/type_result.h"
43 #include "type_decomp.h"
44 
45 
46 typedef struct DEC_Detector DEC_DETECTOR;
48 
49 
52 
53 
54 /** destructor of detector to free user data (called when GCG is exiting)
55  *
56  * input:
57  * - scip : SCIP main data structure
58  * - detector : detector data structure
59  */
60 #define DEC_DECL_FREEDETECTOR(x) SCIP_RETCODE x (SCIP* scip, DEC_DETECTOR* detector)
61 
62 /**
63  * detector initialization method (called after problem was transformed)
64  * It can be used to fill the detector data with needed information. The implementation is optional.
65  *
66  * input:
67  * - scip : SCIP data structure
68  * - detector : detector data structure
69  */
70 #define DEC_DECL_INITDETECTOR(x) SCIP_RETCODE x (SCIP* scip, DEC_DETECTOR* detector)
71 
72 /**
73  * detector deinitialization method (called before the transformed problem is freed)
74  * It can be used to clean up the data created in DEC_DECL_INITDETECTOR. The implementation is optional.
75  *
76  * input:
77  * - scip : SCIP data structure
78  * - detector : detector data structure
79  */
80 #define DEC_DECL_EXITDETECTOR(x) SCIP_RETCODE x (SCIP* scip, DEC_DETECTOR* detector)
81 
82 
83 /**
84  * given a partialdec (incomplete decomposition) the detector
85  * tries to find refined partialdec and stores it
86  *
87  * input:
88  * - scip : SCIP data structure
89  * - detector : pointer to detector
90  * - partialdecdetectiondata : pointer to partialdec propagation data structure
91  * - result : pointer where to store the result
92  *
93  * possible return values for result:
94  * - SCIP_SUCCESS : the method completed and found decompositions
95  * - SCIP_DIDNOTFIND : the method completed without finding a decomposition
96  * - SCIP_DIDNOTRUN : the method did not run
97  */
98 #define DEC_DECL_PROPAGATEPARTIALDEC(x) SCIP_RETCODE x (SCIP* scip, DEC_DETECTOR* detector, PARTIALDEC_DETECTION_DATA* partialdecdetectiondata, SCIP_RESULT* result)
99 
100 
101 /**
102  * given a partialdec (incomplete decomposition) the detector
103  * tries to find finished partialdecs and stores them
104  *
105  * input:
106  * - scip : SCIP data structure
107  * - detector : pointer to detector
108  * - partialdecdetectiondata : pointer to partialdec propagation data structure
109  * - result : pointer where to store the result
110  *
111  * possible return values for result:
112  * - SCIP_SUCCESS : the method completed and found decompositions
113  * - SCIP_DIDNOTFIND : the method completed without finding a decomposition
114  * - SCIP_DIDNOTRUN : the method did not run
115  */
116 #define DEC_DECL_FINISHPARTIALDEC(x) SCIP_RETCODE x (SCIP* scip, DEC_DETECTOR* detector, PARTIALDEC_DETECTION_DATA* partialdecdetectiondata, SCIP_RESULT* result)
117 
118 /**
119  * given a complete partialdec (complete decomposition) the detector
120  * postprocess the partialdec in order to find a different yet promising partialdec
121  *
122  * input:
123  * - scip : SCIP data structure
124  * - detector : pointer to detector
125  * - partialdecdetectiondata : pointer to partialdec propagation data structure
126  * - result : pointer where to store the result
127  *
128  * possible return values for result:
129  * - SCIP_SUCCESS : the method completed and found decompositions
130  * - SCIP_DIDNOTFIND : the method completed without finding a decomposition
131  * - SCIP_DIDNOTRUN : the method did not run
132  */
133 #define DEC_DECL_POSTPROCESSPARTIALDEC(x) SCIP_RETCODE x (SCIP* scip, DEC_DETECTOR* detector, PARTIALDEC_DETECTION_DATA* partialdecdetectiondata, SCIP_RESULT* result)
134 
135 /**
136  * set the parameter of a detector to values according to fast emphasis and size of the instance
137  * input:
138  * - scip : SCIP data structure
139  * - detector : pointer to detector
140  * - result : pointer where to store the result
141  *
142  * possible return values for result:
143  * - SCIP_SUCCESS : the method completed
144  * - SCIP_DIDNOTRUN : the method did not run
145  */
146 #define DEC_DECL_SETPARAMFAST(x) SCIP_RETCODE x (SCIP* scip, DEC_DETECTOR* detector, SCIP_RESULT* result)
147 
148 /**
149  * set the parameter of a detector to values according to aggressive emphasis and size of the instance
150  * input:
151  * - scip : SCIP data structure
152  * - detector : pointer to detector
153  * - result : pointer where to store the result
154  *
155  * possible return values for result:
156  * - SCIP_SUCCESS : the method completed
157  * - SCIP_DIDNOTRUN : the method did not run
158  */
159 #define DEC_DECL_SETPARAMAGGRESSIVE(x) SCIP_RETCODE x (SCIP* scip, DEC_DETECTOR* detector, SCIP_RESULT* result)
160 
161 /**
162  * set the parameter of a detector to values according to default emphasis and size of the instance
163  * input:
164  * - scip : SCIP data structure
165  * - detector : pointer to detector
166  * - result : pointer where to store the result
167  *
168  * possible return values for result:
169  * - SCIP_SUCCESS : the method completed
170  * - SCIP_DIDNOTRUN : the method did not run
171  */
172 #define DEC_DECL_SETPARAMDEFAULT(x) SCIP_RETCODE x (SCIP* scip, DEC_DETECTOR* detector, SCIP_RESULT* result)
173 
174 
175 
176 #endif
interface data structure for the detector calling methods
type definitions for decomposition information in GCG projects