Scippy

SCIP

Solving Constraint Integer Programs

cutsel.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-2023 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 cutsel.c
26  * @ingroup OTHER_CFILES
27  * @brief methods for cut selectors
28  * @author Felipe Serrano
29  * @author Mark Turner
30  */
31 
32 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
33 
34 #include <assert.h>
35 
36 #include "scip/set.h"
37 #include "scip/clock.h"
38 #include "scip/paramset.h"
39 #include "scip/scip.h"
40 #include "scip/cutsel.h"
41 
42 #include "scip/struct_cutsel.h"
43 
44 
45 /** method to call, when the priority of a cut selector was changed */
46 static
47 SCIP_DECL_PARAMCHGD(paramChgdCutselPriority)
48 { /*lint --e{715}*/
49  SCIP_PARAMDATA* paramdata;
50 
51  paramdata = SCIPparamGetData(param);
52  assert(paramdata != NULL);
53 
54  /* use SCIPsetCutselPriority() to mark the cutsels unsorted */
55  SCIP_CALL( SCIPsetCutselPriority(scip, (SCIP_CUTSEL*)paramdata, SCIPparamGetInt(param)) ); /*lint !e740*/
56 
57  return SCIP_OKAY;
58 }
59 
60 /** internal method for creating a cut selector */
61 static
63  SCIP_CUTSEL** cutsel, /**< pointer to store cut selector */
64  SCIP_SET* set, /**< global SCIP settings */
65  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
66  BMS_BLKMEM* blkmem, /**< block memory for parameter settings */
67  const char* name, /**< name of cut selector */
68  const char* desc, /**< description of cut selector */
69  int priority, /**< priority of the cut selector */
70  SCIP_DECL_CUTSELCOPY ((*cutselcopy)), /**< copy method of cut selector or NULL if you don't want to copy your plugin into sub-SCIPs */
71  SCIP_DECL_CUTSELFREE ((*cutselfree)), /**< destructor of cut selector */
72  SCIP_DECL_CUTSELINIT ((*cutselinit)), /**< initialize cut selector */
73  SCIP_DECL_CUTSELEXIT ((*cutselexit)), /**< deinitialize cut selector */
74  SCIP_DECL_CUTSELINITSOL((*cutselinitsol)),/**< solving process initialization method of cut selector */
75  SCIP_DECL_CUTSELEXITSOL((*cutselexitsol)),/**< solving process deinitialization method of cut selector */
76  SCIP_DECL_CUTSELSELECT((*cutselselect)), /**< cut selection method */
77  SCIP_CUTSELDATA* cutseldata /**< cut selector data */
78  )
79 {
81  char paramdesc[SCIP_MAXSTRLEN];
82 
83  assert(cutsel != NULL);
84  assert(name != NULL);
85  assert(desc != NULL);
86  assert(cutselselect != NULL);
87 
88  SCIP_ALLOC( BMSallocMemory(cutsel) );
89  BMSclearMemory(*cutsel);
90 
91  SCIP_ALLOC( BMSduplicateMemoryArray(&(*cutsel)->name, name, strlen(name)+1) );
92  SCIP_ALLOC( BMSduplicateMemoryArray(&(*cutsel)->desc, desc, strlen(desc)+1) );
93  (*cutsel)->priority = priority;
94  (*cutsel)->cutselcopy = cutselcopy;
95  (*cutsel)->cutselfree = cutselfree;
96  (*cutsel)->cutselinit = cutselinit;
97  (*cutsel)->cutselexit = cutselexit;
98  (*cutsel)->cutselinitsol = cutselinitsol;
99  (*cutsel)->cutselexitsol = cutselexitsol;
100  (*cutsel)->cutselselect = cutselselect;
101  (*cutsel)->cutseldata = cutseldata;
102  (*cutsel)->ncalls = 0;
103  (*cutsel)->nrootcalls = 0;
104  (*cutsel)->nrootcutsselected = 0;
105  (*cutsel)->nrootcutsforced = 0;
106  (*cutsel)->nrootcutsfiltered = 0;
107  (*cutsel)->nlocalcutsselected = 0;
108  (*cutsel)->nlocalcutsforced = 0;
109  (*cutsel)->nlocalcutsfiltered = 0;
110  (*cutsel)->initialized = FALSE;
111 
112  /* create clocks */
113  SCIP_CALL( SCIPclockCreate(&(*cutsel)->setuptime, SCIP_CLOCKTYPE_DEFAULT) );
114  SCIP_CALL( SCIPclockCreate(&(*cutsel)->cutseltime, SCIP_CLOCKTYPE_DEFAULT) );
115 
116  /* add parameters */
117  (void) SCIPsnprintf(paramname, SCIP_MAXSTRLEN, "cutselection/%s/priority", name);
118  (void) SCIPsnprintf(paramdesc, SCIP_MAXSTRLEN, "priority of cut selection rule <%s>", name);
119  SCIP_CALL( SCIPsetAddIntParam(set, messagehdlr, blkmem, paramname, paramdesc,
120  &(*cutsel)->priority, FALSE, priority, INT_MIN/4, INT_MAX/2,
121  paramChgdCutselPriority, (SCIP_PARAMDATA*)(*cutsel)) ); /*lint !e740*/
122 
123  return SCIP_OKAY;
124 }
125 
126 
127 /** creates a cut selector */
129  SCIP_CUTSEL** cutsel, /**< pointer to store cut selector */
130  SCIP_SET* set, /**< global SCIP settings */
131  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
132  BMS_BLKMEM* blkmem, /**< block memory for parameter settings */
133  const char* name, /**< name of cut selector */
134  const char* desc, /**< description of cut selector */
135  int priority, /**< priority of the cut selector in standard mode */
136  SCIP_DECL_CUTSELCOPY ((*cutselcopy)), /**< copy method of cut selector or NULL if you don't want to copy your plugin into sub-SCIPs */
137  SCIP_DECL_CUTSELFREE ((*cutselfree)), /**< destructor of cut selector */
138  SCIP_DECL_CUTSELINIT ((*cutselinit)), /**< initialize cut selector */
139  SCIP_DECL_CUTSELEXIT ((*cutselexit)), /**< deinitialize cut selector */
140  SCIP_DECL_CUTSELINITSOL((*cutselinitsol)),/**< solving process initialization method of cut selector */
141  SCIP_DECL_CUTSELEXITSOL((*cutselexitsol)),/**< solving process deinitialization method of cut selector */
142  SCIP_DECL_CUTSELSELECT((*cutselselect)), /**< cut selection method */
143  SCIP_CUTSELDATA* cutseldata /**< cut selector data */
144  )
145 {
146  assert(cutsel != NULL);
147  assert(name != NULL);
148  assert(desc != NULL);
149  assert(cutselselect != NULL);
150 
151  SCIP_CALL_FINALLY( doCutselCreate(cutsel, set, messagehdlr, blkmem, name, desc, priority,
152  cutselcopy, cutselfree, cutselinit, cutselexit, cutselinitsol, cutselexitsol, cutselselect,
153  cutseldata), (void) SCIPcutselFree(cutsel, set) );
154 
155  return SCIP_OKAY;
156 }
157 
158 /** gets name of cut selector */
159 const char* SCIPcutselGetName(
160  SCIP_CUTSEL* cutsel /**< cut selector */
161  )
162 {
163  assert(cutsel != NULL);
164 
165  return cutsel->name;
166 }
167 
168 /** calls cut selectors to select cuts */
170  SCIP_SET* set, /**< global SCIP settings */
171  SCIP_ROW** cuts, /**< array with cuts to select from */
172  int ncuts, /**< length of cuts */
173  int nforcedcuts, /**< number of forced cuts at start of given array */
174  SCIP_Bool root, /**< are we at the root node? */
175  SCIP_Bool initiallp, /**< is the separation storage currently being filled with the initial LP rows? */
176  int maxnselectedcuts, /**< maximum number of cuts to be selected */
177  int* nselectedcuts /**< pointer to return number of selected cuts */
178  )
179 {
180  int i;
181  SCIP_RESULT result = SCIP_DIDNOTFIND;
182 
183  assert(nselectedcuts != NULL);
184 
185  /* sort the cut selectors by priority */
186  SCIPsetSortCutsels(set);
187 
188  /* Redefine maxnselectedcuts to be w.r.t the optional cuts. */
189  maxnselectedcuts -= nforcedcuts;
190 
191  /* try all cut selectors until one succeeds */
192  *nselectedcuts = 0;
193  for( i = 0; i < set->ncutsels && result == SCIP_DIDNOTFIND; ++i )
194  {
195  SCIP_CUTSEL* cutsel;
196 
197  cutsel = set->cutsels[i];
198 
199  assert(cutsel != NULL);
200  assert(ncuts - nforcedcuts > 0);
201  assert(maxnselectedcuts > 0);
202 
203  /* start timing */
204  SCIPclockStart(cutsel->cutseltime, set);
205 
206  SCIP_CALL( cutsel->cutselselect(set->scip, cutsel, &(cuts[nforcedcuts]), ncuts - nforcedcuts, cuts, nforcedcuts,
207  root, maxnselectedcuts, nselectedcuts, &result) );
208 
209  /* stop timing */
210  SCIPclockStop(cutsel->cutseltime, set);
211 
212  assert(*nselectedcuts <= maxnselectedcuts);
213  assert(result == SCIP_SUCCESS || result == SCIP_DIDNOTFIND);
214  assert(result != SCIP_DIDNOTFIND || *nselectedcuts == 0);
215 
216  ++cutsel->ncalls;
217  if( root )
218  ++cutsel->nrootcalls;
219 
220  if( result != SCIP_DIDNOTFIND && !initiallp )
221  {
222  assert(0 <= ncuts);
223  assert(0 <= *nselectedcuts && *nselectedcuts <= ncuts);
224 
225  if( root )
226  {
227  cutsel->nrootcutsselected += *nselectedcuts;
228  cutsel->nrootcutsforced += nforcedcuts;
229  cutsel->nrootcutsfiltered += ncuts - *nselectedcuts; /*lint !e776*/
230  }
231  else
232  {
233  cutsel->nlocalcutsselected += *nselectedcuts;
234  cutsel->nlocalcutsforced += nforcedcuts;
235  cutsel->nlocalcutsfiltered += ncuts - *nselectedcuts; /*lint !e776*/
236  }
237  }
238  }
239 
240  return SCIP_OKAY;
241 }
242 
243 /** gets description of cut selector */
244 const char* SCIPcutselGetDesc(
245  SCIP_CUTSEL* cutsel /**< cut selector */
246  )
247 {
248  assert(cutsel != NULL);
249 
250  return cutsel->desc;
251 }
252 
253 /** copies the given cut selector to a new scip */
255  SCIP_CUTSEL* cutsel, /**< cut selector */
256  SCIP_SET* set /**< SCIP_SET of SCIP to copy to */
257  )
258 {
259  assert(cutsel != NULL);
260  assert(set != NULL);
261  assert(set->scip != NULL);
262 
263  if( cutsel->cutselcopy != NULL )
264  {
265  SCIPsetDebugMsg(set, "including cut selector %s in subscip %p\n", SCIPcutselGetName(cutsel), (void*)set->scip);
266  SCIP_CALL( cutsel->cutselcopy(set->scip, cutsel) );
267  }
268  return SCIP_OKAY;
269 }
270 
271 /** frees memory of cut selector */
273  SCIP_CUTSEL** cutsel, /**< pointer to cut selector data structure */
274  SCIP_SET* set /**< global SCIP settings */
275  )
276 {
277  assert(cutsel != NULL);
278 
279  if( *cutsel == NULL )
280  return SCIP_OKAY;
281 
282  assert(!(*cutsel)->initialized);
283  assert(set != NULL);
284 
285  /* call destructor of cut selector */
286  if( (*cutsel)->cutselfree != NULL )
287  {
288  SCIP_CALL( (*cutsel)->cutselfree(set->scip, *cutsel) );
289  }
290 
291  /* free clocks */
292  SCIPclockFree(&(*cutsel)->cutseltime);
293  SCIPclockFree(&(*cutsel)->setuptime);
294 
295  BMSfreeMemoryArrayNull(&(*cutsel)->name);
296  BMSfreeMemoryArrayNull(&(*cutsel)->desc);
297  BMSfreeMemory(cutsel);
298 
299  return SCIP_OKAY;
300 }
301 
302 /** initializes cut selector */
304  SCIP_CUTSEL* cutsel, /**< cut selector */
305  SCIP_SET* set /**< global SCIP settings */
306  )
307 {
308  assert(cutsel != NULL);
309  assert(set != NULL);
310 
311  if( cutsel->initialized )
312  {
313  SCIPerrorMessage("cut selector <%s> already initialized", cutsel->name);
314  return SCIP_INVALIDCALL;
315  }
316 
317  if( set->misc_resetstat )
318  {
319  SCIPclockReset(cutsel->setuptime);
320  SCIPclockReset(cutsel->cutseltime);
321  }
322 
323  if( cutsel->cutselinit != NULL )
324  {
325  /* start timing */
326  SCIPclockStart(cutsel->setuptime, set);
327 
328  SCIP_CALL( cutsel->cutselinit(set->scip, cutsel) );
329 
330  /* stop timing */
331  SCIPclockStop(cutsel->setuptime, set);
332  }
333 
334  cutsel->initialized = TRUE;
335 
336  return SCIP_OKAY;
337 }
338 
339 /** deinitializes cut selector */
341  SCIP_CUTSEL* cutsel, /**< cut selector */
342  SCIP_SET* set /**< global SCIP settings */
343  )
344 {
345  assert(cutsel != NULL);
346  assert(set != NULL);
347 
348  if( !cutsel->initialized )
349  {
350  SCIPerrorMessage("cut selector <%s> not initialized", cutsel->name);
351  return SCIP_INVALIDCALL;
352  }
353 
354  if( cutsel->cutselexit != NULL )
355  {
356  /* start timing */
357  SCIPclockStart(cutsel->setuptime, set);
358 
359  SCIP_CALL( cutsel->cutselexit(set->scip, cutsel) );
360 
361  /* stop timing */
362  SCIPclockStop(cutsel->setuptime, set);
363  }
364  cutsel->initialized = FALSE;
365 
366  return SCIP_OKAY;
367 }
368 
369 /** informs cut selector that the branch and bound process is being started */
371  SCIP_CUTSEL* cutsel, /**< cut selector */
372  SCIP_SET* set /**< global SCIP settings */
373  )
374 {
375  assert(cutsel != NULL);
376  assert(set != NULL);
377 
378  /* call solving process initialization method of cut selector */
379  if( cutsel->cutselinitsol != NULL )
380  {
381  /* start timing */
382  SCIPclockStart(cutsel->setuptime, set);
383 
384  SCIP_CALL( cutsel->cutselinitsol(set->scip, cutsel) );
385 
386  /* stop timing */
387  SCIPclockStop(cutsel->setuptime, set);
388  }
389 
390  return SCIP_OKAY;
391 }
392 
393 /** informs cut selector that the branch and bound process is being started */
395  SCIP_CUTSEL* cutsel, /**< cut selector */
396  SCIP_SET* set /**< global SCIP settings */
397  )
398 {
399  assert(cutsel != NULL);
400  assert(set != NULL);
401 
402  /* call solving process deinitialization method of cut selector */
403  if( cutsel->cutselexitsol != NULL )
404  {
405  /* start timing */
406  SCIPclockStart(cutsel->setuptime, set);
407 
408  SCIP_CALL( cutsel->cutselexitsol(set->scip, cutsel) );
409 
410  /* stop timing */
411  SCIPclockStop(cutsel->setuptime, set);
412  }
413 
414  return SCIP_OKAY;
415 }
416 
417 /** gets user data of cut selector */
419  SCIP_CUTSEL* cutsel /**< cut selector */
420  )
421 {
422  assert(cutsel != NULL);
423 
424  return cutsel->cutseldata;
425 }
426 
427 /** sets user data of cut selector; user has to free old data in advance! */
429  SCIP_CUTSEL* cutsel, /**< cut selector */
430  SCIP_CUTSELDATA* cutseldata /**< new cut selector user data */
431  )
432 {
433  assert(cutsel != NULL);
434 
435  cutsel->cutseldata = cutseldata;
436 }
437 
438 /** gets priority of cut selector */
440  SCIP_CUTSEL* cutsel /**< cut selector */
441  )
442 {
443  assert(cutsel != NULL);
444 
445  return cutsel->priority;
446 }
447 
448 /** enables or disables all clocks of @p cutsel, depending on the value of the flag */
450  SCIP_CUTSEL* cutsel, /**< the cut selector for which all clocks should be enabled or disabled */
451  SCIP_Bool enable /**< should the clocks of the cut selector be enabled? */
452  )
453 {
454  assert(cutsel != NULL);
455 
456  SCIPclockEnableOrDisable(cutsel->setuptime, enable);
457  SCIPclockEnableOrDisable(cutsel->cutseltime, enable);
458 }
459 
460 
461 /* new callback/method setter methods */
462 
463 /** sets copy method of cut selector */
465  SCIP_CUTSEL* cutsel, /**< cut selector */
466  SCIP_DECL_CUTSELCOPY ((*cutselcopy)) /**< copy method of cut selector or NULL if you don't want to copy your plugin into sub-SCIPs */
467  )
468 {
469  assert(cutsel != NULL);
470 
471  cutsel->cutselcopy = cutselcopy;
472 }
473 
474 /** sets destructor method of cut selector */
476  SCIP_CUTSEL* cutsel, /**< cut selector */
477  SCIP_DECL_CUTSELFREE ((*cutselfree)) /**< destructor of cut selector */
478  )
479 {
480  assert(cutsel != NULL);
481 
482  cutsel->cutselfree = cutselfree;
483 }
484 
485 /** sets initialization method of cut selector */
487  SCIP_CUTSEL* cutsel, /**< cut selector */
488  SCIP_DECL_CUTSELINIT ((*cutselinit)) /**< initialize cut selector */
489  )
490 {
491  assert(cutsel != NULL);
492 
493  cutsel->cutselinit = cutselinit;
494 }
495 
496 /** sets deinitialization method of cut selector */
498  SCIP_CUTSEL* cutsel, /**< cut selector */
499  SCIP_DECL_CUTSELEXIT ((*cutselexit)) /**< deinitialize cut selector */
500  )
501 {
502  assert(cutsel != NULL);
503 
504  cutsel->cutselexit = cutselexit;
505 }
506 
507 /** sets solving process initialization method of cut selector */
509  SCIP_CUTSEL* cutsel, /**< cut selector */
510  SCIP_DECL_CUTSELINITSOL ((*cutselinitsol))/**< solving process initialization method of cut selector */
511  )
512 {
513  assert(cutsel != NULL);
514 
515  cutsel->cutselinitsol = cutselinitsol;
516 }
517 
518 /** sets solving process deinitialization method of cut selector */
520  SCIP_CUTSEL* cutsel, /**< cut selector */
521  SCIP_DECL_CUTSELEXITSOL ((*cutselexitsol))/**< solving process deinitialization method of cut selector */
522  )
523 {
524  assert(cutsel != NULL);
525 
526  cutsel->cutselexitsol = cutselexitsol;
527 }
528 
529 /** sets priority of cut selector */
531  SCIP_CUTSEL* cutsel, /**< cut selector */
532  SCIP_SET* set, /**< global SCIP settings */
533  int priority /**< new priority of the cut selector */
534  )
535 {
536  assert(cutsel != NULL);
537  assert(set != NULL);
538 
539  cutsel->priority = priority;
540  set->cutselssorted = FALSE;
541 }
542 
543 /** is cut selector initialized? */
545  SCIP_CUTSEL* cutsel /**< cut selector */
546  )
547 {
548  assert(cutsel != NULL);
549 
550  return cutsel->initialized;
551 }
552 
553 /** gets time in seconds used in this cut selector for setting up for next stages */
555  SCIP_CUTSEL* cutsel /**< cut selector */
556  )
557 {
558  assert(cutsel != NULL);
559 
560  return SCIPclockGetTime(cutsel->setuptime);
561 }
562 
563 /** gets time in seconds used in this cut selector */
565  SCIP_CUTSEL* cutsel /**< cut selector */
566  )
567 {
568  assert(cutsel != NULL);
569 
570  return SCIPclockGetTime(cutsel->cutseltime);
571 }
572 
573 /** get number of times the cutselector was called */
575  SCIP_CUTSEL* cutsel /**< cut selector */
576  )
577 {
578  assert(cutsel != NULL);
579 
580  return cutsel->ncalls;
581 }
582 
583 /** get number of times the cutselector was called at the root */
585  SCIP_CUTSEL* cutsel /**< cut selector */
586  )
587 {
588  assert(cutsel != NULL);
589 
590  return cutsel->nrootcalls;
591 }
592 
593 /** get total number of cuts that were selected at the root */
595  SCIP_CUTSEL* cutsel /**< cut selector */
596  )
597 {
598  assert(cutsel != NULL);
599 
600  return cutsel->nrootcutsselected;
601 }
602 
603 /** get total number of forced cuts that were selected at the root */
605  SCIP_CUTSEL* cutsel /**< cut selector */
606  )
607 {
608  assert(cutsel != NULL);
609 
610  return cutsel->nrootcutsforced;
611 }
612 
613 /** get total number of root cuts that were filtered */
615  SCIP_CUTSEL* cutsel /**< cut selector */
616  )
617 {
618  assert(cutsel != NULL);
619 
620  return cutsel->nrootcutsfiltered;
621 }
622 
623 /** get total number of local cuts that were selected */
625  SCIP_CUTSEL* cutsel /**< cut selector */
626  )
627 {
628  assert(cutsel != NULL);
629 
630  return cutsel->nlocalcutsselected;
631 }
632 
633 /** get total number of forced local cuts that were selected */
635  SCIP_CUTSEL* cutsel /**< cut selector */
636  )
637 {
638  assert(cutsel != NULL);
639 
640  return cutsel->nlocalcutsforced;
641 }
642 
643 /** get total number of local cuts that were filtered */
645  SCIP_CUTSEL* cutsel /**< cut selector */
646  )
647 {
648  assert(cutsel != NULL);
649 
650  return cutsel->nlocalcutsfiltered;
651 }
652 
653 /** compares two cut selectors w. r. to their priority */
654 SCIP_DECL_SORTPTRCOMP(SCIPcutselComp)
655 { /*lint --e{715}*/
656  return ((SCIP_CUTSEL*)elem2)->priority - ((SCIP_CUTSEL*)elem1)->priority;
657 }
enum SCIP_Result SCIP_RESULT
Definition: type_result.h:61
const char * SCIPcutselGetName(SCIP_CUTSEL *cutsel)
Definition: cutsel.c:159
SCIP_RETCODE SCIPcutselFree(SCIP_CUTSEL **cutsel, SCIP_SET *set)
Definition: cutsel.c:272
SCIP_RETCODE SCIPcutselExitsol(SCIP_CUTSEL *cutsel, SCIP_SET *set)
Definition: cutsel.c:394
#define BMSfreeMemoryArrayNull(ptr)
Definition: memory.h:150
SCIP_CUTSELDATA * SCIPcutselGetData(SCIP_CUTSEL *cutsel)
Definition: cutsel.c:418
SCIP_PARAMDATA * SCIPparamGetData(SCIP_PARAM *param)
Definition: paramset.c:679
#define SCIP_DECL_CUTSELINITSOL(x)
Definition: type_cutsel.h:97
#define SCIP_MAXSTRLEN
Definition: def.h:302
internal methods for clocks and timing issues
struct SCIP_CutselData SCIP_CUTSELDATA
Definition: type_cutsel.h:53
SCIP_Longint SCIPcutselGetNCalls(SCIP_CUTSEL *cutsel)
Definition: cutsel.c:574
struct SCIP_ParamData SCIP_PARAMDATA
Definition: type_paramset.h:87
#define SCIP_CALL_FINALLY(x, y)
Definition: def.h:436
SCIP_Longint SCIPcutselGetNRootForcedCuts(SCIP_CUTSEL *cutsel)
Definition: cutsel.c:604
SCIP_RETCODE SCIPcutselCreate(SCIP_CUTSEL **cutsel, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, BMS_BLKMEM *blkmem, const char *name, const char *desc, int priority, SCIP_DECL_CUTSELCOPY((*cutselcopy)), SCIP_DECL_CUTSELFREE((*cutselfree)), SCIP_DECL_CUTSELINIT((*cutselinit)), SCIP_DECL_CUTSELEXIT((*cutselexit)), SCIP_DECL_CUTSELINITSOL((*cutselinitsol)), SCIP_DECL_CUTSELEXITSOL((*cutselexitsol)), SCIP_DECL_CUTSELSELECT((*cutselselect)), SCIP_CUTSELDATA *cutseldata)
Definition: cutsel.c:128
SCIP_Longint nrootcutsselected
Definition: struct_cutsel.h:64
static SCIP_RETCODE doCutselCreate(SCIP_CUTSEL **cutsel, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, BMS_BLKMEM *blkmem, const char *name, const char *desc, int priority, SCIP_DECL_CUTSELCOPY((*cutselcopy)), SCIP_DECL_CUTSELFREE((*cutselfree)), SCIP_DECL_CUTSELINIT((*cutselinit)), SCIP_DECL_CUTSELEXIT((*cutselexit)), SCIP_DECL_CUTSELINITSOL((*cutselinitsol)), SCIP_DECL_CUTSELEXITSOL((*cutselexitsol)), SCIP_DECL_CUTSELSELECT((*cutselselect)), SCIP_CUTSELDATA *cutseldata)
Definition: cutsel.c:62
void SCIPcutselSetPriority(SCIP_CUTSEL *cutsel, SCIP_SET *set, int priority)
Definition: cutsel.c:530
SCIP_Bool initialized
Definition: struct_cutsel.h:61
void SCIPclockStop(SCIP_CLOCK *clck, SCIP_SET *set)
Definition: clock.c:360
#define FALSE
Definition: def.h:96
internal methods for cut selectors
void SCIPclockStart(SCIP_CLOCK *clck, SCIP_SET *set)
Definition: clock.c:290
static SCIP_DECL_PARAMCHGD(paramChgdCutselPriority)
Definition: cutsel.c:47
int SCIPsnprintf(char *t, int len, const char *s,...)
Definition: misc.c:10788
#define TRUE
Definition: def.h:95
void SCIPsetSortCutsels(SCIP_SET *set)
Definition: set.c:4374
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:63
SCIP_Longint nrootcutsfiltered
Definition: struct_cutsel.h:66
#define SCIP_DECL_CUTSELEXIT(x)
Definition: type_cutsel.h:86
void SCIPcutselEnableOrDisableClocks(SCIP_CUTSEL *cutsel, SCIP_Bool enable)
Definition: cutsel.c:449
SCIP_Longint SCIPcutselGetNRootCutsFiltered(SCIP_CUTSEL *cutsel)
Definition: cutsel.c:614
internal methods for handling parameter settings
void SCIPcutselSetData(SCIP_CUTSEL *cutsel, SCIP_CUTSELDATA *cutseldata)
Definition: cutsel.c:428
void SCIPclockEnableOrDisable(SCIP_CLOCK *clck, SCIP_Bool enable)
Definition: clock.c:260
#define BMSfreeMemory(ptr)
Definition: memory.h:147
SCIP_Longint nlocalcutsfiltered
Definition: struct_cutsel.h:69
Definition: heur_padm.c:132
#define SCIP_DECL_CUTSELSELECT(x)
Definition: type_cutsel.h:132
SCIP_CLOCK * setuptime
Definition: struct_cutsel.h:57
void SCIPcutselSetCopy(SCIP_CUTSEL *cutsel, SCIP_DECL_CUTSELCOPY((*cutselcopy)))
Definition: cutsel.c:464
SCIP_DECL_SORTPTRCOMP(SCIPcutselComp)
Definition: cutsel.c:654
SCIP_Longint nrootcalls
Definition: struct_cutsel.h:63
SCIP_RETCODE SCIPcutselCopyInclude(SCIP_CUTSEL *cutsel, SCIP_SET *set)
Definition: cutsel.c:254
SCIP_Longint SCIPcutselGetNRootCalls(SCIP_CUTSEL *cutsel)
Definition: cutsel.c:584
#define SCIPerrorMessage
Definition: pub_message.h:64
void SCIPclockReset(SCIP_CLOCK *clck)
Definition: clock.c:209
SCIP_Real SCIPcutselGetSetupTime(SCIP_CUTSEL *cutsel)
Definition: cutsel.c:554
SCIP_Longint SCIPcutselGetNLocalCutsFiltered(SCIP_CUTSEL *cutsel)
Definition: cutsel.c:644
#define SCIP_DECL_CUTSELINIT(x)
Definition: type_cutsel.h:78
SCIP_Real SCIPclockGetTime(SCIP_CLOCK *clck)
Definition: clock.c:438
SCIP_RETCODE SCIPcutselsSelect(SCIP_SET *set, SCIP_ROW **cuts, int ncuts, int nforcedcuts, SCIP_Bool root, SCIP_Bool initiallp, int maxnselectedcuts, int *nselectedcuts)
Definition: cutsel.c:169
#define NULL
Definition: lpi_spx1.cpp:164
internal methods for global SCIP settings
#define SCIP_CALL(x)
Definition: def.h:394
void SCIPcutselSetExitsol(SCIP_CUTSEL *cutsel, SCIP_DECL_CUTSELEXITSOL((*cutselexitsol)))
Definition: cutsel.c:519
#define SCIP_DECL_CUTSELCOPY(x)
Definition: type_cutsel.h:62
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:3029
#define BMSduplicateMemoryArray(ptr, source, num)
Definition: memory.h:145
SCIP_Longint SCIPcutselGetNRootCuts(SCIP_CUTSEL *cutsel)
Definition: cutsel.c:594
SCIP_RETCODE SCIPcutselInit(SCIP_CUTSEL *cutsel, SCIP_SET *set)
Definition: cutsel.c:303
SCIP_RETCODE SCIPclockCreate(SCIP_CLOCK **clck, SCIP_CLOCKTYPE clocktype)
Definition: clock.c:170
SCIP_Bool SCIPcutselIsInitialized(SCIP_CUTSEL *cutsel)
Definition: cutsel.c:544
#define SCIP_Bool
Definition: def.h:93
static const char * paramname[]
Definition: lpi_msk.c:5096
SCIP_RETCODE SCIPcutselExit(SCIP_CUTSEL *cutsel, SCIP_SET *set)
Definition: cutsel.c:340
void SCIPclockFree(SCIP_CLOCK **clck)
Definition: clock.c:185
const char * SCIPcutselGetDesc(SCIP_CUTSEL *cutsel)
Definition: cutsel.c:244
#define SCIPsetDebugMsg
Definition: set.h:1770
SCIP_RETCODE SCIPsetCutselPriority(SCIP *scip, SCIP_CUTSEL *cutsel, int priority)
Definition: scip_cutsel.c:258
void SCIPcutselSetFree(SCIP_CUTSEL *cutsel, SCIP_DECL_CUTSELFREE((*cutselfree)))
Definition: cutsel.c:475
#define BMSclearMemory(ptr)
Definition: memory.h:131
SCIP_Longint nlocalcutsselected
Definition: struct_cutsel.h:67
int SCIPparamGetInt(SCIP_PARAM *param)
Definition: paramset.c:734
void SCIPcutselSetExit(SCIP_CUTSEL *cutsel, SCIP_DECL_CUTSELEXIT((*cutselexit)))
Definition: cutsel.c:497
SCIP_Longint nrootcutsforced
Definition: struct_cutsel.h:65
SCIP_Longint nlocalcutsforced
Definition: struct_cutsel.h:68
data structures for cut selectors
SCIP_Longint SCIPcutselGetNLocalCuts(SCIP_CUTSEL *cutsel)
Definition: cutsel.c:624
SCIP_Longint ncalls
Definition: struct_cutsel.h:62
int SCIPcutselGetPriority(SCIP_CUTSEL *cutsel)
Definition: cutsel.c:439
#define SCIP_Real
Definition: def.h:186
SCIP_CUTSELDATA * cutseldata
Definition: struct_cutsel.h:59
void SCIPcutselSetInit(SCIP_CUTSEL *cutsel, SCIP_DECL_CUTSELINIT((*cutselinit)))
Definition: cutsel.c:486
#define SCIP_DECL_CUTSELFREE(x)
Definition: type_cutsel.h:70
#define BMSallocMemory(ptr)
Definition: memory.h:120
SCIP_CLOCK * cutseltime
Definition: struct_cutsel.h:58
#define SCIP_Longint
Definition: def.h:171
SCIP_Real SCIPcutselGetTime(SCIP_CUTSEL *cutsel)
Definition: cutsel.c:564
struct BMS_BlkMem BMS_BLKMEM
Definition: memory.h:439
SCIP_Longint SCIPcutselGetNLocalForcedCuts(SCIP_CUTSEL *cutsel)
Definition: cutsel.c:634
#define SCIP_ALLOC(x)
Definition: def.h:405
#define SCIP_DECL_CUTSELEXITSOL(x)
Definition: type_cutsel.h:108
SCIP callable library.
SCIP_RETCODE SCIPcutselInitsol(SCIP_CUTSEL *cutsel, SCIP_SET *set)
Definition: cutsel.c:370
void SCIPcutselSetInitsol(SCIP_CUTSEL *cutsel, SCIP_DECL_CUTSELINITSOL((*cutselinitsol)))
Definition: cutsel.c:508