Scippy

SCIP

Solving Constraint Integer Programs

sepa_closecuts.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-2020 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 sepa_closecuts.c
17  * @ingroup DEFPLUGINS_SEPA
18  * @brief closecuts meta separator
19  * @author Marc Pfetsch
20  *
21  * This separator generates a convex combination of the current LP solution and either the best
22  * primal feasible solution or an interior point of the LP relaxation. If the convex combination is
23  * proper, the new point is closer to the convex hull of the feasible points. The separator then
24  * calls all other separators to separate this point. The idea is that in this way possibly "deeper"
25  * cuts are generated. Note, however, that the new point is not a basic solution, i.e., separators
26  * relying basis information, e.g., Gomory cuts, will not work.
27  *
28  * The other cuts are generated via the sepasol() callbacks in constraints handlers or separators.
29  *
30  * This separator stops after a certain number (parameter @p maxunsuccessful) of unsuccessful
31  * calls. It also inhibits the separation of the ordinary LP solution if it already generated enough
32  * (parameter @p sepathreshold) cuts. The convex combination is determined via the parameter @p
33  * sepacombvalue.
34  *
35  * In general, this separator makes sense if it is expected that there will be many separation
36  * rounds and many cuts will be again deleted, because they are not active after a certain number of
37  * rounds. In particular, branch-and-cut algorithms for combinatorial optimization problems form
38  * good candidates.
39  *
40  * The idea seems to be first proposed in the context of the travelling salesman problem, see@par
41  * The Traveling Salesman Problem: A Computational Study@n
42  * David L. Applegate, Robert E. Bixby, Vasek Chvatal & William J. Cook@n
43  * Princeton University Press 2006@n
44  *
45  * for more details. See also@par
46  * Acceleration of cutting-plane and column generation algorithms: Applications to network design.@n
47  * Walid Ben-Ameur, Jose Neto@n
48  * Networks 49(1): 3-17 (2007).
49  */
50 
51 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
52 
53 #include "scip/pub_message.h"
54 #include "scip/pub_sepa.h"
55 #include "scip/pub_tree.h"
56 #include "scip/pub_var.h"
57 #include "scip/scip_branch.h"
58 #include "scip/scip_cut.h"
59 #include "scip/scip_general.h"
60 #include "scip/scip_lp.h"
61 #include "scip/scip_mem.h"
62 #include "scip/scip_message.h"
63 #include "scip/scip_numerics.h"
64 #include "scip/scip_param.h"
65 #include "scip/scip_prob.h"
66 #include "scip/scip_sepa.h"
67 #include "scip/scip_sol.h"
68 #include "scip/scip_solvingstats.h"
69 #include "scip/scip_timing.h"
70 #include "scip/scip_tree.h"
71 #include "scip/sepa_closecuts.h"
72 #include <string.h>
73 
74 
75 
76 #define SEPA_NAME "closecuts"
77 #define SEPA_DESC "closecuts meta separator"
78 #define SEPA_PRIORITY 1000000
79 #define SEPA_FREQ -1
80 #define SEPA_MAXBOUNDDIST 1.0
81 #define SEPA_USESSUBSCIP FALSE /**< does the separator use a secondary SCIP instance? */
82 #define SEPA_DELAY FALSE /**< should separation method be delayed, if other separators found cuts? */
83 
84 
85 /* default values for parameters */
86 #define SCIP_DEFAULT_SEPARELINT TRUE /**< generate close cuts w.r.t. relative interior point (best solution otherwise)? */
87 #define SCIP_DEFAULT_SEPACOMBVALUE 0.30 /**< convex combination value for close cuts */
88 #define SCIP_DEFAULT_SEPATHRESHOLD 50 /**< threshold on number of generated cuts below which the ordinary separation is started */
89 #define SCIP_DEFAULT_INCLOBJCUTOFF FALSE /**< include the objective cutoff when computing the relative interior? */
90 #define SCIP_DEFAULT_RECOMPUTERELINT FALSE /**< recompute relative interior in each separation call? */
91 #define SCIP_DEFAULT_MAXUNSUCCESSFUL 0 /**< turn off separation in current node after unsuccessful calls (-1 never turn off) */
92 #define SCIP_DEFAULT_MAXLPITERFACTOR 10.0 /**< factor for maximal LP iterations in relative interior computation compared to node LP iterations */
93 
94 #define SCIP_MIN_LPITERS 100 /**< minimum number of allowed LP iterations in relative interior computation */
95 
96 
97 /** separator data */
98 struct SCIP_SepaData
99 {
100  SCIP_Bool separelint; /**< generate close cuts w.r.t. relative interior point (best solution otherwise)? */
101  SCIP_Bool triedRelint; /**< tried to compute relative interior */
102  SCIP_Real sepacombvalue; /**< convex combination value for close cuts */
103  int sepathreshold; /**< threshold on number of generated cuts below which the ordinary separation is started */
104  SCIP_Bool inclobjcutoff; /**< include the objective cutoff when computing the relative interior? */
105  SCIP_Bool recomputerelint; /**< recompute relative interior in each separation call? */
106  int maxunsuccessful; /**< turn off separation in current node after unsuccessful calls (-1 never turn off) */
107  SCIP_SOL* sepasol; /**< solution that can be used for generating close cuts */
108  SCIP_Longint discardnode; /**< number of node for which separation is discarded */
109  SCIP_Real maxlpiterfactor; /**< factor for maximal LP iterations in relative interior computation compared to node LP iterations */
110  int nunsuccessful; /**< number of consecutive unsuccessful calls */
111 };
112 
113 
114 /** generate point for close cut separation
115  *
116  * The constructed point is the convex combination of the point stored in set->closesol and the
117  * current LP solution. The convexity parameter is set->sepa_closecombvalue. If this parameter is
118  * 0, the point coincides with the LP solution.
119  */
120 static
122  SCIP* scip, /**< SCIP data structure */
123  SCIP_SEPADATA* sepadata, /**< separator data */
124  SCIP_SOL** point /**< point to be generated (or NULL if unsuccessful) */
125  )
126 {
127  SCIP_VAR** vars;
128  SCIP_VAR* var;
129  SCIP_Real val;
130  SCIP_Real alpha;
131  SCIP_Real onealpha;
132  SCIP_Real lb;
133  SCIP_Real ub;
134  int nvars;
135  int i;
136 
137  assert( scip != NULL );
138  assert( point != NULL );
139 
140  *point = NULL;
141  if ( sepadata->sepasol == NULL )
142  return SCIP_OKAY;
143 
144  alpha = sepadata->sepacombvalue;
145  if ( alpha < 0.001 )
146  return SCIP_OKAY;
147  onealpha = 1.0 - alpha;
148 
149  /* create solution */
150  SCIP_CALL( SCIPcreateSol(scip, point, NULL) );
151 
152  /* generate convex combination */
153  vars = SCIPgetVars(scip);
154  nvars = SCIPgetNVars(scip);
155  for (i = 0; i < nvars; ++i)
156  {
157  var = vars[i];
158  val = alpha * SCIPgetSolVal(scip, sepadata->sepasol, var) + onealpha * SCIPvarGetLPSol(var);
159 
160  /* If both the LP relaxation and the base point respect the variable bounds, the computed point will satisfy them
161  * as well. However, variables might be fixed (e.g. by branching) since the time of the computation of the base
162  * point. Thus, we adapt the value to lie inside the bounds in optimized mode. */
163  lb = SCIPvarGetLbLocal(var);
164  ub = SCIPvarGetUbLocal(var);
165  val = MAX(val, lb);
166  val = MIN(val, ub);
167 
168  if ( ! SCIPisZero(scip, val) )
169  {
170  SCIP_CALL( SCIPsetSolVal(scip, *point, var, val) );
171  }
172  }
173 
174  return SCIP_OKAY;
175 }
176 
177 
178 /*
179  * Callback methods of separator
180  */
181 
182 
183 /** copy method for separator plugins (called when SCIP copies plugins) */
184 static
185 SCIP_DECL_SEPACOPY(sepaCopyClosecuts)
186 { /*lint --e{715}*/
187  assert( scip != NULL );
188  assert( sepa != NULL );
189  assert( strcmp(SCIPsepaGetName(sepa), SEPA_NAME) == 0 );
190 
191  /* call inclusion method of constraint handler */
193 
194  return SCIP_OKAY;
195 }
196 
197 /** destructor of separator to free user data (called when SCIP is exiting) */
198 static
199 SCIP_DECL_SEPAFREE(sepaFreeClosecuts)
200 { /*lint --e{715}*/
201  SCIP_SEPADATA* sepadata;
202 
203  assert( sepa != NULL );
204  assert( strcmp(SCIPsepaGetName(sepa), SEPA_NAME) == 0 );
205 
206  /* free separator data */
207  sepadata = SCIPsepaGetData(sepa);
208  assert( sepadata != NULL );
209 
210  SCIPfreeBlockMemory(scip, &sepadata);
211 
212  SCIPsepaSetData(sepa, NULL);
213 
214  return SCIP_OKAY;
215 }
216 
217 
218 /** solving process deinitialization method of separator (called before branch and bound process data is freed) */
219 static
220 SCIP_DECL_SEPAEXITSOL(sepaExitsolClosecuts)
221 { /*lint --e{715}*/
222  SCIP_SEPADATA* sepadata;
223 
224  assert( sepa != NULL );
225  assert( strcmp(SCIPsepaGetName(sepa), SEPA_NAME) == 0 );
226 
227  sepadata = SCIPsepaGetData(sepa);
228  assert( sepadata != NULL );
229 
230  if ( sepadata->separelint && sepadata->sepasol != NULL )
231  {
232  SCIP_CALL( SCIPfreeSol(scip, &sepadata->sepasol) );
233  sepadata->triedRelint = FALSE;
234  }
235 
236  return SCIP_OKAY;
237 }
238 
239 
240 /** LP solution separation method of separator */
241 static
242 SCIP_DECL_SEPAEXECLP(sepaExeclpClosecuts)
243 { /*lint --e{715}*/
244  SCIP_SEPADATA* sepadata;
245  SCIP_Longint currentnodenumber;
246  SCIP_SOL* point = NULL;
247  SCIP_Bool isroot;
248 
249  assert( sepa != NULL );
250  assert( strcmp(SCIPsepaGetName(sepa), SEPA_NAME) == 0 );
251  assert( result != NULL );
252 
253  *result = SCIP_DIDNOTRUN;
254 
255  /* only call separator, if LP has been solved (need LP to compute separation point) */
257  return SCIP_OKAY;
258 
259  /* only call separator, if there are fractional variables */
260  if ( SCIPgetNLPBranchCands(scip) == 0 )
261  return SCIP_OKAY;
262 
263  /* exit if we stopped ... */
264  if ( SCIPisStopped(scip) )
265  return SCIP_OKAY;
266 
267  /* get separation data */
268  sepadata = SCIPsepaGetData(sepa);
269  assert( sepadata != NULL );
270 
271  /* exit if we already decided to discard the current node */
272  currentnodenumber = SCIPnodeGetNumber(SCIPgetCurrentNode(scip));
273  if ( sepadata->discardnode == currentnodenumber )
274  return SCIP_OKAY;
275 
276  SCIPdebugMsg(scip, "Separation method of closecuts separator.\n");
277 
278  /* check whether we have to compute a relative interior point */
279  if ( sepadata->separelint )
280  {
281  if ( sepadata->recomputerelint )
282  {
283  /* check if previous relative interior point should be forgotten, otherwise it is computed only once and the
284  * same point is used for all nodes */
285  if ( sepadata->sepasol != NULL )
286  {
287  SCIP_CALL( SCIPfreeSol(scip, &sepadata->sepasol) );
288  sepadata->triedRelint = FALSE;
289  }
290  }
291  else
292  {
293  /* skip execution, if we unsuccessfully tried to compute a relative interior point */
294  if ( sepadata->sepasol == NULL && sepadata->triedRelint )
295  return SCIP_OKAY;
296  }
297 
298  /* if relative interior point is not available ... */
299  if ( sepadata->sepasol == NULL )
300  {
301  SCIP_Longint nlpiters;
302  SCIP_Real timelimit;
303  int iterlimit;
304 
305  /* prepare time limit */
306  SCIP_CALL( SCIPgetRealParam(scip, "limits/time", &timelimit) );
307  if ( ! SCIPisInfinity(scip, timelimit) )
308  timelimit -= SCIPgetSolvingTime(scip);
309  /* exit if no time left */
310  if ( timelimit <= 0.0 )
311  return SCIP_OKAY;
312 
313  /* determine iteration limit */
314  if ( sepadata->maxlpiterfactor < 0.0 || SCIPisInfinity(scip, sepadata->maxlpiterfactor) )
315  iterlimit = INT_MAX;
316  else
317  {
318  /* determine iteration limit; the number of iterations in the root is only set after its solution, but the
319  * total number of LP iterations is always updated. */
320  if ( SCIPgetDepth(scip) == 0 )
321  nlpiters = SCIPgetNLPIterations(scip);
322  else
323  nlpiters = SCIPgetNRootLPIterations(scip);
324  iterlimit = (int)(sepadata->maxlpiterfactor * nlpiters);
325  iterlimit = MAX(iterlimit, SCIP_MIN_LPITERS);
326  assert(iterlimit > 0);
327  }
328 
329  SCIPverbMessage(scip, SCIP_VERBLEVEL_MINIMAL, 0, "Computing relative interior point (time limit: %g, iter limit: %d) ...\n", timelimit, iterlimit);
330  SCIP_CALL( SCIPcomputeLPRelIntPoint(scip, TRUE, sepadata->inclobjcutoff, timelimit, iterlimit, &sepadata->sepasol) );
331  sepadata->triedRelint = TRUE;
332  }
333  }
334  else
335  {
336  /* get best solution (NULL if not present) */
337  sepadata->sepasol = SCIPgetBestSol(scip);
338  }
339 
340  /* separate close cuts */
341  if ( sepadata->sepasol != NULL )
342  {
343  SCIPdebugMsg(scip, "Generating close cuts ... (combination value: %f)\n", sepadata->sepacombvalue);
344  *result = SCIP_DIDNOTFIND;
345 
346  /* generate point to be separated */
347  SCIP_CALL( generateCloseCutPoint(scip, sepadata, &point) );
348 
349  /* apply a separation round to generated point */
350  if ( point != NULL )
351  {
352  int noldcuts;
353  SCIP_Bool delayed;
354  SCIP_Bool cutoff;
355 
356  noldcuts = SCIPgetNCuts(scip);
357  isroot = (SCIP_Bool) (SCIPgetDepth(scip) == 0);
358 
359  /* separate solution via other separators */
360  SCIP_CALL( SCIPseparateSol(scip, point, isroot, TRUE, FALSE, &delayed, &cutoff) );
361 
362  SCIP_CALL( SCIPfreeSol(scip, &point) );
363  assert( point == NULL );
364 
365  /* the cuts might not violated by the current LP if the computed point is strange */
367 
368  if ( cutoff )
369  *result = SCIP_CUTOFF;
370  else
371  {
372  if ( SCIPgetNCuts(scip) - noldcuts > sepadata->sepathreshold )
373  {
374  sepadata->nunsuccessful = 0;
375  *result = SCIP_NEWROUND;
376  }
377  else
378  {
379  if ( SCIPgetNCuts(scip) > noldcuts )
380  {
381  sepadata->nunsuccessful = 0;
382  *result = SCIP_SEPARATED;
383  }
384  else
385  ++sepadata->nunsuccessful;
386  }
387  }
388 
389  SCIPdebugMsg(scip, "Separated close cuts: %d (enoughcuts: %d, unsuccessful: %d).\n", SCIPgetNCuts(scip) - noldcuts,
390  SCIPgetNCuts(scip) - noldcuts > sepadata->sepathreshold, sepadata->nunsuccessful);
391 
392  if ( sepadata->maxunsuccessful >= 0 && sepadata->nunsuccessful > sepadata->maxunsuccessful )
393  {
394  SCIPdebugMsg(scip, "Turn off close cut separation, because of %d unsuccessful calls.\n", sepadata->nunsuccessful);
395  sepadata->discardnode = currentnodenumber;
396  sepadata->nunsuccessful = 0;
397  }
398  }
399  }
400 
401  return SCIP_OKAY;
402 }
403 
404 
405 /*
406  * separator specific interface methods
407  */
408 
409 /** creates the closecuts separator and includes it in SCIP */
411  SCIP* scip /**< SCIP data structure */
412  )
413 {
414  SCIP_SEPADATA* sepadata;
415  SCIP_SEPA* sepa;
416 
417  /* create closecuts separator data */
418  SCIP_CALL( SCIPallocBlockMemory(scip, &sepadata) );
419  sepadata->sepasol = NULL;
420  sepadata->discardnode = -1;
421  sepadata->nunsuccessful = 0;
422  sepadata->triedRelint = FALSE;
423 
424  /* include separator */
426  sepaExeclpClosecuts, NULL, sepadata) );
427 
428  assert(sepa != NULL);
429 
430  /* set non-NULL pointers to callback methods */
431  SCIP_CALL( SCIPsetSepaCopy(scip, sepa, sepaCopyClosecuts) );
432  SCIP_CALL( SCIPsetSepaFree(scip, sepa, sepaFreeClosecuts) );
433  SCIP_CALL( SCIPsetSepaExitsol(scip, sepa, sepaExitsolClosecuts) );
434 
435  /* add closecuts separator parameters */
437  "separating/closecuts/separelint",
438  "generate close cuts w.r.t. relative interior point (best solution otherwise)?",
439  &sepadata->separelint, TRUE, SCIP_DEFAULT_SEPARELINT, NULL, NULL) );
440 
442  "separating/closecuts/sepacombvalue",
443  "convex combination value for close cuts",
444  &sepadata->sepacombvalue, TRUE, SCIP_DEFAULT_SEPACOMBVALUE, 0.0, 1.0,
445  NULL, NULL) );
446 
448  "separating/closecuts/closethres",
449  "threshold on number of generated cuts below which the ordinary separation is started",
450  &sepadata->sepathreshold, TRUE, SCIP_DEFAULT_SEPATHRESHOLD, -1, INT_MAX, NULL, NULL) );
451 
453  "separating/closecuts/inclobjcutoff",
454  "include an objective cutoff when computing the relative interior?",
455  &sepadata->inclobjcutoff, TRUE, SCIP_DEFAULT_INCLOBJCUTOFF, NULL, NULL) );
456 
458  "separating/closecuts/recomputerelint",
459  "recompute relative interior point in each separation call?",
460  &sepadata->recomputerelint, TRUE, SCIP_DEFAULT_RECOMPUTERELINT, NULL, NULL) );
461 
463  "separating/closecuts/maxunsuccessful",
464  "turn off separation in current node after unsuccessful calls (-1 never turn off)",
465  &sepadata->maxunsuccessful, TRUE, SCIP_DEFAULT_MAXUNSUCCESSFUL, -1, INT_MAX, NULL, NULL) );
466 
468  "separating/closecuts/maxlpiterfactor",
469  "factor for maximal LP iterations in relative interior computation compared to node LP iterations (negative for no limit)",
470  &sepadata->maxlpiterfactor, TRUE, SCIP_DEFAULT_MAXLPITERFACTOR, -1.0, SCIP_REAL_MAX, NULL, NULL) );
471 
472  return SCIP_OKAY;
473 }
474 
475 /** sets point to be used as base point for computing the point to be separated
476  *
477  * The point is only stored if separation of relative interior points is used. The solution is copied.
478  */
480  SCIP* scip, /**< SCIP data structure */
481  SCIP_SOL* sol /**< base point solution */
482  )
483 {
484  SCIP_SEPA* sepa;
485  SCIP_SEPADATA* sepadata;
486 
487  assert( scip != NULL );
488 
489  /* find separator */
490  sepa = SCIPfindSepa(scip, SEPA_NAME);
491  if ( sepa == NULL )
492  {
493  SCIPerrorMessage("Could not find separator <%s>.\n", SEPA_NAME);
494  return SCIP_PLUGINNOTFOUND;
495  }
496  assert( strcmp(SCIPsepaGetName(sepa), SEPA_NAME) == 0 );
497 
498  /* get sepadata */
499  sepadata = SCIPsepaGetData(sepa);
500  assert( sepadata != NULL );
501 
502  /* store point if we have to separate relative interior points */
503  if ( sepadata->separelint )
504  {
505  /* possibly free solution */
506  if ( sepadata->sepasol != NULL )
507  {
508  SCIP_CALL( SCIPfreeSol(scip, &sepadata->sepasol) );
509  }
510 
511  /* copy and store solution */
512  SCIP_CALL( SCIPcreateSolCopy(scip, &sepadata->sepasol, sol) );
513  sepadata->triedRelint = TRUE;
514  }
515 
516  return SCIP_OKAY;
517 }
#define SCIP_DEFAULT_INCLOBJCUTOFF
SCIP_RETCODE SCIPfreeSol(SCIP *scip, SCIP_SOL **sol)
Definition: scip_sol.c:977
SCIP_Bool SCIPisStopped(SCIP *scip)
Definition: scip_general.c:687
SCIP_RETCODE SCIPsetSolVal(SCIP *scip, SCIP_SOL *sol, SCIP_VAR *var, SCIP_Real val)
Definition: scip_sol.c:1213
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:705
public methods for SCIP parameter handling
public methods for branch and bound tree
public methods for memory management
SCIP_EXPORT SCIP_Real SCIPvarGetLPSol(SCIP_VAR *var)
Definition: var.c:18036
SCIP_Real SCIPgetSolVal(SCIP *scip, SCIP_SOL *sol, SCIP_VAR *var)
Definition: scip_sol.c:1353
SCIP_RETCODE SCIPincludeSepaClosecuts(SCIP *scip)
SCIP_EXPORT SCIP_Longint SCIPnodeGetNumber(SCIP_NODE *node)
Definition: tree.c:7420
public methods for timing
int SCIPgetNLPBranchCands(SCIP *scip)
Definition: scip_branch.c:419
SCIP_NODE * SCIPgetCurrentNode(SCIP *scip)
Definition: scip_tree.c:81
SCIP_RETCODE SCIPcomputeLPRelIntPoint(SCIP *scip, SCIP_Bool relaxrows, SCIP_Bool inclobjcutoff, SCIP_Real timelimit, int iterlimit, SCIP_SOL **point)
Definition: scip_lp.c:1040
int SCIPgetNVars(SCIP *scip)
Definition: scip_prob.c:1986
SCIP_Real SCIPgetSolvingTime(SCIP *scip)
Definition: scip_timing.c:360
void SCIPverbMessage(SCIP *scip, SCIP_VERBLEVEL msgverblevel, FILE *file, const char *formatstr,...)
Definition: scip_message.c:216
#define FALSE
Definition: def.h:73
#define TRUE
Definition: def.h:72
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:54
#define SEPA_DELAY
static SCIP_DECL_SEPACOPY(sepaCopyClosecuts)
public methods for problem variables
SCIP_RETCODE SCIPsetSepaCopy(SCIP *scip, SCIP_SEPA *sepa, SCIP_DECL_SEPACOPY((*sepacopy)))
Definition: scip_sepa.c:142
SCIP_RETCODE SCIPaddBoolParam(SCIP *scip, const char *name, const char *desc, SCIP_Bool *valueptr, SCIP_Bool isadvanced, SCIP_Bool defaultvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
Definition: scip_param.c:48
#define SCIPfreeBlockMemory(scip, ptr)
Definition: scip_mem.h:95
#define SCIPallocBlockMemory(scip, ptr)
Definition: scip_mem.h:78
#define SCIPdebugMsg
Definition: scip_message.h:69
public methods for separator plugins
SCIP_LPSOLSTAT SCIPgetLPSolstat(SCIP *scip)
Definition: scip_lp.c:159
SCIP_Bool SCIPisInfinity(SCIP *scip, SCIP_Real val)
public methods for numerical tolerances
SCIP_RETCODE SCIPcreateSol(SCIP *scip, SCIP_SOL **sol, SCIP_HEUR *heur)
Definition: scip_sol.c:320
public methods for querying solving statistics
#define SCIP_DEFAULT_RECOMPUTERELINT
SCIP_RETCODE SCIPremoveInefficaciousCuts(SCIP *scip)
Definition: scip_cut.c:793
public methods for the branch-and-bound tree
SCIP_RETCODE SCIPcreateSolCopy(SCIP *scip, SCIP_SOL **sol, SCIP_SOL *sourcesol)
Definition: scip_sol.c:610
SCIP_SEPA * SCIPfindSepa(SCIP *scip, const char *name)
Definition: scip_sepa.c:238
#define SCIPerrorMessage
Definition: pub_message.h:55
closecuts meta separator
SCIP_VAR ** SCIPgetVars(SCIP *scip)
Definition: scip_prob.c:1941
SCIP_Bool SCIPisZero(SCIP *scip, SCIP_Real val)
#define NULL
Definition: lpi_spx1.cpp:155
#define SEPA_NAME
#define SCIP_CALL(x)
Definition: def.h:364
SCIP_EXPORT SCIP_SEPADATA * SCIPsepaGetData(SCIP_SEPA *sepa)
Definition: sepa.c:608
SCIP_EXPORT const char * SCIPsepaGetName(SCIP_SEPA *sepa)
Definition: sepa.c:697
static SCIP_RETCODE generateCloseCutPoint(SCIP *scip, SCIP_SEPADATA *sepadata, SCIP_SOL **point)
SCIP_RETCODE SCIPgetRealParam(SCIP *scip, const char *name, SCIP_Real *value)
Definition: scip_param.c:298
static SCIP_DECL_SEPAEXITSOL(sepaExitsolClosecuts)
#define SCIP_DEFAULT_MAXLPITERFACTOR
#define SCIP_DEFAULT_SEPATHRESHOLD
int SCIPgetDepth(SCIP *scip)
Definition: scip_tree.c:638
#define SCIP_Bool
Definition: def.h:70
SCIP_RETCODE SCIPincludeSepaBasic(SCIP *scip, SCIP_SEPA **sepa, const char *name, const char *desc, int priority, int freq, SCIP_Real maxbounddist, SCIP_Bool usessubscip, SCIP_Bool delay, SCIP_DECL_SEPAEXECLP((*sepaexeclp)), SCIP_DECL_SEPAEXECSOL((*sepaexecsol)), SCIP_SEPADATA *sepadata)
Definition: scip_sepa.c:100
#define MAX(x, y)
Definition: tclique_def.h:83
public methods for cuts and aggregation rows
#define SCIP_DEFAULT_SEPARELINT
SCIP_EXPORT SCIP_Real SCIPvarGetLbLocal(SCIP_VAR *var)
Definition: var.c:17718
SCIP_RETCODE SCIPaddRealParam(SCIP *scip, const char *name, const char *desc, SCIP_Real *valueptr, SCIP_Bool isadvanced, SCIP_Real defaultvalue, SCIP_Real minvalue, SCIP_Real maxvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
Definition: scip_param.c:130
#define SEPA_PRIORITY
public methods for the LP relaxation, rows and columns
#define SCIP_REAL_MAX
Definition: def.h:164
SCIP_EXPORT SCIP_Real SCIPvarGetUbLocal(SCIP_VAR *var)
Definition: var.c:17728
public methods for branching rule plugins and branching
general public methods
SCIP_Longint SCIPgetNLPIterations(SCIP *scip)
public methods for solutions
#define SEPA_FREQ
public methods for message output
SCIP_Longint SCIPgetNRootLPIterations(SCIP *scip)
SCIP_RETCODE SCIPaddIntParam(SCIP *scip, const char *name, const char *desc, int *valueptr, SCIP_Bool isadvanced, int defaultvalue, int minvalue, int maxvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
Definition: scip_param.c:74
SCIP_RETCODE SCIPsetBasePointClosecuts(SCIP *scip, SCIP_SOL *sol)
#define SCIP_DEFAULT_MAXUNSUCCESSFUL
int SCIPgetNCuts(SCIP *scip)
Definition: scip_cut.c:757
#define SCIP_Real
Definition: def.h:163
#define SEPA_DESC
public methods for message handling
#define SEPA_USESSUBSCIP
#define SCIP_Longint
Definition: def.h:148
static SCIP_DECL_SEPAFREE(sepaFreeClosecuts)
#define SEPA_MAXBOUNDDIST
SCIP_RETCODE SCIPsetSepaExitsol(SCIP *scip, SCIP_SEPA *sepa, SCIP_DECL_SEPAEXITSOL((*sepaexitsol)))
Definition: scip_sepa.c:222
SCIP_EXPORT void SCIPsepaSetData(SCIP_SEPA *sepa, SCIP_SEPADATA *sepadata)
Definition: sepa.c:618
public methods for separators
#define SCIP_MIN_LPITERS
SCIP_RETCODE SCIPsetSepaFree(SCIP *scip, SCIP_SEPA *sepa, SCIP_DECL_SEPAFREE((*sepafree)))
Definition: scip_sepa.c:158
public methods for global and local (sub)problems
#define SCIP_DEFAULT_SEPACOMBVALUE
SCIP_SOL * SCIPgetBestSol(SCIP *scip)
Definition: scip_sol.c:2305
struct SCIP_SepaData SCIP_SEPADATA
Definition: type_sepa.h:43
static SCIP_DECL_SEPAEXECLP(sepaExeclpClosecuts)