Scippy

SCIP

Solving Constraint Integer Programs

cuts.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-2022 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 cuts.h
17  * @ingroup PUBLICCOREAPI
18  * @brief methods for the aggregation rows
19  * @author Jakob Witzig
20  * @author Leona Gottwald
21  *
22  */
23 
24 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
25 
26 #ifndef __SCIP_CUTS_H__
27 #define __SCIP_CUTS_H__
28 
29 #include "scip/def.h"
30 #include "scip/struct_cuts.h"
31 #include "scip/type_cuts.h"
32 #include "scip/type_lp.h"
33 #include "scip/type_misc.h"
34 #include "scip/type_retcode.h"
35 #include "scip/type_scip.h"
36 #include "scip/type_sol.h"
37 #include "scip/type_var.h"
38 
39 #ifdef __cplusplus
40 extern "C" {
41 #endif
42 
43 /**@addtogroup PublicCutMethods
44  *
45  * @{
46  */
47 
48 /** perform activity based coefficient tigthening on the given cut; returns TRUE if the cut was detected
49  * to be redundant due to acitvity bounds
50  */
51 SCIP_EXPORT
53  SCIP* scip, /**< SCIP data structure */
54  SCIP_Bool cutislocal, /**< is the cut local? */
55  SCIP_Real* cutcoefs, /**< array of the non-zero coefficients in the cut */
56  SCIP_Real* cutrhs, /**< the right hand side of the cut */
57  int* cutinds, /**< array of the problem indices of variables with a non-zero coefficient in the cut */
58  int* cutnnz, /**< the number of non-zeros in the cut */
59  int* nchgcoefs /**< number of changed coefficients */
60  );
61 
62 /** create an empty the aggregation row */
63 SCIP_EXPORT
65  SCIP* scip, /**< SCIP data structure */
66  SCIP_AGGRROW** aggrrow /**< pointer to return the aggregation row */
67  );
68 
69 /** free a the aggregation row */
70 SCIP_EXPORT
71 void SCIPaggrRowFree(
72  SCIP* scip, /**< SCIP data structure */
73  SCIP_AGGRROW** aggrrow /**< pointer to the aggregation row that should be freed */
74  );
75 
76 /** output aggregation row to file stream */
77 SCIP_EXPORT
78 void SCIPaggrRowPrint(
79  SCIP* scip, /**< SCIP data structure */
80  SCIP_AGGRROW* aggrrow, /**< pointer to return aggregation row */
81  FILE* file /**< output file (or NULL for standard output) */
82  );
83 
84 /** copy the aggregation row */
85 SCIP_EXPORT
87  SCIP* scip, /**< SCIP data structure */
88  SCIP_AGGRROW** aggrrow, /**< pointer to return the aggregation row */
89  SCIP_AGGRROW* source /**< source the aggregation row */
90  );
91 
92 /** add weighted row to the aggregation row */
93 SCIP_EXPORT
95  SCIP* scip, /**< SCIP data structure */
96  SCIP_AGGRROW* aggrrow, /**< the aggregation row */
97  SCIP_ROW* row, /**< row to add to the aggregation row */
98  SCIP_Real weight, /**< scale for adding given row to the aggregation row */
99  int sidetype /**< specify row side type (-1 = lhs, 0 = automatic, 1 = rhs) */
100  );
101 
102 /** Removes a given variable @p var from position @p pos the aggregation row and updates the right-hand side according
103  * to sign of the coefficient, i.e., rhs -= coef * bound, where bound = lb if coef >= 0 and bound = ub, otherwise.
104  *
105  * @note: The choice of global or local bounds depend on the validity (global or local) of the aggregation row.
106  *
107  * @note: The list of non-zero indices will be updated by swapping the last non-zero index to @p pos.
108  */
109 SCIP_EXPORT
111  SCIP* scip, /**< SCIP data structure */
112  SCIP_AGGRROW* aggrrow, /**< the aggregation row */
113  SCIP_VAR* var, /**< variable that should be removed */
114  int pos, /**< position of the variable in the aggregation row */
115  SCIP_Bool* valid /**< pointer to return whether the aggregation row is still valid */
116  );
117 
118 /** add the objective function with right-hand side @p rhs and scaled by @p scale to the aggregation row */
119 SCIP_EXPORT
121  SCIP* scip, /**< SCIP data structure */
122  SCIP_AGGRROW* aggrrow, /**< the aggregation row */
123  SCIP_Real rhs, /**< right-hand side of the artificial row */
124  SCIP_Real scale /**< scalar */
125  );
126 
127 /** add weighted constraint to the aggregation row */
128 SCIP_EXPORT
130  SCIP* scip, /**< SCIP data structure */
131  SCIP_AGGRROW* aggrrow, /**< the aggregation row */
132  int* inds, /**< variable problem indices in constraint to add to the aggregation row */
133  SCIP_Real* vals, /**< values of constraint to add to the aggregation row */
134  int len, /**< length of constraint to add to the aggregation row */
135  SCIP_Real rhs, /**< right hand side of constraint to add to the aggregation row */
136  SCIP_Real weight, /**< (positive) scale for adding given constraint to the aggregation row */
137  int rank, /**< rank to use for given constraint */
138  SCIP_Bool local /**< is constraint only valid locally */
139  );
140 
141 /** calculates the efficacy norm of the given aggregation row, which depends on the "separating/efficacynorm" parameter
142  *
143  * @return the efficacy norm of the given aggregation row, which depends on the "separating/efficacynorm" parameter
144  */
145 SCIP_EXPORT
147  SCIP* scip, /**< SCIP data structure */
148  SCIP_AGGRROW* aggrrow /**< the aggregation row */
149  );
150 
151 /** clear all entries in the aggregation row but do not free the internal memory */
152 SCIP_EXPORT
153 void SCIPaggrRowClear(
154  SCIP_AGGRROW* aggrrow /**< the aggregation row */
155  );
156 
157 /** aggregate rows using the given weights; the current content of the aggregation
158  * row, \p aggrrow, gets overwritten
159  */
160 SCIP_EXPORT
162  SCIP* scip, /**< SCIP data structure */
163  SCIP_AGGRROW* aggrrow, /**< the aggregation row */
164  SCIP_Real* weights, /**< row weights in row summation */
165  int* rowinds, /**< array to store indices of non-zero entries of the weights array, or NULL */
166  int nrowinds, /**< number of non-zero entries in weights array, -1 if rowinds is NULL */
167  SCIP_Bool sidetypebasis, /**< choose sidetypes of row (lhs/rhs) based on basis information? */
168  SCIP_Bool allowlocal, /**< should local rows be used? */
169  int negslack, /**< should negative slack variables be used? (0: no, 1: only for integral rows, 2: yes) */
170  int maxaggrlen, /**< maximal number of non-zeros in the aggregation row */
171  SCIP_Bool* valid /**< is the aggregation valid */
172  );
173 
174 /** removes all (close enough to) zero entries in the aggregation row */
175 SCIP_EXPORT
177  SCIP* scip, /**< SCIP datastructure */
178  SCIP_AGGRROW* aggrrow, /**< the aggregation row */
179  SCIP_Bool useglbbounds, /**< consider global bound although the cut is local? */
180  SCIP_Bool* valid /**< pointer to return whether the aggregation row is still valid */
181  );
182 
183 /** get array with lp positions of aggregated rows */
184 SCIP_EXPORT
186  SCIP_AGGRROW* aggrrow /**< the aggregation row */
187  );
188 
189 /** get array with weights of aggregated rows */
190 SCIP_EXPORT
192  SCIP_AGGRROW* aggrrow /**< the aggregation row */
193  );
194 
195 /** checks whether a given row has been added to the aggregation row */
196 SCIP_EXPORT
198  SCIP_AGGRROW* aggrrow, /**< the aggregation row */
199  SCIP_ROW* row /**< row for which it is checked whether it has been added to the aggregation */
200  );
201 
202 /** gets the min and max absolute value of the weights used to aggregate the rows;
203  * must not be called for empty aggregation rows
204  */
205 SCIP_EXPORT
207  SCIP_AGGRROW* aggrrow, /**< the aggregation row */
208  SCIP_Real* minabsrowweight, /**< pointer to store smallest absolute value of weights used for aggregating rows */
209  SCIP_Real* maxabsrowweight /**< pointer to store largest absolute value of weights used for aggregating rows */
210  );
211 
212 /** gets the array of corresponding variable problem indices for each non-zero in the aggregation row */
213 SCIP_EXPORT
214 int* SCIPaggrRowGetInds(
215  SCIP_AGGRROW* aggrrow
216  );
217 
218 /** gets the number of non-zeros in the aggregation row */
219 SCIP_EXPORT
221  SCIP_AGGRROW* aggrrow /**< the aggregation row */
222  );
223 
224 /** gets the non-zero value for the given non-zero index */
225 static INLINE
227  SCIP_AGGRROW* aggrrow, /**< the aggregation row */
228  int i /**< non-zero index; must be between 0 and SCIPaggrRowGetNNz(aggrrow) - 1 */
229  )
230 {
231  SCIP_Real QUAD(val);
232 
233  QUAD_ARRAY_LOAD(val, aggrrow->vals, aggrrow->inds[i]);
234 
235  return QUAD_TO_DBL(val);
236 }
237 
238 /** gets the non-zero value for the given problem index of a variable */
239 static INLINE
241  SCIP_AGGRROW* aggrrow, /**< the aggregation row */
242  int probindex /**< problem index of variable; must be between 0 and SCIPgetNVars(scip) - 1 */
243  )
244 {
245  SCIP_Real QUAD(val);
246 
247  QUAD_ARRAY_LOAD(val, aggrrow->vals, probindex);
248 
249  return QUAD_TO_DBL(val);
250 }
251 
252 /** gets the rank of the aggregation row */
253 SCIP_EXPORT
255  SCIP_AGGRROW* aggrrow /**< the aggregation row */
256  );
257 
258 /** checks if the aggregation row is only valid locally */
259 SCIP_EXPORT
261  SCIP_AGGRROW* aggrrow /**< the aggregation row */
262  );
263 
264 /** gets the right hand side of the aggregation row */
265 SCIP_EXPORT
267  SCIP_AGGRROW* aggrrow /**< the aggregation row */
268  );
269 
270 /** gets the number of row aggregations */
271 SCIP_EXPORT
273  SCIP_AGGRROW* aggrrow /**< aggregation row */
274  );
275 
276 /** calculates an MIR cut out of the weighted sum of LP rows given by an aggregation row; the
277  * aggregation row must not contain non-zero weights for modifiable rows, because these rows cannot
278  * participate in an MIR cut.
279  *
280  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
281  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
282  *
283  * @pre This method can be called if @p scip is in one of the following stages:
284  * - \ref SCIP_STAGE_SOLVING
285  *
286  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
287  */
288 SCIP_EXPORT
290  SCIP* scip, /**< SCIP data structure */
291  SCIP_SOL* sol, /**< the solution that should be separated, or NULL for LP solution */
292  SCIP_Bool postprocess, /**< apply a post-processing step to the resulting cut? */
293  SCIP_Real boundswitch, /**< fraction of domain up to which lower bound is used in transformation */
294  SCIP_Bool usevbds, /**< should variable bounds be used in bound transformation? */
295  SCIP_Bool allowlocal, /**< should local information allowed to be used, resulting in a local cut? */
296  SCIP_Bool fixintegralrhs, /**< should complementation tried to be adjusted such that rhs gets fractional? */
297  int* boundsfortrans, /**< bounds that should be used for transformed variables: vlb_idx/vub_idx,
298  * -1 for global lb/ub, -2 for local lb/ub, or -3 for using closest bound;
299  * NULL for using closest bound for all variables */
300  SCIP_BOUNDTYPE* boundtypesfortrans, /**< type of bounds that should be used for transformed variables;
301  * NULL for using closest bound for all variables */
302  SCIP_Real minfrac, /**< minimal fractionality of rhs to produce MIR cut for */
303  SCIP_Real maxfrac, /**< maximal fractionality of rhs to produce MIR cut for */
304  SCIP_Real scale, /**< additional scaling factor multiplied to the aggrrow; must be positive */
305  SCIP_AGGRROW* aggrrow, /**< the aggregation row to compute an MIR cut for */
306  SCIP_Real* cutcoefs, /**< array to store the non-zero coefficients in the cut */
307  SCIP_Real* cutrhs, /**< pointer to store the right hand side of the cut */
308  int* cutinds, /**< array to store the problem indices of variables with a non-zero coefficient in the cut */
309  int* cutnnz, /**< pointer to store the number of non-zeros in the cut */
310  SCIP_Real* cutefficacy, /**< pointer to store the efficacy of the cut, or NULL */
311  int* cutrank, /**< pointer to return rank of generated cut */
312  SCIP_Bool* cutislocal, /**< pointer to store whether the generated cut is only valid locally */
313  SCIP_Bool* success /**< pointer to store whether the returned coefficients are a valid MIR cut */
314  );
315 
316 /** calculates an MIR cut out of the weighted sum of LP rows given by an aggregation row; the
317  * aggregation row must not contain non-zero weights for modifiable rows, because these rows cannot
318  * participate in an MIR cut. The function uses a cut generation heuristic which tries different scaling
319  * factors and complementations of the variables to improve the cut's efficacy.
320  * For further details we refer to:
321  *
322  * Marchand, H., & Wolsey, L. A. (2001). Aggregation and mixed integer rounding to solve MIPs.
323  * Operations research, 49(3), 363-371.
324  *
325  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
326  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
327  *
328  * @pre This method can be called if @p scip is in one of the following stages:
329  * - \ref SCIP_STAGE_SOLVING
330  *
331  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
332  */
333 SCIP_EXPORT
335  SCIP* scip, /**< SCIP data structure */
336  SCIP_SOL* sol, /**< the solution that should be separated, or NULL for LP solution */
337  SCIP_Bool postprocess, /**< apply a post-processing step to the resulting cut? */
338  SCIP_Real boundswitch, /**< fraction of domain up to which lower bound is used in transformation */
339  SCIP_Bool usevbds, /**< should variable bounds be used in bound transformation? */
340  SCIP_Bool allowlocal, /**< should local information allowed to be used, resulting in a local cut? */
341  int maxtestdelta, /**< maximum number of deltas to test */
342  int* boundsfortrans, /**< bounds that should be used for transformed variables: vlb_idx/vub_idx,
343  * -1 for global lb/ub, -2 for local lb/ub, or -3 for using closest bound;
344  * NULL for using closest bound for all variables */
345  SCIP_BOUNDTYPE* boundtypesfortrans, /**< type of bounds that should be used for transformed variables;
346  * NULL for using closest bound for all variables */
347  SCIP_Real minfrac, /**< minimal fractionality of rhs to produce MIR cut for */
348  SCIP_Real maxfrac, /**< maximal fractionality of rhs to produce MIR cut for */
349  SCIP_AGGRROW* aggrrow, /**< the aggregation row to compute MIR cut for */
350  SCIP_Real* cutcoefs, /**< array to store the non-zero coefficients in the cut */
351  SCIP_Real* cutrhs, /**< pointer to store the right hand side of the cut */
352  int* cutinds, /**< array to store the problem indices of variables with a non-zero coefficient in the cut */
353  int* cutnnz, /**< pointer to store the number of non-zeros in the cut */
354  SCIP_Real* cutefficacy, /**< pointer to store efficacy of best cut; only cuts that are strictly better than the value of
355  * this efficacy on input to this function are returned */
356  int* cutrank, /**< pointer to return rank of generated cut */
357  SCIP_Bool* cutislocal, /**< pointer to store whether the generated cut is only valid locally */
358  SCIP_Bool* success /**< pointer to store whether a valid and efficacious cut was returned */
359  );
360 
361 /** calculates a lifted simple generalized flow cover cut out of the weighted sum of LP rows given by an aggregation row; the
362  * aggregation row must not contain non-zero weights for modifiable rows, because these rows cannot
363  * participate in the cut.
364  * For further details we refer to:
365  *
366  * Gu, Z., Nemhauser, G. L., & Savelsbergh, M. W. (1999). Lifted flow cover inequalities for mixed 0-1 integer programs.
367  * Mathematical Programming, 85(3), 439-467.
368  *
369  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
370  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
371  *
372  * @pre This method can be called if @p scip is in one of the following stages:
373  * - \ref SCIP_STAGE_SOLVING
374  *
375  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
376  */
377 SCIP_EXPORT
379  SCIP* scip, /**< SCIP data structure */
380  SCIP_SOL* sol, /**< the solution that should be separated, or NULL for LP solution */
381  SCIP_Bool postprocess, /**< apply a post-processing step to the resulting cut? */
382  SCIP_Real boundswitch, /**< fraction of domain up to which lower bound is used in transformation */
383  SCIP_Bool allowlocal, /**< should local information allowed to be used, resulting in a local cut? */
384  SCIP_AGGRROW* aggrrow, /**< the aggregation row to compute flow cover cut for */
385  SCIP_Real* cutcoefs, /**< array to store the non-zero coefficients in the cut */
386  SCIP_Real* cutrhs, /**< pointer to store the right hand side of the cut */
387  int* cutinds, /**< array to store the problem indices of variables with a non-zero coefficient in the cut */
388  int* cutnnz, /**< pointer to store the number of non-zeros in the cut */
389  SCIP_Real* cutefficacy, /**< pointer to store the efficacy of the cut, or NULL */
390  int* cutrank, /**< pointer to return rank of generated cut */
391  SCIP_Bool* cutislocal, /**< pointer to store whether the generated cut is only valid locally */
392  SCIP_Bool* success /**< pointer to store whether a valid cut was returned */
393  );
394 
395 /** calculates a lifted knapsack cover cut out of the weighted sum of LP rows given by an aggregation row; the
396  * aggregation row must not contain non-zero weights for modifiable rows, because these rows cannot
397  * participate in the cut.
398  * For further details we refer to:
399  *
400  * Letchford, A. N., & Souli, G. (2019). On lifted cover inequalities: A new lifting procedure with unusual properties.
401  * Operations Research Letters, 47(2), 83-87.
402  *
403  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
404  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
405  *
406  * @pre This method can be called if @p scip is in one of the following stages:
407  * - \ref SCIP_STAGE_SOLVING
408  *
409  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
410  */
411 SCIP_EXPORT
413  SCIP* scip, /**< SCIP data structure */
414  SCIP_SOL* sol, /**< the solution that should be separated, or NULL for LP solution */
415  SCIP_Bool allowlocal, /**< should local information allowed to be used, resulting in a local cut? */
416  SCIP_AGGRROW* aggrrow, /**< the aggregation row to compute flow cover cut for */
417  SCIP_Real* cutcoefs, /**< array to store the non-zero coefficients in the cut */
418  SCIP_Real* cutrhs, /**< pointer to store the right hand side of the cut */
419  int* cutinds, /**< array to store the problem indices of variables with a non-zero coefficient in the cut */
420  int* cutnnz, /**< pointer to store the number of non-zeros in the cut */
421  SCIP_Real* cutefficacy, /**< pointer to store the efficacy of the cut, or NULL */
422  int* cutrank, /**< pointer to return rank of generated cut */
423  SCIP_Bool* cutislocal, /**< pointer to store whether the generated cut is only valid locally */
424  SCIP_Bool* success /**< pointer to store whether a valid cut was returned */
425  );
426 
427 /** calculates a strong CG cut out of the weighted sum of LP rows given by an aggregation row; the
428  * aggregation row must not contain non-zero weights for modifiable rows, because these rows cannot
429  * participate in a strongcg cut
430  *
431  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
432  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
433  *
434  * @pre This method can be called if @p scip is in one of the following stages:
435  * - \ref SCIP_STAGE_SOLVING
436  *
437  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
438  */
439 SCIP_EXPORT
441  SCIP* scip, /**< SCIP data structure */
442  SCIP_SOL* sol, /**< the solution that should be separated, or NULL for LP solution */
443  SCIP_Bool postprocess, /**< apply a post-processing step to the resulting cut? */
444  SCIP_Real boundswitch, /**< fraction of domain up to which lower bound is used in transformation */
445  SCIP_Bool usevbds, /**< should variable bounds be used in bound transformation? */
446  SCIP_Bool allowlocal, /**< should local information allowed to be used, resulting in a local cut? */
447  SCIP_Real minfrac, /**< minimal fractionality of rhs to produce strong CG cut for */
448  SCIP_Real maxfrac, /**< maximal fractionality of rhs to produce strong CG cut for */
449  SCIP_Real scale, /**< additional scaling factor multiplied to all rows */
450  SCIP_AGGRROW* aggrrow, /**< the aggregation row to compute a strong CG cut for */
451  SCIP_Real* cutcoefs, /**< array to store the non-zero coefficients in the cut */
452  SCIP_Real* cutrhs, /**< pointer to store the right hand side of the cut */
453  int* cutinds, /**< array to store the problem indices of variables with a non-zero coefficient in the cut */
454  int* cutnnz, /**< pointer to store the number of non-zeros in the cut */
455  SCIP_Real* cutefficacy, /**< pointer to store the efficacy of the cut, or NULL */
456  int* cutrank, /**< pointer to return rank of generated cut */
457  SCIP_Bool* cutislocal, /**< pointer to store whether the generated cut is only valid locally */
458  SCIP_Bool* success /**< pointer to store whether a valid cut was returned */
459  );
460 
461 /** @} */
462 
463 #ifdef __cplusplus
464 }
465 #endif
466 
467 #endif
enum SCIP_BoundType SCIP_BOUNDTYPE
Definition: type_lp.h:50
SCIP_RETCODE SCIPcalcStrongCG(SCIP *scip, SCIP_SOL *sol, SCIP_Bool postprocess, SCIP_Real boundswitch, SCIP_Bool usevbds, SCIP_Bool allowlocal, SCIP_Real minfrac, SCIP_Real maxfrac, SCIP_Real scale, SCIP_AGGRROW *aggrrow, SCIP_Real *cutcoefs, SCIP_Real *cutrhs, int *cutinds, int *cutnnz, SCIP_Real *cutefficacy, int *cutrank, SCIP_Bool *cutislocal, SCIP_Bool *success)
Definition: cuts.c:8866
void SCIPaggrRowFree(SCIP *scip, SCIP_AGGRROW **aggrrow)
Definition: cuts.c:1686
int SCIPaggrRowGetNRows(SCIP_AGGRROW *aggrrow)
Definition: cuts.c:2405
type definitions for miscellaneous datastructures
SCIP_RETCODE SCIPaggrRowAddRow(SCIP *scip, SCIP_AGGRROW *aggrrow, SCIP_ROW *row, SCIP_Real weight, int sidetype)
Definition: cuts.c:1790
void SCIPaggrRowCancelVarWithBound(SCIP *scip, SCIP_AGGRROW *aggrrow, SCIP_VAR *var, int pos, SCIP_Bool *valid)
Definition: cuts.c:1874
#define INLINE
Definition: def.h:123
SCIP_Bool SCIPaggrRowIsLocal(SCIP_AGGRROW *aggrrow)
Definition: cuts.c:2490
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:54
SCIP_RETCODE SCIPcutGenerationHeuristicCMIR(SCIP *scip, SCIP_SOL *sol, SCIP_Bool postprocess, SCIP_Real boundswitch, SCIP_Bool usevbds, SCIP_Bool allowlocal, int maxtestdelta, int *boundsfortrans, SCIP_BOUNDTYPE *boundtypesfortrans, SCIP_Real minfrac, SCIP_Real maxfrac, SCIP_AGGRROW *aggrrow, SCIP_Real *cutcoefs, SCIP_Real *cutrhs, int *cutinds, int *cutnnz, SCIP_Real *cutefficacy, int *cutrank, SCIP_Bool *cutislocal, SCIP_Bool *success)
Definition: cuts.c:4124
type definitions for cuts
SCIP_RETCODE SCIPcalcKnapsackCover(SCIP *scip, SCIP_SOL *sol, SCIP_Bool allowlocal, SCIP_AGGRROW *aggrrow, SCIP_Real *cutcoefs, SCIP_Real *cutrhs, int *cutinds, int *cutnnz, SCIP_Real *cutefficacy, int *cutrank, SCIP_Bool *cutislocal, SCIP_Bool *success)
Definition: cuts.c:7955
int SCIPaggrRowGetNNz(SCIP_AGGRROW *aggrrow)
Definition: cuts.c:2470
SCIP_Real SCIPaggrRowGetRhs(SCIP_AGGRROW *aggrrow)
Definition: cuts.c:2500
type definitions for return codes for SCIP methods
void SCIPaggrRowPrint(SCIP *scip, SCIP_AGGRROW *aggrrow, FILE *file)
Definition: cuts.c:1707
#define QUAD_TO_DBL(x)
Definition: dbldblarith.h:40
SCIP_Bool SCIPaggrRowHasRowBeenAdded(SCIP_AGGRROW *aggrrow, SCIP_ROW *row)
Definition: cuts.c:2437
type definitions for LP management
SCIP_RETCODE SCIPaggrRowAddObjectiveFunction(SCIP *scip, SCIP_AGGRROW *aggrrow, SCIP_Real rhs, SCIP_Real scale)
Definition: cuts.c:1933
int * SCIPaggrRowGetRowInds(SCIP_AGGRROW *aggrrow)
Definition: cuts.c:2415
type definitions for SCIP&#39;s main datastructure
#define QUAD(x)
Definition: dbldblarith.h:38
int SCIPaggrRowGetRank(SCIP_AGGRROW *aggrrow)
Definition: cuts.c:2480
int * SCIPaggrRowGetInds(SCIP_AGGRROW *aggrrow)
Definition: cuts.c:2460
#define QUAD_ARRAY_LOAD(r, a, idx)
Definition: dbldblarith.h:45
void SCIPaggrRowRemoveZeros(SCIP *scip, SCIP_AGGRROW *aggrrow, SCIP_Bool useglbbounds, SCIP_Bool *valid)
Definition: cuts.c:2390
type definitions for problem variables
SCIP_RETCODE SCIPaggrRowAddCustomCons(SCIP *scip, SCIP_AGGRROW *aggrrow, int *inds, SCIP_Real *vals, int len, SCIP_Real rhs, SCIP_Real weight, int rank, SCIP_Bool local)
Definition: cuts.c:2004
SCIP_RETCODE SCIPcalcMIR(SCIP *scip, SCIP_SOL *sol, SCIP_Bool postprocess, SCIP_Real boundswitch, SCIP_Bool usevbds, SCIP_Bool allowlocal, SCIP_Bool fixintegralrhs, int *boundsfortrans, SCIP_BOUNDTYPE *boundtypesfortrans, SCIP_Real minfrac, SCIP_Real maxfrac, SCIP_Real scale, SCIP_AGGRROW *aggrrow, SCIP_Real *cutcoefs, SCIP_Real *cutrhs, int *cutinds, int *cutnnz, SCIP_Real *cutefficacy, int *cutrank, SCIP_Bool *cutislocal, SCIP_Bool *success)
Definition: cuts.c:3792
#define SCIP_Bool
Definition: def.h:84
SCIP_Real SCIPaggrRowCalcEfficacyNorm(SCIP *scip, SCIP_AGGRROW *aggrrow)
Definition: cuts.c:2079
SCIP_Bool SCIPcutsTightenCoefficients(SCIP *scip, SCIP_Bool cutislocal, SCIP_Real *cutcoefs, SCIP_Real *cutrhs, int *cutinds, int *cutnnz, int *nchgcoefs)
Definition: cuts.c:1462
SCIP_RETCODE SCIPcalcFlowCover(SCIP *scip, SCIP_SOL *sol, SCIP_Bool postprocess, SCIP_Real boundswitch, SCIP_Bool allowlocal, SCIP_AGGRROW *aggrrow, SCIP_Real *cutcoefs, SCIP_Real *cutrhs, int *cutinds, int *cutnnz, SCIP_Real *cutefficacy, int *cutrank, SCIP_Bool *cutislocal, SCIP_Bool *success)
Definition: cuts.c:7329
SCIP_Real * SCIPaggrRowGetRowWeights(SCIP_AGGRROW *aggrrow)
Definition: cuts.c:2426
SCIP_Real * vals
Definition: struct_cuts.h:33
type definitions for storing primal CIP solutions
SCIP_RETCODE SCIPaggrRowCopy(SCIP *scip, SCIP_AGGRROW **aggrrow, SCIP_AGGRROW *source)
Definition: cuts.c:1744
void SCIPaggrRowGetAbsWeightRange(SCIP_AGGRROW *aggrrow, SCIP_Real *minabsrowweight, SCIP_Real *maxabsrowweight)
SCIP_RETCODE SCIPaggrRowSumRows(SCIP *scip, SCIP_AGGRROW *aggrrow, SCIP_Real *weights, int *rowinds, int nrowinds, SCIP_Bool sidetypebasis, SCIP_Bool allowlocal, int negslack, int maxaggrlen, SCIP_Bool *valid)
Definition: cuts.c:2198
#define SCIP_Real
Definition: def.h:177
SCIP_RETCODE SCIPaggrRowCreate(SCIP *scip, SCIP_AGGRROW **aggrrow)
Definition: cuts.c:1654
static INLINE SCIP_Real SCIPaggrRowGetProbvarValue(SCIP_AGGRROW *aggrrow, int probindex)
Definition: cuts.h:240
common defines and data types used in all packages of SCIP
void SCIPaggrRowClear(SCIP_AGGRROW *aggrrow)
Definition: cuts.c:2054
static INLINE SCIP_Real SCIPaggrRowGetValue(SCIP_AGGRROW *aggrrow, int i)
Definition: cuts.h:226
struct definitions for cuts