Scippy

SCIP

Solving Constraint Integer Programs

disp.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 disp.c
17  * @brief methods and datastructures for displaying runtime statistics
18  * @author Tobias Achterberg
19  * @author Timo Berthold
20  */
21 
22 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
23 
24 #include <stdio.h>
25 #include <assert.h>
26 #include <string.h>
27 
28 #include "scip/def.h"
29 #include "blockmemshell/memory.h"
30 #include "scip/set.h"
31 #include "scip/stat.h"
32 #include "scip/scip.h"
33 #include "scip/disp.h"
34 #include "scip/pub_message.h"
35 #include "scip/pub_misc.h"
36 #include "scip/syncstore.h"
37 #include "scip/struct_disp.h"
38 
39 
40 
41 /*
42  * display column methods
43  */
44 
45 /** parameter change information method to autoselect display columns again */
46 SCIP_DECL_PARAMCHGD(SCIPparamChgdDispActive)
47 { /*lint --e{715}*/
48  /* automatically select the now active display columns */
50 
51  return SCIP_OKAY;
52 }
53 
54 /** copies the given display to a new scip */
56  SCIP_DISP* disp, /**< display column */
57  SCIP_SET* set /**< SCIP_SET of SCIP to copy to */
58  )
59 {
60  assert(disp != NULL);
61  assert(set != NULL);
62  assert(set->scip != NULL);
63 
64  if( disp->dispcopy != NULL )
65  {
66  SCIPsetDebugMsg(set, "including display column %s in subscip %p\n", SCIPdispGetName(disp), (void*)set->scip);
67  SCIP_CALL( disp->dispcopy(set->scip, disp) );
68  }
69  return SCIP_OKAY;
70 }
71 
72 /** internal method for creating a display column */
73 static
75  SCIP_DISP** disp, /**< pointer to store display column */
76  SCIP_SET* set, /**< global SCIP settings */
77  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
78  BMS_BLKMEM* blkmem, /**< block memory for parameter settings */
79  const char* name, /**< name of display column */
80  const char* desc, /**< description of display column */
81  const char* header, /**< head line of display column */
82  SCIP_DISPSTATUS dispstatus, /**< display activation status of display column */
83  SCIP_DECL_DISPCOPY ((*dispcopy)), /**< copy method of display column or NULL if you don't want to copy your plugin into sub-SCIPs */
84  SCIP_DECL_DISPFREE ((*dispfree)), /**< destructor of display column */
85  SCIP_DECL_DISPINIT ((*dispinit)), /**< initialize display column */
86  SCIP_DECL_DISPEXIT ((*dispexit)), /**< deinitialize display column */
87  SCIP_DECL_DISPINITSOL ((*dispinitsol)), /**< solving process initialization method of display column */
88  SCIP_DECL_DISPEXITSOL ((*dispexitsol)), /**< solving process deinitialization method of display column */
89  SCIP_DECL_DISPOUTPUT ((*dispoutput)), /**< output method */
90  SCIP_DISPDATA* dispdata, /**< display column data */
91  int width, /**< width of display column (no. of chars used) */
92  int priority, /**< priority of display column */
93  int position, /**< relative position of display column */
94  SCIP_Bool stripline /**< should the column be separated with a line from its right neighbor? */
95  )
96 {
97  char paramname[SCIP_MAXSTRLEN];
98  char paramdesc[SCIP_MAXSTRLEN];
99 
100  assert(disp != NULL);
101  assert(name != NULL);
102  assert(desc != NULL);
103  assert(header != NULL);
104  assert(dispoutput != NULL);
105  assert(width >= 0);
106 
107  SCIP_ALLOC( BMSallocMemory(disp) );
108  BMSclearMemory(*disp);
109 
110  SCIP_ALLOC( BMSduplicateMemoryArray(&(*disp)->name, name, strlen(name)+1) );
111  SCIP_ALLOC( BMSduplicateMemoryArray(&(*disp)->desc, desc, strlen(desc)+1) );
112  SCIP_ALLOC( BMSduplicateMemoryArray(&(*disp)->header, header, strlen(header)+1) );
113  (*disp)->dispstatus = dispstatus;
114  (*disp)->dispcopy = dispcopy;
115  (*disp)->dispfree = dispfree;
116  (*disp)->dispinit = dispinit;
117  (*disp)->dispexit = dispexit;
118  (*disp)->dispinitsol = dispinitsol;
119  (*disp)->dispexitsol = dispexitsol;
120  (*disp)->dispoutput = dispoutput;
121  (*disp)->dispdata = dispdata;
122  (*disp)->width = width;
123  (*disp)->priority = priority;
124  (*disp)->position = position;
125  (*disp)->stripline = stripline;
126  (*disp)->initialized = FALSE;
127  (*disp)->active = (dispstatus == SCIP_DISPSTATUS_ON);
128  (*disp)->mode = SCIP_DISPMODE_DEFAULT;
129 
130  /* add parameters */
131  (void) SCIPsnprintf(paramname, SCIP_MAXSTRLEN, "display/%s/active", name);
132  (void) SCIPsnprintf(paramdesc, SCIP_MAXSTRLEN, "display activation status of display column <%s> (0: off, 1: auto, 2:on)", name);
133  SCIP_CALL( SCIPsetAddIntParam(set, messagehdlr, blkmem, paramname, paramdesc,
134  (int*)(&(*disp)->dispstatus), FALSE, (int)dispstatus, 0, 2, SCIPparamChgdDispActive, NULL) );
135 
136  return SCIP_OKAY;
137 }
138 
139 /** creates a display column */
141  SCIP_DISP** disp, /**< pointer to store display column */
142  SCIP_SET* set, /**< global SCIP settings */
143  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
144  BMS_BLKMEM* blkmem, /**< block memory for parameter settings */
145  const char* name, /**< name of display column */
146  const char* desc, /**< description of display column */
147  const char* header, /**< head line of display column */
148  SCIP_DISPSTATUS dispstatus, /**< display activation status of display column */
149  SCIP_DECL_DISPCOPY ((*dispcopy)), /**< copy method of display column or NULL if you don't want to copy your plugin into sub-SCIPs */
150  SCIP_DECL_DISPFREE ((*dispfree)), /**< destructor of display column */
151  SCIP_DECL_DISPINIT ((*dispinit)), /**< initialize display column */
152  SCIP_DECL_DISPEXIT ((*dispexit)), /**< deinitialize display column */
153  SCIP_DECL_DISPINITSOL ((*dispinitsol)), /**< solving process initialization method of display column */
154  SCIP_DECL_DISPEXITSOL ((*dispexitsol)), /**< solving process deinitialization method of display column */
155  SCIP_DECL_DISPOUTPUT ((*dispoutput)), /**< output method */
156  SCIP_DISPDATA* dispdata, /**< display column data */
157  int width, /**< width of display column (no. of chars used) */
158  int priority, /**< priority of display column */
159  int position, /**< relative position of display column */
160  SCIP_Bool stripline /**< should the column be separated with a line from its right neighbor? */
161  )
162 {
163  assert(disp != NULL);
164  assert(name != NULL);
165  assert(desc != NULL);
166  assert(header != NULL);
167  assert(dispoutput != NULL);
168  assert(width >= 0);
169 
170  SCIP_CALL_FINALLY( doDispCreate(disp, set, messagehdlr, blkmem, name, desc, header, dispstatus, dispcopy,
171  dispfree, dispinit, dispexit, dispinitsol, dispexitsol, dispoutput, dispdata, width, priority, position,
172  stripline), (void) SCIPdispFree(disp, set) );
173 
174  return SCIP_OKAY;
175 }
176 
177 /** frees memory of display column */
179  SCIP_DISP** disp, /**< pointer to display column data structure */
180  SCIP_SET* set /**< global SCIP settings */
181  )
182 {
183  assert(disp != NULL);
184  if( *disp == NULL )
185  return SCIP_OKAY;
186  assert(!(*disp)->initialized);
187  assert(set != NULL);
188 
189  /* call destructor of display column */
190  if( (*disp)->dispfree != NULL )
191  {
192  SCIP_CALL( (*disp)->dispfree(set->scip, *disp) );
193  }
194 
195  BMSfreeMemoryArrayNull(&(*disp)->name);
196  BMSfreeMemoryArrayNull(&(*disp)->desc);
197  BMSfreeMemoryArrayNull(&(*disp)->header);
198  BMSfreeMemory(disp);
199 
200  return SCIP_OKAY;
201 }
202 
203 /** initializes display column */
205  SCIP_DISP* disp, /**< display column */
206  SCIP_SET* set /**< global SCIP settings */
207  )
208 {
209  assert(disp != NULL);
210  assert(set != NULL);
211 
212  if( disp->initialized )
213  {
214  SCIPerrorMessage("display column <%s> already initialized\n", disp->name);
215  return SCIP_INVALIDCALL;
216  }
217 
218  if( disp->dispinit != NULL )
219  {
220  SCIP_CALL( disp->dispinit(set->scip, disp) );
221  }
222  disp->initialized = TRUE;
223 
224  return SCIP_OKAY;
225 }
226 
227 /** deinitializes display column */
229  SCIP_DISP* disp, /**< display column */
230  SCIP_SET* set /**< global SCIP settings */
231  )
232 {
233  assert(disp != NULL);
234  assert(set != NULL);
235 
236  if( !disp->initialized )
237  {
238  SCIPerrorMessage("display column <%s> not initialized\n", disp->name);
239  return SCIP_INVALIDCALL;
240  }
241 
242  if( disp->dispexit != NULL )
243  {
244  SCIP_CALL( disp->dispexit(set->scip, disp) );
245  }
246  disp->initialized = FALSE;
247 
248  return SCIP_OKAY;
249 }
250 
251 /** informs display column that the branch and bound process is being started */
253  SCIP_DISP* disp, /**< display column */
254  SCIP_SET* set /**< global SCIP settings */
255  )
256 {
257  assert(disp != NULL);
258  assert(set != NULL);
259 
260  /* call solving process initialization method of display column */
261  if( disp->dispinitsol != NULL )
262  {
263  SCIP_CALL( disp->dispinitsol(set->scip, disp) );
264  }
265 
266  return SCIP_OKAY;
267 }
268 
269 /** informs display column that the branch and bound process data is being freed */
271  SCIP_DISP* disp, /**< display column */
272  SCIP_SET* set /**< global SCIP settings */
273  )
274 {
275  assert(disp != NULL);
276  assert(set != NULL);
277 
278  /* call solving process deinitialization method of display column */
279  if( disp->dispexitsol != NULL )
280  {
281  SCIP_CALL( disp->dispexitsol(set->scip, disp) );
282  }
283 
284  return SCIP_OKAY;
285 }
286 
287 /** output display column to screen */
289  SCIP_DISP* disp, /**< display column */
290  SCIP_SET* set, /**< global SCIP settings */
291  FILE* file /**< output file (or NULL for standard output) */
292  )
293 {
294  assert(disp != NULL);
295  assert(disp->dispoutput != NULL);
296  assert(set != NULL);
297 
298  SCIP_CALL( disp->dispoutput(set->scip, disp, file) );
299 
300  return SCIP_OKAY;
301 }
302 
303 /** gets user data of display column */
305  SCIP_DISP* disp /**< display column */
306  )
307 {
308  assert(disp != NULL);
309 
310  return disp->dispdata;
311 }
312 
313 /** sets user data of display column; user has to free old data in advance! */
315  SCIP_DISP* disp, /**< display column */
316  SCIP_DISPDATA* dispdata /**< new display column user data */
317  )
318 {
319  assert(disp != NULL);
320 
321  disp->dispdata = dispdata;
322 }
323 
324 /** gets name of display column */
325 const char* SCIPdispGetName(
326  SCIP_DISP* disp /**< display column */
327  )
328 {
329  assert(disp != NULL);
330 
331  return disp->name;
332 }
333 
334 /** gets description of display column */
335 const char* SCIPdispGetDesc(
336  SCIP_DISP* disp /**< display column */
337  )
338 {
339  assert(disp != NULL);
340 
341  return disp->desc;
342 }
343 
344 /** gets head line of display column */
345 const char* SCIPdispGetHeader(
346  SCIP_DISP* disp /**< display column */
347  )
348 {
349  assert(disp != NULL);
350 
351  return disp->header;
352 }
353 
354 /** gets width of display column */
356  SCIP_DISP* disp /**< display column */
357  )
358 {
359  assert(disp != NULL);
360 
361  return disp->width;
362 }
363 
364 /** gets priority of display column */
366  SCIP_DISP* disp /**< display column */
367  )
368 {
369  assert(disp != NULL);
370 
371  return disp->priority;
372 }
373 
374 /** gets position of display column */
376  SCIP_DISP* disp /**< display column */
377  )
378 {
379  assert(disp != NULL);
380 
381  return disp->position;
382 }
383 
384 /** gets status of display column */
386  SCIP_DISP* disp /**< display column */
387  )
388 {
389  assert(disp != NULL);
390 
391  return disp->dispstatus;
392 }
393 
394 /** is display column initialized? */
396  SCIP_DISP* disp /**< display column */
397  )
398 {
399  assert(disp != NULL);
400 
401  return disp->initialized;
402 }
403 
404 /** prints one line of output with the active display columns */
406  SCIP_SET* set, /**< global SCIP settings */
407  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
408  SCIP_STAT* stat, /**< problem statistics data */
409  FILE* file, /**< output file (or NULL for standard output) */
410  SCIP_Bool forcedisplay, /**< should the line be printed without regarding frequency? */
411  SCIP_Bool endline /**< should the line be terminated with a newline symbol? */
412  )
413 {
414  assert(set != NULL);
415  assert(set->disp_freq >= -1);
416  assert(set->disp_headerfreq >= -1);
417  assert(stat != NULL);
418 
419  if( (SCIP_VERBLEVEL)set->disp_verblevel < SCIP_VERBLEVEL_NORMAL || set->disp_freq == -1 )
420  return SCIP_OKAY;
421 
422  if( forcedisplay
423  || (stat->nnodes != stat->lastdispnode
424  && set->disp_freq > 0
425  && (stat->nnodes % set->disp_freq == 0 || stat->nnodes == 1)) )
426  {
427  int i;
428  int j;
429  SCIP_Bool stripline;
430 
431  /* display header line */
432  if( (set->disp_headerfreq == 0 && stat->ndisplines == 0)
433  || (set->disp_headerfreq > 0 && stat->ndisplines % set->disp_headerfreq == 0) )
434  {
435  int fillspace;
436 
437  stripline = FALSE;
438  for( i = 0; i < set->ndisps; ++i )
439  {
440  assert(set->disps[i] != NULL);
441  if( set->disps[i]->active )
442  {
443  if( stripline )
444  SCIPmessageFPrintInfo(messagehdlr, file, "|");
445  fillspace = set->disps[i]->width - (int)strlen(set->disps[i]->header);
446  for( j = 0; j < (fillspace)/2; ++j )
447  SCIPmessageFPrintInfo(messagehdlr, file, " ");
448  SCIPmessageFPrintInfo(messagehdlr, file, "%s", (const char*)set->disps[i]->header);
449  for( j = 0; j < (fillspace+1)/2; ++j )
450  SCIPmessageFPrintInfo(messagehdlr, file, " ");
451  stripline = set->disps[i]->stripline;
452  }
453  }
454  SCIPmessageFPrintInfo(messagehdlr, file, "\n");
455  }
456 
457  /* display node information line */
458  stripline = FALSE;
459  for( i = 0; i < set->ndisps; ++i )
460  {
461  assert(set->disps[i] != NULL);
462  if( set->disps[i]->active )
463  {
464  if( stripline )
465  SCIPmessageFPrintInfo(messagehdlr, file, "|");
466  SCIP_CALL( SCIPdispOutput(set->disps[i], set, file) );
467  stripline = set->disps[i]->stripline;
468  }
469  }
470  if( endline )
471  {
472  SCIPmessageFPrintInfo(messagehdlr, file, "\n");
473  }
474  fflush(stdout);
475 
476  stat->lastdispnode = stat->nnodes;
477  stat->ndisplines++;
478  }
479 
480  return SCIP_OKAY;
481 }
482 
483 /** comparison method for display columns */
484 static
486 { /*lint --e{715}*/
487  return ((SCIP_DISP*)elem2)->priority - ((SCIP_DISP*)elem1)->priority;
488 }
489 
490 /** activates all display lines fitting in the display w.r. to priority */
492  SCIP_SET* set /**< global SCIP settings */
493  )
494 {
495  SCIP_DISP** disps;
496  SCIP_SYNCSTORE* syncstore;
497  SCIP_DISPMODE mode;
498  int totalwidth;
499  int width;
500  int i;
501 
502  assert(set != NULL);
503 
504  syncstore = SCIPgetSyncstore(set->scip);
505  assert(syncstore != NULL);
506 
507  /* sort display columns w.r. to their priority */
508  SCIP_ALLOC( BMSduplicateMemoryArray(&disps, set->disps, set->ndisps) );
509  SCIPsortPtr((void**)disps, dispComp, set->ndisps);
510 
511  totalwidth = 0;
512 
513  if( SCIPsyncstoreIsInitialized(syncstore) )
515  else
516  mode = SCIP_DISPMODE_DEFAULT;
517 
518  /* first activate all columns with display status ON */
519  for( i = 0; i < set->ndisps; ++i )
520  {
521  width = disps[i]->width;
522  if( disps[i]->stripline )
523  width++;
524  if( disps[i]->dispstatus == SCIP_DISPSTATUS_ON && (disps[i]->mode & mode) )
525  {
526  disps[i]->active = TRUE;
527  totalwidth += width;
528  }
529  else
530  disps[i]->active = FALSE;
531  }
532 
533  /* beginning with highest priority display column, activate AUTO columns as long as it fits into display width */
534  for( i = 0; i < set->ndisps; ++i )
535  {
536  if( disps[i]->dispstatus == SCIP_DISPSTATUS_AUTO )
537  {
538  assert(!disps[i]->active);
539 
540  width = disps[i]->width;
541  if( disps[i]->stripline )
542  width++;
543  if( totalwidth + width <= set->disp_width && (disps[i]->mode & mode) )
544  {
545  disps[i]->active = TRUE;
546  totalwidth += width;
547  }
548  }
549  }
550 
551  /* free temporary memory */
552  BMSfreeMemoryArray(&disps);
553 
554  return SCIP_OKAY;
555 }
556 
557 /** changes the display column mode */
559  SCIP_DISP* disp, /**< display column */
560  SCIP_DISPMODE mode /**< the display column mode */
561  )
562 {
563  disp->mode = mode;
564 }
565 
566 static
567 const char decpowerchar[] = {' ', 'k', 'M', 'G', 'T', 'P', 'E'};
568 #define MAXDECPOWER 6
569 
570 /** displays a long integer in decimal form fitting in a given width */
572  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
573  FILE* file, /**< output stream */
574  SCIP_Longint val, /**< value to display */
575  int width /**< width to fit into */
576  )
577 {
578  assert(width >= 1);
579 
580  if( width == 1 )
581  {
582  if( val < 0 )
583  SCIPmessageFPrintInfo(messagehdlr, file, "-");
584  else if( val < 10 )
585  SCIPmessageFPrintInfo(messagehdlr, file, "%" SCIP_LONGINT_FORMAT, val);
586  else
587  SCIPmessageFPrintInfo(messagehdlr, file, "+");
588  }
589  else
590  {
591  char format[SCIP_MAXSTRLEN];
592  SCIP_Longint maxval;
593  int decpower;
594  int i;
595 
596  maxval = 1;
597  for( i = 0; i < width-1; ++i )
598  maxval *= 10;
599  if( val < 0 )
600  maxval /= 10;
601  decpower = 0;
602  while( ABS(val) >= maxval && decpower < MAXDECPOWER )
603  {
604  decpower++;
605  val /= 1000;
606  }
607  (void) SCIPsnprintf(format, SCIP_MAXSTRLEN, "%%%d" SCIP_LONGINT_FORMAT "%c", width-1, decpowerchar[decpower]);
608 
609  if( width == 2 && val < 0 )
610  SCIPmessageFPrintInfo(messagehdlr, file, "-%c", decpowerchar[decpower]);
611  else
612  SCIPmessageFPrintInfo(messagehdlr, file, (const char*)format, val);
613  }
614 }
615 
616 /** displays an integer in decimal form fitting in a given width */
618  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
619  FILE* file, /**< output stream */
620  int val, /**< value to display */
621  int width /**< width to fit into */
622  )
623 {
624  SCIPdispLongint(messagehdlr, file, (SCIP_Longint)val, width);
625 }
626 
627 
628 static
629 const char timepowerchar[] = {'s', 'm', 'h', 'd', 'y'};
630 const SCIP_Real timepowerval[] = {1.0, 60.0, 60.0, 24.0, 365.0};
631 #define MAXTIMEPOWER 4
632 
633 /** displays a time value fitting in a given width */
635  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
636  FILE* file, /**< output stream */
637  SCIP_Real val, /**< value in seconds to display */
638  int width /**< width to fit into */
639  )
640 {
641  assert(width >= 1);
642 
643  if( width == 1 )
644  {
645  if( val < 0.0 )
646  SCIPmessageFPrintInfo(messagehdlr, file, "-");
647  else if( val < 10.0 )
648  SCIPmessageFPrintInfo(messagehdlr, file, "%.0f", val);
649  else
650  SCIPmessageFPrintInfo(messagehdlr, file, "+");
651  }
652  else
653  {
654  char format[SCIP_MAXSTRLEN];
655  SCIP_Longint maxval;
656  int timepower;
657  int i;
658 
659  maxval = 1;
660  for( i = 0; i < width-1; ++i )
661  maxval *= 10;
662  if( val < 0.0 )
663  maxval /= 10;
664  timepower = 0;
665  while( REALABS(val) + 0.5 >= maxval && timepower < MAXTIMEPOWER )
666  {
667  timepower++;
668  val /= timepowerval[timepower];
669  }
670  if( REALABS(val) + 0.05 < maxval/100.0 )
671  (void) SCIPsnprintf(format, SCIP_MAXSTRLEN, "%%%d.1f%c", width-1, timepowerchar[timepower]);
672  else
673  (void) SCIPsnprintf(format, SCIP_MAXSTRLEN, "%%%d.0f%c", width-1, timepowerchar[timepower]);
674 
675  if( width == 2 && val < 0.0 )
676  SCIPmessageFPrintInfo(messagehdlr, file, "-%c", timepowerchar[timepower]);
677  else
678  SCIPmessageFPrintInfo(messagehdlr, file, (const char*)format, val);
679  }
680 }
void SCIPdispSetData(SCIP_DISP *disp, SCIP_DISPDATA *dispdata)
Definition: disp.c:314
void SCIPdispChgMode(SCIP_DISP *disp, SCIP_DISPMODE mode)
Definition: disp.c:558
char * name
Definition: struct_disp.h:38
SCIP_RETCODE SCIPdispInit(SCIP_DISP *disp, SCIP_SET *set)
Definition: disp.c:204
#define NULL
Definition: def.h:253
#define SCIP_DECL_DISPINITSOL(x)
Definition: type_disp.h:106
SCIP_Bool initialized
Definition: struct_disp.h:54
#define BMSfreeMemoryArrayNull(ptr)
Definition: memory.h:138
struct SCIP_DispData SCIP_DISPDATA
Definition: type_disp.h:62
SCIP_RETCODE SCIPdispInitsol(SCIP_DISP *disp, SCIP_SET *set)
Definition: disp.c:252
SCIP_RETCODE SCIPdispAutoActivate(SCIP_SET *set)
Definition: disp.c:491
data structures for displaying runtime statistics
SCIP_RETCODE SCIPdispPrintLine(SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, SCIP_STAT *stat, FILE *file, SCIP_Bool forcedisplay, SCIP_Bool endline)
Definition: disp.c:405
SCIP_RETCODE SCIPdispOutput(SCIP_DISP *disp, SCIP_SET *set, FILE *file)
Definition: disp.c:288
#define SCIP_MAXSTRLEN
Definition: def.h:274
SCIP_RETCODE SCIPdispFree(SCIP_DISP **disp, SCIP_SET *set)
Definition: disp.c:178
#define MAXDECPOWER
Definition: disp.c:568
#define SCIP_CALL_FINALLY(x, y)
Definition: def.h:407
char * header
Definition: struct_disp.h:40
enum SCIP_DispMode SCIP_DISPMODE
Definition: type_disp.h:59
SCIP_RETCODE SCIPdispExit(SCIP_DISP *disp, SCIP_SET *set)
Definition: disp.c:228
int SCIPdispGetWidth(SCIP_DISP *disp)
Definition: disp.c:355
const SCIP_Real timepowerval[]
Definition: disp.c:630
int position
Definition: struct_disp.h:51
#define FALSE
Definition: def.h:73
#define TRUE
Definition: def.h:72
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:53
SCIP_DISPDATA * SCIPdispGetData(SCIP_DISP *disp)
Definition: disp.c:304
enum SCIP_VerbLevel SCIP_VERBLEVEL
Definition: type_message.h:48
static GRAPHNODE ** active
const char * SCIPdispGetDesc(SCIP_DISP *disp)
Definition: disp.c:335
SCIP_RETCODE SCIPdispCreate(SCIP_DISP **disp, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, BMS_BLKMEM *blkmem, const char *name, const char *desc, const char *header, SCIP_DISPSTATUS dispstatus, SCIP_DECL_DISPCOPY((*dispcopy)), SCIP_DECL_DISPFREE((*dispfree)), SCIP_DECL_DISPINIT((*dispinit)), SCIP_DECL_DISPEXIT((*dispexit)), SCIP_DECL_DISPINITSOL((*dispinitsol)), SCIP_DECL_DISPEXITSOL((*dispexitsol)), SCIP_DECL_DISPOUTPUT((*dispoutput)), SCIP_DISPDATA *dispdata, int width, int priority, int position, SCIP_Bool stripline)
Definition: disp.c:140
int ndisplines
Definition: struct_stat.h:218
SCIP_Longint lastdispnode
Definition: struct_stat.h:101
SCIP_Bool SCIPdispIsInitialized(SCIP_DISP *disp)
Definition: disp.c:395
#define BMSfreeMemory(ptr)
Definition: memory.h:135
#define SCIP_DECL_DISPCOPY(x)
Definition: type_disp.h:71
void SCIPdispLongint(SCIP_MESSAGEHDLR *messagehdlr, FILE *file, SCIP_Longint val, int width)
Definition: disp.c:571
SCIP_RETCODE SCIPdispCopyInclude(SCIP_DISP *disp, SCIP_SET *set)
Definition: disp.c:55
#define SCIP_DECL_DISPINIT(x)
Definition: type_disp.h:87
char * desc
Definition: struct_disp.h:39
#define BMSfreeMemoryArray(ptr)
Definition: memory.h:137
SCIP_DISPMODE mode
Definition: struct_disp.h:56
#define SCIPerrorMessage
Definition: pub_message.h:45
SCIP_Bool SCIPsyncstoreIsInitialized(SCIP_SYNCSTORE *syncstore)
Definition: syncstore.c:775
SCIP_RETCODE SCIPdispExitsol(SCIP_DISP *disp, SCIP_SET *set)
Definition: disp.c:270
#define REALABS(x)
Definition: def.h:188
int priority
Definition: struct_disp.h:50
internal methods for global SCIP settings
#define SCIP_CALL(x)
Definition: def.h:365
static SCIP_DECL_SORTPTRCOMP(dispComp)
Definition: disp.c:485
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_EXPORT void SCIPsortPtr(void **ptrarray, SCIP_DECL_SORTPTRCOMP((*ptrcomp)), int len)
#define BMSduplicateMemoryArray(ptr, source, num)
Definition: memory.h:133
the function declarations for the synchronization store
public data structures and miscellaneous methods
#define SCIP_Bool
Definition: def.h:70
#define SCIP_DECL_DISPFREE(x)
Definition: type_disp.h:79
int SCIPdispGetPriority(SCIP_DISP *disp)
Definition: disp.c:365
SCIP_DISPDATA * dispdata
Definition: struct_disp.h:48
SCIP_DISPSTATUS SCIPdispGetStatus(SCIP_DISP *disp)
Definition: disp.c:385
int SCIPdispGetPosition(SCIP_DISP *disp)
Definition: disp.c:375
#define SCIPsetDebugMsg
Definition: set.h:1720
SCIP_DECL_PARAMCHGD(SCIPparamChgdDispActive)
Definition: disp.c:46
SCIP_RETCODE SCIPautoselectDisps(SCIP *scip)
Definition: scip_disp.c:122
#define BMSclearMemory(ptr)
Definition: memory.h:119
#define MAXTIMEPOWER
Definition: disp.c:631
#define SCIP_LONGINT_FORMAT
Definition: def.h:156
#define SCIP_DECL_DISPEXITSOL(x)
Definition: type_disp.h:117
SCIP_SYNCSTORE * SCIPgetSyncstore(SCIP *scip)
#define SCIP_DECL_DISPEXIT(x)
Definition: type_disp.h:95
static const char decpowerchar[]
Definition: disp.c:567
public methods for message output
SCIP_DISPSTATUS dispstatus
Definition: struct_disp.h:52
int SCIPsnprintf(char *t, int len, const char *s,...)
Definition: misc.c:10263
void SCIPmessageFPrintInfo(SCIP_MESSAGEHDLR *messagehdlr, FILE *file, const char *formatstr,...)
Definition: message.c:608
enum SCIP_DispStatus SCIP_DISPSTATUS
Definition: type_disp.h:50
#define SCIP_Real
Definition: def.h:164
internal methods for problem statistics
#define BMSallocMemory(ptr)
Definition: memory.h:109
const char * SCIPdispGetHeader(SCIP_DISP *disp)
Definition: disp.c:345
#define SCIP_Longint
Definition: def.h:149
void SCIPdispTime(SCIP_MESSAGEHDLR *messagehdlr, FILE *file, SCIP_Real val, int width)
Definition: disp.c:634
const char * SCIPdispGetName(SCIP_DISP *disp)
Definition: disp.c:325
static const char timepowerchar[]
Definition: disp.c:629
common defines and data types used in all packages of SCIP
SCIP_Longint nnodes
Definition: struct_stat.h:73
#define SCIP_DECL_DISPOUTPUT(x)
Definition: type_disp.h:126
struct BMS_BlkMem BMS_BLKMEM
Definition: memory.h:427
static SCIP_RETCODE doDispCreate(SCIP_DISP **disp, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, BMS_BLKMEM *blkmem, const char *name, const char *desc, const char *header, SCIP_DISPSTATUS dispstatus, SCIP_DECL_DISPCOPY((*dispcopy)), SCIP_DECL_DISPFREE((*dispfree)), SCIP_DECL_DISPINIT((*dispinit)), SCIP_DECL_DISPEXIT((*dispexit)), SCIP_DECL_DISPINITSOL((*dispinitsol)), SCIP_DECL_DISPEXITSOL((*dispexitsol)), SCIP_DECL_DISPOUTPUT((*dispoutput)), SCIP_DISPDATA *dispdata, int width, int priority, int position, SCIP_Bool stripline)
Definition: disp.c:74
#define SCIP_ALLOC(x)
Definition: def.h:376
#define ABS(x)
Definition: def.h:218
SCIP callable library.
internal methods for displaying runtime statistics
void SCIPdispInt(SCIP_MESSAGEHDLR *messagehdlr, FILE *file, int val, int width)
Definition: disp.c:617
memory allocation routines