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 <ctype.h>
36 #include <stdarg.h>
37 #include <assert.h>
38 #include <string.h>
39 #if defined(_WIN32) || defined(_WIN64)
40 #else
41 #include <strings.h> /*lint --e{766}*/
42 #endif
43 
44 
45 #include "lpi/lpi.h"
46 #include "nlpi/exprinterpret.h"
47 #include "nlpi/nlpi.h"
48 #include "scip/benders.h"
49 #include "scip/benderscut.h"
50 #include "scip/branch.h"
51 #include "scip/branch_nodereopt.h"
52 #include "scip/clock.h"
53 #include "scip/compr.h"
54 #include "scip/concsolver.h"
55 #include "scip/concurrent.h"
56 #include "scip/conflict.h"
57 #include "scip/conflictstore.h"
58 #include "scip/cons.h"
59 #include "scip/cons_linear.h"
60 #include "scip/cutpool.h"
61 #include "scip/cuts.h"
62 #include "scip/debug.h"
63 #include "scip/def.h"
64 #include "scip/dialog.h"
65 #include "scip/dialog_default.h"
66 #include "scip/disp.h"
67 #include "scip/event.h"
68 #include "scip/heur.h"
69 #include "scip/heur_ofins.h"
70 #include "scip/heur_reoptsols.h"
72 #include "scip/heuristics.h"
73 #include "scip/history.h"
74 #include "scip/implics.h"
75 #include "scip/interrupt.h"
76 #include "scip/lp.h"
77 #include "scip/mem.h"
78 #include "scip/message_default.h"
79 #include "scip/misc.h"
80 #include "scip/nlp.h"
81 #include "scip/nodesel.h"
82 #include "scip/paramset.h"
83 #include "scip/presol.h"
84 #include "scip/presolve.h"
85 #include "scip/pricer.h"
86 #include "scip/pricestore.h"
87 #include "scip/primal.h"
88 #include "scip/prob.h"
89 #include "scip/prop.h"
90 #include "scip/reader.h"
91 #include "scip/relax.h"
92 #include "scip/reopt.h"
93 #include "scip/retcode.h"
94 #include "scip/scipbuildflags.h"
95 #include "scip/scipcoreplugins.h"
96 #include "scip/scipgithash.h"
97 #include "scip/sepa.h"
98 #include "scip/sepastore.h"
99 #include "scip/set.h"
100 #include "scip/sol.h"
101 #include "scip/solve.h"
102 #include "scip/stat.h"
103 #include "scip/syncstore.h"
104 #include "scip/table.h"
105 #include "scip/tree.h"
106 #include "scip/var.h"
107 #include "scip/visual.h"
108 #include "xml/xml.h"
109 
110 #include "scip/scip_conflict.h"
111 #include "scip/scip_cut.h"
112 #include "scip/scip_numerics.h"
113 #include "scip/scip_tree.h"
114 
115 #include "scip/pub_cutpool.h"
116 #include "scip/pub_lp.h"
117 #include "scip/pub_message.h"
118 
119 
120 /* In debug mode, we include the SCIP's structure in scip.c, such that no one can access
121  * this structure except the interface methods in scip.c.
122  * In optimized mode, the structure is included in scip.h, because some of the methods
123  * are implemented as defines for performance reasons (e.g. the numerical comparisons)
124  */
125 #ifndef NDEBUG
126 #include "scip/struct_scip.h"
127 #endif
128 
129 /** returns efficacy of the cut with respect to the given primal solution or the current LP solution:
130  * e = -feasibility/norm
131  *
132  * @return the efficacy of the cut with respect to the given primal solution or the current LP solution:
133  * e = -feasibility/norm
134  *
135  * @pre This method can be called if @p scip is in one of the following stages:
136  * - \ref SCIP_STAGE_SOLVING
137  */
139  SCIP* scip, /**< SCIP data structure */
140  SCIP_SOL* sol, /**< primal CIP solution, or NULL for current LP solution */
141  SCIP_ROW* cut /**< separated cut */
142  )
143 {
144  SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetCutEfficacy", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
145 
146  if( sol == NULL )
147  return SCIProwGetLPEfficacy(cut, scip->set, scip->stat, scip->lp);
148  else
149  return SCIProwGetSolEfficacy(cut, scip->set, scip->stat, sol);
150 }
151 
152 /** returns whether the cut's efficacy with respect to the given primal solution or the current LP solution is greater
153  * than the minimal cut efficacy
154  *
155  * @return TRUE if the cut's efficacy with respect to the given primal solution or the current LP solution is greater
156  * than the minimal cut efficacy, otherwise FALSE
157  *
158  * @pre This method can be called if @p scip is in one of the following stages:
159  * - \ref SCIP_STAGE_SOLVING
160  */
162  SCIP* scip, /**< SCIP data structure */
163  SCIP_SOL* sol, /**< primal CIP solution, or NULL for current LP solution */
164  SCIP_ROW* cut /**< separated cut */
165  )
166 {
167  SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPisCutEfficacious", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
168 
169  if( sol == NULL )
170  return SCIProwIsLPEfficacious(cut, scip->set, scip->stat, scip->lp, (SCIPtreeGetCurrentDepth(scip->tree) == 0));
171  else
172  return SCIProwIsSolEfficacious(cut, scip->set, scip->stat, sol, (SCIPtreeGetCurrentDepth(scip->tree) == 0));
173 }
174 
175 /** checks, if the given cut's efficacy is larger than the minimal cut efficacy
176  *
177  * @return TRUE if the given cut's efficacy is larger than the minimal cut efficacy, otherwise FALSE
178  */
180  SCIP* scip, /**< SCIP data structure */
181  SCIP_Real efficacy /**< efficacy of the cut */
182  )
183 {
184  assert(scip != NULL);
185 
186  return SCIPsetIsEfficacious(scip->set, (SCIPtreeGetCurrentDepth(scip->tree) == 0), efficacy);
187 }
188 
189 /** calculates the efficacy norm of the given vector, which depends on the "separating/efficacynorm" parameter
190  *
191  * @return the efficacy norm of the given vector, which depends on the "separating/efficacynorm" parameter
192  */
194  SCIP* scip, /**< SCIP data structure */
195  SCIP_Real* vals, /**< array of values */
196  int nvals /**< number of values */
197  )
198 {
199  SCIP_Real norm;
200  int i;
201 
202  assert(scip != NULL);
203  assert(scip->set != NULL);
204 
205  norm = 0.0;
206  switch( scip->set->sepa_efficacynorm )
207  {
208  case 'e':
209  for( i = 0; i < nvals; ++i )
210  norm += SQR(vals[i]);
211  norm = SQRT(norm);
212  break;
213  case 'm':
214  for( i = 0; i < nvals; ++i )
215  {
216  SCIP_Real absval;
217 
218  absval = REALABS(vals[i]);
219  norm = MAX(norm, absval);
220  }
221  break;
222  case 's':
223  for( i = 0; i < nvals; ++i )
224  norm += REALABS(vals[i]);
225  break;
226  case 'd':
227  for( i = 0; i < nvals; ++i )
228  {
229  if( !SCIPisZero(scip, vals[i]) )
230  {
231  norm = 1.0;
232  break;
233  }
234  }
235  break;
236  default:
237  SCIPerrorMessage("invalid efficacy norm parameter '%c'\n", scip->set->sepa_efficacynorm);
238  assert(FALSE);
239  }
240 
241  return norm;
242 }
243 
244 /** indicates whether a cut is applicable, i.e., will modify the LP when applied
245  *
246  * @pre This method can be called if @p scip is in one of the following stages:
247  * - \ref SCIP_STAGE_SOLVING
248  *
249  * @return whether the cut is modifiable, not a bound change, or a bound change that changes bounds by at least epsilon
250  */
252  SCIP* scip, /**< SCIP data structure */
253  SCIP_ROW* cut /**< separated cut */
254  )
255 {
256  SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPisCutApplicable", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
257 
258  return SCIPsepastoreIsCutApplicable(scip->set, cut);
259 }
260 
261 /** adds cut to separation storage
262  *
263  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
264  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
265  *
266  * @pre This method can be called if @p scip is in one of the following stages:
267  * - \ref SCIP_STAGE_SOLVING
268  *
269  * @deprecated Please use SCIPaddRow() instead, or, if the row is a global cut, add it only to the global cutpool.
270  */
272  SCIP* scip, /**< SCIP data structure */
273  SCIP_SOL* sol, /**< primal solution that was separated, or NULL for LP solution */
274  SCIP_ROW* cut, /**< separated cut */
275  SCIP_Bool forcecut, /**< should the cut be forced to enter the LP? */
276  SCIP_Bool* infeasible /**< pointer to store whether cut has been detected to be infeasible for local bounds */
277  )
278 {
280 
281  SCIP_UNUSED(sol);
282 
283  return SCIPaddRow(scip, cut, forcecut, infeasible);
284 }
285 
286 /** adds row to separation storage
287  *
288  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
289  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
290  *
291  * @pre This method can be called if @p scip is in one of the following stages:
292  * - \ref SCIP_STAGE_SOLVING
293  */
295  SCIP* scip, /**< SCIP data structure */
296  SCIP_ROW* row, /**< row */
297  SCIP_Bool forcecut, /**< should the row be forced to enter the LP? */
298  SCIP_Bool* infeasible /**< pointer to store whether row has been detected to be infeasible for local bounds */
299  )
300 {
302 
303  assert(SCIPtreeGetCurrentNode(scip->tree) != NULL);
304 
305  SCIP_CALL( SCIPsepastoreAddCut(scip->sepastore, scip->mem->probmem, scip->set, scip->stat, scip->eventqueue,
306  scip->eventfilter, scip->lp, row, forcecut, (SCIPtreeGetCurrentDepth(scip->tree) == 0), infeasible) );
307 
308  /* possibly run conflict analysis */
309  if ( *infeasible && SCIPprobAllColsInLP(scip->transprob, scip->set, scip->lp) && SCIPisConflictAnalysisApplicable(scip) )
310  {
311  SCIP_Real act;
312  SCIP_VAR* var;
313  SCIP_Real val;
314  int ncols;
315  int j;
316 
317  /* initialize conflict analysis */
319 
320  if ( ! SCIPisInfinity(scip, -row->lhs) )
321  {
322  act = SCIProwGetMaxActivity(row, scip->set, scip->stat);
323  if ( SCIPisLT(scip, act, row->lhs) )
324  {
325  ncols = SCIProwGetNNonz(row);
326  for (j = 0; j < ncols; ++j)
327  {
328  val = row->vals[j];
329  if ( ! SCIPisZero(scip, val) )
330  {
331  var = SCIPcolGetVar(row->cols[j]);
332  assert( var != NULL );
333 
334  if ( val > 0.0 )
335  {
336  SCIP_CALL( SCIPaddConflictUb(scip, var, NULL) );
337  }
338  else
339  {
340  SCIP_CALL( SCIPaddConflictLb(scip, var, NULL) );
341  }
342  }
343  }
344  }
345  }
346  else if ( ! SCIPisInfinity(scip, row->rhs) )
347  {
348  act = SCIProwGetMinActivity(row, scip->set, scip->stat);
349  if ( SCIPisGT(scip, act, row->rhs) )
350  {
351  ncols = SCIProwGetNNonz(row);
352  for (j = 0; j < ncols; ++j)
353  {
354  val = row->vals[j];
355  if ( ! SCIPisZero(scip, val) )
356  {
357  var = SCIPcolGetVar(row->cols[j]);
358  assert( var != NULL );
359 
360  if ( val > 0.0 )
361  {
362  SCIP_CALL( SCIPaddConflictLb(scip, var, NULL) );
363  }
364  else
365  {
366  SCIP_CALL( SCIPaddConflictUb(scip, var, NULL) );
367  }
368  }
369  }
370  }
371  }
372 
373  /* analyze the conflict */
375  }
376 
377  return SCIP_OKAY;
378 }
379 
380 /** checks if cut is already existing in global cutpool
381  *
382  * @return TRUE is returned if the cut is not already existing in the global cutpool, FALSE otherwise
383  *
384  * @pre This method can be called if @p scip is in one of the following stages:
385  * - \ref SCIP_STAGE_SOLVING
386  */
388  SCIP* scip, /**< SCIP data structure */
389  SCIP_ROW* row /**< cutting plane to add */
390  )
391 {
393 
394  return SCIPcutpoolIsCutNew(scip->cutpool, scip->set, row);
395 }
396 
397 /** if not already existing, adds row to global cut pool
398  *
399  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
400  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
401  *
402  * @pre This method can be called if @p scip is in one of the following stages:
403  * - \ref SCIP_STAGE_SOLVING
404  */
406  SCIP* scip, /**< SCIP data structure */
407  SCIP_ROW* row /**< row to remove */
408  )
409 {
410  SCIP_CALL( SCIPcheckStage(scip, "SCIPaddPoolCut", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
411 
412  SCIP_CALL( SCIPcutpoolAddRow(scip->cutpool, scip->mem->probmem, scip->set, scip->stat, scip->lp, row) );
413 
414  return SCIP_OKAY;
415 }
416 
417 /** removes the row from the global 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_SOLVING
424  */
426  SCIP* scip, /**< SCIP data structure */
427  SCIP_ROW* row /**< cutting plane to add */
428  )
429 {
430  SCIP_CALL( SCIPcheckStage(scip, "SCIPdelPoolCut", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
431 
432  SCIP_CALL( SCIPcutpoolDelRow(scip->cutpool, scip->mem->probmem, scip->set, scip->stat, scip->lp, row) );
433 
434  return SCIP_OKAY;
435 }
436 
437 /** gets current cuts in the global cut pool
438  *
439  * @return the current cuts in the global cut pool
440  *
441  * @pre This method can be called if @p scip is in one of the following stages:
442  * - \ref SCIP_STAGE_SOLVING
443  * - \ref SCIP_STAGE_SOLVED
444  * - \ref SCIP_STAGE_EXITSOLVE
445  */
447  SCIP* scip /**< SCIP data structure */
448  )
449 {
450  SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetPoolCuts", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, FALSE, FALSE) );
451 
452  return SCIPcutpoolGetCuts(scip->cutpool);
453 }
454 
455 /** gets current number of rows in the global cut pool
456  *
457  * @return the current number of rows in the global cut pool
458  *
459  * @pre This method can be called if @p scip is in one of the following stages:
460  * - \ref SCIP_STAGE_SOLVING
461  * - \ref SCIP_STAGE_SOLVED
462  * - \ref SCIP_STAGE_EXITSOLVE
463  */
465  SCIP* scip /**< SCIP data structure */
466  )
467 {
468  SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetNPoolCuts", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, FALSE, FALSE) );
469 
470  return SCIPcutpoolGetNCuts(scip->cutpool);
471 }
472 
473 /** gets the global cut pool used by SCIP
474  *
475  * @return the global cut pool used by SCIP
476  *
477  * @pre This method can be called if @p scip is in one of the following stages:
478  * - \ref SCIP_STAGE_SOLVING
479  * - \ref SCIP_STAGE_SOLVED
480  * - \ref SCIP_STAGE_EXITSOLVE
481  */
483  SCIP* scip /**< SCIP data structure */
484  )
485 {
486  SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetGlobalCutpool", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, FALSE, FALSE) );
487 
488  return scip->cutpool;
489 }
490 
491 /** creates a cut pool
492  *
493  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
494  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
495  *
496  * @pre This method can be called if @p scip is in one of the following stages:
497  * - \ref SCIP_STAGE_TRANSFORMING
498  * - \ref SCIP_STAGE_TRANSFORMED
499  * - \ref SCIP_STAGE_INITPRESOLVE
500  * - \ref SCIP_STAGE_PRESOLVING
501  * - \ref SCIP_STAGE_EXITPRESOLVE
502  * - \ref SCIP_STAGE_PRESOLVED
503  * - \ref SCIP_STAGE_INITSOLVE
504  * - \ref SCIP_STAGE_SOLVING
505  */
507  SCIP* scip, /**< SCIP data structure */
508  SCIP_CUTPOOL** cutpool, /**< pointer to store cut pool */
509  int agelimit /**< maximum age a cut can reach before it is deleted from the pool */
510  )
511 {
512  SCIP_CALL( SCIPcheckStage(scip, "SCIPcreateCutpool", FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE) );
513 
514  SCIP_CALL( SCIPcutpoolCreate(cutpool, scip->mem->probmem, scip->set, agelimit, FALSE) );
515 
516  return SCIP_OKAY;
517 }
518 
519 /** frees 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_TRANSFORMING
526  * - \ref SCIP_STAGE_TRANSFORMED
527  * - \ref SCIP_STAGE_INITPRESOLVE
528  * - \ref SCIP_STAGE_PRESOLVING
529  * - \ref SCIP_STAGE_EXITPRESOLVE
530  * - \ref SCIP_STAGE_PRESOLVED
531  * - \ref SCIP_STAGE_INITSOLVE
532  * - \ref SCIP_STAGE_SOLVING
533  * - \ref SCIP_STAGE_SOLVED
534  * - \ref SCIP_STAGE_EXITSOLVE
535  * - \ref SCIP_STAGE_FREETRANS
536  */
538  SCIP* scip, /**< SCIP data structure */
539  SCIP_CUTPOOL** cutpool /**< pointer to store cut pool */
540  )
541 {
542  SCIP_CALL( SCIPcheckStage(scip, "SCIPfreeCutpool", FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE) );
543 
544  SCIP_CALL( SCIPcutpoolFree(cutpool, scip->mem->probmem, scip->set, scip->lp) );
545 
546  return SCIP_OKAY;
547 }
548 
549 /** if not already existing, adds row to a cut pool and captures it
550  *
551  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
552  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
553  *
554  * @pre This method can be called if @p scip is in one of the following stages:
555  * - \ref SCIP_STAGE_INITSOLVE
556  * - \ref SCIP_STAGE_SOLVING
557  */
559  SCIP* scip, /**< SCIP data structure */
560  SCIP_CUTPOOL* cutpool, /**< cut pool */
561  SCIP_ROW* row /**< cutting plane to add */
562  )
563 {
564  SCIP_CALL( SCIPcheckStage(scip, "SCIPaddRowCutpool", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE) );
565 
566  SCIP_CALL( SCIPcutpoolAddRow(cutpool, scip->mem->probmem, scip->set, scip->stat, scip->lp, row) );
567 
568  return SCIP_OKAY;
569 }
570 
571 /** adds row to a cut pool and captures it; doesn't check for multiple cuts
572  *
573  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
574  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
575  *
576  * @pre This method can be called if @p scip is in one of the following stages:
577  * - \ref SCIP_STAGE_INITSOLVE
578  * - \ref SCIP_STAGE_SOLVING
579  */
581  SCIP* scip, /**< SCIP data structure */
582  SCIP_CUTPOOL* cutpool, /**< cut pool */
583  SCIP_ROW* row /**< cutting plane to add */
584  )
585 {
586  SCIP_CALL( SCIPcheckStage(scip, "SCIPaddNewRowCutpool", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE) );
587 
588  SCIP_CALL( SCIPcutpoolAddNewRow(cutpool, scip->mem->probmem, scip->set, scip->stat, scip->lp, row) );
589 
590  return SCIP_OKAY;
591 }
592 
593 /** removes the LP row 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_INITSOLVE
600  * - \ref SCIP_STAGE_SOLVING
601  * - \ref SCIP_STAGE_SOLVED
602  */
604  SCIP* scip, /**< SCIP data structure */
605  SCIP_CUTPOOL* cutpool, /**< cut pool */
606  SCIP_ROW* row /**< row to remove */
607  )
608 {
609  SCIP_CALL( SCIPcheckStage(scip, "SCIPdelRowCutpool", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE) );
610 
611  SCIP_CALL( SCIPcutpoolDelRow(cutpool, scip->mem->probmem, scip->set, scip->stat, scip->lp, row) );
612 
613  return SCIP_OKAY;
614 }
615 
616 /** separates cuts from a cut pool
617  *
618  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
619  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
620  *
621  * @pre This method can be called if @p scip is in one of the following stages:
622  * - \ref SCIP_STAGE_SOLVING
623  */
625  SCIP* scip, /**< SCIP data structure */
626  SCIP_CUTPOOL* cutpool, /**< cut pool */
627  SCIP_RESULT* result /**< pointer to store the result of the separation call */
628  )
629 {
630  SCIP_CALL( SCIPcheckStage(scip, "SCIPseparateCutpool", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
631 
632  assert(SCIPtreeGetCurrentNode(scip->tree) != NULL);
633 
634  if( !SCIPtreeHasCurrentNodeLP(scip->tree) )
635  {
636  SCIPerrorMessage("cannot add cuts, because node LP is not processed\n");
637  return SCIP_INVALIDCALL;
638  }
639 
640  SCIP_CALL( SCIPcutpoolSeparate(cutpool, scip->mem->probmem, scip->set, scip->stat, scip->eventqueue, scip->eventfilter,
641  scip->lp, scip->sepastore, NULL, FALSE, (SCIPtreeGetCurrentDepth(scip->tree) == 0), result) );
642 
643  return SCIP_OKAY;
644 }
645 
646 /** separates cuts w.r.t. given solution from a cut pool
647  *
648  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
649  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
650  *
651  * @pre This method can be called if @p scip is in one of the following stages:
652  * - \ref SCIP_STAGE_SOLVING
653  */
655  SCIP* scip, /**< SCIP data structure */
656  SCIP_CUTPOOL* cutpool, /**< cut pool */
657  SCIP_SOL* sol, /**< solution to be separated */
658  SCIP_RESULT* result /**< pointer to store the result of the separation call */
659  )
660 {
661  SCIP_CALL( SCIPcheckStage(scip, "SCIPseparateSolCutpool", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
662 
663  assert(SCIPtreeGetCurrentNode(scip->tree) != NULL);
664 
665  if( !SCIPtreeHasCurrentNodeLP(scip->tree) )
666  {
667  SCIPerrorMessage("cannot add cuts, because node LP is not processed\n");
668  return SCIP_INVALIDCALL;
669  }
670 
671  SCIP_CALL( SCIPcutpoolSeparate(cutpool, scip->mem->probmem, scip->set, scip->stat, scip->eventqueue, scip->eventfilter,
672  scip->lp, scip->sepastore, sol, FALSE, (SCIPtreeGetCurrentDepth(scip->tree) == 0), result) );
673 
674  return SCIP_OKAY;
675 }
676 
677 /** if not already existing, adds row to delayed global cut pool
678  *
679  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
680  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
681  *
682  * @pre This method can be called if @p scip is the stages \ref SCIP_STAGE_SOLVING
683  */
685  SCIP* scip, /**< SCIP data structure */
686  SCIP_ROW* row /**< cutting plane to add */
687  )
688 {
689  SCIP_CALL( SCIPcheckStage(scip, "SCIPaddDelayedPoolCut", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
690 
691  SCIP_CALL( SCIPcutpoolAddRow(scip->delayedcutpool, scip->mem->probmem, scip->set, scip->stat, scip->lp, row) );
692 
693  return SCIP_OKAY;
694 }
695 
696 /** removes the row from the delayed global cut pool
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 the stages \ref SCIP_STAGE_SOLVING
702  */
704  SCIP* scip, /**< SCIP data structure */
705  SCIP_ROW* row /**< cutting plane to add */
706  )
707 {
708  SCIP_CALL( SCIPcheckStage(scip, "SCIPdelDelayedPoolCut", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
709 
710  SCIP_CALL( SCIPcutpoolDelRow(scip->delayedcutpool, scip->mem->probmem, scip->set, scip->stat, scip->lp, row) );
711 
712  return SCIP_OKAY;
713 }
714 
715 /** gets current cuts in the delayed global cut pool
716  *
717  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
718  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
719  *
720  * @pre This method can be called if @p scip is the stages \ref SCIP_STAGE_SOLVING
721  */
723  SCIP* scip /**< SCIP data structure */
724  )
725 {
726  SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetDelayedPoolCuts", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, FALSE, FALSE) );
727 
728  return SCIPcutpoolGetCuts(scip->delayedcutpool);
729 }
730 
731 /** gets current number of rows in the delayed global cut pool
732  *
733  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
734  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
735  *
736  * @pre This method can be called if @p scip is the stages \ref SCIP_STAGE_SOLVING
737  */
739  SCIP* scip /**< SCIP data structure */
740  )
741 {
742  SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetNDelayedPoolCuts", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, FALSE, FALSE) );
743 
744  return SCIPcutpoolGetNCuts(scip->delayedcutpool);
745 }
746 
747 /** gets the delayed global cut pool used by SCIP
748  *
749  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
750  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
751  *
752  * @pre This method can be called if @p scip is the stages \ref SCIP_STAGE_SOLVING
753  */
755  SCIP* scip /**< SCIP data structure */
756  )
757 {
758  SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetDelayedGlobalCutpool", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, FALSE, FALSE) );
759 
760  return scip->delayedcutpool;
761 }
762 
763 /** separates the given primal solution or the current LP solution by calling the separators and constraint handlers'
764  * separation methods;
765  * the generated cuts are stored in the separation storage and can be accessed with the methods SCIPgetCuts() and
766  * SCIPgetNCuts();
767  * after evaluating the cuts, you have to call SCIPclearCuts() in order to remove the cuts from the
768  * separation storage;
769  * it is possible to call SCIPseparateSol() multiple times with different solutions and evaluate the found cuts
770  * afterwards
771  *
772  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
773  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
774  *
775  * @pre This method can be called if @p scip is in one of the following stages:
776  * - \ref SCIP_STAGE_SOLVING
777  */
779  SCIP* scip, /**< SCIP data structure */
780  SCIP_SOL* sol, /**< primal solution that should be separated, or NULL for LP solution */
781  SCIP_Bool pretendroot, /**< should the cut separators be called as if we are at the root node? */
782  SCIP_Bool allowlocal, /**< should the separator be asked to separate local cuts */
783  SCIP_Bool onlydelayed, /**< should only separators be called that were delayed in the previous round? */
784  SCIP_Bool* delayed, /**< pointer to store whether a separator was delayed */
785  SCIP_Bool* cutoff /**< pointer to store whether the node can be cut off */
786  )
787 {
788  int actdepth;
789 
790  SCIP_CALL( SCIPcheckStage(scip, "SCIPseparateSol", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
791 
792  /* get current depth */
793  actdepth = (pretendroot ? 0 : SCIPtreeGetCurrentDepth(scip->tree));
794 
795  /* apply separation round */
796  SCIP_CALL( SCIPseparationRound(scip->mem->probmem, scip->set, scip->messagehdlr, scip->stat, scip->eventqueue,
797  scip->eventfilter, scip->transprob, scip->primal, scip->tree, scip->lp, scip->sepastore,
798  sol, actdepth, allowlocal, onlydelayed, delayed, cutoff) );
799 
800  return SCIP_OKAY;
801 }
802 
803 /** gets the array of cuts currently stored in the separation storage
804  *
805  * @return the array of cuts currently stored in the separation storage
806  *
807  * @pre This method can be called if @p scip is in one of the following stages:
808  * - \ref SCIP_STAGE_PRESOLVED
809  * - \ref SCIP_STAGE_SOLVING
810  * - \ref SCIP_STAGE_SOLVED
811  */
813  SCIP* scip /**< SCIP data structure */
814  )
815 {
817 
818  return SCIPsepastoreGetCuts(scip->sepastore);
819 }
820 
821 /** get current number of cuts in the separation storage
822  *
823  * @return the current number of cuts in the separation storage
824  *
825  * @pre This method can be called if @p scip is in one of the following stages:
826  * - \ref SCIP_STAGE_PRESOLVED
827  * - \ref SCIP_STAGE_SOLVING
828  * - \ref SCIP_STAGE_SOLVED
829  */
831  SCIP* scip /**< SCIP data structure */
832  )
833 {
835 
836  return SCIPsepastoreGetNCuts(scip->sepastore);
837 }
838 
839 /** clears the separation storage
840  *
841  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
842  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
843  *
844  * @pre This method can be called if @p scip is in one of the following stages:
845  * - \ref SCIP_STAGE_SOLVING
846  */
848  SCIP* scip /**< SCIP data structure */
849  )
850 {
851  SCIP_CALL( SCIPcheckStage(scip, "SCIPclearCuts", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
852 
853  SCIP_CALL( SCIPsepastoreClearCuts(scip->sepastore, scip->mem->probmem, scip->set, scip->eventqueue, scip->eventfilter, scip->lp) );
854 
855  return SCIP_OKAY;
856 }
857 
858 /** removes cuts that are inefficacious w.r.t. the current LP solution from separation storage without adding the cuts to the LP
859  *
860  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
861  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
862  *
863  * @pre This method can be called if @p scip is in one of the following stages:
864  * - \ref SCIP_STAGE_SOLVING
865  */
867  SCIP* scip /**< SCIP data structure */
868  )
869 {
870  SCIP_Bool isroot = FALSE;
871 
872  SCIP_CALL( SCIPcheckStage(scip, "SCIPremoveInefficaciousCuts", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
873 
874  if( SCIPtreeGetCurrentDepth(scip->tree) == 0 )
875  isroot = TRUE;
876 
878  scip->eventqueue, scip->eventfilter, scip->lp, isroot, SCIP_EFFICIACYCHOICE_LP) );
879 
880  return SCIP_OKAY;
881 }
enum SCIP_Result SCIP_RESULT
Definition: type_result.h:52
internal methods for separators
SCIP_STAT * stat
Definition: struct_scip.h:69
SCIP_RETCODE SCIPclearCuts(SCIP *scip)
Definition: scip_cut.c:847
#define NULL
Definition: def.h:246
internal methods for managing events
default message handler
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:1955
trivialnegation primal heuristic
int SCIPgetNDelayedPoolCuts(SCIP *scip)
Definition: scip_cut.c:738
internal methods for storing primal CIP solutions
methods to interpret (evaluate) an expression tree "fast"
internal methods for branch and bound tree
methods for implications, variable bounds, and cliques
public methods for conflict handler plugins and conflict analysis
internal methods for clocks and timing issues
SCIP_ROW ** SCIPsepastoreGetCuts(SCIP_SEPASTORE *sepastore)
Definition: sepastore.c:1075
int SCIProwGetNNonz(SCIP_ROW *row)
Definition: lp.c:16880
#define SQR(x)
Definition: def.h:198
SCIP_CUT ** SCIPgetDelayedPoolCuts(SCIP *scip)
Definition: scip_cut.c:722
SCIP_EVENTQUEUE * eventqueue
Definition: struct_scip.h:78
internal methods for NLPI solver interfaces
SCIP_PRIMAL * primal
Definition: struct_scip.h:83
SCIP_CUTPOOL * delayedcutpool
Definition: struct_scip.h:95
SCIP_RETCODE SCIPaddNewRowCutpool(SCIP *scip, SCIP_CUTPOOL *cutpool, SCIP_ROW *row)
Definition: scip_cut.c:580
interface methods for specific LP solvers
internal methods for displaying statistics tables
SCIP_RETCODE SCIPaddDelayedPoolCut(SCIP *scip, SCIP_ROW *row)
Definition: scip_cut.c:684
#define FALSE
Definition: def.h:72
methods for the aggregation rows
internal methods for Benders&#39; decomposition
SCIP_RETCODE SCIPdelPoolCut(SCIP *scip, SCIP_ROW *row)
Definition: scip_cut.c:425
#define TRUE
Definition: def.h:71
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:53
SCIP_RETCODE SCIPaddConflictUb(SCIP *scip, SCIP_VAR *var, SCIP_BDCHGIDX *bdchgidx)
methods commonly used by primal heuristics
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
internal methods for branching rules and branching candidate storage
SCIP_RETCODE SCIPcutpoolAddNewRow(SCIP_CUTPOOL *cutpool, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_LP *lp, SCIP_ROW *row)
Definition: cutpool.c:716
#define SCIP_UNUSED(x)
Definition: def.h:412
SCIP_Real SCIPgetVectorEfficacyNorm(SCIP *scip, SCIP_Real *vals, int nvals)
Definition: scip_cut.c:193
datastructures for concurrent solvers
SCIP_RETCODE SCIPinitConflictAnalysis(SCIP *scip, SCIP_CONFTYPE conftype, SCIP_Bool iscutoffinvolved)
internal methods for handling parameter settings
SCIP_PROB * transprob
Definition: struct_scip.h:87
methods for creating output for visualization tools (VBC, BAK)
nodereopt branching rule
SCIP_RETCODE SCIPcutpoolFree(SCIP_CUTPOOL **cutpool, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_LP *lp)
Definition: cutpool.c:456
SCIP_CUT ** SCIPgetPoolCuts(SCIP *scip)
Definition: scip_cut.c:446
internal methods for LP management
SCIP_RETCODE SCIPaddConflictLb(SCIP *scip, SCIP_VAR *var, SCIP_BDCHGIDX *bdchgidx)
internal methods for branching and inference history
public methods for numerical tolerances
internal methods for collecting primal CIP solutions and primal informations
internal methods for propagators
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:6823
SCIP_Real * vals
Definition: struct_lp.h:220
SCIP_Bool SCIPsepastoreIsCutApplicable(SCIP_SET *set, SCIP_ROW *cut)
Definition: sepastore.c:1066
SCIP_MEM * mem
Definition: struct_scip.h:61
SCIP_Bool SCIPisCutEfficacious(SCIP *scip, SCIP_SOL *sol, SCIP_ROW *cut)
Definition: scip_cut.c:161
SCIP_RETCODE SCIPdelRowCutpool(SCIP *scip, SCIP_CUTPOOL *cutpool, SCIP_ROW *row)
Definition: scip_cut.c:603
SCIP_RETCODE SCIPcutpoolDelRow(SCIP_CUTPOOL *cutpool, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_LP *lp, SCIP_ROW *row)
Definition: cutpool.c:785
SCIP_RETCODE SCIPcreateCutpool(SCIP *scip, SCIP_CUTPOOL **cutpool, int agelimit)
Definition: scip_cut.c:506
git hash methods
SCIP_RETCODE SCIPfreeCutpool(SCIP *scip, SCIP_CUTPOOL **cutpool)
Definition: scip_cut.c:537
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_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:624
methods for block memory pools and memory buffers
SCIP_COL ** cols
Definition: struct_lp.h:218
register additional core functionality that is designed as plugins
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_Bool SCIPisEfficacious(SCIP *scip, SCIP_Real efficacy)
Definition: scip_cut.c:179
internal methods for presolvers
SCIP_Real lhs
Definition: struct_lp.h:195
int SCIPsepastoreGetNCuts(SCIP_SEPASTORE *sepastore)
Definition: sepastore.c:1085
SCIP_RETCODE SCIPaddCut(SCIP *scip, SCIP_SOL *sol, SCIP_ROW *cut, SCIP_Bool forcecut, SCIP_Bool *infeasible)
Definition: scip_cut.c:271
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:1009
internal methods for NLP management
internal miscellaneous methods
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:778
#define REALABS(x)
Definition: def.h:181
internal methods for node selectors and node priority queues
internal methods for variable pricers
SCIP_CUTPOOL * SCIPgetDelayedGlobalCutpool(SCIP *scip)
Definition: scip_cut.c:754
internal methods for global SCIP settings
internal methods for storing conflicts
#define SCIP_CALL(x)
Definition: def.h:358
SCIP main data structure.
SCIP_RETCODE SCIPremoveInefficaciousCuts(SCIP *scip)
Definition: scip_cut.c:866
SCIP_CUT ** SCIPcutpoolGetCuts(SCIP_CUTPOOL *cutpool)
Definition: cutpool.c:1043
internal methods for storing priced variables
internal methods for relaxators
int SCIPcutpoolGetNCuts(SCIP_CUTPOOL *cutpool)
Definition: cutpool.c:1053
SCIP_RETCODE SCIPaddRow(SCIP *scip, SCIP_ROW *row, SCIP_Bool forcecut, SCIP_Bool *infeasible)
Definition: scip_cut.c:294
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
methods commonly used for presolving
SCIP_CUTPOOL * cutpool
Definition: struct_scip.h:94
methods for catching the user CTRL-C interrupt
internal methods for problem variables
data structures and methods for collecting reoptimization information
the function declarations for the synchronization store
SCIP_SEPASTORE * sepastore
Definition: struct_scip.h:91
internal methods for user interface dialog
#define SCIP_Bool
Definition: def.h:69
public methods for storing cuts in a cut pool
SCIP_Bool SCIPcutpoolIsCutNew(SCIP_CUTPOOL *cutpool, SCIP_SET *set, SCIP_ROW *row)
Definition: cutpool.c:583
int SCIPgetDepth(SCIP *scip)
Definition: scip_tree.c:715
internal methods for input file readers
SCIP_RETCODE SCIPaddPoolCut(SCIP *scip, SCIP_ROW *row)
Definition: scip_cut.c:405
methods for debugging
public methods for LP management
SCIP_Real SCIPgetCutEfficacy(SCIP *scip, SCIP_SOL *sol, SCIP_ROW *cut)
Definition: scip_cut.c:138
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
SCIP_Bool SCIPtreeHasCurrentNodeLP(SCIP_TREE *tree)
Definition: tree.c:8324
reoptsols primal heuristic
internal methods for storing cuts in a cut pool
char sepa_efficacynorm
Definition: struct_set.h:507
Constraint handler for linear constraints in their most general form, .
SCIP_Bool SCIPisCutApplicable(SCIP *scip, SCIP_ROW *cut)
Definition: scip_cut.c:251
SCIP_Real SCIProwGetSolEfficacy(SCIP_ROW *row, SCIP_SET *set, SCIP_STAT *stat, SCIP_SOL *sol)
Definition: lp.c:6772
SCIP_Bool SCIPisInfinity(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisCutNew(SCIP *scip, SCIP_ROW *row)
Definition: scip_cut.c:387
helper functions for concurrent scip solvers
SCIP_Real SCIProwGetMaxActivity(SCIP_ROW *row, SCIP_SET *set, SCIP_STAT *stat)
Definition: lp.c:6526
SCIP_Real rhs
Definition: struct_lp.h:196
SCIP_RETCODE SCIPdelDelayedPoolCut(SCIP *scip, SCIP_ROW *row)
Definition: scip_cut.c:703
internal methods for return codes for SCIP methods
SCIP_RETCODE SCIPaddRowCutpool(SCIP *scip, SCIP_CUTPOOL *cutpool, SCIP_ROW *row)
Definition: scip_cut.c:558
#define SQRT(x)
Definition: def.h:199
#define MAX(x, y)
Definition: def.h:215
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_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:6505
SCIP_VAR * SCIPcolGetVar(SCIP_COL *col)
Definition: lp.c:16729
internal methods for conflict analysis
internal methods for tree compressions
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
int SCIPgetNCuts(SCIP *scip)
Definition: scip_cut.c:830
public methods for message output
SCIP_MESSAGEHDLR * messagehdlr
Definition: struct_scip.h:65
default user interface dialog
#define SCIP_Real
Definition: def.h:157
internal methods for problem statistics
int SCIPgetNPoolCuts(SCIP *scip)
Definition: scip_cut.c:464
internal methods for constraints and constraint handlers
SCIP_RETCODE SCIPcutpoolAddRow(SCIP_CUTPOOL *cutpool, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_LP *lp, SCIP_ROW *row)
Definition: cutpool.c:646
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:814
SCIP_TREE * tree
Definition: struct_scip.h:84
declarations for XML parsing
build flags methods
SCIP_Bool SCIPisZero(SCIP *scip, SCIP_Real val)
common defines and data types used in all packages of SCIP
SCIP_CUTPOOL * SCIPgetGlobalCutpool(SCIP *scip)
Definition: scip_cut.c:482
#define SCIP_CALL_ABORT(x)
Definition: def.h:337
internal methods for primal heuristics
SCIP_RETCODE SCIPsepastoreClearCuts(SCIP_SEPASTORE *sepastore, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_EVENTQUEUE *eventqueue, SCIP_EVENTFILTER *eventfilter, SCIP_LP *lp)
Definition: sepastore.c:963
SCIP_LP * lp
Definition: struct_scip.h:80
SCIP_ROW ** SCIPgetCuts(SCIP *scip)
Definition: scip_cut.c:812
internal methods for Benders&#39; decomposition cuts
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:399
internal methods for displaying runtime statistics
OFINS - Objective Function Induced Neighborhood Search - a primal heuristic for reoptimization.
SCIP_RETCODE SCIPseparateSolCutpool(SCIP *scip, SCIP_CUTPOOL *cutpool, SCIP_SOL *sol, SCIP_RESULT *result)
Definition: scip_cut.c:654