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 acitivity bounds
50  *
51  * See also cons_linear.c:consdataTightenCoefs().
52  */
53 SCIP_EXPORT
55  SCIP* scip, /**< SCIP data structure */
56  SCIP_Bool cutislocal, /**< is the cut local? */
57  SCIP_Real* cutcoefs, /**< array of the non-zero coefficients in the cut */
58  SCIP_Real* cutrhs, /**< the right hand side of the cut */
59  int* cutinds, /**< array of the problem indices of variables with a non-zero coefficient in the cut */
60  int* cutnnz, /**< the number of non-zeros in the cut */
61  int* nchgcoefs /**< number of changed coefficients */
62  );
63 
64 /** create an empty the aggregation row */
65 SCIP_EXPORT
67  SCIP* scip, /**< SCIP data structure */
68  SCIP_AGGRROW** aggrrow /**< pointer to return the aggregation row */
69  );
70 
71 /** free a the aggregation row */
72 SCIP_EXPORT
73 void SCIPaggrRowFree(
74  SCIP* scip, /**< SCIP data structure */
75  SCIP_AGGRROW** aggrrow /**< pointer to the aggregation row that should be freed */
76  );
77 
78 /** output aggregation row to file stream */
79 SCIP_EXPORT
80 void SCIPaggrRowPrint(
81  SCIP* scip, /**< SCIP data structure */
82  SCIP_AGGRROW* aggrrow, /**< pointer to return aggregation row */
83  FILE* file /**< output file (or NULL for standard output) */
84  );
85 
86 /** copy the aggregation row */
87 SCIP_EXPORT
89  SCIP* scip, /**< SCIP data structure */
90  SCIP_AGGRROW** aggrrow, /**< pointer to return the aggregation row */
91  SCIP_AGGRROW* source /**< source the aggregation row */
92  );
93 
94 /** add weighted row to the aggregation row */
95 SCIP_EXPORT
97  SCIP* scip, /**< SCIP data structure */
98  SCIP_AGGRROW* aggrrow, /**< the aggregation row */
99  SCIP_ROW* row, /**< row to add to the aggregation row */
100  SCIP_Real weight, /**< scale for adding given row to the aggregation row */
101  int sidetype /**< specify row side type (-1 = lhs, 0 = automatic, 1 = rhs) */
102  );
103 
104 /** Removes a given variable @p var from position @p pos the aggregation row and updates the right-hand side according
105  * to sign of the coefficient, i.e., rhs -= coef * bound, where bound = lb if coef >= 0 and bound = ub, otherwise.
106  *
107  * @note: The choice of global or local bounds depend on the validity (global or local) of the aggregation row.
108  *
109  * @note: The list of non-zero indices will be updated by swapping the last non-zero index to @p pos.
110  */
111 SCIP_EXPORT
113  SCIP* scip, /**< SCIP data structure */
114  SCIP_AGGRROW* aggrrow, /**< the aggregation row */
115  SCIP_VAR* var, /**< variable that should be removed */
116  int pos, /**< position of the variable in the aggregation row */
117  SCIP_Bool* valid /**< pointer to return whether the aggregation row is still valid */
118  );
119 
120 /** add the objective function with right-hand side @p rhs and scaled by @p scale to the aggregation row */
121 SCIP_EXPORT
123  SCIP* scip, /**< SCIP data structure */
124  SCIP_AGGRROW* aggrrow, /**< the aggregation row */
125  SCIP_Real rhs, /**< right-hand side of the artificial row */
126  SCIP_Real scale /**< scalar */
127  );
128 
129 /** add weighted constraint to the aggregation row */
130 SCIP_EXPORT
132  SCIP* scip, /**< SCIP data structure */
133  SCIP_AGGRROW* aggrrow, /**< the aggregation row */
134  int* inds, /**< variable problem indices in constraint to add to the aggregation row */
135  SCIP_Real* vals, /**< values of constraint to add to the aggregation row */
136  int len, /**< length of constraint to add to the aggregation row */
137  SCIP_Real rhs, /**< right hand side of constraint to add to the aggregation row */
138  SCIP_Real weight, /**< (positive) scale for adding given constraint to the aggregation row */
139  int rank, /**< rank to use for given constraint */
140  SCIP_Bool local /**< is constraint only valid locally */
141  );
142 
143 /** calculates the efficacy norm of the given aggregation row, which depends on the "separating/efficacynorm" parameter
144  *
145  * @return the efficacy norm of the given aggregation row, which depends on the "separating/efficacynorm" parameter
146  */
147 SCIP_EXPORT
149  SCIP* scip, /**< SCIP data structure */
150  SCIP_AGGRROW* aggrrow /**< the aggregation row */
151  );
152 
153 /** clear all entries in the aggregation row but do not free the internal memory */
154 SCIP_EXPORT
155 void SCIPaggrRowClear(
156  SCIP_AGGRROW* aggrrow /**< the aggregation row */
157  );
158 
159 /** aggregate rows using the given weights; the current content of the aggregation
160  * row, \p aggrrow, gets overwritten
161  */
162 SCIP_EXPORT
164  SCIP* scip, /**< SCIP data structure */
165  SCIP_AGGRROW* aggrrow, /**< the aggregation row */
166  SCIP_Real* weights, /**< row weights in row summation */
167  int* rowinds, /**< array to store indices of non-zero entries of the weights array, or NULL */
168  int nrowinds, /**< number of non-zero entries in weights array, -1 if rowinds is NULL */
169  SCIP_Bool sidetypebasis, /**< choose sidetypes of row (lhs/rhs) based on basis information? */
170  SCIP_Bool allowlocal, /**< should local rows be used? */
171  int negslack, /**< should negative slack variables be used? (0: no, 1: only for integral rows, 2: yes) */
172  int maxaggrlen, /**< maximal number of non-zeros in the aggregation row */
173  SCIP_Bool* valid /**< is the aggregation valid */
174  );
175 
176 /** removes all (close enough to) zero entries in the aggregation row */
177 SCIP_EXPORT
179  SCIP* scip, /**< SCIP datastructure */
180  SCIP_AGGRROW* aggrrow, /**< the aggregation row */
181  SCIP_Bool useglbbounds, /**< consider global bound although the cut is local? */
182  SCIP_Bool* valid /**< pointer to return whether the aggregation row is still valid */
183  );
184 
185 /** get array with lp positions of aggregated rows */
186 SCIP_EXPORT
188  SCIP_AGGRROW* aggrrow /**< the aggregation row */
189  );
190 
191 /** get array with weights of aggregated rows */
192 SCIP_EXPORT
194  SCIP_AGGRROW* aggrrow /**< the aggregation row */
195  );
196 
197 /** checks whether a given row has been added to the aggregation row */
198 SCIP_EXPORT
200  SCIP_AGGRROW* aggrrow, /**< the aggregation row */
201  SCIP_ROW* row /**< row for which it is checked whether it has been added to the aggregation */
202  );
203 
204 /** gets the min and max absolute value of the weights used to aggregate the rows;
205  * must not be called for empty aggregation rows
206  */
207 SCIP_EXPORT
209  SCIP_AGGRROW* aggrrow, /**< the aggregation row */
210  SCIP_Real* minabsrowweight, /**< pointer to store smallest absolute value of weights used for aggregating rows */
211  SCIP_Real* maxabsrowweight /**< pointer to store largest absolute value of weights used for aggregating rows */
212  );
213 
214 /** gets the array of corresponding variable problem indices for each non-zero in the aggregation row */
215 SCIP_EXPORT
216 int* SCIPaggrRowGetInds(
217  SCIP_AGGRROW* aggrrow
218  );
219 
220 /** gets the number of non-zeros in the aggregation row */
221 SCIP_EXPORT
223  SCIP_AGGRROW* aggrrow /**< the aggregation row */
224  );
225 
226 /** gets the non-zero value for the given non-zero index */
227 static INLINE
229  SCIP_AGGRROW* aggrrow, /**< the aggregation row */
230  int i /**< non-zero index; must be between 0 and SCIPaggrRowGetNNz(aggrrow) - 1 */
231  )
232 {
233  SCIP_Real QUAD(val);
234 
235  QUAD_ARRAY_LOAD(val, aggrrow->vals, aggrrow->inds[i]);
236 
237  return QUAD_TO_DBL(val);
238 }
239 
240 /** gets the non-zero value for the given problem index of a variable */
241 static INLINE
243  SCIP_AGGRROW* aggrrow, /**< the aggregation row */
244  int probindex /**< problem index of variable; must be between 0 and SCIPgetNVars(scip) - 1 */
245  )
246 {
247  SCIP_Real QUAD(val);
248 
249  QUAD_ARRAY_LOAD(val, aggrrow->vals, probindex);
250 
251  return QUAD_TO_DBL(val);
252 }
253 
254 /** gets the rank of the aggregation row */
255 SCIP_EXPORT
257  SCIP_AGGRROW* aggrrow /**< the aggregation row */
258  );
259 
260 /** checks if the aggregation row is only valid locally */
261 SCIP_EXPORT
263  SCIP_AGGRROW* aggrrow /**< the aggregation row */
264  );
265 
266 /** gets the right hand side of the aggregation row */
267 SCIP_EXPORT
269  SCIP_AGGRROW* aggrrow /**< the aggregation row */
270  );
271 
272 /** gets the number of row aggregations */
273 SCIP_EXPORT
275  SCIP_AGGRROW* aggrrow /**< aggregation row */
276  );
277 
278 /** calculates an MIR cut out of the weighted sum of LP rows given by an aggregation row; the
279  * aggregation row must not contain non-zero weights for modifiable rows, because these rows cannot
280  * participate in an MIR cut.
281  *
282  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
283  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
284  *
285  * @pre This method can be called if @p scip is in one of the following stages:
286  * - \ref SCIP_STAGE_SOLVING
287  *
288  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
289  */
290 SCIP_EXPORT
292  SCIP* scip, /**< SCIP data structure */
293  SCIP_SOL* sol, /**< the solution that should be separated, or NULL for LP solution */
294  SCIP_Bool postprocess, /**< apply a post-processing step to the resulting cut? */
295  SCIP_Real boundswitch, /**< fraction of domain up to which lower bound is used in transformation */
296  SCIP_Bool usevbds, /**< should variable bounds be used in bound transformation? */
297  SCIP_Bool allowlocal, /**< should local information allowed to be used, resulting in a local cut? */
298  SCIP_Bool fixintegralrhs, /**< should complementation tried to be adjusted such that rhs gets fractional? */
299  int* boundsfortrans, /**< bounds that should be used for transformed variables: vlb_idx/vub_idx,
300  * -1 for global lb/ub, -2 for local lb/ub, or -3 for using closest bound;
301  * NULL for using closest bound for all variables */
302  SCIP_BOUNDTYPE* boundtypesfortrans, /**< type of bounds that should be used for transformed variables;
303  * NULL for using closest bound for all variables */
304  SCIP_Real minfrac, /**< minimal fractionality of rhs to produce MIR cut for */
305  SCIP_Real maxfrac, /**< maximal fractionality of rhs to produce MIR cut for */
306  SCIP_Real scale, /**< additional scaling factor multiplied to the aggrrow; must be positive */
307  SCIP_AGGRROW* aggrrow, /**< the aggregation row to compute an MIR cut for */
308  SCIP_Real* cutcoefs, /**< array to store the non-zero coefficients in the cut */
309  SCIP_Real* cutrhs, /**< pointer to store the right hand side of the cut */
310  int* cutinds, /**< array to store the problem indices of variables with a non-zero coefficient in the cut */
311  int* cutnnz, /**< pointer to store the number of non-zeros in the cut */
312  SCIP_Real* cutefficacy, /**< pointer to store the efficacy of the cut, or NULL */
313  int* cutrank, /**< pointer to return rank of generated cut */
314  SCIP_Bool* cutislocal, /**< pointer to store whether the generated cut is only valid locally */
315  SCIP_Bool* success /**< pointer to store whether the returned coefficients are a valid MIR cut */
316  );
317 
318 /** calculates an MIR cut out of the weighted sum of LP rows given by an aggregation row; the
319  * aggregation row must not contain non-zero weights for modifiable rows, because these rows cannot
320  * participate in an MIR cut. The function uses a cut generation heuristic which tries different scaling
321  * factors and complementations of the variables to improve the cut's efficacy.
322  * For further details we refer to:
323  *
324  * Marchand, H., & Wolsey, L. A. (2001). Aggregation and mixed integer rounding to solve MIPs.
325  * Operations research, 49(3), 363-371.
326  *
327  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
328  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
329  *
330  * @pre This method can be called if @p scip is in one of the following stages:
331  * - \ref SCIP_STAGE_SOLVING
332  *
333  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
334  */
335 SCIP_EXPORT
337  SCIP* scip, /**< SCIP data structure */
338  SCIP_SOL* sol, /**< the solution that should be separated, or NULL for LP solution */
339  SCIP_Bool postprocess, /**< apply a post-processing step to the resulting cut? */
340  SCIP_Real boundswitch, /**< fraction of domain up to which lower bound is used in transformation */
341  SCIP_Bool usevbds, /**< should variable bounds be used in bound transformation? */
342  SCIP_Bool allowlocal, /**< should local information allowed to be used, resulting in a local cut? */
343  int maxtestdelta, /**< maximum number of deltas to test */
344  int* boundsfortrans, /**< bounds that should be used for transformed variables: vlb_idx/vub_idx,
345  * -1 for global lb/ub, -2 for local lb/ub, or -3 for using closest bound;
346  * NULL for using closest bound for all variables */
347  SCIP_BOUNDTYPE* boundtypesfortrans, /**< type of bounds that should be used for transformed variables;
348  * NULL for using closest bound for all variables */
349  SCIP_Real minfrac, /**< minimal fractionality of rhs to produce MIR cut for */
350  SCIP_Real maxfrac, /**< maximal fractionality of rhs to produce MIR cut for */
351  SCIP_AGGRROW* aggrrow, /**< the aggregation row to compute MIR cut for */
352  SCIP_Real* cutcoefs, /**< array to store the non-zero coefficients in the cut */
353  SCIP_Real* cutrhs, /**< pointer to store the right hand side of the cut */
354  int* cutinds, /**< array to store the problem indices of variables with a non-zero coefficient in the cut */
355  int* cutnnz, /**< pointer to store the number of non-zeros in the cut */
356  SCIP_Real* cutefficacy, /**< pointer to store efficacy of best cut; only cuts that are strictly better than the value of
357  * this efficacy on input to this function are returned */
358  int* cutrank, /**< pointer to return rank of generated cut */
359  SCIP_Bool* cutislocal, /**< pointer to store whether the generated cut is only valid locally */
360  SCIP_Bool* success /**< pointer to store whether a valid and efficacious cut was returned */
361  );
362 
363 /** calculates a lifted simple generalized flow cover cut out of the weighted sum of LP rows given by an aggregation row; the
364  * aggregation row must not contain non-zero weights for modifiable rows, because these rows cannot
365  * participate in the cut.
366  * For further details we refer to:
367  *
368  * Gu, Z., Nemhauser, G. L., & Savelsbergh, M. W. (1999). Lifted flow cover inequalities for mixed 0-1 integer programs.
369  * Mathematical Programming, 85(3), 439-467.
370  *
371  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
372  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
373  *
374  * @pre This method can be called if @p scip is in one of the following stages:
375  * - \ref SCIP_STAGE_SOLVING
376  *
377  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
378  */
379 SCIP_EXPORT
381  SCIP* scip, /**< SCIP data structure */
382  SCIP_SOL* sol, /**< the solution that should be separated, or NULL for LP solution */
383  SCIP_Bool postprocess, /**< apply a post-processing step to the resulting cut? */
384  SCIP_Real boundswitch, /**< fraction of domain up to which lower bound is used in transformation */
385  SCIP_Bool allowlocal, /**< should local information allowed to be used, resulting in a local cut? */
386  SCIP_AGGRROW* aggrrow, /**< the aggregation row to compute flow cover cut for */
387  SCIP_Real* cutcoefs, /**< array to store the non-zero coefficients in the cut */
388  SCIP_Real* cutrhs, /**< pointer to store the right hand side of the cut */
389  int* cutinds, /**< array to store the problem indices of variables with a non-zero coefficient in the cut */
390  int* cutnnz, /**< pointer to store the number of non-zeros in the cut */
391  SCIP_Real* cutefficacy, /**< pointer to store the efficacy of the cut, or NULL */
392  int* cutrank, /**< pointer to return rank of generated cut */
393  SCIP_Bool* cutislocal, /**< pointer to store whether the generated cut is only valid locally */
394  SCIP_Bool* success /**< pointer to store whether a valid cut was returned */
395  );
396 
397 /** calculates a lifted knapsack cover cut out of the weighted sum of LP rows given by an aggregation row; the
398  * aggregation row must not contain non-zero weights for modifiable rows, because these rows cannot
399  * participate in the cut.
400  * For further details we refer to:
401  *
402  * Letchford, A. N., & Souli, G. (2019). On lifted cover inequalities: A new lifting procedure with unusual properties.
403  * Operations Research Letters, 47(2), 83-87.
404  *
405  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
406  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
407  *
408  * @pre This method can be called if @p scip is in one of the following stages:
409  * - \ref SCIP_STAGE_SOLVING
410  *
411  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
412  */
413 SCIP_EXPORT
415  SCIP* scip, /**< SCIP data structure */
416  SCIP_SOL* sol, /**< the solution that should be separated, or NULL for LP solution */
417  SCIP_Bool allowlocal, /**< should local information allowed to be used, resulting in a local cut? */
418  SCIP_AGGRROW* aggrrow, /**< the aggregation row to compute flow cover cut for */
419  SCIP_Real* cutcoefs, /**< array to store the non-zero coefficients in the cut */
420  SCIP_Real* cutrhs, /**< pointer to store the right hand side of the cut */
421  int* cutinds, /**< array to store the problem indices of variables with a non-zero coefficient in the cut */
422  int* cutnnz, /**< pointer to store the number of non-zeros in the cut */
423  SCIP_Real* cutefficacy, /**< pointer to store the efficacy of the cut, or NULL */
424  int* cutrank, /**< pointer to return rank of generated cut */
425  SCIP_Bool* cutislocal, /**< pointer to store whether the generated cut is only valid locally */
426  SCIP_Bool* success /**< pointer to store whether a valid cut was returned */
427  );
428 
429 /** calculates a strong CG cut out of the weighted sum of LP rows given by an aggregation row; the
430  * aggregation row must not contain non-zero weights for modifiable rows, because these rows cannot
431  * participate in a strongcg cut
432  *
433  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
434  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
435  *
436  * @pre This method can be called if @p scip is in one of the following stages:
437  * - \ref SCIP_STAGE_SOLVING
438  *
439  * See \ref SCIP_Stage "SCIP_STAGE" for a complete list of all possible solving stages.
440  */
441 SCIP_EXPORT
443  SCIP* scip, /**< SCIP data structure */
444  SCIP_SOL* sol, /**< the solution that should be separated, or NULL for LP solution */
445  SCIP_Bool postprocess, /**< apply a post-processing step to the resulting cut? */
446  SCIP_Real boundswitch, /**< fraction of domain up to which lower bound is used in transformation */
447  SCIP_Bool usevbds, /**< should variable bounds be used in bound transformation? */
448  SCIP_Bool allowlocal, /**< should local information allowed to be used, resulting in a local cut? */
449  SCIP_Real minfrac, /**< minimal fractionality of rhs to produce strong CG cut for */
450  SCIP_Real maxfrac, /**< maximal fractionality of rhs to produce strong CG cut for */
451  SCIP_Real scale, /**< additional scaling factor multiplied to all rows */
452  SCIP_AGGRROW* aggrrow, /**< the aggregation row to compute a strong CG cut for */
453  SCIP_Real* cutcoefs, /**< array to store the non-zero coefficients in the cut */
454  SCIP_Real* cutrhs, /**< pointer to store the right hand side of the cut */
455  int* cutinds, /**< array to store the problem indices of variables with a non-zero coefficient in the cut */
456  int* cutnnz, /**< pointer to store the number of non-zeros in the cut */
457  SCIP_Real* cutefficacy, /**< pointer to store the efficacy of the cut, or NULL */
458  int* cutrank, /**< pointer to return rank of generated cut */
459  SCIP_Bool* cutislocal, /**< pointer to store whether the generated cut is only valid locally */
460  SCIP_Bool* success /**< pointer to store whether a valid cut was returned */
461  );
462 
463 /** @} */
464 
465 #ifdef __cplusplus
466 }
467 #endif
468 
469 #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:242
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:228
struct definitions for cuts