Scippy

GCG

Branch-and-Price & Column Generation for Everyone

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 pricingcb.h
30 * @ingroup INTERNALAPI
31 * @brief internal methods for the pricing callback
32 * @author Stephen J. Maher
33 */
34
35/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
36
37#ifndef __SCIP_PRICINGCB_H__
38#define __SCIP_PRICINGCB_H__
39
40
41#include "scip/def.h"
43#include "scip/type_retcode.h"
44#include "scip/type_result.h"
45#include "scip/type_set.h"
46#include "gcg/type_pricingcb.h"
47#include "gcg/pub_pricingcb.h"
48
49#ifdef __cplusplus
50extern "C" {
51#endif
52
53/** creates a pricing callback */
55 GCG* gcg, /**< GCG data structure */
56 GCG_PRICINGCB** pricingcb, /**< pointer to the pricing callback data structure */
57 const char* name, /**< name of the pricing callback */
58 const char* desc, /**< description of the pricing callback */
59 int priority, /**< priority of the pricing callback */
60 GCG_DECL_PRICINGCBFREE((*pricingcbfree)), /**< destructor of the pricing callback */
61 GCG_DECL_PRICINGCBINIT((*pricingcbinit)), /**< initialize pricing callback */
62 GCG_DECL_PRICINGCBEXIT((*pricingcbexit)), /**< deinitialize pricing callback */
63 GCG_DECL_PRICINGCBINITSOL((*pricingcbinitsol)),/**< solving process initialization method of the pricing callback */
64 GCG_DECL_PRICINGCBEXITSOL((*pricingcbexitsol)),/**< solving process deinitialization method of the pricing callback */
65 GCG_DECL_PRICINGCBPREPRICING((*pricingcbprepricing)),/**< pre-pricing method of the pricing callback */
66 GCG_DECL_PRICINGCBPOSTPRICING((*pricingcbpostpricing)),/**< post-pricing method of the pricing callback */
67 GCG_PRICINGCBDATA* pricingcbdata /**< pricing callback data */
68 );
69
70/** calls destructor and frees memory of the pricing callback */
72 GCG* gcg, /**< GCG data structure */
73 GCG_PRICINGCB** pricingcb /**< pointer to the pricing callback data structure */
74 );
75
76/** initializes the pricing callback */
78 GCG* gcg, /**< GCG data structure */
79 GCG_PRICINGCB* pricingcb /**< the pricing callback */
80 );
81
82/** calls exit method of the pricing callback */
84 GCG* gcg, /**< GCG data structure */
85 GCG_PRICINGCB* pricingcb /**< pricing callback */
86 );
87
88/** informs the pricing callback that the branch and bound process is being started */
90 GCG* gcg, /**< GCG data structure */
91 GCG_PRICINGCB* pricingcb /**< pricing callback */
92 );
93
94/** informs the pricing callback that the branch and bound process data is being freed */
96 GCG* gcg, /**< GCG data structure */
97 GCG_PRICINGCB* pricingcb /**< pricing callback */
98 );
99
100/** calls pre-pricing method of the pricing callback */
102 GCG* gcg, /**< GCG data structure */
103 GCG_PRICINGCB* pricingcb, /**< pricing callback */
104 SCIP_PRICER* pricer, /**< the pricer */
105 GCG_PRICETYPE type, /**< the type of pricing, either redcost or farkas */
106 SCIP_Bool* abort, /**< should the pricing be aborted? */
107 SCIP_RESULT* result /**< pointer to store the result of the callback method */
108 );
109
110/** calls post-pricing method of the pricing callback */
112 GCG* gcg, /**< GCG data structure */
113 GCG_PRICINGCB* pricingcb, /**< pricing callback */
114 SCIP_PRICER* pricer, /**< the pricer */
115 GCG_PRICETYPE type, /**< the type of pricing, either redcost or farkas */
116 SCIP_RESULT* result /**< pointer to store the result of the callback method */
117 );
118
119/** sets priority of the pricing callback */
121 GCG_PRICINGCB* pricingcb, /**< pricing callback */
122 int priority /**< new priority of the pricing callback */
123 );
124
125/** sets destructor callback of the pricing callback */
127 GCG_PRICINGCB* pricingcb, /**< pricing callback */
128 GCG_DECL_PRICINGCBFREE((*pricingcbfree)) /**< destructor of the pricing callback */
129 );
130
131/** sets initialization callback of the pricing callback */
133 GCG_PRICINGCB* pricingcb, /**< pricing callback */
134 GCG_DECL_PRICINGCBINIT((*pricingcbinit)) /**< initialize the pricing callback */
135 );
136
137/** sets deinitialization callback of the pricing callback */
139 GCG_PRICINGCB* pricingcb, /**< pricing callback */
140 GCG_DECL_PRICINGCBEXIT((*pricingcbexit)) /**< deinitialize the pricing callback */
141 );
142
143/** sets solving process initialization callback of the pricing callback */
145 GCG_PRICINGCB* pricingcb, /**< pricing callback */
146 GCG_DECL_PRICINGCBINITSOL((*pricingcbinitsol))/**< solving process initialization callback of the pricing callback */
147 );
148
149/** sets solving process deinitialization callback of the pricing callback */
151 GCG_PRICINGCB* pricingcb, /**< the pricing callback */
152 GCG_DECL_PRICINGCBEXITSOL((*pricingcbexitsol))/**< solving process deinitialization callback of the pricing callback */
153 );
154
155#ifdef __cplusplus
156}
157#endif
158
159#endif
SCIP_RETCODE GCGpricingcbExit(GCG *gcg, GCG_PRICINGCB *pricingcb)
Definition: pricingcb.c:234
void GCGpricingcbSetFree(GCG_PRICINGCB *pricingcb, GCG_DECL_PRICINGCBFREE((*pricingcbfree)))
Definition: pricingcb.c:443
SCIP_RETCODE GCGpricingcbInit(GCG *gcg, GCG_PRICINGCB *pricingcb)
Definition: pricingcb.c:196
SCIP_RETCODE GCGpricingcbFree(GCG *gcg, GCG_PRICINGCB **pricingcb)
Definition: pricingcb.c:168
SCIP_RETCODE GCGpricingcbCreate(GCG *gcg, GCG_PRICINGCB **pricingcb, const char *name, const char *desc, int priority, GCG_DECL_PRICINGCBFREE((*pricingcbfree)), GCG_DECL_PRICINGCBINIT((*pricingcbinit)), GCG_DECL_PRICINGCBEXIT((*pricingcbexit)), GCG_DECL_PRICINGCBINITSOL((*pricingcbinitsol)), GCG_DECL_PRICINGCBEXITSOL((*pricingcbexitsol)), GCG_DECL_PRICINGCBPREPRICING((*pricingcbprepricing)), GCG_DECL_PRICINGCBPOSTPRICING((*pricingcbpostpricing)), GCG_PRICINGCBDATA *pricingcbdata)
Definition: pricingcb.c:137
SCIP_RETCODE GCGpricingcbInitsol(GCG *gcg, GCG_PRICINGCB *pricingcb)
Definition: pricingcb.c:260
void GCGpricingcbSetInitsol(GCG_PRICINGCB *pricingcb, GCG_DECL_PRICINGCBINITSOL((*pricingcbinitsol)))
Definition: pricingcb.c:476
void GCGpricingcbSetInit(GCG_PRICINGCB *pricingcb, GCG_DECL_PRICINGCBINIT((*pricingcbinit)))
Definition: pricingcb.c:454
SCIP_RETCODE GCGpricingcbPrepricing(GCG *gcg, GCG_PRICINGCB *pricingcb, SCIP_PRICER *pricer, GCG_PRICETYPE type, SCIP_Bool *abort, SCIP_RESULT *result)
Definition: pricingcb.c:314
void GCGpricingcbSetExitsol(GCG_PRICINGCB *pricingcb, GCG_DECL_PRICINGCBEXITSOL((*pricingcbexitsol)))
Definition: pricingcb.c:487
void GCGpricingcbSetPriority(GCG_PRICINGCB *pricingcb, int priority)
Definition: pricingcb.c:433
void GCGpricingcbSetExit(GCG_PRICINGCB *pricingcb, GCG_DECL_PRICINGCBEXIT((*pricingcbexit)))
Definition: pricingcb.c:465
SCIP_RETCODE GCGpricingcbPostpricing(GCG *gcg, GCG_PRICINGCB *pricingcb, SCIP_PRICER *pricer, GCG_PRICETYPE type, SCIP_RESULT *result)
Definition: pricingcb.c:363
SCIP_RETCODE GCGpricingcbExitsol(GCG *gcg, GCG_PRICINGCB *pricingcb)
Definition: pricingcb.c:287
public methods for pricing callback plugins
Definition: struct_gcg.h:55
enum GCG_Pricetype GCG_PRICETYPE
type definitions for the pricing callback plugin
#define GCG_DECL_PRICINGCBPREPRICING(x)
#define GCG_DECL_PRICINGCBPOSTPRICING(x)
#define GCG_DECL_PRICINGCBINITSOL(x)
struct GCG_PricingcbData GCG_PRICINGCBDATA
#define GCG_DECL_PRICINGCBEXIT(x)
#define GCG_DECL_PRICINGCBINIT(x)
#define GCG_DECL_PRICINGCBEXITSOL(x)
#define GCG_DECL_PRICINGCBFREE(x)
enum SCIP_Result SCIP_RESULT
enum SCIP_Retcode SCIP_RETCODE