GCG 4.1.1 (dev)

Generic Column Generation

Loading...
Searching...
No Matches
type_pricingcb.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_pricingcb.h
30 * @ingroup TYPEDEFINITIONS
31 * @brief type definitions for the pricing callback plugin
32 * @author Stephen J. Maher
33 *
34 * This file defines the interface for pricing callback plugins implemented in C.
35 *
36 */
37
38/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
39
40#ifndef __SCIP_TYPE_PRICINGCB_H__
41#define __SCIP_TYPE_PRICINGCB_H__
42
43#include "scip/def.h"
44#include "scip/type_pricer.h"
45#include "scip/type_result.h"
46#include "gcg/type_pricetype.h"
47#include "gcg/type_gcg.h"
48
49#ifdef __cplusplus
50extern "C" {
51#endif
52
53typedef struct GCG_Pricingcb GCG_PRICINGCB; /**< the pricing callback structure */
54typedef struct GCG_PricingcbData GCG_PRICINGCBDATA; /**< locally defined pricing callback data */
55
56
57/** copy method for the pricing callback plugins (called when SCIP copies plugins)
58 *
59 * input:
60 * - gcg : GCG data structure
61 * - pricingcb : the pricing callback structure
62 */
63#define GCG_DECL_PRICINGCBCOPY(x) SCIP_RETCODE x (GCG* gcg, GCG_PRICINGCB* pricingcb)
64
65/** destructor of the pricing callback to free user data (called when SCIP is exiting)
66 *
67 * input:
68 * - gcg : GCG data structure
69 * - pricingcb : the pricing callback structure
70 */
71#define GCG_DECL_PRICINGCBFREE(x) SCIP_RETCODE x (GCG* gcg, GCG_PRICINGCB* pricingcb)
72
73/** initialization method of the pricing callback (called after problem was transformed)
74 *
75 * input:
76 * - gcg : GCG data structure
77 * - pricingcb : the pricing callback structure
78 */
79#define GCG_DECL_PRICINGCBINIT(x) SCIP_RETCODE x (GCG* gcg, GCG_PRICINGCB* pricingcb)
80
81/** deinitialization method of the pricing callback (called before transformed problem is freed)
82 *
83 * input:
84 * - gcg : GCG data structure
85 * - pricingcb : the pricing callback structure
86 */
87#define GCG_DECL_PRICINGCBEXIT(x) SCIP_RETCODE x (GCG* gcg, GCG_PRICINGCB* pricingcb)
88
89/** solving process initialization method of the pricing callback (called when branch and bound process is about to begin)
90 *
91 * This method is called when the presolving was finished and the branch and bound process is about to begin.
92 *
93 * input:
94 * - gcg : GCG data structure
95 * - pricingcb : the pricing callback structure
96 */
97#define GCG_DECL_PRICINGCBINITSOL(x) SCIP_RETCODE x (GCG* gcg, GCG_PRICINGCB* pricingcb)
98
99/** solving process deinitialization method of the pricing callback (called before branch and bound process data is freed)
100 *
101 * This method is called before the branch and bound process is freed.
102 * The pricing callback should use this call to clean up its branch and bound data.
103 *
104 * input:
105 * - gcg : GCG data structure
106 * - pricingcb : the pricing callback structure
107 */
108#define GCG_DECL_PRICINGCBEXITSOL(x) SCIP_RETCODE x (GCG* gcg, GCG_PRICINGCB* pricingcb)
109
110/** the pre-pricing method of the pricing callback technique
111 *
112 * This method is called immediately before the pricing is performed in the GCG pricer. At this point, it is possible
113 * to modify the solving data is used within the pricing for new variables. Any data that is modified should be
114 * reverted in the post-pricing method.
115 *
116 * input:
117 * - gcg : GCG data structure
118 * - pricingcb : the pricing callback structure
119 * - pricer : the pricer structure
120 * - type : the pricing type, either farkas or reduced cost pricing
121 * - abort : should the pricing be aborted. Care must be taken when setting this flag, since aborting the
122 * pricing may lead to early branching and sub-optimal solution.
123 * - result : pointer to store the result of the pre-pricing method
124 *
125 * possible return values for *result (if more than one applies, the first in the list should be used):
126 * - SCIP_DIDNOTRUN : if the pre-pricing method was not run.
127 * - SCIP_SUCCESS : the pre-pricing method was executed successfully.
128 */
129#define GCG_DECL_PRICINGCBPREPRICING(x) SCIP_RETCODE x (GCG* gcg, GCG_PRICINGCB* pricingcb,\
130 SCIP_PRICER* pricer, GCG_PRICETYPE type, SCIP_Bool* abort, SCIP_RESULT* result)
131
132/** the post-pricing method of the pricing callback technique
133 *
134 * This method is called immediately after the pricing is performed in the GCG pricer. This method should be used to
135 * revert any changes made to in the pre-pricing method.
136 *
137 * input:
138 * - gcg : GCG data structure
139 * - pricingcb : the pricing callback structure
140 * - pricer : the pricer structure
141 * - type : the pricing type, either farkas or reduced cost pricing
142 * - result : pointer to store the result of the pre-pricing method
143 *
144 * possible return values for *result (if more than one applies, the first in the list should be used):
145 * - SCIP_DIDNOTRUN : if the post-pricing method was not run.
146 * - SCIP_SUCCESS : the post-pricing method was executed successfully.
147 */
148#define GCG_DECL_PRICINGCBPOSTPRICING(x) SCIP_RETCODE x (GCG* gcg, GCG_PRICINGCB* pricingcb,\
149 SCIP_PRICER* pricer, GCG_PRICETYPE type, SCIP_RESULT* result)
150
151#ifdef __cplusplus
152}
153#endif
154
155#endif
type definition for price type
struct GCG_PricingcbData GCG_PRICINGCBDATA
struct GCG_Pricingcb GCG_PRICINGCB