Scippy

SCIP

Solving Constraint Integer Programs

stat.c File Reference

Detailed Description

methods for problem statistics

Author
Tobias Achterberg
Stefan Heinz
Gregor Hendel
Gerald Gamrath
Marc Pfetsch
Stefan Vigerske

Definition in file stat.c.

#include <assert.h>
#include "scip/def.h"
#include "blockmemshell/memory.h"
#include "scip/set.h"
#include "scip/prob.h"
#include "scip/stat.h"
#include "scip/clock.h"
#include "scip/vbc.h"
#include "scip/mem.h"
#include "scip/history.h"

Go to the source code of this file.

Functions

SCIP_RETCODE SCIPstatCreate (SCIP_STAT **stat, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr)
 
SCIP_RETCODE SCIPstatFree (SCIP_STAT **stat, BMS_BLKMEM *blkmem)
 
void SCIPstatDisableVarHistory (SCIP_STAT *stat)
 
void SCIPstatEnableVarHistory (SCIP_STAT *stat)
 
void SCIPstatMark (SCIP_STAT *stat)
 
void SCIPstatReset (SCIP_STAT *stat, SCIP_SET *set)
 
void SCIPstatResetImplications (SCIP_STAT *stat)
 
void SCIPstatResetPresolving (SCIP_STAT *stat)
 
void SCIPstatResetPrimalDualIntegral (SCIP_STAT *stat, SCIP_SET *set, SCIP_Bool partialreset)
 
void SCIPstatUpdatePrimalDualIntegral (SCIP_STAT *stat, SCIP_SET *set, SCIP_PROB *transprob, SCIP_PROB *origprob, SCIP_Real upperbound, SCIP_Real lowerbound)
 
void SCIPstatResetCurrentRun (SCIP_STAT *stat)
 
void SCIPstatResetDisplay (SCIP_STAT *stat)
 
void SCIPstatEnforceLPUpdates (SCIP_STAT *stat)
 
void SCIPstatUpdateMemsaveMode (SCIP_STAT *stat, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, SCIP_MEM *mem)
 

Function Documentation

SCIP_RETCODE SCIPstatCreate ( SCIP_STAT **  stat,
BMS_BLKMEM blkmem,
SCIP_SET set,
SCIP_MESSAGEHDLR messagehdlr 
)

creates problem statistics data

Parameters
statpointer to problem statistics data
blkmemblock memory
setglobal SCIP settings
messagehdlrmessage handler

Definition at line 43 of file stat.c.

References BMSallocMemory, FALSE, NULL, SCIP_ALLOC, SCIP_CALL, SCIP_CLOCKTYPE_DEFAULT, SCIP_OKAY, SCIP_STATUS_UNKNOWN, SCIPclockCreate(), SCIPhistoryCreate(), SCIPstatReset(), SCIPvbcCreate(), and TRUE.

Referenced by copyProb(), and SCIPcreateProb().

SCIP_RETCODE SCIPstatFree ( SCIP_STAT **  stat,
BMS_BLKMEM blkmem 
)

frees problem statistics data

Parameters
statpointer to problem statistics data
blkmemblock memory

Definition at line 92 of file stat.c.

References BMSfreeMemory, NULL, SCIP_OKAY, SCIPclockFree(), SCIPhistoryFree(), and SCIPvbcFree().

Referenced by SCIPfreeProb().

void SCIPstatDisableVarHistory ( SCIP_STAT stat)

diables the collection of any statistic for a variable

Parameters
statproblem statistics data

Definition at line 127 of file stat.c.

References SCIP_Stat::collectvarhistory, FALSE, and NULL.

Referenced by SCIPdisableVarHistory(), and SCIPstartProbing().

void SCIPstatEnableVarHistory ( SCIP_STAT stat)

enables the collection of statistics for a variable

Parameters
statproblem statistics data

Definition at line 137 of file stat.c.

References SCIP_Stat::collectvarhistory, NULL, and TRUE.

Referenced by SCIPenableVarHistory(), and SCIPendProbing().

void SCIPstatMark ( SCIP_STAT stat)

marks statistics to be able to reset them when solving process is freed

Parameters
statproblem statistics data

Definition at line 147 of file stat.c.

References SCIP_Stat::marked_ncolidx, SCIP_Stat::marked_nrowidx, SCIP_Stat::marked_nvaridx, SCIP_Stat::ncolidx, SCIP_Stat::nrowidx, NULL, and SCIP_Stat::nvaridx.

Referenced by SCIPtransformProb().

void SCIPstatReset ( SCIP_STAT stat,
SCIP_SET set 
)

reset statistics to the data before solving started

Parameters
statproblem statistics data
setglobal SCIP settings

Definition at line 159 of file stat.c.

References SCIP_Stat::barrierlptime, SCIP_Stat::barrierzeroittime, SCIP_Stat::conflictlptime, SCIP_Stat::copyclock, SCIP_Stat::divinglptime, SCIP_Stat::domchgcount, SCIP_Stat::duallptime, SCIP_Stat::dualzeroittime, FALSE, SCIP_Stat::firstlpdualbound, SCIP_Stat::firstlptime, SCIP_Stat::firstprimalbound, SCIP_Stat::firstprimalheur, SCIP_Stat::firstprimaltime, SCIP_Stat::firstsolgap, SCIP_Stat::glbhistory, SCIP_Stat::lastsolgap, SCIP_Stat::lexduallptime, SCIP_Stat::lpcount, SCIP_Stat::lpsoltime, SCIP_Stat::marked_ncolidx, SCIP_Stat::marked_nrowidx, SCIP_Stat::marked_nvaridx, SCIP_Stat::maxcopytime, SCIP_Stat::maxtotaldepth, SCIP_Stat::memsavemode, SCIP_Stat::mincopytime, SCIP_Stat::nactiveconss, SCIP_Stat::nbarrierlpiterations, SCIP_Stat::nbarrierlps, SCIP_Stat::nbarrierzeroitlps, SCIP_Stat::nboundchgs, SCIP_Stat::ncolidx, SCIP_Stat::nconflictlpiterations, SCIP_Stat::nconflictlps, SCIP_Stat::nconfrestarts, SCIP_Stat::ncopies, SCIP_Stat::ncreatednodes, SCIP_Stat::ndivinglpiterations, SCIP_Stat::ndivinglps, SCIP_Stat::nduallpiterations, SCIP_Stat::nduallps, SCIP_Stat::ndualresolvelpiterations, SCIP_Stat::ndualresolvelps, SCIP_Stat::ndualzeroitlps, SCIP_Stat::nenabledconss, SCIP_Stat::nexternalsolsfound, SCIP_Stat::nholechgs, SCIP_Stat::ninitconssadded, SCIP_Stat::ninitlpiterations, SCIP_Stat::ninitlps, SCIP_Stat::nlexduallpiterations, SCIP_Stat::nlexduallps, SCIP_Stat::nlexdualresolvelpiterations, SCIP_Stat::nlexdualresolvelps, SCIP_Stat::nlpiterations, SCIP_Stat::nlps, SCIP_Stat::nlpsolsfound, SCIP_Stat::nlpsoltime, SCIP_Stat::nnlps, SCIP_Stat::nnodelpiterations, SCIP_Stat::nnodelps, SCIP_Stat::nnodesbeforefirst, SCIP_Stat::nodeactivationtime, SCIP_Stat::nprimallpiterations, SCIP_Stat::nprimallps, SCIP_Stat::nprimalresolvelpiterations, SCIP_Stat::nprimalresolvelps, SCIP_Stat::nprimalzeroitlps, SCIP_Stat::nprobboundchgs, SCIP_Stat::nprobholechgs, SCIP_Stat::npssolsfound, SCIP_Stat::nrootboundchgs, SCIP_Stat::nrootfirstlpiterations, SCIP_Stat::nrootintfixings, SCIP_Stat::nrootlpiterations, SCIP_Stat::nrootlps, SCIP_Stat::nrootsblpiterations, SCIP_Stat::nrootstrongbranchs, SCIP_Stat::nrowidx, SCIP_Stat::nruns, SCIP_Stat::nrunsbeforefirst, SCIP_Stat::nsbdivinglpiterations, SCIP_Stat::nsbdivinglps, SCIP_Stat::nsbdowndomchgs, SCIP_Stat::nsblpiterations, SCIP_Stat::nsbsolsfound, SCIP_Stat::nsbupdomchgs, SCIP_Stat::nstrongbranchs, SCIP_Stat::ntotalinternalnodes, SCIP_Stat::ntotalnodes, NULL, SCIP_Stat::nvaridx, SCIP_Stat::presolvingtime, SCIP_Stat::prevrunnvars, SCIP_Stat::primallptime, SCIP_Stat::primalzeroittime, SCIP_Stat::pseudosoltime, SCIP_Stat::sbsoltime, SCIP_DEFAULT_INFINITY, SCIP_REAL_MAX, SCIP_REAL_MIN, SCIP_UNKNOWN, SCIPclockReset(), SCIPhistoryReset(), SCIPstatResetImplications(), SCIPstatResetPresolving(), SCIPstatResetPrimalDualIntegral(), SCIP_Stat::solindex, SCIP_Stat::solvingtime, SCIP_Stat::strongbranchtime, SCIP_Stat::strongpropclock, and SCIP_Stat::vsidsweight.

Referenced by freeTransform(), and SCIPstatCreate().

void SCIPstatResetImplications ( SCIP_STAT stat)

reset implication counter

Parameters
statproblem statistics data

Definition at line 280 of file stat.c.

References SCIP_Stat::nimplications, and NULL.

Referenced by SCIPstatReset().

void SCIPstatResetPrimalDualIntegral ( SCIP_STAT stat,
SCIP_SET set,
SCIP_Bool  partialreset 
)

reset primal-dual integral

Parameters
statproblem statistics data
setglobal SCIP settings
partialresetshould time and integral value be kept? (in combination with no statistical reset, integrals are added for each problem to be solved)

Definition at line 312 of file stat.c.

References SCIP_Stat::lastdualbound, SCIP_Stat::lastlowerbound, SCIP_Stat::lastprimalbound, SCIP_Stat::lastupperbound, NULL, SCIP_Stat::previntegralevaltime, SCIP_Stat::previousgap, SCIP_Stat::primaldualintegral, SCIP_UNKNOWN, and SCIPsetInfinity().

Referenced by freeTransform(), and SCIPstatReset().

void SCIPstatUpdatePrimalDualIntegral ( SCIP_STAT stat,
SCIP_SET set,
SCIP_PROB transprob,
SCIP_PROB origprob,
SCIP_Real  upperbound,
SCIP_Real  lowerbound 
)

update the primal-dual integral statistic. method accepts + and - SCIPsetInfinity() as values for upper and lower bound, respectively

Parameters
statproblem statistics data
setglobal SCIP settings
transprobtransformed problem
origproboriginal problem
upperboundcurrent upper bound in transformed problem, or infinity
lowerboundcurrent lower bound in transformed space, or -infinity

Definition at line 338 of file stat.c.

References SCIP_Stat::lastdualbound, SCIP_Stat::lastlowerbound, SCIP_Stat::lastprimalbound, SCIP_Stat::lastupperbound, MAX, NULL, SCIP_Stat::previntegralevaltime, SCIP_Stat::previousgap, SCIP_Stat::primaldualintegral, REALABS, SCIP_Real, SCIP_STAGE_EXITPRESOLVE, SCIP_UNKNOWN, SCIPclockGetTime(), SCIPprobExternObjval(), SCIPsetIsEQ(), SCIPsetIsFeasGE(), SCIPsetIsGE(), SCIPsetIsInfinity(), SCIPsetIsLE(), SCIPsetIsZero(), and SCIP_Stat::solvingtime.

Referenced by exitPresolve(), SCIPnodeUpdateLowerbound(), SCIPsolveCIP(), and SCIPstoreSolutionGap().

void SCIPstatResetDisplay ( SCIP_STAT stat)

resets display statistics, such that a new header line is displayed before the next display line

Parameters
statproblem statistics data

Definition at line 468 of file stat.c.

References SCIP_Stat::lastdispnode, SCIP_Stat::ndisplines, and NULL.

Referenced by SCIPsolve(), and SCIPstatResetCurrentRun().

void SCIPstatEnforceLPUpdates ( SCIP_STAT stat)

increases LP count, such that all lazy updates depending on the LP are enforced again

Parameters
statproblem statistics data

Definition at line 479 of file stat.c.

References SCIP_Stat::lpcount, and NULL.

Referenced by initSolve().

void SCIPstatUpdateMemsaveMode ( SCIP_STAT stat,
SCIP_SET set,
SCIP_MESSAGEHDLR messagehdlr,
SCIP_MEM mem 
)

depending on the current memory usage, switches mode flag to standard or memory saving mode

Parameters
statproblem statistics data
setglobal SCIP settings
messagehdlrmessage handler
memblock memory pools

Definition at line 489 of file stat.c.

References FALSE, SCIP_Stat::memsavemode, SCIP_Stat::nnodes, NULL, SCIP_Longint, SCIP_Real, SCIP_VERBLEVEL_HIGH, SCIPmemGetUsed(), SCIPmessagePrintVerbInfo(), SCIPsetIsLT(), and TRUE.

Referenced by SCIPsolveCIP().