Scippy

SCIP

Solving Constraint Integer Programs

sepa.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.c
17  * @ingroup OTHER_CFILES
18  * @brief methods and datastructures for separators
19  * @author Tobias Achterberg
20  * @author Timo Berthold
21  */
22 
23 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
24 
25 #include <assert.h>
26 #include <string.h>
27 
28 #include "scip/def.h"
29 #include "scip/set.h"
30 #include "scip/stat.h"
31 #include "scip/clock.h"
32 #include "scip/paramset.h"
33 #include "scip/sepastore.h"
34 #include "scip/scip.h"
35 #include "scip/sepa.h"
36 #include "scip/pub_message.h"
37 #include "scip/pub_misc.h"
38 
39 #include "scip/struct_sepa.h"
40 
41 
42 /** compares two separators w. r. to their priority */
43 SCIP_DECL_SORTPTRCOMP(SCIPsepaComp)
44 { /*lint --e{715}*/
45  return ((SCIP_SEPA*)elem2)->priority - ((SCIP_SEPA*)elem1)->priority;
46 }
47 
48 /** comparison method for sorting separators w.r.t. to their name */
49 SCIP_DECL_SORTPTRCOMP(SCIPsepaCompName)
50 {
51  return strcmp(SCIPsepaGetName((SCIP_SEPA*)elem1), SCIPsepaGetName((SCIP_SEPA*)elem2));
52 }
53 
54 /** method to call, when the priority of a separator was changed */
55 static
56 SCIP_DECL_PARAMCHGD(paramChgdSepaPriority)
57 { /*lint --e{715}*/
58  SCIP_PARAMDATA* paramdata;
59 
60  paramdata = SCIPparamGetData(param);
61  assert(paramdata != NULL);
62 
63  /* use SCIPsetSepaPriority() to mark the sepas unsorted */
64  SCIP_CALL( SCIPsetSepaPriority(scip, (SCIP_SEPA*)paramdata, SCIPparamGetInt(param)) ); /*lint !e740*/
65 
66  return SCIP_OKAY;
67 }
68 
69 /** copies the given separator to a new scip */
71  SCIP_SEPA* sepa, /**< separator */
72  SCIP_SET* set /**< SCIP_SET of SCIP to copy to */
73  )
74 {
75  assert(sepa != NULL);
76  assert(set != NULL);
77  assert(set->scip != NULL);
78 
79  if( sepa->sepacopy != NULL )
80  {
81  SCIPsetDebugMsg(set, "including separator %s in subscip %p\n", SCIPsepaGetName(sepa), (void*)set->scip);
82  SCIP_CALL( sepa->sepacopy(set->scip, sepa) );
83  }
84  return SCIP_OKAY;
85 }
86 
87 /** internal method for creating a separator */
88 static
90  SCIP_SEPA** sepa, /**< pointer to separator data structure */
91  SCIP_SET* set, /**< global SCIP settings */
92  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
93  BMS_BLKMEM* blkmem, /**< block memory for parameter settings */
94  const char* name, /**< name of separator */
95  const char* desc, /**< description of separator */
96  int priority, /**< priority of separator (>= 0: before, < 0: after constraint handlers) */
97  int freq, /**< frequency for calling separator */
98  SCIP_Real maxbounddist, /**< maximal relative distance from current node's dual bound to primal bound compared
99  * to best node's dual bound for applying separation */
100  SCIP_Bool usessubscip, /**< does the separator use a secondary SCIP instance? */
101  SCIP_Bool delay, /**< should separator be delayed, if other separators found cuts? */
102  SCIP_DECL_SEPACOPY ((*sepacopy)), /**< copy method of separator or NULL if you don't want to copy your plugin into sub-SCIPs */
103  SCIP_DECL_SEPAFREE ((*sepafree)), /**< destructor of separator */
104  SCIP_DECL_SEPAINIT ((*sepainit)), /**< initialize separator */
105  SCIP_DECL_SEPAEXIT ((*sepaexit)), /**< deinitialize separator */
106  SCIP_DECL_SEPAINITSOL ((*sepainitsol)), /**< solving process initialization method of separator */
107  SCIP_DECL_SEPAEXITSOL ((*sepaexitsol)), /**< solving process deinitialization method of separator */
108  SCIP_DECL_SEPAEXECLP ((*sepaexeclp)), /**< LP solution separation method of separator */
109  SCIP_DECL_SEPAEXECSOL ((*sepaexecsol)), /**< arbitrary primal solution separation method of separator */
110  SCIP_SEPADATA* sepadata /**< separator data */
111  )
112 {
114  char paramdesc[SCIP_MAXSTRLEN];
115 
116  assert(sepa != NULL);
117  assert(name != NULL);
118  assert(desc != NULL);
119  assert(freq >= -1);
120  assert(0.0 <= maxbounddist && maxbounddist <= 1.0);
121  assert(sepaexeclp != NULL || sepaexecsol != NULL);
122 
123  SCIP_ALLOC( BMSallocMemory(sepa) );
124  BMSclearMemory(*sepa);
125 
126  SCIP_ALLOC( BMSduplicateMemoryArray(&(*sepa)->name, name, strlen(name)+1) );
127  SCIP_ALLOC( BMSduplicateMemoryArray(&(*sepa)->desc, desc, strlen(desc)+1) );
128  (*sepa)->priority = priority;
129  (*sepa)->freq = freq;
130  (*sepa)->maxbounddist = maxbounddist;
131  (*sepa)->usessubscip = usessubscip;
132  (*sepa)->sepacopy = sepacopy;
133  (*sepa)->sepafree = sepafree;
134  (*sepa)->sepainit = sepainit;
135  (*sepa)->sepaexit = sepaexit;
136  (*sepa)->sepainitsol = sepainitsol;
137  (*sepa)->sepaexitsol = sepaexitsol;
138  (*sepa)->sepaexeclp = sepaexeclp;
139  (*sepa)->sepaexecsol = sepaexecsol;
140  (*sepa)->sepadata = sepadata;
141  SCIP_CALL( SCIPclockCreate(&(*sepa)->setuptime, SCIP_CLOCKTYPE_DEFAULT) );
142  SCIP_CALL( SCIPclockCreate(&(*sepa)->sepaclock, SCIP_CLOCKTYPE_DEFAULT) );
143  (*sepa)->lastsepanode = -1;
144  (*sepa)->ncalls = 0;
145  (*sepa)->ncutoffs = 0;
146  (*sepa)->ncutsfound = 0;
147  (*sepa)->ncutsapplied = 0;
148  (*sepa)->nconssfound = 0;
149  (*sepa)->ndomredsfound = 0;
150  (*sepa)->ncallsatnode = 0;
151  (*sepa)->ncutsfoundatnode = 0;
152  (*sepa)->lpwasdelayed = FALSE;
153  (*sepa)->solwasdelayed = FALSE;
154  (*sepa)->initialized = FALSE;
155  (*sepa)->isparentsepa = FALSE;
156  (*sepa)->parentsepa = NULL;
157 
158  /* add parameters */
159  (void) SCIPsnprintf(paramname, SCIP_MAXSTRLEN, "separating/%s/priority", name);
160  (void) SCIPsnprintf(paramdesc, SCIP_MAXSTRLEN, "priority of separator <%s>", name);
161  SCIP_CALL( SCIPsetAddIntParam(set, messagehdlr, blkmem, paramname, paramdesc,
162  &(*sepa)->priority, TRUE, priority, INT_MIN/4, INT_MAX/4,
163  paramChgdSepaPriority, (SCIP_PARAMDATA*)(*sepa)) ); /*lint !e740*/
164 
165  (void) SCIPsnprintf(paramname, SCIP_MAXSTRLEN, "separating/%s/freq", name);
166  (void) SCIPsnprintf(paramdesc, SCIP_MAXSTRLEN, "frequency for calling separator <%s> (-1: never, 0: only in root node)", name);
167  SCIP_CALL( SCIPsetAddIntParam(set, messagehdlr, blkmem, paramname, paramdesc,
168  &(*sepa)->freq, FALSE, freq, -1, SCIP_MAXTREEDEPTH, NULL, NULL) );
169 
170  (void) SCIPsnprintf(paramname, SCIP_MAXSTRLEN, "separating/%s/maxbounddist", name);
171  (void) SCIPsnprintf(paramdesc, SCIP_MAXSTRLEN, "maximal relative distance from current node's dual bound to primal bound compared to best node's dual bound for applying separator <%s> (0.0: only on current best node, 1.0: on all nodes)",
172  name);
173  SCIP_CALL( SCIPsetAddRealParam(set, messagehdlr, blkmem, paramname, paramdesc,
174  &(*sepa)->maxbounddist, TRUE, maxbounddist, 0.0, 1.0, NULL, NULL) );
175 
176  (void) SCIPsnprintf(paramname, SCIP_MAXSTRLEN, "separating/%s/delay", name);
177  SCIP_CALL( SCIPsetAddBoolParam(set, messagehdlr, blkmem, paramname,
178  "should separator be delayed, if other separators found cuts?",
179  &(*sepa)->delay, TRUE, delay, NULL, NULL) ); /*lint !e740*/
180 
181  (void) SCIPsnprintf(paramname, SCIP_MAXSTRLEN, "separating/%s/expbackoff", name);
182  (void) SCIPsnprintf(paramdesc, SCIP_MAXSTRLEN, "base for exponential increase of frequency at which separator <%s> is called (1: call at each multiple of frequency)", name);
183  SCIP_CALL( SCIPsetAddIntParam(set, messagehdlr, blkmem, paramname, paramdesc,
184  &(*sepa)->expbackoff, TRUE, 4, 1, 100, NULL, NULL) ); /*lint !e740*/
185 
186  return SCIP_OKAY;
187 }
188 
189 /** creates a separator */
191  SCIP_SEPA** sepa, /**< pointer to separator data structure */
192  SCIP_SET* set, /**< global SCIP settings */
193  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
194  BMS_BLKMEM* blkmem, /**< block memory for parameter settings */
195  const char* name, /**< name of separator */
196  const char* desc, /**< description of separator */
197  int priority, /**< priority of separator (>= 0: before, < 0: after constraint handlers) */
198  int freq, /**< frequency for calling separator */
199  SCIP_Real maxbounddist, /**< maximal relative distance from current node's dual bound to primal bound compared
200  * to best node's dual bound for applying separation */
201  SCIP_Bool usessubscip, /**< does the separator use a secondary SCIP instance? */
202  SCIP_Bool delay, /**< should separator be delayed, if other separators found cuts? */
203  SCIP_DECL_SEPACOPY ((*sepacopy)), /**< copy method of separator or NULL if you don't want to copy your plugin into sub-SCIPs */
204  SCIP_DECL_SEPAFREE ((*sepafree)), /**< destructor of separator */
205  SCIP_DECL_SEPAINIT ((*sepainit)), /**< initialize separator */
206  SCIP_DECL_SEPAEXIT ((*sepaexit)), /**< deinitialize separator */
207  SCIP_DECL_SEPAINITSOL ((*sepainitsol)), /**< solving process initialization method of separator */
208  SCIP_DECL_SEPAEXITSOL ((*sepaexitsol)), /**< solving process deinitialization method of separator */
209  SCIP_DECL_SEPAEXECLP ((*sepaexeclp)), /**< LP solution separation method of separator */
210  SCIP_DECL_SEPAEXECSOL ((*sepaexecsol)), /**< arbitrary primal solution separation method of separator */
211  SCIP_SEPADATA* sepadata /**< separator data */
212  )
213 {
214  assert(sepa != NULL);
215  assert(name != NULL);
216  assert(desc != NULL);
217  assert(freq >= -1);
218  assert(0.0 <= maxbounddist && maxbounddist <= 1.0);
219  assert(sepaexeclp != NULL || sepaexecsol != NULL);
220 
221  SCIP_CALL_FINALLY( doSepaCreate(sepa, set, messagehdlr, blkmem, name, desc, priority, freq, maxbounddist,
222  usessubscip, delay, sepacopy, sepafree, sepainit, sepaexit, sepainitsol, sepaexitsol, sepaexeclp,
223  sepaexecsol, sepadata), (void) SCIPsepaFree(sepa, set) );
224 
225  return SCIP_OKAY;
226 }
227 
228 /** calls destructor and frees memory of separator */
230  SCIP_SEPA** sepa, /**< pointer to separator data structure */
231  SCIP_SET* set /**< global SCIP settings */
232  )
233 {
234  assert(sepa != NULL);
235  if( *sepa == NULL )
236  return SCIP_OKAY;
237  assert(!(*sepa)->initialized);
238  assert(set != NULL);
239 
240  /* call destructor of separator */
241  if( (*sepa)->sepafree != NULL )
242  {
243  SCIP_CALL( (*sepa)->sepafree(set->scip, *sepa) );
244  }
245 
246  SCIPclockFree(&(*sepa)->sepaclock);
247  SCIPclockFree(&(*sepa)->setuptime);
248  BMSfreeMemoryArrayNull(&(*sepa)->name);
249  BMSfreeMemoryArrayNull(&(*sepa)->desc);
250  BMSfreeMemory(sepa);
251 
252  return SCIP_OKAY;
253 }
254 
255 /** initializes separator */
257  SCIP_SEPA* sepa, /**< separator */
258  SCIP_SET* set /**< global SCIP settings */
259  )
260 {
261  assert(sepa != NULL);
262  assert(set != NULL);
263 
264  if( sepa->initialized )
265  {
266  SCIPerrorMessage("separator <%s> already initialized\n", sepa->name);
267  return SCIP_INVALIDCALL;
268  }
269 
270  if( set->misc_resetstat )
271  {
272  SCIPclockReset(sepa->setuptime);
273  SCIPclockReset(sepa->sepaclock);
274 
275  sepa->lastsepanode = -1;
276  sepa->ncalls = 0;
277  sepa->ncutoffs = 0;
278  sepa->ncutsfound = 0;
279  sepa->ncutsapplied = 0;
280  sepa->nconssfound = 0;
281  sepa->ndomredsfound = 0;
282  sepa->ncallsatnode = 0;
283  sepa->ncutsfoundatnode = 0;
284  sepa->lpwasdelayed = FALSE;
285  sepa->solwasdelayed = FALSE;
286  }
287 
288  if( sepa->sepainit != NULL )
289  {
290  /* start timing */
291  SCIPclockStart(sepa->setuptime, set);
292 
293  SCIP_CALL( sepa->sepainit(set->scip, sepa) );
294 
295  /* stop timing */
296  SCIPclockStop(sepa->setuptime, set);
297  }
298  sepa->initialized = TRUE;
299 
300  return SCIP_OKAY;
301 }
302 
303 /** calls exit method of separator */
305  SCIP_SEPA* sepa, /**< separator */
306  SCIP_SET* set /**< global SCIP settings */
307  )
308 {
309  assert(sepa != NULL);
310  assert(set != NULL);
311 
312  if( !sepa->initialized )
313  {
314  SCIPerrorMessage("separator <%s> not initialized\n", sepa->name);
315  return SCIP_INVALIDCALL;
316  }
317 
318  if( sepa->sepaexit != NULL )
319  {
320  /* start timing */
321  SCIPclockStart(sepa->setuptime, set);
322 
323  SCIP_CALL( sepa->sepaexit(set->scip, sepa) );
324 
325  /* stop timing */
326  SCIPclockStop(sepa->setuptime, set);
327  }
328  sepa->initialized = FALSE;
329 
330  return SCIP_OKAY;
331 }
332 
333 /** informs separator that the branch and bound process is being started */
335  SCIP_SEPA* sepa, /**< separator */
336  SCIP_SET* set /**< global SCIP settings */
337  )
338 {
339  assert(sepa != NULL);
340  assert(set != NULL);
341 
342  sepa->lpwasdelayed = FALSE;
343  sepa->solwasdelayed = FALSE;
344 
345  /* call solving process initialization method of separator */
346  if( sepa->sepainitsol != NULL )
347  {
348  /* start timing */
349  SCIPclockStart(sepa->setuptime, set);
350 
351  SCIP_CALL( sepa->sepainitsol(set->scip, sepa) );
352 
353  /* stop timing */
354  SCIPclockStop(sepa->setuptime, set);
355  }
356 
357  return SCIP_OKAY;
358 }
359 
360 /** informs separator that the branch and bound process data is being freed */
362  SCIP_SEPA* sepa, /**< separator */
363  SCIP_SET* set /**< global SCIP settings */
364  )
365 {
366  assert(sepa != NULL);
367  assert(set != NULL);
368 
369  /* call solving process deinitialization method of separator */
370  if( sepa->sepaexitsol != NULL )
371  {
372  /* start timing */
373  SCIPclockStart(sepa->setuptime, set);
374 
375  SCIP_CALL( sepa->sepaexitsol(set->scip, sepa) );
376 
377  /* stop timing */
378  SCIPclockStop(sepa->setuptime, set);
379  }
380 
381  return SCIP_OKAY;
382 }
383 
384 /** calls LP separation method of separator */
386  SCIP_SEPA* sepa, /**< separator */
387  SCIP_SET* set, /**< global SCIP settings */
388  SCIP_STAT* stat, /**< dynamic problem statistics */
389  SCIP_SEPASTORE* sepastore, /**< separation storage */
390  int depth, /**< depth of current node */
391  SCIP_Real bounddist, /**< current relative distance of local dual bound to global dual bound */
392  SCIP_Bool allowlocal, /**< should the separator be asked to separate local cuts */
393  SCIP_Bool execdelayed, /**< execute separator even if it is marked to be delayed */
394  SCIP_RESULT* result /**< pointer to store the result of the callback method */
395  )
396 {
397  assert(sepa != NULL);
398  assert(sepa->freq >= -1);
399  assert(0.0 <= sepa->maxbounddist && sepa->maxbounddist <= 1.0);
400  assert(0.0 <= bounddist && bounddist <= 1.0);
401  assert(set != NULL);
402  assert(set->scip != NULL);
403  assert(stat != NULL);
404  assert(depth >= 0);
405  assert(result != NULL);
406 
407  if( sepa->sepaexeclp != NULL && SCIPsetIsLE(set, bounddist, sepa->maxbounddist) &&
408  ( (depth == 0 && sepa->freq != -1) ||
409  (sepa->freq > 0 && depth % sepa->freq == 0 &&
410  (sepa->expbackoff == 1 || SCIPsetIsIntegral(set, LOG2(depth * (1.0 / sepa->freq)) / LOG2((SCIP_Real)sepa->expbackoff)))) ||
411  sepa->lpwasdelayed )
412  )
413  {
414  if( (!sepa->delay && !sepa->lpwasdelayed) || execdelayed )
415  {
416  SCIP_CUTPOOL* cutpool;
417  SCIP_CUTPOOL* delayedcutpool;
418  SCIP_Longint oldndomchgs;
419  SCIP_Longint oldnprobdomchgs;
420  int oldncuts;
421  int oldnactiveconss;
422  int ncutsfound;
423 
424  SCIPsetDebugMsg(set, "executing separator <%s> on LP solution\n", sepa->name);
425 
426  cutpool = SCIPgetGlobalCutpool(set->scip);
427  delayedcutpool = SCIPgetDelayedGlobalCutpool(set->scip);
428  oldndomchgs = stat->nboundchgs + stat->nholechgs;
429  oldnprobdomchgs = stat->nprobboundchgs + stat->nprobholechgs;
430  oldncuts = SCIPsepastoreGetNCuts(sepastore) + SCIPcutpoolGetNCuts(cutpool) + SCIPcutpoolGetNCuts(delayedcutpool);
431  oldnactiveconss = stat->nactiveconss;
432 
433  /* reset the statistics for current node */
434  if( sepa->lastsepanode != stat->ntotalnodes )
435  {
436  sepa->ncallsatnode = 0;
437  sepa->ncutsfoundatnode = 0;
438  }
439 
440  /* start timing */
441  SCIPclockStart(sepa->sepaclock, set);
442 
443  /* call external separation method */
444  SCIP_CALL( sepa->sepaexeclp(set->scip, sepa, result, allowlocal, depth) );
445 
446  /* stop timing */
447  SCIPclockStop(sepa->sepaclock, set);
448 
449  /* update statistics */
450  if( *result != SCIP_DIDNOTRUN && *result != SCIP_DELAYED )
451  {
452  sepa->ncalls++;
453  sepa->ncallsatnode++;
454  sepa->lastsepanode = stat->ntotalnodes;
455  }
456  if( *result == SCIP_CUTOFF )
457  sepa->ncutoffs++;
458 
459  ncutsfound = SCIPsepastoreGetNCuts(sepastore) + SCIPcutpoolGetNCuts(cutpool) +
460  SCIPcutpoolGetNCuts(delayedcutpool) - oldncuts;
461 
462  sepa->ncutsfound += ncutsfound;
463  sepa->ncutsfoundatnode += ncutsfound;
464  sepa->nconssfound += MAX(stat->nactiveconss - oldnactiveconss, 0); /*lint !e776*/
465 
466  /* update domain reductions; therefore remove the domain
467  * reduction counts which were generated in probing mode */
468  sepa->ndomredsfound += stat->nboundchgs + stat->nholechgs - oldndomchgs;
469  sepa->ndomredsfound -= (stat->nprobboundchgs + stat->nprobholechgs - oldnprobdomchgs);
470 
471  /* evaluate result */
472  if( *result != SCIP_CUTOFF
473  && *result != SCIP_CONSADDED
474  && *result != SCIP_REDUCEDDOM
475  && *result != SCIP_SEPARATED
476  && *result != SCIP_NEWROUND
477  && *result != SCIP_DIDNOTFIND
478  && *result != SCIP_DIDNOTRUN
479  && *result != SCIP_DELAYED )
480  {
481  SCIPerrorMessage("execution method of separator <%s> returned invalid result <%d>\n",
482  sepa->name, *result);
483  return SCIP_INVALIDRESULT;
484  }
485  }
486  else
487  {
488  SCIPsetDebugMsg(set, "separator <%s> was delayed\n", sepa->name);
489  *result = SCIP_DELAYED;
490  }
491 
492  /* remember whether separator was delayed */
493  sepa->lpwasdelayed = (*result == SCIP_DELAYED);
494  }
495  else
496  *result = SCIP_DIDNOTRUN;
497 
498  return SCIP_OKAY;
499 }
500 
501 /** calls primal solution separation method of separator */
503  SCIP_SEPA* sepa, /**< separator */
504  SCIP_SET* set, /**< global SCIP settings */
505  SCIP_STAT* stat, /**< dynamic problem statistics */
506  SCIP_SEPASTORE* sepastore, /**< separation storage */
507  SCIP_SOL* sol, /**< primal solution that should be separated */
508  int depth, /**< depth of current node */
509  SCIP_Bool allowlocal, /**< should the separator allow local cuts */
510  SCIP_Bool execdelayed, /**< execute separator even if it is marked to be delayed */
511  SCIP_RESULT* result /**< pointer to store the result of the callback method */
512  )
513 {
514  assert(sepa != NULL);
515  assert(sepa->freq >= -1);
516  assert(set != NULL);
517  assert(set->scip != NULL);
518  assert(stat != NULL);
519  assert(depth >= 0);
520  assert(result != NULL);
521 
522  if( sepa->sepaexecsol != NULL &&
523  ( (depth == 0 && sepa->freq != -1) ||
524  (sepa->freq > 0 && depth % sepa->freq == 0 &&
525  (sepa->expbackoff == 1 || SCIPsetIsIntegral(set, LOG2(depth * (1.0 / sepa->freq) / LOG2((SCIP_Real)sepa->expbackoff))))) ||
526  sepa->solwasdelayed )
527  )
528  {
529  if( (!sepa->delay && !sepa->solwasdelayed) || execdelayed )
530  {
531  SCIP_Longint oldndomchgs;
532  SCIP_Longint oldnprobdomchgs;
533  int oldncuts;
534  int oldnactiveconss;
535  int ncutsfound;
536 
537  SCIPsetDebugMsg(set, "executing separator <%s> on solution %p\n", sepa->name, (void*)sol);
538 
539  oldndomchgs = stat->nboundchgs + stat->nholechgs;
540  oldnprobdomchgs = stat->nprobboundchgs + stat->nprobholechgs;
541  oldncuts = SCIPsepastoreGetNCuts(sepastore);
542  oldnactiveconss = stat->nactiveconss;
543 
544  /* reset the statistics for current node */
545  if( sepa->lastsepanode != stat->ntotalnodes )
546  {
547  sepa->ncallsatnode = 0;
548  sepa->ncutsfoundatnode = 0;
549  }
550 
551  /* start timing */
552  SCIPclockStart(sepa->sepaclock, set);
553 
554  /* call external separation method */
555  SCIP_CALL( sepa->sepaexecsol(set->scip, sepa, sol, result, allowlocal, depth) );
556 
557  /* stop timing */
558  SCIPclockStop(sepa->sepaclock, set);
559 
560  /* update statistics */
561  if( *result != SCIP_DIDNOTRUN && *result != SCIP_DELAYED )
562  {
563  sepa->ncalls++;
564  sepa->ncallsatnode++;
565  sepa->lastsepanode = stat->ntotalnodes;
566  }
567  if( *result == SCIP_CUTOFF )
568  sepa->ncutoffs++;
569  ncutsfound = SCIPsepastoreGetNCuts(sepastore) - oldncuts;
570  sepa->ncutsfound += ncutsfound;
571  sepa->ncutsfoundatnode += ncutsfound;
572  sepa->nconssfound += MAX(stat->nactiveconss - oldnactiveconss, 0); /*lint !e776*/
573 
574  /* update domain reductions; therefore remove the domain
575  * reduction counts which were generated in probing mode */
576  sepa->ndomredsfound += stat->nboundchgs + stat->nholechgs - oldndomchgs;
577  sepa->ndomredsfound -= (stat->nprobboundchgs + stat->nprobholechgs - oldnprobdomchgs);
578 
579  /* evaluate result */
580  if( *result != SCIP_CUTOFF
581  && *result != SCIP_CONSADDED
582  && *result != SCIP_REDUCEDDOM
583  && *result != SCIP_SEPARATED
584  && *result != SCIP_NEWROUND
585  && *result != SCIP_DIDNOTFIND
586  && *result != SCIP_DIDNOTRUN
587  && *result != SCIP_DELAYED )
588  {
589  SCIPerrorMessage("execution method of separator <%s> returned invalid result <%d>\n",
590  sepa->name, *result);
591  return SCIP_INVALIDRESULT;
592  }
593  }
594  else
595  {
596  SCIPsetDebugMsg(set, "separator <%s> was delayed\n", sepa->name);
597  *result = SCIP_DELAYED;
598  }
599 
600  /* remember whether separator was delayed */
601  sepa->solwasdelayed = (*result == SCIP_DELAYED);
602  }
603  else
604  *result = SCIP_DIDNOTRUN;
605 
606  return SCIP_OKAY;
607 }
608 
609 /** gets user data of separator */
611  SCIP_SEPA* sepa /**< separator */
612  )
613 {
614  assert(sepa != NULL);
615 
616  return sepa->sepadata;
617 }
618 
619 /** sets user data of separator; user has to free old data in advance! */
621  SCIP_SEPA* sepa, /**< separator */
622  SCIP_SEPADATA* sepadata /**< new separator user data */
623  )
624 {
625  assert(sepa != NULL);
626 
627  sepa->sepadata = sepadata;
628 }
629 
630 /* new callback/method setter methods */
631 
632 /** sets copy method of separator */
634  SCIP_SEPA* sepa, /**< separator */
635  SCIP_DECL_SEPACOPY ((*sepacopy)) /**< copy method of separator or NULL if you don't want to copy your plugin into sub-SCIPs */
636  )
637 {
638  assert(sepa != NULL);
639 
640  sepa->sepacopy = sepacopy;
641 }
642 
643 /** sets destructor method of separator */
645  SCIP_SEPA* sepa, /**< separator */
646  SCIP_DECL_SEPAFREE ((*sepafree)) /**< destructor of separator */
647  )
648 {
649  assert(sepa != NULL);
650 
651  sepa->sepafree = sepafree;
652 }
653 
654 /** sets initialization method of separator */
656  SCIP_SEPA* sepa, /**< separator */
657  SCIP_DECL_SEPAINIT ((*sepainit)) /**< initialize separator */
658  )
659 {
660  assert(sepa != NULL);
661 
662  sepa->sepainit = sepainit;
663 }
664 
665 /** sets deinitialization method of separator */
667  SCIP_SEPA* sepa, /**< separator */
668  SCIP_DECL_SEPAEXIT ((*sepaexit)) /**< deinitialize separator */
669  )
670 {
671  assert(sepa != NULL);
672 
673  sepa->sepaexit = sepaexit;
674 }
675 
676 /** sets solving process initialization method of separator */
678  SCIP_SEPA* sepa, /**< separator */
679  SCIP_DECL_SEPAINITSOL ((*sepainitsol)) /**< solving process initialization method of separator */
680  )
681 {
682  assert(sepa != NULL);
683 
684  sepa->sepainitsol = sepainitsol;
685 }
686 
687 /** sets solving process deinitialization method of separator */
689  SCIP_SEPA* sepa, /**< separator */
690  SCIP_DECL_SEPAEXITSOL ((*sepaexitsol)) /**< solving process deinitialization method of separator */
691  )
692 {
693  assert(sepa != NULL);
694 
695  sepa->sepaexitsol = sepaexitsol;
696 }
697 
698 /** declares separator to be a parent separator */
700  SCIP_SEPA* sepa /**< separator */
701  )
702 {
703  assert(sepa != NULL);
704 
705  sepa->isparentsepa = TRUE;
706 }
707 
708 /** sets the parent separator */
710  SCIP_SEPA* sepa, /**< separator */
711  SCIP_SEPA* parentsepa /**< parent separator */
712  )
713 {
714  assert(sepa != NULL);
715 
716  sepa->parentsepa = parentsepa;
717 }
718 
719 /** gets name of separator */
720 const char* SCIPsepaGetName(
721  SCIP_SEPA* sepa /**< separator */
722  )
723 {
724  assert(sepa != NULL);
725 
726  return sepa->name;
727 }
728 
729 /** gets description of separator */
730 const char* SCIPsepaGetDesc(
731  SCIP_SEPA* sepa /**< separator */
732  )
733 {
734  assert(sepa != NULL);
735 
736  return sepa->desc;
737 }
738 
739 /** gets priority of separator */
741  SCIP_SEPA* sepa /**< separator */
742  )
743 {
744  assert(sepa != NULL);
745 
746  return sepa->priority;
747 }
748 
749 /** sets priority of separator */
751  SCIP_SEPA* sepa, /**< separator */
752  SCIP_SET* set, /**< global SCIP settings */
753  int priority /**< new priority of the separator */
754  )
755 {
756  assert(sepa != NULL);
757  assert(set != NULL);
758 
759  sepa->priority = priority;
760  set->sepassorted = FALSE;
761 }
762 
763 /** gets frequency of separator */
765  SCIP_SEPA* sepa /**< separator */
766  )
767 {
768  assert(sepa != NULL);
769 
770  return sepa->freq;
771 }
772 
773 /** sets frequency of separator */
775  SCIP_SEPA* sepa, /**< separator */
776  int freq /**< new frequency of separator */
777  )
778 {
779  assert(sepa != NULL);
780 
781  sepa->freq = freq;
782 }
783 
784 /** get maximal bound distance at which the separator is called */
786  SCIP_SEPA* sepa /**< separator */
787  )
788 {
789  assert(sepa != NULL);
790 
791  return sepa->maxbounddist;
792 }
793 
794 /** does the separator use a secondary SCIP instance? */
796  SCIP_SEPA* sepa /**< separator */
797  )
798 {
799  assert(sepa != NULL);
800 
801  return sepa->usessubscip;
802 }
803 
804 /** enables or disables all clocks of \p sepa, depending on the value of the flag */
806  SCIP_SEPA* sepa, /**< the separator for which all clocks should be enabled or disabled */
807  SCIP_Bool enable /**< should the clocks of the separator be enabled? */
808  )
809 {
810  assert(sepa != NULL);
811 
812  SCIPclockEnableOrDisable(sepa->setuptime, enable);
813  SCIPclockEnableOrDisable(sepa->sepaclock, enable);
814 }
815 
816 /** gets time in seconds used in this separator for setting up for next stages */
818  SCIP_SEPA* sepa /**< separator */
819  )
820 {
821  assert(sepa != NULL);
822 
823  return SCIPclockGetTime(sepa->setuptime);
824 }
825 
826 /** gets time in seconds used in this separator */
828  SCIP_SEPA* sepa /**< separator */
829  )
830 {
831  assert(sepa != NULL);
832 
833  return SCIPclockGetTime(sepa->sepaclock);
834 }
835 
836 /** gets the total number of times, the separator was called */
838  SCIP_SEPA* sepa /**< separator */
839  )
840 {
841  assert(sepa != NULL);
842 
843  return sepa->ncalls;
844 }
845 
846 /** gets the number of times, the separator was called at the current node */
848  SCIP_SEPA* sepa /**< separator */
849  )
850 {
851  assert(sepa != NULL);
852 
853  return sepa->ncallsatnode;
854 }
855 
856 /** gets total number of times, the separator detected a cutoff */
858  SCIP_SEPA* sepa /**< separator */
859  )
860 {
861  assert(sepa != NULL);
862 
863  return sepa->ncutoffs;
864 }
865 
866 /** gets the total number of cutting planes found by this separator */
868  SCIP_SEPA* sepa /**< separator */
869  )
870 {
871  assert(sepa != NULL);
872 
873  return sepa->ncutsfound;
874 }
875 
876 /** gets the total number of cutting planes applied to lp */
878  SCIP_SEPA* sepa /**< separator */
879  )
880 {
881  assert(sepa != NULL);
882 
883  return sepa->ncutsapplied;
884 }
885 
886 /** increase count of applied cuts */
888  SCIP_SEPA* sepa /**< separator */
889  )
890 {
891  assert( sepa != NULL );
892 
893  ++sepa->ncutsapplied;
894 }
895 
896 /** increase count of found cuts */
898  SCIP_SEPA* sepa /**< separator */
899  )
900 {
901  assert( sepa != NULL );
902 
903  ++sepa->ncutsfound;
904 }
905 
906 /** increase count of found cuts at current node */
908  SCIP_SEPA* sepa /**< separator */
909  )
910 {
911  assert( sepa != NULL );
912 
913  ++sepa->ncutsfoundatnode;
914 }
915 
916 /** gets the number of cutting planes found by this separator at the current node */
918  SCIP_SEPA* sepa /**< separator */
919  )
920 {
921  assert(sepa != NULL);
922 
923  return sepa->ncutsfoundatnode;
924 }
925 
926 /** gets total number of additional constraints added by this separator */
928  SCIP_SEPA* sepa /**< separator */
929  )
930 {
931  assert(sepa != NULL);
932 
933  return sepa->nconssfound;
934 }
935 
936 /** gets total number of domain reductions found by this separator */
938  SCIP_SEPA* sepa /**< separator */
939  )
940 {
941  assert(sepa != NULL);
942 
943  return sepa->ndomredsfound;
944 }
945 
946 /** should separator be delayed, if other separators found cuts? */
948  SCIP_SEPA* sepa /**< separator */
949  )
950 {
951  assert(sepa != NULL);
952 
953  return sepa->delay;
954 }
955 
956 /** was separation of the LP solution delayed at the last call? */
958  SCIP_SEPA* sepa /**< separator */
959  )
960 {
961  assert(sepa != NULL);
962 
963  return sepa->lpwasdelayed;
964 }
965 
966 /** was separation of the primal solution delayed at the last call? */
968  SCIP_SEPA* sepa /**< separator */
969  )
970 {
971  assert(sepa != NULL);
972 
973  return sepa->solwasdelayed;
974 }
975 
976 /** is separator initialized? */
978  SCIP_SEPA* sepa /**< separator */
979  )
980 {
981  assert(sepa != NULL);
982 
983  return sepa->initialized;
984 }
985 
986 /** gets whether separator is a parent separator */
988  SCIP_SEPA* sepa /**< separator */
989  )
990 {
991  assert(sepa != NULL);
992 
993  return sepa->isparentsepa;
994 }
995 
996 /** gets parent separator (or NULL) */
998  SCIP_SEPA* sepa /**< separator */
999  )
1000 {
1001  assert(sepa != NULL);
1002 
1003  return sepa->parentsepa;
1004 }
enum SCIP_Result SCIP_RESULT
Definition: type_result.h:52
SCIP_Bool solwasdelayed
Definition: struct_sepa.h:69
void SCIPsepaSetFree(SCIP_SEPA *sepa, SCIP_DECL_SEPAFREE((*sepafree)))
Definition: sepa.c:644
internal methods for separators
SCIP_Bool usessubscip
Definition: struct_sepa.h:66
SCIP_SEPADATA * sepadata
Definition: struct_sepa.h:58
SCIP_Bool SCIPsetIsLE(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
Definition: set.c:6258
SCIP_SEPA * SCIPsepaGetParentsepa(SCIP_SEPA *sepa)
Definition: sepa.c:997
void SCIPsepaEnableOrDisableClocks(SCIP_SEPA *sepa, SCIP_Bool enable)
Definition: sepa.c:805
SCIP_CLOCK * setuptime
Definition: struct_sepa.h:59
#define BMSfreeMemoryArrayNull(ptr)
Definition: memory.h:141
SCIP_Bool SCIPsepaIsParentsepa(SCIP_SEPA *sepa)
Definition: sepa.c:987
SCIP_RETCODE SCIPsepaCopyInclude(SCIP_SEPA *sepa, SCIP_SET *set)
Definition: sepa.c:70
SCIP_PARAMDATA * SCIPparamGetData(SCIP_PARAM *param)
Definition: paramset.c:670
SCIP_CLOCK * sepaclock
Definition: struct_sepa.h:60
void SCIPsepaIncNAppliedCuts(SCIP_SEPA *sepa)
Definition: sepa.c:887
#define SCIP_MAXSTRLEN
Definition: def.h:293
internal methods for clocks and timing issues
SCIP_Longint ntotalnodes
Definition: struct_stat.h:78
char * name
Definition: struct_sepa.h:48
struct SCIP_ParamData SCIP_PARAMDATA
Definition: type_paramset.h:78
#define SCIP_CALL_FINALLY(x, y)
Definition: def.h:426
SCIP_Bool SCIPsepaUsesSubscip(SCIP_SEPA *sepa)
Definition: sepa.c:795
SCIP_Longint SCIPsepaGetNDomredsFound(SCIP_SEPA *sepa)
Definition: sepa.c:937
SCIP_RETCODE SCIPsepaExecSol(SCIP_SEPA *sepa, SCIP_SET *set, SCIP_STAT *stat, SCIP_SEPASTORE *sepastore, SCIP_SOL *sol, int depth, SCIP_Bool allowlocal, SCIP_Bool execdelayed, SCIP_RESULT *result)
Definition: sepa.c:502
SCIP_Real SCIPsepaGetSetupTime(SCIP_SEPA *sepa)
Definition: sepa.c:817
SCIP_Longint nholechgs
Definition: struct_stat.h:107
void SCIPclockStop(SCIP_CLOCK *clck, SCIP_SET *set)
Definition: clock.c:351
#define FALSE
Definition: def.h:87
void SCIPclockStart(SCIP_CLOCK *clck, SCIP_SET *set)
Definition: clock.c:281
int SCIPsnprintf(char *t, int len, const char *s,...)
Definition: misc.c:10755
SCIP_Real maxbounddist
Definition: struct_sepa.h:46
#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
SCIP_Bool initialized
Definition: struct_sepa.h:70
SCIP_Real SCIPsepaGetTime(SCIP_SEPA *sepa)
Definition: sepa.c:827
SCIP_Longint ncutsfound
Definition: struct_sepa.h:42
void SCIPsepaSetExit(SCIP_SEPA *sepa, SCIP_DECL_SEPAEXIT((*sepaexit)))
Definition: sepa.c:666
SCIP_Longint SCIPsepaGetNCutsFound(SCIP_SEPA *sepa)
Definition: sepa.c:867
void SCIPsepaIncNCutsFoundAtNode(SCIP_SEPA *sepa)
Definition: sepa.c:907
SCIP_RETCODE SCIPsetSepaPriority(SCIP *scip, SCIP_SEPA *sepa, int priority)
Definition: scip_sepa.c:275
int ncallsatnode
Definition: struct_sepa.h:63
SCIP_RETCODE SCIPsepaFree(SCIP_SEPA **sepa, SCIP_SET *set)
Definition: sepa.c:229
#define SCIP_DECL_SEPAEXECLP(x)
Definition: type_sepa.h:127
internal methods for handling parameter settings
void SCIPclockEnableOrDisable(SCIP_CLOCK *clck, SCIP_Bool enable)
Definition: clock.c:251
#define BMSfreeMemory(ptr)
Definition: memory.h:138
Definition: heur_padm.c:123
SCIP_DECL_SORTPTRCOMP(SCIPsepaComp)
Definition: sepa.c:43
SCIP_SEPADATA * SCIPsepaGetData(SCIP_SEPA *sepa)
Definition: sepa.c:610
SCIP_RETCODE SCIPsepaInit(SCIP_SEPA *sepa, SCIP_SET *set)
Definition: sepa.c:256
#define SCIP_DECL_SEPACOPY(x)
Definition: type_sepa.h:52
int SCIPsepaGetFreq(SCIP_SEPA *sepa)
Definition: sepa.c:764
SCIP_RETCODE SCIPsepaInitsol(SCIP_SEPA *sepa, SCIP_SET *set)
Definition: sepa.c:334
SCIP_RETCODE SCIPsepaExecLP(SCIP_SEPA *sepa, SCIP_SET *set, SCIP_STAT *stat, SCIP_SEPASTORE *sepastore, int depth, SCIP_Real bounddist, SCIP_Bool allowlocal, SCIP_Bool execdelayed, SCIP_RESULT *result)
Definition: sepa.c:385
SCIP_Longint nconssfound
Definition: struct_sepa.h:44
#define SCIPerrorMessage
Definition: pub_message.h:55
SCIP_Longint lastsepanode
Definition: struct_sepa.h:39
SCIP_Bool lpwasdelayed
Definition: struct_sepa.h:68
SCIP_Longint ncalls
Definition: struct_sepa.h:40
void SCIPclockReset(SCIP_CLOCK *clck)
Definition: clock.c:200
static SCIP_DECL_PARAMCHGD(paramChgdSepaPriority)
Definition: sepa.c:56
SCIP_Longint SCIPsepaGetNCutoffs(SCIP_SEPA *sepa)
Definition: sepa.c:857
int SCIPsepaGetNCallsAtNode(SCIP_SEPA *sepa)
Definition: sepa.c:847
int SCIPsepastoreGetNCuts(SCIP_SEPASTORE *sepastore)
Definition: sepastore.c:1091
SCIP_Real SCIPclockGetTime(SCIP_CLOCK *clck)
Definition: clock.c:429
void SCIPsepaSetData(SCIP_SEPA *sepa, SCIP_SEPADATA *sepadata)
Definition: sepa.c:620
#define NULL
Definition: lpi_spx1.cpp:155
int ncutsfoundatnode
Definition: struct_sepa.h:64
void SCIPsepaSetFreq(SCIP_SEPA *sepa, int freq)
Definition: sepa.c:774
SCIP_CUTPOOL * SCIPgetDelayedGlobalCutpool(SCIP *scip)
Definition: scip_cut.c:702
void SCIPsepaSetExitsol(SCIP_SEPA *sepa, SCIP_DECL_SEPAEXITSOL((*sepaexitsol)))
Definition: sepa.c:688
internal methods for global SCIP settings
#define SCIP_CALL(x)
Definition: def.h:384
SCIP_Real SCIPsepaGetMaxbounddist(SCIP_SEPA *sepa)
Definition: sepa.c:785
SCIP_RETCODE SCIPsetAddIntParam(SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, BMS_BLKMEM *blkmem, 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: set.c:3014
int SCIPcutpoolGetNCuts(SCIP_CUTPOOL *cutpool)
Definition: cutpool.c:1056
internal methods for storing separated cuts
const char * SCIPsepaGetDesc(SCIP_SEPA *sepa)
Definition: sepa.c:730
#define BMSduplicateMemoryArray(ptr, source, num)
Definition: memory.h:136
SCIP_Longint nprobboundchgs
Definition: struct_stat.h:108
SCIP_RETCODE SCIPclockCreate(SCIP_CLOCK **clck, SCIP_CLOCKTYPE clocktype)
Definition: clock.c:161
void SCIPsepaSetCopy(SCIP_SEPA *sepa, SCIP_DECL_SEPACOPY((*sepacopy)))
Definition: sepa.c:633
SCIP_Longint SCIPsepaGetNCalls(SCIP_SEPA *sepa)
Definition: sepa.c:837
SCIP_Bool SCIPsepaWasLPDelayed(SCIP_SEPA *sepa)
Definition: sepa.c:957
SCIP_Bool SCIPsetIsIntegral(SCIP_SET *set, SCIP_Real val)
Definition: set.c:6345
public data structures and miscellaneous methods
void SCIPsepaSetInitsol(SCIP_SEPA *sepa, SCIP_DECL_SEPAINITSOL((*sepainitsol)))
Definition: sepa.c:677
#define SCIP_Bool
Definition: def.h:84
#define SCIP_DECL_SEPAINIT(x)
Definition: type_sepa.h:68
static const char * paramname[]
Definition: lpi_msk.c:5021
SCIP_Longint SCIPsepaGetNConssFound(SCIP_SEPA *sepa)
Definition: sepa.c:927
void SCIPclockFree(SCIP_CLOCK **clck)
Definition: clock.c:176
#define MAX(x, y)
Definition: tclique_def.h:83
#define SCIPsetDebugMsg
Definition: set.h:1761
SCIP_Longint ncutoffs
Definition: struct_sepa.h:41
#define SCIP_DECL_SEPAEXITSOL(x)
Definition: type_sepa.h:98
#define SCIP_DECL_SEPAEXECSOL(x)
Definition: type_sepa.h:157
#define BMSclearMemory(ptr)
Definition: memory.h:122
SCIP_Bool delay
Definition: struct_sepa.h:67
#define SCIP_MAXTREEDEPTH
Definition: def.h:320
int SCIPparamGetInt(SCIP_PARAM *param)
Definition: paramset.c:725
void SCIPsepaSetPriority(SCIP_SEPA *sepa, SCIP_SET *set, int priority)
Definition: sepa.c:750
SCIP_Bool SCIPsepaWasSolDelayed(SCIP_SEPA *sepa)
Definition: sepa.c:967
int nactiveconss
Definition: struct_stat.h:230
SCIP_RETCODE SCIPsepaExit(SCIP_SEPA *sepa, SCIP_SET *set)
Definition: sepa.c:304
#define SCIP_DECL_SEPAEXIT(x)
Definition: type_sepa.h:76
#define SCIP_DECL_SEPAINITSOL(x)
Definition: type_sepa.h:87
public methods for message output
SCIP_Longint ncutsapplied
Definition: struct_sepa.h:43
SCIP_Longint ndomredsfound
Definition: struct_sepa.h:45
SCIP_Longint nboundchgs
Definition: struct_stat.h:106
SCIP_Bool SCIPsepaIsDelayed(SCIP_SEPA *sepa)
Definition: sepa.c:947
#define SCIP_Real
Definition: def.h:177
internal methods for problem statistics
struct SCIP_Sepa * parentsepa
Definition: struct_sepa.h:72
datastructures for separators
void SCIPsepaSetParentsepa(SCIP_SEPA *sepa, SCIP_SEPA *parentsepa)
Definition: sepa.c:709
SCIP_Longint SCIPsepaGetNCutsApplied(SCIP_SEPA *sepa)
Definition: sepa.c:877
static SCIP_RETCODE doSepaCreate(SCIP_SEPA **sepa, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, BMS_BLKMEM *blkmem, const char *name, const char *desc, int priority, int freq, SCIP_Real maxbounddist, SCIP_Bool usessubscip, SCIP_Bool delay, SCIP_DECL_SEPACOPY((*sepacopy)), SCIP_DECL_SEPAFREE((*sepafree)), SCIP_DECL_SEPAINIT((*sepainit)), SCIP_DECL_SEPAEXIT((*sepaexit)), SCIP_DECL_SEPAINITSOL((*sepainitsol)), SCIP_DECL_SEPAEXITSOL((*sepaexitsol)), SCIP_DECL_SEPAEXECLP((*sepaexeclp)), SCIP_DECL_SEPAEXECSOL((*sepaexecsol)), SCIP_SEPADATA *sepadata)
Definition: sepa.c:89
#define BMSallocMemory(ptr)
Definition: memory.h:111
void SCIPsepaIncNCutsFound(SCIP_SEPA *sepa)
Definition: sepa.c:897
#define SCIP_Longint
Definition: def.h:162
void SCIPsepaSetIsParentsepa(SCIP_SEPA *sepa)
Definition: sepa.c:699
int priority
Definition: struct_sepa.h:61
void SCIPsepaSetInit(SCIP_SEPA *sepa, SCIP_DECL_SEPAINIT((*sepainit)))
Definition: sepa.c:655
SCIP_Bool SCIPsepaIsInitialized(SCIP_SEPA *sepa)
Definition: sepa.c:977
common defines and data types used in all packages of SCIP
struct BMS_BlkMem BMS_BLKMEM
Definition: memory.h:430
SCIP_RETCODE SCIPsetAddRealParam(SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, BMS_BLKMEM *blkmem, 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: set.c:3062
SCIP_CUTPOOL * SCIPgetGlobalCutpool(SCIP *scip)
Definition: scip_cut.c:429
#define SCIP_ALLOC(x)
Definition: def.h:395
int expbackoff
Definition: struct_sepa.h:65
SCIP_RETCODE SCIPsepaExitsol(SCIP_SEPA *sepa, SCIP_SET *set)
Definition: sepa.c:361
SCIP_RETCODE SCIPsetAddBoolParam(SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, BMS_BLKMEM *blkmem, const char *name, const char *desc, SCIP_Bool *valueptr, SCIP_Bool isadvanced, SCIP_Bool defaultvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
Definition: set.c:2992
SCIP_Longint nprobholechgs
Definition: struct_stat.h:109
SCIP_Longint SCIPsepaGetNCutsFoundAtNode(SCIP_SEPA *sepa)
Definition: sepa.c:917
#define SCIP_DECL_SEPAFREE(x)
Definition: type_sepa.h:60
int SCIPsepaGetPriority(SCIP_SEPA *sepa)
Definition: sepa.c:740
struct SCIP_SepaData SCIP_SEPADATA
Definition: type_sepa.h:43
SCIP_RETCODE SCIPsepaCreate(SCIP_SEPA **sepa, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, BMS_BLKMEM *blkmem, const char *name, const char *desc, int priority, int freq, SCIP_Real maxbounddist, SCIP_Bool usessubscip, SCIP_Bool delay, SCIP_DECL_SEPACOPY((*sepacopy)), SCIP_DECL_SEPAFREE((*sepafree)), SCIP_DECL_SEPAINIT((*sepainit)), SCIP_DECL_SEPAEXIT((*sepaexit)), SCIP_DECL_SEPAINITSOL((*sepainitsol)), SCIP_DECL_SEPAEXITSOL((*sepaexitsol)), SCIP_DECL_SEPAEXECLP((*sepaexeclp)), SCIP_DECL_SEPAEXECSOL((*sepaexecsol)), SCIP_SEPADATA *sepadata)
Definition: sepa.c:190
SCIP callable library.
SCIP_Bool isparentsepa
Definition: struct_sepa.h:71
char * desc
Definition: struct_sepa.h:49