Scippy

SCIP

Solving Constraint Integer Programs

cutpool.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 cutpool.h
26 * @ingroup INTERNALAPI
27 * @brief internal methods for storing cuts in a cut pool
28 * @author Tobias Achterberg
29 */
30
31/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
32
33#ifndef __SCIP_CUTPOOL_H__
34#define __SCIP_CUTPOOL_H__
35
36
37#include "scip/def.h"
39#include "scip/type_event.h"
40#include "scip/type_retcode.h"
41#include "scip/type_result.h"
42#include "scip/type_set.h"
43#include "scip/type_sol.h"
44#include "scip/type_stat.h"
45#include "scip/type_lp.h"
46#include "scip/type_sepastore.h"
47#include "scip/type_cutpool.h"
48#include "scip/pub_cutpool.h"
49
50#ifdef __cplusplus
51extern "C" {
52#endif
53
54/** creates cut pool */
56 SCIP_CUTPOOL** cutpool, /**< pointer to store cut pool */
57 BMS_BLKMEM* blkmem, /**< block memory */
58 SCIP_SET* set, /**< global SCIP settings */
59 int agelimit, /**< maximum age a cut can reach before it is deleted from the pool */
60 SCIP_Bool globalcutpool /**< is this the global cut pool of SCIP? */
61 );
62
63/** frees cut pool */
65 SCIP_CUTPOOL** cutpool, /**< pointer to store cut pool */
66 BMS_BLKMEM* blkmem, /**< block memory */
67 SCIP_SET* set, /**< global SCIP settings */
68 SCIP_LP* lp /**< current LP data */
69 );
70
71/** removes all rows from the cut pool */
73 SCIP_CUTPOOL* cutpool, /**< cut pool */
74 BMS_BLKMEM* blkmem, /**< block memory */
75 SCIP_SET* set, /**< global SCIP settings */
76 SCIP_LP* lp /**< current LP data */
77 );
78
79/** checks if cut is already existing */
81 SCIP_CUTPOOL* cutpool, /**< cut pool */
82 SCIP_SET* set, /**< global SCIP settings */
83 SCIP_ROW* row /**< cutting plane to add */
84 );
85
86/** if not already existing, adds row to cut pool and captures it */
88 SCIP_CUTPOOL* cutpool, /**< cut pool */
89 BMS_BLKMEM* blkmem, /**< block memory */
90 SCIP_SET* set, /**< global SCIP settings */
91 SCIP_STAT* stat, /**< problem statistics data */
92 SCIP_LP* lp, /**< current LP data */
93 SCIP_ROW* row /**< cutting plane to add */
94 );
95
96/** adds row to cut pool and captures it; doesn't check for multiple cuts */
98 SCIP_CUTPOOL* cutpool, /**< cut pool */
99 BMS_BLKMEM* blkmem, /**< block memory */
100 SCIP_SET* set, /**< global SCIP settings */
101 SCIP_STAT* stat, /**< problem statistics data */
102 SCIP_LP* lp, /**< current LP data */
103 SCIP_ROW* row /**< cutting plane to add */
104 );
105
106/** removes the LP row from the cut pool */
108 SCIP_CUTPOOL* cutpool, /**< cut pool */
109 BMS_BLKMEM* blkmem, /**< block memory */
110 SCIP_SET* set, /**< global SCIP settings */
111 SCIP_STAT* stat, /**< problem statistics data */
112 SCIP_LP* lp, /**< current LP data */
113 SCIP_ROW* row /**< row to remove */
114 );
115
116/** separates cuts of the cut pool */
118 SCIP_CUTPOOL* cutpool, /**< cut pool */
119 BMS_BLKMEM* blkmem, /**< block memory */
120 SCIP_SET* set, /**< global SCIP settings */
121 SCIP_STAT* stat, /**< problem statistics data */
122 SCIP_EVENTQUEUE* eventqueue, /**< event queue */
123 SCIP_EVENTFILTER* eventfilter, /**< event filter for global events */
124 SCIP_LP* lp, /**< current LP data */
125 SCIP_SEPASTORE* sepastore, /**< separation storage */
126 SCIP_SOL* sol, /**< solution to be separated (or NULL for LP-solution) */
127 SCIP_Bool cutpoolisdelayed, /**< is the cutpool delayed (count cuts found)? */
128 SCIP_Bool root, /**< are we at the root node? */
129 SCIP_RESULT* result /**< pointer to store the result of the separation call */
130 );
131
132/** adds the maximum number of cuts that were stored in the pool;
133 * this is primarily used to keep statistics when SCIP performs a restart */
135 SCIP_CUTPOOL* cutpool, /**< cut pool */
136 SCIP_Longint ncuts /**< number of cuts to add */
137 );
138
139/** sets time in seconds used for separating cuts from the pool;
140 * this is primarily used to keep statistics when SCIP performs a restart */
142 SCIP_CUTPOOL* cutpool, /**< cut pool */
143 SCIP_Real time /**< poolclock time */
144 );
145
146/** adds the number of times the cut pool was separated;
147 * this is primarily used to keep statistics when SCIP performs a restart */
149 SCIP_CUTPOOL* cutpool, /**< cut pool */
150 SCIP_Longint ncalls /**< ncalls */
151 );
152
153/** adds the number of times the cut pool was separated at the root;
154 * this is primarily used to keep statistics when SCIP performs a restart */
156 SCIP_CUTPOOL* cutpool, /**< cut pool */
157 SCIP_Longint nrootcalls /**< nrootcalls */
158);
159
160/** adds the total number of cuts that were added to the pool;
161 * this is primarily used to keep statistics when SCIP performs a restart */
163 SCIP_CUTPOOL* cutpool, /**< cut pool */
164 SCIP_Longint ncutsfound /**< total number of cuts added to cut pool */
165 );
166
167/** adds the total number of cuts that were separated from the pool;
168 * this is primarily used to keep statistics when SCIP performs a restart */
170 SCIP_CUTPOOL* cutpool, /**< cut pool */
171 SCIP_Longint ncutsadded /**< total number of cuts added from cut pool to sepastore */
172 );
173
174#ifdef __cplusplus
175}
176#endif
177
178#endif
void SCIPcutpoolAddNCutsFound(SCIP_CUTPOOL *cutpool, SCIP_Longint ncutsfound)
Definition: cutpool.c:1204
void SCIPcutpoolSetTime(SCIP_CUTPOOL *cutpool, SCIP_Real time)
Definition: cutpool.c:1168
SCIP_RETCODE SCIPcutpoolSeparate(SCIP_CUTPOOL *cutpool, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_EVENTQUEUE *eventqueue, SCIP_EVENTFILTER *eventfilter, SCIP_LP *lp, SCIP_SEPASTORE *sepastore, SCIP_SOL *sol, SCIP_Bool cutpoolisdelayed, SCIP_Bool root, SCIP_RESULT *result)
Definition: cutpool.c:835
SCIP_RETCODE SCIPcutpoolDelRow(SCIP_CUTPOOL *cutpool, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_LP *lp, SCIP_ROW *row)
Definition: cutpool.c:806
SCIP_RETCODE SCIPcutpoolCreate(SCIP_CUTPOOL **cutpool, BMS_BLKMEM *blkmem, SCIP_SET *set, int agelimit, SCIP_Bool globalcutpool)
Definition: cutpool.c:427
SCIP_RETCODE SCIPcutpoolAddRow(SCIP_CUTPOOL *cutpool, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_LP *lp, SCIP_ROW *row)
Definition: cutpool.c:656
SCIP_RETCODE SCIPcutpoolAddNewRow(SCIP_CUTPOOL *cutpool, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_LP *lp, SCIP_ROW *row)
Definition: cutpool.c:733
SCIP_RETCODE SCIPcutpoolFree(SCIP_CUTPOOL **cutpool, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_LP *lp)
Definition: cutpool.c:468
void SCIPcutpoolAddNCalls(SCIP_CUTPOOL *cutpool, SCIP_Longint ncalls)
Definition: cutpool.c:1180
void SCIPcutpoolAddMaxNCuts(SCIP_CUTPOOL *cutpool, SCIP_Longint ncuts)
Definition: cutpool.c:1156
void SCIPcutpoolAddNCutsAdded(SCIP_CUTPOOL *cutpool, SCIP_Longint ncutsadded)
Definition: cutpool.c:1216
void SCIPcutpoolAddNRootCalls(SCIP_CUTPOOL *cutpool, SCIP_Longint nrootcalls)
Definition: cutpool.c:1192
SCIP_Bool SCIPcutpoolIsCutNew(SCIP_CUTPOOL *cutpool, SCIP_SET *set, SCIP_ROW *row)
Definition: cutpool.c:593
SCIP_RETCODE SCIPcutpoolClear(SCIP_CUTPOOL *cutpool, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_LP *lp)
Definition: cutpool.c:494
common defines and data types used in all packages of SCIP
#define SCIP_Longint
Definition: def.h:158
#define SCIP_Bool
Definition: def.h:91
#define SCIP_Real
Definition: def.h:173
memory allocation routines
struct BMS_BlkMem BMS_BLKMEM
Definition: memory.h:437
public methods for storing cuts in a cut pool
Definition: heur_padm.c:135
type definitions for storing cuts in a cut pool
type definitions for managing events
type definitions for LP management
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 storing separated cuts
type definitions for global SCIP settings
type definitions for storing primal CIP solutions
type definitions for problem statistics