Scippy

SCIP

Solving Constraint Integer Programs

stat.c
Go to the documentation of this file.
1 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2 /* */
3 /* This file is part of the program and library */
4 /* SCIP --- Solving Constraint Integer Programs */
5 /* */
6 /* Copyright (C) 2002-2022 Konrad-Zuse-Zentrum */
7 /* fuer Informationstechnik Berlin */
8 /* */
9 /* SCIP is distributed under the terms of the ZIB Academic License. */
10 /* */
11 /* You should have received a copy of the ZIB Academic License */
12 /* along with SCIP; see the file COPYING. If not visit scipopt.org. */
13 /* */
14 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
15 
16 /**@file stat.c
17  * @ingroup OTHER_CFILES
18  * @brief methods for problem statistics
19  * @author Tobias Achterberg
20  * @author Stefan Heinz
21  * @author Gregor Hendel
22  * @author Gerald Gamrath
23  * @author Marc Pfetsch
24  * @author Stefan Vigerske
25  */
26 
27 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
28 
29 #include "scip/clock.h"
30 #include "scip/history.h"
31 #include "scip/mem.h"
32 #include "scip/prob.h"
33 #include "scip/pub_message.h"
34 #include "scip/pub_misc.h"
35 #include "scip/pub_var.h"
36 #include "scip/set.h"
37 #include "scip/stat.h"
38 #include "scip/struct_set.h"
39 #include "scip/struct_stat.h"
40 #include "scip/var.h"
41 #include "scip/visual.h"
42 
43 
44 
45 /** creates problem statistics data */
47  SCIP_STAT** stat, /**< pointer to problem statistics data */
48  BMS_BLKMEM* blkmem, /**< block memory */
49  SCIP_SET* set, /**< global SCIP settings */
50  SCIP_PROB* transprob, /**< transformed problem, or NULL */
51  SCIP_PROB* origprob, /**< original problem, or NULL */
52  SCIP_MESSAGEHDLR* messagehdlr /**< message handler */
53  )
54 {
55  assert(stat != NULL);
56  assert(set != NULL);
57 
58  SCIP_ALLOC( BMSallocMemory(stat) );
59 
60  SCIP_CALL( SCIPclockCreate(&(*stat)->solvingtime, SCIP_CLOCKTYPE_DEFAULT) );
61  SCIP_CALL( SCIPclockCreate(&(*stat)->solvingtimeoverall, SCIP_CLOCKTYPE_DEFAULT) );
62  SCIP_CALL( SCIPclockCreate(&(*stat)->presolvingtime, SCIP_CLOCKTYPE_DEFAULT) );
63  SCIP_CALL( SCIPclockCreate(&(*stat)->presolvingtimeoverall, SCIP_CLOCKTYPE_DEFAULT) );
64  SCIP_CALL( SCIPclockCreate(&(*stat)->primallptime, SCIP_CLOCKTYPE_DEFAULT) );
65  SCIP_CALL( SCIPclockCreate(&(*stat)->duallptime, SCIP_CLOCKTYPE_DEFAULT) );
66  SCIP_CALL( SCIPclockCreate(&(*stat)->lexduallptime, SCIP_CLOCKTYPE_DEFAULT) );
67  SCIP_CALL( SCIPclockCreate(&(*stat)->barrierlptime, SCIP_CLOCKTYPE_DEFAULT) );
68  SCIP_CALL( SCIPclockCreate(&(*stat)->resolveinstablelptime, SCIP_CLOCKTYPE_DEFAULT) );
69  SCIP_CALL( SCIPclockCreate(&(*stat)->divinglptime, SCIP_CLOCKTYPE_DEFAULT) );
70  SCIP_CALL( SCIPclockCreate(&(*stat)->strongbranchtime, SCIP_CLOCKTYPE_DEFAULT) );
71  SCIP_CALL( SCIPclockCreate(&(*stat)->conflictlptime, SCIP_CLOCKTYPE_DEFAULT) );
72  SCIP_CALL( SCIPclockCreate(&(*stat)->lpsoltime, SCIP_CLOCKTYPE_DEFAULT) );
73  SCIP_CALL( SCIPclockCreate(&(*stat)->relaxsoltime, SCIP_CLOCKTYPE_DEFAULT) );
74  SCIP_CALL( SCIPclockCreate(&(*stat)->pseudosoltime, SCIP_CLOCKTYPE_DEFAULT) );
75  SCIP_CALL( SCIPclockCreate(&(*stat)->sbsoltime, SCIP_CLOCKTYPE_DEFAULT) );
76  SCIP_CALL( SCIPclockCreate(&(*stat)->nodeactivationtime, SCIP_CLOCKTYPE_DEFAULT) );
77  SCIP_CALL( SCIPclockCreate(&(*stat)->nlpsoltime, SCIP_CLOCKTYPE_DEFAULT) );
78  SCIP_CALL( SCIPclockCreate(&(*stat)->copyclock, SCIP_CLOCKTYPE_DEFAULT) );
79  SCIP_CALL( SCIPclockCreate(&(*stat)->strongpropclock, SCIP_CLOCKTYPE_DEFAULT) );
80  SCIP_CALL( SCIPclockCreate(&(*stat)->reoptupdatetime, SCIP_CLOCKTYPE_DEFAULT) );
81 
82  /* turn statistic timing on or off, depending on the user parameter */
83  SCIPstatEnableOrDisableStatClocks(*stat, set->time_statistictiming);
84 
85  SCIP_CALL( SCIPhistoryCreate(&(*stat)->glbhistory, blkmem) );
86  SCIP_CALL( SCIPhistoryCreate(&(*stat)->glbhistorycrun, blkmem) );
87  SCIP_CALL( SCIPvisualCreate(&(*stat)->visual, messagehdlr) );
88 
89  SCIP_CALL( SCIPregressionCreate(&(*stat)->regressioncandsobjval) );
90 
91  (*stat)->status = SCIP_STATUS_UNKNOWN;
92  (*stat)->marked_nvaridx = 0;
93  (*stat)->marked_ncolidx = 0;
94  (*stat)->marked_nrowidx = 0;
95  (*stat)->subscipdepth = 0;
96  (*stat)->detertimecnt = 0.0;
97  (*stat)->nreoptruns = 0;
98 
99  SCIPstatReset(*stat, set, transprob, origprob);
100 
101  return SCIP_OKAY;
102 }
103 
104 /** frees problem statistics data */
106  SCIP_STAT** stat, /**< pointer to problem statistics data */
107  BMS_BLKMEM* blkmem /**< block memory */
108  )
109 {
110  assert(stat != NULL);
111  assert(*stat != NULL);
112 
113  SCIPclockFree(&(*stat)->solvingtime);
114  SCIPclockFree(&(*stat)->solvingtimeoverall);
115  SCIPclockFree(&(*stat)->presolvingtime);
116  SCIPclockFree(&(*stat)->presolvingtimeoverall);
117  SCIPclockFree(&(*stat)->primallptime);
118  SCIPclockFree(&(*stat)->duallptime);
119  SCIPclockFree(&(*stat)->lexduallptime);
120  SCIPclockFree(&(*stat)->barrierlptime);
121  SCIPclockFree(&(*stat)->resolveinstablelptime);
122  SCIPclockFree(&(*stat)->divinglptime);
123  SCIPclockFree(&(*stat)->strongbranchtime);
124  SCIPclockFree(&(*stat)->conflictlptime);
125  SCIPclockFree(&(*stat)->lpsoltime);
126  SCIPclockFree(&(*stat)->relaxsoltime);
127  SCIPclockFree(&(*stat)->pseudosoltime);
128  SCIPclockFree(&(*stat)->sbsoltime);
129  SCIPclockFree(&(*stat)->nodeactivationtime);
130  SCIPclockFree(&(*stat)->nlpsoltime);
131  SCIPclockFree(&(*stat)->copyclock);
132  SCIPclockFree(&(*stat)->strongpropclock);
133  SCIPclockFree(&(*stat)->reoptupdatetime);
134 
135  SCIPhistoryFree(&(*stat)->glbhistory, blkmem);
136  SCIPhistoryFree(&(*stat)->glbhistorycrun, blkmem);
137  SCIPvisualFree(&(*stat)->visual);
138 
139  SCIPregressionFree(&(*stat)->regressioncandsobjval);
140 
141  BMSfreeMemory(stat);
142 
143  return SCIP_OKAY;
144 }
145 
146 /** diables the collection of any statistic for a variable */
148  SCIP_STAT* stat /**< problem statistics data */
149  )
150 {
151  assert(stat != NULL);
152 
153  stat->collectvarhistory = FALSE;
154 }
155 
156 /** enables the collection of statistics for a variable */
158  SCIP_STAT* stat /**< problem statistics data */
159  )
160 {
161  assert(stat != NULL);
162 
163  stat->collectvarhistory = TRUE;
164 }
165 
166 /** marks statistics to be able to reset them when solving process is freed */
168  SCIP_STAT* stat /**< problem statistics data */
169  )
170 {
171  assert(stat != NULL);
172 
173  stat->marked_nvaridx = stat->nvaridx;
174  stat->marked_ncolidx = stat->ncolidx;
175  stat->marked_nrowidx = stat->nrowidx;
176 }
177 
178 /** reset statistics to the data before solving started */
180  SCIP_STAT* stat, /**< problem statistics data */
181  SCIP_SET* set, /**< global SCIP settings */
182  SCIP_PROB* transprob, /**< transformed problem, or NULL */
183  SCIP_PROB* origprob /**< original problem, or NULL */
184  )
185 {
186  assert(stat != NULL);
187  assert(stat->marked_nvaridx >= 0);
188  assert(stat->marked_ncolidx >= 0);
189  assert(stat->marked_nrowidx >= 0);
190 
194  SCIPclockReset(stat->duallptime);
201  SCIPclockReset(stat->lpsoltime);
204  SCIPclockReset(stat->sbsoltime);
206  SCIPclockReset(stat->nlpsoltime);
207  SCIPclockReset(stat->copyclock);
209 
211 
213 
214  stat->vsidsweight = 1.0;
215  stat->nlpiterations = 0;
216  stat->nrootlpiterations = 0;
217  stat->nrootfirstlpiterations = 0;
218  stat->nprimallpiterations = 0;
219  stat->nduallpiterations = 0;
220  stat->nlexduallpiterations = 0;
221  stat->nbarrierlpiterations = 0;
222  stat->nprimalresolvelpiterations = 0;
223  stat->ndualresolvelpiterations = 0;
224  stat->nlexdualresolvelpiterations = 0;
225  stat->nnodelpiterations = 0;
226  stat->ninitlpiterations = 0;
227  stat->ndivinglpiterations = 0;
228  stat->nsbdivinglpiterations = 0;
229  stat->nsblpiterations = 0;
230  stat->nsbtimesiterlimhit = 0L;
231  stat->nrootsblpiterations = 0;
232  stat->nconflictlpiterations = 0;
233  stat->nresolveinstablelps = 0;
234  stat->nresolveinstablelpiters = 0;
235  stat->ntotalnodes = 0;
236  stat->ntotalinternalnodes = 0;
237  stat->ntotalnodesmerged = 0;
238  stat->ncreatednodes = 0;
239  stat->nlpsolsfound = 0;
240  stat->nrelaxsolsfound = 0;
241  stat->npssolsfound = 0;
242  stat->nsbsolsfound = 0;
243  stat->nlpbestsolsfound = 0;
244  stat->nrelaxbestsolsfound = 0;
245  stat->npsbestsolsfound = 0;
246  stat->nsbbestsolsfound = 0;
247  stat->nexternalsolsfound = 0;
248  stat->domchgcount = 0;
249  stat->nboundchgs = 0;
250  stat->nholechgs = 0;
251  stat->nprobboundchgs = 0;
252  stat->nprobholechgs = 0;
253  stat->nsbdowndomchgs = 0;
254  stat->nsbupdomchgs = 0;
255  stat->nruns = 0;
256  stat->nconfrestarts = 0;
257  stat->nrootboundchgs = 0;
258  stat->nrootintfixings = 0;
259  stat->prevrunnvars = 0;
260  stat->nvaridx = stat->marked_nvaridx;
261  stat->ncolidx = stat->marked_ncolidx;
262  stat->nrowidx = stat->marked_nrowidx;
263  stat->nnz = 0;
264  stat->avgnnz = 0;
265  stat->lpcount = 0;
266  stat->relaxcount = 0;
267  stat->nlps = 0;
268  stat->nrootlps = 0;
269  stat->nprimallps = 0;
270  stat->nprimalzeroitlps = 0;
271  stat->nduallps = 0;
272  stat->ndualzeroitlps = 0;
273  stat->nlexduallps = 0;
274  stat->nbarrierlps = 0;
275  stat->nbarrierzeroitlps = 0;
276  stat->nprimalresolvelps = 0;
277  stat->ndualresolvelps = 0;
278  stat->nlexdualresolvelps = 0;
279  stat->nnodelps = 0;
280  stat->nnodezeroitlps = 0;
281  stat->nisstoppedcalls = 0;
282  stat->ninitlps = 0;
283  stat->ndivinglps = 0;
284  stat->nsbdivinglps = 0;
285  stat->nnumtroublelpmsgs = 0;
286  stat->nstrongbranchs = 0;
287  stat->nrootstrongbranchs = 0;
288  stat->nconflictlps = 0;
289  stat->nnlps = 0;
290  stat->maxtotaldepth = -1;
291  stat->nactiveconss = 0;
292  stat->nenabledconss = 0;
293  stat->solindex = 0;
294  stat->memsavemode = FALSE;
295  stat->nnodesbeforefirst = -1;
296  stat->ninitconssadded = 0;
297  stat->nactiveconssadded = 0;
298  stat->externmemestim = 0;
299  stat->exprlastvisitedtag = 0;
300  stat->exprlastsoltag = 0;
301  stat->exprlastdifftag = 0;
302  stat->nrunsbeforefirst = -1;
303  stat->firstprimalheur = NULL;
308  stat->primalzeroittime = 0.0;
309  stat->dualzeroittime = 0.0;
310  stat->barrierzeroittime = 0.0;
311  stat->maxcopytime = SCIP_REAL_MIN;
312  stat->mincopytime = SCIP_REAL_MAX;
313  stat->firstlptime = 0.0;
315  stat->ncopies = 0;
316  stat->nclockskipsleft = 0;
317  stat->nactiveexpriter = 0;
318  stat->marked_nvaridx = -1;
319  stat->marked_ncolidx = -1;
320  stat->marked_nrowidx = -1;
321  stat->branchedunbdvar = FALSE;
322  stat->bestefficacy = 0.0;
323  stat->minefficacyfac = 0.5;
324  stat->ncutpoolfails = 0;
325 
326  stat->ndivesetlpiterations = 0;
327  stat->ndivesetcalls = 0;
328  stat->ndivesetlps = 0;
329  stat->totaldivesetdepth = 0;
330 
331  stat->userinterrupt = FALSE;
332  stat->userrestart = FALSE;
333  stat->inrestart = FALSE;
334  stat->collectvarhistory = TRUE;
335  stat->performpresol = FALSE;
336  stat->disableenforelaxmsg = FALSE;
337 
339  SCIPstatResetPresolving(stat, set, transprob, origprob);
341 }
342 
343 /** reset implication counter */
345  SCIP_STAT* stat /**< problem statistics data */
346  )
347 {
348  assert(stat != NULL);
349 
350  stat->nimplications = 0;
351 }
352 
353 /** reset presolving and current run specific statistics */
355  SCIP_STAT* stat, /**< problem statistics data */
356  SCIP_SET* set, /**< global SCIP settings */
357  SCIP_PROB* transprob, /**< transformed problem, or NULL if not yet existing */
358  SCIP_PROB* origprob /**< original problem, or NULL */
359  )
360 {
361  assert(stat != NULL);
362 
363  stat->npresolrounds = 0;
364  stat->npresolroundsfast = 0;
365  stat->npresolroundsmed = 0;
366  stat->npresolroundsext = 0;
367  stat->npresolfixedvars = 0;
368  stat->npresolaggrvars = 0;
369  stat->npresolchgvartypes = 0;
370  stat->npresolchgbds = 0;
371  stat->npresoladdholes = 0;
372  stat->npresoldelconss = 0;
373  stat->npresoladdconss = 0;
374  stat->npresolupgdconss = 0;
375  stat->npresolchgcoefs = 0;
376  stat->npresolchgsides = 0;
377 
378  SCIPstatResetCurrentRun(stat, set, transprob, origprob, FALSE);
379 }
380 
381 /** reset primal-dual, primal-reference, and reference-dual integral */
383  SCIP_STAT* stat, /**< problem statistics data */
384  SCIP_SET* set, /**< global SCIP settings */
385  SCIP_Bool partialreset /**< should time and integral value be kept? (in combination with no statistical
386  * reset, integrals are added for each problem to be solved) */
387  )
388 {
389  assert(stat != NULL);
390 
391  stat->previousgap = 100.0;
392  stat->previousdualrefgap = 100.0;
393  stat->previousprimalrefgap = 100.0;
395  stat->lastdualbound = SCIP_UNKNOWN;
396  stat->lastlowerbound = -SCIPsetInfinity(set);
397  stat->lastupperbound = SCIPsetInfinity(set);
398 
399  /* partial resets keep the integral value and previous evaluation time */
400  if( !partialreset )
401  {
402  stat->previntegralevaltime = 0.0;
403  stat->dualrefintegral = 0.0;
404  stat->primalrefintegral = 0.0;
405  stat->primaldualintegral = 0.0;
406  }
407 }
408 
409 /** returns the gap bounded by 100 */
410 static
412  SCIP_SET* set, /**< global SCIP settings */
413  SCIP_Real primalbound, /**< current primal bound */
414  SCIP_Real dualbound, /**< current dual bound */
415  SCIP_Real upperbound, /**< current upper bound in transformed problem, or infinity */
416  SCIP_Real lowerbound /**< current lower bound in transformed space, or -infinity */
417  )
418 {
419  SCIP_Real gap;
420 
421  /* computation of the gap, special cases are handled first */
422  if( primalbound >= SCIP_UNKNOWN || dualbound >= SCIP_UNKNOWN ) /*lint !e777*/
423  gap = 100.0;
424  /* the gap is 0.0 if bounds coincide */
425  else if( SCIPsetIsGE(set, lowerbound, upperbound) || SCIPsetIsEQ(set, primalbound, dualbound) )
426  gap = 0.0;
427  /* the gap is 100.0 if bounds have different signs */
428  else if( primalbound * dualbound <= 0.0 ) /*lint !e777*/
429  gap = 100.0;
430  else if( !SCIPsetIsInfinity(set, REALABS(primalbound)) && !SCIPsetIsInfinity(set, REALABS(dualbound)) )
431  {
432  SCIP_Real absprim = REALABS(primalbound);
433  SCIP_Real absdual = REALABS(dualbound);
434 
435  /* The gap in the definition of the primal-dual integral differs from the default SCIP gap function.
436  * Here, the MAX(primalbound, dualbound) is taken for gap quotient in order to ensure a gap <= 100.
437  */
438  gap = 100.0 * REALABS(primalbound - dualbound) / MAX(absprim, absdual);
439  assert(SCIPsetIsLE(set, gap, 100.0));
440  }
441  else
442  gap = 100.0;
443 
444  return gap;
445 }
446 
447 /** update the primal-dual, primal-reference, and reference-dual integral statistics.
448  * method accepts + and - SCIPsetInfinity() as values for upper and lower bound, respectively
449  */
451  SCIP_STAT* stat, /**< problem statistics data */
452  SCIP_SET* set, /**< global SCIP settings */
453  SCIP_PROB* transprob, /**< transformed problem */
454  SCIP_PROB* origprob, /**< original problem */
455  SCIP_Real upperbound, /**< current upper bound in transformed problem, or infinity */
456  SCIP_Real lowerbound /**< current lower bound in transformed space, or -infinity */
457  )
458 {
459  SCIP_Real currentgap;
460  SCIP_Real currentdualrefgap;
461  SCIP_Real currentprimalrefgap;
462  SCIP_Real solvingtime;
463  SCIP_Real primalbound;
464  SCIP_Real dualbound;
465  SCIP_Real deltatime;
466 
467  assert(stat != NULL);
468  assert(set != NULL);
469 
470  solvingtime = SCIPclockGetTime(stat->solvingtime);
471  assert(solvingtime >= stat->previntegralevaltime);
472 
473  if( !SCIPsetIsInfinity(set, upperbound) ) /*lint !e777*/
474  {
475  /* get value in original space for gap calculation */
476  primalbound = SCIPprobExternObjval(transprob, origprob, set, upperbound);
477 
478  if( SCIPsetIsZero(set, primalbound) )
479  primalbound = 0.0;
480  }
481  else
482  {
483  /* no new upper bound: use stored values from last update */
484  upperbound = stat->lastupperbound;
485  primalbound = stat->lastprimalbound;
486  assert(SCIPsetIsZero(set, primalbound) == (primalbound == 0.0)); /*lint !e777*/
487  }
488 
489  if( !SCIPsetIsInfinity(set, -lowerbound) ) /*lint !e777*/
490  {
491  /* get value in original space for gap calculation */
492  dualbound = SCIPprobExternObjval(transprob, origprob, set, lowerbound);
493 
494  if( SCIPsetIsZero(set, dualbound) )
495  dualbound = 0.0;
496  }
497  else
498  {
499  /* no new lower bound: use stored values from last update */
500  lowerbound = stat->lastlowerbound;
501  dualbound = stat->lastdualbound;
502  assert(SCIPsetIsZero(set, dualbound) == (dualbound == 0.0)); /*lint !e777*/
503  }
504 
505  /* calculate primal-dual and dual reference gap */
506  currentgap = getGap(set, primalbound, dualbound, upperbound, lowerbound);
507 
508  /* if primal and dual bound have opposite signs, the gap always evaluates to 100.0% */
509  assert(currentgap == 0.0 || currentgap == 100.0 || SCIPsetIsGE(set, primalbound * dualbound, 0.0));
510 
511  /* update the integral based on previous information */
512  deltatime = solvingtime - stat->previntegralevaltime;
513  stat->primaldualintegral += deltatime * stat->previousgap;
514  stat->dualrefintegral += deltatime * stat->previousdualrefgap;
515  stat->primalrefintegral += deltatime * stat->previousprimalrefgap;
516 
517  if( !SCIPsetIsInfinity(set, REALABS(set->misc_referencevalue)) )
518  {
519  currentdualrefgap = getGap(set, set->misc_referencevalue, dualbound, upperbound, lowerbound);
520  assert(currentdualrefgap == 0.0 || currentdualrefgap == 100.0 || SCIPsetIsGE(set, set->misc_referencevalue * dualbound, 0.0));
521 
522  currentprimalrefgap = getGap(set, primalbound, set->misc_referencevalue, upperbound, lowerbound);
523  assert(currentprimalrefgap == 0.0 || currentprimalrefgap == 100.0 || SCIPsetIsGE(set, primalbound * set->misc_referencevalue, 0.0));
524  }
525  else
526  {
527  currentdualrefgap = 100.0;
528  currentprimalrefgap = 100.0;
529  }
530 
531  /* update all relevant information for next evaluation */
532  stat->previousgap = currentgap;
533  stat->previousdualrefgap = currentdualrefgap;
534  stat->previousprimalrefgap = currentprimalrefgap;
535  stat->previntegralevaltime = solvingtime;
536  stat->lastprimalbound = primalbound;
537  stat->lastdualbound = dualbound;
538  stat->lastlowerbound = lowerbound;
539  stat->lastupperbound = upperbound;
540 }
541 
542 /** optionally update and return the reference-dual integral statistic */
544  SCIP_STAT* stat, /**< problem statistics data */
545  SCIP_SET* set, /**< global SCIP settings */
546  SCIP_PROB* transprob, /**< transformed problem */
547  SCIP_PROB* origprob, /**< original problem */
548  SCIP_Bool update /**< should the value be updated first? */
549  )
550 {
551  assert(stat != NULL);
552  assert(set != NULL);
553  assert(transprob != NULL);
554  assert(origprob != NULL);
555 
556  /* update the reference-dual integral first */
557  if( update )
558  SCIPstatUpdatePrimalDualIntegrals(stat, set, transprob, origprob, SCIPsetInfinity(set), -SCIPsetInfinity(set));
559 
560  return stat->dualrefintegral;
561 }
562 
563 /** optionally update and return the primal-reference integral statistic */
565  SCIP_STAT* stat, /**< problem statistics data */
566  SCIP_SET* set, /**< global SCIP settings */
567  SCIP_PROB* transprob, /**< transformed problem */
568  SCIP_PROB* origprob, /**< original problem */
569  SCIP_Bool update /**< should the value be updated first? */
570  )
571 {
572  assert(stat != NULL);
573  assert(set != NULL);
574  assert(transprob != NULL);
575  assert(origprob != NULL);
576 
577  /* update the primal-reference integral first */
578  if( update )
579  SCIPstatUpdatePrimalDualIntegrals(stat, set, transprob, origprob, SCIPsetInfinity(set), -SCIPsetInfinity(set));
580 
581  return stat->primalrefintegral;
582 }
583 
584 /** optionally update and return the primal-dual integral statistic */
586  SCIP_STAT* stat, /**< problem statistics data */
587  SCIP_SET* set, /**< global SCIP settings */
588  SCIP_PROB* transprob, /**< transformed problem */
589  SCIP_PROB* origprob, /**< original problem */
590  SCIP_Bool update /**< should the value be updated first? */
591  )
592 {
593  assert(stat != NULL);
594  assert(set != NULL);
595  assert(transprob != NULL);
596  assert(origprob != NULL);
597 
598  /* update the primal dual reference integral first */
599  if( update )
600  SCIPstatUpdatePrimalDualIntegrals(stat, set, transprob, origprob, SCIPsetInfinity(set), -SCIPsetInfinity(set));
601 
602  return stat->primaldualintegral;
603 }
604 
605 /** reset current branch and bound run specific statistics */
607  SCIP_STAT* stat, /**< problem statistics data */
608  SCIP_SET* set, /**< global SCIP settings */
609  SCIP_PROB* transprob, /**< transformed problem, or NULL */
610  SCIP_PROB* origprob, /**< original problem, or NULL */
611  SCIP_Bool solved /**< is problem already solved? */
612  )
613 {
614  assert(stat != NULL);
615 
616  stat->nnodes = 0;
617  stat->ninternalnodes = 0;
618  stat->ncreatednodesrun = 0;
619  stat->nactivatednodes = 0;
620  stat->ndeactivatednodes = 0;
621  stat->nbacktracks = 0;
622  stat->ndelayedcutoffs = 0;
623  stat->nreprops = 0;
624  stat->nrepropboundchgs = 0;
625  stat->nrepropcutoffs = 0;
626  stat->lastdivenode = 0;
627  stat->lastconflictnode = 0;
628  stat->bestsolnode = 0;
632  stat->lastbranchvar = NULL;
634  stat->nrootboundchgsrun = 0;
635  stat->nrootintfixingsrun = 0;
636  stat->npricerounds = 0;
637  stat->nseparounds = 0;
638  stat->maxdepth = -1;
639  stat->plungedepth = 0;
640  stat->nobjleaves = 0;
641  stat->ninfeasleaves = 0;
642  stat->nfeasleaves = 0;
643  stat->branchedunbdvar = FALSE;
644  stat->nnumtroublelpmsgs = 0;
645 
646  stat->nearlybacktracks = 0;
647  stat->nnodesaboverefbound = 0;
648 
649  assert(transprob == NULL || origprob != NULL);
650  /* calculate the reference bound in transformed space from the reference value */
651  if( transprob != NULL && !SCIPsetIsInfinity(set, SCIPsetGetReferencevalue(set)) )
652  stat->referencebound = SCIPprobInternObjval(transprob, origprob, set, SCIPsetGetReferencevalue(set));
653  else
654  stat->referencebound = SCIPsetInfinity(set);
655 
656  if( !solved )
657  stat->status = SCIP_STATUS_UNKNOWN;
658 
660 
662 
663  SCIPstatResetDisplay(stat);
664 }
665 
666 /** resets display statistics, such that a new header line is displayed before the next display line */
668  SCIP_STAT* stat /**< problem statistics data */
669  )
670 {
671  assert(stat != NULL);
672 
673  stat->lastdispnode = 0;
674  stat->ndisplines = 0;
675 }
676 
677 /** increases LP count, such that all lazy updates depending on the LP are enforced again */
679  SCIP_STAT* stat /**< problem statistics data */
680  )
681 {
682  assert(stat != NULL);
683 
684  stat->lpcount++;
685 }
686 
687 /** depending on the current memory usage, switches mode flag to standard or memory saving mode */
689  SCIP_STAT* stat, /**< problem statistics data */
690  SCIP_SET* set, /**< global SCIP settings */
691  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
692  SCIP_MEM* mem /**< block memory pools */
693  )
694 {
695  assert(stat != NULL);
696  assert(set != NULL);
697 
698  if( SCIPsetIsLT(set, set->mem_savefac, 1.0) )
699  {
700  SCIP_Longint memused;
701 
702  memused = SCIPmemGetTotal(mem);
703  if( !stat->memsavemode && memused >= set->mem_savefac * set->limit_memory * 1024.0 * 1024.0 )
704  {
705  /* switch to memory saving mode */
706  SCIPmessagePrintVerbInfo(messagehdlr, set->disp_verblevel, SCIP_VERBLEVEL_HIGH,
707  "(node %" SCIP_LONGINT_FORMAT ") switching to memory saving mode (mem: %.1fM/%.1fM)\n",
708  stat->nnodes, (SCIP_Real)memused/(1024.0*1024.0), set->limit_memory);
709  stat->memsavemode = TRUE;
710  set->nodesel = NULL;
711  }
712  else if( stat->memsavemode && memused < 0.5 * set->mem_savefac * set->limit_memory * 1024.0 * 1024.0 )
713  {
714  /* switch to standard mode */
715  SCIPmessagePrintVerbInfo(messagehdlr, set->disp_verblevel, SCIP_VERBLEVEL_HIGH,
716  "(node %" SCIP_LONGINT_FORMAT ") switching to standard mode (mem: %.1fM/%.1fM)\n",
717  stat->nnodes, (SCIP_Real)memused/(1024.0*1024.0), set->limit_memory);
718  stat->memsavemode = FALSE;
719  set->nodesel = NULL;
720  }
721  }
722  else
723  stat->memsavemode = FALSE;
724 }
725 
726 /** returns the estimated number of bytes used by extern software, e.g., the LP solver */
728  SCIP_STAT* stat /**< dynamic SCIP statistics */
729  )
730 {
731  return stat->externmemestim;
732 }
733 
734 /** enables or disables all statistic clocks of \p stat concerning LP execution time, strong branching time, etc.
735  *
736  * @note: The (pre-)solving time clocks which are relevant for the output during (pre-)solving
737  * are not affected by this method
738  *
739  * @see: For completely disabling all timing of SCIP, consider setting the parameter timing/enabled to FALSE
740  */
742  SCIP_STAT* stat, /**< SCIP statistics */
743  SCIP_Bool enable /**< should the LP clocks be enabled? */
744  )
745 {
746  assert(stat != NULL);
747 
748  SCIPclockEnableOrDisable(stat->primallptime, enable);
749  SCIPclockEnableOrDisable(stat->duallptime, enable);
753  SCIPclockEnableOrDisable(stat->divinglptime, enable);
756  SCIPclockEnableOrDisable(stat->lpsoltime, enable);
757  SCIPclockEnableOrDisable(stat->relaxsoltime, enable);
759  SCIPclockEnableOrDisable(stat->sbsoltime, enable);
761  SCIPclockEnableOrDisable(stat->nlpsoltime, enable);
762  SCIPclockEnableOrDisable(stat->copyclock, enable);
764 }
765 
766 /** recompute root LP best-estimate from scratch */
768  SCIP_STAT* stat, /**< SCIP statistics */
769  SCIP_SET* set, /**< global SCIP settings */
770  SCIP_Real rootlpobjval, /**< root LP objective value */
771  SCIP_VAR** vars, /**< problem variables */
772  int nvars /**< number of variables */
773  )
774 {
775  int v;
776  stat->rootlpbestestimate = rootlpobjval;
777 
778  /* compute best-estimate contribution for every variable */
779  for( v = 0; v < nvars; ++v )
780  {
781  SCIP_Real rootlpsol;
782  SCIP_Real varminpseudoscore;
783 
784  /* stop at the first continuous variable */
785  if( !SCIPvarIsIntegral(vars[v]) )
786  break;
787 
788  rootlpsol = SCIPvarGetRootSol(vars[v]);
789  varminpseudoscore = SCIPvarGetMinPseudocostScore(vars[v], stat, set, rootlpsol);
790  assert(varminpseudoscore >= 0);
791  stat->rootlpbestestimate += varminpseudoscore;
792 
793  SCIPstatDebugMsg(stat, "Root LP Estimate initialization: <%s> + %15.9f\n", SCIPvarGetName(vars[v]), varminpseudoscore);
794  }
795 }
796 
797 /** update root LP best-estimate with changed variable pseudo-costs */
799  SCIP_STAT* stat, /**< SCIP statistics */
800  SCIP_SET* set, /**< global SCIP settings */
801  SCIP_VAR* var, /**< variable with changed pseudo costs */
802  SCIP_Real oldrootpscostscore /**< old minimum pseudo cost score of variable */
803  )
804 {
805  SCIP_Real rootlpsol;
806  SCIP_Real varminpseudoscore;
807 
809 
810  /* entire root LP best-estimate must be computed from scratch first */
811  if( stat->rootlpbestestimate == SCIP_INVALID ) /*lint !e777*/
812  return SCIP_OKAY;
813 
814  rootlpsol = SCIPvarGetRootSol(var);
815 
816  /* LP root estimate only works for variables with fractional LP root solution */
817  if( SCIPsetIsFeasIntegral(set, rootlpsol) )
818  return SCIP_OKAY;
819 
820  /* subtract old pseudo cost contribution and add new contribution afterwards */
821  stat->rootlpbestestimate -= oldrootpscostscore;
822 
823  varminpseudoscore = SCIPvarGetMinPseudocostScore(var, stat, set, rootlpsol);
824  assert(varminpseudoscore >= 0.0);
825  stat->rootlpbestestimate += varminpseudoscore;
826 
827  SCIPstatDebugMsg(stat, "Root LP estimate update: <%s> - %15.9f + %15.9f\n", SCIPvarGetName(var), oldrootpscostscore, varminpseudoscore);
828 
829  return SCIP_OKAY;
830 }
831 
832 /** prints a debug message */
834  SCIP_STAT* stat, /**< SCIP statistics */
835  const char* sourcefile, /**< name of the source file that called the function */
836  int sourceline, /**< line in the source file where the function was called */
837  const char* formatstr, /**< format string like in printf() function */
838  ... /**< format arguments line in printf() function */
839  )
840 {
841  const char* filename;
842  va_list ap;
843 
844  assert( sourcefile != NULL );
845  assert( stat != NULL );
846 
847  /* strip directory from filename */
848 #if defined(_WIN32) || defined(_WIN64)
849  filename = strrchr(sourcefile, '\\');
850 #else
851  filename = strrchr(sourcefile, '/');
852 #endif
853  if ( filename == NULL )
854  filename = sourcefile;
855  else
856  ++filename;
857 
858  if ( stat->subscipdepth > 0 )
859  printf("%d: [%s:%d] debug: ", stat->subscipdepth, filename, sourceline);
860  else
861  printf("[%s:%d] debug: ", filename, sourceline);
862 
863  va_start(ap, formatstr); /*lint !e838*/
864  printf(formatstr, ap);
865  va_end(ap);
866 }
867 
868 /** prints a debug message without precode */
870  SCIP_STAT* stat, /**< SCIP statistics */
871  const char* formatstr, /**< format string like in printf() function */
872  ... /**< format arguments line in printf() function */
873  )
874 { /*lint --e{715}*/
875  va_list ap;
876 
877  assert(stat != NULL);
878 
879  va_start(ap, formatstr); /*lint !e838*/
880  printf(formatstr, ap);
881  va_end(ap);
882 }
SCIP_Longint nlexduallps
Definition: struct_stat.h:189
SCIP_Longint nprimallps
Definition: struct_stat.h:185
SCIP_RETCODE SCIPvisualCreate(SCIP_VISUAL **visual, SCIP_MESSAGEHDLR *messagehdlr)
Definition: visual.c:76
SCIP_Longint ndualresolvelpiterations
Definition: struct_stat.h:61
SCIP_Real lastupperbound
Definition: struct_stat.h:145
SCIP_Longint nsbdivinglps
Definition: struct_stat.h:200
int npresoladdconss
Definition: struct_stat.h:243
SCIP_Bool SCIPsetIsInfinity(SCIP_SET *set, SCIP_Real val)
Definition: set.c:6200
SCIP_Longint ninfeasleaves
Definition: struct_stat.h:77
SCIP_Real firstlpdualbound
Definition: struct_stat.h:121
int npresolroundsfast
Definition: struct_stat.h:234
SCIP_Longint nnodelpiterations
Definition: struct_stat.h:63
int marked_ncolidx
Definition: struct_stat.h:222
SCIP_Bool SCIPsetIsLE(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
Definition: set.c:6258
void SCIPstatEnableVarHistory(SCIP_STAT *stat)
Definition: stat.c:157
SCIP_Longint nlpsolsfound
Definition: struct_stat.h:92
void SCIPstatPrintDebugMessage(SCIP_STAT *stat, const char *sourcefile, int sourceline, const char *formatstr,...)
Definition: stat.c:833
int solindex
Definition: struct_stat.h:261
SCIP_Longint nsbdowndomchgs
Definition: struct_stat.h:110
SCIP_STATUS status
Definition: struct_stat.h:177
SCIP_Longint nlpiterations
Definition: struct_stat.h:53
void SCIPstatComputeRootLPBestEstimate(SCIP_STAT *stat, SCIP_SET *set, SCIP_Real rootlpobjval, SCIP_VAR **vars, int nvars)
Definition: stat.c:767
SCIP_Longint externmemestim
Definition: struct_stat.h:116
SCIP_Real primalrefintegral
Definition: struct_stat.h:136
SCIP_Longint nfeasleaves
Definition: struct_stat.h:76
SCIP_Real SCIPstatGetPrimalReferenceIntegral(SCIP_STAT *stat, SCIP_SET *set, SCIP_PROB *transprob, SCIP_PROB *origprob, SCIP_Bool update)
Definition: stat.c:564
SCIP_Longint nnumtroublelpmsgs
Definition: struct_stat.h:201
SCIP_Longint ndeactivatednodes
Definition: struct_stat.h:84
SCIP_Longint nlexdualresolvelps
Definition: struct_stat.h:194
int npricerounds
Definition: struct_stat.h:224
SCIP_Longint relaxcount
Definition: struct_stat.h:182
#define SCIPstatDebugMsg
Definition: stat.h:313
SCIP_Longint nlps
Definition: struct_stat.h:183
static SCIP_Real getGap(SCIP_SET *set, SCIP_Real primalbound, SCIP_Real dualbound, SCIP_Real upperbound, SCIP_Real lowerbound)
Definition: stat.c:411
SCIP_Longint nbarrierlpiterations
Definition: struct_stat.h:59
SCIP_Longint ninitconssadded
Definition: struct_stat.h:114
SCIP_CLOCK * conflictlptime
Definition: struct_stat.h:162
int nrunsbeforefirst
Definition: struct_stat.h:262
SCIP_Real rootlowerbound
Definition: struct_stat.h:122
internal methods for clocks and timing issues
void SCIPstatUpdateMemsaveMode(SCIP_STAT *stat, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, SCIP_MEM *mem)
Definition: stat.c:688
SCIP_Longint ntotalnodes
Definition: struct_stat.h:78
SCIP_Real previntegralevaltime
Definition: struct_stat.h:141
int npresolaggrvars
Definition: struct_stat.h:238
SCIP_Real lastbranchvalue
Definition: struct_stat.h:134
SCIP_Longint nrootfirstlpiterations
Definition: struct_stat.h:55
int nactiveexpriter
Definition: struct_stat.h:267
SCIP_Longint ndivinglps
Definition: struct_stat.h:198
SCIP_Longint nsbtimesiterlimhit
Definition: struct_stat.h:112
SCIP_BRANCHDIR lastbranchdir
Definition: struct_stat.h:178
int npresolfixedvars
Definition: struct_stat.h:237
void SCIPstatDisableVarHistory(SCIP_STAT *stat)
Definition: stat.c:147
SCIP_Real lastsolgap
Definition: struct_stat.h:127
SCIP_Longint nrootstrongbranchs
Definition: struct_stat.h:203
SCIP_Real SCIPsetInfinity(SCIP_SET *set)
Definition: set.c:6065
SCIP_Longint nactiveconssadded
Definition: struct_stat.h:115
SCIP_Real SCIPvarGetRootSol(SCIP_VAR *var)
Definition: var.c:13349
int nclockskipsleft
Definition: struct_stat.h:266
int npresoldelconss
Definition: struct_stat.h:242
SCIP_Longint nstrongbranchs
Definition: struct_stat.h:202
SCIP_Longint nholechgs
Definition: struct_stat.h:107
SCIP_RETCODE SCIPhistoryCreate(SCIP_HISTORY **history, BMS_BLKMEM *blkmem)
Definition: history.c:42
SCIP_Longint nrootsblpiterations
Definition: struct_stat.h:69
void SCIPvisualFree(SCIP_VISUAL **visual)
Definition: visual.c:97
#define FALSE
Definition: def.h:87
void SCIPstatEnableOrDisableStatClocks(SCIP_STAT *stat, SCIP_Bool enable)
Definition: stat.c:741
SCIP_Bool SCIPsetIsFeasIntegral(SCIP_SET *set, SCIP_Real val)
Definition: set.c:6741
SCIP_Longint nrootlps
Definition: struct_stat.h:184
SCIP_Longint ncreatednodes
Definition: struct_stat.h:81
void SCIPhistoryReset(SCIP_HISTORY *history)
Definition: history.c:69
SCIP_Real primaldualintegral
Definition: struct_stat.h:137
SCIP_Bool SCIPsetIsZero(SCIP_SET *set, SCIP_Real val)
Definition: set.c:6312
#define TRUE
Definition: def.h:86
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:54
int nenabledconss
Definition: struct_stat.h:231
SCIP_Longint nnlps
Definition: struct_stat.h:205
void SCIPstatResetImplications(SCIP_STAT *stat)
Definition: stat.c:344
SCIP_Real SCIPprobInternObjval(SCIP_PROB *transprob, SCIP_PROB *origprob, SCIP_SET *set, SCIP_Real objval)
Definition: prob.c:2129
SCIP_Longint nbacktracks
Definition: struct_stat.h:87
SCIP_Longint exprlastdifftag
Definition: struct_stat.h:119
public methods for problem variables
SCIP_Real previousdualrefgap
Definition: struct_stat.h:139
int maxtotaldepth
Definition: struct_stat.h:228
SCIP_CLOCK * barrierlptime
Definition: struct_stat.h:158
int ndisplines
Definition: struct_stat.h:226
SCIP_Longint lastdispnode
Definition: struct_stat.h:101
SCIP_Longint nnodesaboverefbound
Definition: struct_stat.h:86
int npresolroundsext
Definition: struct_stat.h:236
methods for creating output for visualization tools (VBC, BAK)
void SCIPclockEnableOrDisable(SCIP_CLOCK *clck, SCIP_Bool enable)
Definition: clock.c:251
SCIP_CLOCK * copyclock
Definition: struct_stat.h:169
SCIP_Real rootlpbestestimate
Definition: struct_stat.h:146
#define BMSfreeMemory(ptr)
Definition: memory.h:138
SCIP_Longint exprlastsoltag
Definition: struct_stat.h:118
int maxdepth
Definition: struct_stat.h:227
SCIP_CLOCK * nlpsoltime
Definition: struct_stat.h:168
SCIP_Real lastdualbound
Definition: struct_stat.h:143
SCIP_Longint nlpbestsolsfound
Definition: struct_stat.h:96
SCIP_Real dualzeroittime
Definition: struct_stat.h:129
Definition: heur_padm.c:123
SCIP_Longint nexternalsolsfound
Definition: struct_stat.h:100
void SCIPstatEnforceLPUpdates(SCIP_STAT *stat)
Definition: stat.c:678
internal methods for branching and inference history
int nrootintfixings
Definition: struct_stat.h:215
SCIP_Longint ntotalnodesmerged
Definition: struct_stat.h:80
SCIP_Longint nsblpiterations
Definition: struct_stat.h:68
SCIP_Real primalzeroittime
Definition: struct_stat.h:128
int nrootboundchgs
Definition: struct_stat.h:213
SCIP_Bool SCIPsetIsGE(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
Definition: set.c:6294
SCIP_HISTORY * glbhistorycrun
Definition: struct_stat.h:173
int ncutpoolfails
Definition: struct_stat.h:211
SCIP_Real avgnnz
Definition: struct_stat.h:120
int nconfrestarts
Definition: struct_stat.h:212
SCIP_Longint nlexduallpiterations
Definition: struct_stat.h:58
SCIP_Bool SCIPsetIsLT(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
Definition: set.c:6240
SCIP_CLOCK * strongpropclock
Definition: struct_stat.h:170
int npresolchgcoefs
Definition: struct_stat.h:245
int npresolchgvartypes
Definition: struct_stat.h:239
SCIP_RETCODE SCIPstatUpdateVarRootLPBestEstimate(SCIP_STAT *stat, SCIP_SET *set, SCIP_VAR *var, SCIP_Real oldrootpscostscore)
Definition: stat.c:798
SCIP_Real barrierzeroittime
Definition: struct_stat.h:130
SCIP_Longint nobjleaves
Definition: struct_stat.h:75
SCIP_Longint npssolsfound
Definition: struct_stat.h:94
SCIP_Real mincopytime
Definition: struct_stat.h:132
int npresolroundsmed
Definition: struct_stat.h:235
int prevrunnvars
Definition: struct_stat.h:217
internal methods for storing and manipulating the main problem
void SCIPmessagePrintVerbInfo(SCIP_MESSAGEHDLR *messagehdlr, SCIP_VERBLEVEL verblevel, SCIP_VERBLEVEL msgverblevel, const char *formatstr,...)
Definition: message.c:669
void SCIPstatResetCurrentRun(SCIP_STAT *stat, SCIP_SET *set, SCIP_PROB *transprob, SCIP_PROB *origprob, SCIP_Bool solved)
Definition: stat.c:606
SCIP_Longint lpcount
Definition: struct_stat.h:181
SCIP_RETCODE SCIPstatFree(SCIP_STAT **stat, BMS_BLKMEM *blkmem)
Definition: stat.c:105
int ndivesetcalls
Definition: struct_stat.h:209
methods for block memory pools and memory buffers
SCIP_Longint bestsolnode
Definition: struct_stat.h:104
void SCIPclockReset(SCIP_CLOCK *clck)
Definition: clock.c:200
SCIP_Longint nconflictlpiterations
Definition: struct_stat.h:70
int npresolchgsides
Definition: struct_stat.h:246
SCIP_CLOCK * pseudosoltime
Definition: struct_stat.h:165
void SCIPstatReset(SCIP_STAT *stat, SCIP_SET *set, SCIP_PROB *transprob, SCIP_PROB *origprob)
Definition: stat.c:179
SCIP_Longint nrelaxbestsolsfound
Definition: struct_stat.h:97
SCIP_Longint nsbupdomchgs
Definition: struct_stat.h:111
SCIP_HEUR * firstprimalheur
Definition: struct_stat.h:176
SCIP_Longint ninitlpiterations
Definition: struct_stat.h:64
SCIP_LPSOLSTAT lastsblpsolstats[2]
Definition: struct_stat.h:179
const char * SCIPvarGetName(SCIP_VAR *var)
Definition: var.c:17251
SCIP_Real SCIPclockGetTime(SCIP_CLOCK *clck)
Definition: clock.c:429
SCIP_Longint nsbdivinglpiterations
Definition: struct_stat.h:67
SCIP_REGRESSION * regressioncandsobjval
Definition: struct_stat.h:52
#define NULL
Definition: lpi_spx1.cpp:155
SCIP_Longint nprimalresolvelpiterations
Definition: struct_stat.h:60
int nseparounds
Definition: struct_stat.h:225
SCIP_HISTORY * glbhistory
Definition: struct_stat.h:172
SCIP_Bool userinterrupt
Definition: struct_stat.h:269
#define REALABS(x)
Definition: def.h:201
SCIP_Longint nconflictlps
Definition: struct_stat.h:204
int npresolchgbds
Definition: struct_stat.h:240
internal methods for global SCIP settings
#define SCIP_CALL(x)
Definition: def.h:384
int npresoladdholes
Definition: struct_stat.h:241
int marked_nvaridx
Definition: struct_stat.h:221
SCIP_Longint nsbbestsolsfound
Definition: struct_stat.h:99
SCIP_Longint nduallpiterations
Definition: struct_stat.h:57
SCIP_Longint nbarrierzeroitlps
Definition: struct_stat.h:191
SCIP_Real SCIPvarGetMinPseudocostScore(SCIP_VAR *var, SCIP_STAT *stat, SCIP_SET *set, SCIP_Real solval)
Definition: var.c:14660
SCIP_Bool SCIPsetIsEQ(SCIP_SET *set, SCIP_Real val1, SCIP_Real val2)
Definition: set.c:6222
SCIP_Real vsidsweight
Definition: struct_stat.h:123
SCIP_Real previousprimalrefgap
Definition: struct_stat.h:140
void SCIPstatResetDisplay(SCIP_STAT *stat)
Definition: stat.c:667
SCIP_Longint ncreatednodesrun
Definition: struct_stat.h:82
SCIP_Longint nprimalresolvelps
Definition: struct_stat.h:192
SCIP_Longint nresolveinstablelps
Definition: struct_stat.h:71
SCIP_CLOCK * divinglptime
Definition: struct_stat.h:160
SCIP_Longint nprobboundchgs
Definition: struct_stat.h:108
SCIP_RETCODE SCIPclockCreate(SCIP_CLOCK **clck, SCIP_CLOCKTYPE clocktype)
Definition: clock.c:161
SCIP_Longint nduallps
Definition: struct_stat.h:187
void SCIPregressionFree(SCIP_REGRESSION **regression)
Definition: misc.c:422
internal methods for problem variables
#define SCIP_UNKNOWN
Definition: def.h:198
SCIP_Bool userrestart
Definition: struct_stat.h:270
SCIP_Real bestefficacy
Definition: struct_stat.h:148
SCIP_Longint nisstoppedcalls
Definition: struct_stat.h:206
public data structures and miscellaneous methods
#define SCIP_Bool
Definition: def.h:84
SCIP_Real lastprimalbound
Definition: struct_stat.h:142
SCIP_Longint ndivesetlpiterations
Definition: struct_stat.h:66
SCIP_Longint ndualresolvelps
Definition: struct_stat.h:193
SCIP_CLOCK * sbsoltime
Definition: struct_stat.h:166
SCIP_Longint ndivesetlps
Definition: struct_stat.h:199
SCIP_Real minefficacyfac
Definition: struct_stat.h:149
SCIP_CLOCK * presolvingtime
Definition: struct_stat.h:153
SCIP_Bool memsavemode
Definition: struct_stat.h:268
int npresolrounds
Definition: struct_stat.h:233
SCIP_Longint nearlybacktracks
Definition: struct_stat.h:85
SCIP_Longint nlexdualresolvelpiterations
Definition: struct_stat.h:62
SCIP_Bool branchedunbdvar
Definition: struct_stat.h:274
SCIP_Real lastlowerbound
Definition: struct_stat.h:144
SCIP_RETCODE SCIPstatCreate(SCIP_STAT **stat, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_PROB *transprob, SCIP_PROB *origprob, SCIP_MESSAGEHDLR *messagehdlr)
Definition: stat.c:46
void SCIPclockFree(SCIP_CLOCK **clck)
Definition: clock.c:176
int marked_nrowidx
Definition: struct_stat.h:223
SCIP_Longint nrepropcutoffs
Definition: struct_stat.h:91
#define MAX(x, y)
Definition: tclique_def.h:83
SCIP_Longint lastdivenode
Definition: struct_stat.h:102
SCIP_Longint nresolveinstablelpiters
Definition: struct_stat.h:72
SCIP_Real maxcopytime
Definition: struct_stat.h:131
SCIP_CLOCK * resolveinstablelptime
Definition: struct_stat.h:159
datastructures for problem statistics
SCIP_CLOCK * relaxsoltime
Definition: struct_stat.h:164
SCIP_Real SCIPsetGetReferencevalue(SCIP_SET *set)
Definition: set.c:5946
SCIP_Longint nnz
Definition: struct_stat.h:180
SCIP_CLOCK * lexduallptime
Definition: struct_stat.h:157
SCIP_Longint nnodesbeforefirst
Definition: struct_stat.h:113
void SCIPstatResetPrimalDualIntegrals(SCIP_STAT *stat, SCIP_SET *set, SCIP_Bool partialreset)
Definition: stat.c:382
#define SCIP_REAL_MAX
Definition: def.h:178
SCIP_Longint nrootlpiterations
Definition: struct_stat.h:54
SCIP_CLOCK * strongbranchtime
Definition: struct_stat.h:161
#define SCIP_REAL_MIN
Definition: def.h:179
void SCIPstatUpdatePrimalDualIntegrals(SCIP_STAT *stat, SCIP_SET *set, SCIP_PROB *transprob, SCIP_PROB *origprob, SCIP_Real upperbound, SCIP_Real lowerbound)
Definition: stat.c:450
SCIP_Real firstsolgap
Definition: struct_stat.h:126
#define SCIP_DEFAULT_INFINITY
Definition: def.h:182
int nactiveconss
Definition: struct_stat.h:230
void SCIPstatResetPresolving(SCIP_STAT *stat, SCIP_SET *set, SCIP_PROB *transprob, SCIP_PROB *origprob)
Definition: stat.c:354
SCIP_Longint lastconflictnode
Definition: struct_stat.h:103
SCIP_Longint domchgcount
Definition: struct_stat.h:105
SCIP_Longint SCIPmemGetTotal(SCIP_MEM *mem)
Definition: mem.c:99
SCIP_CLOCK * solvingtime
Definition: struct_stat.h:151
SCIP_Longint nbarrierlps
Definition: struct_stat.h:190
SCIP_Longint nprimalzeroitlps
Definition: struct_stat.h:186
SCIP_CLOCK * primallptime
Definition: struct_stat.h:155
SCIP_Longint nnodezeroitlps
Definition: struct_stat.h:196
SCIP_Longint npsbestsolsfound
Definition: struct_stat.h:98
public methods for message output
int nrootboundchgsrun
Definition: struct_stat.h:214
SCIP_Longint nboundchgs
Definition: struct_stat.h:106
SCIP_VARSTATUS SCIPvarGetStatus(SCIP_VAR *var)
Definition: var.c:17370
#define SCIP_Real
Definition: def.h:177
internal methods for problem statistics
SCIP_Longint exprlastvisitedtag
Definition: struct_stat.h:117
SCIP_Real firstprimaltime
Definition: struct_stat.h:125
SCIP_Real referencebound
Definition: struct_stat.h:147
SCIP_Longint SCIPstatGetMemExternEstim(SCIP_STAT *stat)
Definition: stat.c:727
SCIP_Longint nrepropboundchgs
Definition: struct_stat.h:90
SCIP_Real firstprimalbound
Definition: struct_stat.h:124
SCIP_Longint ntotalinternalnodes
Definition: struct_stat.h:79
#define BMSallocMemory(ptr)
Definition: memory.h:111
#define SCIP_INVALID
Definition: def.h:197
SCIP_CLOCK * duallptime
Definition: struct_stat.h:156
#define SCIP_Longint
Definition: def.h:162
SCIP_Longint nactivatednodes
Definition: struct_stat.h:83
void SCIPregressionReset(SCIP_REGRESSION *regression)
Definition: misc.c:390
SCIP_VAR * lastbranchvar
Definition: struct_stat.h:174
SCIP_Longint nprimallpiterations
Definition: struct_stat.h:56
SCIP_Longint nreprops
Definition: struct_stat.h:89
SCIP_Longint nsbsolsfound
Definition: struct_stat.h:95
SCIP_Bool disableenforelaxmsg
Definition: struct_stat.h:275
SCIP_CLOCK * nodeactivationtime
Definition: struct_stat.h:167
SCIP_Longint ndualzeroitlps
Definition: struct_stat.h:188
SCIP_Real firstlptime
Definition: struct_stat.h:133
SCIP_Bool collectvarhistory
Definition: struct_stat.h:272
SCIP_Longint ninternalnodes
Definition: struct_stat.h:74
SCIP_Bool performpresol
Definition: struct_stat.h:273
SCIP_Real SCIPprobExternObjval(SCIP_PROB *transprob, SCIP_PROB *origprob, SCIP_SET *set, SCIP_Real objval)
Definition: prob.c:2107
SCIP_Real SCIPstatGetPrimalDualIntegral(SCIP_STAT *stat, SCIP_SET *set, SCIP_PROB *transprob, SCIP_PROB *origprob, SCIP_Bool update)
Definition: stat.c:585
int plungedepth
Definition: struct_stat.h:229
SCIP_RETCODE SCIPregressionCreate(SCIP_REGRESSION **regression)
Definition: misc.c:406
SCIP_Bool inrestart
Definition: struct_stat.h:271
SCIP_Real SCIPstatGetDualReferenceIntegral(SCIP_STAT *stat, SCIP_SET *set, SCIP_PROB *transprob, SCIP_PROB *origprob, SCIP_Bool update)
Definition: stat.c:543
SCIP_Real previousgap
Definition: struct_stat.h:138
SCIP_Longint nnodelps
Definition: struct_stat.h:195
SCIP_Longint nnodes
Definition: struct_stat.h:73
int nrootintfixingsrun
Definition: struct_stat.h:216
struct BMS_BlkMem BMS_BLKMEM
Definition: memory.h:430
SCIP_Longint nrelaxsolsfound
Definition: struct_stat.h:93
#define SCIP_ALLOC(x)
Definition: def.h:395
SCIP_Longint nprobholechgs
Definition: struct_stat.h:109
SCIP_Bool SCIPvarIsIntegral(SCIP_VAR *var)
Definition: var.c:17442
void SCIPhistoryFree(SCIP_HISTORY **history, BMS_BLKMEM *blkmem)
Definition: history.c:57
int npresolupgdconss
Definition: struct_stat.h:244
void SCIPstatMark(SCIP_STAT *stat)
Definition: stat.c:167
datastructures for global SCIP settings
SCIP_Real dualrefintegral
Definition: struct_stat.h:135
int subscipdepth
Definition: struct_stat.h:208
void SCIPstatDebugMessagePrint(SCIP_STAT *stat, const char *formatstr,...)
Definition: stat.c:869
SCIP_Longint ninitlps
Definition: struct_stat.h:197
SCIP_Longint ndelayedcutoffs
Definition: struct_stat.h:88
SCIP_CLOCK * lpsoltime
Definition: struct_stat.h:163
int nimplications
Definition: struct_stat.h:232
SCIP_Longint totaldivesetdepth
Definition: struct_stat.h:207
SCIP_Longint ndivinglpiterations
Definition: struct_stat.h:65