Scippy

SCIP

Solving Constraint Integer Programs

conflictstore.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-2019 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 scip.zib.de. */
13 /* */
14 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
15 
16 /**@file conflictstore.h
17  * @ingroup INTERNALAPI
18  * @brief internal methods for storing conflicts
19  * @author Jakob Witzig
20  */
21 
22 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
23 
24 #ifndef __SCIP_CONFLICTSTORE_H__
25 #define __SCIP_CONFLICTSTORE_H__
26 
27 
28 #include "scip/def.h"
29 #include "blockmemshell/memory.h"
31 #include "scip/type_retcode.h"
32 #include "scip/type_cons.h"
33 #include "scip/type_event.h"
34 #include "scip/type_conflict.h"
35 #include "scip/type_prob.h"
36 #include "scip/type_reopt.h"
37 #include "scip/type_set.h"
38 #include "scip/type_stat.h"
39 #include "scip/type_tree.h"
40 
41 #ifdef __cplusplus
42 extern "C" {
43 #endif
44 
45 /** creates separation storage */
47  SCIP_CONFLICTSTORE** conflictstore, /**< pointer to store conflict store */
48  SCIP_SET* set /**< global SCIP settings */
49  );
50 
51 /** frees separation storage */
53  SCIP_CONFLICTSTORE** conflictstore, /**< pointer to store conflict store */
54  BMS_BLKMEM* blkmem, /**< block memory */
55  SCIP_SET* set, /**< global SCIP settings */
56  SCIP_STAT* stat, /**< dynamic SCIP statistics */
57  SCIP_REOPT* reopt /**< reoptimization data */
58  );
59 
60 /** clears conflict store */
62  SCIP_CONFLICTSTORE* conflictstore, /**< conflict store */
63  BMS_BLKMEM* blkmem, /**< block memory */
64  SCIP_SET* set, /**< global SCIP settings */
65  SCIP_STAT* stat, /**< dynamic SCIP statistics */
66  SCIP_REOPT* reopt /**< reoptimization data */
67  );
68 
69 /** cleans up conflict store */
71  SCIP_CONFLICTSTORE* conflictstore, /**< conflict store */
72  BMS_BLKMEM* blkmem, /**< block memory */
73  SCIP_SET* set, /**< global SCIP settings */
74  SCIP_STAT* stat, /**< dynamic SCIP statistics */
75  SCIP_REOPT* reopt /**< reoptimization data */
76  );
77 
78 /** adds a constraint to the pool of proof constraints based on dual rays
79  *
80  * @note this methods captures the constraint
81  */
83  SCIP_CONFLICTSTORE* conflictstore, /**< conflict store */
84  SCIP_CONS* dualproof, /**< constraint based on a dual ray */
85  BMS_BLKMEM* blkmem, /**< block memory */
86  SCIP_SET* set, /**< global SCIP settings */
87  SCIP_STAT* stat, /**< dynamic SCIP statistics */
88  SCIP_PROB* transprob, /**< transformed problem */
89  SCIP_REOPT* reopt /**< reoptimization data */
90  );
91 
92 /** adds a constraint to the pool of proof constraints based on dual solutions
93  *
94  * @note this methods captures the constraint
95  */
97  SCIP_CONFLICTSTORE* conflictstore, /**< conflict store */
98  SCIP_CONS* dualproof, /**< constraint based on a dual solution */
99  BMS_BLKMEM* blkmem, /**< block memory */
100  SCIP_SET* set, /**< global SCIP settings */
101  SCIP_STAT* stat, /**< dynamic SCIP statistics */
102  SCIP_PROB* transprob, /**< transformed problem */
103  SCIP_REOPT* reopt, /**< reoptimization data */
104  SCIP_Real scale, /**< scaling factor that needs to be considered when updating the side */
105  SCIP_Bool updateside /**< should the side be updated if a new incumbent is found */
106  );
107 
108 /** adds a conflict to the conflict store
109  *
110  * @note this method captures the constraint
111  */
113  SCIP_CONFLICTSTORE* conflictstore, /**< conflict store */
114  BMS_BLKMEM* blkmem, /**< block memory */
115  SCIP_SET* set, /**< global SCIP settings */
116  SCIP_STAT* stat, /**< dynamic SCIP statistics */
117  SCIP_TREE* tree, /**< branch and bound tree (or NULL for an original constraint) */
118  SCIP_PROB* transprob, /**< transformed problem (or NULL for an original constraint) */
119  SCIP_REOPT* reopt, /**< reoptimization data */
120  SCIP_CONS* cons, /**< constraint representing the conflict */
121  SCIP_CONFTYPE conftype, /**< type of the conflict */
122  SCIP_Bool cutoffinvolved, /**< is a cutoff bound involved in this conflict */
123  SCIP_Real primalbound /**< primal bound the conflict depend on (or -SCIPinfinity) */
124  );
125 
126 /** deletes all conflicts depending on a cutoff bound larger than the given bound */
128  SCIP_CONFLICTSTORE* conflictstore, /**< conflict store */
129  SCIP_SET* set, /**< global SCIP settings */
130  SCIP_STAT* stat, /**< dynamic SCIP statistics */
131  BMS_BLKMEM* blkmem, /**< block memory */
132  SCIP_PROB* transprob, /**< transformed problem*/
133  SCIP_REOPT* reopt, /**< reoptimization data */
134  SCIP_Real cutoffbound /**< current cutoff bound */
135  );
136 
137 /** returns the maximal size of the conflict pool */
139  SCIP_CONFLICTSTORE* conflictstore /**< conflict store */
140  );
141 
142 /** returns the initial size of the conflict pool */
144  SCIP_CONFLICTSTORE* conflictstore /**< conflict store */
145  );
146 
147 /** returns the number of stored conflicts on the conflict pool
148  *
149  * @note the number of active conflicts can be less
150  */
152  SCIP_CONFLICTSTORE* conflictstore /**< conflict store */
153  );
154 
155 /** returns all active conflicts stored in the conflict store */
157  SCIP_CONFLICTSTORE* conflictstore, /**< conflict store */
158  SCIP_CONS** conflicts, /**< array to store conflicts */
159  int conflictsize, /**< size of the conflict array */
160  int* nconflicts /**< pointer to store the number of conflicts */
161  );
162 
163 /** transforms all original conflicts into transformed conflicts */
165  SCIP_CONFLICTSTORE* conflictstore, /**< conflict store */
166  BMS_BLKMEM* blkmem, /**< block memory */
167  SCIP_SET* set, /**< global SCIP settings */
168  SCIP_STAT* stat, /**< dynamic SCIP statistics */
169  SCIP_TREE* tree, /**< branch and bound tree */
170  SCIP_PROB* transprob, /**< transformed problem */
171  SCIP_REOPT* reopt /**< reoptimization data */
172  );
173 
174 /** returns the average number of non-zeros over all stored dual ray constraints */
176  SCIP_CONFLICTSTORE* conflictstore /**< conflict store */
177  );
178 
179 /** return the number of stored dualray constraints */
181  SCIP_CONFLICTSTORE* conflictstore /**< conflict store */
182  );
183 
184 /** returns the average number of non-zeros over all stored boundexceeding proofs */
186  SCIP_CONFLICTSTORE* conflictstore /**< conflict store */
187  );
188 
189 /** returns the number of all stored boundexceeding proofs */
191  SCIP_CONFLICTSTORE* conflictstore /**< conflict store */
192  );
193 
194 #ifdef __cplusplus
195 }
196 #endif
197 
198 #endif
int SCIPconflictstoreGetNConflictsInStore(SCIP_CONFLICTSTORE *conflictstore)
SCIP_RETCODE SCIPconflictstoreCleanNewIncumbent(SCIP_CONFLICTSTORE *conflictstore, SCIP_SET *set, SCIP_STAT *stat, BMS_BLKMEM *blkmem, SCIP_PROB *transprob, SCIP_REOPT *reopt, SCIP_Real cutoffbound)
type definitions for conflict store
SCIP_RETCODE SCIPconflictstoreTransform(SCIP_CONFLICTSTORE *conflictstore, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_TREE *tree, SCIP_PROB *transprob, SCIP_REOPT *reopt)
int SCIPconflictstoreGetNDualInfProofs(SCIP_CONFLICTSTORE *conflictstore)
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:53
type definitions for global SCIP settings
SCIP_RETCODE SCIPconflictstoreCreate(SCIP_CONFLICTSTORE **conflictstore, SCIP_SET *set)
type definitions for return codes for SCIP methods
type definitions for collecting reoptimization information
SCIP_RETCODE SCIPconflictstoreFree(SCIP_CONFLICTSTORE **conflictstore, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_REOPT *reopt)
type definitions for problem statistics
SCIP_RETCODE SCIPconflictstoreClean(SCIP_CONFLICTSTORE *conflictstore, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_REOPT *reopt)
type definitions for conflict analysis
type definitions for managing events
SCIP_RETCODE SCIPconflictstoreClear(SCIP_CONFLICTSTORE *conflictstore, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_REOPT *reopt)
#define SCIP_Bool
Definition: def.h:70
int SCIPconflictstoreGetInitPoolSize(SCIP_CONFLICTSTORE *conflictstore)
SCIP_Real SCIPconflictstoreGetAvgNnzDualBndProofs(SCIP_CONFLICTSTORE *conflictstore)
SCIP_RETCODE SCIPconflictstoreAddDualraycons(SCIP_CONFLICTSTORE *conflictstore, SCIP_CONS *dualproof, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *transprob, SCIP_REOPT *reopt)
SCIP_RETCODE SCIPconflictstoreAddDualsolcons(SCIP_CONFLICTSTORE *conflictstore, SCIP_CONS *dualproof, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *transprob, SCIP_REOPT *reopt, SCIP_Real scale, SCIP_Bool updateside)
type definitions for branch and bound tree
SCIP_RETCODE SCIPconflictstoreAddConflict(SCIP_CONFLICTSTORE *conflictstore, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_TREE *tree, SCIP_PROB *transprob, SCIP_REOPT *reopt, SCIP_CONS *cons, SCIP_CONFTYPE conftype, SCIP_Bool cutoffinvolved, SCIP_Real primalbound)
type definitions for storing and manipulating the main problem
SCIP_RETCODE SCIPconflictstoreGetConflicts(SCIP_CONFLICTSTORE *conflictstore, SCIP_CONS **conflicts, int conflictsize, int *nconflicts)
#define SCIP_Real
Definition: def.h:164
int SCIPconflictstoreGetMaxPoolSize(SCIP_CONFLICTSTORE *conflictstore)
enum SCIP_ConflictType SCIP_CONFTYPE
Definition: type_conflict.h:56
int SCIPconflictstoreGetNDualBndProofs(SCIP_CONFLICTSTORE *conflictstore)
common defines and data types used in all packages of SCIP
struct BMS_BlkMem BMS_BLKMEM
Definition: memory.h:427
SCIP_Real SCIPconflictstoreGetAvgNnzDualInfProofs(SCIP_CONFLICTSTORE *conflictstore)
type definitions for constraints and constraint handlers
memory allocation routines