Scippy

SCIP

Solving Constraint Integer Programs

cutsel_hybrid.c
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 cutsel_hybrid.c
17  * @ingroup DEFPLUGINS_CUTSEL
18  * @brief hybrid cut selector
19  * @author Leona Gottwald
20  * @author Felipe Serrano
21  * @author Mark Turner
22  */
23 
24 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
25 
26 #include <assert.h>
27 
28 #include "scip/scip_cutsel.h"
29 #include "scip/scip_cut.h"
30 #include "scip/scip_lp.h"
31 #include "scip/scip_randnumgen.h"
32 #include "scip/cutsel_hybrid.h"
33 
34 
35 #define CUTSEL_NAME "hybrid"
36 #define CUTSEL_DESC "weighted sum of efficacy, dircutoffdist, objparal, and intsupport"
37 #define CUTSEL_PRIORITY 8000
38 
39 #define RANDSEED 0x5EED
40 #define GOODSCORE 0.9
41 #define BADSCORE 0.0
42 
43 #define DEFAULT_EFFICACYWEIGHT 1.0 /**< weight of efficacy in score calculation */
44 #define DEFAULT_DIRCUTOFFDISTWEIGHT 0.0 /**< weight of directed cutoff distance in score calculation */
45 #define DEFAULT_OBJPARALWEIGHT 0.1 /**< weight of objective parallelism in score calculation */
46 #define DEFAULT_INTSUPPORTWEIGHT 0.1 /**< weight of integral support in cut score calculation */
47 #define DEFAULT_MINORTHO 0.90 /**< minimal orthogonality for a cut to enter the LP */
48 #define DEFAULT_MINORTHOROOT 0.90 /**< minimal orthogonality for a cut to enter the LP in the root node */
49 
50 /*
51  * Data structures
52  */
53 
54 /** cut selector data */
55 struct SCIP_CutselData
56 {
57  SCIP_RANDNUMGEN* randnumgen; /**< random generator for tiebreaking */
58  SCIP_Real goodscore; /**< threshold for score of cut relative to best score to be considered good,
59  * so that less strict filtering is applied */
60  SCIP_Real badscore; /**< threshold for score of cut relative to best score to be discarded */
61  SCIP_Real objparalweight; /**< weight of objective parallelism in cut score calculation */
62  SCIP_Real efficacyweight; /**< weight of efficacy in cut score calculation */
63  SCIP_Real dircutoffdistweight;/**< weight of directed cutoff distance in cut score calculation */
64  SCIP_Real intsupportweight; /**< weight of integral support in cut score calculation */
65  SCIP_Real minortho; /**< minimal orthogonality for a cut to enter the LP */
66  SCIP_Real minorthoroot; /**< minimal orthogonality for a cut to enter the LP in the root node */
67 };
68 
69 
70 /*
71  * Local methods
72  */
73 
74 /** returns the maximum score of cuts; if scores is not NULL, then stores the individual score of each cut in scores */
75 static
77  SCIP* scip, /**< SCIP data structure */
78  SCIP_ROW** cuts, /**< array with cuts to score */
79  SCIP_RANDNUMGEN* randnumgen, /**< random number generator for tie-breaking, or NULL */
80  SCIP_Real dircutoffdistweight,/**< weight of directed cutoff distance in cut score calculation */
81  SCIP_Real efficacyweight, /**< weight of efficacy in cut score calculation */
82  SCIP_Real objparalweight, /**< weight of objective parallelism in cut score calculation */
83  SCIP_Real intsupportweight, /**< weight of integral support in cut score calculation */
84  int ncuts, /**< number of cuts in cuts array */
85  SCIP_Real* scores /**< array to store the score of cuts or NULL */
86  )
87 {
88  SCIP_Real maxscore = 0.0;
89  SCIP_SOL* sol;
90  int i;
91 
92  sol = SCIPgetBestSol(scip);
93 
94  /* if there is an incumbent and the factor is not 0.0, compute directed cutoff distances for the incumbent */
95  if( sol != NULL && dircutoffdistweight > 0.0 )
96  {
97  for( i = 0; i < ncuts; ++i )
98  {
99  SCIP_Real score;
100  SCIP_Real objparallelism;
101  SCIP_Real intsupport;
102  SCIP_Real efficacy;
103 
104  if( intsupportweight > 0.0 )
105  intsupport = intsupportweight * SCIPgetRowNumIntCols(scip, cuts[i]) / (SCIP_Real) SCIProwGetNNonz(cuts[i]);
106  else
107  intsupport = 0.0;
108 
109  if( objparalweight > 0.0 )
110  objparallelism = objparalweight * SCIPgetRowObjParallelism(scip, cuts[i]);
111  else
112  objparallelism = 0.0;
113 
114  efficacy = SCIPgetCutEfficacy(scip, NULL, cuts[i]);
115 
116  if( SCIProwIsLocal(cuts[i]) )
117  {
118  score = dircutoffdistweight * efficacy;
119  }
120  else
121  {
122  score = SCIPgetCutLPSolCutoffDistance(scip, sol, cuts[i]);
123  score = dircutoffdistweight * MAX(score, efficacy);
124  }
125 
126  efficacy *= efficacyweight;
127  score += objparallelism + intsupport + efficacy;
128 
129  /* add small term to prefer global pool cuts */
130  if( SCIProwIsInGlobalCutpool(cuts[i]) )
131  score += 1e-4;
132 
133  if( randnumgen != NULL )
134  {
135  score += SCIPrandomGetReal(randnumgen, 0.0, 1e-6);
136  }
137 
138  maxscore = MAX(maxscore, score);
139 
140  if( scores != NULL )
141  scores[i] = score;
142  }
143  }
144  else
145  {
146  /* in case there is no solution add the directed cutoff distance weight to the efficacy weight
147  * since the efficacy underestimates the directed cuttoff distance
148  */
149  efficacyweight += dircutoffdistweight;
150  for( i = 0; i < ncuts; ++i )
151  {
152  SCIP_Real score;
153  SCIP_Real objparallelism;
154  SCIP_Real intsupport;
155  SCIP_Real efficacy;
156 
157  if( intsupportweight > 0.0 )
158  intsupport = intsupportweight * SCIPgetRowNumIntCols(scip, cuts[i]) / (SCIP_Real) SCIProwGetNNonz(cuts[i]);
159  else
160  intsupport = 0.0;
161 
162  if( objparalweight > 0.0 )
163  objparallelism = objparalweight * SCIPgetRowObjParallelism(scip, cuts[i]);
164  else
165  objparallelism = 0.0;
166 
167  efficacy = efficacyweight > 0.0 ? efficacyweight * SCIPgetCutEfficacy(scip, NULL, cuts[i]) : 0.0;
168 
169  score = objparallelism + intsupport + efficacy;
170 
171  /* add small term to prefer global pool cuts */
172  if( SCIProwIsInGlobalCutpool(cuts[i]) )
173  score += 1e-4;
174 
175  if( randnumgen != NULL )
176  {
177  score += SCIPrandomGetReal(randnumgen, 0.0, 1e-6);
178  }
179 
180  maxscore = MAX(maxscore, score);
181 
182  if( scores != NULL )
183  scores[i] = score;
184  }
185  }
186  return maxscore;
187 }
188 
189 
190 /** move the cut with the highest score to the first position in the array; there must be at least one cut */
191 static
193  SCIP_ROW** cuts, /**< array with cuts to perform selection algorithm */
194  SCIP_Real* scores, /**< array with scores of cuts to perform selection algorithm */
195  int ncuts /**< number of cuts in given array */
196  )
197 {
198  int i;
199  int bestpos;
200  SCIP_Real bestscore;
201 
202  assert(ncuts > 0);
203  assert(cuts != NULL);
204  assert(scores != NULL);
205 
206  bestscore = scores[0];
207  bestpos = 0;
208 
209  for( i = 1; i < ncuts; ++i )
210  {
211  if( scores[i] > bestscore )
212  {
213  bestpos = i;
214  bestscore = scores[i];
215  }
216  }
217 
218  SCIPswapPointers((void**) &cuts[bestpos], (void**) &cuts[0]);
219  SCIPswapReals(&scores[bestpos], &scores[0]);
220 }
221 
222 /** filters the given array of cuts to enforce a maximum parallelism constraint
223  * w.r.t the given cut; moves filtered cuts to the end of the array and returns number of selected cuts */
224 static
226  SCIP_ROW* cut, /**< cut to filter orthogonality with */
227  SCIP_ROW** cuts, /**< array with cuts to perform selection algorithm */
228  SCIP_Real* scores, /**< array with scores of cuts to perform selection algorithm */
229  int ncuts, /**< number of cuts in given array */
230  SCIP_Real goodscore, /**< threshold for the score to be considered a good cut */
231  SCIP_Real goodmaxparall, /**< maximal parallelism for good cuts */
232  SCIP_Real maxparall /**< maximal parallelism for all cuts that are not good */
233  )
234 {
235  int i;
236 
237  assert( cut != NULL );
238  assert( ncuts == 0 || cuts != NULL );
239  assert( ncuts == 0 || scores != NULL );
240 
241  for( i = ncuts - 1; i >= 0; --i )
242  {
243  SCIP_Real thisparall;
244  SCIP_Real thismaxparall;
245 
246  thisparall = SCIProwGetParallelism(cut, cuts[i], 'e');
247  thismaxparall = scores[i] >= goodscore ? goodmaxparall : maxparall;
248 
249  if( thisparall > thismaxparall )
250  {
251  --ncuts;
252  SCIPswapPointers((void**) &cuts[i], (void**) &cuts[ncuts]);
253  SCIPswapReals(&scores[i], &scores[ncuts]);
254  }
255  }
256 
257  return ncuts;
258 }
259 
260 
261 /*
262  * Callback methods of cut selector
263  */
264 
265 
266 /** copy method for cut selector plugin (called when SCIP copies plugins) */
267 static
268 SCIP_DECL_CUTSELCOPY(cutselCopyHybrid)
269 { /*lint --e{715}*/
270  assert(scip != NULL);
271  assert(cutsel != NULL);
272  assert(strcmp(SCIPcutselGetName(cutsel), CUTSEL_NAME) == 0);
273 
274  /* call inclusion method of cut selector */
276 
277  return SCIP_OKAY;
278 }
279 
280 /** destructor of cut selector to free user data (called when SCIP is exiting) */
281 /**! [SnippetCutselFreeHybrid] */
282 static
283 SCIP_DECL_CUTSELFREE(cutselFreeHybrid)
284 { /*lint --e{715}*/
285  SCIP_CUTSELDATA* cutseldata;
286 
287  cutseldata = SCIPcutselGetData(cutsel);
288 
289  SCIPfreeBlockMemory(scip, &cutseldata);
290 
291  SCIPcutselSetData(cutsel, NULL);
292 
293  return SCIP_OKAY;
294 }
295 /**! [SnippetCutselFreeHybrid] */
296 
297 /** initialization method of cut selector (called after problem was transformed) */
298 static
299 SCIP_DECL_CUTSELINIT(cutselInitHybrid)
300 { /*lint --e{715}*/
301  SCIP_CUTSELDATA* cutseldata;
302 
303  cutseldata = SCIPcutselGetData(cutsel);
304  assert(cutseldata != NULL);
305 
306  SCIP_CALL( SCIPcreateRandom(scip, &(cutseldata)->randnumgen, RANDSEED, TRUE) );
307 
308  return SCIP_OKAY;
309 }
310 
311 /** deinitialization method of cut selector (called before transformed problem is freed) */
312 static
313 SCIP_DECL_CUTSELEXIT(cutselExitHybrid)
314 { /*lint --e{715}*/
315  SCIP_CUTSELDATA* cutseldata;
316 
317  cutseldata = SCIPcutselGetData(cutsel);
318  assert(cutseldata != NULL);
319  assert(cutseldata->randnumgen != NULL);
320 
321  SCIPfreeRandom(scip, &cutseldata->randnumgen);
322 
323  return SCIP_OKAY;
324 }
325 
326 /** cut selection method of cut selector */
327 static
328 SCIP_DECL_CUTSELSELECT(cutselSelectHybrid)
329 { /*lint --e{715}*/
330  SCIP_CUTSELDATA* cutseldata;
331  SCIP_Real goodmaxparall;
332  SCIP_Real maxparall;
333 
334  assert(cutsel != NULL);
335  assert(result != NULL);
336 
337  *result = SCIP_SUCCESS;
338 
339  cutseldata = SCIPcutselGetData(cutsel);
340  assert(cutseldata != NULL);
341 
342  if( root )
343  {
344  maxparall = 1.0 - cutseldata->minorthoroot;
345  goodmaxparall = MAX(0.5, 1.0 - cutseldata->minorthoroot);
346  }
347  else
348  {
349  maxparall = 1.0 - cutseldata->minortho;
350  goodmaxparall = MAX(0.5, 1.0 - cutseldata->minortho);
351  }
352 
353  SCIP_CALL( SCIPselectCutsHybrid(scip, cuts, forcedcuts, cutseldata->randnumgen, cutseldata->goodscore, cutseldata->badscore,
354  goodmaxparall, maxparall, cutseldata->dircutoffdistweight, cutseldata->efficacyweight,
355  cutseldata->objparalweight, cutseldata->intsupportweight, ncuts, nforcedcuts, maxnselectedcuts, nselectedcuts) );
356 
357  return SCIP_OKAY;
358 }
359 
360 
361 /*
362  * cut selector specific interface methods
363  */
364 
365 /** creates the hybrid cut selector and includes it in SCIP */
367  SCIP* scip /**< SCIP data structure */
368  )
369 {
370  SCIP_CUTSELDATA* cutseldata;
371  SCIP_CUTSEL* cutsel;
372 
373  /* create hybrid cut selector data */
374  SCIP_CALL( SCIPallocBlockMemory(scip, &cutseldata) );
375  BMSclearMemory(cutseldata);
376  cutseldata->goodscore = GOODSCORE;
377  cutseldata->badscore = BADSCORE;
378 
379  SCIP_CALL( SCIPincludeCutselBasic(scip, &cutsel, CUTSEL_NAME, CUTSEL_DESC, CUTSEL_PRIORITY, cutselSelectHybrid,
380  cutseldata) );
381 
382  assert(cutsel != NULL);
383 
384  /* set non fundamental callbacks via setter functions */
385  SCIP_CALL( SCIPsetCutselCopy(scip, cutsel, cutselCopyHybrid) );
386 
387  SCIP_CALL( SCIPsetCutselFree(scip, cutsel, cutselFreeHybrid) );
388  SCIP_CALL( SCIPsetCutselInit(scip, cutsel, cutselInitHybrid) );
389  SCIP_CALL( SCIPsetCutselExit(scip, cutsel, cutselExitHybrid) );
390 
391  /* add hybrid cut selector parameters */
393  "cutselection/" CUTSEL_NAME "/efficacyweight",
394  "weight of efficacy in cut score calculation",
395  &cutseldata->efficacyweight, FALSE, DEFAULT_EFFICACYWEIGHT, 0.0, SCIP_INVALID/10.0, NULL, NULL) );
396 
398  "cutselection/" CUTSEL_NAME "/dircutoffdistweight",
399  "weight of directed cutoff distance in cut score calculation",
400  &cutseldata->dircutoffdistweight, FALSE, DEFAULT_DIRCUTOFFDISTWEIGHT, 0.0, SCIP_INVALID/10.0, NULL, NULL) );
401 
403  "cutselection/" CUTSEL_NAME "/objparalweight",
404  "weight of objective parallelism in cut score calculation",
405  &cutseldata->objparalweight, FALSE, DEFAULT_OBJPARALWEIGHT, 0.0, SCIP_INVALID/10.0, NULL, NULL) );
406 
408  "cutselection/" CUTSEL_NAME "/intsupportweight",
409  "weight of integral support in cut score calculation",
410  &cutseldata->intsupportweight, FALSE, DEFAULT_INTSUPPORTWEIGHT, 0.0, SCIP_INVALID/10.0, NULL, NULL) );
411 
413  "cutselection/" CUTSEL_NAME "/minortho",
414  "minimal orthogonality for a cut to enter the LP",
415  &cutseldata->minortho, FALSE, DEFAULT_MINORTHO, 0.0, 1.0, NULL, NULL) );
416 
418  "cutselection/" CUTSEL_NAME "/minorthoroot",
419  "minimal orthogonality for a cut to enter the LP in the root node",
420  &cutseldata->minorthoroot, FALSE, DEFAULT_MINORTHOROOT, 0.0, 1.0, NULL, NULL) );
421 
422  return SCIP_OKAY;
423 }
424 
425 
426 /** perform a cut selection algorithm for the given array of cuts
427  *
428  * This is the selection method of the hybrid cut selector which uses a weighted sum of the
429  * efficacy, parallelism, directed cutoff distance, and the integral support.
430  * The input cuts array gets resorted s.t the selected cuts come first and the remaining
431  * ones are the end.
432  */
434  SCIP* scip, /**< SCIP data structure */
435  SCIP_ROW** cuts, /**< array with cuts to perform selection algorithm */
436  SCIP_ROW** forcedcuts, /**< array with forced cuts */
437  SCIP_RANDNUMGEN* randnumgen, /**< random number generator for tie-breaking, or NULL */
438  SCIP_Real goodscorefac, /**< factor of best score among the given cuts to consider a cut good
439  * and filter with less strict settings of the maximum parallelism */
440  SCIP_Real badscorefac, /**< factor of best score among the given cuts to consider a cut bad
441  * and discard it regardless of its parallelism to other cuts */
442  SCIP_Real goodmaxparall, /**< maximum parallelism for good cuts */
443  SCIP_Real maxparall, /**< maximum parallelism for non-good cuts */
444  SCIP_Real dircutoffdistweight,/**< weight of directed cutoff distance in cut score calculation */
445  SCIP_Real efficacyweight, /**< weight of efficacy in cut score calculation */
446  SCIP_Real objparalweight, /**< weight of objective parallelism in cut score calculation */
447  SCIP_Real intsupportweight, /**< weight of integral support in cut score calculation */
448  int ncuts, /**< number of cuts in cuts array */
449  int nforcedcuts, /**< number of forced cuts */
450  int maxselectedcuts, /**< maximal number of cuts from cuts array to select */
451  int* nselectedcuts /**< pointer to return number of selected cuts from cuts array */
452  )
453 {
454  SCIP_Real* scores;
455  SCIP_Real* scoresptr;
456  SCIP_Real maxforcedscores;
457  SCIP_Real maxnonforcedscores;
458  SCIP_Real goodscore;
459  SCIP_Real badscore;
460  int i;
461 
462  assert(cuts != NULL && ncuts > 0);
463  assert(forcedcuts != NULL || nforcedcuts == 0);
464  assert(nselectedcuts != NULL);
465 
466  *nselectedcuts = 0;
467 
468  SCIP_CALL( SCIPallocBufferArray(scip, &scores, ncuts) );
469 
470  /* compute scores of cuts and max score of cuts and forced cuts (used to define goodscore) */
471  maxforcedscores = scoring(scip, forcedcuts, randnumgen, dircutoffdistweight, efficacyweight, objparalweight, intsupportweight, nforcedcuts, NULL);
472  maxnonforcedscores = scoring(scip, cuts, randnumgen, dircutoffdistweight, efficacyweight, objparalweight, intsupportweight, ncuts, scores);
473 
474  goodscore = MAX(maxforcedscores, maxnonforcedscores);
475 
476  /* compute values for filtering cuts */
477  badscore = goodscore * badscorefac;
478  goodscore *= goodscorefac;
479 
480  /* perform cut selection algorithm for the cuts */
481 
482  /* forced cuts are going to be selected so use them to filter cuts */
483  for( i = 0; i < nforcedcuts && ncuts > 0; ++i )
484  {
485  ncuts = filterWithParallelism(forcedcuts[i], cuts, scores, ncuts, goodscore, goodmaxparall, maxparall);
486  }
487 
488  /* now greedily select the remaining cuts */
489  scoresptr = scores;
490  while( ncuts > 0 )
491  {
492  SCIP_ROW* selectedcut;
493 
494  selectBestCut(cuts, scores, ncuts);
495  selectedcut = cuts[0];
496 
497  /* if the best cut of the remaining cuts is considered bad, we discard it and all remaining cuts */
498  if( scores[0] < badscore )
499  goto TERMINATE;
500 
501  ++(*nselectedcuts);
502 
503  /* if the maximal number of cuts was selected, we can stop here */
504  if( *nselectedcuts == maxselectedcuts )
505  goto TERMINATE;
506 
507  /* move the pointers to the next position and filter the remaining cuts to enforce the maximum parallelism constraint */
508  ++cuts;
509  ++scores;
510  --ncuts;
511 
512  ncuts = filterWithParallelism(selectedcut, cuts, scores, ncuts, goodscore, goodmaxparall, maxparall);
513  }
514 
515 TERMINATE:
516  SCIPfreeBufferArray(scip, &scoresptr);
517 
518  return SCIP_OKAY;
519 }
SCIP_RETCODE SCIPsetCutselExit(SCIP *scip, SCIP_CUTSEL *cutsel, SCIP_DECL_CUTSELEXIT((*cutselexit)))
Definition: scip_cutsel.c:164
void SCIPfreeRandom(SCIP *scip, SCIP_RANDNUMGEN **randnumgen)
const char * SCIPcutselGetName(SCIP_CUTSEL *cutsel)
Definition: cutsel.c:150
#define DEFAULT_EFFICACYWEIGHT
Definition: cutsel_hybrid.c:43
SCIP_CUTSELDATA * SCIPcutselGetData(SCIP_CUTSEL *cutsel)
Definition: cutsel.c:409
struct SCIP_CutselData SCIP_CUTSELDATA
Definition: type_cutsel.h:44
int SCIProwGetNNonz(SCIP_ROW *row)
Definition: lp.c:17179
#define CUTSEL_NAME
Definition: cutsel_hybrid.c:35
hybrid cut selector
void SCIPswapPointers(void **pointer1, void **pointer2)
Definition: misc.c:10291
#define DEFAULT_MINORTHO
Definition: cutsel_hybrid.c:47
#define FALSE
Definition: def.h:87
#define TRUE
Definition: def.h:86
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:54
static SCIP_DECL_CUTSELINIT(cutselInitHybrid)
SCIP_Real SCIPgetCutLPSolCutoffDistance(SCIP *scip, SCIP_SOL *sol, SCIP_ROW *cut)
Definition: scip_cut.c:63
static void selectBestCut(SCIP_ROW **cuts, SCIP_Real *scores, int ncuts)
void SCIPswapReals(SCIP_Real *value1, SCIP_Real *value2)
Definition: misc.c:10278
#define SCIPfreeBlockMemory(scip, ptr)
Definition: scip_mem.h:99
#define RANDSEED
Definition: cutsel_hybrid.c:39
void SCIPcutselSetData(SCIP_CUTSEL *cutsel, SCIP_CUTSELDATA *cutseldata)
Definition: cutsel.c:419
#define SCIPfreeBufferArray(scip, ptr)
Definition: scip_mem.h:127
#define BADSCORE
Definition: cutsel_hybrid.c:41
static SCIP_DECL_CUTSELCOPY(cutselCopyHybrid)
SCIP_Bool SCIProwIsLocal(SCIP_ROW *row)
Definition: lp.c:17367
SCIP_RETCODE SCIPsetCutselCopy(SCIP *scip, SCIP_CUTSEL *cutsel, SCIP_DECL_CUTSELCOPY((*cutselcopy)))
Definition: scip_cutsel.c:116
static SCIP_DECL_CUTSELFREE(cutselFreeHybrid)
static int filterWithParallelism(SCIP_ROW *cut, SCIP_ROW **cuts, SCIP_Real *scores, int ncuts, SCIP_Real goodscore, SCIP_Real goodmaxparall, SCIP_Real maxparall)
#define NULL
Definition: lpi_spx1.cpp:155
static SCIP_DECL_CUTSELEXIT(cutselExitHybrid)
SCIP_RETCODE SCIPincludeCutselHybrid(SCIP *scip)
#define SCIP_CALL(x)
Definition: def.h:384
static SCIP_Real scoring(SCIP *scip, SCIP_ROW **cuts, SCIP_RANDNUMGEN *randnumgen, SCIP_Real dircutoffdistweight, SCIP_Real efficacyweight, SCIP_Real objparalweight, SCIP_Real intsupportweight, int ncuts, SCIP_Real *scores)
Definition: cutsel_hybrid.c:76
#define DEFAULT_INTSUPPORTWEIGHT
Definition: cutsel_hybrid.c:46
#define CUTSEL_PRIORITY
Definition: cutsel_hybrid.c:37
static SCIP_DECL_CUTSELSELECT(cutselSelectHybrid)
SCIP_RETCODE SCIPcreateRandom(SCIP *scip, SCIP_RANDNUMGEN **randnumgen, unsigned int initialseed, SCIP_Bool useglobalseed)
SCIP_RETCODE SCIPsetCutselInit(SCIP *scip, SCIP_CUTSEL *cutsel, SCIP_DECL_CUTSELINIT((*cutselinit)))
Definition: scip_cutsel.c:148
#define SCIPallocBufferArray(scip, ptr, num)
Definition: scip_mem.h:115
SCIP_Real SCIPgetRowObjParallelism(SCIP *scip, SCIP_ROW *row)
Definition: scip_lp.c:2175
#define DEFAULT_MINORTHOROOT
Definition: cutsel_hybrid.c:48
public methods for cut selector plugins
SCIP_RETCODE SCIPselectCutsHybrid(SCIP *scip, SCIP_ROW **cuts, SCIP_ROW **forcedcuts, SCIP_RANDNUMGEN *randnumgen, SCIP_Real goodscorefac, SCIP_Real badscorefac, SCIP_Real goodmaxparall, SCIP_Real maxparall, SCIP_Real dircutoffdistweight, SCIP_Real efficacyweight, SCIP_Real objparalweight, SCIP_Real intsupportweight, int ncuts, int nforcedcuts, int maxselectedcuts, int *nselectedcuts)
#define CUTSEL_DESC
Definition: cutsel_hybrid.c:36
int SCIPgetRowNumIntCols(SCIP *scip, SCIP_ROW *row)
Definition: scip_lp.c:1871
#define MAX(x, y)
Definition: tclique_def.h:83
SCIP_Real SCIPgetCutEfficacy(SCIP *scip, SCIP_SOL *sol, SCIP_ROW *cut)
Definition: scip_cut.c:85
public methods for cuts and aggregation rows
#define BMSclearMemory(ptr)
Definition: memory.h:122
SCIP_Real SCIPrandomGetReal(SCIP_RANDNUMGEN *randnumgen, SCIP_Real minrandval, SCIP_Real maxrandval)
Definition: misc.c:10025
public methods for the LP relaxation, rows and columns
SCIP_Real SCIProwGetParallelism(SCIP_ROW *row1, SCIP_ROW *row2, char orthofunc)
Definition: lp.c:7719
SCIP_SOL * SCIPgetBestSol(SCIP *scip)
Definition: scip_sol.c:2304
#define GOODSCORE
Definition: cutsel_hybrid.c:40
public methods for random numbers
#define SCIP_Real
Definition: def.h:177
#define SCIP_INVALID
Definition: def.h:197
SCIP_RETCODE SCIPsetCutselFree(SCIP *scip, SCIP_CUTSEL *cutsel, SCIP_DECL_CUTSELFREE((*cutselfree)))
Definition: scip_cutsel.c:132
#define DEFAULT_DIRCUTOFFDISTWEIGHT
Definition: cutsel_hybrid.c:44
SCIPallocBlockMemory(scip, subsol))
#define DEFAULT_OBJPARALWEIGHT
Definition: cutsel_hybrid.c:45
SCIP_RETCODE SCIPaddRealParam(SCIP *scip, const char *name, const char *desc, SCIP_Real *valueptr, SCIP_Bool isadvanced, SCIP_Real defaultvalue, SCIP_Real minvalue, SCIP_Real maxvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
Definition: scip_param.c:130
SCIP_Bool SCIProwIsInGlobalCutpool(SCIP_ROW *row)
Definition: lp.c:17457
SCIP_RETCODE SCIPincludeCutselBasic(SCIP *scip, SCIP_CUTSEL **cutsel, const char *name, const char *desc, int priority, SCIP_DECL_CUTSELSELECT((*cutselselect)), SCIP_CUTSELDATA *cutseldata)
Definition: scip_cutsel.c:83