Scippy

SCIP

Solving Constraint Integer Programs

compr.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-2019 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 scip.zib.de. */
13 /* */
14 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
15 
16 /**@file compr.c
17  * @brief methods for tree compressions
18  * @author Jakob Witzig
19  */
20 
21 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
22 
23 #include <assert.h>
24 #include <string.h>
25 
26 #include "scip/def.h"
27 #include "scip/set.h"
28 #include "scip/clock.h"
29 #include "scip/paramset.h"
30 #include "scip/scip.h"
31 #include "scip/compr.h"
32 #include "scip/reopt.h"
33 #include "scip/pub_message.h"
34 #include "scip/pub_misc.h"
35 
36 #include "scip/struct_compr.h"
37 
38 
39 
40 /** compares two compression methods w. r. to their delay positions and their priority */
41 SCIP_DECL_SORTPTRCOMP(SCIPcomprComp)
42 { /*lint --e{715}*/
43  SCIP_COMPR* compr1 = (SCIP_COMPR*)elem1;
44  SCIP_COMPR* compr2 = (SCIP_COMPR*)elem2;
45 
46  assert(compr1 != NULL);
47  assert(compr2 != NULL);
48 
49  return compr2->priority - compr1->priority; /* prefer higher priorities */
50 }
51 
52 /** comparison method for sorting heuristics w.r.t. to their name */
53 SCIP_DECL_SORTPTRCOMP(SCIPcomprCompName)
54 {
55  return strcmp(SCIPcomprGetName((SCIP_COMPR*)elem1), SCIPcomprGetName((SCIP_COMPR*)elem2));
56 }
57 
58 /** method to call, when the priority of a compression was changed */
59 static
60 SCIP_DECL_PARAMCHGD(paramChgdComprPriority)
61 { /*lint --e{715}*/
62  SCIP_PARAMDATA* paramdata;
63 
64  paramdata = SCIPparamGetData(param);
65  assert(paramdata != NULL);
66 
67  /* use SCIPsetComprPriority() to mark the compressions unsorted */
68  SCIP_CALL( SCIPsetComprPriority(scip, (SCIP_COMPR*)paramdata, SCIPparamGetInt(param)) ); /*lint !e740*/
69 
70  return SCIP_OKAY;
71 }
72 
73 /** copies the given tree compression to a new scip */
75  SCIP_COMPR* compr, /**< tree compression */
76  SCIP_SET* set /**< SCIP_SET of SCIP to copy to */
77  )
78 {
79  assert(compr != NULL);
80  assert(set != NULL);
81  assert(set->scip != NULL);
82 
83  if( compr->comprcopy != NULL )
84  {
85  SCIPsetDebugMsg(set, "including compr %s in subscip %p\n", SCIPcomprGetName(compr), (void*)set->scip);
86  SCIP_CALL( compr->comprcopy(set->scip, compr) );
87  }
88 
89  return SCIP_OKAY;
90 }
91 
92 /** internal method for creating a tree compression */
93 static
95  SCIP_COMPR** compr, /**< pointer to tree compression data structure */
96  SCIP_SET* set, /**< global SCIP settings */
97  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
98  BMS_BLKMEM* blkmem, /**< block memory for parameter settings */
99  const char* name, /**< name of tree compression */
100  const char* desc, /**< description of tree compression */
101  int priority, /**< priority of the tree compression */
102  int minnnodes, /**< minimal number of nodes for calling compression */
103  SCIP_DECL_COMPRCOPY ((*comprcopy)), /**< copy method of tree compression or NULL if you don't want to copy your plugin into sub-SCIPs */
104  SCIP_DECL_COMPRFREE ((*comprfree)), /**< destructor of tree compression */
105  SCIP_DECL_COMPRINIT ((*comprinit)), /**< initialize tree compression */
106  SCIP_DECL_COMPREXIT ((*comprexit)), /**< deinitialize tree compression */
107  SCIP_DECL_COMPRINITSOL ((*comprinitsol)), /**< solving process initialization method of tree compression */
108  SCIP_DECL_COMPREXITSOL ((*comprexitsol)), /**< solving process deinitialization method of tree compression */
109  SCIP_DECL_COMPREXEC ((*comprexec)), /**< execution method of tree compression */
110  SCIP_COMPRDATA* comprdata /**< tree compression data */
111  )
112 {
113  char paramname[SCIP_MAXSTRLEN];
114  char paramdesc[SCIP_MAXSTRLEN];
115 
116  assert(compr != NULL);
117  assert(name != NULL);
118  assert(desc != NULL);
119  assert(comprexec != NULL);
120 
121  SCIP_ALLOC( BMSallocMemory(compr) );
122  BMSclearMemory(*compr);
123 
124  SCIP_ALLOC( BMSduplicateMemoryArray(&(*compr)->name, name, strlen(name)+1) );
125  SCIP_ALLOC( BMSduplicateMemoryArray(&(*compr)->desc, desc, strlen(desc)+1) );
126  (*compr)->priority = priority;
127  (*compr)->minnnodes = minnnodes;
128  (*compr)->comprcopy = comprcopy;
129  (*compr)->comprfree = comprfree;
130  (*compr)->comprinit = comprinit;
131  (*compr)->comprexit = comprexit;
132  (*compr)->comprinitsol = comprinitsol;
133  (*compr)->comprexitsol = comprexitsol;
134  (*compr)->comprexec = comprexec;
135  (*compr)->comprdata = comprdata;
136  SCIP_CALL( SCIPclockCreate(&(*compr)->setuptime, SCIP_CLOCKTYPE_DEFAULT) );
137  SCIP_CALL( SCIPclockCreate(&(*compr)->comprclock, SCIP_CLOCKTYPE_DEFAULT) );
138  (*compr)->ncalls = 0;
139  (*compr)->nfound = 0;
140  (*compr)->rate = 0.0;
141  (*compr)->initialized = FALSE;
142  (*compr)->nnodes = 0;
143  (*compr)->loi = 0.0;
144 
145  /* add parameters */
146  (void) SCIPsnprintf(paramname, SCIP_MAXSTRLEN, "compression/%s/priority", name);
147  (void) SCIPsnprintf(paramdesc, SCIP_MAXSTRLEN, "priority of compression <%s>", name);
148  SCIP_CALL( SCIPsetAddIntParam(set, messagehdlr, blkmem, paramname, paramdesc,
149  &(*compr)->priority, TRUE, priority, INT_MIN/4, INT_MAX/4,
150  paramChgdComprPriority, (SCIP_PARAMDATA*)(*compr)) ); /*lint !e740*/
151  (void) SCIPsnprintf(paramname, SCIP_MAXSTRLEN, "compression/%s/minnleaves", name);
152  (void) SCIPsnprintf(paramdesc, SCIP_MAXSTRLEN, "minimal number of leave nodes for calling tree compression <%s>", name);
153  SCIP_CALL( SCIPsetAddIntParam(set, messagehdlr, blkmem, paramname, paramdesc,
154  &(*compr)->minnnodes, FALSE, minnnodes, 1, INT_MAX, NULL, NULL) );
155 
156  return SCIP_OKAY;
157 }
158 
159 /** creates a tree compression */
161  SCIP_COMPR** compr, /**< pointer to tree compression data structure */
162  SCIP_SET* set, /**< global SCIP settings */
163  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
164  BMS_BLKMEM* blkmem, /**< block memory for parameter settings */
165  const char* name, /**< name of tree compression */
166  const char* desc, /**< description of tree compression */
167  int priority, /**< priority of the tree compression */
168  int minnnodes, /**< minimal number of nodes for calling compression */
169  SCIP_DECL_COMPRCOPY ((*comprcopy)), /**< copy method of tree compression or NULL if you don't want to copy
170  * your plugin into sub-SCIPs */
171  SCIP_DECL_COMPRFREE ((*comprfree)), /**< destructor of tree compression */
172  SCIP_DECL_COMPRINIT ((*comprinit)), /**< initialize tree compression */
173  SCIP_DECL_COMPREXIT ((*comprexit)), /**< deinitialize tree compression */
174  SCIP_DECL_COMPRINITSOL ((*comprinitsol)), /**< solving process initialization method of tree compression */
175  SCIP_DECL_COMPREXITSOL ((*comprexitsol)), /**< solving process deinitialization method of tree compression */
176  SCIP_DECL_COMPREXEC ((*comprexec)), /**< execution method of tree compression */
177  SCIP_COMPRDATA* comprdata /**< tree compression data */
178  )
179 {
180  assert(compr != NULL);
181  assert(name != NULL);
182  assert(desc != NULL);
183  assert(comprexec != NULL);
184 
185  SCIP_CALL_FINALLY( doComprCreate(compr, set, messagehdlr, blkmem, name, desc, priority, minnnodes,
186  comprcopy, comprfree, comprinit, comprexit, comprinitsol, comprexitsol, comprexec, comprdata),
187  (void) SCIPcomprFree(compr, set) );
188 
189  return SCIP_OKAY;
190 }
191 
192 /** calls destructor and frees memory of tree compression */
194  SCIP_COMPR** compr, /**< pointer to tree compression data structure */
195  SCIP_SET* set /**< global SCIP settings */
196  )
197 {
198  assert(compr != NULL);
199  if( *compr == NULL )
200  return SCIP_OKAY;
201  assert(!(*compr)->initialized);
202  assert(set != NULL);
203 
204  /* call destructor of tree compression */
205  if( (*compr)->comprfree != NULL )
206  {
207  SCIP_CALL( (*compr)->comprfree(set->scip, *compr) );
208  }
209 
210  SCIPclockFree(&(*compr)->comprclock);
211  SCIPclockFree(&(*compr)->setuptime);
212  BMSfreeMemoryArrayNull(&(*compr)->name);
213  BMSfreeMemoryArrayNull(&(*compr)->desc);
214  BMSfreeMemory(compr);
215 
216  return SCIP_OKAY;
217 }
218 
219 /** initializes tree compression */
221  SCIP_COMPR* compr, /**< tree compression */
222  SCIP_SET* set /**< global SCIP settings */
223  )
224 {
225  assert(compr != NULL);
226  assert(set != NULL);
227 
228  if( compr->initialized )
229  {
230  SCIPerrorMessage("tree compression <%s> already initialized\n", compr->name);
231  return SCIP_INVALIDCALL;
232  }
233 
234  if( set->misc_resetstat && !set->reopt_enable )
235  {
236  SCIPclockReset(compr->setuptime);
237  SCIPclockReset(compr->comprclock);
238 
239  compr->ncalls = 0;
240  compr->nfound = 0;
241  }
242 
243  if( compr->comprinit != NULL )
244  {
245  /* start timing */
246  SCIPclockStart(compr->setuptime, set);
247 
248  SCIP_CALL( compr->comprinit(set->scip, compr) );
249 
250  /* stop timing */
251  SCIPclockStop(compr->setuptime, set);
252  }
253  compr->initialized = TRUE;
254 
255  return SCIP_OKAY;
256 }
257 
258 /** calls exit method of tree compression */
260  SCIP_COMPR* compr, /**< tree compression */
261  SCIP_SET* set /**< global SCIP settings */
262  )
263 {
264  assert(compr != NULL);
265  assert(set != NULL);
266 
267  if( !compr->initialized )
268  {
269  SCIPerrorMessage("tree compression <%s> not initialized\n", compr->name);
270  return SCIP_INVALIDCALL;
271  }
272 
273  if( compr->comprexit != NULL )
274  {
275  /* start timing */
276  SCIPclockStart(compr->setuptime, set);
277 
278  SCIP_CALL( compr->comprexit(set->scip, compr) );
279 
280  /* stop timing */
281  SCIPclockStop(compr->setuptime, set);
282  }
283  compr->initialized = FALSE;
284 
285  return SCIP_OKAY;
286 }
287 
288 /** calls execution method of tree compression */
290  SCIP_COMPR* compr, /**< tree compression */
291  SCIP_SET* set, /**< global SCIP settings */
292  SCIP_REOPT* reopt, /**< reoptimization data structure */
293  SCIP_RESULT* result /**< pointer to store the result of the callback method */
294  )
295 {
296  assert(compr != NULL);
297  assert(compr->comprexec != NULL);
298  assert(set != NULL);
299  assert(set->scip != NULL);
300  assert(result != NULL);
301 
302  *result = SCIP_DIDNOTRUN;
303 
304  /* do not run if reoptimization data structure is not initialized */
305  if( reopt == NULL )
306  return SCIP_OKAY;
307 
308  /* do not run if the reoptimization tree is not large enough */
309  if( SCIPreoptGetNLeaves(reopt, NULL) < compr->minnnodes )
310  return SCIP_OKAY;
311 
312  SCIPsetDebugMsg(set, "executing tree compression <%s>\n", compr->name);
313 
314  /* start timing */
315  SCIPclockStart(compr->comprclock, set);
316 
317  /* call external method */
318  SCIP_CALL( compr->comprexec(set->scip, compr, result) );
319 
320  /* stop timing */
321  SCIPclockStop(compr->comprclock, set);
322 
323  /* evaluate result */
324  if( *result != SCIP_SUCCESS
325  && *result != SCIP_DIDNOTFIND
326  && *result != SCIP_DIDNOTRUN )
327  {
328  SCIPerrorMessage("execution method of tree compression <%s> returned invalid result <%d>\n",
329  compr->name, *result);
330  return SCIP_INVALIDRESULT;
331  }
332 
333  if( *result != SCIP_DIDNOTRUN )
334  compr->ncalls++;
335 
336  if( *result == SCIP_SUCCESS )
337  compr->nfound++;
338 
339  return SCIP_OKAY;
340 }
341 
342 /** gets user data of tree compression */
344  SCIP_COMPR* compr /**< tree compression */
345  )
346 {
347  assert(compr != NULL);
348 
349  return compr->comprdata;
350 }
351 
352 /** sets user data of tree compression; user has to free old data in advance! */
354  SCIP_COMPR* compr, /**< tree compression */
355  SCIP_COMPRDATA* comprdata /**< new tree compression user data */
356  )
357 {
358  assert(compr != NULL);
359 
360  compr->comprdata = comprdata;
361 }
362 
363 /* new callback setter methods */
364 
365 /** sets copy callback of tree compression */
367  SCIP_COMPR* compr, /**< tree compression */
368  SCIP_DECL_COMPRCOPY ((*comprcopy)) /**< copy callback of tree compression or NULL if you don't want to copy your plugin into sub-SCIPs */
369  )
370 {
371  assert(compr != NULL);
372 
373  compr->comprcopy = comprcopy;
374 }
375 
376 /** sets destructor callback of tree compression */
378  SCIP_COMPR* compr, /**< tree compression */
379  SCIP_DECL_COMPRFREE ((*comprfree)) /**< destructor of tree compression */
380  )
381 {
382  assert(compr != NULL);
383 
384  compr->comprfree = comprfree;
385 }
386 
387 /** sets initialization callback of tree compression */
389  SCIP_COMPR* compr, /**< tree compression */
390  SCIP_DECL_COMPRINIT ((*comprinit)) /**< initialize tree compression */
391  )
392 {
393  assert(compr != NULL);
394 
395  compr->comprinit = comprinit;
396 }
397 
398 /** sets deinitialization callback of tree compression */
400  SCIP_COMPR* compr, /**< tree compression */
401  SCIP_DECL_COMPREXIT ((*comprexit)) /**< deinitialize tree compression */
402  )
403 {
404  assert(compr != NULL);
405 
406  compr->comprexit = comprexit;
407 }
408 
409 /** sets solving process initialization callback of tree compression */
411  SCIP_COMPR* compr, /**< tree compression */
412  SCIP_DECL_COMPRINITSOL ((*comprinitsol)) /**< solving process initialization callback of tree compression */
413  )
414 {
415  assert(compr != NULL);
416 
417  compr->comprinitsol = comprinitsol;
418 }
419 
420 /** sets solving process deinitialization callback of tree compression */
422  SCIP_COMPR* compr, /**< tree compression */
423  SCIP_DECL_COMPREXITSOL ((*comprexitsol)) /**< solving process deinitialization callback of tree compression */
424  )
425 {
426  assert(compr != NULL);
427 
428  compr->comprexitsol = comprexitsol;
429 }
430 
431 /** should the compression be executed at the given depth, number of nodes */
433  SCIP_COMPR* compr, /**< tree compression */
434  int depth, /**< depth of current node */
435  int nnodes /**< number of open nodes */
436  )
437 {
438  assert(compr != NULL);
439  assert(depth >= 0);
440  assert(nnodes >= 0);
441 
442  return nnodes >= compr->minnnodes;
443 }
444 
445 /** gets name of tree compression */
446 const char* SCIPcomprGetName(
447  SCIP_COMPR* compr /**< tree compression */
448  )
449 {
450  assert(compr != NULL);
451 
452  return compr->name;
453 }
454 
455 /** gets description of tree compression */
456 const char* SCIPcomprGetDesc(
457  SCIP_COMPR* compr /**< tree compression */
458  )
459 {
460  assert(compr != NULL);
461 
462  return compr->desc;
463 }
464 
465 /** gets priority of tree compression */
467  SCIP_COMPR* compr /**< tree compression */
468  )
469 {
470  assert(compr != NULL);
471 
472  return compr->priority;
473 }
474 
475 /** sets priority of tree compression */
477  SCIP_COMPR* compr, /**< tree compression */
478  SCIP_SET* set, /**< global SCIP settings */
479  int priority /**< new priority of the tree compression */
480  )
481 {
482  assert(compr != NULL);
483  assert(set != NULL);
484 
485  compr->priority = priority;
486  set->comprssorted = FALSE;
487 }
488 
489 /** gets minimal number of nodes for calling tree compression (returns -1, if no node threshold exists) */
491  SCIP_COMPR* compr /**< tree compression */
492  )
493 {
494  assert(compr != NULL);
495 
496  return compr->minnnodes;
497 }
498 
499 /** gets the number of times, the heuristic was called and tried to find a solution */
501  SCIP_COMPR* compr /**< tree compression */
502  )
503 {
504  assert(compr != NULL);
505 
506  return compr->ncalls;
507 }
508 
509 /** gets the number of compressions found by this compression */
511  SCIP_COMPR* compr /**< tree compression */
512  )
513 {
514  assert(compr != NULL);
515 
516  return compr->nfound;
517 }
518 
519 /** is tree compression initialized? */
521  SCIP_COMPR* compr /**< tree compression */
522  )
523 {
524  assert(compr != NULL);
525 
526  return compr->initialized;
527 }
528 
529 /** gets time in seconds used in this heuristic for setting up for next stages */
531  SCIP_COMPR* compr /**< tree compression */
532  )
533 {
534  assert(compr != NULL);
535 
536  return SCIPclockGetTime(compr->setuptime);
537 }
538 
539 /** gets time in seconds used in this heuristic */
541  SCIP_COMPR* compr /**< tree compression */
542  )
543 {
544  assert(compr != NULL);
545 
546  return SCIPclockGetTime(compr->comprclock);
547 }
enum SCIP_Result SCIP_RESULT
Definition: type_result.h:52
void SCIPcomprSetInitsol(SCIP_COMPR *compr, SCIP_DECL_COMPRINITSOL((*comprinitsol)))
Definition: compr.c:410
SCIP_Real SCIPcomprGetSetupTime(SCIP_COMPR *compr)
Definition: compr.c:530
int SCIPcomprGetPriority(SCIP_COMPR *compr)
Definition: compr.c:466
#define NULL
Definition: def.h:253
int SCIPreoptGetNLeaves(SCIP_REOPT *reopt, SCIP_NODE *node)
Definition: reopt.c:5914
#define BMSfreeMemoryArrayNull(ptr)
Definition: memory.h:138
#define SCIP_DECL_COMPREXEC(x)
Definition: type_compr.h:111
void SCIPcomprSetCopy(SCIP_COMPR *compr, SCIP_DECL_COMPRCOPY((*comprcopy)))
Definition: compr.c:366
SCIP_PARAMDATA * SCIPparamGetData(SCIP_PARAM *param)
Definition: paramset.c:661
#define SCIP_MAXSTRLEN
Definition: def.h:274
SCIP_RETCODE SCIPcomprInit(SCIP_COMPR *compr, SCIP_SET *set)
Definition: compr.c:220
internal methods for clocks and timing issues
struct SCIP_ParamData SCIP_PARAMDATA
Definition: type_paramset.h:76
SCIP_RETCODE SCIPcomprCreate(SCIP_COMPR **compr, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, BMS_BLKMEM *blkmem, const char *name, const char *desc, int priority, int minnnodes, SCIP_DECL_COMPRCOPY((*comprcopy)), SCIP_DECL_COMPRFREE((*comprfree)), SCIP_DECL_COMPRINIT((*comprinit)), SCIP_DECL_COMPREXIT((*comprexit)), SCIP_DECL_COMPRINITSOL((*comprinitsol)), SCIP_DECL_COMPREXITSOL((*comprexitsol)), SCIP_DECL_COMPREXEC((*comprexec)), SCIP_COMPRDATA *comprdata)
Definition: compr.c:160
#define SCIP_CALL_FINALLY(x, y)
Definition: def.h:407
#define SCIP_DECL_COMPREXITSOL(x)
Definition: type_compr.h:95
SCIP_Bool SCIPcomprIsInitialized(SCIP_COMPR *compr)
Definition: compr.c:520
void SCIPcomprSetExitsol(SCIP_COMPR *compr, SCIP_DECL_COMPREXITSOL((*comprexitsol)))
Definition: compr.c:421
void SCIPclockStop(SCIP_CLOCK *clck, SCIP_SET *set)
Definition: clock.c:350
#define FALSE
Definition: def.h:73
SCIP_CLOCK * comprclock
Definition: struct_compr.h:54
void SCIPclockStart(SCIP_CLOCK *clck, SCIP_SET *set)
Definition: clock.c:280
SCIP_RETCODE SCIPcomprFree(SCIP_COMPR **compr, SCIP_SET *set)
Definition: compr.c:193
#define TRUE
Definition: def.h:72
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:53
void SCIPcomprSetPriority(SCIP_COMPR *compr, SCIP_SET *set, int priority)
Definition: compr.c:476
void SCIPcomprSetInit(SCIP_COMPR *compr, SCIP_DECL_COMPRINIT((*comprinit)))
Definition: compr.c:388
static SCIP_DECL_PARAMCHGD(paramChgdComprPriority)
Definition: compr.c:60
SCIP_RETCODE SCIPcomprExec(SCIP_COMPR *compr, SCIP_SET *set, SCIP_REOPT *reopt, SCIP_RESULT *result)
Definition: compr.c:289
internal methods for handling parameter settings
const char * SCIPcomprGetName(SCIP_COMPR *compr)
Definition: compr.c:446
#define BMSfreeMemory(ptr)
Definition: memory.h:135
const char * SCIPcomprGetDesc(SCIP_COMPR *compr)
Definition: compr.c:456
#define SCIP_DECL_COMPRINIT(x)
Definition: type_compr.h:65
#define SCIP_DECL_COMPRFREE(x)
Definition: type_compr.h:57
SCIP_Longint nfound
Definition: struct_compr.h:40
SCIP_Bool SCIPcomprShouldBeExecuted(SCIP_COMPR *compr, int depth, int nnodes)
Definition: compr.c:432
char * desc
Definition: struct_compr.h:44
#define SCIPerrorMessage
Definition: pub_message.h:45
SCIP_COMPRDATA * comprdata
Definition: struct_compr.h:52
#define SCIP_DECL_COMPRCOPY(x)
Definition: type_compr.h:49
void SCIPclockReset(SCIP_CLOCK *clck)
Definition: clock.c:199
SCIP_CLOCK * setuptime
Definition: struct_compr.h:53
static SCIP_RETCODE doComprCreate(SCIP_COMPR **compr, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, BMS_BLKMEM *blkmem, const char *name, const char *desc, int priority, int minnnodes, SCIP_DECL_COMPRCOPY((*comprcopy)), SCIP_DECL_COMPRFREE((*comprfree)), SCIP_DECL_COMPRINIT((*comprinit)), SCIP_DECL_COMPREXIT((*comprexit)), SCIP_DECL_COMPRINITSOL((*comprinitsol)), SCIP_DECL_COMPREXITSOL((*comprexitsol)), SCIP_DECL_COMPREXEC((*comprexec)), SCIP_COMPRDATA *comprdata)
Definition: compr.c:94
SCIP_Longint ncalls
Definition: struct_compr.h:39
SCIP_Real SCIPclockGetTime(SCIP_CLOCK *clck)
Definition: clock.c:428
SCIP_Real SCIPcomprGetTime(SCIP_COMPR *compr)
Definition: compr.c:540
internal methods for global SCIP settings
#define SCIP_CALL(x)
Definition: def.h:365
struct SCIP_ComprData SCIP_COMPRDATA
Definition: type_compr.h:40
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:2879
SCIP_RETCODE SCIPcomprExit(SCIP_COMPR *compr, SCIP_SET *set)
Definition: compr.c:259
#define BMSduplicateMemoryArray(ptr, source, num)
Definition: memory.h:133
SCIP_RETCODE SCIPclockCreate(SCIP_CLOCK **clck, SCIP_CLOCKTYPE clocktype)
Definition: clock.c:160
#define SCIP_DECL_COMPRINITSOL(x)
Definition: type_compr.h:84
data structures and methods for collecting reoptimization information
SCIP_COMPRDATA * SCIPcomprGetData(SCIP_COMPR *compr)
Definition: compr.c:343
public data structures and miscellaneous methods
void SCIPcomprSetData(SCIP_COMPR *compr, SCIP_COMPRDATA *comprdata)
Definition: compr.c:353
#define SCIP_Bool
Definition: def.h:70
datastructures for tree compression techniques
void SCIPclockFree(SCIP_CLOCK **clck)
Definition: clock.c:175
SCIP_Longint SCIPcomprGetNCalls(SCIP_COMPR *compr)
Definition: compr.c:500
SCIP_RETCODE SCIPcomprCopyInclude(SCIP_COMPR *compr, SCIP_SET *set)
Definition: compr.c:74
#define SCIPsetDebugMsg
Definition: set.h:1720
#define SCIP_DECL_COMPREXIT(x)
Definition: type_compr.h:73
SCIP_Longint SCIPcomprGetNFound(SCIP_COMPR *compr)
Definition: compr.c:510
int SCIPcomprGetMinNodes(SCIP_COMPR *compr)
Definition: compr.c:490
#define BMSclearMemory(ptr)
Definition: memory.h:119
SCIP_RETCODE SCIPsetComprPriority(SCIP *scip, SCIP_COMPR *compr, int priority)
Definition: scip_compr.c:264
int SCIPparamGetInt(SCIP_PARAM *param)
Definition: paramset.c:716
internal methods for tree compressions
public methods for message output
SCIP_Bool initialized
Definition: struct_compr.h:58
int SCIPsnprintf(char *t, int len, const char *s,...)
Definition: misc.c:10263
#define SCIP_Real
Definition: def.h:164
#define BMSallocMemory(ptr)
Definition: memory.h:109
SCIP_DECL_SORTPTRCOMP(SCIPcomprComp)
Definition: compr.c:41
#define SCIP_Longint
Definition: def.h:149
void SCIPcomprSetFree(SCIP_COMPR *compr, SCIP_DECL_COMPRFREE((*comprfree)))
Definition: compr.c:377
#define nnodes
Definition: gastrans.c:65
char * name
Definition: struct_compr.h:43
common defines and data types used in all packages of SCIP
struct BMS_BlkMem BMS_BLKMEM
Definition: memory.h:427
void SCIPcomprSetExit(SCIP_COMPR *compr, SCIP_DECL_COMPREXIT((*comprexit)))
Definition: compr.c:399
#define SCIP_ALLOC(x)
Definition: def.h:376
SCIP callable library.