GCG 4.1.1 (dev)

Generic Column Generation

Loading...
Searching...
No Matches
type_detector.h
Go to the documentation of this file.
1/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2/* */
3/* This file is part of the program and library */
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-2026 Operations Research, RWTH Aachen University */
10/* Zuse Institute Berlin (ZIB) */
11/* */
12/* Licensed under the Apache License, Version 2.0 (the "License"); */
13/* you may not use this file except in compliance with the License. */
14/* You may obtain a copy of the License at */
15/* */
16/* http://www.apache.org/licenses/LICENSE-2.0 */
17/* */
18/* Unless required by applicable law or agreed to in writing, software */
19/* distributed under the License is distributed on an "AS IS" BASIS, */
20/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */
21/* See the License for the specific language governing permissions and */
22/* limitations under the License. */
23/* */
24/* You should have received a copy of the Apache-2.0 license */
25/* along with GCG; see the file LICENSE. If not visit gcg.or.rwth-aachen.de.*/
26/* */
27/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
28
29/**@file type_detector.h
30 * @ingroup TYPEDEFINITIONS
31 * @brief type definitions for detectors in GCG projects
32 * @author Martin Bergner
33 * @author Christian Puchert
34 */
35
36/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
37
38#ifndef GCG_TYPE_DETECTOR_H__
39#define GCG_TYPE_DETECTOR_H__
40
41#include "scip/type_retcode.h"
42#include "scip/type_scip.h"
43#include "scip/type_result.h"
44#include "gcg/type_decomp.h"
45#include "gcg/type_gcg.h"
46
47
50
51
54
55
56/** destructor of detector to free user data (called when GCG is exiting)
57 *
58 * input:
59 * - scip : SCIP main data structure
60 * - detector : detector data structure
61 */
62#define GCG_DECL_FREEDETECTOR(x) SCIP_RETCODE x (GCG* gcg, GCG_DETECTOR* detector)
63
64/**
65 * detector initialization method (called after problem was transformed)
66 * It can be used to fill the detector data with needed information. The implementation is optional.
67 *
68 * input:
69 * - scip : SCIP data structure
70 * - detector : detector data structure
71 */
72#define GCG_DECL_INITDETECTOR(x) SCIP_RETCODE x (GCG* gcg, GCG_DETECTOR* detector)
73
74/**
75 * detector deinitialization method (called before the transformed problem is freed)
76 * It can be used to clean up the data created in DEC_DECL_INITDETECTOR. The implementation is optional.
77 *
78 * input:
79 * - scip : SCIP data structure
80 * - detector : detector data structure
81 */
82#define GCG_DECL_EXITDETECTOR(x) SCIP_RETCODE x (GCG* gcg, GCG_DETECTOR* detector)
83
84
85/**
86 * given a partialdec (incomplete decomposition) the detector
87 * tries to find refined partialdec and stores it
88 *
89 * input:
90 * - scip : SCIP data structure
91 * - detector : pointer to detector
92 * - partialdecdetectiondata : pointer to partialdec propagation data structure
93 * - result : pointer where to store the result
94 *
95 * possible return values for result:
96 * - SCIP_SUCCESS : the method completed and found decompositions
97 * - SCIP_DIDNOTFIND : the method completed without finding a decomposition
98 * - SCIP_DIDNOTRUN : the method did not run
99 */
100#define GCG_DECL_PROPAGATEPARTIALDEC(x) SCIP_RETCODE x (GCG* gcg, GCG_DETECTOR* detector, PARTIALDEC_DETECTION_DATA* partialdecdetectiondata, SCIP_RESULT* result)
101
102
103/**
104 * given a partialdec (incomplete decomposition) the detector
105 * tries to find finished partialdecs and stores them
106 *
107 * input:
108 * - scip : SCIP data structure
109 * - detector : pointer to detector
110 * - partialdecdetectiondata : pointer to partialdec propagation data structure
111 * - result : pointer where to store the result
112 *
113 * possible return values for result:
114 * - SCIP_SUCCESS : the method completed and found decompositions
115 * - SCIP_DIDNOTFIND : the method completed without finding a decomposition
116 * - SCIP_DIDNOTRUN : the method did not run
117 */
118#define GCG_DECL_FINISHPARTIALDEC(x) SCIP_RETCODE x (GCG* gcg, GCG_DETECTOR* detector, PARTIALDEC_DETECTION_DATA* partialdecdetectiondata, SCIP_RESULT* result)
119
120/**
121 * given a complete partialdec (complete decomposition) the detector
122 * postprocess the partialdec in order to find a different yet promising partialdec
123 *
124 * input:
125 * - scip : SCIP data structure
126 * - detector : pointer to detector
127 * - partialdecdetectiondata : pointer to partialdec propagation data structure
128 * - result : pointer where to store the result
129 *
130 * possible return values for result:
131 * - SCIP_SUCCESS : the method completed and found decompositions
132 * - SCIP_DIDNOTFIND : the method completed without finding a decomposition
133 * - SCIP_DIDNOTRUN : the method did not run
134 */
135#define GCG_DECL_POSTPROCESSPARTIALDEC(x) SCIP_RETCODE x (GCG* gcg, GCG_DETECTOR* detector, PARTIALDEC_DETECTION_DATA* partialdecdetectiondata, SCIP_RESULT* result)
136
137/**
138 * set the parameter of a detector to values according to fast emphasis and size of the instance
139 * input:
140 * - scip : SCIP data structure
141 * - detector : pointer to detector
142 * - result : pointer where to store the result
143 *
144 * possible return values for result:
145 * - SCIP_SUCCESS : the method completed
146 * - SCIP_DIDNOTRUN : the method did not run
147 */
148#define GCG_DECL_SETPARAMFAST(x) SCIP_RETCODE x (GCG* gcg, GCG_DETECTOR* detector, SCIP_RESULT* result)
149
150/**
151 * set the parameter of a detector to values according to aggressive emphasis and size of the instance
152 * input:
153 * - scip : SCIP data structure
154 * - detector : pointer to detector
155 * - result : pointer where to store the result
156 *
157 * possible return values for result:
158 * - SCIP_SUCCESS : the method completed
159 * - SCIP_DIDNOTRUN : the method did not run
160 */
161#define GCG_DECL_SETPARAMAGGRESSIVE(x) SCIP_RETCODE x (GCG* gcg, GCG_DETECTOR* detector, SCIP_RESULT* result)
162
163/**
164 * set the parameter of a detector to values according to default emphasis and size of the instance
165 * input:
166 * - scip : SCIP data structure
167 * - detector : pointer to detector
168 * - result : pointer where to store the result
169 *
170 * possible return values for result:
171 * - SCIP_SUCCESS : the method completed
172 * - SCIP_DIDNOTRUN : the method did not run
173 */
174#define GCG_DECL_SETPARAMDEFAULT(x) SCIP_RETCODE x (GCG* gcg, GCG_DETECTOR* detector, SCIP_RESULT* result)
175
176
177
178#endif
interface data structure for the detector calling methods
type definitions for decomposition information in GCG projects
struct Partialdec_Detection_Data PARTIALDEC_DETECTION_DATA
struct GCG_Detector GCG_DETECTOR
struct GCG_DetectorData GCG_DETECTORDATA