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