1 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 2 /* */ 3 /* This file is part of the program and library */ 4 /* SCIP --- Solving Constraint Integer Programs */ 5 /* */ 6 /* Copyright (C) 2002-2021 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 struct_stat.h 17 * @ingroup INTERNALAPI 18 * @brief datastructures for problem statistics 19 * @author Tobias Achterberg 20 * @author Timo Berthold 21 * @author Stefan Heinz 22 * @author Gregor Hendel 23 * @author Gerald Gamrath 24 * @author Marc Pfetsch 25 * @author Stefan Vigerske 26 */ 27 28 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/ 29 30 #ifndef __SCIP_STRUCT_STAT_H__ 31 #define __SCIP_STRUCT_STAT_H__ 32 33 34 #include "scip/def.h" 35 #include "scip/type_stat.h" 36 #include "scip/type_clock.h" 37 #include "scip/type_visual.h" 38 #include "scip/type_history.h" 39 #include "scip/type_var.h" 40 #include "scip/type_lp.h" 41 #include "scip/type_heur.h" 42 #include "scip/type_relax.h" 43 #include "scip/type_misc.h" 44 45 #ifdef __cplusplus 46 extern "C" { 47 #endif 48 49 /** problem and runtime specific statistics */ 50 struct SCIP_Stat 51 { 52 SCIP_REGRESSION* regressioncandsobjval;/**< linear regression of pairs (nbranchcands, lpobjval) for every node */ 53 SCIP_Longint nlpiterations; /**< total number of LP iterations */ 54 SCIP_Longint nrootlpiterations; /**< total number of LP iterations in root node */ 55 SCIP_Longint nrootfirstlpiterations;/**< number of LP iterations for first LP solved at the root node */ 56 SCIP_Longint nprimallpiterations;/**< number of iterations in primal simplex */ 57 SCIP_Longint nduallpiterations; /**< number of iterations in dual simplex */ 58 SCIP_Longint nlexduallpiterations;/**< number of iterations in lexicographic dual simplex */ 59 SCIP_Longint nbarrierlpiterations;/**< number of iterations in barrier algorithm */ 60 SCIP_Longint nprimalresolvelpiterations; /**< number of primal LP iterations with advanced start basis */ 61 SCIP_Longint ndualresolvelpiterations; /**< number of dual LP iterations with advanced start basis */ 62 SCIP_Longint nlexdualresolvelpiterations; /**< number of lexicographic dual LP iterations with advanced start basis */ 63 SCIP_Longint nnodelpiterations; /**< number of iterations for totally solving node relaxations */ 64 SCIP_Longint ninitlpiterations; /**< number of iterations for solving nodes' initial relaxations */ 65 SCIP_Longint ndivinglpiterations;/**< number of iterations in diving and probing */ 66 SCIP_Longint ndivesetlpiterations; /**< total number of LP iterations performed by divesets */ 67 SCIP_Longint nsbdivinglpiterations;/**< number of iterations in probing mode for strong branching */ 68 SCIP_Longint nsblpiterations; /**< number of simplex iterations used in strong branching */ 69 SCIP_Longint nrootsblpiterations;/**< number of simplex iterations used in strong branching at the root node */ 70 SCIP_Longint nconflictlpiterations;/**< number of simplex iterations used in conflict analysis */ 71 SCIP_Longint nresolveinstablelps; /**< number of simplex resolves of instable LPs */ 72 SCIP_Longint nresolveinstablelpiters; /**< number of simplex iterations used for resolving instable LPs */ 73 SCIP_Longint nnodes; /**< number of nodes processed in current run (including focus node) */ 74 SCIP_Longint ninternalnodes; /**< number of nodes processed in current run where a branching was performed */ 75 SCIP_Longint nobjleaves; /**< number of leaf nodes processed that reached the cutoff bound */ 76 SCIP_Longint nfeasleaves; /**< number of leaf nodes processed with feasible relaxation solution */ 77 SCIP_Longint ninfeasleaves; /**< number of infeasible leaf nodes processed */ 78 SCIP_Longint ntotalnodes; /**< total number of nodes processed in all runs (including focus node) */ 79 SCIP_Longint ntotalinternalnodes;/**< total number of nodes processed in all runs where a branching was performed */ 80 SCIP_Longint ntotalnodesmerged; /**< total number of nodes added ot the statistics of the main SCIP so far (see SCIPmergeStatistics) */ 81 SCIP_Longint ncreatednodes; /**< total number of nodes created */ 82 SCIP_Longint ncreatednodesrun; /**< number of nodes created in current run */ 83 SCIP_Longint nactivatednodes; /**< number of times, a node got activated in current run */ 84 SCIP_Longint ndeactivatednodes; /**< number of times, a node got deactivated in current run */ 85 SCIP_Longint nearlybacktracks; /**< counter for early switches (if children dual bound is below reference value) */ 86 SCIP_Longint nnodesaboverefbound;/**< counter for the number of focus nodes exceeding the reference bound */ 87 SCIP_Longint nbacktracks; /**< number of times, the new node was chosen from the leaves queue */ 88 SCIP_Longint ndelayedcutoffs; /**< number of times, the selected node was from a cut off subtree */ 89 SCIP_Longint nreprops; /**< number of times, a solved node is repropagated again */ 90 SCIP_Longint nrepropboundchgs; /**< number of bound changes generated in repropagating nodes */ 91 SCIP_Longint nrepropcutoffs; /**< number of times, a repropagated node was cut off */ 92 SCIP_Longint nlpsolsfound; /**< number of CIP-feasible LP solutions found so far */ 93 SCIP_Longint nrelaxsolsfound; /**< number of CIP-feasible relaxation solutions found so far */ 94 SCIP_Longint npssolsfound; /**< number of CIP-feasible pseudo solutions found so far */ 95 SCIP_Longint nsbsolsfound; /**< number of CIP-feasible solutions found during strong branching so far */ 96 SCIP_Longint nlpbestsolsfound; /**< number of new best CIP-feasible LP solutions found so far */ 97 SCIP_Longint nrelaxbestsolsfound;/**< number of new best CIP-feasible relaxation solutions found so far */ 98 SCIP_Longint npsbestsolsfound; /**< number of new best CIP-feasible pseudo solutions found so far */ 99 SCIP_Longint nsbbestsolsfound; /**< number of new best CIP-feasible solutions found during strong branching so far */ 100 SCIP_Longint nexternalsolsfound; /**< number of externally given CIP-feasible solutions (or new solutions found when transforming old ones) */ 101 SCIP_Longint lastdispnode; /**< last node for which an information line was displayed */ 102 SCIP_Longint lastdivenode; /**< last node where LP diving was applied */ 103 SCIP_Longint lastconflictnode; /**< last node where conflict analysis was applied */ 104 SCIP_Longint bestsolnode; /**< node number where the last incumbent solution was found */ 105 SCIP_Longint domchgcount; /**< internal counter, where all domain changes are counted */ 106 SCIP_Longint nboundchgs; /**< total number of bound changes generated in the tree */ 107 SCIP_Longint nholechgs; /**< total number of hole changes generated in the tree */ 108 SCIP_Longint nprobboundchgs; /**< total number of bound changes generated in the tree during probing */ 109 SCIP_Longint nprobholechgs; /**< total number of hole changes generated in the tree during probing */ 110 SCIP_Longint nsbdowndomchgs; /**< total number of domain changes generated at down children during strong branching */ 111 SCIP_Longint nsbupdomchgs; /**< total number of domain changes generated at up children during strong branching */ 112 SCIP_Longint nsbtimesiterlimhit; /**< total number of times that the strong branching iteration limit was hit */ 113 SCIP_Longint nnodesbeforefirst; /**< number of nodes before first primal solution */ 114 SCIP_Longint ninitconssadded; /**< total number of initial constraints added during the solve */ 115 SCIP_Longint nactiveconssadded; /**< total number of active constraints added */ 116 SCIP_Longint externmemestim; /**< estimation of external memory usage, e.g., by LP solver */ 117 SCIP_Real avgnnz; /**< average number of nonzeros per constraint in presolved problem */ 118 SCIP_Real firstlpdualbound; /**< dual bound of root node computed by first LP solve (without cuts) */ 119 SCIP_Real rootlowerbound; /**< lower bound of root node */ 120 SCIP_Real vsidsweight; /**< current weight to use for updating VSIDS in history */ 121 SCIP_Real firstprimalbound; /**< objective value of first primal solution */ 122 SCIP_Real firstprimaltime; /**< time (in seconds) needed for first primal solution */ 123 SCIP_Real firstsolgap; /**< solution gap when first solution is found */ 124 SCIP_Real lastsolgap; /**< solution gap when last solution is found */ 125 SCIP_Real primalzeroittime; /**< time used in primal simplex calls without iterations */ 126 SCIP_Real dualzeroittime; /**< time used in dual simplex calls without iterations */ 127 SCIP_Real barrierzeroittime; /**< time used in barrier calls without iterations */ 128 SCIP_Real maxcopytime; /**< maxmimal time needed for copying a problem */ 129 SCIP_Real mincopytime; /**< minimal time needed for copying a problem */ 130 SCIP_Real firstlptime; /**< time needed to solve the very first LP in the root node */ 131 SCIP_Real lastbranchvalue; /**< domain value of the last branching */ 132 SCIP_Real dualrefintegral; /**< current reference-dual integral value */ 133 SCIP_Real primalrefintegral; /**< current primal-reference integral value */ 134 SCIP_Real primaldualintegral; /**< current primal-dual integral value */ 135 SCIP_Real previousgap; /**< primal dual gap preceding the current gap */ 136 SCIP_Real previousdualrefgap; /**< reference-dual gap preceding the current gap */ 137 SCIP_Real previousprimalrefgap; /**< primal-reference gap preceding the current gap */ 138 SCIP_Real previntegralevaltime;/**< last time of primal-dual integral evaluation */ 139 SCIP_Real lastprimalbound; /**< last (non-infinite) primal bound (in transformed space) for integral evaluation */ 140 SCIP_Real lastdualbound; /**< last (non-infinite) dual bound (in transformed space) for integral evaluation */ 141 SCIP_Real lastlowerbound; /**< last lower bound (in transformed space) for integral evaluation */ 142 SCIP_Real lastupperbound; /**< last upper bound (in transformed space) for integral evaluation */ 143 SCIP_Real rootlpbestestimate; /**< best-estimate for final root LP solution that changes with every pseudo-cost update */ 144 SCIP_Real referencebound; /**< objective bound for reference purposes */ 145 SCIP_Real bestefficacy; /**< best efficacy of global pool cut seen so far */ 146 SCIP_Real minefficacyfac; /**< factor of best efficacy to use as min efficacy */ 147 SCIP_Real detertimecnt; /**< internal counter for deterministic time */ 148 SCIP_CLOCK* solvingtime; /**< total time used for solving (including presolving) the current problem */ 149 SCIP_CLOCK* solvingtimeoverall; /**< total time used for solving (including presolving) during reoptimization */ 150 SCIP_CLOCK* presolvingtime; /**< total time used for presolving the current problem */ 151 SCIP_CLOCK* presolvingtimeoverall;/**< total time used for presolving during reoptimization */ 152 SCIP_CLOCK* primallptime; /**< primal LP solution time */ 153 SCIP_CLOCK* duallptime; /**< dual LP solution time */ 154 SCIP_CLOCK* lexduallptime; /**< lexicographic dual LP solution time */ 155 SCIP_CLOCK* barrierlptime; /**< barrier LP solution time */ 156 SCIP_CLOCK* resolveinstablelptime;/**< LP solution time for taking care of instable LPs */ 157 SCIP_CLOCK* divinglptime; /**< diving and probing LP solution time */ 158 SCIP_CLOCK* strongbranchtime; /**< strong branching time */ 159 SCIP_CLOCK* conflictlptime; /**< conflict analysis LP solution time */ 160 SCIP_CLOCK* lpsoltime; /**< time needed for storing feasible LP solutions */ 161 SCIP_CLOCK* relaxsoltime; /**< time needed for storing feasible relaxation solutions */ 162 SCIP_CLOCK* pseudosoltime; /**< time needed for storing feasible pseudo solutions */ 163 SCIP_CLOCK* sbsoltime; /**< time needed for searching and storing feasible strong branching solutions */ 164 SCIP_CLOCK* nodeactivationtime; /**< time needed for path switching and activating nodes */ 165 SCIP_CLOCK* nlpsoltime; /**< time needed for solving NLPs */ 166 SCIP_CLOCK* copyclock; /**< time needed for copying problems */ 167 SCIP_CLOCK* strongpropclock; /**< time needed for propagation during strong branching */ 168 SCIP_CLOCK* reoptupdatetime; /**< time needed for storing and recreating nodes and solutions for reoptimization */ 169 SCIP_HISTORY* glbhistory; /**< global history information over all variables */ 170 SCIP_HISTORY* glbhistorycrun; /**< global history information over all variables for current run */ 171 SCIP_VAR* lastbranchvar; /**< last variable, that was branched on */ 172 SCIP_VISUAL* visual; /**< visualization information */ 173 SCIP_HEUR* firstprimalheur; /**< heuristic which found the first primal solution */ 174 SCIP_STATUS status; /**< SCIP solving status */ 175 SCIP_BRANCHDIR lastbranchdir; /**< direction of the last branching */ 176 SCIP_LPSOLSTAT lastsblpsolstats[2];/**< last LP solving statuses for variable strong branching */ 177 SCIP_Longint nnz; /**< number of nonzeros in presolved problem */ 178 SCIP_Longint lpcount; /**< internal counter, where all lp calls are counted; this includes the restored lps after diving and probing */ 179 SCIP_Longint relaxcount; /**< internal counter, where all relax calls are counted */ 180 SCIP_Longint nlps; /**< total number of LPs solved with at least 1 iteration */ 181 SCIP_Longint nrootlps; /**< number of LPs solved at the root node with at least 1 iteration */ 182 SCIP_Longint nprimallps; /**< number of primal LPs solved with at least 1 iteration */ 183 SCIP_Longint nprimalzeroitlps; /**< number of primal LPs with 0 iterations */ 184 SCIP_Longint nduallps; /**< number of dual LPs solved with at least 1 iteration */ 185 SCIP_Longint ndualzeroitlps; /**< number of dual LPs with 0 iterations */ 186 SCIP_Longint nlexduallps; /**< number of lexicographic dual LPs solved */ 187 SCIP_Longint nbarrierlps; /**< number of barrier LPs solved with at least 1 iteration */ 188 SCIP_Longint nbarrierzeroitlps; /**< number of barrier LPs with 1 iteration */ 189 SCIP_Longint nprimalresolvelps; /**< number of primal LPs solved with advanced start basis and at least 1 iteration */ 190 SCIP_Longint ndualresolvelps; /**< number of dual LPs solved with advanced start basis and at least 1 iteration */ 191 SCIP_Longint nlexdualresolvelps; /**< number of lexicographic dual LPs solved with advanced start basis and at least 1 iteration */ 192 SCIP_Longint nnodelps; /**< number of LPs solved for node relaxations */ 193 SCIP_Longint nnodezeroitlps; /**< number of LPs solved with 0 iterations for node relaxations */ 194 SCIP_Longint ninitlps; /**< number of LPs solved for nodes' initial relaxations */ 195 SCIP_Longint ndivinglps; /**< number of LPs solved during diving and probing */ 196 SCIP_Longint ndivesetlps; /**< total number of diveset LPs */ 197 SCIP_Longint nsbdivinglps; /**< number of LPs solved during strong branching probing mode */ 198 SCIP_Longint nnumtroublelpmsgs; /**< number of messages about numerical trouble in LP on verblevel HIGH or lower */ 199 SCIP_Longint nstrongbranchs; /**< number of strong branching calls */ 200 SCIP_Longint nrootstrongbranchs; /**< number of strong branching calls at the root node */ 201 SCIP_Longint nconflictlps; /**< number of LPs solved during conflict analysis */ 202 SCIP_Longint nnlps; /**< number of NLPs solved */ 203 SCIP_Longint nisstoppedcalls; /**< number of calls to SCIPsolveIsStopped() */ 204 SCIP_Longint totaldivesetdepth; /**< the total probing depth over all diveset calls */ 205 int subscipdepth; /**< depth of current scip instance (increased by each copy call) */ 206 int ndivesetcalls; /**< total number of diveset diving calls */ 207 int nruns; /**< number of branch and bound runs on current problem, including current run */ 208 int ncutpoolfails; /**< number of fails in a cutpool to separate efficacious cuts */ 209 int nconfrestarts; /**< number of restarts performed due to conflict analysis */ 210 int nrootboundchgs; /**< total number of bound changes generated in the root node */ 211 int nrootboundchgsrun; /**< total number of bound changes generated in the root node of current run */ 212 int nrootintfixings; /**< total number of global fixings of integer variables */ 213 int nrootintfixingsrun; /**< total number of global fixings of integer variables of current run */ 214 int prevrunnvars; /**< number of variables in the previous run */ 215 int nvaridx; /**< number of used variable indices */ 216 int ncolidx; /**< number of used column indices */ 217 int nrowidx; /**< number of used row indices */ 218 int marked_nvaridx; /**< number of used variable indices before solving started */ 219 int marked_ncolidx; /**< number of used column indices before solving started */ 220 int marked_nrowidx; /**< number of used row indices before solving started */ 221 int npricerounds; /**< number of pricing rounds performed in current node */ 222 int nseparounds; /**< number of separation rounds performed in current node */ 223 int ndisplines; /**< number of displayed information lines */ 224 int maxdepth; /**< maximal depth of all processed nodes in current run */ 225 int maxtotaldepth; /**< maximal depth of all processed nodes over all runs */ 226 int plungedepth; /**< current plunging depth (successive times, a child was selected as next node) */ 227 int nactiveconss; /**< total number of currently active constraints */ 228 int nenabledconss; /**< total number of currently enabled constraints */ 229 int nimplications; /**< total number of implications stored in the implication graph */ 230 int npresolrounds; /**< number of presolving rounds in current run */ 231 int npresolroundsfast; /**< number of fast presolving rounds in current run */ 232 int npresolroundsmed; /**< number of medium presolving rounds in current run */ 233 int npresolroundsext; /**< number of exhaustive presolving rounds in current run */ 234 int npresolfixedvars; /**< number of presolving fixings in current run */ 235 int npresolaggrvars; /**< number of presolving aggregations in current run */ 236 int npresolchgvartypes; /**< number of presolving variable type changes in current run */ 237 int npresolchgbds; /**< number of presolving bound changes in current run */ 238 int npresoladdholes; /**< number of presolving hole additions in current run */ 239 int npresoldelconss; /**< number of presolving constraint deletions in current run */ 240 int npresoladdconss; /**< number of presolving constraint additions in current run */ 241 int npresolupgdconss; /**< number of presolving constraint upgrades in current run */ 242 int npresolchgcoefs; /**< number of presolving coefficient changes in current run */ 243 int npresolchgsides; /**< number of presolving side changes in current run */ 244 int lastnpresolfixedvars;/**< number of presolving fixings before presolving round */ 245 int lastnpresolaggrvars;/**< number of presolving aggregations before presolving round */ 246 int lastnpresolchgvartypes;/**< number of presolving variable type changes before presolving round */ 247 int lastnpresolchgbds; /**< number of presolving bound changes before presolving round */ 248 int lastnpresoladdholes;/**< number of presolving hole additions before presolving round */ 249 int lastnpresoldelconss;/**< number of presolving constraint deletions before presolving round */ 250 int lastnpresoladdconss;/**< number of presolving constraint additions before presolving round */ 251 int lastnpresolupgdconss;/**< number of presolving constraint upgrades before presolving round */ 252 int lastnpresolchgcoefs;/**< number of presolving coefficient changes before presolving round */ 253 int lastnpresolchgsides;/**< number of presolving side changes before presolving round */ 254 #ifdef SCIP_DISABLED_CODE 255 int lastnpresolimplications;/**< number of implications before presolving round */ 256 int lastnpresolcliques; /**< number of cliques before presolving round */ 257 #endif 258 int solindex; /**< consecutively numbered solution index */ 259 int nrunsbeforefirst; /**< number of runs until first primal solution */ 260 int firstprimaldepth; /**< depth in which first primal solution was found */ 261 int ncopies; /**< counter how often SCIPcopy() was performed */ 262 int nreoptruns; /**< number of reoptimization runs */ 263 int nclockskipsleft; /**< how many times the timing should be skipped in SCIPsolveIsStopped() */ 264 SCIP_Bool memsavemode; /**< should algorithms be switched to memory saving mode? */ 265 SCIP_Bool userinterrupt; /**< has the user asked to interrupt the solving process? */ 266 SCIP_Bool userrestart; /**< has the user asked to restart the solving process? */ 267 SCIP_Bool inrestart; /**< are we currently restarting the system? */ 268 SCIP_Bool collectvarhistory; /**< should variable history statistics be collected */ 269 SCIP_Bool performpresol; /**< indicates whether presolving is enabled */ 270 SCIP_Bool branchedunbdvar; /**< indicates whether branching on an unbounded variable has been performed */ 271 SCIP_Bool disableenforelaxmsg;/**< was disable enforelax message printed? */ 272 }; 273 274 #ifdef __cplusplus 275 } 276 #endif 277 278 #endif 279