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