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-2017 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 email to 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 */
46 extern
48  SCIP_CONFLICTSTORE** conflictstore, /**< pointer to store conflict store */
49  SCIP_SET* set /**< global SCIP settings */
50  );
51 
52 /** frees separation storage */
53 extern
55  SCIP_CONFLICTSTORE** conflictstore, /**< pointer to store conflict store */
56  BMS_BLKMEM* blkmem, /**< block memory */
57  SCIP_SET* set, /**< global SCIP settings */
58  SCIP_STAT* stat, /**< dynamic SCIP statistics */
59  SCIP_REOPT* reopt /**< reoptimization data */
60  );
61 
62 /** clears conflict store */
63 extern
65  SCIP_CONFLICTSTORE* conflictstore, /**< conflict store */
66  BMS_BLKMEM* blkmem, /**< block memory */
67  SCIP_SET* set, /**< global SCIP settings */
68  SCIP_STAT* stat, /**< dynamic SCIP statistics */
69  SCIP_REOPT* reopt /**< reoptimization data */
70  );
71 
72 /** cleans up conflict store */
73 extern
75  SCIP_CONFLICTSTORE* conflictstore, /**< conflict store */
76  BMS_BLKMEM* blkmem, /**< block memory */
77  SCIP_SET* set, /**< global SCIP settings */
78  SCIP_STAT* stat, /**< dynamic SCIP statistics */
79  SCIP_REOPT* reopt /**< reoptimization data */
80  );
81 
82 /** adds a constraint to the pool of proof constraints based on dual rays
83  *
84  * @note this methods captures the constraint
85  */
86 extern
88  SCIP_CONFLICTSTORE* conflictstore, /**< conflict store */
89  SCIP_CONS* dualproof, /**< constraint based on a dual ray */
90  BMS_BLKMEM* blkmem, /**< block memory */
91  SCIP_SET* set, /**< global SCIP settings */
92  SCIP_STAT* stat, /**< dynamic SCIP statistics */
93  SCIP_PROB* transprob, /**< transformed problem */
94  SCIP_REOPT* reopt /**< reoptimization data */
95  );
96 
97 /** adds a constraint to the pool of proof constraints based on dual solutions
98  *
99  * @note this methods captures the constraint
100  */
101 extern
103  SCIP_CONFLICTSTORE* conflictstore, /**< conflict store */
104  SCIP_CONS* dualproof, /**< constraint based on a dual solution */
105  BMS_BLKMEM* blkmem, /**< block memory */
106  SCIP_SET* set, /**< global SCIP settings */
107  SCIP_STAT* stat, /**< dynamic SCIP statistics */
108  SCIP_PROB* transprob, /**< transformed problem */
109  SCIP_REOPT* reopt, /**< reoptimization data */
110  SCIP_Real scale, /**< scaling factor that needs to be considered when updating the side */
111  SCIP_Bool updateside /**< should the side be updated if a new incumbent is found */
112  );
113 
114 /** adds a conflict to the conflict store
115  *
116  * @note this method captures the constraint
117  */
118 extern
120  SCIP_CONFLICTSTORE* conflictstore, /**< conflict store */
121  BMS_BLKMEM* blkmem, /**< block memory */
122  SCIP_SET* set, /**< global SCIP settings */
123  SCIP_STAT* stat, /**< dynamic SCIP statistics */
124  SCIP_TREE* tree, /**< branch and bound tree (or NULL for an original constraint) */
125  SCIP_PROB* transprob, /**< transformed problem (or NULL for an original constraint) */
126  SCIP_REOPT* reopt, /**< reoptimization data */
127  SCIP_CONS* cons, /**< constraint representing the conflict */
128  SCIP_CONFTYPE conftype, /**< type of the conflict */
129  SCIP_Bool cutoffinvolved, /**< is a cutoff bound involved in this conflict */
130  SCIP_Real primalbound /**< primal bound the conflict depend on (or -SCIPinfinity) */
131  );
132 
133 /** deletes all conflicts depending on a cutoff bound larger than the given bound */
134 extern
136  SCIP_CONFLICTSTORE* conflictstore, /**< conflict store */
137  SCIP_SET* set, /**< global SCIP settings */
138  SCIP_STAT* stat, /**< dynamic SCIP statistics */
139  BMS_BLKMEM* blkmem, /**< block memory */
140  SCIP_PROB* transprob, /**< transformed problem*/
141  SCIP_REOPT* reopt, /**< reoptimization data */
142  SCIP_Real cutoffbound /**< current cutoff bound */
143  );
144 
145 /** returns the maximal size of the conflict pool */
146 extern
148  SCIP_CONFLICTSTORE* conflictstore /**< conflict store */
149  );
150 
151 /** returns the initial size of the conflict pool */
152 extern
154  SCIP_CONFLICTSTORE* conflictstore /**< conflict store */
155  );
156 
157 /** returns the number of stored conflicts on the conflict pool
158  *
159  * @note the number of active conflicts can be less
160  */
161 extern
163  SCIP_CONFLICTSTORE* conflictstore /**< conflict store */
164  );
165 
166 /** returns all active conflicts stored in the conflict store */
167 extern
169  SCIP_CONFLICTSTORE* conflictstore, /**< conflict store */
170  SCIP_CONS** conflicts, /**< array to store conflicts */
171  int conflictsize, /**< size of the conflict array */
172  int* nconflicts /**< pointer to store the number of conflicts */
173  );
174 
175 /** transforms all original conflicts into transformed conflicts */
176 extern
178  SCIP_CONFLICTSTORE* conflictstore, /**< conflict store */
179  BMS_BLKMEM* blkmem, /**< block memory */
180  SCIP_SET* set, /**< global SCIP settings */
181  SCIP_STAT* stat, /**< dynamic SCIP statistics */
182  SCIP_TREE* tree, /**< branch and bound tree */
183  SCIP_PROB* transprob, /**< transformed problem */
184  SCIP_REOPT* reopt /**< reoptimization data */
185  );
186 
187 /** returns the average number of non-zeros over all stored dual ray constraints */
188 extern
190  SCIP_CONFLICTSTORE* conflictstore /**< conflict store */
191  );
192 
193 /** return the number of stored dualray constraints */
194 extern
196  SCIP_CONFLICTSTORE* conflictstore /**< conflict store */
197  );
198 
199 /** returns the average number of non-zeros over all stored boundexceeding proofs */
200 extern
202  SCIP_CONFLICTSTORE* conflictstore /**< conflict store */
203  );
204 
205 /** returns the number of all stored boundexceeding proofs */
206 extern
208  SCIP_CONFLICTSTORE* conflictstore /**< conflict store */
209  );
210 
211 #ifdef __cplusplus
212 }
213 #endif
214 
215 #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:61
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:149
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:419
SCIP_Real SCIPconflictstoreGetAvgNnzDualInfProofs(SCIP_CONFLICTSTORE *conflictstore)
type definitions for constraints and constraint handlers
memory allocation routines