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-2020 Konrad-Zuse-Zentrum */
7 /* fuer Informationstechnik Berlin */
8 /* */
9 /* SCIP is distributed under the terms of the ZIB Academic License. */
10 /* */
11 /* You should have received a copy of the ZIB Academic License */
12 /* along with SCIP; see the file COPYING. If not visit scipopt.org. */
13 /* */
14 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
15 
16 /**@file cutpool.h
17  * @ingroup INTERNALAPI
18  * @brief internal methods for storing cuts in a cut pool
19  * @author Tobias Achterberg
20  */
21 
22 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
23 
24 #ifndef __SCIP_CUTPOOL_H__
25 #define __SCIP_CUTPOOL_H__
26 
27 
28 #include "scip/def.h"
29 #include "blockmemshell/memory.h"
30 #include "scip/type_event.h"
31 #include "scip/type_retcode.h"
32 #include "scip/type_result.h"
33 #include "scip/type_set.h"
34 #include "scip/type_sol.h"
35 #include "scip/type_stat.h"
36 #include "scip/type_lp.h"
37 #include "scip/type_sepastore.h"
38 #include "scip/type_cutpool.h"
39 #include "scip/pub_cutpool.h"
40 
41 #ifdef __cplusplus
42 extern "C" {
43 #endif
44 
45 /** creates cut pool */
47  SCIP_CUTPOOL** cutpool, /**< pointer to store cut pool */
48  BMS_BLKMEM* blkmem, /**< block memory */
49  SCIP_SET* set, /**< global SCIP settings */
50  int agelimit, /**< maximum age a cut can reach before it is deleted from the pool */
51  SCIP_Bool globalcutpool /**< is this the global cut pool of SCIP? */
52  );
53 
54 /** frees 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  SCIP_LP* lp /**< current LP data */
60  );
61 
62 /** removes all rows from the cut pool */
64  SCIP_CUTPOOL* cutpool, /**< cut pool */
65  BMS_BLKMEM* blkmem, /**< block memory */
66  SCIP_SET* set, /**< global SCIP settings */
67  SCIP_LP* lp /**< current LP data */
68  );
69 
70 /** checks if cut is already existing */
72  SCIP_CUTPOOL* cutpool, /**< cut pool */
73  SCIP_SET* set, /**< global SCIP settings */
74  SCIP_ROW* row /**< cutting plane to add */
75  );
76 
77 /** if not already existing, adds row to cut pool and captures it */
79  SCIP_CUTPOOL* cutpool, /**< cut pool */
80  BMS_BLKMEM* blkmem, /**< block memory */
81  SCIP_SET* set, /**< global SCIP settings */
82  SCIP_STAT* stat, /**< problem statistics data */
83  SCIP_LP* lp, /**< current LP data */
84  SCIP_ROW* row /**< cutting plane to add */
85  );
86 
87 /** adds row to cut pool and captures it; doesn't check for multiple cuts */
89  SCIP_CUTPOOL* cutpool, /**< cut pool */
90  BMS_BLKMEM* blkmem, /**< block memory */
91  SCIP_SET* set, /**< global SCIP settings */
92  SCIP_STAT* stat, /**< problem statistics data */
93  SCIP_LP* lp, /**< current LP data */
94  SCIP_ROW* row /**< cutting plane to add */
95  );
96 
97 /** removes the LP row from the cut pool */
99  SCIP_CUTPOOL* cutpool, /**< cut pool */
100  BMS_BLKMEM* blkmem, /**< block memory */
101  SCIP_SET* set, /**< global SCIP settings */
102  SCIP_STAT* stat, /**< problem statistics data */
103  SCIP_LP* lp, /**< current LP data */
104  SCIP_ROW* row /**< row to remove */
105  );
106 
107 /** separates cuts of the cut pool */
109  SCIP_CUTPOOL* cutpool, /**< cut pool */
110  BMS_BLKMEM* blkmem, /**< block memory */
111  SCIP_SET* set, /**< global SCIP settings */
112  SCIP_STAT* stat, /**< problem statistics data */
113  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
114  SCIP_EVENTFILTER* eventfilter, /**< event filter for global events */
115  SCIP_LP* lp, /**< current LP data */
116  SCIP_SEPASTORE* sepastore, /**< separation storage */
117  SCIP_SOL* sol, /**< solution to be separated (or NULL for LP-solution) */
118  SCIP_Bool cutpoolisdelayed, /**< is the cutpool delayed (count cuts found)? */
119  SCIP_Bool root, /**< are we at the root node? */
120  SCIP_RESULT* result /**< pointer to store the result of the separation call */
121  );
122 
123 #ifdef __cplusplus
124 }
125 #endif
126 
127 #endif
enum SCIP_Result SCIP_RESULT
Definition: type_result.h:52
SCIP_RETCODE SCIPcutpoolClear(SCIP_CUTPOOL *cutpool, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_LP *lp)
Definition: cutpool.c:483
SCIP_RETCODE SCIPcutpoolCreate(SCIP_CUTPOOL **cutpool, BMS_BLKMEM *blkmem, SCIP_SET *set, int agelimit, SCIP_Bool globalcutpool)
Definition: cutpool.c:418
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:54
type definitions for global SCIP settings
type definitions for return codes for SCIP methods
SCIP_RETCODE SCIPcutpoolDelRow(SCIP_CUTPOOL *cutpool, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_LP *lp, SCIP_ROW *row)
Definition: cutpool.c:783
type definitions for problem statistics
type definitions for LP management
type definitions for storing cuts in a cut pool
type definitions for storing separated cuts
type definitions for managing events
SCIP_Bool SCIPcutpoolIsCutNew(SCIP_CUTPOOL *cutpool, SCIP_SET *set, SCIP_ROW *row)
Definition: cutpool.c:581
#define SCIP_Bool
Definition: def.h:70
public methods for storing cuts in a cut pool
type definitions for storing primal CIP solutions
SCIP_RETCODE SCIPcutpoolAddRow(SCIP_CUTPOOL *cutpool, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_LP *lp, SCIP_ROW *row)
Definition: cutpool.c:644
result codes for SCIP callback methods
SCIP_RETCODE SCIPcutpoolFree(SCIP_CUTPOOL **cutpool, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_LP *lp)
Definition: cutpool.c:457
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:812
common defines and data types used in all packages of SCIP
struct BMS_BlkMem BMS_BLKMEM
Definition: memory.h:429
SCIP_RETCODE SCIPcutpoolAddNewRow(SCIP_CUTPOOL *cutpool, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_LP *lp, SCIP_ROW *row)
Definition: cutpool.c:714
memory allocation routines