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-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 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  sepadata->discardnode = -1;
236  sepadata->nunsuccessful = 0;
237 
238  return SCIP_OKAY;
239 }
240 
241 
242 /** LP solution separation method of separator */
243 static
244 SCIP_DECL_SEPAEXECLP(sepaExeclpClosecuts)
245 { /*lint --e{715}*/
246  SCIP_SEPADATA* sepadata;
247  SCIP_Longint currentnodenumber;
248  SCIP_SOL* point = NULL;
249  SCIP_Bool isroot;
250 
251  assert( sepa != NULL );
252  assert( strcmp(SCIPsepaGetName(sepa), SEPA_NAME) == 0 );
253  assert( result != NULL );
254 
255  *result = SCIP_DIDNOTRUN;
256 
257  /* only call separator, if LP has been solved (need LP to compute separation point) */
259  return SCIP_OKAY;
260 
261  /* only call separator, if there are fractional variables */
262  if ( SCIPgetNLPBranchCands(scip) == 0 )
263  return SCIP_OKAY;
264 
265  /* exit if we stopped ... */
266  if ( SCIPisStopped(scip) )
267  return SCIP_OKAY;
268 
269  /* get separation data */
270  sepadata = SCIPsepaGetData(sepa);
271  assert( sepadata != NULL );
272 
273  /* exit if we already decided to discard the current node */
274  currentnodenumber = SCIPnodeGetNumber(SCIPgetCurrentNode(scip));
275  if ( sepadata->discardnode == currentnodenumber )
276  return SCIP_OKAY;
277 
278  SCIPdebugMsg(scip, "Separation method of closecuts separator.\n");
279 
280  /* check whether we have to compute a relative interior point */
281  if ( sepadata->separelint )
282  {
283  if ( sepadata->recomputerelint )
284  {
285  /* check if previous relative interior point should be forgotten, otherwise it is computed only once and the
286  * same point is used for all nodes */
287  if ( sepadata->sepasol != NULL )
288  {
289  SCIP_CALL( SCIPfreeSol(scip, &sepadata->sepasol) );
290  sepadata->triedRelint = FALSE;
291  }
292  }
293  else
294  {
295  /* skip execution, if we unsuccessfully tried to compute a relative interior point */
296  if ( sepadata->sepasol == NULL && sepadata->triedRelint )
297  return SCIP_OKAY;
298  }
299 
300  /* if relative interior point is not available ... */
301  if ( sepadata->sepasol == NULL )
302  {
303  SCIP_Longint nlpiters;
304  SCIP_Real timelimit;
305  int iterlimit;
306 
307  /* prepare time limit */
308  SCIP_CALL( SCIPgetRealParam(scip, "limits/time", &timelimit) );
309  if ( ! SCIPisInfinity(scip, timelimit) )
310  timelimit -= SCIPgetSolvingTime(scip);
311  /* exit if no time left */
312  if ( timelimit <= 0.0 )
313  return SCIP_OKAY;
314 
315  /* determine iteration limit */
316  if ( sepadata->maxlpiterfactor < 0.0 || SCIPisInfinity(scip, sepadata->maxlpiterfactor) )
317  iterlimit = INT_MAX;
318  else
319  {
320  /* determine iteration limit; the number of iterations in the root is only set after its solution, but the
321  * total number of LP iterations is always updated.
322  * here we use SCIPgetDepth instead of the depth argument passed to the callback because if we are not in
323  * the root node but depth is 0 (i.e. if we want us to behave as if we are in the root node regarding
324  * limits) then using the total number of iterations so far is a gross overestimation
325  */
326  if ( SCIPgetDepth(scip) == 0 )
327  nlpiters = SCIPgetNLPIterations(scip);
328  else
329  nlpiters = SCIPgetNRootLPIterations(scip);
330  iterlimit = (int)(sepadata->maxlpiterfactor * nlpiters);
331  iterlimit = MAX(iterlimit, SCIP_MIN_LPITERS);
332  assert(iterlimit > 0);
333  }
334 
335  SCIPverbMessage(scip, SCIP_VERBLEVEL_MINIMAL, 0, "Computing relative interior point (time limit: %g, iter limit: %d) ...\n", timelimit, iterlimit);
336  SCIP_CALL( SCIPcomputeLPRelIntPoint(scip, TRUE, sepadata->inclobjcutoff, timelimit, iterlimit, &sepadata->sepasol) );
337  sepadata->triedRelint = TRUE;
338  }
339  }
340  else
341  {
342  /* get best solution (NULL if not present) */
343  sepadata->sepasol = SCIPgetBestSol(scip);
344  }
345 
346  /* separate close cuts */
347  if ( sepadata->sepasol != NULL )
348  {
349  SCIPdebugMsg(scip, "Generating close cuts ... (combination value: %f)\n", sepadata->sepacombvalue);
350  *result = SCIP_DIDNOTFIND;
351 
352  /* generate point to be separated */
353  SCIP_CALL( generateCloseCutPoint(scip, sepadata, &point) );
354 
355  /* apply a separation round to generated point */
356  if ( point != NULL )
357  {
358  int noldcuts;
359  SCIP_Bool delayed;
360  SCIP_Bool cutoff;
361 
362  noldcuts = SCIPgetNCuts(scip);
363  isroot = (SCIP_Bool) (depth == 0);
364 
365  /* separate solution via other separators */
366  SCIP_CALL( SCIPseparateSol(scip, point, isroot, TRUE, FALSE, &delayed, &cutoff) );
367 
368  SCIP_CALL( SCIPfreeSol(scip, &point) );
369  assert( point == NULL );
370 
371  /* the cuts might not violated by the current LP if the computed point is strange */
373 
374  if ( cutoff )
375  *result = SCIP_CUTOFF;
376  else
377  {
378  if ( SCIPgetNCuts(scip) - noldcuts > sepadata->sepathreshold )
379  {
380  sepadata->nunsuccessful = 0;
381  *result = SCIP_NEWROUND;
382  }
383  else
384  {
385  if ( SCIPgetNCuts(scip) > noldcuts )
386  {
387  sepadata->nunsuccessful = 0;
388  *result = SCIP_SEPARATED;
389  }
390  else
391  ++sepadata->nunsuccessful;
392  }
393  }
394 
395  SCIPdebugMsg(scip, "Separated close cuts: %d (enoughcuts: %d, unsuccessful: %d).\n", SCIPgetNCuts(scip) - noldcuts,
396  SCIPgetNCuts(scip) - noldcuts > sepadata->sepathreshold, sepadata->nunsuccessful);
397 
398  if ( sepadata->maxunsuccessful >= 0 && sepadata->nunsuccessful > sepadata->maxunsuccessful )
399  {
400  SCIPdebugMsg(scip, "Turn off close cut separation, because of %d unsuccessful calls.\n", sepadata->nunsuccessful);
401  sepadata->discardnode = currentnodenumber;
402  sepadata->nunsuccessful = 0;
403  }
404  }
405  }
406 
407  return SCIP_OKAY;
408 }
409 
410 
411 /*
412  * separator specific interface methods
413  */
414 
415 /** creates the closecuts separator and includes it in SCIP */
417  SCIP* scip /**< SCIP data structure */
418  )
419 {
420  SCIP_SEPADATA* sepadata;
421  SCIP_SEPA* sepa;
422 
423  /* create closecuts separator data */
424  SCIP_CALL( SCIPallocBlockMemory(scip, &sepadata) );
425  sepadata->sepasol = NULL;
426  sepadata->discardnode = -1;
427  sepadata->nunsuccessful = 0;
428  sepadata->triedRelint = FALSE;
429 
430  /* include separator */
432  sepaExeclpClosecuts, NULL, sepadata) );
433 
434  assert(sepa != NULL);
435 
436  /* set non-NULL pointers to callback methods */
437  SCIP_CALL( SCIPsetSepaCopy(scip, sepa, sepaCopyClosecuts) );
438  SCIP_CALL( SCIPsetSepaFree(scip, sepa, sepaFreeClosecuts) );
439  SCIP_CALL( SCIPsetSepaExitsol(scip, sepa, sepaExitsolClosecuts) );
440 
441  /* add closecuts separator parameters */
443  "separating/closecuts/separelint",
444  "generate close cuts w.r.t. relative interior point (best solution otherwise)?",
445  &sepadata->separelint, TRUE, SCIP_DEFAULT_SEPARELINT, NULL, NULL) );
446 
448  "separating/closecuts/sepacombvalue",
449  "convex combination value for close cuts",
450  &sepadata->sepacombvalue, TRUE, SCIP_DEFAULT_SEPACOMBVALUE, 0.0, 1.0,
451  NULL, NULL) );
452 
454  "separating/closecuts/closethres",
455  "threshold on number of generated cuts below which the ordinary separation is started",
456  &sepadata->sepathreshold, TRUE, SCIP_DEFAULT_SEPATHRESHOLD, -1, INT_MAX, NULL, NULL) );
457 
459  "separating/closecuts/inclobjcutoff",
460  "include an objective cutoff when computing the relative interior?",
461  &sepadata->inclobjcutoff, TRUE, SCIP_DEFAULT_INCLOBJCUTOFF, NULL, NULL) );
462 
464  "separating/closecuts/recomputerelint",
465  "recompute relative interior point in each separation call?",
466  &sepadata->recomputerelint, TRUE, SCIP_DEFAULT_RECOMPUTERELINT, NULL, NULL) );
467 
469  "separating/closecuts/maxunsuccessful",
470  "turn off separation in current node after unsuccessful calls (-1 never turn off)",
471  &sepadata->maxunsuccessful, TRUE, SCIP_DEFAULT_MAXUNSUCCESSFUL, -1, INT_MAX, NULL, NULL) );
472 
474  "separating/closecuts/maxlpiterfactor",
475  "factor for maximal LP iterations in relative interior computation compared to node LP iterations (negative for no limit)",
476  &sepadata->maxlpiterfactor, TRUE, SCIP_DEFAULT_MAXLPITERFACTOR, -1.0, SCIP_REAL_MAX, NULL, NULL) );
477 
478  return SCIP_OKAY;
479 }
480 
481 /** sets point to be used as base point for computing the point to be separated
482  *
483  * The point is only stored if separation of relative interior points is used. The solution is copied.
484  */
486  SCIP* scip, /**< SCIP data structure */
487  SCIP_SOL* sol /**< base point solution */
488  )
489 {
490  SCIP_SEPA* sepa;
491  SCIP_SEPADATA* sepadata;
492 
493  assert( scip != NULL );
494 
495  /* find separator */
496  sepa = SCIPfindSepa(scip, SEPA_NAME);
497  if ( sepa == NULL )
498  {
499  SCIPerrorMessage("Could not find separator <%s>.\n", SEPA_NAME);
500  return SCIP_PLUGINNOTFOUND;
501  }
502  assert( strcmp(SCIPsepaGetName(sepa), SEPA_NAME) == 0 );
503 
504  /* get sepadata */
505  sepadata = SCIPsepaGetData(sepa);
506  assert( sepadata != NULL );
507 
508  /* store point if we have to separate relative interior points */
509  if ( sepadata->separelint )
510  {
511  /* possibly free solution */
512  if ( sepadata->sepasol != NULL )
513  {
514  SCIP_CALL( SCIPfreeSol(scip, &sepadata->sepasol) );
515  }
516 
517  /* copy and store solution */
518  SCIP_CALL( SCIPcreateSolCopy(scip, &sepadata->sepasol, sol) );
519  sepadata->triedRelint = TRUE;
520  }
521 
522  return SCIP_OKAY;
523 }
#define SCIP_DEFAULT_INCLOBJCUTOFF
SCIP_Real SCIPgetSolvingTime(SCIP *scip)
Definition: scip_timing.c:369
SCIP_Longint SCIPgetNRootLPIterations(SCIP *scip)
SCIP_RETCODE SCIPcomputeLPRelIntPoint(SCIP *scip, SCIP_Bool relaxrows, SCIP_Bool inclobjcutoff, SCIP_Real timelimit, int iterlimit, SCIP_SOL **point)
Definition: scip_lp.c:1085
public methods for SCIP parameter handling
SCIP_NODE * SCIPgetCurrentNode(SCIP *scip)
Definition: scip_tree.c:82
public methods for branch and bound tree
SCIP_Longint SCIPgetNLPIterations(SCIP *scip)
public methods for memory management
SCIP_RETCODE SCIPgetRealParam(SCIP *scip, const char *name, SCIP_Real *value)
Definition: scip_param.c:298
SCIP_SEPA * SCIPfindSepa(SCIP *scip, const char *name)
Definition: scip_sepa.c:238
SCIP_Real SCIPvarGetLbLocal(SCIP_VAR *var)
Definition: var.c:17966
public methods for timing
#define FALSE
Definition: def.h:87
#define TRUE
Definition: def.h:86
const char * SCIPsepaGetName(SCIP_SEPA *sepa)
Definition: sepa.c:720
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:54
#define SEPA_DELAY
static SCIP_DECL_SEPACOPY(sepaCopyClosecuts)
SCIP_RETCODE SCIPsetBasePointClosecuts(SCIP *scip, SCIP_SOL *sol)
public methods for problem variables
#define SCIPfreeBlockMemory(scip, ptr)
Definition: scip_mem.h:99
int SCIPgetNLPBranchCands(SCIP *scip)
Definition: scip_branch.c:419
SCIP_RETCODE SCIPsetSepaCopy(SCIP *scip, SCIP_SEPA *sepa, SCIP_DECL_SEPACOPY((*sepacopy)))
Definition: scip_sepa.c:142
#define SCIPdebugMsg
Definition: scip_message.h:69
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
public methods for separator plugins
public methods for numerical tolerances
SCIP_SEPADATA * SCIPsepaGetData(SCIP_SEPA *sepa)
Definition: sepa.c:610
public methods for querying solving statistics
#define SCIP_DEFAULT_RECOMPUTERELINT
public methods for the branch-and-bound tree
SCIP_Longint SCIPnodeGetNumber(SCIP_NODE *node)
Definition: tree.c:7432
SCIP_RETCODE SCIPcreateSolCopy(SCIP *scip, SCIP_SOL **sol, SCIP_SOL *sourcesol)
Definition: scip_sol.c:609
#define SCIPerrorMessage
Definition: pub_message.h:55
closecuts meta separator
void SCIPsepaSetData(SCIP_SEPA *sepa, SCIP_SEPADATA *sepadata)
Definition: sepa.c:620
#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
SCIP_Real SCIPvarGetLPSol(SCIP_VAR *var)
Definition: var.c:18284
#define SEPA_NAME
#define SCIP_CALL(x)
Definition: def.h:384
SCIP_RETCODE SCIPremoveInefficaciousCuts(SCIP *scip)
Definition: scip_cut.c:814
void SCIPverbMessage(SCIP *scip, SCIP_VERBLEVEL msgverblevel, FILE *file, const char *formatstr,...)
Definition: scip_message.c:216
static SCIP_RETCODE generateCloseCutPoint(SCIP *scip, SCIP_SEPADATA *sepadata, SCIP_SOL **point)
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
static SCIP_DECL_SEPAEXITSOL(sepaExitsolClosecuts)
SCIP_RETCODE SCIPsetSolVal(SCIP *scip, SCIP_SOL *sol, SCIP_VAR *var, SCIP_Real val)
Definition: scip_sol.c:1212
#define SCIP_DEFAULT_MAXLPITERFACTOR
#define SCIP_DEFAULT_SEPATHRESHOLD
SCIP_RETCODE SCIPsetSepaExitsol(SCIP *scip, SCIP_SEPA *sepa, SCIP_DECL_SEPAEXITSOL((*sepaexitsol)))
Definition: scip_sepa.c:222
#define SCIP_Bool
Definition: def.h:84
SCIP_LPSOLSTAT SCIPgetLPSolstat(SCIP *scip)
Definition: scip_lp.c:159
int SCIPgetDepth(SCIP *scip)
Definition: scip_tree.c:661
#define MAX(x, y)
Definition: tclique_def.h:83
public methods for cuts and aggregation rows
SCIP_RETCODE SCIPfreeSol(SCIP *scip, SCIP_SOL **sol)
Definition: scip_sol.c:976
#define SCIP_DEFAULT_SEPARELINT
SCIP_Bool SCIPisInfinity(SCIP *scip, SCIP_Real val)
#define SEPA_PRIORITY
public methods for the LP relaxation, rows and columns
int SCIPgetNVars(SCIP *scip)
Definition: scip_prob.c:1990
SCIP_RETCODE SCIPincludeSepaClosecuts(SCIP *scip)
#define SCIP_REAL_MAX
Definition: def.h:178
public methods for branching rule plugins and branching
general public methods
SCIP_RETCODE SCIPsetSepaFree(SCIP *scip, SCIP_SEPA *sepa, SCIP_DECL_SEPAFREE((*sepafree)))
Definition: scip_sepa.c:158
SCIP_SOL * SCIPgetBestSol(SCIP *scip)
Definition: scip_sol.c:2304
public methods for solutions
#define SEPA_FREQ
int SCIPgetNCuts(SCIP *scip)
Definition: scip_cut.c:778
public methods for message output
SCIP_VAR ** SCIPgetVars(SCIP *scip)
Definition: scip_prob.c:1945
#define SCIP_DEFAULT_MAXUNSUCCESSFUL
#define SCIP_Real
Definition: def.h:177
SCIP_Bool SCIPisStopped(SCIP *scip)
Definition: scip_general.c:694
#define SEPA_DESC
public methods for message handling
#define SEPA_USESSUBSCIP
#define SCIP_Longint
Definition: def.h:162
static SCIP_DECL_SEPAFREE(sepaFreeClosecuts)
#define SEPA_MAXBOUNDDIST
SCIP_Bool SCIPisZero(SCIP *scip, SCIP_Real val)
SCIP_Real SCIPvarGetUbLocal(SCIP_VAR *var)
Definition: var.c:17976
public methods for separators
#define SCIP_MIN_LPITERS
SCIPallocBlockMemory(scip, subsol))
public methods for global and local (sub)problems
SCIP_Real SCIPgetSolVal(SCIP *scip, SCIP_SOL *sol, SCIP_VAR *var)
Definition: scip_sol.c:1352
#define SCIP_DEFAULT_SEPACOMBVALUE
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
struct SCIP_SepaData SCIP_SEPADATA
Definition: type_sepa.h:43
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
static SCIP_DECL_SEPAEXECLP(sepaExeclpClosecuts)
SCIP_RETCODE SCIPcreateSol(SCIP *scip, SCIP_SOL **sol, SCIP_HEUR *heur)
Definition: scip_sol.c:319