Scippy

SCIP

Solving Constraint Integer Programs

benderscut.h
Go to the documentation of this file.
1/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2/* */
3/* This file is part of the program and library */
4/* SCIP --- Solving Constraint Integer Programs */
5/* */
6/* Copyright (c) 2002-2024 Zuse Institute Berlin (ZIB) */
7/* */
8/* Licensed under the Apache License, Version 2.0 (the "License"); */
9/* you may not use this file except in compliance with the License. */
10/* You may obtain a copy of the License at */
11/* */
12/* http://www.apache.org/licenses/LICENSE-2.0 */
13/* */
14/* Unless required by applicable law or agreed to in writing, software */
15/* distributed under the License is distributed on an "AS IS" BASIS, */
16/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */
17/* See the License for the specific language governing permissions and */
18/* limitations under the License. */
19/* */
20/* You should have received a copy of the Apache-2.0 license */
21/* along with SCIP; see the file LICENSE. If not visit scipopt.org. */
22/* */
23/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
24
25/**@file benderscut.h
26 * @ingroup INTERNALAPI
27 * @brief internal methods for Benders' decomposition cuts
28 * @author Stephen J. Maher
29 */
30
31/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
32
33#ifndef __SCIP_BENDERSCUT_H__
34#define __SCIP_BENDERSCUT_H__
35
36
37#include "scip/def.h"
39#include "scip/type_retcode.h"
40#include "scip/type_result.h"
41#include "scip/type_set.h"
43#include "scip/type_benders.h"
44#include "scip/type_message.h"
45#include "scip/pub_benderscut.h"
46
47#ifdef __cplusplus
48extern "C" {
49#endif
50
51/** copies the given Benders' decomposition cut to a new scip */
53 SCIP_BENDERS* benders, /**< the Benders' decomposition that the cuts are copied to */
54 SCIP_BENDERSCUT* benderscut, /**< Benders' decomposition cut */
55 SCIP_SET* set /**< SCIP_SET of SCIP to copy to */
56 );
57
58/** creates a Benders' decomposition cut */
60 SCIP_BENDERS* benders, /**< Benders' decomposition */
61 SCIP_BENDERSCUT** benderscut, /**< pointer to the Benders' decomposition cut data structure */
62 SCIP_SET* set, /**< global SCIP settings */
63 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
64 BMS_BLKMEM* blkmem, /**< block memory for parameter settings */
65 const char* name, /**< name of the Benders' decomposition cut */
66 const char* desc, /**< description of the Benders' decomposition cut */
67 int priority, /**< priority of the Benders' decomposition cut */
68 SCIP_Bool islpcut, /**< indicates whether the cut is generated from the LP solution */
69 SCIP_DECL_BENDERSCUTCOPY((*benderscutcopy)),/**< copy method of the Benders' decomposition cut or NULL if you don't want to copy your plugin into sub-SCIPs */
70 SCIP_DECL_BENDERSCUTFREE((*benderscutfree)),/**< destructor of the Benders' decomposition cut */
71 SCIP_DECL_BENDERSCUTINIT((*benderscutinit)),/**< initialize Benders' decomposition cut */
72 SCIP_DECL_BENDERSCUTEXIT((*benderscutexit)),/**< deinitialize Benders' decomposition cut */
73 SCIP_DECL_BENDERSCUTINITSOL((*benderscutinitsol)),/**< solving process initialization method of the Benders' decomposition cut */
74 SCIP_DECL_BENDERSCUTEXITSOL((*benderscutexitsol)),/**< solving process deinitialization method of the Benders' decomposition cut */
75 SCIP_DECL_BENDERSCUTEXEC((*benderscutexec)),/**< execution method of the Benders' decomposition cut */
76 SCIP_BENDERSCUTDATA* benderscutdata /**< Benders' decomposition cut data */
77 );
78
79/** calls destructor and frees memory of the Benders' decomposition cut */
81 SCIP_BENDERSCUT** benderscut, /**< pointer to the Benders' decomposition cut data structure */
82 SCIP_SET* set /**< global SCIP settings */
83 );
84
85/** initializes the Benders' decomposition cut */
87 SCIP_BENDERSCUT* benderscut, /**< the Benders' decomposition cut */
88 SCIP_SET* set /**< global SCIP settings */
89 );
90
91/** calls exit method of the Benders' decomposition cut */
93 SCIP_BENDERSCUT* benderscut, /**< Benders' decomposition cut */
94 SCIP_SET* set /**< global SCIP settings */
95 );
96
97/** informs the Benders' decomposition cut that the branch and bound process is being started */
99 SCIP_BENDERSCUT* benderscut, /**< Benders' decomposition cut */
100 SCIP_SET* set /**< global SCIP settings */
101 );
102
103/** informs the Benders' decomposition cut that the branch and bound process data is being freed */
105 SCIP_BENDERSCUT* benderscut, /**< Benders' decomposition cut */
106 SCIP_SET* set /**< global SCIP settings */
107 );
108
109/** calls execution method of the Benders' decomposition cut */
111 SCIP_BENDERSCUT* benderscut, /**< Benders' decomposition cut */
112 SCIP_SET* set, /**< global SCIP settings */
113 SCIP_BENDERS* benders, /**< Benders' decomposition */
114 SCIP_SOL* sol, /**< primal CIP solution */
115 int probnumber, /**< the number of the subproblem for which the cut is generated */
116 SCIP_BENDERSENFOTYPE type, /**< the enforcement type calling this function */
117 SCIP_RESULT* result /**< pointer to store the result of the callback method */
118 );
119
120/** sets priority of the Benders' decomposition cut */
122 SCIP_BENDERSCUT* benderscut, /**< Benders' decomposition cut */
123 int priority /**< new priority of the Benders' decomposition cut */
124 );
125
126/** sets copy callback of the Benders' decomposition cut */
128 SCIP_BENDERSCUT* benderscut, /**< Benders' decomposition cut */
129 SCIP_DECL_BENDERSCUTCOPY((*benderscutcopy))/**< copy callback of the Benders' decomposition cut or NULL if you don't want to copy your plugin into sub-SCIPs */
130 );
131
132/** sets destructor callback of the Benders' decomposition cut */
134 SCIP_BENDERSCUT* benderscut, /**< Benders' decomposition cut */
135 SCIP_DECL_BENDERSCUTFREE((*benderscutfree))/**< destructor of the Benders' decomposition cut */
136 );
137
138/** sets initialization callback of the Benders' decomposition cut */
140 SCIP_BENDERSCUT* benderscut, /**< Benders' decomposition cut */
141 SCIP_DECL_BENDERSCUTINIT((*benderscutinit))/**< initialize the Benders' decomposition cut */
142 );
143
144/** sets deinitialization callback of the Benders' decomposition cut */
146 SCIP_BENDERSCUT* benderscut, /**< Benders' decomposition cut */
147 SCIP_DECL_BENDERSCUTEXIT((*benderscutexit))/**< deinitialize the Benders' decomposition cut */
148 );
149
150/** sets solving process initialization callback of the Benders' decomposition cut */
152 SCIP_BENDERSCUT* benderscut, /**< Benders' decomposition cut */
153 SCIP_DECL_BENDERSCUTINITSOL((*benderscutinitsol))/**< solving process initialization callback of the Benders' decomposition cut */
154 );
155
156/** sets solving process deinitialization callback of the Benders' decomposition cut */
158 SCIP_BENDERSCUT* benderscut, /**< the Benders' decomposition cut */
159 SCIP_DECL_BENDERSCUTEXITSOL((*benderscutexitsol))/**< solving process deinitialization callback of the Benders' decomposition cut */
160 );
161
162#ifdef __cplusplus
163}
164#endif
165
166#endif
SCIP_RETCODE SCIPbenderscutExit(SCIP_BENDERSCUT *benderscut, SCIP_SET *set)
Definition: benderscut.c:268
SCIP_RETCODE SCIPbenderscutCreate(SCIP_BENDERS *benders, SCIP_BENDERSCUT **benderscut, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, BMS_BLKMEM *blkmem, const char *name, const char *desc, int priority, SCIP_Bool islpcut, SCIP_DECL_BENDERSCUTCOPY((*benderscutcopy)), SCIP_DECL_BENDERSCUTFREE((*benderscutfree)), SCIP_DECL_BENDERSCUTINIT((*benderscutinit)), SCIP_DECL_BENDERSCUTEXIT((*benderscutexit)), SCIP_DECL_BENDERSCUTINITSOL((*benderscutinitsol)), SCIP_DECL_BENDERSCUTEXITSOL((*benderscutexitsol)), SCIP_DECL_BENDERSCUTEXEC((*benderscutexec)), SCIP_BENDERSCUTDATA *benderscutdata)
Definition: benderscut.c:170
void SCIPbenderscutSetInitsol(SCIP_BENDERSCUT *benderscut, SCIP_DECL_BENDERSCUTINITSOL((*benderscutinitsol)))
Definition: benderscut.c:470
void SCIPbenderscutSetFree(SCIP_BENDERSCUT *benderscut, SCIP_DECL_BENDERSCUTFREE((*benderscutfree)))
Definition: benderscut.c:437
SCIP_RETCODE SCIPbenderscutFree(SCIP_BENDERSCUT **benderscut, SCIP_SET *set)
Definition: benderscut.c:203
void SCIPbenderscutSetCopy(SCIP_BENDERSCUT *benderscut, SCIP_DECL_BENDERSCUTCOPY((*benderscutcopy)))
Definition: benderscut.c:426
SCIP_RETCODE SCIPbenderscutInitsol(SCIP_BENDERSCUT *benderscut, SCIP_SET *set)
Definition: benderscut.c:298
void SCIPbenderscutSetInit(SCIP_BENDERSCUT *benderscut, SCIP_DECL_BENDERSCUTINIT((*benderscutinit)))
Definition: benderscut.c:448
SCIP_RETCODE SCIPbenderscutExitsol(SCIP_BENDERSCUT *benderscut, SCIP_SET *set)
Definition: benderscut.c:322
void SCIPbenderscutSetExitsol(SCIP_BENDERSCUT *benderscut, SCIP_DECL_BENDERSCUTEXITSOL((*benderscutexitsol)))
Definition: benderscut.c:481
SCIP_RETCODE SCIPbenderscutExec(SCIP_BENDERSCUT *benderscut, SCIP_SET *set, SCIP_BENDERS *benders, SCIP_SOL *sol, int probnumber, SCIP_BENDERSENFOTYPE type, SCIP_RESULT *result)
Definition: benderscut.c:346
void SCIPbenderscutSetPriority(SCIP_BENDERSCUT *benderscut, int priority)
Definition: benderscut.c:522
SCIP_RETCODE SCIPbenderscutCopyInclude(SCIP_BENDERS *benders, SCIP_BENDERSCUT *benderscut, SCIP_SET *set)
Definition: benderscut.c:86
void SCIPbenderscutSetExit(SCIP_BENDERSCUT *benderscut, SCIP_DECL_BENDERSCUTEXIT((*benderscutexit)))
Definition: benderscut.c:459
SCIP_RETCODE SCIPbenderscutInit(SCIP_BENDERSCUT *benderscut, SCIP_SET *set)
Definition: benderscut.c:229
common defines and data types used in all packages of SCIP
#define SCIP_Bool
Definition: def.h:91
memory allocation routines
struct BMS_BlkMem BMS_BLKMEM
Definition: memory.h:437
public methods for Benders' decomposition cuts
Definition: heur_padm.c:135
type definitions for Benders' decomposition methods
enum SCIP_BendersEnfoType SCIP_BENDERSENFOTYPE
Definition: type_benders.h:51
type definitions for Benders' decomposition cut
#define SCIP_DECL_BENDERSCUTEXEC(x)
struct SCIP_BenderscutData SCIP_BENDERSCUTDATA
#define SCIP_DECL_BENDERSCUTEXITSOL(x)
#define SCIP_DECL_BENDERSCUTFREE(x)
#define SCIP_DECL_BENDERSCUTCOPY(x)
#define SCIP_DECL_BENDERSCUTINIT(x)
#define SCIP_DECL_BENDERSCUTINITSOL(x)
#define SCIP_DECL_BENDERSCUTEXIT(x)
type definitions for message output methods
result codes for SCIP callback methods
enum SCIP_Result SCIP_RESULT
Definition: type_result.h:61
type definitions for return codes for SCIP methods
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:63
type definitions for global SCIP settings