Scippy

SCIP

Solving Constraint Integer Programs

scip_cut.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-2019 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 scip.zib.de. */
13 /* */
14 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
15 
16 /**@file scip_cut.c
17  * @brief public methods for cuts and aggregation rows
18  * @author Tobias Achterberg
19  * @author Timo Berthold
20  * @author Gerald Gamrath
21  * @author Robert Lion Gottwald
22  * @author Stefan Heinz
23  * @author Gregor Hendel
24  * @author Thorsten Koch
25  * @author Alexander Martin
26  * @author Marc Pfetsch
27  * @author Michael Winkler
28  * @author Kati Wolter
29  *
30  * @todo check all SCIP_STAGE_* switches, and include the new stages TRANSFORMED and INITSOLVE
31  */
32 
33 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
34 
35 #include "scip/cutpool.h"
36 #include "scip/debug.h"
37 #include "scip/lp.h"
38 #include "scip/prob.h"
39 #include "scip/pub_cutpool.h"
40 #include "scip/pub_lp.h"
41 #include "scip/pub_message.h"
42 #include "scip/scip_conflict.h"
43 #include "scip/scip_cut.h"
44 #include "scip/scip_numerics.h"
45 #include "scip/scip_tree.h"
46 #include "scip/sepastore.h"
47 #include "scip/set.h"
48 #include "scip/solve.h"
49 #include "scip/struct_lp.h"
50 #include "scip/struct_mem.h"
51 #include "scip/struct_scip.h"
52 #include "scip/struct_set.h"
53 #include "scip/tree.h"
54 
55 /** returns efficacy of the cut with respect to the given primal solution or the current LP solution:
56  * e = -feasibility/norm
57  *
58  * @return the efficacy of the cut with respect to the given primal solution or the current LP solution:
59  * e = -feasibility/norm
60  *
61  * @pre This method can be called if @p scip is in one of the following stages:
62  * - \ref SCIP_STAGE_SOLVING
63  */
65  SCIP* scip, /**< SCIP data structure */
66  SCIP_SOL* sol, /**< primal CIP solution, or NULL for current LP solution */
67  SCIP_ROW* cut /**< separated cut */
68  )
69 {
70  SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetCutEfficacy", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
71 
72  if( sol == NULL )
73  return SCIProwGetLPEfficacy(cut, scip->set, scip->stat, scip->lp);
74  else
75  return SCIProwGetSolEfficacy(cut, scip->set, scip->stat, sol);
76 }
77 
78 /** returns whether the cut's efficacy with respect to the given primal solution or the current LP solution is greater
79  * than the minimal cut efficacy
80  *
81  * @return TRUE if the cut's efficacy with respect to the given primal solution or the current LP solution is greater
82  * than the minimal cut efficacy, otherwise FALSE
83  *
84  * @pre This method can be called if @p scip is in one of the following stages:
85  * - \ref SCIP_STAGE_SOLVING
86  */
88  SCIP* scip, /**< SCIP data structure */
89  SCIP_SOL* sol, /**< primal CIP solution, or NULL for current LP solution */
90  SCIP_ROW* cut /**< separated cut */
91  )
92 {
93  SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPisCutEfficacious", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
94 
95  if( sol == NULL )
96  return SCIProwIsLPEfficacious(cut, scip->set, scip->stat, scip->lp, (SCIPtreeGetCurrentDepth(scip->tree) == 0));
97  else
98  return SCIProwIsSolEfficacious(cut, scip->set, scip->stat, sol, (SCIPtreeGetCurrentDepth(scip->tree) == 0));
99 }
100 
101 /** checks, if the given cut's efficacy is larger than the minimal cut efficacy
102  *
103  * @return TRUE if the given cut's efficacy is larger than the minimal cut efficacy, otherwise FALSE
104  */
106  SCIP* scip, /**< SCIP data structure */
107  SCIP_Real efficacy /**< efficacy of the cut */
108  )
109 {
110  assert(scip != NULL);
111 
112  return SCIPsetIsEfficacious(scip->set, (SCIPtreeGetCurrentDepth(scip->tree) == 0), efficacy);
113 }
114 
115 /** calculates the efficacy norm of the given vector, which depends on the "separating/efficacynorm" parameter
116  *
117  * @return the efficacy norm of the given vector, which depends on the "separating/efficacynorm" parameter
118  */
120  SCIP* scip, /**< SCIP data structure */
121  SCIP_Real* vals, /**< array of values */
122  int nvals /**< number of values */
123  )
124 {
125  SCIP_Real norm;
126  int i;
127 
128  assert(scip != NULL);
129  assert(scip->set != NULL);
130 
131  norm = 0.0;
132  switch( scip->set->sepa_efficacynorm )
133  {
134  case 'e':
135  for( i = 0; i < nvals; ++i )
136  norm += SQR(vals[i]);
137  norm = SQRT(norm);
138  break;
139  case 'm':
140  for( i = 0; i < nvals; ++i )
141  {
142  SCIP_Real absval;
143 
144  absval = REALABS(vals[i]);
145  norm = MAX(norm, absval);
146  }
147  break;
148  case 's':
149  for( i = 0; i < nvals; ++i )
150  norm += REALABS(vals[i]);
151  break;
152  case 'd':
153  for( i = 0; i < nvals; ++i )
154  {
155  if( !SCIPisZero(scip, vals[i]) )
156  {
157  norm = 1.0;
158  break;
159  }
160  }
161  break;
162  default:
163  SCIPerrorMessage("invalid efficacy norm parameter '%c'\n", scip->set->sepa_efficacynorm);
164  assert(FALSE);
165  }
166 
167  return norm;
168 }
169 
170 /** indicates whether a cut is applicable, i.e., will modify the LP when applied
171  *
172  * @pre This method can be called if @p scip is in one of the following stages:
173  * - \ref SCIP_STAGE_SOLVING
174  *
175  * @return whether the cut is modifiable, not a bound change, or a bound change that changes bounds by at least epsilon
176  */
178  SCIP* scip, /**< SCIP data structure */
179  SCIP_ROW* cut /**< separated cut */
180  )
181 {
182  SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPisCutApplicable", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
183 
184  return SCIPsepastoreIsCutApplicable(scip->set, cut);
185 }
186 
187 /** adds cut to separation storage
188  *
189  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
190  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
191  *
192  * @pre This method can be called if @p scip is in one of the following stages:
193  * - \ref SCIP_STAGE_SOLVING
194  *
195  * @deprecated Please use SCIPaddRow() instead, or, if the row is a global cut, add it only to the global cutpool.
196  */
198  SCIP* scip, /**< SCIP data structure */
199  SCIP_SOL* sol, /**< primal solution that was separated, or NULL for LP solution */
200  SCIP_ROW* cut, /**< separated cut */
201  SCIP_Bool forcecut, /**< should the cut be forced to enter the LP? */
202  SCIP_Bool* infeasible /**< pointer to store whether cut has been detected to be infeasible for local bounds */
203  )
204 {
206 
207  SCIP_UNUSED(sol);
208 
209  return SCIPaddRow(scip, cut, forcecut, infeasible);
210 }
211 
212 /** adds row to separation storage
213  *
214  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
215  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
216  *
217  * @pre This method can be called if @p scip is in one of the following stages:
218  * - \ref SCIP_STAGE_SOLVING
219  */
221  SCIP* scip, /**< SCIP data structure */
222  SCIP_ROW* row, /**< row */
223  SCIP_Bool forcecut, /**< should the row be forced to enter the LP? */
224  SCIP_Bool* infeasible /**< pointer to store whether row has been detected to be infeasible for local bounds */
225  )
226 {
228 
229  assert(SCIPtreeGetCurrentNode(scip->tree) != NULL);
230 
231  SCIP_CALL( SCIPsepastoreAddCut(scip->sepastore, scip->mem->probmem, scip->set, scip->stat, scip->eventqueue,
232  scip->eventfilter, scip->lp, row, forcecut, (SCIPtreeGetCurrentDepth(scip->tree) == 0), infeasible) );
233 
234  /* possibly run conflict analysis */
235  if ( *infeasible && SCIPprobAllColsInLP(scip->transprob, scip->set, scip->lp) && SCIPisConflictAnalysisApplicable(scip) )
236  {
237  SCIP_Real act;
238  SCIP_VAR* var;
239  SCIP_Real val;
240  int ncols;
241  int j;
242 
243  /* initialize conflict analysis */
245 
246  if ( ! SCIPisInfinity(scip, -row->lhs) )
247  {
248  act = SCIProwGetMaxActivity(row, scip->set, scip->stat);
249  if ( SCIPisLT(scip, act, row->lhs) )
250  {
251  ncols = SCIProwGetNNonz(row);
252  for (j = 0; j < ncols; ++j)
253  {
254  val = row->vals[j];
255  if ( ! SCIPisZero(scip, val) )
256  {
257  var = SCIPcolGetVar(row->cols[j]);
258  assert( var != NULL );
259 
260  if ( val > 0.0 )
261  {
262  SCIP_CALL( SCIPaddConflictUb(scip, var, NULL) );
263  }
264  else
265  {
266  SCIP_CALL( SCIPaddConflictLb(scip, var, NULL) );
267  }
268  }
269  }
270  }
271  }
272  else if ( ! SCIPisInfinity(scip, row->rhs) )
273  {
274  act = SCIProwGetMinActivity(row, scip->set, scip->stat);
275  if ( SCIPisGT(scip, act, row->rhs) )
276  {
277  ncols = SCIProwGetNNonz(row);
278  for (j = 0; j < ncols; ++j)
279  {
280  val = row->vals[j];
281  if ( ! SCIPisZero(scip, val) )
282  {
283  var = SCIPcolGetVar(row->cols[j]);
284  assert( var != NULL );
285 
286  if ( val > 0.0 )
287  {
288  SCIP_CALL( SCIPaddConflictLb(scip, var, NULL) );
289  }
290  else
291  {
292  SCIP_CALL( SCIPaddConflictUb(scip, var, NULL) );
293  }
294  }
295  }
296  }
297  }
298 
299  /* analyze the conflict */
301  }
302 
303  return SCIP_OKAY;
304 }
305 
306 /** checks if cut is already existing in global cutpool
307  *
308  * @return TRUE is returned if the cut is not already existing in the global cutpool, FALSE otherwise
309  *
310  * @pre This method can be called if @p scip is in one of the following stages:
311  * - \ref SCIP_STAGE_SOLVING
312  */
314  SCIP* scip, /**< SCIP data structure */
315  SCIP_ROW* row /**< cutting plane to add */
316  )
317 {
319 
320  return SCIPcutpoolIsCutNew(scip->cutpool, scip->set, row);
321 }
322 
323 /** if not already existing, adds row to global cut pool
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  */
332  SCIP* scip, /**< SCIP data structure */
333  SCIP_ROW* row /**< row to remove */
334  )
335 {
336  SCIP_CALL( SCIPcheckStage(scip, "SCIPaddPoolCut", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
337 
338  SCIP_CALL( SCIPcutpoolAddRow(scip->cutpool, scip->mem->probmem, scip->set, scip->stat, scip->lp, row) );
339 
340  return SCIP_OKAY;
341 }
342 
343 /** removes the row from the global cut pool
344  *
345  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
346  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
347  *
348  * @pre This method can be called if @p scip is in one of the following stages:
349  * - \ref SCIP_STAGE_SOLVING
350  */
352  SCIP* scip, /**< SCIP data structure */
353  SCIP_ROW* row /**< cutting plane to add */
354  )
355 {
356  SCIP_CALL( SCIPcheckStage(scip, "SCIPdelPoolCut", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
357 
358  SCIP_CALL( SCIPcutpoolDelRow(scip->cutpool, scip->mem->probmem, scip->set, scip->stat, scip->lp, row) );
359 
360  return SCIP_OKAY;
361 }
362 
363 /** gets current cuts in the global cut pool
364  *
365  * @return the current cuts in the global cut pool
366  *
367  * @pre This method can be called if @p scip is in one of the following stages:
368  * - \ref SCIP_STAGE_SOLVING
369  * - \ref SCIP_STAGE_SOLVED
370  * - \ref SCIP_STAGE_EXITSOLVE
371  */
373  SCIP* scip /**< SCIP data structure */
374  )
375 {
376  SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetPoolCuts", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, FALSE, FALSE) );
377 
378  return SCIPcutpoolGetCuts(scip->cutpool);
379 }
380 
381 /** gets current number of rows in the global cut pool
382  *
383  * @return the current number of rows in the global cut pool
384  *
385  * @pre This method can be called if @p scip is in one of the following stages:
386  * - \ref SCIP_STAGE_SOLVING
387  * - \ref SCIP_STAGE_SOLVED
388  * - \ref SCIP_STAGE_EXITSOLVE
389  */
391  SCIP* scip /**< SCIP data structure */
392  )
393 {
394  SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetNPoolCuts", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, FALSE, FALSE) );
395 
396  return SCIPcutpoolGetNCuts(scip->cutpool);
397 }
398 
399 /** gets the global cut pool used by SCIP
400  *
401  * @return the global cut pool used by SCIP
402  *
403  * @pre This method can be called if @p scip is in one of the following stages:
404  * - \ref SCIP_STAGE_SOLVING
405  * - \ref SCIP_STAGE_SOLVED
406  * - \ref SCIP_STAGE_EXITSOLVE
407  */
409  SCIP* scip /**< SCIP data structure */
410  )
411 {
412  SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetGlobalCutpool", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, FALSE, FALSE) );
413 
414  return scip->cutpool;
415 }
416 
417 /** creates a cut pool
418  *
419  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
420  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
421  *
422  * @pre This method can be called if @p scip is in one of the following stages:
423  * - \ref SCIP_STAGE_TRANSFORMING
424  * - \ref SCIP_STAGE_TRANSFORMED
425  * - \ref SCIP_STAGE_INITPRESOLVE
426  * - \ref SCIP_STAGE_PRESOLVING
427  * - \ref SCIP_STAGE_EXITPRESOLVE
428  * - \ref SCIP_STAGE_PRESOLVED
429  * - \ref SCIP_STAGE_INITSOLVE
430  * - \ref SCIP_STAGE_SOLVING
431  */
433  SCIP* scip, /**< SCIP data structure */
434  SCIP_CUTPOOL** cutpool, /**< pointer to store cut pool */
435  int agelimit /**< maximum age a cut can reach before it is deleted from the pool */
436  )
437 {
438  SCIP_CALL( SCIPcheckStage(scip, "SCIPcreateCutpool", FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE) );
439 
440  SCIP_CALL( SCIPcutpoolCreate(cutpool, scip->mem->probmem, scip->set, agelimit, FALSE) );
441 
442  return SCIP_OKAY;
443 }
444 
445 /** frees a cut pool
446  *
447  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
448  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
449  *
450  * @pre This method can be called if @p scip is in one of the following stages:
451  * - \ref SCIP_STAGE_TRANSFORMING
452  * - \ref SCIP_STAGE_TRANSFORMED
453  * - \ref SCIP_STAGE_INITPRESOLVE
454  * - \ref SCIP_STAGE_PRESOLVING
455  * - \ref SCIP_STAGE_EXITPRESOLVE
456  * - \ref SCIP_STAGE_PRESOLVED
457  * - \ref SCIP_STAGE_INITSOLVE
458  * - \ref SCIP_STAGE_SOLVING
459  * - \ref SCIP_STAGE_SOLVED
460  * - \ref SCIP_STAGE_EXITSOLVE
461  * - \ref SCIP_STAGE_FREETRANS
462  */
464  SCIP* scip, /**< SCIP data structure */
465  SCIP_CUTPOOL** cutpool /**< pointer to store cut pool */
466  )
467 {
468  SCIP_CALL( SCIPcheckStage(scip, "SCIPfreeCutpool", FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE) );
469 
470  SCIP_CALL( SCIPcutpoolFree(cutpool, scip->mem->probmem, scip->set, scip->lp) );
471 
472  return SCIP_OKAY;
473 }
474 
475 /** if not already existing, adds row to a cut pool and captures it
476  *
477  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
478  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
479  *
480  * @pre This method can be called if @p scip is in one of the following stages:
481  * - \ref SCIP_STAGE_INITSOLVE
482  * - \ref SCIP_STAGE_SOLVING
483  */
485  SCIP* scip, /**< SCIP data structure */
486  SCIP_CUTPOOL* cutpool, /**< cut pool */
487  SCIP_ROW* row /**< cutting plane to add */
488  )
489 {
490  SCIP_CALL( SCIPcheckStage(scip, "SCIPaddRowCutpool", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE) );
491 
492  SCIP_CALL( SCIPcutpoolAddRow(cutpool, scip->mem->probmem, scip->set, scip->stat, scip->lp, row) );
493 
494  return SCIP_OKAY;
495 }
496 
497 /** adds row to a cut pool and captures it; doesn't check for multiple cuts
498  *
499  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
500  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
501  *
502  * @pre This method can be called if @p scip is in one of the following stages:
503  * - \ref SCIP_STAGE_INITSOLVE
504  * - \ref SCIP_STAGE_SOLVING
505  */
507  SCIP* scip, /**< SCIP data structure */
508  SCIP_CUTPOOL* cutpool, /**< cut pool */
509  SCIP_ROW* row /**< cutting plane to add */
510  )
511 {
512  SCIP_CALL( SCIPcheckStage(scip, "SCIPaddNewRowCutpool", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE) );
513 
514  SCIP_CALL( SCIPcutpoolAddNewRow(cutpool, scip->mem->probmem, scip->set, scip->stat, scip->lp, row) );
515 
516  return SCIP_OKAY;
517 }
518 
519 /** removes the LP row from a cut pool
520  *
521  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
522  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
523  *
524  * @pre This method can be called if @p scip is in one of the following stages:
525  * - \ref SCIP_STAGE_INITSOLVE
526  * - \ref SCIP_STAGE_SOLVING
527  * - \ref SCIP_STAGE_SOLVED
528  */
530  SCIP* scip, /**< SCIP data structure */
531  SCIP_CUTPOOL* cutpool, /**< cut pool */
532  SCIP_ROW* row /**< row to remove */
533  )
534 {
535  SCIP_CALL( SCIPcheckStage(scip, "SCIPdelRowCutpool", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE) );
536 
537  SCIP_CALL( SCIPcutpoolDelRow(cutpool, scip->mem->probmem, scip->set, scip->stat, scip->lp, row) );
538 
539  return SCIP_OKAY;
540 }
541 
542 /** separates cuts from a cut pool
543  *
544  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
545  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
546  *
547  * @pre This method can be called if @p scip is in one of the following stages:
548  * - \ref SCIP_STAGE_SOLVING
549  */
551  SCIP* scip, /**< SCIP data structure */
552  SCIP_CUTPOOL* cutpool, /**< cut pool */
553  SCIP_RESULT* result /**< pointer to store the result of the separation call */
554  )
555 {
556  SCIP_CALL( SCIPcheckStage(scip, "SCIPseparateCutpool", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
557 
558  assert(SCIPtreeGetCurrentNode(scip->tree) != NULL);
559 
560  if( !SCIPtreeHasCurrentNodeLP(scip->tree) )
561  {
562  SCIPerrorMessage("cannot add cuts, because node LP is not processed\n");
563  return SCIP_INVALIDCALL;
564  }
565 
566  SCIP_CALL( SCIPcutpoolSeparate(cutpool, scip->mem->probmem, scip->set, scip->stat, scip->eventqueue, scip->eventfilter,
567  scip->lp, scip->sepastore, NULL, FALSE, (SCIPtreeGetCurrentDepth(scip->tree) == 0), result) );
568 
569  return SCIP_OKAY;
570 }
571 
572 /** separates cuts w.r.t. given solution from a cut pool
573  *
574  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
575  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
576  *
577  * @pre This method can be called if @p scip is in one of the following stages:
578  * - \ref SCIP_STAGE_SOLVING
579  */
581  SCIP* scip, /**< SCIP data structure */
582  SCIP_CUTPOOL* cutpool, /**< cut pool */
583  SCIP_SOL* sol, /**< solution to be separated */
584  SCIP_RESULT* result /**< pointer to store the result of the separation call */
585  )
586 {
587  SCIP_CALL( SCIPcheckStage(scip, "SCIPseparateSolCutpool", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
588 
589  assert(SCIPtreeGetCurrentNode(scip->tree) != NULL);
590 
591  if( !SCIPtreeHasCurrentNodeLP(scip->tree) )
592  {
593  SCIPerrorMessage("cannot add cuts, because node LP is not processed\n");
594  return SCIP_INVALIDCALL;
595  }
596 
597  SCIP_CALL( SCIPcutpoolSeparate(cutpool, scip->mem->probmem, scip->set, scip->stat, scip->eventqueue, scip->eventfilter,
598  scip->lp, scip->sepastore, sol, FALSE, (SCIPtreeGetCurrentDepth(scip->tree) == 0), result) );
599 
600  return SCIP_OKAY;
601 }
602 
603 /** if not already existing, adds row to delayed global cut pool
604  *
605  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
606  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
607  *
608  * @pre This method can be called if @p scip is the stages \ref SCIP_STAGE_SOLVING
609  */
611  SCIP* scip, /**< SCIP data structure */
612  SCIP_ROW* row /**< cutting plane to add */
613  )
614 {
615  SCIP_CALL( SCIPcheckStage(scip, "SCIPaddDelayedPoolCut", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
616 
617  SCIP_CALL( SCIPcutpoolAddRow(scip->delayedcutpool, scip->mem->probmem, scip->set, scip->stat, scip->lp, row) );
618 
619  return SCIP_OKAY;
620 }
621 
622 /** removes the row from the delayed global cut pool
623  *
624  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
625  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
626  *
627  * @pre This method can be called if @p scip is the stages \ref SCIP_STAGE_SOLVING
628  */
630  SCIP* scip, /**< SCIP data structure */
631  SCIP_ROW* row /**< cutting plane to add */
632  )
633 {
634  SCIP_CALL( SCIPcheckStage(scip, "SCIPdelDelayedPoolCut", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
635 
636  SCIP_CALL( SCIPcutpoolDelRow(scip->delayedcutpool, scip->mem->probmem, scip->set, scip->stat, scip->lp, row) );
637 
638  return SCIP_OKAY;
639 }
640 
641 /** gets current cuts in the delayed global cut pool
642  *
643  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
644  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
645  *
646  * @pre This method can be called if @p scip is the stages \ref SCIP_STAGE_SOLVING
647  */
649  SCIP* scip /**< SCIP data structure */
650  )
651 {
652  SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetDelayedPoolCuts", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, FALSE, FALSE) );
653 
654  return SCIPcutpoolGetCuts(scip->delayedcutpool);
655 }
656 
657 /** gets current number of rows in the delayed global cut pool
658  *
659  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
660  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
661  *
662  * @pre This method can be called if @p scip is the stages \ref SCIP_STAGE_SOLVING
663  */
665  SCIP* scip /**< SCIP data structure */
666  )
667 {
668  SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetNDelayedPoolCuts", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, FALSE, FALSE) );
669 
670  return SCIPcutpoolGetNCuts(scip->delayedcutpool);
671 }
672 
673 /** gets the delayed global cut pool used by SCIP
674  *
675  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
676  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
677  *
678  * @pre This method can be called if @p scip is the stages \ref SCIP_STAGE_SOLVING
679  */
681  SCIP* scip /**< SCIP data structure */
682  )
683 {
684  SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetDelayedGlobalCutpool", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, FALSE, FALSE) );
685 
686  return scip->delayedcutpool;
687 }
688 
689 /** separates the given primal solution or the current LP solution by calling the separators and constraint handlers'
690  * separation methods;
691  * the generated cuts are stored in the separation storage and can be accessed with the methods SCIPgetCuts() and
692  * SCIPgetNCuts();
693  * after evaluating the cuts, you have to call SCIPclearCuts() in order to remove the cuts from the
694  * separation storage;
695  * it is possible to call SCIPseparateSol() multiple times with different solutions and evaluate the found cuts
696  * afterwards
697  *
698  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
699  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
700  *
701  * @pre This method can be called if @p scip is in one of the following stages:
702  * - \ref SCIP_STAGE_SOLVING
703  */
705  SCIP* scip, /**< SCIP data structure */
706  SCIP_SOL* sol, /**< primal solution that should be separated, or NULL for LP solution */
707  SCIP_Bool pretendroot, /**< should the cut separators be called as if we are at the root node? */
708  SCIP_Bool allowlocal, /**< should the separator be asked to separate local cuts */
709  SCIP_Bool onlydelayed, /**< should only separators be called that were delayed in the previous round? */
710  SCIP_Bool* delayed, /**< pointer to store whether a separator was delayed */
711  SCIP_Bool* cutoff /**< pointer to store whether the node can be cut off */
712  )
713 {
714  int actdepth;
715 
716  SCIP_CALL( SCIPcheckStage(scip, "SCIPseparateSol", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
717 
718  /* get current depth */
719  actdepth = (pretendroot ? 0 : SCIPtreeGetCurrentDepth(scip->tree));
720 
721  /* apply separation round */
722  SCIP_CALL( SCIPseparationRound(scip->mem->probmem, scip->set, scip->messagehdlr, scip->stat, scip->eventqueue,
723  scip->eventfilter, scip->transprob, scip->primal, scip->tree, scip->lp, scip->sepastore,
724  sol, actdepth, allowlocal, onlydelayed, delayed, cutoff) );
725 
726  return SCIP_OKAY;
727 }
728 
729 /** gets the array of cuts currently stored in the separation storage
730  *
731  * @return the array of cuts currently stored in the separation storage
732  *
733  * @pre This method can be called if @p scip is in one of the following stages:
734  * - \ref SCIP_STAGE_PRESOLVED
735  * - \ref SCIP_STAGE_SOLVING
736  * - \ref SCIP_STAGE_SOLVED
737  */
739  SCIP* scip /**< SCIP data structure */
740  )
741 {
743 
744  return SCIPsepastoreGetCuts(scip->sepastore);
745 }
746 
747 /** get current number of cuts in the separation storage
748  *
749  * @return the current number of cuts in the separation storage
750  *
751  * @pre This method can be called if @p scip is in one of the following stages:
752  * - \ref SCIP_STAGE_PRESOLVED
753  * - \ref SCIP_STAGE_SOLVING
754  * - \ref SCIP_STAGE_SOLVED
755  */
757  SCIP* scip /**< SCIP data structure */
758  )
759 {
761 
762  return SCIPsepastoreGetNCuts(scip->sepastore);
763 }
764 
765 /** clears the separation storage
766  *
767  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
768  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
769  *
770  * @pre This method can be called if @p scip is in one of the following stages:
771  * - \ref SCIP_STAGE_SOLVING
772  */
774  SCIP* scip /**< SCIP data structure */
775  )
776 {
777  SCIP_CALL( SCIPcheckStage(scip, "SCIPclearCuts", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
778 
779  SCIP_CALL( SCIPsepastoreClearCuts(scip->sepastore, scip->mem->probmem, scip->set, scip->eventqueue, scip->eventfilter, scip->lp) );
780 
781  return SCIP_OKAY;
782 }
783 
784 /** removes cuts that are inefficacious w.r.t. the current LP solution from separation storage without adding the cuts to the LP
785  *
786  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
787  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
788  *
789  * @pre This method can be called if @p scip is in one of the following stages:
790  * - \ref SCIP_STAGE_SOLVING
791  */
793  SCIP* scip /**< SCIP data structure */
794  )
795 {
796  SCIP_Bool isroot = FALSE;
797 
798  SCIP_CALL( SCIPcheckStage(scip, "SCIPremoveInefficaciousCuts", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
799 
800  if( SCIPtreeGetCurrentDepth(scip->tree) == 0 )
801  isroot = TRUE;
802 
804  scip->eventqueue, scip->eventfilter, scip->lp, isroot, SCIP_EFFICIACYCHOICE_LP) );
805 
806  return SCIP_OKAY;
807 }
enum SCIP_Result SCIP_RESULT
Definition: type_result.h:52
SCIP_STAT * stat
Definition: struct_scip.h:69
SCIP_Bool SCIPisConflictAnalysisApplicable(SCIP *scip)
#define NULL
Definition: def.h:253
SCIP_RETCODE SCIPseparationRound(BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, SCIP_STAT *stat, SCIP_EVENTQUEUE *eventqueue, SCIP_EVENTFILTER *eventfilter, SCIP_PROB *prob, SCIP_PRIMAL *primal, SCIP_TREE *tree, SCIP_LP *lp, SCIP_SEPASTORE *sepastore, SCIP_SOL *sol, int actdepth, SCIP_Bool allowlocal, SCIP_Bool onlydelayed, SCIP_Bool *delayed, SCIP_Bool *cutoff)
Definition: solve.c:1956
SCIP_RETCODE SCIPseparateSol(SCIP *scip, SCIP_SOL *sol, SCIP_Bool pretendroot, SCIP_Bool allowlocal, SCIP_Bool onlydelayed, SCIP_Bool *delayed, SCIP_Bool *cutoff)
Definition: scip_cut.c:704
internal methods for branch and bound tree
public methods for conflict handler plugins and conflict analysis
SCIP_ROW ** SCIPsepastoreGetCuts(SCIP_SEPASTORE *sepastore)
Definition: sepastore.c:1076
#define SQR(x)
Definition: def.h:205
int SCIProwGetNNonz(SCIP_ROW *row)
Definition: lp.c:16887
SCIP_EVENTQUEUE * eventqueue
Definition: struct_scip.h:78
SCIP_PRIMAL * primal
Definition: struct_scip.h:83
SCIP_CUTPOOL * delayedcutpool
Definition: struct_scip.h:95
SCIP_RETCODE SCIPinitConflictAnalysis(SCIP *scip, SCIP_CONFTYPE conftype, SCIP_Bool iscutoffinvolved)
#define FALSE
Definition: def.h:73
#define TRUE
Definition: def.h:72
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:53
SCIP_RETCODE SCIPaddNewRowCutpool(SCIP *scip, SCIP_CUTPOOL *cutpool, SCIP_ROW *row)
Definition: scip_cut.c:506
SCIP_Real SCIProwGetLPEfficacy(SCIP_ROW *row, SCIP_SET *set, SCIP_STAT *stat, SCIP_LP *lp)
Definition: lp.c:6715
int SCIPtreeGetCurrentDepth(SCIP_TREE *tree)
Definition: tree.c:8307
SCIP_RETCODE SCIPaddConflictLb(SCIP *scip, SCIP_VAR *var, SCIP_BDCHGIDX *bdchgidx)
SCIP_RETCODE SCIPcutpoolAddNewRow(SCIP_CUTPOOL *cutpool, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_LP *lp, SCIP_ROW *row)
Definition: cutpool.c:713
#define SCIP_UNUSED(x)
Definition: def.h:419
SCIP_RETCODE SCIPanalyzeConflict(SCIP *scip, int validdepth, SCIP_Bool *success)
int SCIPcutpoolGetNCuts(SCIP_CUTPOOL *cutpool)
Definition: cutpool.c:1050
SCIP_PROB * transprob
Definition: struct_scip.h:87
SCIP_RETCODE SCIPcutpoolFree(SCIP_CUTPOOL **cutpool, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_LP *lp)
Definition: cutpool.c:456
internal methods for LP management
SCIP_Bool SCIPisInfinity(SCIP *scip, SCIP_Real val)
SCIP_Real SCIPgetCutEfficacy(SCIP *scip, SCIP_SOL *sol, SCIP_ROW *cut)
Definition: scip_cut.c:64
public methods for numerical tolerances
SCIP_RETCODE SCIPremoveInefficaciousCuts(SCIP *scip)
Definition: scip_cut.c:792
public methods for the branch-and-bound tree
SCIP_Bool SCIPsetIsEfficacious(SCIP_SET *set, SCIP_Bool root, SCIP_Real efficacy)
Definition: set.c:6815
SCIP_Real * vals
Definition: struct_lp.h:220
SCIP_Bool SCIPsepastoreIsCutApplicable(SCIP_SET *set, SCIP_ROW *cut)
Definition: sepastore.c:1067
SCIP_CUTPOOL * SCIPgetDelayedGlobalCutpool(SCIP *scip)
Definition: scip_cut.c:680
SCIP_MEM * mem
Definition: struct_scip.h:61
SCIP_CUTPOOL * SCIPgetGlobalCutpool(SCIP *scip)
Definition: scip_cut.c:408
SCIP_RETCODE SCIPcutpoolDelRow(SCIP_CUTPOOL *cutpool, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_LP *lp, SCIP_ROW *row)
Definition: cutpool.c:782
SCIP_CUT ** SCIPgetPoolCuts(SCIP *scip)
Definition: scip_cut.c:372
internal methods for storing and manipulating the main problem
#define SCIPerrorMessage
Definition: pub_message.h:45
SCIP_EVENTFILTER * eventfilter
Definition: struct_scip.h:77
SCIP_COL ** cols
Definition: struct_lp.h:218
SCIP_RETCODE SCIPcreateCutpool(SCIP *scip, SCIP_CUTPOOL **cutpool, int agelimit)
Definition: scip_cut.c:432
SCIP_RETCODE SCIPcheckStage(SCIP *scip, const char *method, SCIP_Bool init, SCIP_Bool problem, SCIP_Bool transforming, SCIP_Bool transformed, SCIP_Bool initpresolve, SCIP_Bool presolving, SCIP_Bool exitpresolve, SCIP_Bool presolved, SCIP_Bool initsolve, SCIP_Bool solving, SCIP_Bool solved, SCIP_Bool exitsolve, SCIP_Bool freetrans, SCIP_Bool freescip)
Definition: debug.c:2010
SCIP_Real lhs
Definition: struct_lp.h:195
int SCIPsepastoreGetNCuts(SCIP_SEPASTORE *sepastore)
Definition: sepastore.c:1086
SCIP_Bool SCIPisZero(SCIP *scip, SCIP_Real val)
SCIP_RETCODE SCIPsepastoreRemoveInefficaciousCuts(SCIP_SEPASTORE *sepastore, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_EVENTQUEUE *eventqueue, SCIP_EVENTFILTER *eventfilter, SCIP_LP *lp, SCIP_Bool root, SCIP_EFFICIACYCHOICE efficiacychoice)
Definition: sepastore.c:1010
#define REALABS(x)
Definition: def.h:188
SCIP_RETCODE SCIPseparateCutpool(SCIP *scip, SCIP_CUTPOOL *cutpool, SCIP_RESULT *result)
Definition: scip_cut.c:550
SCIP_ROW ** SCIPgetCuts(SCIP *scip)
Definition: scip_cut.c:738
SCIP_CUT ** SCIPgetDelayedPoolCuts(SCIP *scip)
Definition: scip_cut.c:648
internal methods for global SCIP settings
#define SCIP_CALL(x)
Definition: def.h:365
SCIP main data structure.
SCIP_RETCODE SCIPaddCut(SCIP *scip, SCIP_SOL *sol, SCIP_ROW *cut, SCIP_Bool forcecut, SCIP_Bool *infeasible)
Definition: scip_cut.c:197
internal methods for storing separated cuts
SCIP_Bool SCIProwIsSolEfficacious(SCIP_ROW *row, SCIP_SET *set, SCIP_STAT *stat, SCIP_SOL *sol, SCIP_Bool root)
Definition: lp.c:6815
SCIP_CUTPOOL * cutpool
Definition: struct_scip.h:94
SCIP_RETCODE SCIPaddConflictUb(SCIP *scip, SCIP_VAR *var, SCIP_BDCHGIDX *bdchgidx)
SCIP_SEPASTORE * sepastore
Definition: struct_scip.h:91
int SCIPgetDepth(SCIP *scip)
Definition: scip_tree.c:637
#define SCIP_Bool
Definition: def.h:70
public methods for storing cuts in a cut pool
SCIP_Bool SCIPcutpoolIsCutNew(SCIP_CUTPOOL *cutpool, SCIP_SET *set, SCIP_ROW *row)
Definition: cutpool.c:580
SCIP_RETCODE SCIPdelRowCutpool(SCIP *scip, SCIP_CUTPOOL *cutpool, SCIP_ROW *row)
Definition: scip_cut.c:529
SCIP_CUT ** SCIPcutpoolGetCuts(SCIP_CUTPOOL *cutpool)
Definition: cutpool.c:1040
SCIP_Bool SCIPisCutApplicable(SCIP *scip, SCIP_ROW *cut)
Definition: scip_cut.c:177
SCIP_RETCODE SCIPclearCuts(SCIP *scip)
Definition: scip_cut.c:773
methods for debugging
public methods for LP management
SCIP_RETCODE SCIPaddRowCutpool(SCIP *scip, SCIP_CUTPOOL *cutpool, SCIP_ROW *row)
Definition: scip_cut.c:484
datastructures for block memory pools and memory buffers
public methods for cuts and aggregation rows
SCIP_Bool SCIPprobAllColsInLP(SCIP_PROB *prob, SCIP_SET *set, SCIP_LP *lp)
Definition: prob.c:2267
SCIP_RETCODE SCIPcutpoolCreate(SCIP_CUTPOOL **cutpool, BMS_BLKMEM *blkmem, SCIP_SET *set, int agelimit, SCIP_Bool globalcutpool)
Definition: cutpool.c:417
int SCIPgetNPoolCuts(SCIP *scip)
Definition: scip_cut.c:390
SCIP_Bool SCIPtreeHasCurrentNodeLP(SCIP_TREE *tree)
Definition: tree.c:8324
SCIP_Bool SCIPisCutEfficacious(SCIP *scip, SCIP_SOL *sol, SCIP_ROW *cut)
Definition: scip_cut.c:87
SCIP_Real SCIPgetVectorEfficacyNorm(SCIP *scip, SCIP_Real *vals, int nvals)
Definition: scip_cut.c:119
internal methods for storing cuts in a cut pool
char sepa_efficacynorm
Definition: struct_set.h:507
SCIP_Real SCIProwGetSolEfficacy(SCIP_ROW *row, SCIP_SET *set, SCIP_STAT *stat, SCIP_SOL *sol)
Definition: lp.c:6772
SCIP_VAR * SCIPcolGetVar(SCIP_COL *col)
Definition: lp.c:16736
SCIP_Real SCIProwGetMaxActivity(SCIP_ROW *row, SCIP_SET *set, SCIP_STAT *stat)
Definition: lp.c:6526
SCIP_Real rhs
Definition: struct_lp.h:196
#define SQRT(x)
Definition: def.h:206
SCIP_RETCODE SCIPdelDelayedPoolCut(SCIP *scip, SCIP_ROW *row)
Definition: scip_cut.c:629
SCIP_RETCODE SCIPaddRow(SCIP *scip, SCIP_ROW *row, SCIP_Bool forcecut, SCIP_Bool *infeasible)
Definition: scip_cut.c:220
#define MAX(x, y)
Definition: def.h:222
SCIP_Bool SCIProwIsLPEfficacious(SCIP_ROW *row, SCIP_SET *set, SCIP_STAT *stat, SCIP_LP *lp, SCIP_Bool root)
Definition: lp.c:6756
BMS_BLKMEM * probmem
Definition: struct_mem.h:40
SCIP_Real SCIProwGetMinActivity(SCIP_ROW *row, SCIP_SET *set, SCIP_STAT *stat)
Definition: lp.c:6505
internal methods for main solving loop and node processing
SCIP_NODE * SCIPtreeGetCurrentNode(SCIP_TREE *tree)
Definition: tree.c:8290
SCIP_SET * set
Definition: struct_scip.h:62
SCIP_RETCODE SCIPaddDelayedPoolCut(SCIP *scip, SCIP_ROW *row)
Definition: scip_cut.c:610
public methods for message output
data structures for LP management
SCIP_MESSAGEHDLR * messagehdlr
Definition: struct_scip.h:65
int SCIPgetNCuts(SCIP *scip)
Definition: scip_cut.c:756
#define SCIP_Real
Definition: def.h:164
SCIP_Bool SCIPisLT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisGT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_RETCODE SCIPcutpoolAddRow(SCIP_CUTPOOL *cutpool, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_LP *lp, SCIP_ROW *row)
Definition: cutpool.c:643
SCIP_RETCODE SCIPcutpoolSeparate(SCIP_CUTPOOL *cutpool, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_EVENTQUEUE *eventqueue, SCIP_EVENTFILTER *eventfilter, SCIP_LP *lp, SCIP_SEPASTORE *sepastore, SCIP_SOL *sol, SCIP_Bool cutpoolisdelayed, SCIP_Bool root, SCIP_RESULT *result)
Definition: cutpool.c:811
SCIP_TREE * tree
Definition: struct_scip.h:84
SCIP_RETCODE SCIPaddPoolCut(SCIP *scip, SCIP_ROW *row)
Definition: scip_cut.c:331
SCIP_RETCODE SCIPdelPoolCut(SCIP *scip, SCIP_ROW *row)
Definition: scip_cut.c:351
#define SCIP_CALL_ABORT(x)
Definition: def.h:344
SCIP_RETCODE SCIPsepastoreClearCuts(SCIP_SEPASTORE *sepastore, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_EVENTQUEUE *eventqueue, SCIP_EVENTFILTER *eventfilter, SCIP_LP *lp)
Definition: sepastore.c:964
SCIP_LP * lp
Definition: struct_scip.h:80
int SCIPgetNDelayedPoolCuts(SCIP *scip)
Definition: scip_cut.c:664
datastructures for global SCIP settings
SCIP_Bool SCIPisEfficacious(SCIP *scip, SCIP_Real efficacy)
Definition: scip_cut.c:105
SCIP_RETCODE SCIPsepastoreAddCut(SCIP_SEPASTORE *sepastore, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_EVENTQUEUE *eventqueue, SCIP_EVENTFILTER *eventfilter, SCIP_LP *lp, SCIP_ROW *cut, SCIP_Bool forcecut, SCIP_Bool root, SCIP_Bool *infeasible)
Definition: sepastore.c:400
SCIP_RETCODE SCIPfreeCutpool(SCIP *scip, SCIP_CUTPOOL **cutpool)
Definition: scip_cut.c:463
SCIP_RETCODE SCIPseparateSolCutpool(SCIP *scip, SCIP_CUTPOOL *cutpool, SCIP_SOL *sol, SCIP_RESULT *result)
Definition: scip_cut.c:580
SCIP_Bool SCIPisCutNew(SCIP *scip, SCIP_ROW *row)
Definition: scip_cut.c:313