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 /** cleans 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 /** adds a constraint to the pool of dual rays
73  *
74  * @note this methods captures the constraint
75  */
76 extern
78  SCIP_CONFLICTSTORE* conflictstore, /**< conflict store */
79  SCIP_CONS* dualraycons, /**< constraint based on a dual ray */
80  BMS_BLKMEM* blkmem, /**< block memory */
81  SCIP_SET* set, /**< global SCIP settings */
82  SCIP_STAT* stat, /**< dynamic SCIP statistics */
83  SCIP_PROB* transprob, /**< transformed problem */
84  SCIP_REOPT* reopt /**< reoptimization data */
85  );
86 
87 /** adds a conflict to the conflict store
88  *
89  * @note this method captures the constraint
90  */
91 extern
93  SCIP_CONFLICTSTORE* conflictstore, /**< conflict store */
94  BMS_BLKMEM* blkmem, /**< block memory */
95  SCIP_SET* set, /**< global SCIP settings */
96  SCIP_STAT* stat, /**< dynamic SCIP statistics */
97  SCIP_TREE* tree, /**< branch and bound tree (or NULL for an original constraint) */
98  SCIP_PROB* transprob, /**< transformed problem (or NULL for an original constraint) */
99  SCIP_REOPT* reopt, /**< reoptimization data */
100  SCIP_CONS* cons, /**< constraint representing the conflict */
101  SCIP_CONFTYPE conftype, /**< type of the conflict */
102  SCIP_Bool cutoffinvolved, /**< is a cutoff bound involved in this conflict */
103  SCIP_Real primalbound /**< primal bound the conflict depend on (or -SCIPinfinity) */
104  );
105 
106 /** deletes all conflicts depending on a cutoff bound larger than the given bound */
107 extern
109  SCIP_CONFLICTSTORE* conflictstore, /**< conflict store */
110  SCIP_SET* set, /**< global SCIP settings */
111  SCIP_STAT* stat, /**< dynamic SCIP statistics */
112  BMS_BLKMEM* blkmem, /**< block memory */
113  SCIP_PROB* transprob, /**< transformed problem*/
114  SCIP_REOPT* reopt, /**< reoptimization data */
115  SCIP_Real cutoffbound /**< current cutoff bound */
116  );
117 
118 /** returns the maximal size of the conflict pool */
119 extern
121  SCIP_CONFLICTSTORE* conflictstore /**< conflict store */
122  );
123 
124 /** returns the initial size of the conflict pool */
125 extern
127  SCIP_CONFLICTSTORE* conflictstore /**< conflict store */
128  );
129 
130 /** returns the number of stored conflicts on the conflict pool
131  *
132  * @note the number of active conflicts can be less
133  */
134 extern
136  SCIP_CONFLICTSTORE* conflictstore /**< conflict store */
137  );
138 
139 /** returns all active conflicts stored in the conflict store */
140 extern
142  SCIP_CONFLICTSTORE* conflictstore, /**< conflict store */
143  SCIP_CONS** conflicts, /**< array to store conflicts */
144  int conflictsize, /**< size of the conflict array */
145  int* nconflicts /**< pointer to store the number of conflicts */
146  );
147 
148 /** transforms all original conflicts into transformed conflicts */
149 extern
151  SCIP_CONFLICTSTORE* conflictstore, /**< conflict store */
152  BMS_BLKMEM* blkmem, /**< block memory */
153  SCIP_SET* set, /**< global SCIP settings */
154  SCIP_STAT* stat, /**< dynamic SCIP statistics */
155  SCIP_TREE* tree, /**< branch and bound tree */
156  SCIP_PROB* transprob, /**< transformed problem */
157  SCIP_REOPT* reopt /**< reoptimization data */
158  );
159 
160 /** returns the average number of non-zeros over all stored dual ray constraints */
161 extern
163  SCIP_CONFLICTSTORE* conflictstore /**< conflict store */
164  );
165 
166 /** return the number of stored dualray constraints */
167 extern
169  SCIP_CONFLICTSTORE* conflictstore /**< conflict store */
170  );
171 
172 #ifdef __cplusplus
173 }
174 #endif
175 
176 #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
int SCIPconflictstoreGetNDualrays(SCIP_CONFLICTSTORE *conflictstore)
SCIP_RETCODE SCIPconflictstoreTransform(SCIP_CONFLICTSTORE *conflictstore, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_TREE *tree, SCIP_PROB *transprob, SCIP_REOPT *reopt)
SCIP_RETCODE SCIPconflictstoreAddDualraycons(SCIP_CONFLICTSTORE *conflictstore, SCIP_CONS *dualraycons, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *transprob, SCIP_REOPT *reopt)
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)
SCIP_Real SCIPconflictstoreGetAvgNnzDualray(SCIP_CONFLICTSTORE *conflictstore)
type definitions for conflict analysis
type definitions for managing events
#define SCIP_Bool
Definition: def.h:61
int SCIPconflictstoreGetInitPoolSize(SCIP_CONFLICTSTORE *conflictstore)
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:135
int SCIPconflictstoreGetMaxPoolSize(SCIP_CONFLICTSTORE *conflictstore)
enum SCIP_ConflictType SCIP_CONFTYPE
Definition: type_conflict.h:53
common defines and data types used in all packages of SCIP
struct BMS_BlkMem BMS_BLKMEM
Definition: memory.h:392
type definitions for constraints and constraint handlers
memory allocation routines