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)->ncutsadded = 0;
148  (*sepa)->ncutsaddedviapool = 0;
149  (*sepa)->ncutsaddeddirect = 0;
150  (*sepa)->ncutsappliedviapool = 0;
151  (*sepa)->ncutsapplieddirect = 0;
152  (*sepa)->nconssfound = 0;
153  (*sepa)->ndomredsfound = 0;
154  (*sepa)->ncallsatnode = 0;
155  (*sepa)->ncutsfoundatnode = 0;
156  (*sepa)->lpwasdelayed = FALSE;
157  (*sepa)->solwasdelayed = FALSE;
158  (*sepa)->initialized = FALSE;
159  (*sepa)->isparentsepa = FALSE;
160  (*sepa)->parentsepa = NULL;
161 
162  /* add parameters */
163  (void) SCIPsnprintf(paramname, SCIP_MAXSTRLEN, "separating/%s/priority", name);
164  (void) SCIPsnprintf(paramdesc, SCIP_MAXSTRLEN, "priority of separator <%s>", name);
165  SCIP_CALL( SCIPsetAddIntParam(set, messagehdlr, blkmem, paramname, paramdesc,
166  &(*sepa)->priority, TRUE, priority, INT_MIN/4, INT_MAX/4,
167  paramChgdSepaPriority, (SCIP_PARAMDATA*)(*sepa)) ); /*lint !e740*/
168 
169  (void) SCIPsnprintf(paramname, SCIP_MAXSTRLEN, "separating/%s/freq", name);
170  (void) SCIPsnprintf(paramdesc, SCIP_MAXSTRLEN, "frequency for calling separator <%s> (-1: never, 0: only in root node)", name);
171  SCIP_CALL( SCIPsetAddIntParam(set, messagehdlr, blkmem, paramname, paramdesc,
172  &(*sepa)->freq, FALSE, freq, -1, SCIP_MAXTREEDEPTH, NULL, NULL) );
173 
174  (void) SCIPsnprintf(paramname, SCIP_MAXSTRLEN, "separating/%s/maxbounddist", name);
175  (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)",
176  name);
177  SCIP_CALL( SCIPsetAddRealParam(set, messagehdlr, blkmem, paramname, paramdesc,
178  &(*sepa)->maxbounddist, TRUE, maxbounddist, 0.0, 1.0, NULL, NULL) );
179 
180  (void) SCIPsnprintf(paramname, SCIP_MAXSTRLEN, "separating/%s/delay", name);
181  SCIP_CALL( SCIPsetAddBoolParam(set, messagehdlr, blkmem, paramname,
182  "should separator be delayed, if other separators found cuts?",
183  &(*sepa)->delay, TRUE, delay, NULL, NULL) ); /*lint !e740*/
184 
185  (void) SCIPsnprintf(paramname, SCIP_MAXSTRLEN, "separating/%s/expbackoff", name);
186  (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);
187  SCIP_CALL( SCIPsetAddIntParam(set, messagehdlr, blkmem, paramname, paramdesc,
188  &(*sepa)->expbackoff, TRUE, 4, 1, 100, NULL, NULL) ); /*lint !e740*/
189 
190  return SCIP_OKAY;
191 }
192 
193 /** creates a separator */
195  SCIP_SEPA** sepa, /**< pointer to separator data structure */
196  SCIP_SET* set, /**< global SCIP settings */
197  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
198  BMS_BLKMEM* blkmem, /**< block memory for parameter settings */
199  const char* name, /**< name of separator */
200  const char* desc, /**< description of separator */
201  int priority, /**< priority of separator (>= 0: before, < 0: after constraint handlers) */
202  int freq, /**< frequency for calling separator */
203  SCIP_Real maxbounddist, /**< maximal relative distance from current node's dual bound to primal bound compared
204  * to best node's dual bound for applying separation */
205  SCIP_Bool usessubscip, /**< does the separator use a secondary SCIP instance? */
206  SCIP_Bool delay, /**< should separator be delayed, if other separators found cuts? */
207  SCIP_DECL_SEPACOPY ((*sepacopy)), /**< copy method of separator or NULL if you don't want to copy your plugin into sub-SCIPs */
208  SCIP_DECL_SEPAFREE ((*sepafree)), /**< destructor of separator */
209  SCIP_DECL_SEPAINIT ((*sepainit)), /**< initialize separator */
210  SCIP_DECL_SEPAEXIT ((*sepaexit)), /**< deinitialize separator */
211  SCIP_DECL_SEPAINITSOL ((*sepainitsol)), /**< solving process initialization method of separator */
212  SCIP_DECL_SEPAEXITSOL ((*sepaexitsol)), /**< solving process deinitialization method of separator */
213  SCIP_DECL_SEPAEXECLP ((*sepaexeclp)), /**< LP solution separation method of separator */
214  SCIP_DECL_SEPAEXECSOL ((*sepaexecsol)), /**< arbitrary primal solution separation method of separator */
215  SCIP_SEPADATA* sepadata /**< separator data */
216  )
217 {
218  assert(sepa != NULL);
219  assert(name != NULL);
220  assert(desc != NULL);
221  assert(freq >= -1);
222  assert(0.0 <= maxbounddist && maxbounddist <= 1.0);
223  assert(sepaexeclp != NULL || sepaexecsol != NULL);
224 
225  SCIP_CALL_FINALLY( doSepaCreate(sepa, set, messagehdlr, blkmem, name, desc, priority, freq, maxbounddist,
226  usessubscip, delay, sepacopy, sepafree, sepainit, sepaexit, sepainitsol, sepaexitsol, sepaexeclp,
227  sepaexecsol, sepadata), (void) SCIPsepaFree(sepa, set) );
228 
229  return SCIP_OKAY;
230 }
231 
232 /** calls destructor and frees memory of separator */
234  SCIP_SEPA** sepa, /**< pointer to separator data structure */
235  SCIP_SET* set /**< global SCIP settings */
236  )
237 {
238  assert(sepa != NULL);
239  if( *sepa == NULL )
240  return SCIP_OKAY;
241  assert(!(*sepa)->initialized);
242  assert(set != NULL);
243 
244  /* call destructor of separator */
245  if( (*sepa)->sepafree != NULL )
246  {
247  SCIP_CALL( (*sepa)->sepafree(set->scip, *sepa) );
248  }
249 
250  SCIPclockFree(&(*sepa)->sepaclock);
251  SCIPclockFree(&(*sepa)->setuptime);
252  BMSfreeMemoryArrayNull(&(*sepa)->name);
253  BMSfreeMemoryArrayNull(&(*sepa)->desc);
254  BMSfreeMemory(sepa);
255 
256  return SCIP_OKAY;
257 }
258 
259 /** initializes separator */
261  SCIP_SEPA* sepa, /**< separator */
262  SCIP_SET* set /**< global SCIP settings */
263  )
264 {
265  assert(sepa != NULL);
266  assert(set != NULL);
267 
268  if( sepa->initialized )
269  {
270  SCIPerrorMessage("separator <%s> already initialized\n", sepa->name);
271  return SCIP_INVALIDCALL;
272  }
273 
274  if( set->misc_resetstat )
275  {
276  SCIPclockReset(sepa->setuptime);
277  SCIPclockReset(sepa->sepaclock);
278 
279  sepa->lastsepanode = -1;
280  sepa->ncalls = 0;
281  sepa->nrootcalls = 0;
282  sepa->ncutoffs = 0;
283  sepa->ncutsfound = 0;
284  sepa->ncutsadded = 0;
285  sepa->ncutsaddedviapool = 0;
286  sepa->ncutsaddeddirect = 0;
287  sepa->ncutsappliedviapool = 0;
288  sepa->ncutsapplieddirect = 0;
289  sepa->nconssfound = 0;
290  sepa->ndomredsfound = 0;
291  sepa->ncallsatnode = 0;
292  sepa->ncutsfoundatnode = 0;
293  sepa->lpwasdelayed = FALSE;
294  sepa->solwasdelayed = FALSE;
295  }
296 
297  if( sepa->sepainit != NULL )
298  {
299  /* start timing */
300  SCIPclockStart(sepa->setuptime, set);
301 
302  SCIP_CALL( sepa->sepainit(set->scip, sepa) );
303 
304  /* stop timing */
305  SCIPclockStop(sepa->setuptime, set);
306  }
307  sepa->initialized = TRUE;
308 
309  return SCIP_OKAY;
310 }
311 
312 /** calls exit method of separator */
314  SCIP_SEPA* sepa, /**< separator */
315  SCIP_SET* set /**< global SCIP settings */
316  )
317 {
318  assert(sepa != NULL);
319  assert(set != NULL);
320 
321  if( !sepa->initialized )
322  {
323  SCIPerrorMessage("separator <%s> not initialized\n", sepa->name);
324  return SCIP_INVALIDCALL;
325  }
326 
327  if( sepa->sepaexit != NULL )
328  {
329  /* start timing */
330  SCIPclockStart(sepa->setuptime, set);
331 
332  SCIP_CALL( sepa->sepaexit(set->scip, sepa) );
333 
334  /* stop timing */
335  SCIPclockStop(sepa->setuptime, set);
336  }
337  sepa->initialized = FALSE;
338 
339  return SCIP_OKAY;
340 }
341 
342 /** informs separator that the branch and bound process is being started */
344  SCIP_SEPA* sepa, /**< separator */
345  SCIP_SET* set /**< global SCIP settings */
346  )
347 {
348  assert(sepa != NULL);
349  assert(set != NULL);
350 
351  sepa->lpwasdelayed = FALSE;
352  sepa->solwasdelayed = FALSE;
353 
354  /* call solving process initialization method of separator */
355  if( sepa->sepainitsol != NULL )
356  {
357  /* start timing */
358  SCIPclockStart(sepa->setuptime, set);
359 
360  SCIP_CALL( sepa->sepainitsol(set->scip, sepa) );
361 
362  /* stop timing */
363  SCIPclockStop(sepa->setuptime, set);
364  }
365 
366  return SCIP_OKAY;
367 }
368 
369 /** informs separator that the branch and bound process data is being freed */
371  SCIP_SEPA* sepa, /**< separator */
372  SCIP_SET* set /**< global SCIP settings */
373  )
374 {
375  assert(sepa != NULL);
376  assert(set != NULL);
377 
378  /* call solving process deinitialization method of separator */
379  if( sepa->sepaexitsol != NULL )
380  {
381  /* start timing */
382  SCIPclockStart(sepa->setuptime, set);
383 
384  SCIP_CALL( sepa->sepaexitsol(set->scip, sepa) );
385 
386  /* stop timing */
387  SCIPclockStop(sepa->setuptime, set);
388  }
389 
390  return SCIP_OKAY;
391 }
392 
393 /** calls LP separation method of separator */
395  SCIP_SEPA* sepa, /**< separator */
396  SCIP_SET* set, /**< global SCIP settings */
397  SCIP_STAT* stat, /**< dynamic problem statistics */
398  SCIP_SEPASTORE* sepastore, /**< separation storage */
399  int depth, /**< depth of current node */
400  SCIP_Real bounddist, /**< current relative distance of local dual bound to global dual bound */
401  SCIP_Bool allowlocal, /**< should the separator be asked to separate local cuts */
402  SCIP_Bool execdelayed, /**< execute separator even if it is marked to be delayed */
403  SCIP_RESULT* result /**< pointer to store the result of the callback method */
404  )
405 {
406  assert(sepa != NULL);
407  assert(sepa->freq >= -1);
408  assert(0.0 <= sepa->maxbounddist && sepa->maxbounddist <= 1.0);
409  assert(0.0 <= bounddist && bounddist <= 1.0);
410  assert(set != NULL);
411  assert(set->scip != NULL);
412  assert(stat != NULL);
413  assert(depth >= 0);
414  assert(result != NULL);
415 
416  if( sepa->sepaexeclp != NULL && SCIPsetIsLE(set, bounddist, sepa->maxbounddist) &&
417  ( (depth == 0 && sepa->freq != -1) ||
418  (sepa->freq > 0 && depth % sepa->freq == 0 &&
419  (sepa->expbackoff == 1 || SCIPsetIsIntegral(set, LOG2(depth * (1.0 / sepa->freq)) / LOG2((SCIP_Real)sepa->expbackoff)))) ||
420  sepa->lpwasdelayed )
421  )
422  {
423  if( (!sepa->delay && !sepa->lpwasdelayed) || execdelayed )
424  {
425  SCIP_CUTPOOL* cutpool;
426  SCIP_CUTPOOL* delayedcutpool;
427  SCIP_Longint oldndomchgs;
428  SCIP_Longint oldnprobdomchgs;
429  int oldncutsfound;
430  int oldnactiveconss;
431  int ncutsfound;
432 
433  SCIPsetDebugMsg(set, "executing separator <%s> on LP solution\n", sepa->name);
434 
435  cutpool = SCIPgetGlobalCutpool(set->scip);
436  delayedcutpool = SCIPgetDelayedGlobalCutpool(set->scip);
437  oldndomchgs = stat->nboundchgs + stat->nholechgs;
438  oldnprobdomchgs = stat->nprobboundchgs + stat->nprobholechgs;
439  oldncutsfound = SCIPsepastoreGetNCuts(sepastore) + SCIPcutpoolGetNCuts(cutpool) + SCIPcutpoolGetNCuts(delayedcutpool);
440 
441  oldnactiveconss = stat->nactiveconss;
442 
443  /* reset the statistics for current node */
444  if( sepa->lastsepanode != stat->ntotalnodes )
445  {
446  sepa->ncallsatnode = 0;
447  sepa->ncutsfoundatnode = 0;
448  }
449 
450  /* start timing */
451  SCIPclockStart(sepa->sepaclock, set);
452 
453  /* call external separation method */
454  SCIP_CALL( sepa->sepaexeclp(set->scip, sepa, result, allowlocal, depth) );
455 
456  /* stop timing */
457  SCIPclockStop(sepa->sepaclock, set);
458 
459  /* update statistics */
460  if( *result != SCIP_DIDNOTRUN && *result != SCIP_DELAYED )
461  {
462  sepa->ncalls++;
463  if( depth == 0 )
464  sepa->nrootcalls++;
465  sepa->ncallsatnode++;
466  sepa->lastsepanode = stat->ntotalnodes;
467  }
468  if( *result == SCIP_CUTOFF )
469  sepa->ncutoffs++;
470 
471  ncutsfound = SCIPsepastoreGetNCuts(sepastore) + SCIPcutpoolGetNCuts(cutpool) + SCIPcutpoolGetNCuts(delayedcutpool) - oldncutsfound;
472  sepa->ncutsfound += ncutsfound;
473  sepa->ncutsfoundatnode += ncutsfound;
474  sepa->nconssfound += MAX(stat->nactiveconss - oldnactiveconss, 0); /*lint !e776*/
475 
476  /* update domain reductions; therefore remove the domain
477  * reduction counts which were generated in probing mode */
478  sepa->ndomredsfound += stat->nboundchgs + stat->nholechgs - oldndomchgs;
479  sepa->ndomredsfound -= (stat->nprobboundchgs + stat->nprobholechgs - oldnprobdomchgs);
480 
481  /* evaluate result */
482  if( *result != SCIP_CUTOFF
483  && *result != SCIP_CONSADDED
484  && *result != SCIP_REDUCEDDOM
485  && *result != SCIP_SEPARATED
486  && *result != SCIP_NEWROUND
487  && *result != SCIP_DIDNOTFIND
488  && *result != SCIP_DIDNOTRUN
489  && *result != SCIP_DELAYED )
490  {
491  SCIPerrorMessage("execution method of separator <%s> returned invalid result <%d>\n",
492  sepa->name, *result);
493  return SCIP_INVALIDRESULT;
494  }
495  }
496  else
497  {
498  SCIPsetDebugMsg(set, "separator <%s> was delayed\n", sepa->name);
499  *result = SCIP_DELAYED;
500  }
501 
502  /* remember whether separator was delayed */
503  sepa->lpwasdelayed = (*result == SCIP_DELAYED);
504  }
505  else
506  *result = SCIP_DIDNOTRUN;
507 
508  return SCIP_OKAY;
509 }
510 
511 /** calls primal solution separation method of separator */
513  SCIP_SEPA* sepa, /**< separator */
514  SCIP_SET* set, /**< global SCIP settings */
515  SCIP_STAT* stat, /**< dynamic problem statistics */
516  SCIP_SEPASTORE* sepastore, /**< separation storage */
517  SCIP_SOL* sol, /**< primal solution that should be separated */
518  int depth, /**< depth of current node */
519  SCIP_Bool allowlocal, /**< should the separator allow local cuts */
520  SCIP_Bool execdelayed, /**< execute separator even if it is marked to be delayed */
521  SCIP_RESULT* result /**< pointer to store the result of the callback method */
522  )
523 {
524  assert(sepa != NULL);
525  assert(sepa->freq >= -1);
526  assert(set != NULL);
527  assert(set->scip != NULL);
528  assert(stat != NULL);
529  assert(depth >= 0);
530  assert(result != NULL);
531 
532  if( sepa->sepaexecsol != NULL &&
533  ( (depth == 0 && sepa->freq != -1) ||
534  (sepa->freq > 0 && depth % sepa->freq == 0 &&
535  (sepa->expbackoff == 1 || SCIPsetIsIntegral(set, LOG2(depth * (1.0 / sepa->freq) / LOG2((SCIP_Real)sepa->expbackoff))))) ||
536  sepa->solwasdelayed )
537  )
538  {
539  if( (!sepa->delay && !sepa->solwasdelayed) || execdelayed )
540  {
541  SCIP_Longint oldndomchgs;
542  SCIP_Longint oldnprobdomchgs;
543  int oldncutsfound;
544  int oldnactiveconss;
545  int ncutsfound;
546 
547  SCIPsetDebugMsg(set, "executing separator <%s> on solution %p\n", sepa->name, (void*)sol);
548 
549  oldndomchgs = stat->nboundchgs + stat->nholechgs;
550  oldnprobdomchgs = stat->nprobboundchgs + stat->nprobholechgs;
551  oldncutsfound = SCIPsepastoreGetNCuts(sepastore);
552  oldnactiveconss = stat->nactiveconss;
553 
554  /* reset the statistics for current node */
555  if( sepa->lastsepanode != stat->ntotalnodes )
556  {
557  sepa->ncallsatnode = 0;
558  sepa->ncutsfoundatnode = 0;
559  }
560 
561  /* start timing */
562  SCIPclockStart(sepa->sepaclock, set);
563 
564  /* call external separation method */
565  SCIP_CALL( sepa->sepaexecsol(set->scip, sepa, sol, result, allowlocal, depth) );
566 
567  /* stop timing */
568  SCIPclockStop(sepa->sepaclock, set);
569 
570  /* update statistics */
571  if( *result != SCIP_DIDNOTRUN && *result != SCIP_DELAYED )
572  {
573  sepa->ncalls++;
574  if( depth == 0 )
575  sepa->nrootcalls++;
576  sepa->ncallsatnode++;
577  sepa->lastsepanode = stat->ntotalnodes;
578  }
579  if( *result == SCIP_CUTOFF )
580  sepa->ncutoffs++;
581 
582  ncutsfound = SCIPsepastoreGetNCuts(sepastore) - oldncutsfound;
583 
584  sepa->ncutsfound += ncutsfound;
585  sepa->ncutsfoundatnode += ncutsfound;
586  sepa->nconssfound += MAX(stat->nactiveconss - oldnactiveconss, 0); /*lint !e776*/
587 
588  /* update domain reductions; therefore remove the domain
589  * reduction counts which were generated in probing mode */
590  sepa->ndomredsfound += stat->nboundchgs + stat->nholechgs - oldndomchgs;
591  sepa->ndomredsfound -= (stat->nprobboundchgs + stat->nprobholechgs - oldnprobdomchgs);
592 
593  /* evaluate result */
594  if( *result != SCIP_CUTOFF
595  && *result != SCIP_CONSADDED
596  && *result != SCIP_REDUCEDDOM
597  && *result != SCIP_SEPARATED
598  && *result != SCIP_NEWROUND
599  && *result != SCIP_DIDNOTFIND
600  && *result != SCIP_DIDNOTRUN
601  && *result != SCIP_DELAYED )
602  {
603  SCIPerrorMessage("execution method of separator <%s> returned invalid result <%d>\n",
604  sepa->name, *result);
605  return SCIP_INVALIDRESULT;
606  }
607  }
608  else
609  {
610  SCIPsetDebugMsg(set, "separator <%s> was delayed\n", sepa->name);
611  *result = SCIP_DELAYED;
612  }
613 
614  /* remember whether separator was delayed */
615  sepa->solwasdelayed = (*result == SCIP_DELAYED);
616  }
617  else
618  *result = SCIP_DIDNOTRUN;
619 
620  return SCIP_OKAY;
621 }
622 
623 /** gets user data of separator */
625  SCIP_SEPA* sepa /**< separator */
626  )
627 {
628  assert(sepa != NULL);
629 
630  return sepa->sepadata;
631 }
632 
633 /** sets user data of separator; user has to free old data in advance! */
635  SCIP_SEPA* sepa, /**< separator */
636  SCIP_SEPADATA* sepadata /**< new separator user data */
637  )
638 {
639  assert(sepa != NULL);
640 
641  sepa->sepadata = sepadata;
642 }
643 
644 /* new callback/method setter methods */
645 
646 /** sets copy method of separator */
648  SCIP_SEPA* sepa, /**< separator */
649  SCIP_DECL_SEPACOPY ((*sepacopy)) /**< copy method of separator or NULL if you don't want to copy your plugin into sub-SCIPs */
650  )
651 {
652  assert(sepa != NULL);
653 
654  sepa->sepacopy = sepacopy;
655 }
656 
657 /** sets destructor method of separator */
659  SCIP_SEPA* sepa, /**< separator */
660  SCIP_DECL_SEPAFREE ((*sepafree)) /**< destructor of separator */
661  )
662 {
663  assert(sepa != NULL);
664 
665  sepa->sepafree = sepafree;
666 }
667 
668 /** sets initialization method of separator */
670  SCIP_SEPA* sepa, /**< separator */
671  SCIP_DECL_SEPAINIT ((*sepainit)) /**< initialize separator */
672  )
673 {
674  assert(sepa != NULL);
675 
676  sepa->sepainit = sepainit;
677 }
678 
679 /** sets deinitialization method of separator */
681  SCIP_SEPA* sepa, /**< separator */
682  SCIP_DECL_SEPAEXIT ((*sepaexit)) /**< deinitialize separator */
683  )
684 {
685  assert(sepa != NULL);
686 
687  sepa->sepaexit = sepaexit;
688 }
689 
690 /** sets solving process initialization method of separator */
692  SCIP_SEPA* sepa, /**< separator */
693  SCIP_DECL_SEPAINITSOL ((*sepainitsol)) /**< solving process initialization method of separator */
694  )
695 {
696  assert(sepa != NULL);
697 
698  sepa->sepainitsol = sepainitsol;
699 }
700 
701 /** sets solving process deinitialization method of separator */
703  SCIP_SEPA* sepa, /**< separator */
704  SCIP_DECL_SEPAEXITSOL ((*sepaexitsol)) /**< solving process deinitialization method of separator */
705  )
706 {
707  assert(sepa != NULL);
708 
709  sepa->sepaexitsol = sepaexitsol;
710 }
711 
712 /** declares separator to be a parent separator */
714  SCIP_SEPA* sepa /**< separator */
715  )
716 {
717  assert(sepa != NULL);
718 
719  sepa->isparentsepa = TRUE;
720 }
721 
722 /** sets the parent separator */
724  SCIP_SEPA* sepa, /**< separator */
725  SCIP_SEPA* parentsepa /**< parent separator */
726  )
727 {
728  assert(sepa != NULL);
729 
730  sepa->parentsepa = parentsepa;
731 }
732 
733 /** gets name of separator */
734 const char* SCIPsepaGetName(
735  SCIP_SEPA* sepa /**< separator */
736  )
737 {
738  assert(sepa != NULL);
739 
740  return sepa->name;
741 }
742 
743 /** gets description of separator */
744 const char* SCIPsepaGetDesc(
745  SCIP_SEPA* sepa /**< separator */
746  )
747 {
748  assert(sepa != NULL);
749 
750  return sepa->desc;
751 }
752 
753 /** gets priority of separator */
755  SCIP_SEPA* sepa /**< separator */
756  )
757 {
758  assert(sepa != NULL);
759 
760  return sepa->priority;
761 }
762 
763 /** sets priority of separator */
765  SCIP_SEPA* sepa, /**< separator */
766  SCIP_SET* set, /**< global SCIP settings */
767  int priority /**< new priority of the separator */
768  )
769 {
770  assert(sepa != NULL);
771  assert(set != NULL);
772 
773  sepa->priority = priority;
774  set->sepassorted = FALSE;
775 }
776 
777 /** gets frequency of separator */
779  SCIP_SEPA* sepa /**< separator */
780  )
781 {
782  assert(sepa != NULL);
783 
784  return sepa->freq;
785 }
786 
787 /** sets frequency of separator */
789  SCIP_SEPA* sepa, /**< separator */
790  int freq /**< new frequency of separator */
791  )
792 {
793  assert(sepa != NULL);
794 
795  sepa->freq = freq;
796 }
797 
798 /** get maximal bound distance at which the separator is called */
800  SCIP_SEPA* sepa /**< separator */
801  )
802 {
803  assert(sepa != NULL);
804 
805  return sepa->maxbounddist;
806 }
807 
808 /** does the separator use a secondary SCIP instance? */
810  SCIP_SEPA* sepa /**< separator */
811  )
812 {
813  assert(sepa != NULL);
814 
815  return sepa->usessubscip;
816 }
817 
818 /** enables or disables all clocks of \p sepa, depending on the value of the flag */
820  SCIP_SEPA* sepa, /**< the separator for which all clocks should be enabled or disabled */
821  SCIP_Bool enable /**< should the clocks of the separator be enabled? */
822  )
823 {
824  assert(sepa != NULL);
825 
826  SCIPclockEnableOrDisable(sepa->setuptime, enable);
827  SCIPclockEnableOrDisable(sepa->sepaclock, enable);
828 }
829 
830 /** gets time in seconds used in this separator for setting up for next stages */
832  SCIP_SEPA* sepa /**< separator */
833  )
834 {
835  assert(sepa != NULL);
836 
837  return SCIPclockGetTime(sepa->setuptime);
838 }
839 
840 /** gets time in seconds used in this separator */
842  SCIP_SEPA* sepa /**< separator */
843  )
844 {
845  assert(sepa != NULL);
846 
847  return SCIPclockGetTime(sepa->sepaclock);
848 }
849 
850 /** gets the total number of times the separator was called */
852  SCIP_SEPA* sepa /**< separator */
853  )
854 {
855  assert(sepa != NULL);
856 
857  return sepa->ncalls;
858 }
859 
860 /** gets the total number of times the separator was called at the root */
862  SCIP_SEPA* sepa /**< separator */
863  )
864 {
865  assert(sepa != NULL);
866 
867  return sepa->nrootcalls;
868 }
869 
870 /** gets the number of times, the separator was called at the current node */
872  SCIP_SEPA* sepa /**< separator */
873  )
874 {
875  assert(sepa != NULL);
876 
877  return sepa->ncallsatnode;
878 }
879 
880 /** gets total number of times, the separator detected a cutoff */
882  SCIP_SEPA* sepa /**< separator */
883  )
884 {
885  assert(sepa != NULL);
886 
887  return sepa->ncutoffs;
888 }
889 
890 /** gets the total number of cutting planes added from the separator to the cut pool */
892  SCIP_SEPA* sepa /**< separator */
893  )
894 {
895  assert(sepa != NULL);
896 
897  return sepa->ncutsfound;
898 }
899 
900 /** gets the total number of cutting planes added from the separator to the sepastore;
901  * equal to the sum of added cuts directly and via the pool. */
903  SCIP_SEPA* sepa /**< separator */
904  )
905 {
906  assert(sepa != NULL);
907 
908  return sepa->ncutsadded;
909 }
910 
911 /** gets the number of cutting planes found by the separator added to the sepastore via the cut pool */
913  SCIP_SEPA* sepa /**< separator */
914  )
915 {
916  assert(sepa != NULL);
917 
918  return sepa->ncutsaddedviapool;
919 }
920 
921 /** gets the number of cutting planes found by the separator added directly to the sepastore */
923  SCIP_SEPA* sepa /**< separator */
924  )
925 {
926  assert(sepa != NULL);
927 
928  return sepa->ncutsaddeddirect;
929 }
930 
931 /** gets the total number of cutting planes of the separator finally applied to the LP */
933  SCIP_SEPA* sepa /**< separator */
934  )
935 {
936  assert(sepa != NULL);
937 
938  return sepa->ncutsappliedviapool + sepa->ncutsapplieddirect;
939 }
940 
941 /** gets the total number of cutting planes of the separator applied to the LP via the cutpool */
943  SCIP_SEPA* sepa /**< separator */
944  )
945 {
946  assert(sepa != NULL);
947 
948  return sepa->ncutsappliedviapool;
949 }
950 
951 /** gets the total number of cutting planes of the separator applied to the LP via the sepastore directly */
953  SCIP_SEPA* sepa /**< separator */
954  )
955 {
956  assert(sepa != NULL);
957 
958  return sepa->ncutsapplieddirect;
959 }
960 
961 /** increase count of applied cuts by one */
963  SCIP_SEPA* sepa, /**< separator */
964  SCIP_Bool fromcutpool /**< whether the cuts were added from the cutpool to sepastore */
965  )
966 {
967  SCIP_SEPA* parentsepa;
968 
969  assert( sepa != NULL );
970 
971  if( fromcutpool )
972  ++sepa->ncutsappliedviapool;
973  else
974  ++sepa->ncutsapplieddirect;
975 
976  parentsepa = SCIPsepaGetParentsepa(sepa);
977  if( parentsepa != NULL )
978  {
979  SCIPsepaIncNCutsApplied(parentsepa, fromcutpool);
980  }
981 }
982 
983 /** increase count of added cuts by one */
985  SCIP_SEPA* sepa, /**< separator */
986  SCIP_Bool fromcutpool /**< whether the cuts were added from the cutpool to sepastore */
987  )
988 {
989  SCIP_SEPA* parentsepa;
990 
991  assert( sepa != NULL );
992 
993  ++sepa->ncutsadded;
994  if( fromcutpool )
995  sepa->ncutsaddedviapool++;
996  else
997  sepa->ncutsaddeddirect++;
998 
999  parentsepa = SCIPsepaGetParentsepa(sepa);
1000  if( parentsepa != NULL )
1001  {
1002  SCIPsepaIncNCutsAdded(parentsepa, fromcutpool);
1003  }
1004 }
1005 
1006 /** decrease the count of added cuts by one */
1008  SCIP_SEPA* sepa, /**< separator */
1009  SCIP_Bool fromcutpool /**< whether the cuts were added from the cutpool to sepastore */
1010  )
1011 {
1012  SCIP_SEPA* parentsepa;
1013 
1014  assert( sepa != NULL );
1015 
1016  sepa->ncutsadded--;
1017  if( fromcutpool )
1018  sepa->ncutsaddedviapool--;
1019  else
1020  sepa->ncutsaddeddirect--;
1021 
1022  parentsepa = SCIPsepaGetParentsepa(sepa);
1023  if( parentsepa != NULL )
1024  {
1025  SCIPsepaDecNCutsAdded(parentsepa, fromcutpool);
1026  }
1027 }
1028 
1029 /** increase count of found cuts by one */
1031  SCIP_SEPA* sepa /**< separator */
1032  )
1033 {
1034  assert( sepa != NULL );
1035 
1036  ++sepa->ncutsfound;
1037 }
1038 
1039 /** increase count of found cuts at current node by one */
1041  SCIP_SEPA* sepa /**< separator */
1042  )
1043 {
1044  assert( sepa != NULL );
1045 
1046  ++sepa->ncutsfoundatnode;
1047 }
1048 
1049 /** gets the number of cutting planes found by this separator at the current node */
1051  SCIP_SEPA* sepa /**< separator */
1052  )
1053 {
1054  assert(sepa != NULL);
1055 
1056  return sepa->ncutsfoundatnode;
1057 }
1058 
1059 /** gets total number of additional constraints added by this separator */
1061  SCIP_SEPA* sepa /**< separator */
1062  )
1063 {
1064  assert(sepa != NULL);
1065 
1066  return sepa->nconssfound;
1067 }
1068 
1069 /** gets total number of domain reductions found by this separator */
1071  SCIP_SEPA* sepa /**< separator */
1072  )
1073 {
1074  assert(sepa != NULL);
1075 
1076  return sepa->ndomredsfound;
1077 }
1078 
1079 /** should separator be delayed, if other separators found cuts? */
1081  SCIP_SEPA* sepa /**< separator */
1082  )
1083 {
1084  assert(sepa != NULL);
1085 
1086  return sepa->delay;
1087 }
1088 
1089 /** was separation of the LP solution delayed at the last call? */
1091  SCIP_SEPA* sepa /**< separator */
1092  )
1093 {
1094  assert(sepa != NULL);
1095 
1096  return sepa->lpwasdelayed;
1097 }
1098 
1099 /** was separation of the primal solution delayed at the last call? */
1101  SCIP_SEPA* sepa /**< separator */
1102  )
1103 {
1104  assert(sepa != NULL);
1105 
1106  return sepa->solwasdelayed;
1107 }
1108 
1109 /** is separator initialized? */
1111  SCIP_SEPA* sepa /**< separator */
1112  )
1113 {
1114  assert(sepa != NULL);
1115 
1116  return sepa->initialized;
1117 }
1118 
1119 /** gets whether separator is a parent separator */
1121  SCIP_SEPA* sepa /**< separator */
1122  )
1123 {
1124  assert(sepa != NULL);
1125 
1126  return sepa->isparentsepa;
1127 }
1128 
1129 /** gets parent separator (or NULL) */
1131  SCIP_SEPA* sepa /**< separator */
1132  )
1133 {
1134  assert(sepa != NULL);
1135 
1136  return sepa->parentsepa;
1137 }
enum SCIP_Result SCIP_RESULT
Definition: type_result.h:52
SCIP_Bool solwasdelayed
Definition: struct_sepa.h:75
void SCIPsepaSetFree(SCIP_SEPA *sepa, SCIP_DECL_SEPAFREE((*sepafree)))
Definition: sepa.c:658
internal methods for separators
SCIP_Bool usessubscip
Definition: struct_sepa.h:72
SCIP_SEPADATA * sepadata
Definition: struct_sepa.h:64
SCIP_Bool SCIPsetIsLE(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
Definition: set.c:6264
SCIP_SEPA * SCIPsepaGetParentsepa(SCIP_SEPA *sepa)
Definition: sepa.c:1130
void SCIPsepaEnableOrDisableClocks(SCIP_SEPA *sepa, SCIP_Bool enable)
Definition: sepa.c:819
SCIP_CLOCK * setuptime
Definition: struct_sepa.h:65
#define BMSfreeMemoryArrayNull(ptr)
Definition: memory.h:141
SCIP_Bool SCIPsepaIsParentsepa(SCIP_SEPA *sepa)
Definition: sepa.c:1120
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:66
#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:54
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:809
SCIP_Longint SCIPsepaGetNDomredsFound(SCIP_SEPA *sepa)
Definition: sepa.c:1070
SCIP_Longint SCIPsepaGetNCutsAppliedViaPool(SCIP_SEPA *sepa)
Definition: sepa.c:942
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:512
SCIP_Real SCIPsepaGetSetupTime(SCIP_SEPA *sepa)
Definition: sepa.c:831
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
SCIP_Longint ncutsapplieddirect
Definition: struct_sepa.h:49
int SCIPsnprintf(char *t, int len, const char *s,...)
Definition: misc.c:10755
SCIP_Real maxbounddist
Definition: struct_sepa.h:52
#define TRUE
Definition: def.h:86
const char * SCIPsepaGetName(SCIP_SEPA *sepa)
Definition: sepa.c:734
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:54
SCIP_Bool initialized
Definition: struct_sepa.h:76
SCIP_Real SCIPsepaGetTime(SCIP_SEPA *sepa)
Definition: sepa.c:841
SCIP_Longint ncutsfound
Definition: struct_sepa.h:43
void SCIPsepaSetExit(SCIP_SEPA *sepa, SCIP_DECL_SEPAEXIT((*sepaexit)))
Definition: sepa.c:680
SCIP_Longint SCIPsepaGetNCutsFound(SCIP_SEPA *sepa)
Definition: sepa.c:891
SCIP_Longint SCIPsepaGetNCutsAdded(SCIP_SEPA *sepa)
Definition: sepa.c:902
void SCIPsepaIncNCutsFoundAtNode(SCIP_SEPA *sepa)
Definition: sepa.c:1040
SCIP_RETCODE SCIPsetSepaPriority(SCIP *scip, SCIP_SEPA *sepa, int priority)
Definition: scip_sepa.c:275
int ncallsatnode
Definition: struct_sepa.h:69
SCIP_RETCODE SCIPsepaFree(SCIP_SEPA **sepa, SCIP_SET *set)
Definition: sepa.c:233
#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_Longint nrootcalls
Definition: struct_sepa.h:41
SCIP_DECL_SORTPTRCOMP(SCIPsepaComp)
Definition: sepa.c:43
SCIP_SEPADATA * SCIPsepaGetData(SCIP_SEPA *sepa)
Definition: sepa.c:624
void SCIPsepaDecNCutsAdded(SCIP_SEPA *sepa, SCIP_Bool fromcutpool)
Definition: sepa.c:1007
SCIP_RETCODE SCIPsepaInit(SCIP_SEPA *sepa, SCIP_SET *set)
Definition: sepa.c:260
#define SCIP_DECL_SEPACOPY(x)
Definition: type_sepa.h:52
int SCIPsepaGetFreq(SCIP_SEPA *sepa)
Definition: sepa.c:778
SCIP_RETCODE SCIPsepaInitsol(SCIP_SEPA *sepa, SCIP_SET *set)
Definition: sepa.c:343
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:394
SCIP_Longint nconssfound
Definition: struct_sepa.h:50
#define SCIPerrorMessage
Definition: pub_message.h:55
SCIP_Longint lastsepanode
Definition: struct_sepa.h:39
SCIP_Longint SCIPsepaGetNRootCalls(SCIP_SEPA *sepa)
Definition: sepa.c:861
SCIP_Bool lpwasdelayed
Definition: struct_sepa.h:74
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:881
int SCIPsepaGetNCallsAtNode(SCIP_SEPA *sepa)
Definition: sepa.c:871
int SCIPsepastoreGetNCuts(SCIP_SEPASTORE *sepastore)
Definition: sepastore.c:1140
SCIP_Real SCIPclockGetTime(SCIP_CLOCK *clck)
Definition: clock.c:429
void SCIPsepaSetData(SCIP_SEPA *sepa, SCIP_SEPADATA *sepadata)
Definition: sepa.c:634
#define NULL
Definition: lpi_spx1.cpp:155
int ncutsfoundatnode
Definition: struct_sepa.h:70
void SCIPsepaSetFreq(SCIP_SEPA *sepa, int freq)
Definition: sepa.c:788
SCIP_CUTPOOL * SCIPgetDelayedGlobalCutpool(SCIP *scip)
Definition: scip_cut.c:702
SCIP_Longint ncutsaddedviapool
Definition: struct_sepa.h:46
void SCIPsepaSetExitsol(SCIP_SEPA *sepa, SCIP_DECL_SEPAEXITSOL((*sepaexitsol)))
Definition: sepa.c:702
internal methods for global SCIP settings
#define SCIP_CALL(x)
Definition: def.h:384
SCIP_Longint ncutsappliedviapool
Definition: struct_sepa.h:48
SCIP_Real SCIPsepaGetMaxbounddist(SCIP_SEPA *sepa)
Definition: sepa.c:799
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:3020
int SCIPcutpoolGetNCuts(SCIP_CUTPOOL *cutpool)
Definition: cutpool.c:1066
internal methods for storing separated cuts
const char * SCIPsepaGetDesc(SCIP_SEPA *sepa)
Definition: sepa.c:744
#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:647
SCIP_Longint SCIPsepaGetNCalls(SCIP_SEPA *sepa)
Definition: sepa.c:851
void SCIPsepaIncNCutsAdded(SCIP_SEPA *sepa, SCIP_Bool fromcutpool)
Definition: sepa.c:984
SCIP_Bool SCIPsepaWasLPDelayed(SCIP_SEPA *sepa)
Definition: sepa.c:1090
SCIP_Bool SCIPsetIsIntegral(SCIP_SET *set, SCIP_Real val)
Definition: set.c:6351
public data structures and miscellaneous methods
void SCIPsepaSetInitsol(SCIP_SEPA *sepa, SCIP_DECL_SEPAINITSOL((*sepainitsol)))
Definition: sepa.c:691
#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:5031
SCIP_Longint SCIPsepaGetNConssFound(SCIP_SEPA *sepa)
Definition: sepa.c:1060
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 SCIPsepaGetNCutsAddedViaPool(SCIP_SEPA *sepa)
Definition: sepa.c:912
SCIP_Longint SCIPsepaGetNCutsAddedDirect(SCIP_SEPA *sepa)
Definition: sepa.c:922
SCIP_Longint ncutoffs
Definition: struct_sepa.h:42
SCIP_Longint SCIPsepaGetNCutsAppliedDirect(SCIP_SEPA *sepa)
Definition: sepa.c:952
#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_Longint ncutsaddeddirect
Definition: struct_sepa.h:47
SCIP_Bool delay
Definition: struct_sepa.h:73
#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:764
SCIP_Bool SCIPsepaWasSolDelayed(SCIP_SEPA *sepa)
Definition: sepa.c:1100
void SCIPsepaIncNCutsApplied(SCIP_SEPA *sepa, SCIP_Bool fromcutpool)
Definition: sepa.c:962
int nactiveconss
Definition: struct_stat.h:230
SCIP_RETCODE SCIPsepaExit(SCIP_SEPA *sepa, SCIP_SET *set)
Definition: sepa.c:313
#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 ndomredsfound
Definition: struct_sepa.h:51
SCIP_Longint nboundchgs
Definition: struct_stat.h:106
SCIP_Bool SCIPsepaIsDelayed(SCIP_SEPA *sepa)
Definition: sepa.c:1080
#define SCIP_Real
Definition: def.h:177
internal methods for problem statistics
struct SCIP_Sepa * parentsepa
Definition: struct_sepa.h:78
datastructures for separators
void SCIPsepaSetParentsepa(SCIP_SEPA *sepa, SCIP_SEPA *parentsepa)
Definition: sepa.c:723
SCIP_Longint SCIPsepaGetNCutsApplied(SCIP_SEPA *sepa)
Definition: sepa.c:932
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:1030
#define SCIP_Longint
Definition: def.h:162
void SCIPsepaSetIsParentsepa(SCIP_SEPA *sepa)
Definition: sepa.c:713
int priority
Definition: struct_sepa.h:67
void SCIPsepaSetInit(SCIP_SEPA *sepa, SCIP_DECL_SEPAINIT((*sepainit)))
Definition: sepa.c:669
SCIP_Bool SCIPsepaIsInitialized(SCIP_SEPA *sepa)
Definition: sepa.c:1110
SCIP_Longint ncutsadded
Definition: struct_sepa.h:44
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:3068
SCIP_CUTPOOL * SCIPgetGlobalCutpool(SCIP *scip)
Definition: scip_cut.c:429
#define SCIP_ALLOC(x)
Definition: def.h:395
int expbackoff
Definition: struct_sepa.h:71
SCIP_RETCODE SCIPsepaExitsol(SCIP_SEPA *sepa, SCIP_SET *set)
Definition: sepa.c:370
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:2998
SCIP_Longint nprobholechgs
Definition: struct_stat.h:109
SCIP_Longint SCIPsepaGetNCutsFoundAtNode(SCIP_SEPA *sepa)
Definition: sepa.c:1050
#define SCIP_DECL_SEPAFREE(x)
Definition: type_sepa.h:60
int SCIPsepaGetPriority(SCIP_SEPA *sepa)
Definition: sepa.c:754
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:194
SCIP callable library.
SCIP_Bool isparentsepa
Definition: struct_sepa.h:77
char * desc
Definition: struct_sepa.h:55