SCIP Doxygen Documentation
Loading...
Searching...
No Matches
scip_solvingstats.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-2026 Zuse Institute Berlin (ZIB) */
7/* */
8/* Licensed under the Apache License, Version 2.0 (the "License"); */
9/* you may not use this file except in compliance with the License. */
10/* You may obtain a copy of the License at */
11/* */
12/* http://www.apache.org/licenses/LICENSE-2.0 */
13/* */
14/* Unless required by applicable law or agreed to in writing, software */
15/* distributed under the License is distributed on an "AS IS" BASIS, */
16/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */
17/* See the License for the specific language governing permissions and */
18/* limitations under the License. */
19/* */
20/* You should have received a copy of the Apache-2.0 license */
21/* along with SCIP; see the file LICENSE. If not visit scipopt.org. */
22/* */
23/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
24
25/**@file scip_solvingstats.c
26 * @ingroup OTHER_CFILES
27 * @brief public methods for querying solving statistics
28 * @author Tobias Achterberg
29 * @author Timo Berthold
30 * @author Gerald Gamrath
31 * @author Leona Gottwald
32 * @author Stefan Heinz
33 * @author Gregor Hendel
34 * @author Thorsten Koch
35 * @author Alexander Martin
36 * @author Marc Pfetsch
37 * @author Michael Winkler
38 * @author Kati Wolter
39 * @author Mohammed Ghannam
40 *
41 * @todo check all SCIP_STAGE_* switches, and include the new stages TRANSFORMED and INITSOLVE
42 */
43
44/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
45
47#include "scip/branch.h"
48#include "scip/clock.h"
49#include "scip/concsolver.h"
50#include "scip/concurrent.h"
51#include "scip/conflict.h"
52#include "scip/conflictstore.h"
53#include "scip/debug.h"
54#include "scip/disp.h"
55#include "scip/history.h"
56#include "scip/implics.h"
57#include "scip/pricestore.h"
58#include "scip/primal.h"
59#include "scip/prob.h"
60#include "scip/pub_benderscut.h"
61#include "scip/pub_benders.h"
62#include "scip/pub_branch.h"
63#include "scip/pub_compr.h"
64#include "scip/pub_cons.h"
65#include "scip/pub_cutpool.h"
66#include "scip/pub_cutsel.h"
67#include "scip/pub_expr.h"
68#include "scip/pub_heur.h"
69#include "scip/pub_history.h"
70#include "scip/pub_message.h"
71#include "scip/pub_misc.h"
72#include "scip/pub_misc_sort.h"
73#include "scip/pub_nlpi.h"
74#include "scip/pub_presol.h"
75#include "scip/pub_pricer.h"
76#include "scip/pub_prop.h"
77#include "scip/pub_reader.h"
78#include "scip/pub_relax.h"
79#include "scip/pub_reopt.h"
80#include "scip/pub_sepa.h"
81#include "scip/pub_sol.h"
82#include "scip/pub_table.h"
83#include "scip/pub_var.h"
84#include "scip/reader.h"
85#include "scip/reopt.h"
86#include "scip/scip_benders.h"
87#include "scip/scip_datatree.h"
88#include "scip/scip_exact.h"
89#include "scip/scip_general.h"
90#include "scip/scip_mem.h"
91#include "scip/scip_message.h"
92#include "scip/scip_nlp.h"
93#include "scip/scip_numerics.h"
94#include "scip/scip_sol.h"
96#include "scip/scip_table.h"
97#include "scip/scip_timing.h"
98#include "scip/scip_var.h"
99#include "scip/sepastore.h"
100#include "scip/set.h"
101#include "scip/sol.h"
102#include "scip/stat.h"
103#include "scip/struct_mem.h"
104#include "scip/struct_primal.h"
105#include "scip/struct_prob.h"
106#include "scip/struct_scip.h"
107#include "scip/struct_set.h"
108#include "scip/struct_stat.h"
109#include "scip/syncstore.h"
110#include "scip/table.h"
111#include "scip/tree.h"
112#include "scip/var.h"
113#include <string.h>
114
115/** gets number of branch and bound runs performed, including the current run
116 *
117 * @return the number of branch and bound runs performed, including the current run
118 *
119 * @pre This method can be called if SCIP is in one of the following stages:
120 * - \ref SCIP_STAGE_PROBLEM
121 * - \ref SCIP_STAGE_TRANSFORMING
122 * - \ref SCIP_STAGE_TRANSFORMED
123 * - \ref SCIP_STAGE_INITPRESOLVE
124 * - \ref SCIP_STAGE_PRESOLVING
125 * - \ref SCIP_STAGE_EXITPRESOLVE
126 * - \ref SCIP_STAGE_PRESOLVED
127 * - \ref SCIP_STAGE_INITSOLVE
128 * - \ref SCIP_STAGE_SOLVING
129 * - \ref SCIP_STAGE_SOLVED
130 * - \ref SCIP_STAGE_EXITSOLVE
131 * - \ref SCIP_STAGE_FREETRANS
132 */
134 SCIP* scip /**< SCIP data structure */
135 )
136{
138
139 return scip->stat->nruns;
140}
141
142/** gets number of reoptimization runs performed, including the current run
143 *
144 * @return the number of reoptimization runs performed, including the current run
145 *
146 * @pre This method can be called if SCIP is in one of the following stages:
147 * - \ref SCIP_STAGE_PROBLEM
148 * - \ref SCIP_STAGE_TRANSFORMING
149 * - \ref SCIP_STAGE_TRANSFORMED
150 * - \ref SCIP_STAGE_INITPRESOLVE
151 * - \ref SCIP_STAGE_PRESOLVING
152 * - \ref SCIP_STAGE_EXITPRESOLVE
153 * - \ref SCIP_STAGE_PRESOLVED
154 * - \ref SCIP_STAGE_INITSOLVE
155 * - \ref SCIP_STAGE_SOLVING
156 * - \ref SCIP_STAGE_SOLVED
157 * - \ref SCIP_STAGE_EXITSOLVE
158 * - \ref SCIP_STAGE_FREETRANS
159 */
161 SCIP* scip /**< SCIP data structure */
162 )
163{
164 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetNReoptRuns", FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE) );
165
166 return scip->stat->nreoptruns;
167}
168
169/** add given number to the number of processed nodes in current run and in all runs, including the focus node
170 *
171 * @pre This method can be called if SCIP is in one of the following stages:
172 * - \ref SCIP_STAGE_PROBLEM
173 * - \ref SCIP_STAGE_TRANSFORMING
174 * - \ref SCIP_STAGE_TRANSFORMED
175 * - \ref SCIP_STAGE_INITPRESOLVE
176 * - \ref SCIP_STAGE_PRESOLVING
177 * - \ref SCIP_STAGE_EXITPRESOLVE
178 * - \ref SCIP_STAGE_PRESOLVED
179 * - \ref SCIP_STAGE_INITSOLVE
180 * - \ref SCIP_STAGE_SOLVING
181 * - \ref SCIP_STAGE_SOLVED
182 * - \ref SCIP_STAGE_EXITSOLVE
183 * - \ref SCIP_STAGE_FREETRANS
184 */
186 SCIP* scip, /**< SCIP data structure */
187 SCIP_Longint nnodes /**< number of processed nodes to add to the statistics */
188 )
189{
191
192 scip->stat->nnodes += nnodes;
193 scip->stat->ntotalnodes += nnodes;
194}
195
196/** gets number of processed nodes in current run, including the focus node
197 *
198 * @return the number of processed nodes in current run, including the focus node
199 *
200 * @pre This method can be called if SCIP is in one of the following stages:
201 * - \ref SCIP_STAGE_PROBLEM
202 * - \ref SCIP_STAGE_TRANSFORMING
203 * - \ref SCIP_STAGE_TRANSFORMED
204 * - \ref SCIP_STAGE_INITPRESOLVE
205 * - \ref SCIP_STAGE_PRESOLVING
206 * - \ref SCIP_STAGE_EXITPRESOLVE
207 * - \ref SCIP_STAGE_PRESOLVED
208 * - \ref SCIP_STAGE_INITSOLVE
209 * - \ref SCIP_STAGE_SOLVING
210 * - \ref SCIP_STAGE_SOLVED
211 * - \ref SCIP_STAGE_EXITSOLVE
212 * - \ref SCIP_STAGE_FREETRANS
213 */
215 SCIP* scip /**< SCIP data structure */
216 )
217{
219
220 return scip->stat->nnodes;
221}
222
223/** gets total number of processed nodes in all runs, including the focus node
224 *
225 * @return the total number of processed nodes in all runs, including the focus node
226 *
227 * @pre This method can be called if SCIP is in one of the following stages:
228 * - \ref SCIP_STAGE_PROBLEM
229 * - \ref SCIP_STAGE_TRANSFORMING
230 * - \ref SCIP_STAGE_TRANSFORMED
231 * - \ref SCIP_STAGE_INITPRESOLVE
232 * - \ref SCIP_STAGE_PRESOLVING
233 * - \ref SCIP_STAGE_EXITPRESOLVE
234 * - \ref SCIP_STAGE_PRESOLVED
235 * - \ref SCIP_STAGE_INITSOLVE
236 * - \ref SCIP_STAGE_SOLVING
237 * - \ref SCIP_STAGE_SOLVED
238 * - \ref SCIP_STAGE_EXITSOLVE
239 * - \ref SCIP_STAGE_FREETRANS
240 */
242 SCIP* scip /**< SCIP data structure */
243 )
244{
245 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetNTotalNodes", FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE) );
246
247 return scip->stat->ntotalnodes;
248}
249
250/** gets number of leaf nodes processed with feasible relaxation solution
251 *
252 * @return number of leaf nodes processed with feasible relaxation solution
253 *
254 * @pre This method can be called if SCIP is in one of the following stages:
255 * - \ref SCIP_STAGE_PROBLEM
256 * - \ref SCIP_STAGE_TRANSFORMING
257 * - \ref SCIP_STAGE_TRANSFORMED
258 * - \ref SCIP_STAGE_INITPRESOLVE
259 * - \ref SCIP_STAGE_PRESOLVING
260 * - \ref SCIP_STAGE_EXITPRESOLVE
261 * - \ref SCIP_STAGE_PRESOLVED
262 * - \ref SCIP_STAGE_INITSOLVE
263 * - \ref SCIP_STAGE_SOLVING
264 * - \ref SCIP_STAGE_SOLVED
265 * - \ref SCIP_STAGE_EXITSOLVE
266 * - \ref SCIP_STAGE_FREETRANS
267 */
269 SCIP* scip /**< SCIP data structure */
270 )
271{
272 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetNFeasibleLeaves", FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE) );
273
274 return scip->stat->nfeasleaves;
275}
276
277/** gets number of infeasible leaf nodes processed
278 *
279 * @return number of infeasible leaf nodes processed
280 *
281 * @pre This method can be called if SCIP is in one of the following stages:
282 * - \ref SCIP_STAGE_PROBLEM
283 * - \ref SCIP_STAGE_TRANSFORMING
284 * - \ref SCIP_STAGE_TRANSFORMED
285 * - \ref SCIP_STAGE_INITPRESOLVE
286 * - \ref SCIP_STAGE_PRESOLVING
287 * - \ref SCIP_STAGE_EXITPRESOLVE
288 * - \ref SCIP_STAGE_PRESOLVED
289 * - \ref SCIP_STAGE_INITSOLVE
290 * - \ref SCIP_STAGE_SOLVING
291 * - \ref SCIP_STAGE_SOLVED
292 * - \ref SCIP_STAGE_EXITSOLVE
293 * - \ref SCIP_STAGE_FREETRANS
294 */
296 SCIP* scip /**< SCIP data structure */
297 )
298{
299 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetNInfeasibleLeaves", FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE) );
300
301 return scip->stat->ninfeasleaves;
302}
303
304/** gets number of processed leaf nodes that hit LP objective limit
305 *
306 * @return number of processed leaf nodes that hit LP objective limit
307 *
308 * @pre This method can be called if SCIP is in one of the following stages:
309 * - \ref SCIP_STAGE_PROBLEM
310 * - \ref SCIP_STAGE_TRANSFORMING
311 * - \ref SCIP_STAGE_TRANSFORMED
312 * - \ref SCIP_STAGE_INITPRESOLVE
313 * - \ref SCIP_STAGE_PRESOLVING
314 * - \ref SCIP_STAGE_EXITPRESOLVE
315 * - \ref SCIP_STAGE_PRESOLVED
316 * - \ref SCIP_STAGE_INITSOLVE
317 * - \ref SCIP_STAGE_SOLVING
318 * - \ref SCIP_STAGE_SOLVED
319 * - \ref SCIP_STAGE_EXITSOLVE
320 * - \ref SCIP_STAGE_FREETRANS
321 */
323 SCIP* scip /**< Scip data structure */
324 )
325{
326 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetNObjlimLeaves", FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE) );
327
328 return scip->stat->nobjleaves;
329}
330
331/** gets number of global bound changes
332 *
333 * @return number of global bound changes
334 *
335 * @pre This method can be called if SCIP is in one of the following stages:
336 * - \ref SCIP_STAGE_PROBLEM
337 * - \ref SCIP_STAGE_TRANSFORMING
338 * - \ref SCIP_STAGE_TRANSFORMED
339 * - \ref SCIP_STAGE_INITPRESOLVE
340 * - \ref SCIP_STAGE_PRESOLVING
341 * - \ref SCIP_STAGE_EXITPRESOLVE
342 * - \ref SCIP_STAGE_PRESOLVED
343 * - \ref SCIP_STAGE_INITSOLVE
344 * - \ref SCIP_STAGE_SOLVING
345 * - \ref SCIP_STAGE_SOLVED
346 * - \ref SCIP_STAGE_EXITSOLVE
347 * - \ref SCIP_STAGE_FREETRANS
348 */
350 SCIP* scip /**< Scip data structure */
351 )
352{
353 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetNRootboundChgs", FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE) );
354
355 return scip->stat->nrootboundchgs;
356}
357
358/** gets number of global bound changes applied in the current run
359 *
360 * @return number of global bound changes
361 *
362 * @pre This method can be called if SCIP is in one of the following stages:
363 * - \ref SCIP_STAGE_PROBLEM
364 * - \ref SCIP_STAGE_TRANSFORMING
365 * - \ref SCIP_STAGE_TRANSFORMED
366 * - \ref SCIP_STAGE_INITPRESOLVE
367 * - \ref SCIP_STAGE_PRESOLVING
368 * - \ref SCIP_STAGE_EXITPRESOLVE
369 * - \ref SCIP_STAGE_PRESOLVED
370 * - \ref SCIP_STAGE_INITSOLVE
371 * - \ref SCIP_STAGE_SOLVING
372 * - \ref SCIP_STAGE_SOLVED
373 * - \ref SCIP_STAGE_EXITSOLVE
374 * - \ref SCIP_STAGE_FREETRANS
375 */
377 SCIP* scip /**< Scip data structure */
378 )
379{
380 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetNRootboundChgsRun", FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE) );
381
382 return scip->stat->nrootboundchgsrun;
383}
384
385/** gets number of global fixings applied in the current run
386 *
387 * @return number of global fixings
388 *
389 * @pre This method can be called if SCIP is in one of the following stages:
390 * - \ref SCIP_STAGE_PROBLEM
391 * - \ref SCIP_STAGE_TRANSFORMING
392 * - \ref SCIP_STAGE_TRANSFORMED
393 * - \ref SCIP_STAGE_INITPRESOLVE
394 * - \ref SCIP_STAGE_PRESOLVING
395 * - \ref SCIP_STAGE_EXITPRESOLVE
396 * - \ref SCIP_STAGE_PRESOLVED
397 * - \ref SCIP_STAGE_INITSOLVE
398 * - \ref SCIP_STAGE_SOLVING
399 * - \ref SCIP_STAGE_SOLVED
400 * - \ref SCIP_STAGE_EXITSOLVE
401 * - \ref SCIP_STAGE_FREETRANS
402 */
404 SCIP* scip /**< Scip data structure */
405 )
406{
407 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetNRootIntFixingsRun", FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE) );
408
409 return scip->stat->nrootintfixingsrun;
410}
411
412/** gets number of times a selected node was from a cut off subtree
413 *
414 * @return number of times a selected node was from a cut off subtree
415 *
416 * @pre This method can be called if SCIP is in one of the following stages:
417 * - \ref SCIP_STAGE_PROBLEM
418 * - \ref SCIP_STAGE_TRANSFORMING
419 * - \ref SCIP_STAGE_TRANSFORMED
420 * - \ref SCIP_STAGE_INITPRESOLVE
421 * - \ref SCIP_STAGE_PRESOLVING
422 * - \ref SCIP_STAGE_EXITPRESOLVE
423 * - \ref SCIP_STAGE_PRESOLVED
424 * - \ref SCIP_STAGE_INITSOLVE
425 * - \ref SCIP_STAGE_SOLVING
426 * - \ref SCIP_STAGE_SOLVED
427 * - \ref SCIP_STAGE_EXITSOLVE
428 * - \ref SCIP_STAGE_FREETRANS
429 */
431 SCIP* scip /**< SCIP data structure */
432 )
433{
434 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetNDelayedCutoffs", FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE) );
435
436 return scip->stat->ndelayedcutoffs;
437}
438
439/** gets total number of LPs solved so far
440 *
441 * @return the total number of LPs solved so far
442 *
443 * @pre This method can be called if SCIP is in one of the following stages:
444 * - \ref SCIP_STAGE_PROBLEM
445 * - \ref SCIP_STAGE_TRANSFORMING
446 * - \ref SCIP_STAGE_TRANSFORMED
447 * - \ref SCIP_STAGE_INITPRESOLVE
448 * - \ref SCIP_STAGE_PRESOLVING
449 * - \ref SCIP_STAGE_EXITPRESOLVE
450 * - \ref SCIP_STAGE_PRESOLVED
451 * - \ref SCIP_STAGE_INITSOLVE
452 * - \ref SCIP_STAGE_SOLVING
453 * - \ref SCIP_STAGE_SOLVED
454 * - \ref SCIP_STAGE_EXITSOLVE
455 * - \ref SCIP_STAGE_FREETRANS
456 */
458 SCIP* scip /**< SCIP data structure */
459 )
460{
462
463 return scip->stat->nlps;
464}
465
466/** gets number of calls to the exact LP solver
467 *
468 * @return the number of calls to the exact LP solver
469 *
470 * @pre This method can be called if SCIP is in one of the following stages:
471 * - \ref SCIP_STAGE_PROBLEM
472 * - \ref SCIP_STAGE_TRANSFORMING
473 * - \ref SCIP_STAGE_TRANSFORMED
474 * - \ref SCIP_STAGE_INITPRESOLVE
475 * - \ref SCIP_STAGE_PRESOLVING
476 * - \ref SCIP_STAGE_EXITPRESOLVE
477 * - \ref SCIP_STAGE_PRESOLVED
478 * - \ref SCIP_STAGE_INITSOLVE
479 * - \ref SCIP_STAGE_SOLVING
480 * - \ref SCIP_STAGE_SOLVED
481 * - \ref SCIP_STAGE_EXITSOLVE
482 * - \ref SCIP_STAGE_FREETRANS
483 */
485 SCIP* scip /**< SCIP data structure */
486 )
487{
489
490 return scip->stat->nexlpinf + scip->stat->nexlp;
491}
492
493/** gets total number of iterations used so far in primal and dual simplex and barrier algorithm
494 *
495 * @return the total number of iterations used so far in primal and dual simplex and barrier algorithm
496 *
497 * @pre This method can be called if SCIP is in one of the following stages:
498 * - \ref SCIP_STAGE_PRESOLVING
499 * - \ref SCIP_STAGE_PRESOLVED
500 * - \ref SCIP_STAGE_SOLVING
501 * - \ref SCIP_STAGE_SOLVED
502 */
504 SCIP* scip /**< SCIP data structure */
505 )
506{
508
509 return scip->stat->nlpiterations;
510}
511
512/** gets number of active non-zeros in the current transformed problem
513 *
514 * @return the number of active non-zeros in the current transformed problem
515 *
516 * @pre This method can be called if SCIP is in one of the following stages:
517 * - \ref SCIP_STAGE_PROBLEM
518 * - \ref SCIP_STAGE_TRANSFORMING
519 * - \ref SCIP_STAGE_TRANSFORMED
520 * - \ref SCIP_STAGE_INITPRESOLVE
521 * - \ref SCIP_STAGE_PRESOLVING
522 * - \ref SCIP_STAGE_EXITPRESOLVE
523 * - \ref SCIP_STAGE_PRESOLVED
524 * - \ref SCIP_STAGE_INITSOLVE
525 * - \ref SCIP_STAGE_SOLVING
526 * - \ref SCIP_STAGE_SOLVED
527 * - \ref SCIP_STAGE_EXITSOLVE
528 */
530 SCIP* scip /**< SCIP data structure */
531 )
532{
534
535 return scip->stat->nnz;
536}
537
538/** gets total number of iterations used so far in primal and dual simplex and barrier algorithm for the root node
539 *
540 * @return the total number of iterations used so far in primal and dual simplex and barrier algorithm for the root node
541 *
542 * @pre This method can be called if SCIP is in one of the following stages:
543 * - \ref SCIP_STAGE_PRESOLVED
544 * - \ref SCIP_STAGE_SOLVING
545 * - \ref SCIP_STAGE_SOLVED
546 */
548 SCIP* scip /**< SCIP data structure */
549 )
550{
551 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetNRootLPIterations", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
552
553 return scip->stat->nrootlpiterations;
554}
555
556/** gets total number of iterations used in primal and dual simplex and barrier algorithm for the first LP at the root
557 * node
558 *
559 * @return the total number of iterations used in primal and dual simplex and barrier algorithm for the first root LP
560 *
561 * @pre This method can be called if SCIP is in one of the following stages:
562 * - \ref SCIP_STAGE_PRESOLVED
563 * - \ref SCIP_STAGE_SOLVING
564 * - \ref SCIP_STAGE_SOLVED
565 */
567 SCIP* scip /**< SCIP data structure */
568 )
569{
570 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetNRootFirstLPIterations", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
571
572 return scip->stat->nrootfirstlpiterations;
573}
574
575/** gets total number of primal LPs solved so far
576 *
577 * @return the total number of primal LPs solved so far
578 *
579 * @pre This method can be called if SCIP is in one of the following stages:
580 * - \ref SCIP_STAGE_PRESOLVED
581 * - \ref SCIP_STAGE_SOLVING
582 * - \ref SCIP_STAGE_SOLVED
583 */
585 SCIP* scip /**< SCIP data structure */
586 )
587{
589
590 return scip->stat->nprimallps;
591}
592
593/** gets total number of iterations used so far in primal simplex
594 *
595 * @return total number of iterations used so far in primal simplex
596 *
597 * @pre This method can be called if SCIP is in one of the following stages:
598 * - \ref SCIP_STAGE_PRESOLVED
599 * - \ref SCIP_STAGE_SOLVING
600 * - \ref SCIP_STAGE_SOLVED
601 */
603 SCIP* scip /**< SCIP data structure */
604 )
605{
606 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetNPrimalLPIterations", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
607
608 return scip->stat->nprimallpiterations;
609}
610
611/** gets total number of dual LPs solved so far
612 *
613 * @return the total number of dual LPs solved so far
614 *
615 * @pre This method can be called if SCIP is in one of the following stages:
616 * - \ref SCIP_STAGE_PRESOLVED
617 * - \ref SCIP_STAGE_SOLVING
618 * - \ref SCIP_STAGE_SOLVED
619 */
621 SCIP* scip /**< SCIP data structure */
622 )
623{
625
626 return scip->stat->nduallps;
627}
628
629/** gets total number of iterations used so far in dual simplex
630 *
631 * @return the total number of iterations used so far in dual simplex
632 *
633 * @pre This method can be called if SCIP is in one of the following stages:
634 * - \ref SCIP_STAGE_PRESOLVED
635 * - \ref SCIP_STAGE_SOLVING
636 * - \ref SCIP_STAGE_SOLVED
637 */
639 SCIP* scip /**< SCIP data structure */
640 )
641{
642 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetNDualLPIterations", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
643
644 return scip->stat->nduallpiterations;
645}
646
647/** gets total number of barrier LPs solved so far
648 *
649 * @return the total number of barrier LPs solved so far
650 *
651 * @pre This method can be called if SCIP is in one of the following stages:
652 * - \ref SCIP_STAGE_PRESOLVED
653 * - \ref SCIP_STAGE_SOLVING
654 * - \ref SCIP_STAGE_SOLVED
655 */
657 SCIP* scip /**< SCIP data structure */
658 )
659{
661
662 return scip->stat->nbarrierlps;
663}
664
665/** gets total number of iterations used so far in barrier algorithm
666 *
667 * @return the total number of iterations used so far in barrier algorithm
668 *
669 * @pre This method can be called if SCIP is in one of the following stages:
670 * - \ref SCIP_STAGE_PRESOLVED
671 * - \ref SCIP_STAGE_SOLVING
672 * - \ref SCIP_STAGE_SOLVED
673 */
675 SCIP* scip /**< SCIP data structure */
676 )
677{
678 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetNBarrierLPIterations", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
679
680 return scip->stat->nbarrierlpiterations;
681}
682
683/** gets total number of LPs solved so far that were resolved from an advanced start basis
684 *
685 * @return the total number of LPs solved so far that were resolved from an advanced start basis
686 *
687 * @pre This method can be called if SCIP is in one of the following stages:
688 * - \ref SCIP_STAGE_PRESOLVED
689 * - \ref SCIP_STAGE_SOLVING
690 * - \ref SCIP_STAGE_SOLVED
691 */
693 SCIP* scip /**< SCIP data structure */
694 )
695{
697
698 return scip->stat->nprimalresolvelps + scip->stat->ndualresolvelps;
699}
700
701/** gets total number of simplex iterations used so far in primal and dual simplex calls where an advanced start basis
702 * was available
703 *
704 * @return the total number of simplex iterations used so far in primal and dual simplex calls where an advanced start
705 * basis was available
706 *
707 * @pre This method can be called if SCIP is in one of the following stages:
708 * - \ref SCIP_STAGE_PRESOLVED
709 * - \ref SCIP_STAGE_SOLVING
710 * - \ref SCIP_STAGE_SOLVED
711 */
713 SCIP* scip /**< SCIP data structure */
714 )
715{
716 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetNResolveLPIterations", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
717
718 return scip->stat->nprimalresolvelpiterations + scip->stat->ndualresolvelpiterations;
719}
720
721/** gets total number of primal LPs solved so far that were resolved from an advanced start basis
722 *
723 * @return the total number of primal LPs solved so far that were resolved from an advanced start basis
724 *
725 * @pre This method can be called if SCIP is in one of the following stages:
726 * - \ref SCIP_STAGE_PRESOLVED
727 * - \ref SCIP_STAGE_SOLVING
728 * - \ref SCIP_STAGE_SOLVED
729 */
731 SCIP* scip /**< SCIP data structure */
732 )
733{
734 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetNPrimalResolveLPs", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
735
736 return scip->stat->nprimalresolvelps;
737}
738
739/** gets total number of simplex iterations used so far in primal simplex calls where an advanced start basis
740 * was available
741 *
742 * @return the total number of simplex iterations used so far in primal simplex calls where an advanced start
743 * basis was available
744 *
745 * @pre This method can be called if SCIP is in one of the following stages:
746 * - \ref SCIP_STAGE_PRESOLVED
747 * - \ref SCIP_STAGE_SOLVING
748 * - \ref SCIP_STAGE_SOLVED
749 */
751 SCIP* scip /**< SCIP data structure */
752 )
753{
754 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetNPrimalResolveLPIterations", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
755
756 return scip->stat->nprimalresolvelpiterations;
757}
758
759/** gets total number of dual LPs solved so far that were resolved from an advanced start basis
760 *
761 * @return the total number of dual LPs solved so far that were resolved from an advanced start basis
762 *
763 * @pre This method can be called if SCIP is in one of the following stages:
764 * - \ref SCIP_STAGE_PRESOLVED
765 * - \ref SCIP_STAGE_SOLVING
766 * - \ref SCIP_STAGE_SOLVED
767 */
769 SCIP* scip /**< SCIP data structure */
770 )
771{
773
774 return scip->stat->ndualresolvelps;
775}
776
777/** gets total number of simplex iterations used so far in dual simplex calls where an advanced start basis
778 * was available
779 *
780 * @return the total number of simplex iterations used so far in dual simplex calls where an advanced start
781 * basis was available
782 *
783 * @pre This method can be called if SCIP is in one of the following stages:
784 * - \ref SCIP_STAGE_PRESOLVED
785 * - \ref SCIP_STAGE_SOLVING
786 * - \ref SCIP_STAGE_SOLVED
787 */
789 SCIP* scip /**< SCIP data structure */
790 )
791{
792 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetNDualResolveLPIterations", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
793
794 return scip->stat->ndualresolvelpiterations;
795}
796
797/** gets total number of LPs solved so far for node relaxations
798 *
799 * @return the total number of LPs solved so far for node relaxations
800 *
801 * @pre This method can be called if SCIP is in one of the following stages:
802 * - \ref SCIP_STAGE_PRESOLVED
803 * - \ref SCIP_STAGE_SOLVING
804 * - \ref SCIP_STAGE_SOLVED
805 */
807 SCIP* scip /**< SCIP data structure */
808 )
809{
811
812 return scip->stat->nnodelps;
813}
814
815/** gets total number of LPs solved in 0 iterations for node relaxations
816 *
817 * @return the total number of LPs solved with 0 iteratins for node relaxations
818 *
819 * @pre This method can be called if SCIP is in one of the following stages:
820 * - \ref SCIP_STAGE_PRESOLVED
821 * - \ref SCIP_STAGE_SOLVING
822 * - \ref SCIP_STAGE_SOLVED
823 */
825 SCIP* scip /**< SCIP data structure */
826 )
827{
828 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetNNodeZeroIterationLPs", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
829
830 return scip->stat->nnodezeroitlps;
831}
832
833/** gets total number of simplex iterations used so far for node relaxations
834 *
835 * @return the total number of simplex iterations used so far for node relaxations
836 *
837 * @pre This method can be called if SCIP is in one of the following stages:
838 * - \ref SCIP_STAGE_PRESOLVED
839 * - \ref SCIP_STAGE_SOLVING
840 * - \ref SCIP_STAGE_SOLVED
841 */
843 SCIP* scip /**< SCIP data structure */
844 )
845{
846 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetNNodeLPIterations", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
847
848 return scip->stat->nnodelpiterations;
849}
850
851/** gets total number of LPs solved so far for initial LP in node relaxations
852 *
853 * @return the total number of LPs solved so far for initial LP in node relaxations
854 *
855 * @pre This method can be called if SCIP is in one of the following stages:
856 * - \ref SCIP_STAGE_PRESOLVED
857 * - \ref SCIP_STAGE_SOLVING
858 * - \ref SCIP_STAGE_SOLVED
859 */
861 SCIP* scip /**< SCIP data structure */
862 )
863{
865
866 return scip->stat->ninitlps;
867}
868
869/** gets total number of simplex iterations used so far for initial LP in node relaxations
870 *
871 * @return the total number of simplex iterations used so far for initial LP in node relaxations
872 *
873 * @pre This method can be called if SCIP is in one of the following stages:
874 * - \ref SCIP_STAGE_PRESOLVED
875 * - \ref SCIP_STAGE_SOLVING
876 * - \ref SCIP_STAGE_SOLVED
877 */
879 SCIP* scip /**< SCIP data structure */
880 )
881{
882 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetNNodeInitLPIterations", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
883
884 return scip->stat->ninitlpiterations;
885}
886
887/** gets total number of LPs solved so far during diving and probing
888 *
889 * @return total number of LPs solved so far during diving and probing
890 *
891 * @pre This method can be called if SCIP is in one of the following stages:
892 * - \ref SCIP_STAGE_PRESOLVED
893 * - \ref SCIP_STAGE_SOLVING
894 * - \ref SCIP_STAGE_SOLVED
895 */
897 SCIP* scip /**< SCIP data structure */
898 )
899{
901
902 return scip->stat->ndivinglps;
903}
904
905/** gets total number of simplex iterations used so far during diving and probing
906 *
907 * @return the total number of simplex iterations used so far during diving and probing
908 *
909 * @pre This method can be called if SCIP is in one of the following stages:
910 * - \ref SCIP_STAGE_PRESOLVED
911 * - \ref SCIP_STAGE_SOLVING
912 * - \ref SCIP_STAGE_SOLVED
913 */
915 SCIP* scip /**< SCIP data structure */
916 )
917{
918 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetNDivingLPIterations", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
919
920 return scip->stat->ndivinglpiterations;
921}
922
923/** gets total number of times, strong branching was called (each call represents solving two LPs)
924 *
925 * @return the total number of times, strong branching was called (each call represents solving two LPs)
926 *
927 * @pre This method can be called if SCIP is in one of the following stages:
928 * - \ref SCIP_STAGE_PRESOLVED
929 * - \ref SCIP_STAGE_SOLVING
930 * - \ref SCIP_STAGE_SOLVED
931 */
933 SCIP* scip /**< SCIP data structure */
934 )
935{
937
938 return scip->stat->nstrongbranchs;
939}
940
941/** gets total number of simplex iterations used so far in strong branching
942 *
943 * @return the total number of simplex iterations used so far in strong branching
944 *
945 * @pre This method can be called if SCIP is in one of the following stages:
946 * - \ref SCIP_STAGE_PRESOLVED
947 * - \ref SCIP_STAGE_SOLVING
948 * - \ref SCIP_STAGE_SOLVED
949 */
951 SCIP* scip /**< SCIP data structure */
952 )
953{
954 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetNStrongbranchLPIterations", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
955
956 return scip->stat->nsblpiterations;
957}
958
959/** gets total number of times, strong branching was called at the root node (each call represents solving two LPs)
960 *
961 * @return the total number of times, strong branching was called at the root node (each call represents solving two LPs)
962 *
963 * @pre This method can be called if SCIP is in one of the following stages:
964 * - \ref SCIP_STAGE_PRESOLVED
965 * - \ref SCIP_STAGE_SOLVING
966 * - \ref SCIP_STAGE_SOLVED
967 */
969 SCIP* scip /**< SCIP data structure */
970 )
971{
972 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetNRootStrongbranchs", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
973
974 return scip->stat->nrootstrongbranchs;
975}
976
977/** gets total number of simplex iterations used so far in strong branching at the root node
978 *
979 * @return the total number of simplex iterations used so far in strong branching at the root node
980 *
981 * @pre This method can be called if SCIP is in one of the following stages:
982 * - \ref SCIP_STAGE_PRESOLVED
983 * - \ref SCIP_STAGE_SOLVING
984 * - \ref SCIP_STAGE_SOLVED
985 */
987 SCIP* scip /**< SCIP data structure */
988 )
989{
990 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetNRootStrongbranchLPIterations", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
991
992 return scip->stat->nrootsblpiterations;
993}
994
995/** gets number of pricing rounds performed so far at the current node
996 *
997 * @return the number of pricing rounds performed so far at the current node
998 *
999 * @pre This method can be called if SCIP is in one of the following stages:
1000 * - \ref SCIP_STAGE_SOLVING
1001 */
1003 SCIP* scip /**< SCIP data structure */
1004 )
1005{
1007
1008 return scip->stat->npricerounds;
1009}
1010
1011/** get current number of variables in the pricing store
1012 *
1013 * @return the current number of variables in the pricing store
1014 *
1015 * @pre This method can be called if SCIP is in one of the following stages:
1016 * - \ref SCIP_STAGE_PRESOLVED
1017 * - \ref SCIP_STAGE_SOLVING
1018 * - \ref SCIP_STAGE_SOLVED
1019 */
1021 SCIP* scip /**< SCIP data structure */
1022 )
1023{
1025
1026 return scip->pricestore == NULL ? 0 : SCIPpricestoreGetNVars(scip->pricestore);
1027}
1028
1029/** get total number of pricing variables found so far
1030 *
1031 * @return the total number of pricing variables found so far
1032 *
1033 * @pre This method can be called if SCIP is in one of the following stages:
1034 * - \ref SCIP_STAGE_PRESOLVED
1035 * - \ref SCIP_STAGE_SOLVING
1036 * - \ref SCIP_STAGE_SOLVED
1037 */
1039 SCIP* scip /**< SCIP data structure */
1040 )
1041{
1042 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetNPricevarsFound", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
1043
1044 return scip->pricestore == NULL ? 0 : SCIPpricestoreGetNVarsFound(scip->pricestore);
1045}
1046
1047/** get total number of pricing variables applied to the LPs
1048 *
1049 * @return the total number of pricing variables applied to the LPs
1050 *
1051 * @pre This method can be called if SCIP is in one of the following stages:
1052 * - \ref SCIP_STAGE_PRESOLVED
1053 * - \ref SCIP_STAGE_SOLVING
1054 * - \ref SCIP_STAGE_SOLVED
1055 */
1057 SCIP* scip /**< SCIP data structure */
1058 )
1059{
1060 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetNPricevarsApplied", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
1061
1062 return scip->pricestore == NULL ? 0 : SCIPpricestoreGetNVarsApplied(scip->pricestore);
1063}
1064
1065/** gets number of separation rounds performed so far at the current node
1066 *
1067 * @return the number of separation rounds performed so far at the current node
1068 *
1069 * @pre This method can be called if SCIP is in one of the following stages:
1070 * - \ref SCIP_STAGE_SOLVING
1071 */
1073 SCIP* scip /**< SCIP data structure */
1074 )
1075{
1077
1078 return scip->stat->nseparounds;
1079}
1080
1081/** get total number of cuts added to the sepastore so far; this includes global cuts from the cut pool as often as they are separated
1082 *
1083 * @return the total number of cuts added to the sepastore so far
1084 *
1085 * @pre This method can be called if SCIP is in one of the following stages:
1086 * - \ref SCIP_STAGE_PRESOLVED
1087 * - \ref SCIP_STAGE_SOLVING
1088 * - \ref SCIP_STAGE_SOLVED
1089 */
1091 SCIP* scip /**< SCIP data structure */
1092 )
1093{
1095
1096 return scip->sepastore == NULL ? 0 : SCIPsepastoreGetNCutsAdded(scip->sepastore);
1097}
1098
1099/** get number of cuts found so far in current separation round
1100 *
1101 * @return the number of cuts found so far in current separation round
1102 *
1103 * @pre This method can be called if SCIP is in one of the following stages:
1104 * - \ref SCIP_STAGE_PRESOLVED
1105 * - \ref SCIP_STAGE_SOLVING
1106 * - \ref SCIP_STAGE_SOLVED
1107 */
1109 SCIP* scip /**< SCIP data structure */
1110 )
1111{
1112 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetNCutsFoundRound", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
1113
1114 return scip->sepastore == NULL ? 0 : SCIPsepastoreGetNCutsFoundRound(scip->sepastore);
1115}
1116
1117/** get total number of cuts applied to the LPs
1118 *
1119 * @return the total number of cuts applied to the LPs
1120 *
1121 * @pre This method can be called if SCIP is in one of the following stages:
1122 * - \ref SCIP_STAGE_PRESOLVED
1123 * - \ref SCIP_STAGE_SOLVING
1124 * - \ref SCIP_STAGE_SOLVED
1125 */
1127 SCIP* scip /**< SCIP data structure */
1128 )
1129{
1131
1132 return scip->sepastore == NULL ? 0 : SCIPsepastoreGetNCutsApplied(scip->sepastore);
1133}
1134
1135/** get total number of constraints found in conflict analysis (conflict, reconvergence constraints, and dual proofs)
1136 *
1137 * @return the total number of constraints found in conflict analysis (conflict, reconvergence constraints, and dual proofs)
1138 *
1139 * @pre This method can be called if SCIP is in one of the following stages:
1140 * - \ref SCIP_STAGE_TRANSFORMED
1141 * - \ref SCIP_STAGE_INITPRESOLVE
1142 * - \ref SCIP_STAGE_PRESOLVING
1143 * - \ref SCIP_STAGE_EXITPRESOLVE
1144 * - \ref SCIP_STAGE_PRESOLVED
1145 * - \ref SCIP_STAGE_INITSOLVE
1146 * - \ref SCIP_STAGE_SOLVING
1147 * - \ref SCIP_STAGE_SOLVED
1148 * - \ref SCIP_STAGE_EXITSOLVE
1149 */
1170
1171/** get number of conflict constraints found so far at the current node
1172 *
1173 * @return the number of conflict constraints found so far at the current node
1174 *
1175 * @pre This method can be called if SCIP is in one of the following stages:
1176 * - \ref SCIP_STAGE_TRANSFORMED
1177 * - \ref SCIP_STAGE_INITPRESOLVE
1178 * - \ref SCIP_STAGE_PRESOLVING
1179 * - \ref SCIP_STAGE_EXITPRESOLVE
1180 * - \ref SCIP_STAGE_PRESOLVED
1181 * - \ref SCIP_STAGE_INITSOLVE
1182 * - \ref SCIP_STAGE_SOLVING
1183 * - \ref SCIP_STAGE_SOLVED
1184 * - \ref SCIP_STAGE_EXITSOLVE
1185 */
1187 SCIP* scip /**< SCIP data structure */
1188 )
1189{
1190 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetNConflictConssFoundNode", FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE) );
1191
1192 return scip->conflict == NULL ? 0 : SCIPconflictGetNConflicts(scip->conflict);
1193}
1194
1195/** get total number of conflict constraints added to the problem
1196 *
1197 * @return the total number of conflict constraints added to the problem
1198 *
1199 * @pre This method can be called if SCIP is in one of the following stages:
1200 * - \ref SCIP_STAGE_TRANSFORMED
1201 * - \ref SCIP_STAGE_INITPRESOLVE
1202 * - \ref SCIP_STAGE_PRESOLVING
1203 * - \ref SCIP_STAGE_EXITPRESOLVE
1204 * - \ref SCIP_STAGE_PRESOLVED
1205 * - \ref SCIP_STAGE_INITSOLVE
1206 * - \ref SCIP_STAGE_SOLVING
1207 * - \ref SCIP_STAGE_SOLVED
1208 * - \ref SCIP_STAGE_EXITSOLVE
1209 */
1211 SCIP* scip /**< SCIP data structure */
1212 )
1213{
1214 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetNConflictConssApplied", FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE) );
1215
1216 return scip->conflict == NULL ? 0 : SCIPconflictGetNAppliedConss(scip->conflict);
1217}
1218
1219/** get total number of resolution conflict constraints added to the problem
1220 *
1221 * @return the total number of resolution conflict constraints added to the problem
1222 *
1223 * @pre This method can be called if SCIP is in one of the following stages:
1224 * - \ref SCIP_STAGE_TRANSFORMED
1225 * - \ref SCIP_STAGE_INITPRESOLVE
1226 * - \ref SCIP_STAGE_PRESOLVING
1227 * - \ref SCIP_STAGE_EXITPRESOLVE
1228 * - \ref SCIP_STAGE_PRESOLVED
1229 * - \ref SCIP_STAGE_INITSOLVE
1230 * - \ref SCIP_STAGE_SOLVING
1231 * - \ref SCIP_STAGE_SOLVED
1232 * - \ref SCIP_STAGE_EXITSOLVE
1233 */
1235 SCIP* scip /**< SCIP data structure */
1236 )
1237{
1238 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetNResConflictConssApplied", FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE) );
1239
1240 return scip->conflict == NULL ? 0 : SCIPconflictGetNAppliedResConss(scip->conflict);
1241}
1242/** get total number of dual proof constraints added to the problem
1243 *
1244 * @return the total number of dual proof constraints added to the problem
1245 *
1246 * @pre This method can be called if SCIP is in one of the following stages:
1247 * - \ref SCIP_STAGE_TRANSFORMED
1248 * - \ref SCIP_STAGE_INITPRESOLVE
1249 * - \ref SCIP_STAGE_PRESOLVING
1250 * - \ref SCIP_STAGE_EXITPRESOLVE
1251 * - \ref SCIP_STAGE_PRESOLVED
1252 * - \ref SCIP_STAGE_INITSOLVE
1253 * - \ref SCIP_STAGE_SOLVING
1254 * - \ref SCIP_STAGE_SOLVED
1255 * - \ref SCIP_STAGE_EXITSOLVE
1256 */
1258 SCIP* scip /**< SCIP data structure */
1259 )
1260{
1261 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetNConflictDualproofsApplied", FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE) );
1262
1263 return scip->conflict == NULL ? 0 : (SCIPconflictGetNDualproofsInfSuccess(scip->conflict) +
1265}
1266
1267/** gets maximal depth of all processed nodes in current branch and bound run (excluding probing nodes)
1268 *
1269 * @return the maximal depth of all processed nodes in current branch and bound run (excluding probing nodes)
1270 *
1271 * @pre This method can be called if SCIP is in one of the following stages:
1272 * - \ref SCIP_STAGE_TRANSFORMED
1273 * - \ref SCIP_STAGE_INITPRESOLVE
1274 * - \ref SCIP_STAGE_PRESOLVING
1275 * - \ref SCIP_STAGE_EXITPRESOLVE
1276 * - \ref SCIP_STAGE_PRESOLVED
1277 * - \ref SCIP_STAGE_INITSOLVE
1278 * - \ref SCIP_STAGE_SOLVING
1279 * - \ref SCIP_STAGE_SOLVED
1280 * - \ref SCIP_STAGE_EXITSOLVE
1281 */
1283 SCIP* scip /**< SCIP data structure */
1284 )
1285{
1287
1288 return scip->stat->maxdepth;
1289}
1290
1291/** gets maximal depth of all processed nodes over all branch and bound runs
1292 *
1293 * @return the maximal depth of all processed nodes over all branch and bound runs
1294 *
1295 * @pre This method can be called if SCIP is in one of the following stages:
1296 * - \ref SCIP_STAGE_TRANSFORMED
1297 * - \ref SCIP_STAGE_INITPRESOLVE
1298 * - \ref SCIP_STAGE_PRESOLVING
1299 * - \ref SCIP_STAGE_EXITPRESOLVE
1300 * - \ref SCIP_STAGE_PRESOLVED
1301 * - \ref SCIP_STAGE_INITSOLVE
1302 * - \ref SCIP_STAGE_SOLVING
1303 * - \ref SCIP_STAGE_SOLVED
1304 * - \ref SCIP_STAGE_EXITSOLVE
1305 */
1307 SCIP* scip /**< SCIP data structure */
1308 )
1309{
1310 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetMaxTotalDepth", FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE) );
1311
1312 return scip->stat->maxtotaldepth;
1313}
1314
1315/** gets total number of backtracks, i.e. number of times, the new node was selected from the leaves queue
1316 *
1317 * @return the total number of backtracks, i.e. number of times, the new node was selected from the leaves queue
1318 *
1319 * @pre This method can be called if SCIP is in one of the following stages:
1320 * - \ref SCIP_STAGE_TRANSFORMED
1321 * - \ref SCIP_STAGE_INITPRESOLVE
1322 * - \ref SCIP_STAGE_PRESOLVING
1323 * - \ref SCIP_STAGE_EXITPRESOLVE
1324 * - \ref SCIP_STAGE_PRESOLVED
1325 * - \ref SCIP_STAGE_INITSOLVE
1326 * - \ref SCIP_STAGE_SOLVING
1327 * - \ref SCIP_STAGE_SOLVED
1328 * - \ref SCIP_STAGE_EXITSOLVE
1329 */
1331 SCIP* scip /**< SCIP data structure */
1332 )
1333{
1334 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetNBacktracks", FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE) );
1335
1336 return scip->stat->nbacktracks;
1337}
1338
1339/** gets total number of active constraints at the current node
1340 *
1341 * @return the total number of active constraints at the current node
1342 *
1343 * @pre This method can be called if SCIP is in one of the following stages:
1344 * - \ref SCIP_STAGE_INITPRESOLVE
1345 * - \ref SCIP_STAGE_PRESOLVING
1346 * - \ref SCIP_STAGE_EXITPRESOLVE
1347 * - \ref SCIP_STAGE_PRESOLVED
1348 * - \ref SCIP_STAGE_SOLVING
1349 */
1351 SCIP* scip /**< SCIP data structure */
1352 )
1353{
1355
1356 return scip->stat->nactiveconss;
1357}
1358
1359/** gets total number of enabled constraints at the current node
1360 *
1361 * @return the total number of enabled constraints at the current node
1362 *
1363 * @pre This method can be called if SCIP is in one of the following stages:
1364 * - \ref SCIP_STAGE_PRESOLVED
1365 * - \ref SCIP_STAGE_SOLVING
1366 */
1368 SCIP* scip /**< SCIP data structure */
1369 )
1370{
1372
1373 return scip->stat->nenabledconss;
1374}
1375
1376/** gets average dual bound of all unprocessed nodes for original problem
1377 *
1378 * @return the average dual bound of all unprocessed nodes for original problem
1379 *
1380 * @pre This method can be called if SCIP is in one of the following stages:
1381 * - \ref SCIP_STAGE_PRESOLVED
1382 * - \ref SCIP_STAGE_SOLVING
1383 * - \ref SCIP_STAGE_SOLVED
1384 */
1386 SCIP* scip /**< SCIP data structure */
1387 )
1388{
1390
1391 return SCIPprobExternObjval(scip->transprob, scip->origprob, scip->set,
1392 SCIPtreeGetAvgLowerbound(scip->tree, scip->primal->cutoffbound));
1393}
1394
1395/** gets average lower (dual) bound of all unprocessed nodes in transformed problem
1396 *
1397 * @return the average lower (dual) bound of all unprocessed nodes in transformed problem
1398 *
1399 * @pre This method can be called if SCIP is in one of the following stages:
1400 * - \ref SCIP_STAGE_PRESOLVED
1401 * - \ref SCIP_STAGE_SOLVING
1402 * - \ref SCIP_STAGE_SOLVED
1403 */
1405 SCIP* scip /**< SCIP data structure */
1406 )
1407{
1409
1410 return SCIPtreeGetAvgLowerbound(scip->tree, scip->primal->cutoffbound);
1411}
1412
1413/** gets global dual bound
1414 *
1415 * @return the global dual bound
1416 *
1417 * @pre This method can be called if SCIP is in one of the following stages:
1418 * - \ref SCIP_STAGE_TRANSFORMED
1419 * - \ref SCIP_STAGE_INITPRESOLVE
1420 * - \ref SCIP_STAGE_PRESOLVING
1421 * - \ref SCIP_STAGE_EXITPRESOLVE
1422 * - \ref SCIP_STAGE_PRESOLVED
1423 * - \ref SCIP_STAGE_INITSOLVE
1424 * - \ref SCIP_STAGE_SOLVING
1425 * - \ref SCIP_STAGE_SOLVED
1426 * - \ref SCIP_STAGE_EXITSOLVE
1427 */
1429 SCIP* scip /**< SCIP data structure */
1430 )
1431{
1433
1434 /* in case we are in presolving we use the stored dual bound if it exits */
1435 if( scip->set->stage <= SCIP_STAGE_INITSOLVE && scip->transprob->dualbound < SCIP_INVALID )
1436 return scip->transprob->dualbound;
1437
1438 return SCIPprobExternObjval(scip->transprob, scip->origprob, scip->set, SCIPgetLowerbound(scip));
1439}
1440
1441/** gets global exact dual bound
1442 *
1443 * @pre This method can be called if SCIP is in one of the following stages:
1444 * - \ref SCIP_STAGE_TRANSFORMED
1445 * - \ref SCIP_STAGE_INITPRESOLVE
1446 * - \ref SCIP_STAGE_PRESOLVING
1447 * - \ref SCIP_STAGE_EXITPRESOLVE
1448 * - \ref SCIP_STAGE_PRESOLVED
1449 * - \ref SCIP_STAGE_INITSOLVE
1450 * - \ref SCIP_STAGE_SOLVING
1451 * - \ref SCIP_STAGE_SOLVED
1452 * - \ref SCIP_STAGE_EXITSOLVE
1453 */
1455 SCIP* scip, /**< SCIP data structure */
1456 SCIP_RATIONAL* result /**< the resulting obj value */
1457 )
1458{
1459 SCIP_RATIONAL* tmpval;
1460 (void) SCIPrationalCreateBuffer(SCIPbuffer(scip), &tmpval);
1461
1462 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetDualboundExact", FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE) );
1463
1464 /* in case we are in presolving we use the stored dual bound if it exits */
1465 if( scip->set->stage <= SCIP_STAGE_INITSOLVE && scip->transprob->dualbound < SCIP_INVALID )
1466 SCIPrationalSetReal(result, scip->transprob->dualbound);
1467 else
1468 {
1469 /* all the lower bounds should be proved bounds, so SCIPgetLowerbound should be safe */
1471 SCIPprobExternObjvalExact(scip->transprob, scip->origprob, scip->set, tmpval, result);
1472 }
1473
1475}
1476
1477/** gets global lower (dual) bound in transformed problem
1478 *
1479 * @return the global lower (dual) bound in transformed problem
1480 *
1481 * @pre This method can be called if SCIP is in one of the following stages:
1482 * - \ref SCIP_STAGE_TRANSFORMED
1483 * - \ref SCIP_STAGE_INITPRESOLVE
1484 * - \ref SCIP_STAGE_PRESOLVING
1485 * - \ref SCIP_STAGE_EXITPRESOLVE
1486 * - \ref SCIP_STAGE_PRESOLVED
1487 * - \ref SCIP_STAGE_INITSOLVE
1488 * - \ref SCIP_STAGE_SOLVING
1489 * - \ref SCIP_STAGE_SOLVED
1490 */
1492 SCIP* scip /**< SCIP data structure */
1493 )
1494{
1496
1497 if( scip->set->stage <= SCIP_STAGE_INITSOLVE )
1498 return -SCIPinfinity(scip);
1500 {
1501 /* in case we could not prove whether the problem is unbounded or infeasible, we want to terminate with lower
1502 * bound = -inf instead of lower bound = upper bound = +inf also in case we prove that the problem is unbounded,
1503 * it seems to make sense to return with lower bound = -inf, since -infinity is the only valid lower bound
1504 */
1505 return -SCIPinfinity(scip);
1506 }
1508 {
1509 /* SCIPtreeGetLowerbound() should return +inf in the case of infeasibility, but when infeasibility is detected
1510 * during presolving this does not seem to be the case; hence, we treat this case explicitly
1511 */
1512 return SCIPinfinity(scip);
1513 }
1514 else
1515 {
1516 SCIP_Real treelowerbound;
1517
1518 /* it may happen that the remaining tree is empty or all open nodes have a lower bound above the cutoff bound, but
1519 * have not yet been cut off, e.g., when the user calls SCIPgetDualbound() in some event handler; in this case,
1520 * the global lower bound is given by the upper bound value
1521 */
1522 treelowerbound = SCIPtreeGetLowerbound(scip->tree, scip->set);
1523
1524 if( treelowerbound < scip->primal->upperbound)
1525 return treelowerbound;
1526 else
1527 return scip->primal->upperbound;
1528 }
1529}
1530
1531/** gets global exact lower (dual) bound in transformed problem
1532 *
1533 * @pre This method can be called if SCIP is in one of the following stages:
1534 * - \ref SCIP_STAGE_TRANSFORMED
1535 * - \ref SCIP_STAGE_INITPRESOLVE
1536 * - \ref SCIP_STAGE_PRESOLVING
1537 * - \ref SCIP_STAGE_EXITPRESOLVE
1538 * - \ref SCIP_STAGE_PRESOLVED
1539 * - \ref SCIP_STAGE_INITSOLVE
1540 * - \ref SCIP_STAGE_SOLVING
1541 * - \ref SCIP_STAGE_SOLVED
1542 */
1544 SCIP* scip, /**< SCIP data structure */
1545 SCIP_RATIONAL* result /**< the resulting bound */
1546 )
1547{
1548 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetLowerboundExact", FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE) );
1549
1550 if( scip->set->stage <= SCIP_STAGE_INITSOLVE )
1553 {
1554 /* in case we could not prove whether the problem is unbounded or infeasible, we want to terminate with lower
1555 * bound = -inf instead of lower bound = upper bound = +inf also in case we prove that the problem is unbounded,
1556 * it seems to make sense to return with lower bound = -inf, since -infinity is the only valid lower bound
1557 */
1559 }
1560 else
1561 {
1562 SCIP_RATIONAL* treelowerbound = SCIPtreeGetLowerboundExact(scip->tree, scip->set);
1563
1564 /* it may happen that the remaining tree is empty or all open nodes have a lower bound above the cutoff bound, but
1565 * have not yet been cut off, e.g., when the user calls SCIPgetDualbound() in some event handler; in this case,
1566 * the global lower bound is given by the upper bound value
1567 */
1569 treelowerbound != NULL && SCIPrationalIsLE(treelowerbound, scip->primal->upperboundexact)
1570 ? treelowerbound : scip->primal->upperboundexact);
1571 }
1572}
1573
1574/** gets dual bound of the root node for the original problem
1575 *
1576 * @return the dual bound of the root node for the original problem
1577 *
1578 * @pre This method can be called if SCIP is in one of the following stages:
1579 * - \ref SCIP_STAGE_PRESOLVING
1580 * - \ref SCIP_STAGE_EXITPRESOLVE
1581 * - \ref SCIP_STAGE_PRESOLVED
1582 * - \ref SCIP_STAGE_INITSOLVE
1583 * - \ref SCIP_STAGE_SOLVING
1584 * - \ref SCIP_STAGE_SOLVED
1585 */
1587 SCIP* scip /**< SCIP data structure */
1588 )
1589{
1590 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetDualboundRoot", FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE) );
1591
1592 return SCIPprobExternObjval(scip->transprob, scip->origprob, scip->set, SCIPgetLowerboundRoot(scip));
1593}
1594
1595/** gets lower (dual) bound in transformed problem of the root node
1596 *
1597 * @return the lower (dual) bound in transformed problem of the root node
1598 *
1599 * @pre This method can be called if SCIP is in one of the following stages:
1600 * - \ref SCIP_STAGE_PRESOLVING
1601 * - \ref SCIP_STAGE_EXITPRESOLVE
1602 * - \ref SCIP_STAGE_PRESOLVED
1603 * - \ref SCIP_STAGE_INITSOLVE
1604 * - \ref SCIP_STAGE_SOLVING
1605 * - \ref SCIP_STAGE_SOLVED
1606 */
1608 SCIP* scip /**< SCIP data structure */
1609 )
1610{
1611 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetLowerboundRoot", FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE) );
1612
1613 return scip->stat->rootlowerbound;
1614}
1615
1616/** gets dual bound for the original problem obtained by the first LP solve at the root node
1617 *
1618 * @return the dual bound for the original problem of the first LP solve at the root node
1619 *
1620 * @pre This method can be called if SCIP is in one of the following stages:
1621 * - \ref SCIP_STAGE_PRESOLVING
1622 * - \ref SCIP_STAGE_EXITPRESOLVE
1623 * - \ref SCIP_STAGE_PRESOLVED
1624 * - \ref SCIP_STAGE_INITSOLVE
1625 * - \ref SCIP_STAGE_SOLVING
1626 * - \ref SCIP_STAGE_SOLVED
1627 */
1629 SCIP* scip /**< SCIP data structure */
1630 )
1631{
1632 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetFirstLPDualboundRoot", FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE) );
1633
1634 return scip->stat->firstlpdualbound;
1635}
1636
1637/** gets lower (dual) bound in transformed problem obtained by the first LP solve at the root node
1638 *
1639 * @return the lower (dual) bound in transformed problem obtained by first LP solve at the root node
1640 *
1641 * @pre This method can be called if SCIP is in one of the following stages:
1642 * - \ref SCIP_STAGE_PRESOLVING
1643 * - \ref SCIP_STAGE_EXITPRESOLVE
1644 * - \ref SCIP_STAGE_PRESOLVED
1645 * - \ref SCIP_STAGE_INITSOLVE
1646 * - \ref SCIP_STAGE_SOLVING
1647 * - \ref SCIP_STAGE_SOLVED
1648 */
1650 SCIP* scip /**< SCIP data structure */
1651 )
1652{
1653 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetFirstLPLowerboundRoot", FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE) );
1654
1655 if( scip->stat->firstlpdualbound == SCIP_INVALID ) /*lint !e777*/
1656 return -SCIPinfinity(scip);
1657 else
1658 return SCIPprobInternObjval(scip->transprob, scip->origprob, scip->set, scip->stat->firstlpdualbound);
1659}
1660
1661/** gets the primal bound of the very first solution
1662 *
1663 * @return the primal bound of the very first solution
1664 */
1666 SCIP* scip /**< SCIP data structure */
1667 )
1668{
1669 return scip->stat->firstprimalbound;
1670}
1671
1672/** gets global primal bound (objective value of best solution or user objective limit) for the original problem
1673 *
1674 * @return the global primal bound (objective value of best solution or user objective limit) for the original problem
1675 *
1676 * @pre This method can be called if SCIP is in one of the following stages:
1677 * - \ref SCIP_STAGE_TRANSFORMED
1678 * - \ref SCIP_STAGE_INITPRESOLVE
1679 * - \ref SCIP_STAGE_PRESOLVING
1680 * - \ref SCIP_STAGE_EXITPRESOLVE
1681 * - \ref SCIP_STAGE_PRESOLVED
1682 * - \ref SCIP_STAGE_INITSOLVE
1683 * - \ref SCIP_STAGE_SOLVING
1684 * - \ref SCIP_STAGE_SOLVED
1685 * - \ref SCIP_STAGE_EXITSOLVE
1686 */
1688 SCIP* scip /**< SCIP data structure */
1689 )
1690{
1691 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetPrimalbound", FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE) );
1692
1693 return SCIPprobExternObjval(scip->transprob, scip->origprob, scip->set, SCIPgetUpperbound(scip));
1694}
1695
1696/** gets global primal bound (objective value of best solution or user objective limit) for the original problem
1697 *
1698 * @pre This method can be called if SCIP is in one of the following stages:
1699 * - \ref SCIP_STAGE_TRANSFORMED
1700 * - \ref SCIP_STAGE_INITPRESOLVE
1701 * - \ref SCIP_STAGE_PRESOLVING
1702 * - \ref SCIP_STAGE_EXITPRESOLVE
1703 * - \ref SCIP_STAGE_PRESOLVED
1704 * - \ref SCIP_STAGE_INITSOLVE
1705 * - \ref SCIP_STAGE_SOLVING
1706 * - \ref SCIP_STAGE_SOLVED
1707 * - \ref SCIP_STAGE_EXITSOLVE
1708 */
1710 SCIP* scip, /**< SCIP data structure */
1711 SCIP_RATIONAL* result /**< the resulting obj value */
1712 )
1713{
1714 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetPrimalboundExact", FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE) );
1715
1716 SCIPprobExternObjvalExact(scip->transprob, scip->origprob, scip->set, scip->primal->upperboundexact, result);
1717}
1718
1719/** gets global upper (primal) bound in transformed problem (objective value of best solution or user objective limit)
1720 *
1721 * @return the global upper (primal) bound in transformed problem (objective value of best solution or user objective limit)
1722 *
1723 * @pre This method can be called if SCIP is in one of the following stages:
1724 * - \ref SCIP_STAGE_TRANSFORMED
1725 * - \ref SCIP_STAGE_INITPRESOLVE
1726 * - \ref SCIP_STAGE_PRESOLVING
1727 * - \ref SCIP_STAGE_EXITPRESOLVE
1728 * - \ref SCIP_STAGE_PRESOLVED
1729 * - \ref SCIP_STAGE_INITSOLVE
1730 * - \ref SCIP_STAGE_SOLVING
1731 * - \ref SCIP_STAGE_SOLVED
1732 * - \ref SCIP_STAGE_EXITSOLVE
1733 */
1735 SCIP* scip /**< SCIP data structure */
1736 )
1737{
1739
1741 return -SCIPinfinity(scip);
1742 else
1743 return scip->primal->upperbound;
1744}
1745
1746/** gets global exact upper (primal) bound in transformed problem (objective value of best solution or user objective limit)
1747 *
1748 * @pre This method can be called if SCIP is in one of the following stages:
1749 * - \ref SCIP_STAGE_TRANSFORMED
1750 * - \ref SCIP_STAGE_INITPRESOLVE
1751 * - \ref SCIP_STAGE_PRESOLVING
1752 * - \ref SCIP_STAGE_EXITPRESOLVE
1753 * - \ref SCIP_STAGE_PRESOLVED
1754 * - \ref SCIP_STAGE_INITSOLVE
1755 * - \ref SCIP_STAGE_SOLVING
1756 * - \ref SCIP_STAGE_SOLVED
1757 * - \ref SCIP_STAGE_EXITSOLVE
1758 */
1760 SCIP* scip, /**< SCIP data structure */
1761 SCIP_RATIONAL* result /**< the resulting upper bound value */
1762 )
1763{
1764 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetUpperboundExact", FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE) );
1765
1768 else
1769 SCIPrationalSetRational(result, scip->primal->upperboundexact);
1770}
1771
1772/** gets global cutoff bound in transformed problem: a sub problem with lower bound larger than the cutoff
1773 * cannot contain a better feasible solution; usually, this bound is equal to the upper bound, but if the
1774 * objective value is always integral, the cutoff bound is (nearly) one less than the upper bound;
1775 * additionally, due to objective function domain propagation, the cutoff bound can be further reduced
1776 *
1777 * @return global cutoff bound in transformed problem
1778 *
1779 * @pre This method can be called if SCIP is in one of the following stages:
1780 * - \ref SCIP_STAGE_TRANSFORMED
1781 * - \ref SCIP_STAGE_INITPRESOLVE
1782 * - \ref SCIP_STAGE_PRESOLVING
1783 * - \ref SCIP_STAGE_EXITPRESOLVE
1784 * - \ref SCIP_STAGE_PRESOLVED
1785 * - \ref SCIP_STAGE_INITSOLVE
1786 * - \ref SCIP_STAGE_SOLVING
1787 * - \ref SCIP_STAGE_SOLVED
1788 * - \ref SCIP_STAGE_EXITSOLVE
1789 */
1791 SCIP* scip /**< SCIP data structure */
1792 )
1793{
1794 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetCutoffbound", FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE) );
1795
1796 return scip->primal->cutoffbound;
1797}
1798
1799/** gets exact global cutoff bound of transformed problem: a sub problem with lower bound larger than the cutoff
1800 * cannot contain a better feasible solution; usually, this bound is equal to the upper bound, but if the
1801 * objective value is always integral, the cutoff bound is (nearly) one less than the upper bound;
1802 * additionally, due to objective function domain propagation, the cutoff bound can be further reduced
1803 *
1804 * @return exact global cutoff bound in transformed problem
1805 *
1806 * @pre This method can be called if SCIP is in one of the following stages:
1807 * - \ref SCIP_STAGE_TRANSFORMED
1808 * - \ref SCIP_STAGE_INITPRESOLVE
1809 * - \ref SCIP_STAGE_PRESOLVING
1810 * - \ref SCIP_STAGE_EXITPRESOLVE
1811 * - \ref SCIP_STAGE_PRESOLVED
1812 * - \ref SCIP_STAGE_INITSOLVE
1813 * - \ref SCIP_STAGE_SOLVING
1814 * - \ref SCIP_STAGE_SOLVED
1815 * - \ref SCIP_STAGE_EXITSOLVE
1816 */
1818 SCIP* scip /**< SCIP data structure */
1819 )
1820{
1821 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetCutoffboundExact", FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE) );
1822
1823 return scip->primal->cutoffboundexact;
1824}
1825
1826/** updates the cutoff bound
1827 *
1828 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1829 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1830 *
1831 * @note using this method in the solving stage can lead to an erroneous SCIP solving status; in particular,
1832 * if a solution not respecting the cutoff bound was found before installing a cutoff bound which
1833 * renders the remaining problem infeasible, this solution may be reported as optimal
1834 *
1835 * @pre This method can be called if SCIP is in one of the following stages:
1836 * - \ref SCIP_STAGE_TRANSFORMED
1837 * - \ref SCIP_STAGE_PRESOLVING
1838 * - \ref SCIP_STAGE_PRESOLVED
1839 * - \ref SCIP_STAGE_INITSOLVE
1840 * - \ref SCIP_STAGE_SOLVING
1841 *
1842 * @note the given cutoff bound has to better or equal to known one (SCIPgetCutoffbound())
1843 * @note a given cutoff bound is also used for updating the objective limit, if possible
1844 */
1846 SCIP* scip, /**< SCIP data structure */
1847 SCIP_Real cutoffbound /**< new cutoff bound */
1848 )
1849{
1850 SCIP_CALL( SCIPcheckStage(scip, "SCIPupdateCutoffbound", FALSE, FALSE, FALSE, TRUE, FALSE, TRUE, FALSE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE) );
1851
1852 assert(cutoffbound <= SCIPgetCutoffbound(scip));
1853
1854 SCIP_CALL( SCIPprimalSetCutoffbound(scip->primal, scip->mem->probmem, scip->set, scip->stat, scip->eventqueue,
1855 scip->eventfilter, scip->transprob, scip->origprob, scip->tree, scip->reopt, scip->lp, cutoffbound, FALSE) );
1856
1857 return SCIP_OKAY;
1858}
1859
1860
1861/** returns whether the current primal bound is justified with a feasible primal solution; if not, the primal bound
1862 * was set from the user as objective limit
1863 *
1864 * @return TRUE if the current primal bound is justified with a feasible primal solution, otherwise FALSE
1865 *
1866 * @pre This method can be called if SCIP is in one of the following stages:
1867 * - \ref SCIP_STAGE_TRANSFORMED
1868 * - \ref SCIP_STAGE_INITPRESOLVE
1869 * - \ref SCIP_STAGE_PRESOLVING
1870 * - \ref SCIP_STAGE_EXITPRESOLVE
1871 * - \ref SCIP_STAGE_PRESOLVED
1872 * - \ref SCIP_STAGE_INITSOLVE
1873 * - \ref SCIP_STAGE_SOLVING
1874 * - \ref SCIP_STAGE_SOLVED
1875 * - \ref SCIP_STAGE_EXITSOLVE
1876 */
1878 SCIP* scip /**< SCIP data structure */
1879 )
1880{
1881 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPisPrimalboundSol", FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE) );
1882
1883 return SCIPprimalUpperboundIsSol(scip->primal, scip->set, scip->transprob, scip->origprob);
1884}
1885
1886/** gets current gap |(primalbound - dualbound)/min(|primalbound|,|dualbound|)| if both bounds have same sign,
1887 * or infinity, if they have opposite sign
1888 *
1889 * @return the current gap |(primalbound - dualbound)/min(|primalbound|,|dualbound|)| if both bounds have same sign,
1890 * or infinity, if they have opposite sign
1891 *
1892 * @pre This method can be called if SCIP is in one of the following stages:
1893 * - \ref SCIP_STAGE_PRESOLVING
1894 * - \ref SCIP_STAGE_EXITPRESOLVE
1895 * - \ref SCIP_STAGE_PRESOLVED
1896 * - \ref SCIP_STAGE_INITSOLVE
1897 * - \ref SCIP_STAGE_SOLVING
1898 * - \ref SCIP_STAGE_SOLVED
1899 */
1901 SCIP* scip /**< SCIP data structure */
1902 )
1903{
1905
1906 /* in case we could not prove whether the problem is unbounded or infeasible, we want to terminate with gap = +inf;
1907 * if the problem was proven to be unbounded or proven to be infeasible we return gap = 0
1908 */
1910 return SCIPsetInfinity(scip->set);
1912 return 0.0;
1913
1914 /* the lowerbound is infinity, but SCIP may not have updated the status; in this case, the problem was already solved
1915 * so we return gap = 0
1916 */
1918 return 0.0;
1919
1921}
1922
1923/** gets current gap |(upperbound - lowerbound)/min(|upperbound|,|lowerbound|)| in transformed problem if both bounds
1924 * have same sign, or infinity, if they have opposite sign
1925 *
1926 * @return current gap |(upperbound - lowerbound)/min(|upperbound|,|lowerbound|)| in transformed problem if both bounds
1927 * have same sign, or infinity, if they have opposite sign
1928 *
1929 * @pre This method can be called if SCIP is in one of the following stages:
1930 * - \ref SCIP_STAGE_PRESOLVED
1931 * - \ref SCIP_STAGE_SOLVING
1932 * - \ref SCIP_STAGE_SOLVED
1933 */
1935 SCIP* scip /**< SCIP data structure */
1936 )
1937{
1939
1940 /* in case we could not prove whether the problem is unbounded or infeasible, we want to terminate with gap = +inf;
1941 * if the problem was proven to be unbounded or proven to be infeasible we return gap = 0
1942 */
1944 return SCIPsetInfinity(scip->set);
1946 return 0.0;
1947
1948 /* the lowerbound is infinity, but SCIP may not have updated the status; in this case, the problem was already solved
1949 * so we return gap = 0
1950 */
1952 return 0.0;
1953
1955}
1956
1957/** gets number of feasible primal solutions found so far
1958 *
1959 * @return the number of feasible primal solutions found so far
1960 *
1961 * @pre This method can be called if SCIP is in one of the following stages:
1962 * - \ref SCIP_STAGE_TRANSFORMED
1963 * - \ref SCIP_STAGE_INITPRESOLVE
1964 * - \ref SCIP_STAGE_PRESOLVING
1965 * - \ref SCIP_STAGE_EXITPRESOLVE
1966 * - \ref SCIP_STAGE_PRESOLVED
1967 * - \ref SCIP_STAGE_INITSOLVE
1968 * - \ref SCIP_STAGE_SOLVING
1969 * - \ref SCIP_STAGE_SOLVED
1970 * - \ref SCIP_STAGE_EXITSOLVE
1971 */
1973 SCIP* scip /**< SCIP data structure */
1974 )
1975{
1977
1978 return scip->primal->nsolsfound;
1979}
1980
1981/** gets number of feasible primal solutions respecting the objective limit found so far
1982 *
1983 * @return the number of feasible primal solutions respecting the objective limit found so far
1984 *
1985 * @pre This method can be called if SCIP is in one of the following stages:
1986 * - \ref SCIP_STAGE_INIT
1987 * - \ref SCIP_STAGE_PROBLEM
1988 * - \ref SCIP_STAGE_TRANSFORMING
1989 * - \ref SCIP_STAGE_TRANSFORMED
1990 * - \ref SCIP_STAGE_INITPRESOLVE
1991 * - \ref SCIP_STAGE_PRESOLVING
1992 * - \ref SCIP_STAGE_EXITPRESOLVE
1993 * - \ref SCIP_STAGE_PRESOLVED
1994 * - \ref SCIP_STAGE_INITSOLVE
1995 * - \ref SCIP_STAGE_SOLVING
1996 * - \ref SCIP_STAGE_SOLVED
1997 * - \ref SCIP_STAGE_EXITSOLVE
1998 */
2000 SCIP* scip /**< SCIP data structure */
2001 )
2002{
2004 return 0;
2005
2006 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetNLimSolsFound", FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE) );
2007
2008 return scip->primal->nlimsolsfound;
2009}
2010
2011/** gets number of feasible primal solutions found so far, that improved the primal bound at the time they were found
2012 *
2013 * @return the number of feasible primal solutions found so far, that improved the primal bound at the time they were found
2014 *
2015 * @pre This method can be called if SCIP is in one of the following stages:
2016 * - \ref SCIP_STAGE_TRANSFORMED
2017 * - \ref SCIP_STAGE_INITPRESOLVE
2018 * - \ref SCIP_STAGE_PRESOLVING
2019 * - \ref SCIP_STAGE_EXITPRESOLVE
2020 * - \ref SCIP_STAGE_PRESOLVED
2021 * - \ref SCIP_STAGE_INITSOLVE
2022 * - \ref SCIP_STAGE_SOLVING
2023 * - \ref SCIP_STAGE_SOLVED
2024 * - \ref SCIP_STAGE_EXITSOLVE
2025 */
2027 SCIP* scip /**< SCIP data structure */
2028 )
2029{
2030 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetNBestSolsFound", FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE) );
2031
2032 return scip->primal->nbestsolsfound;
2033}
2034
2035/** gets the average pseudo cost value for the given direction over all variables
2036 *
2037 * @return the average pseudo cost value for the given direction over all variables
2038 *
2039 * @pre This method can be called if SCIP is in one of the following stages:
2040 * - \ref SCIP_STAGE_SOLVING
2041 * - \ref SCIP_STAGE_SOLVED
2042 */
2044 SCIP* scip, /**< SCIP data structure */
2045 SCIP_Real solvaldelta /**< difference of variable's new LP value - old LP value */
2046 )
2047{
2049
2050 return SCIPhistoryGetPseudocost(scip->stat->glbhistory, solvaldelta);
2051}
2052
2053/** gets the average pseudo cost value for the given direction over all variables,
2054 * only using the pseudo cost information of the current run
2055 *
2056 * @return the average pseudo cost value for the given direction over all variables,
2057 * only using the pseudo cost information of the current run
2058 *
2059 * @pre This method can be called if SCIP is in one of the following stages:
2060 * - \ref SCIP_STAGE_SOLVING
2061 * - \ref SCIP_STAGE_SOLVED
2062 */
2064 SCIP* scip, /**< SCIP data structure */
2065 SCIP_Real solvaldelta /**< difference of variable's new LP value - old LP value */
2066 )
2067{
2068 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetAvgPseudocostCurrentRun", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
2069
2070 return SCIPhistoryGetPseudocost(scip->stat->glbhistorycrun, solvaldelta);
2071}
2072
2073/** gets the average number of pseudo cost updates for the given direction over all variables
2074 *
2075 * @return the average number of pseudo cost updates for the given direction over all variables
2076 *
2077 * @pre This method can be called if SCIP is in one of the following stages:
2078 * - \ref SCIP_STAGE_SOLVING
2079 * - \ref SCIP_STAGE_SOLVED
2080 */
2082 SCIP* scip, /**< SCIP data structure */
2083 SCIP_BRANCHDIR dir /**< branching direction (downwards, or upwards) */
2084 )
2085{
2086 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetAvgPseudocostCount", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
2087
2088 return SCIPhistoryGetPseudocostCount(scip->stat->glbhistory, dir)
2089 / MAX(scip->transprob->nbinvars + scip->transprob->nintvars, 1);
2090}
2091
2092/** gets the average number of pseudo cost updates for the given direction over all variables,
2093 * only using the pseudo cost information of the current run
2094 *
2095 * @return the average number of pseudo cost updates for the given direction over all variables,
2096 * only using the pseudo cost information of the current run
2097 *
2098 * @pre This method can be called if SCIP is in one of the following stages:
2099 * - \ref SCIP_STAGE_SOLVING
2100 * - \ref SCIP_STAGE_SOLVED
2101 */
2103 SCIP* scip, /**< SCIP data structure */
2104 SCIP_BRANCHDIR dir /**< branching direction (downwards, or upwards) */
2105 )
2106{
2107 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetAvgPseudocostCountCurrentRun", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
2108
2109 return SCIPhistoryGetPseudocostCount(scip->stat->glbhistorycrun, dir)
2110 / MAX(scip->transprob->nbinvars + scip->transprob->nintvars, 1);
2111}
2112
2113/** gets the average pseudo cost score value over all variables, assuming a fractionality of 0.5
2114 *
2115 * @return the average pseudo cost score value over all variables, assuming a fractionality of 0.5
2116 *
2117 * @pre This method can be called if SCIP is in one of the following stages:
2118 * - \ref SCIP_STAGE_SOLVING
2119 * - \ref SCIP_STAGE_SOLVED
2120 */
2122 SCIP* scip /**< SCIP data structure */
2123 )
2124{
2125 SCIP_Real pscostdown;
2126 SCIP_Real pscostup;
2127
2128 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetAvgPseudocostScore", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
2129
2130 pscostdown = SCIPhistoryGetPseudocost(scip->stat->glbhistory, -0.5);
2131 pscostup = SCIPhistoryGetPseudocost(scip->stat->glbhistory, +0.5);
2132
2133 return SCIPbranchGetScore(scip->set, NULL, pscostdown, pscostup);
2134}
2135
2136/** gets the average discounted pseudo cost score value over all variables, assuming a fractionality of 0.5
2137 *
2138 * This combines both pscost and ancpscost fields.
2139 *
2140 * @return the average discounted pseudo cost score value over all variables, assuming a fractionality of 0.5,
2141 * combining both pscost and ancpscost fields
2142 *
2143 * @pre This method can be called if SCIP is in one of the following stages:
2144 * - \ref SCIP_STAGE_SOLVING
2145 * - \ref SCIP_STAGE_SOLVED
2146 */
2148 SCIP* scip, /**< SCIP data structure */
2149 SCIP_Real discountfac /**< discount factor for discounted pseudocost */
2150 )
2151{
2152 SCIP_Real pscostdown;
2153 SCIP_Real pscostup;
2154
2155 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetAvgDPseudocostScore", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
2156
2157 pscostdown = SCIPhistoryGetPseudocost(scip->stat->glbhistory, -0.5)
2158 + discountfac * SCIPhistoryGetAncPseudocost(scip->stat->glbhistory, -0.5);
2159 pscostup = SCIPhistoryGetPseudocost(scip->stat->glbhistory, +0.5)
2160 + discountfac * SCIPhistoryGetAncPseudocost(scip->stat->glbhistory, +0.5);
2161 pscostdown /= (1 + discountfac);
2162 pscostup /= (1 + discountfac);
2163
2164 return SCIPbranchGetScore(scip->set, NULL, pscostdown, pscostup);
2165}
2166
2167/** returns the variance of pseudo costs for all variables in the requested direction
2168 *
2169 * @return the variance of pseudo costs for all variables in the requested direction
2170 *
2171 * @pre This method can be called if SCIP is in one of the following stages:
2172 * - \ref SCIP_STAGE_SOLVING
2173 * - \ref SCIP_STAGE_SOLVED
2174 */
2176 SCIP* scip, /**< SCIP data structure */
2177 SCIP_BRANCHDIR branchdir, /**< the branching direction, up or down */
2178 SCIP_Bool onlycurrentrun /**< use only history of current run? */
2179 )
2180{
2181 SCIP_HISTORY* history;
2182
2183 assert(scip != NULL);
2184 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetPseudocostVariance", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
2185
2186 history = (onlycurrentrun ? scip->stat->glbhistorycrun : scip->stat->glbhistory);
2187 assert(history != NULL);
2188
2189 return SCIPhistoryGetPseudocostVariance(history, branchdir);
2190}
2191
2192/** gets the number of pseudo cost updates for the given direction over all variables
2193 *
2194 * @return the number of pseudo cost updates for the given direction over all variables
2195 *
2196 * @pre This method can be called if SCIP is in one of the following stages:
2197 * - \ref SCIP_STAGE_SOLVING
2198 * - \ref SCIP_STAGE_SOLVED
2199 */
2201 SCIP* scip, /**< SCIP data structure */
2202 SCIP_BRANCHDIR dir, /**< branching direction (downwards, or upwards) */
2203 SCIP_Bool onlycurrentrun /**< use only history of current run? */
2204 )
2205{
2206 SCIP_HISTORY* history;
2207
2208 assert(scip != NULL);
2210
2211 history = (onlycurrentrun ? scip->stat->glbhistorycrun : scip->stat->glbhistory);
2212
2213 return SCIPhistoryGetPseudocostCount(history, dir);
2214}
2215
2216/** gets the average pseudo cost score value over all variables, assuming a fractionality of 0.5,
2217 * only using the pseudo cost information of the current run
2218 *
2219 * @return the average pseudo cost score value over all variables, assuming a fractionality of 0.5,
2220 * only using the pseudo cost information of the current run
2221 *
2222 * @pre This method can be called if SCIP is in one of the following stages:
2223 * - \ref SCIP_STAGE_SOLVING
2224 * - \ref SCIP_STAGE_SOLVED
2225 */
2227 SCIP* scip /**< SCIP data structure */
2228 )
2229{
2230 SCIP_Real pscostdown;
2231 SCIP_Real pscostup;
2232
2233 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetAvgPseudocostScoreCurrentRun", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
2234
2235 pscostdown = SCIPhistoryGetPseudocost(scip->stat->glbhistorycrun, -0.5);
2236 pscostup = SCIPhistoryGetPseudocost(scip->stat->glbhistorycrun, +0.5);
2237
2238 return SCIPbranchGetScore(scip->set, NULL, pscostdown, pscostup);
2239}
2240
2241/** gets the average conflict score value over all variables
2242 *
2243 * @return the average conflict score value over all variables
2244 *
2245 * @pre This method can be called if SCIP is in one of the following stages:
2246 * - \ref SCIP_STAGE_SOLVING
2247 * - \ref SCIP_STAGE_SOLVED
2248 */
2250 SCIP* scip /**< SCIP data structure */
2251 )
2252{
2253 SCIP_Real conflictscoredown;
2254 SCIP_Real conflictscoreup;
2255 SCIP_Real scale;
2256
2257 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetAvgConflictScore", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
2258
2259 scale = scip->transprob->nvars * scip->stat->vsidsweight;
2260 conflictscoredown = SCIPhistoryGetVSIDS(scip->stat->glbhistory, SCIP_BRANCHDIR_DOWNWARDS) / scale;
2261 conflictscoreup = SCIPhistoryGetVSIDS(scip->stat->glbhistory, SCIP_BRANCHDIR_UPWARDS) / scale;
2262
2263 return SCIPbranchGetScore(scip->set, NULL, conflictscoredown, conflictscoreup);
2264}
2265
2266/** gets the average conflict score value over all variables, only using the conflict score information of the current run
2267 *
2268 * @return the average conflict score value over all variables, only using the conflict score information of the current run
2269 *
2270 * @pre This method can be called if SCIP is in one of the following stages:
2271 * - \ref SCIP_STAGE_SOLVING
2272 * - \ref SCIP_STAGE_SOLVED
2273 */
2275 SCIP* scip /**< SCIP data structure */
2276 )
2277{
2278 SCIP_Real conflictscoredown;
2279 SCIP_Real conflictscoreup;
2280 SCIP_Real scale;
2281
2282 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetAvgConflictScoreCurrentRun", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
2283
2284 scale = scip->transprob->nvars * scip->stat->vsidsweight;
2285 conflictscoredown = SCIPhistoryGetVSIDS(scip->stat->glbhistorycrun, SCIP_BRANCHDIR_DOWNWARDS) / scale;
2286 conflictscoreup = SCIPhistoryGetVSIDS(scip->stat->glbhistorycrun, SCIP_BRANCHDIR_UPWARDS) / scale;
2287
2288 return SCIPbranchGetScore(scip->set, NULL, conflictscoredown, conflictscoreup);
2289}
2290
2291/** gets the average inference score value over all variables
2292 *
2293 * @return the average inference score value over all variables
2294 *
2295 * @pre This method can be called if SCIP is in one of the following stages:
2296 * - \ref SCIP_STAGE_SOLVING
2297 * - \ref SCIP_STAGE_SOLVED
2298 */
2300 SCIP* scip /**< SCIP data structure */
2301 )
2302{
2303 SCIP_Real conflictlengthdown;
2304 SCIP_Real conflictlengthup;
2305
2306 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetAvgConflictlengthScore", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
2307
2308 conflictlengthdown = SCIPhistoryGetAvgConflictlength(scip->stat->glbhistory, SCIP_BRANCHDIR_DOWNWARDS);
2309 conflictlengthup = SCIPhistoryGetAvgConflictlength(scip->stat->glbhistory, SCIP_BRANCHDIR_UPWARDS);
2310
2311 return SCIPbranchGetScore(scip->set, NULL, conflictlengthdown, conflictlengthup);
2312}
2313
2314/** gets the average conflictlength score value over all variables, only using the conflictlength information of the
2315 * current run
2316 *
2317 * @return the average conflictlength score value over all variables, only using the conflictlength information of the
2318 * current run
2319 *
2320 * @pre This method can be called if SCIP is in one of the following stages:
2321 * - \ref SCIP_STAGE_SOLVING
2322 * - \ref SCIP_STAGE_SOLVED
2323 */
2325 SCIP* scip /**< SCIP data structure */
2326 )
2327{
2328 SCIP_Real conflictlengthdown;
2329 SCIP_Real conflictlengthup;
2330
2331 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetAvgConflictlengthScoreCurrentRun", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
2332
2333 conflictlengthdown = SCIPhistoryGetAvgConflictlength(scip->stat->glbhistorycrun, SCIP_BRANCHDIR_DOWNWARDS);
2334 conflictlengthup = SCIPhistoryGetAvgConflictlength(scip->stat->glbhistorycrun, SCIP_BRANCHDIR_UPWARDS);
2335
2336 return SCIPbranchGetScore(scip->set, NULL, conflictlengthdown, conflictlengthup);
2337}
2338
2339/** returns the average number of inferences found after branching in given direction over all variables
2340 *
2341 * @return the average number of inferences found after branching in given direction over all variables
2342 *
2343 * @pre This method can be called if SCIP is in one of the following stages:
2344 * - \ref SCIP_STAGE_SOLVING
2345 * - \ref SCIP_STAGE_SOLVED
2346 */
2348 SCIP* scip, /**< SCIP data structure */
2349 SCIP_BRANCHDIR dir /**< branching direction (downwards, or upwards) */
2350 )
2351{
2353
2354 return SCIPhistoryGetAvgInferences(scip->stat->glbhistory, dir);
2355}
2356
2357/** returns the average number of inferences found after branching in given direction over all variables,
2358 * only using the inference information of the current run
2359 *
2360 * @return the average number of inferences found after branching in given direction over all variables,
2361 * only using the inference information of the current run
2362 *
2363 * @pre This method can be called if SCIP is in one of the following stages:
2364 * - \ref SCIP_STAGE_SOLVING
2365 * - \ref SCIP_STAGE_SOLVED
2366 */
2368 SCIP* scip, /**< SCIP data structure */
2369 SCIP_BRANCHDIR dir /**< branching direction (downwards, or upwards) */
2370 )
2371{
2372 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetAvgInferencesCurrentRun", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
2373
2374 return SCIPhistoryGetAvgInferences(scip->stat->glbhistorycrun, dir);
2375}
2376
2377/** gets the average inference score value over all variables
2378 *
2379 * @return the average inference score value over all variables
2380 *
2381 * @pre This method can be called if SCIP is in one of the following stages:
2382 * - \ref SCIP_STAGE_SOLVING
2383 * - \ref SCIP_STAGE_SOLVED
2384 */
2386 SCIP* scip /**< SCIP data structure */
2387 )
2388{
2389 SCIP_Real inferencesdown;
2390 SCIP_Real inferencesup;
2391
2392 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetAvgInferenceScore", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
2393
2394 inferencesdown = SCIPhistoryGetAvgInferences(scip->stat->glbhistory, SCIP_BRANCHDIR_DOWNWARDS);
2395 inferencesup = SCIPhistoryGetAvgInferences(scip->stat->glbhistory, SCIP_BRANCHDIR_UPWARDS);
2396
2397 return SCIPbranchGetScore(scip->set, NULL, inferencesdown, inferencesup);
2398}
2399
2400/** gets the average inference score value over all variables, only using the inference information of the
2401 * current run
2402 *
2403 * @return the average inference score value over all variables, only using the inference information of the
2404 * current run
2405 *
2406 * @pre This method can be called if SCIP is in one of the following stages:
2407 * - \ref SCIP_STAGE_SOLVING
2408 * - \ref SCIP_STAGE_SOLVED
2409 */
2411 SCIP* scip /**< SCIP data structure */
2412 )
2413{
2414 SCIP_Real inferencesdown;
2415 SCIP_Real inferencesup;
2416
2417 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetAvgInferenceScoreCurrentRun", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
2418
2419 inferencesdown = SCIPhistoryGetAvgInferences(scip->stat->glbhistorycrun, SCIP_BRANCHDIR_DOWNWARDS);
2420 inferencesup = SCIPhistoryGetAvgInferences(scip->stat->glbhistorycrun, SCIP_BRANCHDIR_UPWARDS);
2421
2422 return SCIPbranchGetScore(scip->set, NULL, inferencesdown, inferencesup);
2423}
2424
2425/** returns the average number of cutoffs found after branching in given direction over all variables
2426 *
2427 * @return the average number of cutoffs found after branching in given direction over all variables
2428 *
2429 * @pre This method can be called if SCIP is in one of the following stages:
2430 * - \ref SCIP_STAGE_SOLVING
2431 * - \ref SCIP_STAGE_SOLVED
2432 */
2434 SCIP* scip, /**< SCIP data structure */
2435 SCIP_BRANCHDIR dir /**< branching direction (downwards, or upwards) */
2436 )
2437{
2439
2440 return SCIPhistoryGetAvgCutoffs(scip->stat->glbhistory, dir);
2441}
2442
2443/** returns the average number of cutoffs found after branching in given direction over all variables,
2444 * only using the cutoff information of the current run
2445 *
2446 * @return the average number of cutoffs found after branching in given direction over all variables,
2447 * only using the cutoff information of the current run
2448 *
2449 * @pre This method can be called if SCIP is in one of the following stages:
2450 * - \ref SCIP_STAGE_SOLVING
2451 * - \ref SCIP_STAGE_SOLVED
2452 */
2454 SCIP* scip, /**< SCIP data structure */
2455 SCIP_BRANCHDIR dir /**< branching direction (downwards, or upwards) */
2456 )
2457{
2458 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetAvgCutoffsCurrentRun", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
2459
2460 return SCIPhistoryGetAvgCutoffs(scip->stat->glbhistorycrun, dir);
2461}
2462
2463/** gets the average cutoff score value over all variables
2464 *
2465 * @return the average cutoff score value over all variables
2466 *
2467 * @pre This method can be called if SCIP is in one of the following stages:
2468 * - \ref SCIP_STAGE_SOLVING
2469 * - \ref SCIP_STAGE_SOLVED
2470 */
2472 SCIP* scip /**< SCIP data structure */
2473 )
2474{
2475 SCIP_Real cutoffsdown;
2476 SCIP_Real cutoffsup;
2477
2479
2480 cutoffsdown = SCIPhistoryGetAvgCutoffs(scip->stat->glbhistory, SCIP_BRANCHDIR_DOWNWARDS);
2481 cutoffsup = SCIPhistoryGetAvgCutoffs(scip->stat->glbhistory, SCIP_BRANCHDIR_UPWARDS);
2482
2483 return SCIPbranchGetScore(scip->set, NULL, cutoffsdown, cutoffsup);
2484}
2485
2486/** gets the average cutoff score value over all variables, only using the cutoff score information of the current run
2487 *
2488 * @return the average cutoff score value over all variables, only using the cutoff score information of the current run
2489 *
2490 * @pre This method can be called if SCIP is in one of the following stages:
2491 * - \ref SCIP_STAGE_SOLVING
2492 * - \ref SCIP_STAGE_SOLVED
2493 */
2495 SCIP* scip /**< SCIP data structure */
2496 )
2497{
2498 SCIP_Real cutoffsdown;
2499 SCIP_Real cutoffsup;
2500
2501 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetAvgCutoffScoreCurrentRun", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
2502
2503 cutoffsdown = SCIPhistoryGetAvgCutoffs(scip->stat->glbhistorycrun, SCIP_BRANCHDIR_DOWNWARDS);
2504 cutoffsup = SCIPhistoryGetAvgCutoffs(scip->stat->glbhistorycrun, SCIP_BRANCHDIR_UPWARDS);
2505
2506 return SCIPbranchGetScore(scip->set, NULL, cutoffsdown, cutoffsup);
2507}
2508
2509/** increases the average normalized efficacy of a GMI cut over all variables
2510 *
2511 * @pre This method can be called if SCIP is in one of the following stages:
2512 * - \ref SCIP_STAGE_SOLVING
2513 * - \ref SCIP_STAGE_SOLVED
2514 */
2516 SCIP* scip, /**< SCIP data structure */
2517 SCIP_Real gmieff /**< average normalized GMI cut efficacy over all variables */
2518 )
2519{
2521
2522 SCIPhistoryIncGMIeffSum(scip->stat->glbhistory, gmieff);
2523}
2524
2525/** returns the average normalized efficacy of a GMI cut over all variables
2526 *
2527 * @return the average normalized efficacy of a GMI cut over all variables
2528 *
2529 * @pre This method can be called if SCIP is in one of the following stages:
2530 * - \ref SCIP_STAGE_SOLVING
2531 * - \ref SCIP_STAGE_SOLVED
2532 */
2534 SCIP* scip /**< SCIP data structure */
2535 )
2536{
2538
2539 return SCIPhistoryGetAvgGMIeff(scip->stat->glbhistory);
2540}
2541
2542/** computes a deterministic measure of time from statistics
2543 *
2544 * @return the deterministic time
2545 *
2546 * @pre This method can be called if SCIP is in one of the following stages:
2547 * - \ref SCIP_STAGE_PRESOLVING
2548 * - \ref SCIP_STAGE_PRESOLVED
2549 * - \ref SCIP_STAGE_SOLVING
2550 * - \ref SCIP_STAGE_SOLVED
2551 */
2553 SCIP* scip /**< SCIP data structure */
2554 )
2555{
2556/* TODO: SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetDeterministicTime", FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) ); */
2557 if(scip->stat == NULL)
2558 return 0.0;
2559
2560 return 1e-6 * scip->stat->nnz * (
2561 0.00328285264101 * scip->stat->nprimalresolvelpiterations +
2562 0.00531625104146 * scip->stat->ndualresolvelpiterations +
2563 0.000738719124051 * scip->stat->nprobboundchgs +
2564 0.0011123144764 * scip->stat->nisstoppedcalls );
2565}
2566
2567/** outputs status statistics
2568 *
2569 * @note If limits have been changed between the solution and the call to this function, the status is recomputed and
2570 * thus may correspond to the original status.
2571 *
2572 * @pre This method can be called if SCIP is in one of the following stages:
2573 * - \ref SCIP_STAGE_INIT
2574 * - \ref SCIP_STAGE_PROBLEM
2575 * - \ref SCIP_STAGE_TRANSFORMED
2576 * - \ref SCIP_STAGE_INITPRESOLVE
2577 * - \ref SCIP_STAGE_PRESOLVING
2578 * - \ref SCIP_STAGE_EXITPRESOLVE
2579 * - \ref SCIP_STAGE_PRESOLVED
2580 * - \ref SCIP_STAGE_SOLVING
2581 * - \ref SCIP_STAGE_SOLVED
2582 */
2584 SCIP* scip, /**< SCIP data structure */
2585 FILE* file /**< output file */
2586 )
2587{
2588 assert(scip != NULL);
2589 assert(scip->set != NULL);
2590
2591 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPprintStatusStatistics", TRUE, TRUE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
2592
2593 SCIPmessageFPrintInfo(scip->messagehdlr, file, "SCIP Status : ");
2595 SCIPmessageFPrintInfo(scip->messagehdlr, file, "\n");
2596}
2597
2598/** collects status statistics in a SCIP_DATATREE object
2599 *
2600 * This function sets:
2601 * - status: the current status of the solver
2602 * - info: info about the keys and values stored in the datatree
2603 *
2604 * @note If limits have been changed between the solution and the call to this function, the status is recomputed and
2605 * thus may correspond to the original status.
2606 *
2607 * @pre This method can be called if SCIP is in one of the following stages:
2608 * - \ref SCIP_STAGE_INIT
2609 * - \ref SCIP_STAGE_PROBLEM
2610 * - \ref SCIP_STAGE_TRANSFORMED
2611 * - \ref SCIP_STAGE_INITPRESOLVE
2612 * - \ref SCIP_STAGE_PRESOLVING
2613 * - \ref SCIP_STAGE_EXITPRESOLVE
2614 * - \ref SCIP_STAGE_PRESOLVED
2615 * - \ref SCIP_STAGE_SOLVING
2616 * - \ref SCIP_STAGE_SOLVED
2617 */
2619 SCIP* scip, /**< SCIP data structure */
2620 SCIP_DATATREE* datatree /**< data tree */
2621 )
2622{
2623 assert(scip != NULL);
2624
2625 SCIP_CALL( SCIPcheckStage(scip, "SCIPcollectStatusStatistics", TRUE, TRUE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
2626
2628
2629 return SCIP_OKAY;
2630}
2631
2632/** outputs statistics for original problem
2633 *
2634 * @pre This method can be called if SCIP is in one of the following stages:
2635 * - \ref SCIP_STAGE_PROBLEM
2636 * - \ref SCIP_STAGE_TRANSFORMED
2637 * - \ref SCIP_STAGE_INITPRESOLVE
2638 * - \ref SCIP_STAGE_PRESOLVING
2639 * - \ref SCIP_STAGE_EXITPRESOLVE
2640 * - \ref SCIP_STAGE_PRESOLVED
2641 * - \ref SCIP_STAGE_SOLVING
2642 * - \ref SCIP_STAGE_SOLVED
2643 */
2645 SCIP* scip, /**< SCIP data structure */
2646 FILE* file /**< output file */
2647 )
2648{
2649 assert(scip != NULL);
2650 assert(scip->set != NULL);
2651
2652 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPprintOrigProblemStatistics", FALSE, TRUE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
2653
2654 SCIPmessageFPrintInfo(scip->messagehdlr, file, "Original Problem :\n");
2655 SCIPprobPrintStatistics(scip->origprob, scip->set, scip->messagehdlr, file);
2656}
2657
2658/** collects statistics for original problem in a SCIP_DATATREE object
2659 *
2660 * @pre This method can be called if SCIP is in one of the following stages:
2661 * - \ref SCIP_STAGE_PROBLEM
2662 * - \ref SCIP_STAGE_TRANSFORMED
2663 * - \ref SCIP_STAGE_INITPRESOLVE
2664 * - \ref SCIP_STAGE_PRESOLVING
2665 * - \ref SCIP_STAGE_EXITPRESOLVE
2666 * - \ref SCIP_STAGE_PRESOLVED
2667 * - \ref SCIP_STAGE_SOLVING
2668 * - \ref SCIP_STAGE_SOLVED
2669 */
2671 SCIP* scip, /**< SCIP data structure */
2672 SCIP_DATATREE* datatree /**< data tree */
2673 )
2674{
2675 assert(scip != NULL);
2676 assert(datatree != NULL);
2677
2678 SCIP_CALL( SCIPcheckStage(scip, "SCIPcollectOrigProblemStatistics", FALSE, TRUE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
2679
2680 SCIP_CALL( SCIPprobCollectStatistics(scip->origprob, scip->mem->setmem, scip->set, datatree) );
2681
2682 return SCIP_OKAY;
2683}
2684
2685/** outputs statistics for transformed problem
2686 *
2687 * @pre This method can be called if SCIP is in one of the following stages:
2688 * - \ref SCIP_STAGE_PROBLEM
2689 * - \ref SCIP_STAGE_TRANSFORMED
2690 * - \ref SCIP_STAGE_INITPRESOLVE
2691 * - \ref SCIP_STAGE_PRESOLVING
2692 * - \ref SCIP_STAGE_EXITPRESOLVE
2693 * - \ref SCIP_STAGE_PRESOLVED
2694 * - \ref SCIP_STAGE_SOLVING
2695 * - \ref SCIP_STAGE_SOLVED
2696 */
2698 SCIP* scip, /**< SCIP data structure */
2699 FILE* file /**< output file */
2700 )
2701{
2702 assert(scip != NULL);
2703 assert(scip->set != NULL);
2704
2705 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPprintTransProblemStatistics", FALSE, TRUE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
2706
2707 SCIPmessageFPrintInfo(scip->messagehdlr, file, "Presolved Problem :\n");
2708 SCIPprobPrintStatistics(scip->transprob, scip->set, scip->messagehdlr, file);
2709 SCIPmessageFPrintInfo(scip->messagehdlr, file, " Nonzeros : %" SCIP_LONGINT_FORMAT " constraint, %" SCIP_LONGINT_FORMAT " clique table\n",
2710 scip->stat->nnz, SCIPcliquetableGetNEntries(scip->cliquetable));
2711}
2712
2713/** collects statistics for transformed problem in a SCIP_DATATREE object */
2715 SCIP* scip, /**< SCIP data structure */
2716 SCIP_DATATREE* datatree /**< data tree */
2717 )
2718{
2719 assert(scip != NULL);
2720 assert(datatree != NULL);
2721
2722 SCIP_CALL( SCIPcheckStage(scip, "SCIPcollectTransProblemStatistics", FALSE, TRUE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
2723
2724 /* Collect problem statistics */
2725 SCIP_CALL( SCIPprobCollectStatistics(scip->transprob, scip->mem->setmem, scip->set, datatree) );
2726
2727 /* Collect additional statistics */
2728 SCIP_CALL( SCIPinsertDatatreeLong(scip, datatree, "constraint_nonzeros", scip->stat->nnz) );
2729 SCIP_CALL( SCIPinsertDatatreeLong(scip, datatree, "clique_table_nonzeros", SCIPcliquetableGetNEntries(scip->cliquetable)) );
2730
2731 return SCIP_OKAY;
2732}
2733
2734/** outputs presolver statistics
2735 *
2736 * @pre This method can be called if SCIP is in one of the following stages:
2737 * - \ref SCIP_STAGE_TRANSFORMED
2738 * - \ref SCIP_STAGE_INITPRESOLVE
2739 * - \ref SCIP_STAGE_PRESOLVING
2740 * - \ref SCIP_STAGE_EXITPRESOLVE
2741 * - \ref SCIP_STAGE_PRESOLVED
2742 * - \ref SCIP_STAGE_SOLVING
2743 * - \ref SCIP_STAGE_SOLVED
2744 */
2746 SCIP* scip, /**< SCIP data structure */
2747 FILE* file /**< output file */
2748 )
2749{
2750 int i;
2751
2752 assert(scip != NULL);
2753 assert(scip->set != NULL);
2754
2755 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPprintPresolverStatistics", FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
2756
2757 SCIPmessageFPrintInfo(scip->messagehdlr, file, "Presolvers : ExecTime SetupTime Calls FixedVars AggrVars ChgTypes ChgBounds AddHoles DelCons AddCons ChgSides ChgCoefs\n");
2758
2759 /* sort presolvers w.r.t. their name */
2761
2762 /* presolver statistics */
2763 for( i = 0; i < scip->set->npresols; ++i )
2764 {
2765 SCIP_PRESOL* presol;
2766 presol = scip->set->presols[i];
2767 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %-17.17s:", SCIPpresolGetName(presol));
2768 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %10.2f %10.2f %6d %10d %10d %10d %10d %10d %10d %10d %10d %10d\n",
2769 SCIPpresolGetTime(presol),
2770 SCIPpresolGetSetupTime(presol),
2771 SCIPpresolGetNCalls(presol),
2773 SCIPpresolGetNAggrVars(presol),
2775 SCIPpresolGetNChgBds(presol),
2776 SCIPpresolGetNAddHoles(presol),
2777 SCIPpresolGetNDelConss(presol),
2778 SCIPpresolGetNAddConss(presol),
2779 SCIPpresolGetNChgSides(presol),
2780 SCIPpresolGetNChgCoefs(presol));
2781 }
2782
2783 /* sort propagators w.r.t. their name */
2785
2786 for( i = 0; i < scip->set->nprops; ++i )
2787 {
2788 SCIP_PROP* prop;
2789 prop = scip->set->props[i];
2790 if( SCIPpropDoesPresolve(prop) )
2791 {
2792 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %-17.17s:", SCIPpropGetName(prop));
2793 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %10.2f %10.2f %6d %10d %10d %10d %10d %10d %10d %10d %10d %10d\n",
2800 SCIPpropGetNChgBds(prop),
2805 SCIPpropGetNChgCoefs(prop));
2806 }
2807 }
2808
2809 /* constraint handler presolving methods statistics */
2810 for( i = 0; i < scip->set->nconshdlrs; ++i )
2811 {
2812 SCIP_CONSHDLR* conshdlr;
2813 int maxnactiveconss;
2814
2815 conshdlr = scip->set->conshdlrs[i];
2816 maxnactiveconss = SCIPconshdlrGetMaxNActiveConss(conshdlr);
2817 if( SCIPconshdlrDoesPresolve(conshdlr)
2818 && (maxnactiveconss > 0 || !SCIPconshdlrNeedsCons(conshdlr)
2819 || SCIPconshdlrGetNFixedVars(conshdlr) > 0
2820 || SCIPconshdlrGetNAggrVars(conshdlr) > 0
2821 || SCIPconshdlrGetNChgVarTypes(conshdlr) > 0
2822 || SCIPconshdlrGetNChgBds(conshdlr) > 0
2823 || SCIPconshdlrGetNAddHoles(conshdlr) > 0
2824 || SCIPconshdlrGetNDelConss(conshdlr) > 0
2825 || SCIPconshdlrGetNAddConss(conshdlr) > 0
2826 || SCIPconshdlrGetNChgSides(conshdlr) > 0
2827 || SCIPconshdlrGetNChgCoefs(conshdlr) > 0
2828 || SCIPconshdlrGetNUpgdConss(conshdlr) > 0) )
2829 {
2830 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %-17.17s:", SCIPconshdlrGetName(conshdlr));
2831 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %10.2f %10.2f %6d %10d %10d %10d %10d %10d %10d %10d %10d %10d\n",
2832 SCIPconshdlrGetPresolTime(conshdlr),
2833 SCIPconshdlrGetSetupTime(conshdlr),
2835 SCIPconshdlrGetNFixedVars(conshdlr),
2836 SCIPconshdlrGetNAggrVars(conshdlr),
2838 SCIPconshdlrGetNChgBds(conshdlr),
2839 SCIPconshdlrGetNAddHoles(conshdlr),
2840 SCIPconshdlrGetNDelConss(conshdlr),
2841 SCIPconshdlrGetNAddConss(conshdlr),
2842 SCIPconshdlrGetNChgSides(conshdlr),
2843 SCIPconshdlrGetNChgCoefs(conshdlr));
2844 }
2845 }
2846
2847 /* root node bound changes */
2848 SCIPmessageFPrintInfo(scip->messagehdlr, file, " root node : - - - %10d - - %10d - - - - -\n",
2849 scip->stat->nrootintfixings, scip->stat->nrootboundchgs);
2850}
2851
2852/** collects presolver statistics in a SCIP_DATATREE object */
2854 SCIP* scip, /**< SCIP data structure */
2855 SCIP_DATATREE* datatree /**< data tree */
2856 )
2857{
2858 SCIP_DATATREE* plugins = NULL;
2859 SCIP_DATATREE* rootdata;
2860 int i;
2861
2862 assert(scip != NULL);
2863 assert(datatree != NULL);
2864
2865 SCIP_CALL( SCIPcheckStage(scip, "SCIPcollectPresolverStatistics", FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
2866
2867 /* Sort presolvers by name */
2869
2870 if( scip->set->npresols > 0 || scip->set->nprops > 0 || scip->set->nconshdlrs > 0 )
2871 {
2872 SCIP_CALL( SCIPcreateDatatreeInTree( scip, datatree, &plugins, "plugins", scip->set->npresols + scip->set->nprops + scip->set->nconshdlrs) );
2873 }
2874
2875 /* Collect presolver statistics */
2876 for( i = 0; i < scip->set->npresols; ++i )
2877 {
2878 SCIP_PRESOL* presol = scip->set->presols[i];
2879 SCIP_DATATREE* presoldata;
2880
2881 SCIP_CALL( SCIPcreateDatatreeInTree(scip, plugins, &presoldata, SCIPpresolGetName(presol), 13) );
2882
2883 SCIP_CALL( SCIPinsertDatatreeString(scip, presoldata, "description", SCIPpresolGetDesc(presol)) );
2884 SCIP_CALL( SCIPinsertDatatreeReal(scip, presoldata, "exec_time", SCIPpresolGetTime(presol)) );
2885 SCIP_CALL( SCIPinsertDatatreeReal(scip, presoldata, "setup_time", SCIPpresolGetSetupTime(presol)) );
2886 SCIP_CALL( SCIPinsertDatatreeInt(scip, presoldata, "calls", SCIPpresolGetNCalls(presol)) );
2887 SCIP_CALL( SCIPinsertDatatreeInt(scip, presoldata, "fixed_vars", SCIPpresolGetNFixedVars(presol)) );
2888 SCIP_CALL( SCIPinsertDatatreeInt(scip, presoldata, "aggregated_vars", SCIPpresolGetNAggrVars(presol)) );
2889 SCIP_CALL( SCIPinsertDatatreeInt(scip, presoldata, "changed_var_types", SCIPpresolGetNChgVarTypes(presol)) );
2890 SCIP_CALL( SCIPinsertDatatreeInt(scip, presoldata, "changed_bounds", SCIPpresolGetNChgBds(presol)) );
2891 SCIP_CALL( SCIPinsertDatatreeInt(scip, presoldata, "added_holes", SCIPpresolGetNAddHoles(presol)) );
2892 SCIP_CALL( SCIPinsertDatatreeInt(scip, presoldata, "deleted_constraints", SCIPpresolGetNDelConss(presol)) );
2893 SCIP_CALL( SCIPinsertDatatreeInt(scip, presoldata, "added_constraints", SCIPpresolGetNAddConss(presol)) );
2894 SCIP_CALL( SCIPinsertDatatreeInt(scip, presoldata, "changed_sides", SCIPpresolGetNChgSides(presol)) );
2895 SCIP_CALL( SCIPinsertDatatreeInt(scip, presoldata, "changed_coefficients", SCIPpresolGetNChgCoefs(presol)) );
2896 }
2897
2898 /* Sort propagators by name */
2900
2901 /* Collect propagator statistics */
2902 for( i = 0; i < scip->set->nprops; ++i )
2903 {
2904 SCIP_PROP* prop = scip->set->props[i];
2905 SCIP_DATATREE* propdata;
2906
2907 SCIP_CALL( SCIPcreateDatatreeInTree(scip, plugins, &propdata, SCIPpropGetName(prop), 15) );
2908
2909 SCIP_CALL( SCIPinsertDatatreeString(scip, propdata, "description", SCIPpropGetDesc(prop)) );
2910 SCIP_CALL( SCIPinsertDatatreeReal(scip, propdata, "exec_time", SCIPpropGetTime(prop)) );
2911 SCIP_CALL( SCIPinsertDatatreeReal(scip, propdata, "setup_time", SCIPpropGetSetupTime(prop)) );
2912 SCIP_CALL( SCIPinsertDatatreeLong(scip, propdata, "calls", SCIPpropGetNCalls(prop)) );
2913 SCIP_CALL( SCIPinsertDatatreeLong(scip, propdata, "cutoffs", SCIPpropGetNCutoffs(prop)) );
2914 SCIP_CALL( SCIPinsertDatatreeLong(scip, propdata, "domain_reductions", SCIPpropGetNDomredsFound(prop)) );
2915 SCIP_CALL( SCIPinsertDatatreeInt(scip, propdata, "fixed_vars", SCIPpropGetNFixedVars(prop)) );
2916 SCIP_CALL( SCIPinsertDatatreeInt(scip, propdata, "aggregated_vars", SCIPpropGetNAggrVars(prop)) );
2917 SCIP_CALL( SCIPinsertDatatreeInt(scip, propdata, "changed_var_types", SCIPpropGetNChgVarTypes(prop)) );
2918 SCIP_CALL( SCIPinsertDatatreeInt(scip, propdata, "changed_bounds", SCIPpropGetNChgBds(prop)) );
2919 SCIP_CALL( SCIPinsertDatatreeInt(scip, propdata, "added_holes", SCIPpropGetNAddHoles(prop)) );
2920 SCIP_CALL( SCIPinsertDatatreeInt(scip, propdata, "deleted_constraints", SCIPpropGetNDelConss(prop)) );
2921 SCIP_CALL( SCIPinsertDatatreeInt(scip, propdata, "added_constraints", SCIPpropGetNAddConss(prop)) );
2922 SCIP_CALL( SCIPinsertDatatreeInt(scip, propdata, "changed_sides", SCIPpropGetNChgSides(prop)) );
2923 SCIP_CALL( SCIPinsertDatatreeInt(scip, propdata, "changed_coefficients", SCIPpropGetNChgCoefs(prop)) );
2924 }
2925
2926 /* Collect constraint handler presolving methods statistics */
2927 for( i = 0; i < scip->set->nconshdlrs; ++i )
2928 {
2929 SCIP_CONSHDLR* conshdlr = scip->set->conshdlrs[i];
2930 if( SCIPconshdlrDoesPresolve(conshdlr) )
2931 {
2932 SCIP_DATATREE* conshdlrdata;
2933
2934 SCIP_CALL( SCIPcreateDatatreeInTree( scip, plugins, &conshdlrdata, SCIPconshdlrGetName(conshdlr), 13) );
2935
2936 SCIP_CALL( SCIPinsertDatatreeString(scip, conshdlrdata, "description", SCIPconshdlrGetDesc(conshdlr)) );
2937 SCIP_CALL( SCIPinsertDatatreeReal(scip, conshdlrdata, "presol_time", SCIPconshdlrGetPresolTime(conshdlr)) );
2938 SCIP_CALL( SCIPinsertDatatreeReal(scip, conshdlrdata, "setup_time", SCIPconshdlrGetSetupTime(conshdlr)) );
2939 SCIP_CALL( SCIPinsertDatatreeInt(scip, conshdlrdata, "presol_calls", SCIPconshdlrGetNPresolCalls(conshdlr)) );
2940 SCIP_CALL( SCIPinsertDatatreeInt(scip, conshdlrdata, "fixed_vars", SCIPconshdlrGetNFixedVars(conshdlr)) );
2941 SCIP_CALL( SCIPinsertDatatreeInt(scip, conshdlrdata, "aggregated_vars", SCIPconshdlrGetNAggrVars(conshdlr)) );
2942 SCIP_CALL( SCIPinsertDatatreeInt(scip, conshdlrdata, "changed_var_types", SCIPconshdlrGetNChgVarTypes(conshdlr)) );
2943 SCIP_CALL( SCIPinsertDatatreeInt(scip, conshdlrdata, "changed_bounds", SCIPconshdlrGetNChgBds(conshdlr)) );
2944 SCIP_CALL( SCIPinsertDatatreeInt(scip, conshdlrdata, "added_holes", SCIPconshdlrGetNAddHoles(conshdlr)) );
2945 SCIP_CALL( SCIPinsertDatatreeInt(scip, conshdlrdata, "deleted_constraints", SCIPconshdlrGetNDelConss(conshdlr)) );
2946 SCIP_CALL( SCIPinsertDatatreeInt(scip, conshdlrdata, "added_constraints", SCIPconshdlrGetNAddConss(conshdlr)) );
2947 SCIP_CALL( SCIPinsertDatatreeInt(scip, conshdlrdata, "changed_sides", SCIPconshdlrGetNChgSides(conshdlr)) );
2948 SCIP_CALL( SCIPinsertDatatreeInt(scip, conshdlrdata, "changed_coefficients", SCIPconshdlrGetNChgCoefs(conshdlr)) );
2949 }
2950 }
2951
2952 /* Collect root node fixings statistics */
2953 SCIP_CALL( SCIPcreateDatatreeInTree(scip, datatree, &rootdata, "root", 2) );
2954
2955 SCIP_CALL( SCIPinsertDatatreeInt(scip, rootdata, "int_fixings", scip->stat->nrootintfixings ) );
2956 SCIP_CALL( SCIPinsertDatatreeInt(scip, rootdata, "bound_changes", scip->stat->nrootboundchgs ) );
2957
2958 return SCIP_OKAY;
2959}
2960
2961/** outputs constraint statistics
2962 *
2963 * @pre This method can be called if SCIP is in one of the following stages:
2964 * - \ref SCIP_STAGE_TRANSFORMED
2965 * - \ref SCIP_STAGE_INITPRESOLVE
2966 * - \ref SCIP_STAGE_PRESOLVING
2967 * - \ref SCIP_STAGE_EXITPRESOLVE
2968 * - \ref SCIP_STAGE_PRESOLVED
2969 * - \ref SCIP_STAGE_SOLVING
2970 * - \ref SCIP_STAGE_SOLVED
2971 */
2973 SCIP* scip, /**< SCIP data structure */
2974 FILE* file /**< output file */
2975 )
2976{
2977 int i;
2978
2979 assert(scip != NULL);
2980 assert(scip->set != NULL);
2981
2982 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPprintConstraintStatistics", FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
2983
2984 /* Add maximal number of constraints of the same type? So far this information is not added because of lack of space. */
2985 SCIPmessageFPrintInfo(scip->messagehdlr, file, "Constraints : Number MaxNumber #Separate #Propagate #EnfoLP #EnfoRelax #EnfoPS #Check #ResProp Cutoffs DomReds Cuts Applied Conss Children\n");
2986
2987 for( i = 0; i < scip->set->nconshdlrs; ++i )
2988 {
2989 SCIP_CONSHDLR* conshdlr;
2990 int startnactiveconss;
2991 int maxnactiveconss;
2992
2993 conshdlr = scip->set->conshdlrs[i];
2994 startnactiveconss = SCIPconshdlrGetStartNActiveConss(conshdlr);
2995 maxnactiveconss = SCIPconshdlrGetMaxNActiveConss(conshdlr);
2996 if( maxnactiveconss > 0 || !SCIPconshdlrNeedsCons(conshdlr) )
2997 {
2998 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %-17.17s:", SCIPconshdlrGetName(conshdlr));
3000 startnactiveconss,
3001 maxnactiveconss > startnactiveconss ? '+' : ' ',
3002 maxnactiveconss,
3003 SCIPconshdlrGetNSepaCalls(conshdlr),
3004 SCIPconshdlrGetNPropCalls(conshdlr),
3010 SCIPconshdlrGetNCutoffs(conshdlr),
3012 SCIPconshdlrGetNCutsFound(conshdlr),
3015 SCIPconshdlrGetNChildren(conshdlr));
3016 }
3017 }
3018}
3019
3020/** collects constraint statistics in a SCIP_DATATREE object */
3022 SCIP* scip, /**< SCIP data structure */
3023 SCIP_DATATREE* datatree /**< data tree */
3024 )
3025{
3026 SCIP_DATATREE* constraints;
3027 int i;
3028
3029 assert(scip != NULL);
3030 assert(datatree != NULL);
3031
3032 SCIP_CALL( SCIPcheckStage(scip, "SCIPcollectConstraintStatistics", FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
3033
3034 if( scip->set->nconshdlrs == 0 )
3035 return SCIP_OKAY;
3036
3037 /* Create a subtree for constraints */
3038 SCIP_CALL( SCIPcreateDatatreeInTree(scip, datatree, &constraints, "plugins", scip->set->nconshdlrs) );
3039
3040 for( i = 0; i < scip->set->nconshdlrs; ++i )
3041 {
3042 SCIP_CONSHDLR* conshdlr = scip->set->conshdlrs[i];
3043 SCIP_DATATREE* conshdlrdata;
3044
3045 SCIP_CALL( SCIPcreateDatatreeInTree(scip, constraints, &conshdlrdata, SCIPconshdlrGetName(conshdlr), 16) );
3046
3047 SCIP_CALL( SCIPinsertDatatreeString(scip, conshdlrdata, "description", SCIPconshdlrGetDesc(conshdlr)) );
3048 SCIP_CALL( SCIPinsertDatatreeInt(scip, conshdlrdata, "start_active_constraints", SCIPconshdlrGetStartNActiveConss(conshdlr)) );
3049 SCIP_CALL( SCIPinsertDatatreeInt(scip, conshdlrdata, "max_active_constraints", SCIPconshdlrGetMaxNActiveConss(conshdlr)) );
3050 SCIP_CALL( SCIPinsertDatatreeLong(scip, conshdlrdata, "separation_calls", SCIPconshdlrGetNSepaCalls(conshdlr)) );
3051 SCIP_CALL( SCIPinsertDatatreeLong(scip, conshdlrdata, "propagation_calls", SCIPconshdlrGetNPropCalls(conshdlr)) );
3052 SCIP_CALL( SCIPinsertDatatreeLong(scip, conshdlrdata, "enforcement_lp_calls", SCIPconshdlrGetNEnfoLPCalls(conshdlr)) );
3053 SCIP_CALL( SCIPinsertDatatreeLong(scip, conshdlrdata, "enforcement_relax_calls", SCIPconshdlrGetNEnfoRelaxCalls(conshdlr)) );
3054 SCIP_CALL( SCIPinsertDatatreeLong(scip, conshdlrdata, "enforcement_ps_calls", SCIPconshdlrGetNEnfoPSCalls(conshdlr)) );
3055 SCIP_CALL( SCIPinsertDatatreeLong(scip, conshdlrdata, "check_calls", SCIPconshdlrGetNCheckCalls(conshdlr)) );
3056 SCIP_CALL( SCIPinsertDatatreeLong(scip, conshdlrdata, "response_propagation_calls", SCIPconshdlrGetNRespropCalls(conshdlr)) );
3057 SCIP_CALL( SCIPinsertDatatreeLong(scip, conshdlrdata, "cutoffs", SCIPconshdlrGetNCutoffs(conshdlr)) );
3058 SCIP_CALL( SCIPinsertDatatreeLong(scip, conshdlrdata, "domain_reductions", SCIPconshdlrGetNDomredsFound(conshdlr)) );
3059 SCIP_CALL( SCIPinsertDatatreeLong(scip, conshdlrdata, "cuts_found", SCIPconshdlrGetNCutsFound(conshdlr)) );
3060 SCIP_CALL( SCIPinsertDatatreeLong(scip, conshdlrdata, "cuts_applied", SCIPconshdlrGetNCutsApplied(conshdlr)) );
3061 SCIP_CALL( SCIPinsertDatatreeLong(scip, conshdlrdata, "constraints_found", SCIPconshdlrGetNConssFound(conshdlr)) );
3062 SCIP_CALL( SCIPinsertDatatreeLong(scip, conshdlrdata, "children_created", SCIPconshdlrGetNChildren(conshdlr)) );
3063 }
3064
3065 return SCIP_OKAY;
3066}
3067
3068/** outputs constraint timing statistics
3069 *
3070 * @pre This method can be called if SCIP is in one of the following stages:
3071 * - \ref SCIP_STAGE_TRANSFORMED
3072 * - \ref SCIP_STAGE_INITPRESOLVE
3073 * - \ref SCIP_STAGE_PRESOLVING
3074 * - \ref SCIP_STAGE_EXITPRESOLVE
3075 * - \ref SCIP_STAGE_PRESOLVED
3076 * - \ref SCIP_STAGE_SOLVING
3077 * - \ref SCIP_STAGE_SOLVED
3078 */
3080 SCIP* scip, /**< SCIP data structure */
3081 FILE* file /**< output file */
3082 )
3083{
3084 int i;
3085
3086 assert(scip != NULL);
3087 assert(scip->set != NULL);
3088
3089 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPprintConstraintTimingStatistics", FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
3090
3091 SCIPmessageFPrintInfo(scip->messagehdlr, file, "Constraint Timings : TotalTime SetupTime Separate Propagate EnfoLP EnfoPS EnfoRelax Check ResProp SB-Prop\n");
3092
3093 for( i = 0; i < scip->set->nconshdlrs; ++i )
3094 {
3095 SCIP_CONSHDLR* conshdlr;
3096 int maxnactiveconss;
3097
3098 conshdlr = scip->set->conshdlrs[i];
3099 maxnactiveconss = SCIPconshdlrGetMaxNActiveConss(conshdlr);
3100 if( maxnactiveconss > 0 || !SCIPconshdlrNeedsCons(conshdlr) )
3101 {
3102 SCIP_Real totaltime;
3103
3104 totaltime = SCIPconshdlrGetSepaTime(conshdlr) + SCIPconshdlrGetPropTime(conshdlr)
3106 + SCIPconshdlrGetEnfoLPTime(conshdlr)
3107 + SCIPconshdlrGetEnfoPSTime(conshdlr)
3109 + SCIPconshdlrGetCheckTime(conshdlr)
3110 + SCIPconshdlrGetRespropTime(conshdlr)
3111 + SCIPconshdlrGetSetupTime(conshdlr);
3112
3113 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %-17.17s:", SCIPconshdlrGetName(conshdlr));
3114 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %10.2f %10.2f %10.2f %10.2f %10.2f %10.2f %10.2f %10.2f %10.2f %10.2f\n",
3115 totaltime,
3116 SCIPconshdlrGetSetupTime(conshdlr),
3117 SCIPconshdlrGetSepaTime(conshdlr),
3118 SCIPconshdlrGetPropTime(conshdlr),
3119 SCIPconshdlrGetEnfoLPTime(conshdlr),
3120 SCIPconshdlrGetEnfoPSTime(conshdlr),
3122 SCIPconshdlrGetCheckTime(conshdlr),
3125 }
3126 }
3127}
3128
3129/** collects constraint timing statistics in a SCIP_DATATREE object */
3131 SCIP* scip, /**< SCIP data structure */
3132 SCIP_DATATREE* datatree /**< data tree */
3133 )
3134{
3135 SCIP_DATATREE* constrainttimings;
3136 int i;
3137
3138 assert(scip != NULL);
3139 assert(datatree != NULL);
3140
3141 SCIP_CALL( SCIPcheckStage(scip, "SCIPcollectConstraintTimingStatistics", FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
3142
3143 if( scip->set->nconshdlrs == 0 )
3144 return SCIP_OKAY;
3145
3146 /* Create a subtree for constraint timings */
3147 SCIP_CALL( SCIPcreateDatatreeInTree(scip, datatree, &constrainttimings, "plugins", scip->set->nconshdlrs) );
3148
3149 for( i = 0; i < scip->set->nconshdlrs; ++i )
3150 {
3151 SCIP_CONSHDLR* conshdlr = scip->set->conshdlrs[i];
3152 SCIP_DATATREE* conshdlrtimingdata;
3153 SCIP_Real totaltime;
3154
3155 SCIP_CALL( SCIPcreateDatatreeInTree( scip, constrainttimings, &conshdlrtimingdata, SCIPconshdlrGetName(conshdlr), 10) );
3156
3157 totaltime = SCIPconshdlrGetSepaTime(conshdlr) + SCIPconshdlrGetPropTime(conshdlr)
3161 + SCIPconshdlrGetSetupTime(conshdlr);
3162
3163 SCIP_CALL( SCIPinsertDatatreeReal(scip, conshdlrtimingdata, "total_time", totaltime) );
3164 SCIP_CALL( SCIPinsertDatatreeReal(scip, conshdlrtimingdata, "setup_time", SCIPconshdlrGetSetupTime(conshdlr)) );
3165 SCIP_CALL( SCIPinsertDatatreeReal(scip, conshdlrtimingdata, "separation_time", SCIPconshdlrGetSepaTime(conshdlr)) );
3166 SCIP_CALL( SCIPinsertDatatreeReal(scip, conshdlrtimingdata, "propagation_time", SCIPconshdlrGetPropTime(conshdlr)) );
3167 SCIP_CALL( SCIPinsertDatatreeReal(scip, conshdlrtimingdata, "enforcement_lp_time", SCIPconshdlrGetEnfoLPTime(conshdlr)) );
3168 SCIP_CALL( SCIPinsertDatatreeReal(scip, conshdlrtimingdata, "enforcement_ps_time", SCIPconshdlrGetEnfoPSTime(conshdlr)) );
3169 SCIP_CALL( SCIPinsertDatatreeReal(scip, conshdlrtimingdata, "enforcement_relax_time", SCIPconshdlrGetEnfoRelaxTime(conshdlr)) );
3170 SCIP_CALL( SCIPinsertDatatreeReal(scip, conshdlrtimingdata, "check_time", SCIPconshdlrGetCheckTime(conshdlr)) );
3171 SCIP_CALL( SCIPinsertDatatreeReal(scip, conshdlrtimingdata, "response_propagation_time", SCIPconshdlrGetRespropTime(conshdlr)) );
3172 SCIP_CALL( SCIPinsertDatatreeReal(scip, conshdlrtimingdata, "strong_branch_propagation_time", SCIPconshdlrGetStrongBranchPropTime(conshdlr)) );
3173 }
3174
3175 return SCIP_OKAY;
3176}
3177
3178/** outputs propagator statistics
3179 *
3180 * @pre This method can be called if SCIP is in one of the following stages:
3181 * - \ref SCIP_STAGE_TRANSFORMED
3182 * - \ref SCIP_STAGE_INITPRESOLVE
3183 * - \ref SCIP_STAGE_PRESOLVING
3184 * - \ref SCIP_STAGE_EXITPRESOLVE
3185 * - \ref SCIP_STAGE_PRESOLVED
3186 * - \ref SCIP_STAGE_SOLVING
3187 * - \ref SCIP_STAGE_SOLVED
3188 */
3190 SCIP* scip, /**< SCIP data structure */
3191 FILE* file /**< output file */
3192 )
3193{
3194 int i;
3195
3196 assert(scip != NULL);
3197 assert(scip->set != NULL);
3198
3199 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPprintPropagatorStatistics", FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
3200
3201 SCIPmessageFPrintInfo(scip->messagehdlr, file, "Propagators : #Propagate #ResProp Cutoffs DomReds\n");
3202
3203 /* sort propagaters w.r.t. their name */
3205
3206 for( i = 0; i < scip->set->nprops; ++i )
3207 {
3208 SCIP_PROP* prop;
3209 prop = scip->set->props[i];
3210
3211 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %-17.17s: %10" SCIP_LONGINT_FORMAT " %10" SCIP_LONGINT_FORMAT " %10" SCIP_LONGINT_FORMAT " %10" SCIP_LONGINT_FORMAT "\n",
3212 SCIPpropGetName(prop),
3213 SCIPpropGetNCalls(prop),
3215 SCIPpropGetNCutoffs(prop),
3217 }
3218
3219 SCIPmessageFPrintInfo(scip->messagehdlr, file, "Propagator Timings : TotalTime SetupTime Presolve Propagate ResProp SB-Prop\n");
3220
3221 for( i = 0; i < scip->set->nprops; ++i )
3222 {
3223 SCIP_PROP* prop;
3224 SCIP_Real totaltime;
3225
3226 prop = scip->set->props[i];
3227 totaltime = SCIPpropGetPresolTime(prop) + SCIPpropGetTime(prop) + SCIPpropGetRespropTime(prop)
3229
3230 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %-17.17s:", SCIPpropGetName(prop));
3231 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %10.2f %10.2f %10.2f %10.2f %10.2f %10.2f\n",
3232 totaltime,
3235 SCIPpropGetTime(prop),
3238 }
3239}
3240
3241/** collects propagator statistics in a SCIP_DATATREE object */
3243 SCIP* scip, /**< SCIP data structure */
3244 SCIP_DATATREE* datatree /**< data tree */
3245 )
3246{
3247 SCIP_DATATREE* propagators;
3248 int i;
3249
3250 assert(scip != NULL);
3251 assert(datatree != NULL);
3252
3253 SCIP_CALL( SCIPcheckStage(scip, "SCIPcollectPropagatorStatistics", FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
3254
3255 if( scip->set->nprops == 0 )
3256 return SCIP_OKAY;
3257
3258 /* Create a subtree for propagators */
3259 SCIP_CALL( SCIPcreateDatatreeInTree(scip, datatree, &propagators, "plugins", scip->set->nprops) );
3260
3261 /* Collect propagator statistics */
3263
3264 for( i = 0; i < scip->set->nprops; ++i )
3265 {
3266 SCIP_PROP* prop = scip->set->props[i];
3267 SCIP_DATATREE* propdata;
3268 SCIP_Real totaltime;
3269
3270 SCIP_CALL( SCIPcreateDatatreeInTree( scip, propagators, &propdata, SCIPpropGetName(prop), 11) );
3271
3272 SCIP_CALL( SCIPinsertDatatreeString(scip, propdata, "description", SCIPpropGetDesc(prop)) );
3273 SCIP_CALL( SCIPinsertDatatreeLong(scip, propdata, "calls", SCIPpropGetNCalls(prop)) );
3274 SCIP_CALL( SCIPinsertDatatreeLong(scip, propdata, "resprop_calls", SCIPpropGetNRespropCalls(prop)) );
3275 SCIP_CALL( SCIPinsertDatatreeLong(scip, propdata, "cutoffs", SCIPpropGetNCutoffs(prop)) );
3276 SCIP_CALL( SCIPinsertDatatreeLong(scip, propdata, "domreds_found", SCIPpropGetNDomredsFound(prop)) );
3277
3278 totaltime = SCIPpropGetPresolTime(prop) + SCIPpropGetTime(prop) + SCIPpropGetRespropTime(prop)
3280
3281 SCIP_CALL( SCIPinsertDatatreeReal(scip, propdata, "total_time", totaltime) );
3282 SCIP_CALL( SCIPinsertDatatreeReal(scip, propdata, "setup_time", SCIPpropGetSetupTime(prop)) );
3283 SCIP_CALL( SCIPinsertDatatreeReal(scip, propdata, "presolve_time", SCIPpropGetPresolTime(prop)) );
3284 SCIP_CALL( SCIPinsertDatatreeReal(scip, propdata, "propagation_time", SCIPpropGetTime(prop)) );
3285 SCIP_CALL( SCIPinsertDatatreeReal(scip, propdata, "response_propagation_time", SCIPpropGetRespropTime(prop)) );
3286 SCIP_CALL( SCIPinsertDatatreeReal(scip, propdata, "strong_branch_propagation_time", SCIPpropGetStrongBranchPropTime(prop)) );
3287 }
3288
3289 return SCIP_OKAY;
3290}
3291
3292/** outputs conflict statistics
3293 *
3294 * @pre This method can be called if SCIP is in one of the following stages:
3295 * - \ref SCIP_STAGE_TRANSFORMED
3296 * - \ref SCIP_STAGE_INITPRESOLVE
3297 * - \ref SCIP_STAGE_PRESOLVING
3298 * - \ref SCIP_STAGE_EXITPRESOLVE
3299 * - \ref SCIP_STAGE_PRESOLVED
3300 * - \ref SCIP_STAGE_SOLVING
3301 * - \ref SCIP_STAGE_SOLVED
3302 */
3304 SCIP* scip, /**< SCIP data structure */
3305 FILE* file /**< output file */
3306 )
3307{
3308 char initstoresize[SCIP_MAXSTRLEN];
3309 char maxstoresize[SCIP_MAXSTRLEN];
3310
3311 assert(scip != NULL);
3312 assert(scip->set != NULL);
3313
3314 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPprintConflictStatistics", FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
3315
3316 if( scip->set->conf_maxstoresize == 0 )
3317 {
3318 (void)SCIPsnprintf(initstoresize, SCIP_MAXSTRLEN, "inf");
3319 (void)SCIPsnprintf(maxstoresize, SCIP_MAXSTRLEN, "inf");
3320 }
3321 else
3322 {
3323 int initsize = SCIPconflictstoreGetInitPoolSize(scip->conflictstore);
3324 int maxsize = SCIPconflictstoreGetMaxPoolSize(scip->conflictstore);
3325
3326 if( maxsize == -1 )
3327 {
3328 (void)SCIPsnprintf(initstoresize, SCIP_MAXSTRLEN, "--");
3329 (void)SCIPsnprintf(maxstoresize, SCIP_MAXSTRLEN, "--");
3330 }
3331 else
3332 {
3333 assert(initsize >= 0);
3334 assert(maxsize >= 0);
3335
3336 (void)SCIPsnprintf(initstoresize, SCIP_MAXSTRLEN, "%d", initsize);
3337 (void)SCIPsnprintf(maxstoresize, SCIP_MAXSTRLEN, "%d", maxsize);
3338 }
3339 }
3340 SCIPmessageFPrintInfo(scip->messagehdlr, file, "Conflict Analysis : Time Calls Success DomReds Conflicts Literals Reconvs ReconvLits Dualrays Nonzeros LP Iters (pool size: [%s,%s])\n", initstoresize, maxstoresize);
3341 SCIPmessageFPrintInfo(scip->messagehdlr, file, " propagation : %10.2f %10" SCIP_LONGINT_FORMAT " %10" SCIP_LONGINT_FORMAT " - %10" SCIP_LONGINT_FORMAT " %10.1f %10" SCIP_LONGINT_FORMAT " %10.1f - - -\n",
3342 SCIPconflictGetPropTime(scip->conflict),
3353 SCIPmessageFPrintInfo(scip->messagehdlr, file, " infeasible LP : %10.2f %10" SCIP_LONGINT_FORMAT " %10" SCIP_LONGINT_FORMAT " - %10" SCIP_LONGINT_FORMAT " %10.1f %10" SCIP_LONGINT_FORMAT " %10.1f %10" SCIP_LONGINT_FORMAT " %10.1f %10" SCIP_LONGINT_FORMAT "\n",
3370 SCIPmessageFPrintInfo(scip->messagehdlr, file, " bound exceed. LP : %10.2f %10" SCIP_LONGINT_FORMAT " %10" SCIP_LONGINT_FORMAT " - %10" SCIP_LONGINT_FORMAT " %10.1f %10" SCIP_LONGINT_FORMAT " %10.1f %10" SCIP_LONGINT_FORMAT " %10.1f %10" SCIP_LONGINT_FORMAT "\n",
3387 SCIPmessageFPrintInfo(scip->messagehdlr, file, " strong branching : %10.2f %10" SCIP_LONGINT_FORMAT " %10" SCIP_LONGINT_FORMAT " - %10" SCIP_LONGINT_FORMAT " %10.1f %10" SCIP_LONGINT_FORMAT " %10.1f - - %10" SCIP_LONGINT_FORMAT "\n",
3400 SCIPmessageFPrintInfo(scip->messagehdlr, file, " pseudo solution : %10.2f %10" SCIP_LONGINT_FORMAT " %10" SCIP_LONGINT_FORMAT " - %10" SCIP_LONGINT_FORMAT " %10.1f %10" SCIP_LONGINT_FORMAT " %10.1f - - -\n",
3412 SCIPmessageFPrintInfo(scip->messagehdlr, file, " applied globally : %10.2f - - %10" SCIP_LONGINT_FORMAT " %10" SCIP_LONGINT_FORMAT " %10.1f - - %10" SCIP_LONGINT_FORMAT " - -\n",
3420 SCIPmessageFPrintInfo(scip->messagehdlr, file, " applied locally : - - - %10" SCIP_LONGINT_FORMAT " %10" SCIP_LONGINT_FORMAT " %10.1f - - %10" SCIP_LONGINT_FORMAT " - -\n",
3427 SCIPmessageFPrintInfo(scip->messagehdlr, file, "Gen. Resolution CA : Time Calls Success Conflicts LargeCoef LongConfs Length\n");
3428 SCIPmessageFPrintInfo(scip->messagehdlr, file, " propagation : %10.2f %10" SCIP_LONGINT_FORMAT " %10" SCIP_LONGINT_FORMAT " %10" SCIP_LONGINT_FORMAT " %10" SCIP_LONGINT_FORMAT " %10" SCIP_LONGINT_FORMAT "%10.1f\n",
3429 SCIPconflictGetResTime(scip->conflict),
3430 SCIPconflictGetNResCalls(scip->conflict),
3438 );
3439}
3440
3441/** collects conflict statistics in a SCIP_DATATREE object */
3443 SCIP* scip, /**< SCIP data structure */
3444 SCIP_DATATREE* datatree /**< data tree */
3445 )
3446{
3447 int initstoresize;
3448 int maxstoresize;
3449
3450 assert(scip != NULL);
3451 assert(datatree != NULL);
3452
3453 SCIP_CALL( SCIPcheckStage(scip, "SCIPcollectConflictStatistics", FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
3454
3455 /* Collect pool size information */
3456 if( scip->set->conf_maxstoresize == 0 )
3457 {
3458 initstoresize = INT_MAX;
3459 maxstoresize = INT_MAX;
3460 }
3461 else
3462 {
3463 initstoresize = SCIPconflictstoreGetInitPoolSize(scip->conflictstore);
3464 maxstoresize = SCIPconflictstoreGetMaxPoolSize(scip->conflictstore);
3465 }
3466
3467 /* if maxstoresize is -1, then we have no sizes to report */
3468 if( maxstoresize >= 0 )
3469 {
3470 SCIP_CALL( SCIPinsertDatatreeInt(scip, datatree, "pool_size", initstoresize) );
3471 SCIP_CALL( SCIPinsertDatatreeInt(scip, datatree, "max_pool_size", maxstoresize) );
3472 }
3473
3474 SCIP_CALL( SCIPinsertDatatreeReal(scip, datatree, "propagation_time", SCIPconflictGetPropTime(scip->conflict)) );
3475 SCIP_CALL( SCIPinsertDatatreeLong(scip, datatree, "propagation_calls", SCIPconflictGetNPropCalls(scip->conflict)) );
3476 SCIP_CALL( SCIPinsertDatatreeLong(scip, datatree, "propagation_success", SCIPconflictGetNPropSuccess(scip->conflict)) );
3477
3478 SCIP_CALL( SCIPinsertDatatreeReal(scip, datatree, "infeasible_lp_time", SCIPconflictGetInfeasibleLPTime(scip->conflict)) );
3479 SCIP_CALL( SCIPinsertDatatreeLong(scip, datatree, "infeasible_lp_calls", SCIPconflictGetNInfeasibleLPCalls(scip->conflict)) );
3480 SCIP_CALL( SCIPinsertDatatreeLong(scip, datatree, "infeasible_lp_success", SCIPconflictGetNInfeasibleLPSuccess(scip->conflict)) );
3481
3482 SCIP_CALL( SCIPinsertDatatreeReal(scip, datatree, "bound_exceeding_lp_time", SCIPconflictGetBoundexceedingLPTime(scip->conflict)) );
3483 SCIP_CALL( SCIPinsertDatatreeLong(scip, datatree, "bound_exceeding_lp_calls", SCIPconflictGetNBoundexceedingLPCalls(scip->conflict)) );
3484 SCIP_CALL( SCIPinsertDatatreeLong(scip, datatree, "bound_exceeding_lp_success", SCIPconflictGetNBoundexceedingLPSuccess(scip->conflict)) );
3485
3486 SCIP_CALL( SCIPinsertDatatreeReal(scip, datatree, "strong_branching_time", SCIPconflictGetStrongbranchTime(scip->conflict)) );
3487 SCIP_CALL( SCIPinsertDatatreeLong(scip, datatree, "strong_branching_calls", SCIPconflictGetNStrongbranchCalls(scip->conflict)) );
3488 SCIP_CALL( SCIPinsertDatatreeLong(scip, datatree, "strong_branching_success", SCIPconflictGetNStrongbranchSuccess(scip->conflict)) );
3489
3490 return SCIP_OKAY;
3491}
3492
3493/** outputs separator statistics
3494 *
3495 * Columns:
3496 * - RootCalls: The number of calls that happened at the root.
3497 * - FoundCuts: The total number of cuts generated by the separators.
3498 * Note: Cutpool-FoundCuts \f$= \sum_{i=1}^nsepas ( Foundcuts_i - DirectAdd_i )\f$.
3499 * - ViaPoolAdd: The total number of cuts added to the sepastore from the cutpool.
3500 * - DirectAdd: The total number of cuts added directly to the sepastore from the separator.
3501 * - Applied: The sum of all cuts from the separator that were applied to the LP.
3502 * - ViaPoolApp: The number of cuts that entered the sepastore from the cutpool that were applied to the LP.
3503 * - DirectApp: The number of cuts that entered the sepastore directly and were applied to the LP.
3504 *
3505 * The number of cuts ViaPoolAdd + Directly should be equal to the number of cuts Filtered + Forced + Selected in the
3506 * cutselector statistics.
3507 *
3508 * @note The following edge case may lead to over or undercounting of statistics: When SCIPapplyCutsProbing() is
3509 * called, cuts are counted for the cut selection statistics, but not for the separator statistics. This
3510 * happens, e.g., in the default plugin prop_obbt.c.
3511 *
3512 * @pre This method can be called if SCIP is in one of the following stages:
3513 * - \ref SCIP_STAGE_SOLVING
3514 * - \ref SCIP_STAGE_SOLVED
3515 */
3517 SCIP* scip, /**< SCIP data structure */
3518 FILE* file /**< output file */
3519 )
3520{
3521 int i;
3522
3523 assert(scip != NULL);
3524 assert(scip->set != NULL);
3525
3526 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPprintSeparatorStatistics", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
3527
3528 SCIPmessageFPrintInfo(scip->messagehdlr, file, "Separators : ExecTime SetupTime Calls RootCalls Cutoffs DomReds FoundCuts ViaPoolAdd DirectAdd Applied ViaPoolApp DirectApp Conss\n");
3529 SCIPmessageFPrintInfo(scip->messagehdlr, file, " cut pool : %10.2f - %10" SCIP_LONGINT_FORMAT " %10" SCIP_LONGINT_FORMAT " - - %10" SCIP_LONGINT_FORMAT " %10" SCIP_LONGINT_FORMAT " - - - - - (maximal pool size: %10" SCIP_LONGINT_FORMAT")\n",
3530 SCIPcutpoolGetTime(scip->cutpool),
3531 SCIPcutpoolGetNCalls(scip->cutpool),
3535 SCIPcutpoolGetMaxNCuts(scip->cutpool));
3536
3537 /* sort separators w.r.t. their name */
3539
3540 for( i = 0; i < scip->set->nsepas; ++i )
3541 {
3542 SCIP_SEPA* sepa;
3543
3544 sepa = scip->set->sepas[i];
3545
3546 /* only output data for separators without parent separator */
3547 if( SCIPsepaGetParentsepa(sepa) == NULL )
3548 {
3549 /* output data */
3551 SCIPsepaGetName(sepa),
3552 SCIPsepaGetTime(sepa),
3554 SCIPsepaGetNCalls(sepa),
3556 SCIPsepaGetNCutoffs(sepa),
3565
3566 /* for parent separators search for dependent separators */
3567 if( SCIPsepaIsParentsepa(sepa) )
3568 {
3569 SCIP_SEPA* parentsepa;
3570 int k;
3571
3572 for( k = 0; k < scip->set->nsepas; ++k )
3573 {
3574 if( k == i )
3575 continue;
3576
3577 parentsepa = SCIPsepaGetParentsepa(scip->set->sepas[k]);
3578 if( parentsepa != sepa )
3579 continue;
3580
3581 SCIPmessageFPrintInfo(scip->messagehdlr, file, " > %-15.17s: %10s %10s %10s %10s %10s %10s %10s %10" SCIP_LONGINT_FORMAT" %10" SCIP_LONGINT_FORMAT" %10" SCIP_LONGINT_FORMAT" %10" SCIP_LONGINT_FORMAT " %10" SCIP_LONGINT_FORMAT " %10s\n",
3582 SCIPsepaGetName(scip->set->sepas[k]), "-", "-", "-", "-", "-", "-", "-",
3583 SCIPsepaGetNCutsAddedViaPool(scip->set->sepas[k]),
3584 SCIPsepaGetNCutsAddedDirect(scip->set->sepas[k]),
3585 SCIPsepaGetNCutsApplied(scip->set->sepas[k]),
3586 SCIPsepaGetNCutsAppliedViaPool(scip->set->sepas[k]),
3587 SCIPsepaGetNCutsAppliedDirect(scip->set->sepas[k]), "-");
3588 }
3589 }
3590 }
3591 }
3592}
3593
3594/** collects separator statistics in a SCIP_DATATREE object */
3596 SCIP* scip, /**< SCIP data structure */
3597 SCIP_DATATREE* datatree /**< data tree */
3598 )
3599{
3600 SCIP_DATATREE* separators;
3601 SCIP_DATATREE* cutpool;
3602 int i;
3603
3604 assert(scip != NULL);
3605 assert(datatree != NULL);
3606
3607 SCIP_CALL( SCIPcheckStage(scip, "SCIPcollectSeparatorStatistics", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
3608
3609 /* Create a subtree for separators */
3610 SCIP_CALL( SCIPcreateDatatreeInTree(scip, datatree, &separators, "plugins", scip->set->nsepas + 1) );
3611
3612 /* Collect statistics for the cut pool */
3613 SCIP_CALL( SCIPcreateDatatreeInTree(scip, separators, &cutpool, "cut_pool", 7) );
3614
3615 SCIP_CALL( SCIPinsertDatatreeReal(scip, cutpool, "exec_time", SCIPcutpoolGetTime(scip->cutpool)) );
3616 SCIP_CALL( SCIPinsertDatatreeLong(scip, cutpool, "calls", SCIPcutpoolGetNCalls(scip->cutpool)) );
3617 SCIP_CALL( SCIPinsertDatatreeLong(scip, cutpool, "root_calls", SCIPcutpoolGetNRootCalls(scip->cutpool)) );
3618 SCIP_CALL( SCIPinsertDatatreeLong(scip, cutpool, "cuts_found", SCIPcutpoolGetNCutsFound(scip->cutpool)) );
3619 SCIP_CALL( SCIPinsertDatatreeLong(scip, cutpool, "cuts_added", SCIPcutpoolGetNCutsAdded(scip->cutpool)) );
3620 SCIP_CALL( SCIPinsertDatatreeLong(scip, cutpool, "max_cuts", SCIPcutpoolGetMaxNCuts(scip->cutpool)) );
3621
3622 /* Sort separators by name */
3624
3625 /* Collect statistics for each separator */
3626 for( i = 0; i < scip->set->nsepas; ++i )
3627 {
3628 SCIP_SEPA* sepa = scip->set->sepas[i];
3629
3630 /* Only collect data for separators without parent separators */
3631 if( SCIPsepaGetParentsepa(sepa) == NULL )
3632 {
3634 SCIP_CALL( SCIPcreateDatatreeInTree( scip, separators, &sepadata, SCIPsepaGetName(sepa), 14) );
3635
3649 SCIP_CALL( SCIPinsertDatatreeLong(scip, sepadata, "constraints_found", SCIPsepaGetNConssFound(sepa)) );
3650
3651 /* for parent separators search for dependent separators */
3652 if( SCIPsepaIsParentsepa(sepa) )
3653 {
3654 SCIP_SEPA* parentsepa;
3655 int k;
3656
3657 for( k = 0; k < scip->set->nsepas; ++k )
3658 {
3659 if( k == i )
3660 continue;
3661
3662 parentsepa = SCIPsepaGetParentsepa(scip->set->sepas[k]);
3663 if( parentsepa != sepa )
3664 continue;
3665
3666 SCIP_DATATREE* subsepadata;
3667 SCIP_CALL( SCIPcreateDatatreeInTree(scip, sepadata, &subsepadata, SCIPsepaGetName(scip->set->sepas[k]), 14) );
3668
3669 SCIP_CALL( SCIPinsertDatatreeString(scip, subsepadata, "description", SCIPsepaGetDesc(scip->set->sepas[k])) );
3670 SCIP_CALL( SCIPinsertDatatreeReal(scip, subsepadata, "exec_time", SCIPsepaGetTime(scip->set->sepas[k])) );
3671 SCIP_CALL( SCIPinsertDatatreeReal(scip, subsepadata, "setup_time", SCIPsepaGetSetupTime(scip->set->sepas[k])) );
3672 SCIP_CALL( SCIPinsertDatatreeLong(scip, subsepadata, "calls", SCIPsepaGetNCalls(scip->set->sepas[k])) );
3673 SCIP_CALL( SCIPinsertDatatreeLong(scip, subsepadata, "root_calls", SCIPsepaGetNRootCalls(scip->set->sepas[k])) );
3674 SCIP_CALL( SCIPinsertDatatreeLong(scip, subsepadata, "cutoffs", SCIPsepaGetNCutoffs(scip->set->sepas[k])) );
3675 SCIP_CALL( SCIPinsertDatatreeLong(scip, subsepadata, "domreds_found", SCIPsepaGetNDomredsFound(scip->set->sepas[k])) );
3676 SCIP_CALL( SCIPinsertDatatreeLong(scip, subsepadata, "cuts_found", SCIPsepaGetNCutsFound(scip->set->sepas[k])) );
3677 SCIP_CALL( SCIPinsertDatatreeLong(scip, subsepadata, "cuts_added_via_pool", SCIPsepaGetNCutsAddedViaPool(scip->set->sepas[k])) );
3678 SCIP_CALL( SCIPinsertDatatreeLong(scip, subsepadata, "cuts_added_direct", SCIPsepaGetNCutsAddedDirect(scip->set->sepas[k])) );
3679 SCIP_CALL( SCIPinsertDatatreeLong(scip, subsepadata, "cuts_applied", SCIPsepaGetNCutsApplied(scip->set->sepas[k])) );
3680 SCIP_CALL( SCIPinsertDatatreeLong(scip, subsepadata, "cuts_applied_via_pool", SCIPsepaGetNCutsAppliedViaPool(scip->set->sepas[k])) );
3681 SCIP_CALL( SCIPinsertDatatreeLong(scip, subsepadata, "cuts_applied_direct", SCIPsepaGetNCutsAppliedDirect(scip->set->sepas[k])) );
3682 SCIP_CALL( SCIPinsertDatatreeLong(scip, subsepadata, "constraints_found", SCIPsepaGetNConssFound(scip->set->sepas[k])) );
3683 }
3684 }
3685 }
3686 }
3687
3688 return SCIP_OKAY;
3689}
3690
3691/** outputs cutselector statistics
3692 *
3693 * Filtered = ViaPoolAdd(Separators) + DirectAdd(Separators) - Selected - Cuts(Constraints)
3694 * Selected = Applied(Separators) + Applied(Constraints)
3695 *
3696 * @pre This method can be called if SCIP is in one of the following stages:
3697 * - \ref SCIP_STAGE_SOLVING
3698 * - \ref SCIP_STAGE_SOLVED
3699 */
3701 SCIP* scip, /**< SCIP data structure */
3702 FILE* file /**< output file */
3703 )
3704{
3705 int i;
3706
3707 assert(scip != NULL);
3708 assert(scip->set != NULL);
3709
3710 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPprintCutselectorStatistics", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
3711
3712 SCIPmessageFPrintInfo(scip->messagehdlr, file, "Cutselectors : ExecTime SetupTime Calls RootCalls Selected Forced Filtered RootSelec RootForc RootFilt \n");
3713
3714 /* sort cutsels w.r.t. their priority */
3716
3717 for( i = 0; i < scip->set->ncutsels; ++i )
3718 {
3719 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %-17.17s: %10.2f %10.2f %10" SCIP_LONGINT_FORMAT " %10" SCIP_LONGINT_FORMAT " %10" SCIP_LONGINT_FORMAT " %10" SCIP_LONGINT_FORMAT " %10" SCIP_LONGINT_FORMAT " %10" SCIP_LONGINT_FORMAT " %10" SCIP_LONGINT_FORMAT " %10" SCIP_LONGINT_FORMAT "\n",
3720 SCIPcutselGetName(scip->set->cutsels[i]),
3721 SCIPcutselGetTime(scip->set->cutsels[i]),
3722 SCIPcutselGetSetupTime(scip->set->cutsels[i]),
3723 SCIPcutselGetNCalls(scip->set->cutsels[i]),
3724 SCIPcutselGetNRootCalls(scip->set->cutsels[i]),
3725 SCIPcutselGetNRootCuts(scip->set->cutsels[i]) + SCIPcutselGetNLocalCuts(scip->set->cutsels[i]),
3726 SCIPcutselGetNRootForcedCuts(scip->set->cutsels[i]) + SCIPcutselGetNLocalForcedCuts(scip->set->cutsels[i]),
3728 SCIPcutselGetNRootCuts(scip->set->cutsels[i]),
3729 SCIPcutselGetNRootForcedCuts(scip->set->cutsels[i]),
3730 SCIPcutselGetNRootCutsFiltered(scip->set->cutsels[i])
3731 );
3732 }
3733}
3734
3735/** collects cutselector statistics in a SCIP_DATATREE object */
3737 SCIP* scip, /**< SCIP data structure */
3738 SCIP_DATATREE* datatree /**< data tree */
3739 )
3740{
3741 SCIP_DATATREE* cutselectors;
3742 int i;
3743
3744 assert(scip != NULL);
3745 assert(datatree != NULL);
3746
3747 SCIP_CALL( SCIPcheckStage(scip, "SCIPcollectCutselectorStatistics", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
3748
3749 if( scip->set->ncutsels == 0 )
3750 return SCIP_OKAY;
3751
3752 /* Create a subtree for cutselectors */
3753 SCIP_CALL( SCIPcreateDatatreeInTree(scip, datatree, &cutselectors, "plugins", scip->set->ncutsels) );
3754
3755 /* Sort cutselectors by priority */
3757
3758 /* Collect statistics for each cutselector */
3759 for( i = 0; i < scip->set->ncutsels; ++i )
3760 {
3761 SCIP_CUTSEL* cutsel = scip->set->cutsels[i];
3762 SCIP_DATATREE* cutseldata;
3763
3764 SCIP_CALL( SCIPcreateDatatreeInTree(scip, cutselectors, &cutseldata, SCIPcutselGetName(cutsel), 11) );
3765
3766 SCIP_CALL( SCIPinsertDatatreeString(scip, cutseldata, "description", SCIPcutselGetDesc(cutsel)) );
3767 SCIP_CALL( SCIPinsertDatatreeReal(scip, cutseldata, "exec_time", SCIPcutselGetTime(cutsel)) );
3768 SCIP_CALL( SCIPinsertDatatreeReal(scip, cutseldata, "setup_time", SCIPcutselGetSetupTime(cutsel)) );
3769 SCIP_CALL( SCIPinsertDatatreeLong(scip, cutseldata, "calls", SCIPcutselGetNCalls(cutsel)) );
3770 SCIP_CALL( SCIPinsertDatatreeLong(scip, cutseldata, "root_calls", SCIPcutselGetNRootCalls(cutsel)) );
3771 SCIP_CALL( SCIPinsertDatatreeLong(scip, cutseldata, "selected", SCIPcutselGetNRootCuts(cutsel) + SCIPcutselGetNLocalCuts(cutsel)) );
3774 SCIP_CALL( SCIPinsertDatatreeLong(scip, cutseldata, "root_selected", SCIPcutselGetNRootCuts(cutsel)) );
3775 SCIP_CALL( SCIPinsertDatatreeLong(scip, cutseldata, "root_forced", SCIPcutselGetNRootForcedCuts(cutsel)) );
3776 SCIP_CALL( SCIPinsertDatatreeLong(scip, cutseldata, "root_filtered", SCIPcutselGetNRootCutsFiltered(cutsel)) );
3777 }
3778
3779 return SCIP_OKAY;
3780}
3781
3782/** outputs pricer statistics
3783 *
3784 * @pre This method can be called if SCIP is in one of the following stages:
3785 * - \ref SCIP_STAGE_SOLVING
3786 * - \ref SCIP_STAGE_SOLVED
3787 */
3789 SCIP* scip, /**< SCIP data structure */
3790 FILE* file /**< output file */
3791 )
3792{
3793 int i;
3794
3795 assert(scip != NULL);
3796 assert(scip->set != NULL);
3797
3798 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPprintPricerStatistics", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
3799
3800 SCIPmessageFPrintInfo(scip->messagehdlr, file, "Pricers : ExecTime SetupTime Calls Vars\n");
3801 SCIPmessageFPrintInfo(scip->messagehdlr, file, " problem variables: %10.2f - %10d %10d\n",
3805
3806 /* sort pricers w.r.t. their name */
3808
3809 for( i = 0; i < scip->set->nactivepricers; ++i )
3810 {
3811 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %-17.17s: %10.2f %10.2f %10d %10d\n",
3812 SCIPpricerGetName(scip->set->pricers[i]),
3813 SCIPpricerGetTime(scip->set->pricers[i]),
3814 SCIPpricerGetSetupTime(scip->set->pricers[i]),
3815 SCIPpricerGetNCalls(scip->set->pricers[i]),
3816 SCIPpricerGetNVarsFound(scip->set->pricers[i]));
3817 }
3818}
3819
3820/** collects pricer statistics in a SCIP_DATATREE object */
3822 SCIP* scip, /**< SCIP data structure */
3823 SCIP_DATATREE* datatree /**< data tree */
3824 )
3825{
3826 SCIP_DATATREE* pricers;
3827 SCIP_DATATREE* probvars;
3828 int i;
3829
3830 assert(scip != NULL);
3831 assert(datatree != NULL);
3832
3833 SCIP_CALL( SCIPcheckStage(scip, "SCIPcollectPricerStatistics", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
3834
3835 /* Create a subtree for pricers */
3836 SCIP_CALL( SCIPcreateDatatreeInTree(scip, datatree, &pricers, "pricers", 1 + scip->set->nactivepricers) );
3837
3838 /* Collect statistics for problem variables */
3839 SCIP_CALL( SCIPcreateDatatreeInTree(scip, pricers, &probvars, "problem_variables", 3) );
3840
3841 SCIP_CALL( SCIPinsertDatatreeReal(scip, probvars, "exec_time", SCIPpricestoreGetProbPricingTime(scip->pricestore)) );
3842 SCIP_CALL( SCIPinsertDatatreeInt(scip, probvars, "calls", SCIPpricestoreGetNProbPricings(scip->pricestore)) );
3843 SCIP_CALL( SCIPinsertDatatreeInt(scip, probvars, "vars_found", SCIPpricestoreGetNProbvarsFound(scip->pricestore)) );
3844
3845 /* Sort pricers by name */
3847
3848 /* Collect statistics for each active pricer */
3849 for( i = 0; i < scip->set->nactivepricers; ++i )
3850 {
3851 SCIP_PRICER* pricer = scip->set->pricers[i];
3852 SCIP_DATATREE* pricerdata;
3853
3854 SCIP_CALL( SCIPcreateDatatreeInTree( scip, pricers, &pricerdata, SCIPpricerGetName(pricer), 4) );
3855
3856 SCIP_CALL( SCIPinsertDatatreeReal(scip, pricerdata, "exec_time", SCIPpricerGetTime(pricer)) );
3857 SCIP_CALL( SCIPinsertDatatreeReal(scip, pricerdata, "setup_time", SCIPpricerGetSetupTime(pricer)) );
3858 SCIP_CALL( SCIPinsertDatatreeInt(scip, pricerdata, "calls", SCIPpricerGetNCalls(pricer)) );
3859 SCIP_CALL( SCIPinsertDatatreeInt(scip, pricerdata, "vars_found", SCIPpricerGetNVarsFound(pricer)) );
3860 }
3861
3862 return SCIP_OKAY;
3863}
3864
3865/** outputs branching rule statistics
3866 *
3867 * @pre This method can be called if SCIP is in one of the following stages:
3868 * - \ref SCIP_STAGE_SOLVING
3869 * - \ref SCIP_STAGE_SOLVED
3870 */
3872 SCIP* scip, /**< SCIP data structure */
3873 FILE* file /**< output file */
3874 )
3875{
3876 int i;
3877
3878 assert(scip != NULL);
3879 assert(scip->set != NULL);
3880
3881 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPprintBranchruleStatistics", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
3882
3883 SCIPmessageFPrintInfo(scip->messagehdlr, file, "Branching Rules : ExecTime SetupTime BranchLP BranchExt BranchPS Cutoffs DomReds Cuts Conss Children\n");
3884
3885 /* sort branching rules w.r.t. their name */
3887
3888 for( i = 0; i < scip->set->nbranchrules; ++i )
3889 {
3890 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %-17.17s: %10.2f %10.2f %10" SCIP_LONGINT_FORMAT " %10" SCIP_LONGINT_FORMAT " %10" SCIP_LONGINT_FORMAT " %10" SCIP_LONGINT_FORMAT " %10" SCIP_LONGINT_FORMAT " %10" SCIP_LONGINT_FORMAT " %10" SCIP_LONGINT_FORMAT " %10" SCIP_LONGINT_FORMAT "\n",
3891 SCIPbranchruleGetName(scip->set->branchrules[i]),
3892 SCIPbranchruleGetTime(scip->set->branchrules[i]),
3893 SCIPbranchruleGetSetupTime(scip->set->branchrules[i]),
3894 SCIPbranchruleGetNLPCalls(scip->set->branchrules[i]),
3895 SCIPbranchruleGetNExternCalls(scip->set->branchrules[i]),
3896 SCIPbranchruleGetNPseudoCalls(scip->set->branchrules[i]),
3897 SCIPbranchruleGetNCutoffs(scip->set->branchrules[i]),
3898 SCIPbranchruleGetNDomredsFound(scip->set->branchrules[i]),
3899 SCIPbranchruleGetNCutsFound(scip->set->branchrules[i]),
3900 SCIPbranchruleGetNConssFound(scip->set->branchrules[i]),
3901 SCIPbranchruleGetNChildren(scip->set->branchrules[i]));
3902 }
3903}
3904
3905/** collects branching rule statistics in a SCIP_DATATREE object */
3907 SCIP* scip, /**< SCIP data structure */
3908 SCIP_DATATREE* datatree /**< data tree */
3909 )
3910{
3911 SCIP_DATATREE* branchruletree;
3912 int i;
3913
3914 assert(scip != NULL);
3915 assert(scip->set != NULL);
3916 assert(datatree != NULL);
3917
3918 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPcollectBranchruleStatistics", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
3919
3920 if( scip->set->nbranchrules == 0 )
3921 return SCIP_OKAY;
3922
3923 SCIP_CALL( SCIPcreateDatatreeInTree(scip, datatree, &branchruletree, "plugins", scip->set->nbranchrules) );
3924
3925 /* sort branching rules w.r.t. their name */
3927
3928 for( i = 0; i < scip->set->nbranchrules; ++i )
3929 {
3930 SCIP_DATATREE* branchrule = NULL;
3931
3932 SCIP_CALL( SCIPcreateDatatreeInTree(scip, branchruletree, &branchrule, SCIPbranchruleGetName(scip->set->branchrules[i]), 11) );
3933
3934 SCIP_CALL( SCIPinsertDatatreeString(scip, branchrule, "description", SCIPbranchruleGetDesc(scip->set->branchrules[i])) );
3935 SCIP_CALL( SCIPinsertDatatreeReal(scip, branchrule, "time", SCIPbranchruleGetTime(scip->set->branchrules[i])) );
3936 SCIP_CALL( SCIPinsertDatatreeReal(scip, branchrule, "setuptime", SCIPbranchruleGetSetupTime(scip->set->branchrules[i])) );
3937 SCIP_CALL( SCIPinsertDatatreeLong(scip, branchrule, "nlpcalls", SCIPbranchruleGetNLPCalls(scip->set->branchrules[i])) );
3938 SCIP_CALL( SCIPinsertDatatreeLong(scip, branchrule, "nexterncalls", SCIPbranchruleGetNExternCalls(scip->set->branchrules[i])) );
3939 SCIP_CALL( SCIPinsertDatatreeLong(scip, branchrule, "npscalls", SCIPbranchruleGetNPseudoCalls(scip->set->branchrules[i])) );
3940 SCIP_CALL( SCIPinsertDatatreeLong(scip, branchrule, "ncutoffs", SCIPbranchruleGetNCutoffs(scip->set->branchrules[i])) );
3941 SCIP_CALL( SCIPinsertDatatreeLong(scip, branchrule, "ndomreds", SCIPbranchruleGetNDomredsFound(scip->set->branchrules[i])) );
3942 SCIP_CALL( SCIPinsertDatatreeLong(scip, branchrule, "ncutsfound", SCIPbranchruleGetNCutsFound(scip->set->branchrules[i])) );
3943 SCIP_CALL( SCIPinsertDatatreeLong(scip, branchrule, "nconssfound", SCIPbranchruleGetNConssFound(scip->set->branchrules[i])) );
3944 SCIP_CALL( SCIPinsertDatatreeLong(scip, branchrule, "nchildren", SCIPbranchruleGetNChildren(scip->set->branchrules[i])) );
3945 }
3946
3947 return SCIP_OKAY;
3948}
3949
3950/** outputs heuristics statistics
3951 *
3952 * @pre This method can be called if SCIP is in one of the following stages:
3953 * - \ref SCIP_STAGE_PRESOLVING
3954 * - \ref SCIP_STAGE_EXITPRESOLVE
3955 * - \ref SCIP_STAGE_PRESOLVED
3956 * - \ref SCIP_STAGE_SOLVING
3957 * - \ref SCIP_STAGE_SOLVED
3958 */
3960 SCIP* scip, /**< SCIP data structure */
3961 FILE* file /**< output file */
3962 )
3963{
3964 int ndivesets = 0;
3965 int i;
3966
3967 assert(scip != NULL);
3968 assert(scip->set != NULL);
3969 assert(scip->tree != NULL);
3970
3971 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPprintHeuristicStatistics", FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
3972
3973 SCIPmessageFPrintInfo(scip->messagehdlr, file, "Primal Heuristics : ExecTime SetupTime Calls Found Best\n");
3974 SCIPmessageFPrintInfo(scip->messagehdlr, file, " LP solutions : %10.2f - - %10" SCIP_LONGINT_FORMAT " %10" SCIP_LONGINT_FORMAT "\n",
3975 SCIPclockGetTime(scip->stat->lpsoltime),
3976 scip->stat->nlpsolsfound, scip->stat->nlpbestsolsfound);
3977 SCIPmessageFPrintInfo(scip->messagehdlr, file, " relax solutions : %10.2f - - %10" SCIP_LONGINT_FORMAT " %10" SCIP_LONGINT_FORMAT "\n",
3978 SCIPclockGetTime(scip->stat->relaxsoltime),
3979 scip->stat->nrelaxsolsfound, scip->stat->nrelaxbestsolsfound);
3980 SCIPmessageFPrintInfo(scip->messagehdlr, file, " pseudo solutions : %10.2f - - %10" SCIP_LONGINT_FORMAT " %10" SCIP_LONGINT_FORMAT "\n",
3981 SCIPclockGetTime(scip->stat->pseudosoltime),
3982 scip->stat->npssolsfound, scip->stat->npsbestsolsfound);
3983 SCIPmessageFPrintInfo(scip->messagehdlr, file, " strong branching : %10.2f - - %10" SCIP_LONGINT_FORMAT " %10" SCIP_LONGINT_FORMAT "\n",
3984 SCIPclockGetTime(scip->stat->sbsoltime),
3985 scip->stat->nsbsolsfound, scip->stat->nsbbestsolsfound);
3986
3987 /* sort heuristics w.r.t. their names */
3989
3990 for( i = 0; i < scip->set->nheurs; ++i )
3991 {
3992 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %-17.17s: %10.2f %10.2f %10" SCIP_LONGINT_FORMAT " %10" SCIP_LONGINT_FORMAT " %10" SCIP_LONGINT_FORMAT "\n",
3993 SCIPheurGetName(scip->set->heurs[i]),
3994 SCIPheurGetTime(scip->set->heurs[i]),
3995 SCIPheurGetSetupTime(scip->set->heurs[i]),
3996 SCIPheurGetNCalls(scip->set->heurs[i]),
3997 SCIPheurGetNSolsFound(scip->set->heurs[i]),
3998 SCIPheurGetNBestSolsFound(scip->set->heurs[i]));
3999
4000 /* count heuristics that use diving; needed to determine output later */
4001 ndivesets += SCIPheurGetNDivesets(scip->set->heurs[i]);
4002 }
4003
4004 SCIPmessageFPrintInfo(scip->messagehdlr, file, " other solutions : - - - %10" SCIP_LONGINT_FORMAT " -\n",
4005 scip->stat->nexternalsolsfound);
4006
4007 if ( ndivesets > 0 && scip->set->misc_showdivingstats )
4008 {
4009 int c;
4011
4012 /* print statistics for all three contexts individually */
4013 for( c = 0; c < 3; ++c )
4014 {
4015 SCIP_DIVECONTEXT divecontext = divecontexts[c];
4016
4017 if( divecontext == SCIP_DIVECONTEXT_SINGLE )
4018 {
4019 SCIPmessageFPrintInfo(scip->messagehdlr, file,
4020 "Diving %-12s: Calls Nodes LP Iters Backtracks Conflicts MinDepth MaxDepth AvgDepth RoundSols NLeafSols MinSolDpt MaxSolDpt AvgSolDpt\n", "(single)");
4021 }
4022 else
4023 {
4024 SCIPmessageFPrintInfo(scip->messagehdlr, file,
4025 "Diving %-12s: Calls Nodes LP Iters Backtracks Conflicts MinDepth MaxDepth AvgDepth RoundSols NLeafSols MinSolDpt MaxSolDpt AvgSolDpt\n",
4026 divecontext == SCIP_DIVECONTEXT_ADAPTIVE ? "(adaptive)" : "(scheduler)");
4027 }
4028
4029 for( i = 0; i < scip->set->nheurs; ++i )
4030 {
4031 int s;
4032 for( s = 0; s < SCIPheurGetNDivesets(scip->set->heurs[i]); ++s )
4033 {
4034 SCIP_DIVESET* diveset = SCIPheurGetDivesets(scip->set->heurs[i])[s];
4035
4036 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %-17.17s: %10d",
4038 SCIPdivesetGetNCalls(diveset, divecontext));
4039 if( SCIPdivesetGetNCalls(diveset, divecontext) > 0 )
4040 {
4041 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %10" SCIP_LONGINT_FORMAT " %10" SCIP_LONGINT_FORMAT " %10" SCIP_LONGINT_FORMAT " %10" SCIP_LONGINT_FORMAT " %10d %10d %10.1f %10" SCIP_LONGINT_FORMAT,
4044 SCIPdivesetGetNBacktracks(diveset, divecontext),
4045 SCIPdivesetGetNConflicts(diveset, divecontext),
4046 SCIPdivesetGetMinDepth(diveset, divecontext),
4047 SCIPdivesetGetMaxDepth(diveset, divecontext),
4048 SCIPdivesetGetAvgDepth(diveset, divecontext),
4049 SCIPdivesetGetNSols(diveset, divecontext) - SCIPdivesetGetNSolutionCalls(diveset, divecontext));
4050
4051 if( SCIPdivesetGetNSolutionCalls(diveset, divecontext) > 0 )
4052 {
4053 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %10d %10d %10d %10.1f\n",
4058 }
4059 else
4060 SCIPmessageFPrintInfo(scip->messagehdlr, file, " - - - -\n");
4061 }
4062 else
4063 SCIPmessageFPrintInfo(scip->messagehdlr, file, " - - - - - - - - - - - -\n");
4064 }
4065 }
4066 }
4067 }
4068}
4069
4070/** collects heuristics statistics into SCIP_DATATREE
4071 *
4072 * @pre This method can be called if SCIP is in one of the following stages:
4073 * - \ref SCIP_STAGE_PRESOLVING
4074 * - \ref SCIP_STAGE_EXITPRESOLVE
4075 * - \ref SCIP_STAGE_PRESOLVED
4076 * - \ref SCIP_STAGE_SOLVING
4077 * - \ref SCIP_STAGE_SOLVED
4078 */
4080 SCIP* scip, /**< SCIP data structure */
4081 SCIP_DATATREE* datatree /**< data tree */
4082 )
4083{
4084 SCIP_DATATREE* heursstore;
4085 SCIP_DATATREE* lpstore;
4086 SCIP_DATATREE* relaxstore;
4087 SCIP_DATATREE* pseudostore;
4088 SCIP_DATATREE* sbstore;
4089
4090 assert(scip != NULL);
4091 assert(scip->set != NULL);
4092 assert(scip->tree != NULL);
4093 assert(datatree != NULL);
4094
4095 SCIP_CALL( SCIPcheckStage(scip, "SCIPcollectHeuristicStatistics", FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
4096
4097 /* create the heuristics datatree */
4098 SCIP_CALL( SCIPcreateDatatreeInTree(scip, datatree, &heursstore, "plugins", scip->set->nheurs + 5) );
4099
4100 /* add LP solutions statistics */
4101 SCIP_CALL( SCIPcreateDatatreeInTree(scip, heursstore, &lpstore, "lp_solutions", 4) );
4102 SCIP_CALL( SCIPinsertDatatreeReal(scip, lpstore, "time", SCIPclockGetTime(scip->stat->lpsoltime)) );
4103 SCIP_CALL( SCIPinsertDatatreeLong(scip, lpstore, "solutions_found", scip->stat->nlpsolsfound) );
4104 SCIP_CALL( SCIPinsertDatatreeLong(scip, lpstore, "best_solutions_found", scip->stat->nlpbestsolsfound) );
4105
4106 /* add relaxation solutions statistics */
4107 SCIP_CALL( SCIPcreateDatatreeInTree(scip, heursstore, &relaxstore, "relax_solutions", 4) );
4108 SCIP_CALL( SCIPinsertDatatreeReal(scip, relaxstore, "time", SCIPclockGetTime(scip->stat->relaxsoltime)) );
4109 SCIP_CALL( SCIPinsertDatatreeLong(scip, relaxstore, "solutions_found", scip->stat->nrelaxsolsfound) );
4110 SCIP_CALL( SCIPinsertDatatreeLong(scip, relaxstore, "best_solutions_found", scip->stat->nrelaxbestsolsfound) );
4111
4112 /* add pseudo solutions statistics */
4113 SCIP_CALL( SCIPcreateDatatreeInTree(scip, heursstore, &pseudostore, "pseudo_solutions", 4) );
4114 SCIP_CALL( SCIPinsertDatatreeReal(scip, pseudostore, "time", SCIPclockGetTime(scip->stat->pseudosoltime)) );
4115 SCIP_CALL( SCIPinsertDatatreeLong(scip, pseudostore, "solutions_found", scip->stat->npssolsfound) );
4116 SCIP_CALL( SCIPinsertDatatreeLong(scip, pseudostore, "best_solutions_found", scip->stat->npsbestsolsfound) );
4117
4118 /* add strong branching statistics */
4119 SCIP_CALL( SCIPcreateDatatreeInTree(scip, heursstore, &sbstore, "strong_branching", 4) );
4120 SCIP_CALL( SCIPinsertDatatreeReal(scip, sbstore, "time", SCIPclockGetTime(scip->stat->sbsoltime)) );
4121 SCIP_CALL( SCIPinsertDatatreeLong(scip, sbstore, "solutions_found", scip->stat->nsbsolsfound) );
4122 SCIP_CALL( SCIPinsertDatatreeLong(scip, sbstore, "best_solutions_found", scip->stat->nsbbestsolsfound) );
4123
4124 /* Sort heuristics by name */
4126
4127 for( int i = 0; i < scip->set->nheurs; ++i )
4128 {
4129 SCIP_DATATREE* heurstore;
4130 SCIP_CALL( SCIPcreateDatatreeInTree(scip, heursstore, &heurstore, SCIPheurGetName(scip->set->heurs[i]), 6) );
4131
4132 SCIP_CALL( SCIPinsertDatatreeString(scip, heurstore, "description", SCIPheurGetDesc(scip->set->heurs[i])) );
4133 SCIP_CALL( SCIPinsertDatatreeReal(scip, heurstore, "time", SCIPheurGetTime(scip->set->heurs[i])) );
4134 SCIP_CALL( SCIPinsertDatatreeReal(scip, heurstore, "setup_time", SCIPheurGetSetupTime(scip->set->heurs[i])) );
4135 SCIP_CALL( SCIPinsertDatatreeLong(scip, heurstore, "calls", SCIPheurGetNCalls(scip->set->heurs[i])) );
4136 SCIP_CALL( SCIPinsertDatatreeLong(scip, heurstore, "solutions_found", SCIPheurGetNSolsFound(scip->set->heurs[i])) );
4137 SCIP_CALL( SCIPinsertDatatreeLong(scip, heurstore, "best_solutions_found", SCIPheurGetNBestSolsFound(scip->set->heurs[i])) );
4138 }
4139
4140 SCIP_DATATREE* othersolutions;
4141 SCIP_CALL( SCIPcreateDatatreeInTree(scip, heursstore, &othersolutions, "other_solutions", 1) );
4142 SCIP_CALL( SCIPinsertDatatreeLong(scip, othersolutions, "solutions_found", scip->stat->nexternalsolsfound) );
4143
4144 /* collect diving statistics if applicable */
4145 if( scip->set->misc_showdivingstats )
4146 {
4147 SCIP_DATATREE* divingstore;
4149
4150 SCIP_CALL( SCIPcreateDatatreeInTree(scip, datatree, &divingstore, "diving_statistics", 3) );
4151
4152 for( int c = 0; c < 3; ++c )
4153 {
4154 SCIP_DIVECONTEXT divecontext = divecontexts[c];
4155 SCIP_DATATREE* contextstore;
4156
4157 SCIP_CALL( SCIPcreateDatatreeInTree(scip, divingstore, &contextstore,
4158 divecontext == SCIP_DIVECONTEXT_SINGLE ? "single" : divecontext == SCIP_DIVECONTEXT_ADAPTIVE ? "adaptive" : "scheduler",
4159 scip->set->nheurs) );
4160
4161 for( int i = 0; i < scip->set->nheurs; ++i )
4162 {
4163 int ndivesets = SCIPheurGetNDivesets(scip->set->heurs[i]);
4164 for( int s = 0; s < ndivesets; ++s )
4165 {
4166 SCIP_DATATREE* divesetstore;
4167 SCIP_DIVESET* diveset = SCIPheurGetDivesets(scip->set->heurs[i])[s];
4168
4169 SCIP_CALL( SCIPcreateDatatreeInTree(scip, contextstore, &divesetstore, SCIPdivesetGetName(diveset), 5) );
4170
4171 SCIP_CALL( SCIPinsertDatatreeInt(scip, divesetstore, "calls", SCIPdivesetGetNCalls(diveset, divecontext)) );
4172 SCIP_CALL( SCIPinsertDatatreeLong(scip, divesetstore, "nodes", SCIPdivesetGetNProbingNodes(diveset, divecontext)) );
4173 SCIP_CALL( SCIPinsertDatatreeLong(scip, divesetstore, "lp_iters", SCIPdivesetGetNLPIterations(diveset, divecontext)) );
4174 SCIP_CALL( SCIPinsertDatatreeLong(scip, divesetstore, "backtracks", SCIPdivesetGetNBacktracks(diveset, divecontext)) );
4175 SCIP_CALL( SCIPinsertDatatreeLong(scip, divesetstore, "conflicts", SCIPdivesetGetNConflicts(diveset, divecontext)) );
4176 }
4177 }
4178 }
4179 }
4180
4181 return SCIP_OKAY;
4182}
4183
4184/** outputs compression statistics
4185 *
4186 * @pre This method can be called if SCIP is in one of the following stages:
4187 * - \ref SCIP_STAGE_PRESOLVING
4188 * - \ref SCIP_STAGE_EXITPRESOLVE
4189 * - \ref SCIP_STAGE_PRESOLVED
4190 * - \ref SCIP_STAGE_SOLVING
4191 * - \ref SCIP_STAGE_SOLVED
4192 */
4194 SCIP* scip, /**< SCIP data structure */
4195 FILE* file /**< output file */
4196 )
4197{
4198 int i;
4199
4200 assert(scip != NULL);
4201
4202 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPprintCompressionStatistics", FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
4203
4204 /* only print compression statistics if tree reoptimization is enabled */
4205 if( !scip->set->reopt_enable )
4206 return;
4207
4208 SCIPmessageFPrintInfo(scip->messagehdlr, file, "Tree Compressions : ExecTime SetupTime Calls Found\n");
4209
4210 /* sort compressions w.r.t. their names */
4212
4213 for( i = 0; i < scip->set->ncomprs; ++i )
4214 {
4215 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %-17.17s: %10.2f %10.2f %10" SCIP_LONGINT_FORMAT " %10" SCIP_LONGINT_FORMAT "\n",
4216 SCIPcomprGetName(scip->set->comprs[i]),
4217 SCIPcomprGetTime(scip->set->comprs[i]),
4218 SCIPcomprGetSetupTime(scip->set->comprs[i]),
4219 SCIPcomprGetNCalls(scip->set->comprs[i]),
4220 SCIPcomprGetNFound(scip->set->comprs[i]));
4221 }
4222}
4223
4224/** collects compression statistics in a SCIP_DATATREE object */
4226 SCIP* scip, /**< SCIP data structure */
4227 SCIP_DATATREE* datatree /**< data tree */
4228 )
4229{
4230 SCIP_DATATREE* compressions;
4231 int i;
4232
4233 assert(scip != NULL);
4234 assert(datatree != NULL);
4235
4236 SCIP_CALL( SCIPcheckStage(scip, "SCIPcollectCompressionStatistics", FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
4237
4238 /* Check if tree reoptimization is enabled */
4239 if( !scip->set->reopt_enable )
4240 return SCIP_OKAY;
4241
4242 if( scip->set->ncomprs == 0 )
4243 return SCIP_OKAY;
4244
4245 /* Create a subtree for tree compressions */
4246 SCIP_CALL( SCIPcreateDatatreeInTree(scip, datatree, &compressions, "tree_compressions", scip->set->ncomprs) );
4247
4248 /* Sort compressions by name */
4250
4251 /* Collect statistics for each compression method */
4252 for( i = 0; i < scip->set->ncomprs; ++i )
4253 {
4254 SCIP_COMPR* compr = scip->set->comprs[i];
4255 SCIP_DATATREE* comprdata;
4256
4257 SCIP_CALL( SCIPcreateDatatreeInTree(scip, compressions, &comprdata, SCIPcomprGetName(compr), 5) );
4258
4259 SCIP_CALL( SCIPinsertDatatreeString(scip, comprdata, "description", SCIPcomprGetDesc(compr)) );
4260 SCIP_CALL( SCIPinsertDatatreeReal(scip, comprdata, "exec_time", SCIPcomprGetTime(compr)) );
4261 SCIP_CALL( SCIPinsertDatatreeReal(scip, comprdata, "setup_time", SCIPcomprGetSetupTime(compr)) );
4262 SCIP_CALL( SCIPinsertDatatreeLong(scip, comprdata, "n_calls", SCIPcomprGetNCalls(compr)) );
4263 SCIP_CALL( SCIPinsertDatatreeLong(scip, comprdata, "n_found", SCIPcomprGetNFound(compr)) );
4264 }
4265
4266 return SCIP_OKAY;
4267}
4268
4269/** outputs LP statistics
4270 *
4271 * @pre This method can be called if SCIP is in one of the following stages:
4272 * - \ref SCIP_STAGE_SOLVING
4273 * - \ref SCIP_STAGE_SOLVED
4274 */
4276 SCIP* scip, /**< SCIP data structure */
4277 FILE* file /**< output file */
4278 )
4279{
4280 assert(scip != NULL);
4281 assert(scip->stat != NULL);
4282 assert(scip->lp != NULL);
4283
4285
4286 SCIPmessageFPrintInfo(scip->messagehdlr, file, "LP : Time Calls Iterations Iter/call Iter/sec Time-0-It Calls-0-It\n");
4287
4288 SCIPmessageFPrintInfo(scip->messagehdlr, file, " primal LP : %10.2f %10" SCIP_LONGINT_FORMAT " %10" SCIP_LONGINT_FORMAT " %10.2f",
4289 SCIPclockGetTime(scip->stat->primallptime),
4290 scip->stat->nprimallps + scip->stat->nprimalzeroitlps,
4291 scip->stat->nprimallpiterations,
4292 scip->stat->nprimallps > 0 ? (SCIP_Real)scip->stat->nprimallpiterations/(SCIP_Real)scip->stat->nprimallps : 0.0);
4293 if( SCIPclockGetTime(scip->stat->primallptime) >= 0.01 )
4294 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %10.2f", (SCIP_Real)scip->stat->nprimallpiterations/SCIPclockGetTime(scip->stat->primallptime));
4295 else
4296 SCIPmessageFPrintInfo(scip->messagehdlr, file, " -");
4297 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %10.2f %10" SCIP_LONGINT_FORMAT "\n",
4298 scip->stat->primalzeroittime,
4299 scip->stat->nprimalzeroitlps);
4300
4301 SCIPmessageFPrintInfo(scip->messagehdlr, file, " dual LP : %10.2f %10" SCIP_LONGINT_FORMAT " %10" SCIP_LONGINT_FORMAT " %10.2f",
4302 SCIPclockGetTime(scip->stat->duallptime),
4303 scip->stat->nduallps + scip->stat->ndualzeroitlps,
4304 scip->stat->nduallpiterations,
4305 scip->stat->nduallps > 0 ? (SCIP_Real)scip->stat->nduallpiterations/(SCIP_Real)scip->stat->nduallps : 0.0);
4306 if( SCIPclockGetTime(scip->stat->duallptime) >= 0.01 )
4307 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %10.2f", (SCIP_Real)scip->stat->nduallpiterations/SCIPclockGetTime(scip->stat->duallptime));
4308 else
4309 SCIPmessageFPrintInfo(scip->messagehdlr, file, " -");
4310 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %10.2f %10" SCIP_LONGINT_FORMAT "\n",
4311 scip->stat->dualzeroittime,
4312 scip->stat->ndualzeroitlps);
4313
4314 SCIPmessageFPrintInfo(scip->messagehdlr, file, " lex dual LP : %10.2f %10" SCIP_LONGINT_FORMAT " %10" SCIP_LONGINT_FORMAT " %10.2f",
4315 SCIPclockGetTime(scip->stat->lexduallptime),
4316 scip->stat->nlexduallps,
4317 scip->stat->nlexduallpiterations,
4318 scip->stat->nlexduallps > 0 ? (SCIP_Real)scip->stat->nlexduallpiterations/(SCIP_Real)scip->stat->nlexduallps : 0.0);
4319 if( SCIPclockGetTime(scip->stat->lexduallptime) >= 0.01 )
4320 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %10.2f\n", (SCIP_Real)scip->stat->nlexduallpiterations/SCIPclockGetTime(scip->stat->lexduallptime));
4321 else
4322 SCIPmessageFPrintInfo(scip->messagehdlr, file, " -\n");
4323
4324 SCIPmessageFPrintInfo(scip->messagehdlr, file, " barrier LP : %10.2f %10" SCIP_LONGINT_FORMAT " %10" SCIP_LONGINT_FORMAT " %10.2f",
4325 SCIPclockGetTime(scip->stat->barrierlptime),
4326 scip->stat->nbarrierlps,
4327 scip->stat->nbarrierlpiterations,
4328 scip->stat->nbarrierlps > 0 ? (SCIP_Real)scip->stat->nbarrierlpiterations/(SCIP_Real)scip->stat->nbarrierlps : 0.0);
4329 if( SCIPclockGetTime(scip->stat->barrierlptime) >= 0.01 )
4330 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %10.2f", (SCIP_Real)scip->stat->nbarrierlpiterations/SCIPclockGetTime(scip->stat->barrierlptime));
4331 else
4332 SCIPmessageFPrintInfo(scip->messagehdlr, file, " -");
4333 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %10.2f %10" SCIP_LONGINT_FORMAT "\n",
4334 scip->stat->barrierzeroittime,
4335 scip->stat->nbarrierzeroitlps);
4336
4337 SCIPmessageFPrintInfo(scip->messagehdlr, file, " resolve instable : %10.2f %10" SCIP_LONGINT_FORMAT " %10" SCIP_LONGINT_FORMAT " %10.2f",
4338 SCIPclockGetTime(scip->stat->resolveinstablelptime),
4339 scip->stat->nresolveinstablelps,
4340 scip->stat->nresolveinstablelpiters,
4341 scip->stat->nresolveinstablelps > 0 ? (SCIP_Real)scip->stat->nresolveinstablelpiters/(SCIP_Real)scip->stat->nresolveinstablelps : 0.0);
4342 if( SCIPclockGetTime(scip->stat->resolveinstablelptime) >= 0.01 )
4343 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %10.2f\n", (SCIP_Real)scip->stat->nresolveinstablelpiters/SCIPclockGetTime(scip->stat->resolveinstablelptime));
4344 else
4345 SCIPmessageFPrintInfo(scip->messagehdlr, file, " -\n");
4346
4347 SCIPmessageFPrintInfo(scip->messagehdlr, file, " diving/probing LP: %10.2f %10" SCIP_LONGINT_FORMAT " %10" SCIP_LONGINT_FORMAT " %10.2f",
4348 SCIPclockGetTime(scip->stat->divinglptime),
4349 scip->stat->ndivinglps,
4350 scip->stat->ndivinglpiterations,
4351 scip->stat->ndivinglps > 0 ? (SCIP_Real)scip->stat->ndivinglpiterations/(SCIP_Real)scip->stat->ndivinglps : 0.0);
4352 if( SCIPclockGetTime(scip->stat->divinglptime) >= 0.01 )
4353 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %10.2f\n", (SCIP_Real)scip->stat->ndivinglpiterations/SCIPclockGetTime(scip->stat->divinglptime));
4354 else
4355 SCIPmessageFPrintInfo(scip->messagehdlr, file, " -\n");
4356
4357 SCIPmessageFPrintInfo(scip->messagehdlr, file, " strong branching : %10.2f %10" SCIP_LONGINT_FORMAT " %10" SCIP_LONGINT_FORMAT " %10.2f",
4358 SCIPclockGetTime(scip->stat->strongbranchtime),
4359 scip->stat->nstrongbranchs,
4360 scip->stat->nsblpiterations,
4361 scip->stat->nstrongbranchs > 0 ? (SCIP_Real)scip->stat->nsblpiterations/(SCIP_Real)scip->stat->nstrongbranchs : 0.0);
4362 if( SCIPclockGetTime(scip->stat->strongbranchtime) >= 0.01 )
4363 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %10.2f", (SCIP_Real)scip->stat->nsblpiterations/SCIPclockGetTime(scip->stat->strongbranchtime));
4364 else
4365 SCIPmessageFPrintInfo(scip->messagehdlr, file, " -");
4366 SCIPmessageFPrintInfo(scip->messagehdlr, file, " - - %10" SCIP_LONGINT_FORMAT "\n", scip->stat->nsbtimesiterlimhit);
4367
4368 SCIPmessageFPrintInfo(scip->messagehdlr, file, " (at root node) : - %10" SCIP_LONGINT_FORMAT " %10" SCIP_LONGINT_FORMAT " %10.2f -\n",
4369 scip->stat->nrootstrongbranchs,
4370 scip->stat->nrootsblpiterations,
4371 scip->stat->nrootstrongbranchs > 0
4372 ? (SCIP_Real)scip->stat->nrootsblpiterations/(SCIP_Real)scip->stat->nrootstrongbranchs : 0.0);
4373
4374 SCIPmessageFPrintInfo(scip->messagehdlr, file, " conflict analysis: %10.2f %10" SCIP_LONGINT_FORMAT " %10" SCIP_LONGINT_FORMAT " %10.2f",
4375 SCIPclockGetTime(scip->stat->conflictlptime),
4376 scip->stat->nconflictlps,
4377 scip->stat->nconflictlpiterations,
4378 scip->stat->nconflictlps > 0 ? (SCIP_Real)scip->stat->nconflictlpiterations/(SCIP_Real)scip->stat->nconflictlps : 0.0);
4379 if( SCIPclockGetTime(scip->stat->conflictlptime) >= 0.01 )
4380 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %10.2f\n", (SCIP_Real)scip->stat->nconflictlpiterations/SCIPclockGetTime(scip->stat->conflictlptime));
4381 else
4382 SCIPmessageFPrintInfo(scip->messagehdlr, file, " -\n");
4383
4384 if( scip->set->exact_enable )
4385 {
4386 SCIPmessageFPrintInfo(scip->messagehdlr, file, "Safe Bounding : Time Calls Iterations Iter/call Iter/sec Nfails AvgError NObjlim NObjlimF \n");
4387 SCIPmessageFPrintInfo(scip->messagehdlr, file, " exact lp feas : %10.2f %10" SCIP_LONGINT_FORMAT " %10" SCIP_LONGINT_FORMAT " %10.2f",
4388 SCIPclockGetTime(scip->stat->provedfeaslptime),
4389 scip->stat->nexlp,
4390 scip->stat->niterationsexlp,
4391 scip->stat->niterationsexlp > 0 ? (SCIP_Real)scip->stat->niterationsexlp/(SCIP_Real)scip->stat->nexlp : 0.0);
4392 if( SCIPclockGetTime(scip->stat->provedfeaslptime) >= 0.01 )
4393 {
4394 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %10.2f %10" SCIP_LONGINT_FORMAT " %.4e\n",
4395 (SCIP_Real)scip->stat->niterationsexlp/SCIPclockGetTime(scip->stat->provedfeaslptime),
4396 scip->stat->nfailexlp, scip->stat->boundingerrorexlp/scip->stat->nexlp);
4397 }
4398 else
4399 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %10" SCIP_LONGINT_FORMAT " - %10.2f\n", scip->stat->nfailexlp, scip->stat->boundingerrorexlp/scip->stat->nexlp);
4400
4401 SCIPmessageFPrintInfo(scip->messagehdlr, file, " feas failed : %10.2f %10" SCIP_LONGINT_FORMAT " \n",
4402 scip->stat->timefailexlp, scip->stat->nfailexlp);
4403
4404 SCIPmessageFPrintInfo(scip->messagehdlr, file, " exact lp infeas : %10.2f %10" SCIP_LONGINT_FORMAT " %10" SCIP_LONGINT_FORMAT " %10.2f",
4405 SCIPclockGetTime(scip->stat->provedinfeaslptime),
4406 scip->stat->nexlpinf,
4407 scip->stat->niterationsexlpinf,
4408 scip->stat->niterationsexlpinf > 0 ? (SCIP_Real)scip->stat->niterationsexlpinf/(SCIP_Real)scip->stat->nexlpinf : 0.0);
4409 if( SCIPclockGetTime(scip->stat->provedinfeaslptime) >= 0.01 )
4410 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %10.2f %10" SCIP_LONGINT_FORMAT " -\n", (SCIP_Real)scip->stat->niterationsexlpinf/SCIPclockGetTime(scip->stat->provedinfeaslptime), scip->stat->nfailexlpinf);
4411 else
4412 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %10" SCIP_LONGINT_FORMAT " - -\n", scip->stat->nfailexlpinf);
4413
4414 SCIPmessageFPrintInfo(scip->messagehdlr, file, " inf failed : %10.2f %10" SCIP_LONGINT_FORMAT " \n",
4415 scip->stat->timefailexlpinf, scip->stat->nfailexlpinf);
4416
4417 SCIPmessageFPrintInfo(scip->messagehdlr, file, " boundshift feas : %10.2f %10" SCIP_LONGINT_FORMAT " - - - %10" SCIP_LONGINT_FORMAT " %.4e %10" SCIP_LONGINT_FORMAT " %10" SCIP_LONGINT_FORMAT "\n",
4418 SCIPclockGetTime(scip->stat->provedfeasbstime),
4419 scip->stat->nboundshift,
4420 scip->stat->nfailboundshift,
4421 scip->stat->boundingerrorbs/scip->stat->nboundshift,
4422 scip->stat->nboundshiftobjlim,
4423 scip->stat->nboundshiftobjlimfail);
4424
4425 SCIPmessageFPrintInfo(scip->messagehdlr, file, " boundshift infeas: %10.2f %10" SCIP_LONGINT_FORMAT " - - - %10" SCIP_LONGINT_FORMAT " -\n",
4426 SCIPclockGetTime(scip->stat->provedinfeasbstime),
4427 scip->stat->nboundshiftinf,
4428 scip->stat->nfailboundshiftinf);
4429
4430 SCIPmessageFPrintInfo(scip->messagehdlr, file, " projshift feas : %10.2f %10" SCIP_LONGINT_FORMAT " - - - %10" SCIP_LONGINT_FORMAT " %.4e %10" SCIP_LONGINT_FORMAT " %10" SCIP_LONGINT_FORMAT "\n",
4431 SCIPclockGetTime(scip->stat->provedfeaspstime),
4432 scip->stat->nprojshift,
4433 scip->stat->nfailprojshift,
4434 scip->stat->nprojshift > 0 ? scip->stat->boundingerrorps/scip->stat->nprojshift : 0,
4435 scip->stat->nprojshiftobjlim,
4436 scip->stat->nprojshiftobjlimfail);
4437
4438 SCIPmessageFPrintInfo(scip->messagehdlr, file, " projshift infeas: %10.2f %10" SCIP_LONGINT_FORMAT " - - - %10" SCIP_LONGINT_FORMAT " -\n",
4439 SCIPclockGetTime(scip->stat->provedinfeaspstime),
4440 scip->stat->nprojshiftinf,
4441 scip->stat->nfailprojshiftinf);
4442 }
4443}
4444
4445/** collects LP statistics in a SCIP_DATATREE object */
4447 SCIP* scip, /**< SCIP data structure */
4448 SCIP_DATATREE* datatree /**< data tree */
4449 )
4450{
4451 SCIP_DATATREE* primal;
4452 SCIP_DATATREE* dual;
4453 SCIP_DATATREE* barrier;
4454 SCIP_DATATREE* lexdual;
4455 SCIP_DATATREE* resolve;
4457 SCIP_DATATREE* strongbranchroot;
4458 SCIP_DATATREE* conflict;
4459
4460 assert(scip != NULL);
4461 assert(scip->stat != NULL);
4462 assert(scip->lp != NULL);
4463
4464 SCIP_CALL( SCIPcheckStage(scip, "SCIPcollectLPStatistics", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
4465
4466 /* Primal LP statistics */
4467 SCIP_CALL( SCIPcreateDatatreeInTree(scip, datatree, &primal, "primal_lp", 4) );
4468 SCIP_CALL( SCIPinsertDatatreeReal(scip, primal, "time", SCIPclockGetTime(scip->stat->primallptime)) );
4469 SCIP_CALL( SCIPinsertDatatreeLong(scip, primal, "calls", scip->stat->nprimallps + scip->stat->nprimalzeroitlps) );
4470 SCIP_CALL( SCIPinsertDatatreeLong(scip, primal, "iterations", scip->stat->nprimallpiterations) );
4471 if( scip->stat->nprimallps > 0 )
4472 {
4473 SCIP_CALL( SCIPinsertDatatreeReal(scip, primal, "iter_per_call", (SCIP_Real)scip->stat->nprimallpiterations / scip->stat->nprimallps) );
4474 }
4475
4476 /* Dual LP statistics */
4477 SCIP_CALL( SCIPcreateDatatreeInTree(scip, datatree, &dual, "dual_lp", 4) );
4478 SCIP_CALL( SCIPinsertDatatreeReal(scip, dual, "time", SCIPclockGetTime(scip->stat->duallptime)) );
4479 SCIP_CALL( SCIPinsertDatatreeLong(scip, dual, "calls", scip->stat->nduallps + scip->stat->ndualzeroitlps) );
4480 SCIP_CALL( SCIPinsertDatatreeLong(scip, dual, "iterations", scip->stat->nduallpiterations) );
4481 if( scip->stat->nduallps > 0 )
4482 {
4483 SCIP_CALL( SCIPinsertDatatreeReal(scip, dual, "iter_per_call", (SCIP_Real)scip->stat->nduallpiterations / scip->stat->nduallps) );
4484 }
4485
4486 /* Barrier LP statistics */
4487 SCIP_CALL( SCIPcreateDatatreeInTree(scip, datatree, &barrier, "barrier_lp", 4) );
4488 SCIP_CALL( SCIPinsertDatatreeReal(scip, barrier, "time", SCIPclockGetTime(scip->stat->barrierlptime)) );
4489 SCIP_CALL( SCIPinsertDatatreeLong(scip, barrier, "calls", scip->stat->nbarrierlps) );
4490 SCIP_CALL( SCIPinsertDatatreeLong(scip, barrier, "iterations", scip->stat->nbarrierlpiterations) );
4491 if( scip->stat->nbarrierlps > 0 )
4492 {
4493 SCIP_CALL( SCIPinsertDatatreeReal(scip, barrier, "iter_per_call", (SCIP_Real)scip->stat->nbarrierlpiterations / scip->stat->nbarrierlps) );
4494 }
4495
4496 /* Lex dual LP statistics */
4497 SCIP_CALL( SCIPcreateDatatreeInTree(scip, datatree, &lexdual, "lex_dual_lp", 5) );
4498 SCIP_CALL( SCIPinsertDatatreeReal(scip, lexdual, "time", SCIPclockGetTime(scip->stat->lexduallptime)) );
4499 SCIP_CALL( SCIPinsertDatatreeLong(scip, lexdual, "calls", scip->stat->nlexduallps) );
4500 SCIP_CALL( SCIPinsertDatatreeLong(scip, lexdual, "iterations", scip->stat->nlexduallpiterations) );
4501 if( scip->stat->nlexduallps > 0 )
4502 {
4503 SCIP_CALL( SCIPinsertDatatreeReal(scip, lexdual, "iter_per_call", (SCIP_Real)scip->stat->nlexduallpiterations / scip->stat->nlexduallps) );
4504 }
4505 if( SCIPclockGetTime(scip->stat->lexduallptime) >= 0.01 )
4506 {
4507 SCIP_CALL( SCIPinsertDatatreeReal(scip, lexdual, "iter_per_time", (SCIP_Real)scip->stat->nlexduallpiterations / SCIPclockGetTime(scip->stat->lexduallptime)) );
4508 }
4509
4510 /* Resolving LP statistics */
4511 SCIP_CALL( SCIPcreateDatatreeInTree(scip, datatree, &resolve, "resolve_lp", 5) );
4512 SCIP_CALL( SCIPinsertDatatreeReal(scip, resolve, "time", SCIPclockGetTime(scip->stat->resolveinstablelptime)) );
4513 SCIP_CALL( SCIPinsertDatatreeLong(scip, resolve, "calls", scip->stat->nresolveinstablelps) );
4514 SCIP_CALL( SCIPinsertDatatreeLong(scip, resolve, "iterations", scip->stat->nresolveinstablelpiters) );
4515 if( scip->stat->nresolveinstablelps > 0 )
4516 {
4517 SCIP_CALL( SCIPinsertDatatreeReal(scip, resolve, "iter_per_call", (SCIP_Real)scip->stat->nresolveinstablelpiters / scip->stat->nresolveinstablelps) );
4518 }
4519 if( SCIPclockGetTime(scip->stat->resolveinstablelptime) >= 0.01 )
4520 {
4521 SCIP_CALL( SCIPinsertDatatreeReal(scip, resolve, "iter_per_time", (SCIP_Real)scip->stat->nresolveinstablelpiters / SCIPclockGetTime(scip->stat->resolveinstablelptime)) );
4522 }
4523
4524 /* Strong branching LP statistics */
4525 SCIP_CALL( SCIPcreateDatatreeInTree(scip, datatree, &strongbranch, "strongbranch_lp", 5) );
4526 SCIP_CALL( SCIPinsertDatatreeReal(scip, strongbranch, "time", SCIPclockGetTime(scip->stat->strongbranchtime)) );
4527 SCIP_CALL( SCIPinsertDatatreeLong(scip, strongbranch, "calls", scip->stat->nstrongbranchs) );
4528 SCIP_CALL( SCIPinsertDatatreeLong(scip, strongbranch, "iterations", scip->stat->nsblpiterations) );
4529 if( scip->stat->nstrongbranchs > 0 )
4530 {
4531 SCIP_CALL( SCIPinsertDatatreeReal(scip, strongbranch, "iter_per_call", (SCIP_Real)scip->stat->nsblpiterations / scip->stat->nstrongbranchs) );
4532 }
4533 if( SCIPclockGetTime(scip->stat->strongbranchtime) >= 0.01 )
4534 {
4535 SCIP_CALL( SCIPinsertDatatreeReal(scip, strongbranch, "iter_per_time", (SCIP_Real)scip->stat->nsblpiterations / SCIPclockGetTime(scip->stat->strongbranchtime)) );
4536 }
4537
4538 /* Strong branching at root node statistics */
4539 SCIP_CALL( SCIPcreateDatatreeInTree(scip, datatree, &strongbranchroot, "strongbranch_root_lp", 3) );
4540 SCIP_CALL( SCIPinsertDatatreeLong(scip, strongbranchroot, "calls", scip->stat->nrootstrongbranchs) );
4541 SCIP_CALL( SCIPinsertDatatreeLong(scip, strongbranchroot, "iterations", scip->stat->nrootsblpiterations) );
4542 if( scip->stat->nrootstrongbranchs > 0 )
4543 {
4544 SCIP_CALL( SCIPinsertDatatreeReal(scip, strongbranchroot, "iter_per_call", (SCIP_Real)scip->stat->nrootsblpiterations / scip->stat->nrootstrongbranchs) );
4545 }
4546
4547 /* Conflict analysis LP statistics */
4548 SCIP_CALL( SCIPcreateDatatreeInTree(scip, datatree, &conflict, "conflict_lp", 5) );
4549 SCIP_CALL( SCIPinsertDatatreeReal(scip, conflict, "time", SCIPclockGetTime(scip->stat->conflictlptime)) );
4550 SCIP_CALL( SCIPinsertDatatreeLong(scip, conflict, "calls", scip->stat->nconflictlps) );
4551 SCIP_CALL( SCIPinsertDatatreeLong(scip, conflict, "iterations", scip->stat->nconflictlpiterations) );
4552 if( scip->stat->nconflictlps > 0 )
4553 {
4554 SCIP_CALL( SCIPinsertDatatreeReal(scip, conflict, "iter_per_call", (SCIP_Real)scip->stat->nconflictlpiterations / scip->stat->nconflictlps) );
4555 }
4556 if( SCIPclockGetTime(scip->stat->conflictlptime) >= 0.01 )
4557 {
4558 SCIP_CALL( SCIPinsertDatatreeReal(scip, conflict, "iter_per_time", (SCIP_Real)scip->stat->nconflictlpiterations / SCIPclockGetTime(scip->stat->conflictlptime)) );
4559 }
4560
4561 return SCIP_OKAY;
4562}
4563
4564/** outputs NLP statistics
4565 *
4566 * @pre This method can be called if SCIP is in one of the following stages:
4567 * - \ref SCIP_STAGE_SOLVING
4568 * - \ref SCIP_STAGE_SOLVED
4569 */
4571 SCIP* scip, /**< SCIP data structure */
4572 FILE* file /**< output file */
4573 )
4574{
4575 int nnlrowlinear;
4576 int nnlrowconvexineq;
4577 int nnlrownonconvexineq;
4578 int nnlrownonlineareq;
4579
4580 assert(scip != NULL);
4581 assert(scip->stat != NULL);
4582
4584
4585 if( scip->nlp == NULL )
4586 return;
4587
4588 SCIPmessageFPrintInfo(scip->messagehdlr, file, "NLP relaxation :\n");
4589
4590 SCIPmessageFPrintInfo(scip->messagehdlr, file, " solve time : %10.2f (%" SCIP_LONGINT_FORMAT " calls)\n",
4591 SCIPclockGetTime(scip->stat->nlpsoltime),
4592 scip->stat->nnlps);
4593
4594 SCIP_CALL_ABORT( SCIPgetNLPNlRowsStat(scip, &nnlrowlinear, &nnlrowconvexineq, &nnlrownonconvexineq, &nnlrownonlineareq) );
4595 SCIPmessageFPrintInfo(scip->messagehdlr, file, " convexity : %10s (%d linear rows, %d convex ineq., %d nonconvex ineq., %d nonlinear eq. or two-sided ineq.)\n",
4596 (nnlrownonconvexineq == 0 && nnlrownonlineareq == 0) ? "convex" : "nonconvex",
4597 nnlrowlinear, nnlrowconvexineq, nnlrownonconvexineq, nnlrownonlineareq);
4598}
4599
4600/** collects NLP statistics in a SCIP_DATATREE object */
4602 SCIP* scip, /**< SCIP data structure */
4603 SCIP_DATATREE* datatree /**< data tree */
4604 )
4605{
4606 int nnlrowlinear;
4607 int nnlrowconvexineq;
4608 int nnlrownonconvexineq;
4609 int nnlrownonlineareq;
4610
4611 assert(scip != NULL);
4612 assert(datatree != NULL);
4613 assert(scip->stat != NULL);
4614
4615 SCIP_CALL( SCIPcheckStage(scip, "SCIPcollectNLPStatistics", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
4616
4617 if( scip->nlp == NULL )
4618 return SCIP_OKAY;
4619
4620 SCIP_CALL( SCIPinsertDatatreeReal(scip, datatree, "solve_time", SCIPclockGetTime(scip->stat->nlpsoltime)) );
4621 SCIP_CALL( SCIPinsertDatatreeLong(scip, datatree, "calls", scip->stat->nnlps) );
4622
4623 /* Get convexity and row statistics */
4624 SCIP_CALL( SCIPgetNLPNlRowsStat(scip, &nnlrowlinear, &nnlrowconvexineq, &nnlrownonconvexineq, &nnlrownonlineareq) );
4625
4626 SCIP_CALL( SCIPinsertDatatreeString(scip, datatree, "convexity",
4627 (nnlrownonconvexineq == 0 && nnlrownonlineareq == 0) ? "convex" : "nonconvex") );
4628 SCIP_CALL( SCIPinsertDatatreeInt(scip, datatree, "linear_rows", nnlrowlinear) );
4629 SCIP_CALL( SCIPinsertDatatreeInt(scip, datatree, "convex_ineq", nnlrowconvexineq) );
4630 SCIP_CALL( SCIPinsertDatatreeInt(scip, datatree, "nonconvex_ineq", nnlrownonconvexineq) );
4631 SCIP_CALL( SCIPinsertDatatreeInt(scip, datatree, "nonlinear_eq", nnlrownonlineareq) );
4632
4633 return SCIP_OKAY;
4634}
4635
4636/** outputs relaxator statistics
4637 *
4638 * @pre This method can be called if SCIP is in one of the following stages:
4639 * - \ref SCIP_STAGE_SOLVING
4640 * - \ref SCIP_STAGE_SOLVED
4641 */
4643 SCIP* scip, /**< SCIP data structure */
4644 FILE* file /**< output file */
4645 )
4646{
4647 int i;
4648
4649 assert(scip != NULL);
4650 assert(scip->set != NULL);
4651
4652 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPprintRelaxatorStatistics", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
4653
4654 if( scip->set->nrelaxs == 0 )
4655 return;
4656
4657 SCIPmessageFPrintInfo(scip->messagehdlr, file, "Relaxators : Time Calls Cutoffs ImprBounds ImprTime ReducedDom Separated AddedConss\n");
4658
4659 /* sort relaxators w.r.t. their name */
4661
4662 for( i = 0; i < scip->set->nrelaxs; ++i )
4663 {
4664 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %-17.17s: %10.2f %10" SCIP_LONGINT_FORMAT " %10" SCIP_LONGINT_FORMAT " %10" SCIP_LONGINT_FORMAT " %10.2f %10" SCIP_LONGINT_FORMAT " %10" SCIP_LONGINT_FORMAT " %10" SCIP_LONGINT_FORMAT "\n",
4665 SCIPrelaxGetName(scip->set->relaxs[i]),
4666 SCIPrelaxGetTime(scip->set->relaxs[i]),
4667 SCIPrelaxGetNCalls(scip->set->relaxs[i]),
4668 SCIPrelaxGetNCutoffs(scip->set->relaxs[i]),
4669 SCIPrelaxGetNImprovedLowerbound(scip->set->relaxs[i]),
4671 SCIPrelaxGetNReducedDomains(scip->set->relaxs[i]),
4672 SCIPrelaxGetNSeparatedCuts(scip->set->relaxs[i]),
4673 SCIPrelaxGetNAddedConss(scip->set->relaxs[i])
4674 );
4675 }
4676}
4677
4678/** collects relaxator statistics in a SCIP_DATATREE object */
4680 SCIP* scip, /**< SCIP data structure */
4681 SCIP_DATATREE* datatree /**< data tree */
4682 )
4683{
4684 SCIP_DATATREE* relaxators;
4685 int i;
4686
4687 assert(scip != NULL);
4688 assert(datatree != NULL);
4689
4690 SCIP_CALL( SCIPcheckStage(scip, "SCIPcollectRelaxatorStatistics", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
4691
4692 if( scip->set->nrelaxs == 0 )
4693 return SCIP_OKAY;
4694
4695 /* Create a subtree for relaxators */
4696 SCIP_CALL( SCIPcreateDatatreeInTree(scip, datatree, &relaxators, "relaxators", scip->set->nrelaxs) );
4697
4698 /* Sort relaxators by name */
4700
4701 /* Collect statistics for each relaxator */
4702 for( i = 0; i < scip->set->nrelaxs; ++i )
4703 {
4704 SCIP_RELAX* relax = scip->set->relaxs[i];
4705 SCIP_DATATREE* relaxdata;
4706
4707 SCIP_CALL( SCIPcreateDatatreeInTree(scip, relaxators, &relaxdata, SCIPrelaxGetName(relax), 8) );
4708
4709 SCIP_CALL( SCIPinsertDatatreeReal(scip, relaxdata, "time", SCIPrelaxGetTime(relax)) );
4710 SCIP_CALL( SCIPinsertDatatreeLong(scip, relaxdata, "calls", SCIPrelaxGetNCalls(relax)) );
4711 SCIP_CALL( SCIPinsertDatatreeLong(scip, relaxdata, "cutoffs", SCIPrelaxGetNCutoffs(relax)) );
4712 SCIP_CALL( SCIPinsertDatatreeLong(scip, relaxdata, "improved_lowerbound", SCIPrelaxGetNImprovedLowerbound(relax)) );
4713 SCIP_CALL( SCIPinsertDatatreeReal(scip, relaxdata, "improved_lowerbound_time", SCIPrelaxGetImprovedLowerboundTime(relax)) );
4714 SCIP_CALL( SCIPinsertDatatreeLong(scip, relaxdata, "reduced_domains", SCIPrelaxGetNReducedDomains(relax)) );
4715 SCIP_CALL( SCIPinsertDatatreeLong(scip, relaxdata, "separated_cuts", SCIPrelaxGetNSeparatedCuts(relax)) );
4716 SCIP_CALL( SCIPinsertDatatreeLong(scip, relaxdata, "added_constraints", SCIPrelaxGetNAddedConss(relax)) );
4717 }
4718
4719 return SCIP_OKAY;
4720}
4721
4722/** outputs tree statistics
4723 *
4724 * @pre This method can be called if SCIP is in one of the following stages:
4725 * - \ref SCIP_STAGE_SOLVING
4726 * - \ref SCIP_STAGE_SOLVED
4727 */
4729 SCIP* scip, /**< SCIP data structure */
4730 FILE* file /**< output file */
4731 )
4732{
4733 assert(scip != NULL);
4734 assert(scip->stat != NULL);
4735 assert(scip->tree != NULL);
4736
4737 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPprintTreeStatistics", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
4738
4739 SCIPmessageFPrintInfo(scip->messagehdlr, file, "B&B Tree :\n");
4740 SCIPmessageFPrintInfo(scip->messagehdlr, file, " number of runs : %10d\n", scip->stat->nruns);
4741 SCIPmessageFPrintInfo(scip->messagehdlr, file,
4742 " nodes : %10" SCIP_LONGINT_FORMAT " (%" SCIP_LONGINT_FORMAT " internal, %" SCIP_LONGINT_FORMAT " leaves)\n",
4743 scip->stat->nnodes, scip->stat->ninternalnodes, scip->stat->nnodes - scip->stat->ninternalnodes );
4744 SCIPmessageFPrintInfo(scip->messagehdlr, file, " feasible leaves : %10" SCIP_LONGINT_FORMAT "\n", scip->stat->nfeasleaves);
4745 SCIPmessageFPrintInfo(scip->messagehdlr, file, " infeas. leaves : %10" SCIP_LONGINT_FORMAT "\n", scip->stat->ninfeasleaves);
4746 SCIPmessageFPrintInfo(scip->messagehdlr, file, " objective leaves : %10" SCIP_LONGINT_FORMAT "\n", scip->stat->nobjleaves);
4747 SCIPmessageFPrintInfo(scip->messagehdlr, file,
4748 " nodes (total) : %10" SCIP_LONGINT_FORMAT " (%" SCIP_LONGINT_FORMAT " internal, %" SCIP_LONGINT_FORMAT " leaves)\n",
4749 scip->stat->ntotalnodes, scip->stat->ntotalinternalnodes, scip->stat->ntotalnodes - scip->stat->ntotalinternalnodes);
4750 SCIPmessageFPrintInfo(scip->messagehdlr, file, " nodes left : %10d\n", SCIPtreeGetNNodes(scip->tree));
4751 SCIPmessageFPrintInfo(scip->messagehdlr, file, " max depth : %10d\n", scip->stat->maxdepth);
4752 SCIPmessageFPrintInfo(scip->messagehdlr, file, " max depth (total): %10d\n", scip->stat->maxtotaldepth);
4753 SCIPmessageFPrintInfo(scip->messagehdlr, file, " backtracks : %10" SCIP_LONGINT_FORMAT " (%.1f%%)\n", scip->stat->nbacktracks,
4754 scip->stat->nnodes > 0 ? 100.0 * (SCIP_Real)scip->stat->nbacktracks / (SCIP_Real)scip->stat->nnodes : 0.0);
4755 SCIPmessageFPrintInfo(scip->messagehdlr, file, " early backtracks : %10" SCIP_LONGINT_FORMAT " (%.1f%%)\n", scip->stat->nearlybacktracks,
4756 scip->stat->nbacktracks > 0 ? 100.0 * (SCIP_Real)scip->stat->nearlybacktracks / (SCIP_Real)scip->stat->nbacktracks : 0.0);
4757 SCIPmessageFPrintInfo(scip->messagehdlr, file, " nodes exc. ref. : %10" SCIP_LONGINT_FORMAT " (%.1f%%)\n", scip->stat->nnodesaboverefbound,
4758 scip->stat->nnodes > 0 ? 100.0 * (SCIP_Real)scip->stat->nnodesaboverefbound / (SCIP_Real)scip->stat->nnodes : 0.0);
4759
4760 SCIPmessageFPrintInfo(scip->messagehdlr, file, " delayed cutoffs : %10" SCIP_LONGINT_FORMAT "\n", scip->stat->ndelayedcutoffs);
4761 SCIPmessageFPrintInfo(scip->messagehdlr, file, " repropagations : %10" SCIP_LONGINT_FORMAT " (%" SCIP_LONGINT_FORMAT " domain reductions, %" SCIP_LONGINT_FORMAT " cutoffs)\n",
4762 scip->stat->nreprops, scip->stat->nrepropboundchgs, scip->stat->nrepropcutoffs);
4763 SCIPmessageFPrintInfo(scip->messagehdlr, file, " avg switch length: %10.2f\n",
4764 scip->stat->nnodes > 0
4765 ? (SCIP_Real)(scip->stat->nactivatednodes + scip->stat->ndeactivatednodes) / (SCIP_Real)scip->stat->nnodes : 0.0);
4766 SCIPmessageFPrintInfo(scip->messagehdlr, file, " switching time : %10.2f\n", SCIPclockGetTime(scip->stat->nodeactivationtime));
4767}
4768
4769/** collects tree statistics in a SCIP_DATATREE object */
4771 SCIP* scip, /**< SCIP data structure */
4772 SCIP_DATATREE* datatree /**< data tree */
4773 )
4774{
4775 SCIP_DATATREE* nodes;
4776 SCIP_DATATREE* totalnodes;
4778 SCIP_DATATREE* backtracks;
4779 SCIP_DATATREE* reprop;
4780
4781 assert(scip != NULL);
4782 assert(scip->stat != NULL);
4783 assert(scip->tree != NULL);
4784 assert(datatree != NULL);
4785
4786 SCIP_CALL( SCIPcheckStage(scip, "SCIPcollectTreeStatistics", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
4787
4788 /* General node statistics */
4789 SCIP_CALL( SCIPcreateDatatreeInTree(scip, datatree, &nodes, "nodes", 6) );
4790 SCIP_CALL( SCIPinsertDatatreeLong(scip, nodes, "total", scip->stat->nnodes) );
4791 SCIP_CALL( SCIPinsertDatatreeLong(scip, nodes, "internal", scip->stat->ninternalnodes) );
4792 SCIP_CALL( SCIPinsertDatatreeLong(scip, nodes, "leaves", scip->stat->nnodes - scip->stat->ninternalnodes) );
4793 SCIP_CALL( SCIPinsertDatatreeLong(scip, nodes, "feasible_leaves", scip->stat->nfeasleaves) );
4794 SCIP_CALL( SCIPinsertDatatreeLong(scip, nodes, "infeasible_leaves", scip->stat->ninfeasleaves) );
4795 SCIP_CALL( SCIPinsertDatatreeLong(scip, nodes, "objective_leaves", scip->stat->nobjleaves) );
4796
4797 /* Total node statistics */
4798 SCIP_CALL( SCIPcreateDatatreeInTree(scip, datatree, &totalnodes, "total_nodes", 3) );
4799 SCIP_CALL( SCIPinsertDatatreeLong(scip, totalnodes, "total", scip->stat->ntotalnodes) );
4800 SCIP_CALL( SCIPinsertDatatreeLong(scip, totalnodes, "internal", scip->stat->ntotalinternalnodes) );
4801 SCIP_CALL( SCIPinsertDatatreeLong(scip, totalnodes, "leaves", scip->stat->ntotalnodes - scip->stat->ntotalinternalnodes) );
4802
4803 /* Depth statistics */
4804 SCIP_CALL( SCIPcreateDatatreeInTree(scip, datatree, &depth, "depth", 2) );
4805 SCIP_CALL( SCIPinsertDatatreeInt(scip, depth, "max_depth", scip->stat->maxdepth) );
4806 SCIP_CALL( SCIPinsertDatatreeInt(scip, depth, "max_depth_total", scip->stat->maxtotaldepth) );
4807
4808 /* Backtracks statistics */
4809 SCIP_CALL( SCIPcreateDatatreeInTree(scip, datatree, &backtracks, "backtracks", 4) );
4810 SCIP_CALL( SCIPinsertDatatreeLong(scip, backtracks, "total", scip->stat->nbacktracks) );
4811 SCIP_CALL( SCIPinsertDatatreeReal(scip, backtracks, "percent",
4812 scip->stat->nnodes > 0 ? 100.0 * (SCIP_Real)scip->stat->nbacktracks / (SCIP_Real)scip->stat->nnodes : 0.0) );
4813 SCIP_CALL( SCIPinsertDatatreeLong(scip, backtracks, "early", scip->stat->nearlybacktracks) );
4814 SCIP_CALL( SCIPinsertDatatreeReal(scip, backtracks, "early_percent",
4815 scip->stat->nbacktracks > 0 ? 100.0 * (SCIP_Real)scip->stat->nearlybacktracks / (SCIP_Real)scip->stat->nbacktracks : 0.0) );
4816
4817 /* Repropagations statistics */
4818 SCIP_CALL( SCIPcreateDatatreeInTree(scip, datatree, &reprop, "repropagations", 3) );
4819 SCIP_CALL( SCIPinsertDatatreeLong(scip, reprop, "total", scip->stat->nreprops) );
4820 SCIP_CALL( SCIPinsertDatatreeLong(scip, reprop, "domain_reductions", scip->stat->nrepropboundchgs) );
4821 SCIP_CALL( SCIPinsertDatatreeLong(scip, reprop, "cutoffs", scip->stat->nrepropcutoffs) );
4822
4823 /* Additional statistics */
4824 SCIP_CALL( SCIPinsertDatatreeInt(scip, datatree, "nodes_left", SCIPtreeGetNNodes(scip->tree)) );
4825 SCIP_CALL( SCIPinsertDatatreeLong(scip, datatree, "delayed_cutoffs", scip->stat->ndelayedcutoffs) );
4826 SCIP_CALL( SCIPinsertDatatreeReal(scip, datatree, "average_switch_length",
4827 scip->stat->nnodes > 0 ? (SCIP_Real)(scip->stat->nactivatednodes + scip->stat->ndeactivatednodes) / (SCIP_Real)scip->stat->nnodes : 0.0) );
4828 SCIP_CALL( SCIPinsertDatatreeReal(scip, datatree, "switching_time", SCIPclockGetTime(scip->stat->nodeactivationtime)) );
4829
4830 return SCIP_OKAY;
4831}
4832
4833/** outputs solution statistics
4834 *
4835 * @pre This method can be called if SCIP is in one of the following stages:
4836 * - \ref SCIP_STAGE_PRESOLVING
4837 * - \ref SCIP_STAGE_EXITPRESOLVE
4838 * - \ref SCIP_STAGE_PRESOLVED
4839 * - \ref SCIP_STAGE_SOLVING
4840 * - \ref SCIP_STAGE_SOLVED
4841 */
4843 SCIP* scip, /**< SCIP data structure */
4844 FILE* file /**< output file */
4845 )
4846{
4847 SCIP_Real primalbound;
4848 SCIP_Real dualbound;
4849 SCIP_Real gap;
4850 SCIP_Real firstprimalbound;
4851 SCIP_Bool objlimitreached;
4852 char limsolstring[SCIP_MAXSTRLEN];
4853
4854 assert(scip != NULL);
4855 assert(scip->stat != NULL);
4856 assert(scip->primal != NULL);
4857
4858 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPprintSolutionStatistics", FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
4859
4860 primalbound = SCIPgetPrimalbound(scip);
4861 dualbound = SCIPgetDualbound(scip);
4862 gap = SCIPgetGap(scip);
4863
4864 /* We output that the objective limit has been reached if the problem has been solved, no solution respecting the
4865 * objective limit has been found (nlimsolsfound == 0) and the primal bound is finite. Note that it still might be
4866 * that the original problem is infeasible, even without the objective limit, i.e., we cannot be sure that we
4867 * actually reached the objective limit. */
4868 objlimitreached = FALSE;
4869 if( SCIPgetStage(scip) == SCIP_STAGE_SOLVED && scip->primal->nlimsolsfound == 0
4871 objlimitreached = TRUE;
4872
4873 if( scip->primal->nsolsfound != scip->primal->nlimsolsfound )
4874 (void) SCIPsnprintf(limsolstring, SCIP_MAXSTRLEN, ", %" SCIP_LONGINT_FORMAT " respecting the objective limit", scip->primal->nlimsolsfound);
4875 else
4876 limsolstring[0] = '\0';
4877
4878 SCIPmessageFPrintInfo(scip->messagehdlr, file, "Solution :\n");
4879 SCIPmessageFPrintInfo(scip->messagehdlr, file, " Solutions found : %10" SCIP_LONGINT_FORMAT " (%" SCIP_LONGINT_FORMAT " improvements%s)\n",
4880 scip->primal->nsolsfound, scip->primal->nbestsolsfound, limsolstring);
4881
4882 if( SCIPsetIsInfinity(scip->set, REALABS(primalbound)) )
4883 {
4884 if( scip->set->stage == SCIP_STAGE_SOLVED )
4885 {
4886 if( scip->primal->nlimsolsfound == 0 )
4887 {
4889 {
4890 assert(!objlimitreached);
4891 SCIPmessageFPrintInfo(scip->messagehdlr, file, " Primal Bound : infeasible or unbounded\n");
4892 }
4893 else
4894 {
4896 if( objlimitreached )
4897 SCIPmessageFPrintInfo(scip->messagehdlr, file, " Primal Bound : infeasible (objective limit reached)\n");
4898 else
4899 SCIPmessageFPrintInfo(scip->messagehdlr, file, " Primal Bound : infeasible\n");
4900 }
4901 }
4902 else
4903 {
4904 assert(!objlimitreached);
4906 SCIPmessageFPrintInfo(scip->messagehdlr, file, " Primal Bound : unbounded\n");
4907 }
4908 }
4909 else
4910 SCIPmessageFPrintInfo(scip->messagehdlr, file, " Primal Bound : -\n");
4911 }
4912 else
4913 {
4914 if( scip->primal->nlimsolsfound == 0 )
4915 {
4916 SCIPmessageFPrintInfo(scip->messagehdlr, file, " Primal Bound : %+21.14e (objective limit)\n", primalbound);
4917
4918 /* display (best) primal bound */
4919 if( scip->primal->nsolsfound > 0 )
4920 {
4921 SCIP_Real bestsol;
4922 bestsol = SCIPsolGetObj(scip->primal->sols[0], scip->set, scip->transprob, scip->origprob);
4923 bestsol = SCIPretransformObj(scip, bestsol);
4924
4925 SCIPmessageFPrintInfo(scip->messagehdlr, file, " Best Solution : %+21.14e\n", bestsol);
4926 }
4927 }
4928 else
4929 {
4930 /* display first primal bound line */
4931 firstprimalbound = scip->stat->firstprimalbound;
4932 SCIPmessageFPrintInfo(scip->messagehdlr, file, " First Solution : %+21.14e", firstprimalbound);
4933
4934 SCIPmessageFPrintInfo(scip->messagehdlr, file, " (in run %d, after %" SCIP_LONGINT_FORMAT " nodes, %.2f seconds, depth %d, found by <%s>)\n",
4935 scip->stat->nrunsbeforefirst,
4936 scip->stat->nnodesbeforefirst,
4937 scip->stat->firstprimaltime,
4938 scip->stat->firstprimaldepth,
4939 ( scip->stat->firstprimalheur != NULL )
4940 ? ( SCIPheurGetName(scip->stat->firstprimalheur) )
4941 : (( scip->stat->nrunsbeforefirst == 0 ) ? "initial" : "relaxation"));
4942
4943 if( SCIPisInfinity(scip, scip->stat->firstsolgap) )
4944 SCIPmessageFPrintInfo(scip->messagehdlr, file, " Gap First Sol. : infinite\n");
4945 else
4946 SCIPmessageFPrintInfo(scip->messagehdlr, file, " Gap First Sol. : %10.2f %%\n", 100.0 * scip->stat->firstsolgap);
4947
4948 if( SCIPisInfinity(scip, scip->stat->lastsolgap) )
4949 SCIPmessageFPrintInfo(scip->messagehdlr, file, " Gap Last Sol. : infinite\n");
4950 else
4951 SCIPmessageFPrintInfo(scip->messagehdlr, file, " Gap Last Sol. : %10.2f %%\n", 100.0 * scip->stat->lastsolgap);
4952
4953 SCIPmessageFPrintInfo(scip->messagehdlr, file, " Primal Bound : %+21.14e", primalbound);
4954
4955 SCIPmessageFPrintInfo(scip->messagehdlr, file, " (in run %d, after %" SCIP_LONGINT_FORMAT " nodes, %.2f seconds, depth %d, found by <%s>)\n",
4956 SCIPsolGetRunnum(scip->primal->sols[0]),
4957 SCIPsolGetNodenum(scip->primal->sols[0]),
4958 SCIPsolGetTime(scip->primal->sols[0]),
4959 SCIPsolGetDepth(scip->primal->sols[0]),
4960 SCIPsolGetHeur(scip->primal->sols[0]) != NULL
4961 ? SCIPheurGetName(SCIPsolGetHeur(scip->primal->sols[0]))
4962 : (SCIPsolGetRunnum(scip->primal->sols[0]) == 0 ? "initial" : "relaxation"));
4963 }
4964 }
4965
4966 if( SCIPsetIsInfinity(scip->set, REALABS(dualbound)) )
4967 SCIPmessageFPrintInfo(scip->messagehdlr, file, " Dual Bound : -\n");
4968 else
4969 SCIPmessageFPrintInfo(scip->messagehdlr, file, " Dual Bound : %+21.14e\n", dualbound);
4970
4971 if( SCIPsetIsInfinity(scip->set, gap) )
4972 SCIPmessageFPrintInfo(scip->messagehdlr, file, " Gap : infinite\n");
4973 else
4974 SCIPmessageFPrintInfo(scip->messagehdlr, file, " Gap : %10.2f %%\n", 100.0 * gap);
4975
4976 /* print exact bounds */
4977 if( SCIPisExact(scip) )
4978 {
4980
4982 SCIPmessageFPrintInfo(scip->messagehdlr, file, " Exact Prim. Bound: ");
4984 SCIPrationalMessage(scip->messagehdlr, file, objval);
4985 SCIPmessageFPrintInfo(scip->messagehdlr, file, "\n");
4986 SCIPmessageFPrintInfo(scip->messagehdlr, file, " Exact Dual Bound : ");
4988 SCIPrationalMessage(scip->messagehdlr, file, objval);
4989 SCIPmessageFPrintInfo(scip->messagehdlr, file, "\n");
4991 }
4992
4993 if( scip->set->misc_calcintegral )
4994 {
4995 int s;
4996 const char* names[] = {
4997 "primal-dual",
4998 "primal-ref",
4999 "dual-ref"
5000 };
5001 SCIPmessageFPrintInfo(scip->messagehdlr, file, "Integrals : Total Avg%%\n");
5002 if( SCIPgetStatus(scip) == SCIP_STATUS_INFEASIBLE && ! objlimitreached )
5003 {
5004 for( s = 0; s < 3; ++s )
5005 {
5006 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %-17s: %10s %10s (problem infeasible)\n",
5007 names[s], "-", "-");
5008 }
5009 }
5010 else
5011 {
5012 SCIP_Real integrals[3];
5013 SCIP_Real solvingtime = SCIPgetSolvingTime(scip);
5014
5015 if( !SCIPisFeasZero(scip, solvingtime) )
5016 {
5017 integrals[0] = SCIPstatGetPrimalDualIntegral(scip->stat, scip->set, scip->transprob, scip->origprob, TRUE);
5018
5019 if( scip->set->misc_referencevalue != SCIP_INVALID ) /*lint !e777*/
5020 {
5021 integrals[1] = SCIPstatGetPrimalReferenceIntegral(scip->stat, scip->set, scip->transprob, scip->origprob, FALSE);
5022 integrals[2] = SCIPstatGetDualReferenceIntegral(scip->stat, scip->set, scip->transprob, scip->origprob, FALSE);
5023 }
5024 else
5025 integrals[1] = integrals[2] = SCIP_INVALID;
5026 }
5027 else
5028 {
5029 BMSclearMemoryArray(integrals, 3);
5030 }
5031
5032 /* print integrals, if computed */
5033 for( s = 0; s < 3; ++s )
5034 {
5035 if( integrals[s] == SCIP_INVALID ) /*lint !e777*/
5036 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %-17s: - - (not evaluated)\n", names[s]);
5037 else
5038 {
5039 SCIP_Real avg = integrals[s] / MAX(solvingtime,1e-6);
5040
5041 /* caution: this assert is non-deterministic since it depends on the solving time */
5042 assert(0.0 <= avg && SCIPisLE(scip, avg, 100.0));
5043 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %-17s: %10.2f %10.2f\n", names[s], integrals[s], avg);
5044 }
5045 }
5046 }
5047 }
5048}
5049
5050/** collects solution statistics in a SCIP_DATATREE object */
5052 SCIP* scip, /**< SCIP data structure */
5053 SCIP_DATATREE* datatree /**< data tree */
5054 )
5055{
5056 SCIP_Real firstprimalbound;
5057 SCIP_Real primalbound;
5058 SCIP_Real dualbound;
5059 SCIP_Real gap;
5060 SCIP_Bool objlimitreached;
5061
5062 assert(scip != NULL);
5063 assert(datatree != NULL);
5064 assert(scip->stat != NULL);
5065 assert(scip->primal != NULL);
5066
5067 SCIP_CALL( SCIPcheckStage(scip, "SCIPcollectSolutionStatistics", FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
5068
5069 /* Basic statistics */
5070 primalbound = SCIPgetPrimalbound(scip);
5071 dualbound = SCIPgetDualbound(scip);
5072 gap = SCIPgetGap(scip);
5073 SCIP_CALL( SCIPinsertDatatreeLong(scip, datatree, "solutions_found", scip->primal->nsolsfound) );
5074 SCIP_CALL( SCIPinsertDatatreeLong(scip, datatree, "improvements", scip->primal->nbestsolsfound) );
5075 SCIP_CALL( SCIPinsertDatatreeReal(scip, datatree, "primal_bound", primalbound) );
5076 SCIP_CALL( SCIPinsertDatatreeReal(scip, datatree, "dual_bound", dualbound) );
5077 SCIP_CALL( SCIPinsertDatatreeReal(scip, datatree, "gap", gap) );
5078
5079 /* Exact bounds */
5080 if( SCIPisExact(scip) )
5081 {
5083 char strbuffer[SCIP_MAXSTRLEN];
5084
5086
5089 SCIPwarningMessage(scip, "string encoding of exact primal bound too long: printing \"unknown\" into JSON\n");
5090 SCIP_CALL( SCIPinsertDatatreeString(scip, datatree, "exact_primal_bound", strbuffer) );
5091
5094 SCIPwarningMessage(scip, "string encoding of exact dual bound too long: printing \"unknown\" into JSON\n");
5095 SCIP_CALL( SCIPinsertDatatreeString(scip, datatree, "exact_dual_bound", strbuffer) );
5096
5098 }
5099
5100 /* Objective limit reached */
5101 objlimitreached = (SCIPgetStage(scip) == SCIP_STAGE_SOLVED) && (scip->primal->nlimsolsfound == 0) &&
5103 SCIP_CALL( SCIPinsertDatatreeBool(scip, datatree, "objective_limit_reached", objlimitreached) );
5104
5105 /* First solution statistics */
5106 firstprimalbound = scip->stat->firstprimalbound;
5107 SCIP_CALL( SCIPinsertDatatreeReal(scip, datatree, "first_primal_bound", firstprimalbound) );
5108 SCIP_CALL( SCIPinsertDatatreeReal(scip, datatree, "first_solution_time", scip->stat->firstprimaltime) );
5109 SCIP_CALL( SCIPinsertDatatreeLong(scip, datatree, "first_solution_nodes", scip->stat->nnodesbeforefirst) );
5110 SCIP_CALL( SCIPinsertDatatreeInt(scip, datatree, "first_solution_depth", scip->stat->firstprimaldepth) );
5111
5112 return SCIP_OKAY;
5113}
5114
5115/** outputs concurrent solver statistics
5116 *
5117 * @pre This method can be called if SCIP is in one of the following stages:
5118 * - \ref SCIP_STAGE_TRANSFORMED
5119 * - \ref SCIP_STAGE_INITPRESOLVE
5120 * - \ref SCIP_STAGE_PRESOLVING
5121 * - \ref SCIP_STAGE_EXITPRESOLVE
5122 * - \ref SCIP_STAGE_PRESOLVED
5123 * - \ref SCIP_STAGE_SOLVING
5124 * - \ref SCIP_STAGE_SOLVED
5125 */
5127 SCIP* scip, /**< SCIP data structure */
5128 FILE* file /**< output file */
5129 )
5130{
5131 SCIP_CONCSOLVER** concsolvers;
5132 int nconcsolvers;
5133 int i;
5134 int winner;
5135
5136 assert(scip != NULL);
5137 assert(scip->set != NULL);
5138
5139 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPprintConcsolverStatistics", FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
5140
5141 if( !SCIPsyncstoreIsInitialized(scip->syncstore) )
5142 return;
5143
5144 nconcsolvers = SCIPgetNConcurrentSolvers(scip);
5145 concsolvers = SCIPgetConcurrentSolvers(scip);
5146 winner = SCIPsyncstoreGetWinner(scip->syncstore);
5147
5148 if( nconcsolvers > 0 )
5149 {
5150 SCIPmessageFPrintInfo(scip->messagehdlr, file, "Concurrent Solvers : SolvingTime SyncTime Nodes LP Iters SolsShared SolsRecvd TighterBnds TighterIntBnds\n");
5151 for( i = 0; i < nconcsolvers; ++i )
5152 {
5153 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %c%-16s: %11.2f %11.2f %11" SCIP_LONGINT_FORMAT " %11" SCIP_LONGINT_FORMAT "%11" SCIP_LONGINT_FORMAT " %11" SCIP_LONGINT_FORMAT " %11" SCIP_LONGINT_FORMAT " %14" SCIP_LONGINT_FORMAT "\n",
5154 winner == i ? '*' : ' ',
5155 SCIPconcsolverGetName(concsolvers[i]),
5156 SCIPconcsolverGetSolvingTime(concsolvers[i]),
5157 SCIPconcsolverGetSyncTime(concsolvers[i]),
5158 SCIPconcsolverGetNNodes(concsolvers[i]),
5159 SCIPconcsolverGetNLPIterations(concsolvers[i]),
5160 SCIPconcsolverGetNSolsShared(concsolvers[i]),
5161 SCIPconcsolverGetNSolsRecvd(concsolvers[i]),
5162 SCIPconcsolverGetNTighterBnds(concsolvers[i]),
5164 );
5165 }
5166 }
5167}
5168
5169/** collects concurrent solver statistics in a SCIP_DATATREE object */
5171 SCIP* scip, /**< SCIP data structure */
5172 SCIP_DATATREE* datatree /**< data tree */
5173 )
5174{
5175 SCIP_DATATREE* concsolverstree;
5176 SCIP_CONCSOLVER** concsolvers;
5177 int nconcsolvers;
5178 int winner;
5179 int i;
5180
5181 assert(scip != NULL);
5182 assert(datatree != NULL);
5183 assert(scip->set != NULL);
5184
5185 SCIP_CALL( SCIPcheckStage(scip, "SCIPcollectConcsolverStatistics", FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
5186
5187 if( !SCIPsyncstoreIsInitialized(scip->syncstore) )
5188 return SCIP_OKAY;
5189
5190 nconcsolvers = SCIPgetNConcurrentSolvers(scip);
5191 concsolvers = SCIPgetConcurrentSolvers(scip);
5192 winner = SCIPsyncstoreGetWinner(scip->syncstore);
5193
5194 if( nconcsolvers == 0 )
5195 return SCIP_OKAY;
5196
5197 /* Create a subtree for concurrent solvers */
5198 SCIP_CALL( SCIPcreateDatatreeInTree(scip, datatree, &concsolverstree, "concurrent_solvers", nconcsolvers) );
5199
5200 for( i = 0; i < nconcsolvers; ++i )
5201 {
5202 SCIP_CONCSOLVER* solver = concsolvers[i];
5203 SCIP_DATATREE* solverdata;
5204
5205 SCIP_CALL( SCIPcreateDatatreeInTree(scip, concsolverstree, &solverdata, SCIPconcsolverGetName(solver), 9) );
5206
5207 SCIP_CALL( SCIPinsertDatatreeInt(scip, solverdata, "is_winner", winner == i) );
5208 SCIP_CALL( SCIPinsertDatatreeReal(scip, solverdata, "solving_time", SCIPconcsolverGetSolvingTime(solver)) );
5209 SCIP_CALL( SCIPinsertDatatreeReal(scip, solverdata, "sync_time", SCIPconcsolverGetSyncTime(solver)) );
5210 SCIP_CALL( SCIPinsertDatatreeLong(scip, solverdata, "nodes", SCIPconcsolverGetNNodes(solver)) );
5211 SCIP_CALL( SCIPinsertDatatreeLong(scip, solverdata, "lp_iterations", SCIPconcsolverGetNLPIterations(solver)) );
5212 SCIP_CALL( SCIPinsertDatatreeLong(scip, solverdata, "solutions_shared", SCIPconcsolverGetNSolsShared(solver)) );
5213 SCIP_CALL( SCIPinsertDatatreeLong(scip, solverdata, "solutions_received", SCIPconcsolverGetNSolsRecvd(solver)) );
5214 SCIP_CALL( SCIPinsertDatatreeLong(scip, solverdata, "tighter_bounds", SCIPconcsolverGetNTighterBnds(solver)) );
5215 SCIP_CALL( SCIPinsertDatatreeLong(scip, solverdata, "tighter_integer_bounds", SCIPconcsolverGetNTighterIntBnds(solver)) );
5216 }
5217
5218 return SCIP_OKAY;
5219}
5220
5221/** display Benders' decomposition statistics */
5223 SCIP* scip, /**< SCIP data structure */
5224 FILE* file /**< output file */
5225 )
5226{
5227 SCIP_BENDERS** benders;
5228 int nbenders;
5229 int i;
5230
5231 assert(scip != NULL);
5232 assert(scip->set != NULL);
5233
5234 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPprintBendersStatistics", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
5235
5236 if( SCIPgetNActiveBenders(scip) == 0 )
5237 return;
5238
5239 nbenders = SCIPgetNBenders(scip);
5240 benders = SCIPgetBenders(scip);
5241
5242 SCIPmessageFPrintInfo(scip->messagehdlr, file, "Benders Decomp : ExecTime SetupTime Calls Found Transfer StrCalls StrFails StrCuts\n");
5243 for( i = 0; i < nbenders; ++i )
5244 {
5245 if( SCIPbendersIsActive(benders[i]) )
5246 {
5247 SCIP_BENDERSCUT** benderscuts;
5248 int nbenderscuts;
5249 int j;
5250
5251 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %-17.17s: %10.2f %10.2f %10d %10d %10d %10d %10d %10d\n",
5252 SCIPbendersGetName(scip->set->benders[i]),
5253 SCIPbendersGetTime(scip->set->benders[i]),
5254 SCIPbendersGetSetupTime(scip->set->benders[i]),
5255 SCIPbendersGetNCalls(scip->set->benders[i]),
5256 SCIPbendersGetNCutsFound(scip->set->benders[i]),
5257 SCIPbendersGetNTransferredCuts(scip->set->benders[i]),
5258 SCIPbendersGetNStrengthenCalls(scip->set->benders[i]),
5259 SCIPbendersGetNStrengthenFails(scip->set->benders[i]),
5260 SCIPbendersGetNStrengthenCutsFound(scip->set->benders[i]));
5261
5262 nbenderscuts = SCIPbendersGetNBenderscuts(scip->set->benders[i]);
5263 benderscuts = SCIPbendersGetBenderscuts(scip->set->benders[i]);
5264
5265 for( j = 0; j < nbenderscuts; j++ )
5266 {
5267 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %-15.17s: %10.2f %10.2f %10" SCIP_LONGINT_FORMAT " %10" SCIP_LONGINT_FORMAT " -\n",
5268 SCIPbenderscutGetName(benderscuts[j]),
5269 SCIPbenderscutGetTime(benderscuts[j]),
5270 SCIPbenderscutGetSetupTime(benderscuts[j]),
5271 SCIPbenderscutGetNCalls(benderscuts[j]),
5272 SCIPbenderscutGetNFound(benderscuts[j]));
5273 }
5274 }
5275 }
5276}
5277
5278/** collects Benders' decomposition statistics in a SCIP_DATATREE object */
5280 SCIP* scip, /**< SCIP data structure */
5281 SCIP_DATATREE* datatree /**< data tree */
5282 )
5283{
5284 SCIP_DATATREE* benderstree;
5285 SCIP_BENDERS** benders;
5286 int nbenders;
5287 int i;
5288
5289 assert(scip != NULL);
5290 assert(datatree != NULL);
5291
5292 SCIP_CALL( SCIPcheckStage(scip, "SCIPcollectBendersStatistics", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
5293
5294 if( SCIPgetNActiveBenders(scip) == 0 )
5295 return SCIP_OKAY;
5296
5297 nbenders = SCIPgetNBenders(scip);
5298 benders = SCIPgetBenders(scip);
5299
5300 /* Create a subtree for Benders statistics */
5301 SCIP_CALL( SCIPcreateDatatreeInTree(scip, datatree, &benderstree, "plugins", nbenders) );
5302
5303 for( i = 0; i < nbenders; ++i )
5304 {
5305 if( SCIPbendersIsActive(benders[i]) )
5306 {
5307 SCIP_BENDERSCUT** benderscuts = SCIPbendersGetBenderscuts(benders[i]);
5308 int nbenderscuts = SCIPbendersGetNBenderscuts(benders[i]);
5309 SCIP_DATATREE* bendersdata;
5310
5311 SCIP_CALL( SCIPcreateDatatreeInTree(scip, benderstree, &bendersdata, SCIPbendersGetName(benders[i]), 9 + nbenderscuts) );
5312
5313 SCIP_CALL( SCIPinsertDatatreeString(scip, bendersdata, "description", SCIPbendersGetDesc(benders[i])) );
5314 SCIP_CALL( SCIPinsertDatatreeReal(scip, bendersdata, "exec_time", SCIPbendersGetTime(benders[i])) );
5315 SCIP_CALL( SCIPinsertDatatreeReal(scip, bendersdata, "setup_time", SCIPbendersGetSetupTime(benders[i])) );
5316 SCIP_CALL( SCIPinsertDatatreeInt(scip, bendersdata, "calls", SCIPbendersGetNCalls(benders[i])) );
5317 SCIP_CALL( SCIPinsertDatatreeInt(scip, bendersdata, "cuts_found", SCIPbendersGetNCutsFound(benders[i])) );
5318 SCIP_CALL( SCIPinsertDatatreeInt(scip, bendersdata, "cuts_transferred", SCIPbendersGetNTransferredCuts(benders[i])) );
5319 SCIP_CALL( SCIPinsertDatatreeInt(scip, bendersdata, "strength_calls", SCIPbendersGetNStrengthenCalls(benders[i])) );
5320 SCIP_CALL( SCIPinsertDatatreeInt(scip, bendersdata, "strength_failures", SCIPbendersGetNStrengthenFails(benders[i])) );
5321 SCIP_CALL( SCIPinsertDatatreeInt(scip, bendersdata, "strength_cuts_found", SCIPbendersGetNStrengthenCutsFound(benders[i])) );
5322
5323 /* Collect statistics for Benders' cuts */
5324 for( int j = 0; j < nbenderscuts; ++j )
5325 {
5326 SCIP_DATATREE* benderscutdata;
5327
5328 SCIP_CALL( SCIPcreateDatatreeInTree(scip, bendersdata, &benderscutdata, SCIPbenderscutGetName(benderscuts[j]), 5) );
5329
5330 SCIP_CALL( SCIPinsertDatatreeString(scip, benderscutdata, "description", SCIPbenderscutGetDesc(benderscuts[j])) );
5331 SCIP_CALL( SCIPinsertDatatreeReal(scip, benderscutdata, "exec_time", SCIPbenderscutGetTime(benderscuts[j])) );
5332 SCIP_CALL( SCIPinsertDatatreeReal(scip, benderscutdata, "setup_time", SCIPbenderscutGetSetupTime(benderscuts[j])) );
5333 SCIP_CALL( SCIPinsertDatatreeLong(scip, benderscutdata, "calls", SCIPbenderscutGetNCalls(benderscuts[j])) );
5334 SCIP_CALL( SCIPinsertDatatreeLong(scip, benderscutdata, "cuts_found", SCIPbenderscutGetNFound(benderscuts[j])) );
5335 }
5336 }
5337 }
5338
5339 return SCIP_OKAY;
5340}
5341
5342/** outputs root statistics
5343 *
5344 * @pre This method can be called if SCIP is in one of the following stages:
5345 * - \ref SCIP_STAGE_SOLVING
5346 * - \ref SCIP_STAGE_SOLVED
5347 */
5349 SCIP* scip, /**< SCIP data structure */
5350 FILE* file /**< output file */
5351 )
5352{
5353 SCIP_Real dualboundroot;
5354 SCIP_Real firstdualboundroot;
5355 SCIP_Real firstlptime;
5356 SCIP_Real firstlpspeed;
5357
5358 assert(scip != NULL);
5359 assert(scip->stat != NULL);
5360 assert(scip->primal != NULL);
5361
5362 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPprintRootStatistics", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
5363
5364 dualboundroot = SCIPgetDualboundRoot(scip);
5365 firstdualboundroot = SCIPgetFirstLPDualboundRoot(scip);
5366 firstlptime = SCIPgetFirstLPTime(scip);
5367
5368 if( firstlptime > 0.0 )
5369 firstlpspeed = (SCIP_Real)scip->stat->nrootfirstlpiterations/firstlptime;
5370 else
5371 firstlpspeed = 0.0;
5372
5373 SCIPmessageFPrintInfo(scip->messagehdlr, file, "Root Node :\n");
5374 if( SCIPsetIsInfinity(scip->set, REALABS(firstdualboundroot)) )
5375 SCIPmessageFPrintInfo(scip->messagehdlr, file, " First LP value : -\n");
5376 else
5377 SCIPmessageFPrintInfo(scip->messagehdlr, file, " First LP value : %+21.14e\n", firstdualboundroot);
5378 if( firstlpspeed > 0.0 )
5379 SCIPmessageFPrintInfo(scip->messagehdlr, file, " First LP Iters : %10" SCIP_LONGINT_FORMAT " (%.2f Iter/sec)\n",
5380 scip->stat->nrootfirstlpiterations,
5381 (SCIP_Real)scip->stat->nrootfirstlpiterations/firstlptime);
5382 else
5383 SCIPmessageFPrintInfo(scip->messagehdlr, file, " First LP Iters : %10" SCIP_LONGINT_FORMAT "\n", scip->stat->nrootfirstlpiterations);
5384 SCIPmessageFPrintInfo(scip->messagehdlr, file, " First LP Time : %10.2f\n", firstlptime);
5385
5386 if( SCIPsetIsInfinity(scip->set, REALABS(dualboundroot)) )
5387 SCIPmessageFPrintInfo(scip->messagehdlr, file, " Final Dual Bound : -\n");
5388 else
5389 SCIPmessageFPrintInfo(scip->messagehdlr, file, " Final Dual Bound : %+21.14e\n", dualboundroot);
5390 SCIPmessageFPrintInfo(scip->messagehdlr, file, " Final Root Iters : %10" SCIP_LONGINT_FORMAT "\n", scip->stat->nrootlpiterations);
5391
5392 SCIPmessageFPrintInfo(scip->messagehdlr, file, " Root LP Estimate : ");
5393 if( scip->stat->rootlpbestestimate != SCIP_INVALID ) /*lint !e777*/
5394 {
5395 SCIPmessageFPrintInfo(scip->messagehdlr, file, "%+21.14e\n", SCIPretransformObj(scip, scip->stat->rootlpbestestimate));
5396 }
5397 else
5398 SCIPmessageFPrintInfo(scip->messagehdlr, file, "%21s\n","-");
5399}
5400
5401/** collects root node statistics in a SCIP_DATATREE object */
5403 SCIP* scip, /**< SCIP data structure */
5404 SCIP_DATATREE* datatree /**< data tree */
5405 )
5406{
5407 SCIP_Real dualboundroot;
5408 SCIP_Real firstdualboundroot;
5409 SCIP_Real firstlptime;
5410 SCIP_Real firstlpspeed;
5411
5412 assert(scip != NULL);
5413 assert(datatree != NULL);
5414 assert(scip->stat != NULL);
5415 assert(scip->primal != NULL);
5416
5417 SCIP_CALL( SCIPcheckStage(scip, "SCIPcollectRootStatistics", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
5418
5419 dualboundroot = SCIPgetDualboundRoot(scip);
5420 firstdualboundroot = SCIPgetFirstLPDualboundRoot(scip);
5421 firstlptime = SCIPgetFirstLPTime(scip);
5422
5423 if( firstlptime > 0.0 )
5424 firstlpspeed = (SCIP_Real)scip->stat->nrootfirstlpiterations / firstlptime;
5425 else
5426 firstlpspeed = 0.0;
5427
5428 SCIP_CALL( SCIPinsertDatatreeReal(scip, datatree, "first_lp_value", firstdualboundroot) );
5429 SCIP_CALL( SCIPinsertDatatreeLong(scip, datatree, "first_lp_iterations", scip->stat->nrootfirstlpiterations) );
5430 SCIP_CALL( SCIPinsertDatatreeReal(scip, datatree, "first_lp_speed", firstlpspeed) );
5431 SCIP_CALL( SCIPinsertDatatreeReal(scip, datatree, "first_lp_time", firstlptime) );
5432 SCIP_CALL( SCIPinsertDatatreeReal(scip, datatree, "final_dual_bound", dualboundroot) );
5433 SCIP_CALL( SCIPinsertDatatreeLong(scip, datatree, "final_root_iterations", scip->stat->nrootlpiterations) );
5434
5435 if( scip->stat->rootlpbestestimate != SCIP_INVALID ) /*lint !e777*/
5436 {
5437 SCIP_CALL( SCIPinsertDatatreeReal(scip, datatree, "root_lp_estimate", SCIPretransformObj(scip, scip->stat->rootlpbestestimate)) );
5438 }
5439
5440 return SCIP_OKAY;
5441}
5442
5443/** outputs timing statistics
5444 *
5445 * @pre This method can be called if SCIP is in one of the following stages:
5446 * - \ref SCIP_STAGE_PROBLEM
5447 * - \ref SCIP_STAGE_TRANSFORMED
5448 * - \ref SCIP_STAGE_INITPRESOLVE
5449 * - \ref SCIP_STAGE_PRESOLVING
5450 * - \ref SCIP_STAGE_EXITPRESOLVE
5451 * - \ref SCIP_STAGE_PRESOLVED
5452 * - \ref SCIP_STAGE_SOLVING
5453 * - \ref SCIP_STAGE_SOLVED
5454 */
5456 SCIP* scip, /**< SCIP data structure */
5457 FILE* file /**< output file */
5458 )
5459{
5460 SCIP_Real readingtime;
5461
5462 assert(scip != NULL);
5463 assert(scip->set != NULL);
5464
5465 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPprintTimingStatistics", FALSE, TRUE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
5466
5467 readingtime = SCIPgetReadingTime(scip);
5468
5470 {
5471 SCIPmessageFPrintInfo(scip->messagehdlr, file, "Total Time : %10.2f\n", readingtime);
5472 SCIPmessageFPrintInfo(scip->messagehdlr, file, " reading : %10.2f\n", readingtime);
5473 }
5474 else
5475 {
5476 SCIP_Real totaltime;
5477 SCIP_Real solvingtime;
5478
5479 solvingtime = SCIPclockGetTime(scip->stat->solvingtime);
5480
5481 if( scip->set->time_reading )
5482 totaltime = solvingtime;
5483 else
5484 totaltime = solvingtime + readingtime;
5485
5486 SCIPmessageFPrintInfo(scip->messagehdlr, file, "Total Time : %10.2f\n", totaltime);
5487 SCIPmessageFPrintInfo(scip->messagehdlr, file, " solving : %10.2f\n", solvingtime);
5488 SCIPmessageFPrintInfo(scip->messagehdlr, file, " presolving : %10.2f (included in solving)\n", SCIPclockGetTime(scip->stat->presolvingtime));
5489 SCIPmessageFPrintInfo(scip->messagehdlr, file, " reading : %10.2f%s\n", readingtime, scip->set->time_reading ? " (included in solving)" : "");
5490
5491 if( scip->stat->ncopies > 0 )
5492 {
5493 SCIP_Real copytime;
5494
5495 copytime = SCIPclockGetTime(scip->stat->copyclock);
5496
5497 SCIPmessageFPrintInfo(scip->messagehdlr, file, " copying : %10.2f (%d #copies) (minimal %.2f, maximal %.2f, average %.2f)\n",
5498 copytime, scip->stat->ncopies, scip->stat->mincopytime, scip->stat->maxcopytime, copytime / scip->stat->ncopies);
5499 }
5500 else
5501 SCIPmessageFPrintInfo(scip->messagehdlr, file, " copying : %10.2f %s\n", 0.0, "(0 times copied the problem)");
5502 }
5503}
5504
5505/** collects timing statistics in SCIP_DATATREE
5506 *
5507 * The following keys are set:
5508 * - "total_time": Total time spent in SCIP.
5509 * - "solving_time": Time spent solving the problem.
5510 * - "presolving_time": Time spent in presolving.
5511 * - "reading_time": Time spent reading the problem.
5512 * - "copy_time": Time spent copying the problem (if applicable).
5513 *
5514 * @pre This method can be called if SCIP is in one of the following stages:
5515 * - \ref SCIP_STAGE_PROBLEM
5516 * - \ref SCIP_STAGE_TRANSFORMED
5517 * - \ref SCIP_STAGE_INITPRESOLVE
5518 * - \ref SCIP_STAGE_PRESOLVING
5519 * - \ref SCIP_STAGE_EXITPRESOLVE
5520 * - \ref SCIP_STAGE_PRESOLVED
5521 * - \ref SCIP_STAGE_SOLVING
5522 * - \ref SCIP_STAGE_SOLVED
5523 */
5525 SCIP* scip, /**< SCIP data structure */
5526 SCIP_DATATREE* datatree /**< data tree */
5527 )
5528{
5529 SCIP_Real readingtime;
5530
5531 readingtime = SCIPgetReadingTime(scip);
5533 {
5534 SCIP_CALL( SCIPinsertDatatreeReal(scip, datatree, "total_time", readingtime) );
5535 SCIP_CALL( SCIPinsertDatatreeReal(scip, datatree, "reading_time", readingtime) );
5536 }
5537 else
5538 {
5539 SCIP_Real totaltime;
5540 SCIP_Real solvingtime;
5541
5542 solvingtime = SCIPclockGetTime(scip->stat->solvingtime);
5543
5544 if( scip->set->time_reading )
5545 totaltime = solvingtime;
5546 else
5547 totaltime = solvingtime + readingtime;
5548 SCIP_CALL( SCIPinsertDatatreeReal(scip, datatree, "total_time", totaltime) );
5549 SCIP_CALL( SCIPinsertDatatreeReal(scip, datatree, "solving_time", solvingtime) );
5550 SCIP_CALL( SCIPinsertDatatreeReal(scip, datatree, "presolving_time", SCIPclockGetTime(scip->stat->presolvingtime)) );
5551 SCIP_CALL( SCIPinsertDatatreeReal(scip, datatree, "reading_time", readingtime) );
5552
5553 if( scip->stat->ncopies > 0 )
5554 {
5555 SCIP_Real copytime;
5556
5557 copytime = SCIPclockGetTime(scip->stat->copyclock);
5558 SCIP_CALL( SCIPinsertDatatreeReal(scip, datatree, "copy_time", copytime) );
5559 }
5560 }
5561
5562 return SCIP_OKAY;
5563}
5564
5565/** outputs expression handler statistics
5566 *
5567 * @pre This method can be called if SCIP is in one of the following stages:
5568 * - \ref SCIP_STAGE_PROBLEM
5569 * - \ref SCIP_STAGE_TRANSFORMED
5570 * - \ref SCIP_STAGE_INITPRESOLVE
5571 * - \ref SCIP_STAGE_PRESOLVING
5572 * - \ref SCIP_STAGE_EXITPRESOLVE
5573 * - \ref SCIP_STAGE_PRESOLVED
5574 * - \ref SCIP_STAGE_SOLVING
5575 * - \ref SCIP_STAGE_SOLVED
5576 */
5578 SCIP* scip, /**< SCIP data structure */
5579 FILE* file /**< output file */
5580 )
5581{
5582 SCIP_Bool headerprinted = FALSE;
5583 int i;
5584
5585 assert(scip != NULL);
5586 assert(scip->set != NULL);
5587
5588 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPprintExpressionHandlerStatistics", FALSE, TRUE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
5589
5590 for( i = 0; i < scip->set->nexprhdlrs; ++i )
5591 {
5592 SCIP_EXPRHDLR* exprhdlr = scip->set->exprhdlrs[i];
5593 assert(exprhdlr != NULL);
5594
5595 /* skip unused expression handler */
5596 if( SCIPexprhdlrGetNCreated(exprhdlr) == 0 )
5597 continue;
5598
5599 if( !headerprinted )
5600 {
5601 SCIPmessageFPrintInfo(scip->messagehdlr, file,
5602 "Expressions : %10s %10s %10s %10s %10s %10s %10s %10s %10s %10s %10s %10s\n",
5603 "#IntEval", "IntEvalTi", "#RevProp", "RevPropTi", "DomReds", "Cutoffs", "#Estimate", "EstimTime", "Branching", "#Simplify", "SimplifyTi", "Simplified");
5604 headerprinted = TRUE;
5605 }
5606
5607 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %-17s:", SCIPexprhdlrGetName(exprhdlr));
5608 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %10lld", SCIPexprhdlrGetNIntevalCalls(exprhdlr));
5609 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %10.2f", SCIPexprhdlrGetIntevalTime(exprhdlr));
5610 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %10lld", SCIPexprhdlrGetNReversepropCalls(exprhdlr));
5611 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %10.2f", SCIPexprhdlrGetReversepropTime(exprhdlr));
5612 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %10lld", SCIPexprhdlrGetNDomainReductions(exprhdlr));
5613 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %10lld", SCIPexprhdlrGetNCutoffs(exprhdlr));
5614 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %10lld", SCIPexprhdlrGetNEstimateCalls(exprhdlr));
5615 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %10.2f", SCIPexprhdlrGetEstimateTime(exprhdlr));
5616 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %10lld", SCIPexprhdlrGetNBranchings(exprhdlr));
5617 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %10lld", SCIPexprhdlrGetNSimplifyCalls(exprhdlr));
5618 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %10.2f", SCIPexprhdlrGetSimplifyTime(exprhdlr));
5619 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %10lld", SCIPexprhdlrGetNSimplifications(exprhdlr));
5620 SCIPmessageFPrintInfo(scip->messagehdlr, file, "\n");
5621 }
5622}
5623
5624/** collects expression handler statistics in a SCIP_DATATREE object */
5626 SCIP* scip, /**< SCIP data structure */
5627 SCIP_DATATREE* datatree /**< data tree */
5628 )
5629{
5630 SCIP_DATATREE* exprhdlrstree;
5631 int i;
5632
5633 assert(scip != NULL);
5634 assert(datatree != NULL);
5635
5636 SCIP_CALL( SCIPcheckStage(scip, "SCIPcollectExpressionHandlerStatistics", FALSE, TRUE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
5637
5638 if( scip->set->nexprhdlrs == 0 )
5639 return SCIP_OKAY;
5640
5641 /* Create a subtree for expression handler statistics */
5642 SCIP_CALL( SCIPcreateDatatreeInTree(scip, datatree, &exprhdlrstree, "expression_handlers", scip->set->nexprhdlrs) );
5643
5644 for( i = 0; i < scip->set->nexprhdlrs; ++i )
5645 {
5646 SCIP_DATATREE* exprhdlrdata;
5647 SCIP_EXPRHDLR* exprhdlr = scip->set->exprhdlrs[i];
5648 assert(exprhdlr != NULL);
5649
5650 /* Skip unused expression handlers */
5651 if( SCIPexprhdlrGetNCreated(exprhdlr) == 0 )
5652 continue;
5653
5654 SCIP_CALL( SCIPcreateDatatreeInTree( scip, exprhdlrstree, &exprhdlrdata, SCIPexprhdlrGetName(exprhdlr), 13) );
5655
5656 SCIP_CALL( SCIPinsertDatatreeString(scip, exprhdlrdata, "description", SCIPexprhdlrGetDescription(exprhdlr)) );
5657 SCIP_CALL( SCIPinsertDatatreeLong(scip, exprhdlrdata, "inteval_calls", SCIPexprhdlrGetNIntevalCalls(exprhdlr)) );
5658 SCIP_CALL( SCIPinsertDatatreeReal(scip, exprhdlrdata, "inteval_time", SCIPexprhdlrGetIntevalTime(exprhdlr)) );
5659 SCIP_CALL( SCIPinsertDatatreeLong(scip, exprhdlrdata, "reverseprop_calls", SCIPexprhdlrGetNReversepropCalls(exprhdlr)) );
5660 SCIP_CALL( SCIPinsertDatatreeReal(scip, exprhdlrdata, "reverseprop_time", SCIPexprhdlrGetReversepropTime(exprhdlr)) );
5661 SCIP_CALL( SCIPinsertDatatreeLong(scip, exprhdlrdata, "domain_reductions", SCIPexprhdlrGetNDomainReductions(exprhdlr)) );
5662 SCIP_CALL( SCIPinsertDatatreeLong(scip, exprhdlrdata, "cutoffs", SCIPexprhdlrGetNCutoffs(exprhdlr)) );
5663 SCIP_CALL( SCIPinsertDatatreeLong(scip, exprhdlrdata, "estimate_calls", SCIPexprhdlrGetNEstimateCalls(exprhdlr)) );
5664 SCIP_CALL( SCIPinsertDatatreeReal(scip, exprhdlrdata, "estimate_time", SCIPexprhdlrGetEstimateTime(exprhdlr)) );
5665 SCIP_CALL( SCIPinsertDatatreeLong(scip, exprhdlrdata, "branchings", SCIPexprhdlrGetNBranchings(exprhdlr)) );
5666 SCIP_CALL( SCIPinsertDatatreeLong(scip, exprhdlrdata, "simplify_calls", SCIPexprhdlrGetNSimplifyCalls(exprhdlr)) );
5667 SCIP_CALL( SCIPinsertDatatreeReal(scip, exprhdlrdata, "simplify_time", SCIPexprhdlrGetSimplifyTime(exprhdlr)) );
5668 SCIP_CALL( SCIPinsertDatatreeLong(scip, exprhdlrdata, "simplifications", SCIPexprhdlrGetNSimplifications(exprhdlr)) );
5669 }
5670
5671 return SCIP_OKAY;
5672}
5673
5674/** outputs NLPI statistics
5675 *
5676 * @pre This method can be called if SCIP is in one of the following stages:
5677 * - \ref SCIP_STAGE_PROBLEM
5678 * - \ref SCIP_STAGE_TRANSFORMED
5679 * - \ref SCIP_STAGE_INITPRESOLVE
5680 * - \ref SCIP_STAGE_PRESOLVING
5681 * - \ref SCIP_STAGE_EXITPRESOLVE
5682 * - \ref SCIP_STAGE_PRESOLVED
5683 * - \ref SCIP_STAGE_SOLVING
5684 * - \ref SCIP_STAGE_SOLVED
5685 */
5687 SCIP* scip, /**< SCIP data structure */
5688 FILE* file /**< output file */
5689 )
5690{
5691 SCIP_Bool printedheader = FALSE;
5692 int i;
5693
5694 assert(scip != NULL);
5695 assert(scip->set != NULL);
5696
5697 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPprintNLPIStatistics", FALSE, TRUE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
5698
5699 for( i = 0; i < scip->set->nnlpis; ++i )
5700 {
5701 SCIP_Real solvetime;
5702 SCIP_Real evaltime = 0.0;
5703 SCIP_Longint niter;
5704 SCIP_NLPI* nlpi;
5705 int j;
5706
5707 nlpi = scip->set->nlpis[i];
5708 assert(nlpi != NULL);
5709
5710 /* skip unused NLP solver */
5711 if( SCIPnlpiGetNProblems(nlpi) == 0 )
5712 continue;
5713
5714 if( !printedheader )
5715 {
5716 SCIPmessageFPrintInfo(scip->messagehdlr, file,
5717 "NLP Solvers : %10s %10s %10s %10s %s%10s %10s"
5718 " %10s %10s %10s %10s %10s %10s %10s %10s %10s %10s"
5719 " %10s %10s %10s %10s %10s %10s %10s\n",
5720 "#Problems", "ProblemTi", "#Solves", "SolveTime",
5721 scip->set->time_nlpieval ? " EvalTime%" : "",
5722 "#Iter", "Time/Iter",
5723 "#Okay", "#TimeLimit", "#IterLimit", "#LObjLimit", "#Interrupt", "#NumError", "#EvalError", "#OutOfMem", "#LicenseEr", "#OtherTerm",
5724 "#GlobOpt", "#LocOpt", "#Feasible", "#LocInfeas", "#GlobInfea", "#Unbounded", "#Unknown"
5725 );
5726 printedheader = TRUE;
5727 }
5728
5729 solvetime = SCIPnlpiGetSolveTime(nlpi);
5730 if( scip->set->time_nlpieval )
5731 evaltime = SCIPnlpiGetEvalTime(nlpi);
5732 niter = SCIPnlpiGetNIterations(nlpi);
5733
5734 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %-17s:", SCIPnlpiGetName(nlpi));
5735 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %10d", SCIPnlpiGetNProblems(nlpi));
5736 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %10.2f", SCIPnlpiGetProblemTime(nlpi));
5737 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %10d", SCIPnlpiGetNSolves(nlpi));
5738 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %10.2f", solvetime);
5739 if( scip->set->time_nlpieval )
5740 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %10.2f", solvetime > 0.0 ? 100.0 * evaltime / solvetime : 0.0);
5741 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %10" SCIP_LONGINT_FORMAT, niter);
5742 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %10.2f", niter > 0 ? solvetime / niter : 0.0);
5743
5744 for( j = (int)SCIP_NLPTERMSTAT_OKAY; j <= (int)SCIP_NLPTERMSTAT_OTHER; ++j )
5745 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %10d", SCIPnlpiGetNTermStat(nlpi, (SCIP_NLPTERMSTAT)j));
5746
5747 for( j = (int)SCIP_NLPSOLSTAT_GLOBOPT; j <= (int)SCIP_NLPSOLSTAT_UNKNOWN; ++j )
5748 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %10d", SCIPnlpiGetNSolStat(nlpi, (SCIP_NLPSOLSTAT)j));
5749
5750 SCIPmessageFPrintInfo(scip->messagehdlr, file, "\n");
5751 }
5752}
5753
5754/** give name of NLP termination status as string */
5755static
5757 SCIP_NLPTERMSTAT termstat /**< NLP termination status */
5758 )
5759{
5760 switch(termstat)
5761 {
5762 case SCIP_NLPTERMSTAT_OKAY: return "okay";
5763 case SCIP_NLPTERMSTAT_TIMELIMIT: return "time_limit";
5764 case SCIP_NLPTERMSTAT_ITERLIMIT: return "iter_limit";
5765 case SCIP_NLPTERMSTAT_LOBJLIMIT: return "lower_obj_limit";
5766 case SCIP_NLPTERMSTAT_INTERRUPT: return "interrupt";
5767 case SCIP_NLPTERMSTAT_NUMERICERROR: return "numeric_error";
5768 case SCIP_NLPTERMSTAT_EVALERROR: return "eval_error";
5769 case SCIP_NLPTERMSTAT_OUTOFMEMORY: return "out_of_memory";
5770 case SCIP_NLPTERMSTAT_LICENSEERROR: return "license_error";
5771 case SCIP_NLPTERMSTAT_OTHER: return "other";
5772 default: return "unknown";
5773 }
5774}
5775
5776/** give name of NLP solution status as string */
5777static
5779 SCIP_NLPSOLSTAT solstat /**< NLP solution status */
5780 )
5781{
5782 switch(solstat)
5783 {
5784 case SCIP_NLPSOLSTAT_GLOBOPT: return "global_optimum";
5785 case SCIP_NLPSOLSTAT_LOCOPT: return "local_optimum";
5786 case SCIP_NLPSOLSTAT_FEASIBLE: return "feasible";
5787 case SCIP_NLPSOLSTAT_LOCINFEASIBLE: return "locally_infeasible";
5788 case SCIP_NLPSOLSTAT_GLOBINFEASIBLE: return "globally_infeasible";
5789 case SCIP_NLPSOLSTAT_UNBOUNDED: return "unbounded";
5790 case SCIP_NLPSOLSTAT_UNKNOWN: return "unknown";
5791 default: return "invalid";
5792 }
5793}
5794
5795/** collects NLPI statistics in a SCIP_DATATREE object */
5797 SCIP* scip, /**< SCIP data structure */
5798 SCIP_DATATREE* datatree /**< data tree */
5799 )
5800{
5801 SCIP_DATATREE* nlpistree;
5802 int i;
5803
5804 assert(scip != NULL);
5805 assert(datatree != NULL);
5806
5807 SCIP_CALL( SCIPcheckStage(scip, "SCIPcollectNLPIStatistics", FALSE, TRUE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
5808
5809 if( scip->set->nnlpis == 0 )
5810 return SCIP_OKAY;
5811
5812 /* Create a subtree for NLPI statistics */
5813 SCIP_CALL( SCIPcreateDatatreeInTree(scip, datatree, &nlpistree, "nlp_solvers", scip->set->nnlpis) );
5814
5815 for( i = 0; i < scip->set->nnlpis; ++i )
5816 {
5817 SCIP_DATATREE* nlpidata;
5818 SCIP_Real solvetime;
5819 SCIP_Real evaltime;
5820 SCIP_Longint niter;
5821
5822 SCIP_NLPI* nlpi = scip->set->nlpis[i];
5823 assert(nlpi != NULL);
5824
5825 /* Skip unused NLP solvers */
5826 if( SCIPnlpiGetNProblems(nlpi) == 0 )
5827 continue;
5828
5829 SCIP_CALL( SCIPcreateDatatreeInTree(scip, nlpistree, &nlpidata, SCIPnlpiGetName(nlpi), 8 + (int)SCIP_NLPTERMSTAT_OTHER + 1 + (int)SCIP_NLPSOLSTAT_UNKNOWN + 1) );
5830
5831 solvetime = SCIPnlpiGetSolveTime(nlpi);
5832 evaltime = scip->set->time_nlpieval ? SCIPnlpiGetEvalTime(nlpi) : 0.0;
5833 niter = SCIPnlpiGetNIterations(nlpi);
5834
5835 SCIP_CALL( SCIPinsertDatatreeString(scip, nlpidata, "description", SCIPnlpiGetDesc(nlpi)) );
5836 SCIP_CALL( SCIPinsertDatatreeInt(scip, nlpidata, "problems", SCIPnlpiGetNProblems(nlpi)) );
5837 SCIP_CALL( SCIPinsertDatatreeReal(scip, nlpidata, "problem_time", SCIPnlpiGetProblemTime(nlpi)) );
5838 SCIP_CALL( SCIPinsertDatatreeInt(scip, nlpidata, "solves", SCIPnlpiGetNSolves(nlpi)) );
5839 SCIP_CALL( SCIPinsertDatatreeReal(scip, nlpidata, "solve_time", solvetime) );
5840 if( scip->set->time_nlpieval )
5841 {
5842 SCIP_CALL( SCIPinsertDatatreeReal(scip, nlpidata, "eval_time_percentage", solvetime > 0.0 ? 100.0 * evaltime / solvetime : 0.0) );
5843 }
5844 SCIP_CALL( SCIPinsertDatatreeLong(scip, nlpidata, "iterations", niter) );
5845 SCIP_CALL( SCIPinsertDatatreeReal(scip, nlpidata, "time_per_iteration", niter > 0 ? solvetime / niter : 0.0) );
5846
5847 for( int j = (int)SCIP_NLPTERMSTAT_OKAY; j <= (int)SCIP_NLPTERMSTAT_OTHER; ++j )
5848 {
5850 }
5851
5852 for( int j = (int)SCIP_NLPSOLSTAT_GLOBOPT; j <= (int)SCIP_NLPSOLSTAT_UNKNOWN; ++j )
5853 {
5855 }
5856 }
5857
5858 return SCIP_OKAY;
5859}
5860
5861/** comparison method for statistics tables */
5862static
5864{ /*lint --e{715}*/
5865 return (SCIPtableGetPosition((SCIP_TABLE*)elem1) - (SCIPtableGetPosition((SCIP_TABLE*)elem2)));
5866}
5867
5868/** outputs solving statistics in JSON format
5869 *
5870 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
5871 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
5872 *
5873 * @note If limits have been changed between the solution and the call to this function, the status is recomputed and
5874 * thus may correspond to the original status.
5875 *
5876 * @pre This method can be called if SCIP is in one of the following stages:
5877 * - \ref SCIP_STAGE_INIT
5878 * - \ref SCIP_STAGE_PROBLEM
5879 * - \ref SCIP_STAGE_TRANSFORMED
5880 * - \ref SCIP_STAGE_INITPRESOLVE
5881 * - \ref SCIP_STAGE_PRESOLVING
5882 * - \ref SCIP_STAGE_EXITPRESOLVE
5883 * - \ref SCIP_STAGE_PRESOLVED
5884 * - \ref SCIP_STAGE_SOLVING
5885 * - \ref SCIP_STAGE_SOLVED
5886 */
5888 SCIP* scip, /**< SCIP data structure */
5889 FILE* file /**< output file (or NULL for standard output) */
5890 )
5891{
5892 SCIP_DATATREE* datatree;
5893 SCIP_DATATREE* tabledatatree;
5894 SCIP_TABLE** tables;
5895 int ntables;
5896 int i;
5897
5898 assert(scip != NULL);
5899 assert(scip->set != NULL);
5900
5901 SCIP_CALL( SCIPcheckStage(scip, "SCIPprintStatisticsJson", TRUE, TRUE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
5902
5903 ntables = SCIPgetNTables(scip);
5904 tables = SCIPgetTables(scip);
5905
5906 /* sort all tables by position unless this has already been done */
5907 if( !scip->set->tablessorted )
5908 {
5909 SCIPsortPtr((void**)tables, tablePosComp, ntables);
5910 scip->set->tablessorted = TRUE;
5911 }
5912
5913 SCIP_CALL( SCIPcreateDatatree(scip, &datatree, ntables) );
5914
5915 for( i = 0; i < ntables; ++i )
5916 {
5917 /* Skip inactive tables or those not relevant to the current stage */
5918 if( !SCIPtableIsActive(tables[i]) || (SCIPtableGetEarliestStage(tables[i]) > SCIPgetStage(scip)) )
5919 continue;
5920
5921 SCIP_CALL( SCIPcreateDatatreeInTree(scip, datatree, &tabledatatree, SCIPtableGetName(tables[i]), -1) );
5922 SCIP_CALL( SCIPtableCollect(tables[i], scip->set, tabledatatree) );
5923 }
5924
5925 SCIP_CALL( SCIPwriteDatatreeJson(scip, file, datatree) );
5926
5927 SCIPfreeDatatree(scip, &datatree);
5928
5929 return SCIP_OKAY;
5930}
5931
5932/** outputs solving statistics
5933 *
5934 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
5935 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
5936 *
5937 * @note If limits have been changed between the solution and the call to this function, the status is recomputed and
5938 * thus may to correspond to the original status.
5939 *
5940 * @pre This method can be called if SCIP is in one of the following stages:
5941 * - \ref SCIP_STAGE_INIT
5942 * - \ref SCIP_STAGE_PROBLEM
5943 * - \ref SCIP_STAGE_TRANSFORMED
5944 * - \ref SCIP_STAGE_INITPRESOLVE
5945 * - \ref SCIP_STAGE_PRESOLVING
5946 * - \ref SCIP_STAGE_EXITPRESOLVE
5947 * - \ref SCIP_STAGE_PRESOLVED
5948 * - \ref SCIP_STAGE_SOLVING
5949 * - \ref SCIP_STAGE_SOLVED
5950 */
5952 SCIP* scip, /**< SCIP data structure */
5953 FILE* file /**< output file (or NULL for standard output) */
5954 )
5955{
5956 SCIP_TABLE** tables;
5957 int ntables;
5958 int i;
5959
5960 assert(scip != NULL);
5961 assert(scip->set != NULL);
5962
5963 SCIP_CALL( SCIPcheckStage(scip, "SCIPprintStatistics", TRUE, TRUE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
5964
5965 ntables = SCIPgetNTables(scip);
5966 tables = SCIPgetTables(scip);
5967
5968 /* sort all tables by position unless this has already been done */
5969 if( ! scip->set->tablessorted )
5970 {
5971 SCIPsortPtr((void**)tables, tablePosComp, ntables);
5972
5973 scip->set->tablessorted = TRUE;
5974 }
5975
5976 for( i = 0; i < ntables; ++i )
5977 {
5978 /* skip tables which are not active or only used in later stages */
5979 if( ( ! SCIPtableIsActive(tables[i]) ) || SCIPtableGetEarliestStage(tables[i]) > SCIPgetStage(scip) )
5980 continue;
5981
5982 SCIP_CALL( SCIPtableOutput(tables[i], scip->mem->probmem, scip->set, file) );
5983 }
5984
5985 return SCIP_OKAY;
5986}
5987
5988/** outputs reoptimization statistics
5989 *
5990 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
5991 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
5992 *
5993 * @pre This method can be called if SCIP is in one of the following stages:
5994 * - \ref SCIP_STAGE_INIT
5995 * - \ref SCIP_STAGE_PROBLEM
5996 * - \ref SCIP_STAGE_TRANSFORMED
5997 * - \ref SCIP_STAGE_INITPRESOLVE
5998 * - \ref SCIP_STAGE_PRESOLVING
5999 * - \ref SCIP_STAGE_EXITPRESOLVE
6000 * - \ref SCIP_STAGE_PRESOLVED
6001 * - \ref SCIP_STAGE_SOLVING
6002 * - \ref SCIP_STAGE_SOLVED
6003 */
6005 SCIP* scip, /**< SCIP data structure */
6006 FILE* file /**< output file (or NULL for standard output) */
6007 )
6008{
6009 SCIP_Real solving;
6010 SCIP_Real presolving;
6011 SCIP_Real updatetime;
6012
6013 SCIP_CALL( SCIPcheckStage(scip, "SCIPprintReoptStatistics", TRUE, TRUE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
6014
6015 assert(scip != NULL);
6016
6017 /* skip if reoptimization is disabled */
6018 if( !scip->set->reopt_enable )
6019 return SCIP_OKAY;
6020
6021 /* skip if not problem yet */
6022 if( scip->stat == NULL )
6023 return SCIP_OKAY;
6024
6025 solving = SCIPclockGetTime(scip->stat->solvingtimeoverall);
6026 presolving = SCIPclockGetTime(scip->stat->presolvingtimeoverall);
6027 updatetime = SCIPclockGetTime(scip->stat->reoptupdatetime);
6028
6029 SCIPmessageFPrintInfo(scip->messagehdlr, file, "SCIP Reopt Status : finished after %d runs.\n", scip->stat->nreoptruns);
6030 SCIPmessageFPrintInfo(scip->messagehdlr, file, "Time (sec) :\n");
6031 SCIPmessageFPrintInfo(scip->messagehdlr, file, " solving : %10.2f\n", solving);
6032 SCIPmessageFPrintInfo(scip->messagehdlr, file, " presolving : %10.2f (included in solving)\n", presolving);
6033 SCIPmessageFPrintInfo(scip->messagehdlr, file, " save time : %10.2f\n", SCIPreoptGetSavingtime(scip->reopt));
6034 SCIPmessageFPrintInfo(scip->messagehdlr, file, " update time : %10.2f\n", updatetime);
6035 SCIPmessageFPrintInfo(scip->messagehdlr, file, "Nodes : feas infeas pruned cutoff\n");
6036 SCIPmessageFPrintInfo(scip->messagehdlr, file, " total : %10d %10d %10d %10d\n",
6039 if( scip->stat->nreoptruns > 0 )
6040 {
6041 SCIPmessageFPrintInfo(scip->messagehdlr, file, " avg : %10.2f %10.2f %10.2f %10.2f\n",
6042 (SCIP_Real)SCIPreoptGetNTotalFeasNodes(scip->reopt)/scip->stat->nreoptruns,
6043 (SCIP_Real)SCIPreoptGetNTotalInfNodes(scip->reopt)/scip->stat->nreoptruns,
6044 (SCIP_Real)SCIPreoptGetNTotalPrunedNodes(scip->reopt)/scip->stat->nreoptruns,
6045 (SCIP_Real)SCIPreoptGetNTotalCutoffReoptnodes(scip->reopt)/scip->stat->nreoptruns);
6046 }
6047 else
6048 {
6049 SCIPmessageFPrintInfo(scip->messagehdlr, file, " avg : %10s %10s %10s %10s\n", "--", "--", "--", "--");
6050 }
6051 SCIPmessageFPrintInfo(scip->messagehdlr, file, "Restarts : global local\n");
6052 SCIPmessageFPrintInfo(scip->messagehdlr, file, " first : %10d --\n", SCIPreoptGetFirstRestarts(scip->reopt));
6053 SCIPmessageFPrintInfo(scip->messagehdlr, file, " last : %10d --\n", SCIPreoptGetLastRestarts(scip->reopt));
6054 SCIPmessageFPrintInfo(scip->messagehdlr, file, " total : %10d %10d\n", SCIPreoptGetNRestartsGlobal(scip->reopt),
6056 if( scip->stat->nreoptruns > 0 )
6057 {
6058 SCIPmessageFPrintInfo(scip->messagehdlr, file, " avg : -- %10.2f\n",
6059 (SCIP_Real)SCIPreoptGetNTotalRestartsLocal(scip->reopt)/scip->stat->nreoptruns);
6060 }
6061 else
6062 {
6063 SCIPmessageFPrintInfo(scip->messagehdlr, file, " avg : -- %10s\n", "--");
6064 }
6065
6066 return SCIP_OKAY;
6067}
6068
6069/** outputs history statistics about branchings on variables
6070 *
6071 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
6072 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
6073 *
6074 * @pre This method can be called if SCIP is in one of the following stages:
6075 * - \ref SCIP_STAGE_INIT
6076 * - \ref SCIP_STAGE_PROBLEM
6077 * - \ref SCIP_STAGE_TRANSFORMED
6078 * - \ref SCIP_STAGE_INITPRESOLVE
6079 * - \ref SCIP_STAGE_PRESOLVING
6080 * - \ref SCIP_STAGE_EXITPRESOLVE
6081 * - \ref SCIP_STAGE_PRESOLVED
6082 * - \ref SCIP_STAGE_SOLVING
6083 * - \ref SCIP_STAGE_SOLVED
6084 */
6086 SCIP* scip, /**< SCIP data structure */
6087 FILE* file /**< output file (or NULL for standard output) */
6088 )
6089{
6090 SCIP_VAR** vars;
6091 int totalnstrongbranchs;
6092 int v;
6093
6094 SCIP_CALL( SCIPcheckStage(scip, "SCIPprintBranchingStatistics", TRUE, TRUE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
6095
6096 switch( scip->set->stage )
6097 {
6098 case SCIP_STAGE_INIT:
6099 case SCIP_STAGE_PROBLEM:
6100 SCIPmessageFPrintInfo(scip->messagehdlr, file, "problem not yet solved. branching statistics not available.\n");
6101 return SCIP_OKAY;
6102
6108 case SCIP_STAGE_SOLVING:
6109 case SCIP_STAGE_SOLVED:
6110 SCIP_CALL( SCIPallocBufferArray(scip, &vars, scip->transprob->nvars) );
6111 for( v = 0; v < scip->transprob->nvars; ++v )
6112 {
6113 SCIP_VAR* var;
6114 int i;
6115
6116 var = scip->transprob->vars[v];
6117 for( i = v; i > 0 && strcmp(SCIPvarGetName(var), SCIPvarGetName(vars[i-1])) < 0; i-- )
6118 vars[i] = vars[i-1];
6119 vars[i] = var;
6120 }
6121
6122 SCIPmessageFPrintInfo(scip->messagehdlr, file, " locks branchings inferences cutoffs LP gain pscostcount gain variance \n");
6123 SCIPmessageFPrintInfo(scip->messagehdlr, file, "variable prio factor down up depth down up sb down up down up down up down up down up\n");
6124
6125 totalnstrongbranchs = 0;
6126 for( v = 0; v < scip->transprob->nvars; ++v )
6127 {
6130 || SCIPgetVarNStrongbranchs(scip, vars[v]) > 0 )
6131 {
6132 int nstrongbranchs;
6133
6134 nstrongbranchs = SCIPgetVarNStrongbranchs(scip, vars[v]);
6135 totalnstrongbranchs += nstrongbranchs;
6136 SCIPmessageFPrintInfo(scip->messagehdlr, file, "%-16s %5d %8.1f %6d %6d %6.1f %7" SCIP_LONGINT_FORMAT " %7" SCIP_LONGINT_FORMAT " %5d %8.1f %8.1f %5.1f%% %5.1f%% %15.4f %15.4f %7.1f %7.1f %15.2f %15.2f\n",
6137 SCIPvarGetName(vars[v]),
6146 nstrongbranchs,
6151 SCIPvarGetPseudocost(vars[v], scip->stat, -1.0),
6152 SCIPvarGetPseudocost(vars[v], scip->stat, +1.0),
6157 }
6158 }
6159 SCIPmessageFPrintInfo(scip->messagehdlr, file, "total %7" SCIP_LONGINT_FORMAT " %7" SCIP_LONGINT_FORMAT " %5d %8.1f %8.1f %5.1f%% %5.1f%% %15.4f %15.4f %7.1f %7.1f %15.2f %15.2f\n",
6162 totalnstrongbranchs,
6175 SCIPhistoryGetPseudocost(scip->stat->glbhistory, -1.0),
6176 SCIPhistoryGetPseudocost(scip->stat->glbhistory, +1.0),
6181
6183
6184 return SCIP_OKAY;
6185
6186 default:
6187 SCIPerrorMessage("invalid SCIP stage <%d>\n", scip->set->stage);
6188 return SCIP_INVALIDCALL;
6189 } /*lint !e788*/
6190}
6191
6192/** collects branching statistics about variables in a SCIP_DATATREE
6193 *
6194 * This function collects detailed branching statistics for all variables in the SCIP instance and organizes them into
6195 * a hierarchical structure in the provided `SCIP_DATATREE`. The statistics include locks, branchings, inferences,
6196 * cutoffs, pseudocosts, and strong branching information.
6197 *
6198 * The `datatree` will contain the following keys:
6199 * - `variables`: A nested table keyed by variable names, containing:
6200 * - `name`: Name of the variable.
6201 * - `priority`: Branching priority of the variable.
6202 * - `factor`: Branching factor of the variable.
6203 * - `locks_down`: Number of locks in the down direction.
6204 * - `locks_up`: Number of locks in the up direction.
6205 * - `avg_depth`: Average branching depth for the variable.
6206 * - `branchings_down`: Number of branchings in the down direction.
6207 * - `branchings_up`: Number of branchings in the up direction.
6208 * - `strong_branchings`: Number of strong branchings performed on the variable.
6209 * - `avg_inferences_down`: Average number of inferences per branching in the down direction.
6210 * - `avg_inferences_up`: Average number of inferences per branching in the up direction.
6211 * - `cutoff_rate_down`: Percentage of branchings in the down direction that led to cutoffs.
6212 * - `cutoff_rate_up`: Percentage of branchings in the up direction that led to cutoffs.
6213 * - `pseudocost_down`: Pseudocost in the down direction.
6214 * - `pseudocost_up`: Pseudocost in the up direction.
6215 * - `pseudocost_count_down`: Number of pseudocost updates in the down direction.
6216 * - `pseudocost_count_up`: Number of pseudocost updates in the up direction.
6217 * - `pseudocost_variance_down`: Variance of pseudocost in the down direction.
6218 * - `pseudocost_variance_up`: Variance of pseudocost in the up direction.
6219 * - `total_branchings_down`: Total number of branchings in the down direction across all variables.
6220 * - `total_branchings_up`: Total number of branchings in the up direction across all variables.
6221 * - `total_strong_branchings`: Total number of strong branchings across all variables.
6222 * - `avg_inferences_down`: Average inferences per branching in the down direction across all variables.
6223 * - `avg_inferences_up`: Average inferences per branching in the up direction across all variables.
6224 * - `avg_cutoff_rate_down`: Average cutoff rate for branchings in the down direction across all variables.
6225 * - `avg_cutoff_rate_up`: Average cutoff rate for branchings in the up direction across all variables.
6226 * - `status`: If the problem is not solved, a string indicating that statistics are not available.
6227 *
6228 * @pre This method can be called if SCIP is in one of the following stages:
6229 * - \ref SCIP_STAGE_INIT
6230 * - \ref SCIP_STAGE_PROBLEM
6231 * - \ref SCIP_STAGE_TRANSFORMED
6232 * - \ref SCIP_STAGE_INITPRESOLVE
6233 * - \ref SCIP_STAGE_PRESOLVING
6234 * - \ref SCIP_STAGE_EXITPRESOLVE
6235 * - \ref SCIP_STAGE_PRESOLVED
6236 * - \ref SCIP_STAGE_SOLVING
6237 * - \ref SCIP_STAGE_SOLVED
6238 *
6239 * @return \ref SCIP_OKAY if everything worked. Otherwise, a suitable error code is returned.
6240 */
6242 SCIP* scip, /**< SCIP data structure */
6243 SCIP_DATATREE* datatree /**< data tree */
6244 )
6245{
6246 SCIP_CALL( SCIPcheckStage(scip, "SCIPcollectBranchingStatistics", TRUE, TRUE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
6247
6248 switch( scip->set->stage )
6249 {
6250 case SCIP_STAGE_INIT:
6251 case SCIP_STAGE_PROBLEM:
6252 SCIP_CALL( SCIPinsertDatatreeString(scip, datatree, "status", "problem not yet solved. branching statistics not available.") );
6253 return SCIP_OKAY;
6254
6260 case SCIP_STAGE_SOLVING:
6261 case SCIP_STAGE_SOLVED:
6262 {
6263 SCIP_DATATREE* varsdtree;
6264 SCIP_VAR** vars;
6265 int totalnstrongbranchs = 0;
6266 int v;
6267
6268 SCIP_CALL( SCIPallocBufferArray(scip, &vars, scip->transprob->nvars) );
6269
6270 /* Sort variables by name */
6271 for( v = 0; v < scip->transprob->nvars; ++v )
6272 {
6273 SCIP_VAR* var = scip->transprob->vars[v];
6274 int i;
6275
6276 for( i = v; i > 0 && strcmp(SCIPvarGetName(var), SCIPvarGetName(vars[i-1])) < 0; i-- )
6277 vars[i] = vars[i-1];
6278 vars[i] = var;
6279 }
6280
6281 SCIP_CALL( SCIPcreateDatatreeInTree( scip, datatree, &varsdtree, "variables", scip->transprob->nvars + 7 ) );
6282
6283 /* Collect statistics for each variable */
6284 for( v = 0; v < scip->transprob->nvars; ++v )
6285 {
6289 {
6290 SCIP_DATATREE* vardtree;
6291 int nstrongbranchs = SCIPgetVarNStrongbranchs(scip, vars[v]);
6292
6293 totalnstrongbranchs += nstrongbranchs;
6294
6295 SCIP_CALL( SCIPcreateDatatreeInTree( scip, varsdtree, &vardtree, SCIPvarGetName( vars[v] ), 19 ) );
6296
6297 SCIP_CALL( SCIPinsertDatatreeString(scip, vardtree, "name", SCIPvarGetName(vars[v])) );
6298 SCIP_CALL( SCIPinsertDatatreeInt(scip, vardtree, "priority", SCIPvarGetBranchPriority(vars[v])) );
6302 SCIP_CALL( SCIPinsertDatatreeReal(scip, vardtree, "avg_depth",
6307 SCIP_CALL( SCIPinsertDatatreeInt(scip, vardtree, "strong_branchings", nstrongbranchs) );
6308 SCIP_CALL( SCIPinsertDatatreeReal(scip, vardtree, "avg_inferences_down", SCIPvarGetAvgInferences(vars[v], scip->stat, SCIP_BRANCHDIR_DOWNWARDS)) );
6309 SCIP_CALL( SCIPinsertDatatreeReal(scip, vardtree, "avg_inferences_up", SCIPvarGetAvgInferences(vars[v], scip->stat, SCIP_BRANCHDIR_UPWARDS)) );
6310 SCIP_CALL( SCIPinsertDatatreeReal(scip, vardtree, "cutoff_rate_down", 100.0 * SCIPvarGetAvgCutoffs(vars[v], scip->stat, SCIP_BRANCHDIR_DOWNWARDS)) );
6311 SCIP_CALL( SCIPinsertDatatreeReal(scip, vardtree, "cutoff_rate_up", 100.0 * SCIPvarGetAvgCutoffs(vars[v], scip->stat, SCIP_BRANCHDIR_UPWARDS)) );
6312 SCIP_CALL( SCIPinsertDatatreeReal(scip, vardtree, "pseudocost_down", SCIPvarGetPseudocost(vars[v], scip->stat, -1.0)) );
6313 SCIP_CALL( SCIPinsertDatatreeReal(scip, vardtree, "pseudocost_up", SCIPvarGetPseudocost(vars[v], scip->stat, +1.0)) );
6318 }
6319 }
6320
6321 /* add total statistics */
6322 SCIP_CALL( SCIPinsertDatatreeLong(scip, datatree, "total_branchings_down", SCIPhistoryGetNBranchings(scip->stat->glbhistory, SCIP_BRANCHDIR_DOWNWARDS)) );
6323 SCIP_CALL( SCIPinsertDatatreeLong(scip, datatree, "total_branchings_up", SCIPhistoryGetNBranchings(scip->stat->glbhistory, SCIP_BRANCHDIR_UPWARDS)) );
6324 SCIP_CALL( SCIPinsertDatatreeInt(scip, datatree, "total_strong_branchings", totalnstrongbranchs) );
6325 SCIP_CALL( SCIPinsertDatatreeReal(scip, datatree, "avg_inferences_down",
6329 SCIP_CALL( SCIPinsertDatatreeReal(scip, datatree, "avg_inferences_up",
6330 SCIPhistoryGetNBranchings(scip->stat->glbhistory, SCIP_BRANCHDIR_UPWARDS) > 0 ?
6332 (SCIP_Real)SCIPhistoryGetNBranchings(scip->stat->glbhistory, SCIP_BRANCHDIR_UPWARDS) : 0.0) );
6333 SCIP_CALL( SCIPinsertDatatreeReal(scip, datatree, "avg_cutoff_rate_down",
6337 SCIP_CALL( SCIPinsertDatatreeReal(scip, datatree, "avg_cutoff_rate_up",
6338 SCIPhistoryGetNBranchings(scip->stat->glbhistory, SCIP_BRANCHDIR_UPWARDS) > 0 ?
6340 (SCIP_Real)SCIPhistoryGetNBranchings(scip->stat->glbhistory, SCIP_BRANCHDIR_UPWARDS) : 0.0) );
6341
6343 break;
6344 }
6345
6346 default:
6347 SCIPerrorMessage("invalid SCIP stage <%d>\n", scip->set->stage);
6348 return SCIP_INVALIDCALL;
6349 } /*lint !e788*/
6350
6351 return SCIP_OKAY;
6352}
6353
6354
6355/** outputs node information display line
6356 *
6357 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
6358 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
6359 *
6360 * @pre This method can be called if SCIP is in one of the following stages:
6361 * - \ref SCIP_STAGE_SOLVING
6362 */
6364 SCIP* scip, /**< SCIP data structure */
6365 FILE* file, /**< output file (or NULL for standard output) */
6366 SCIP_VERBLEVEL verblevel, /**< minimal verbosity level to actually display the information line */
6367 SCIP_Bool endline /**< should the line be terminated with a newline symbol? */
6368 )
6369{
6370 SCIP_CALL( SCIPcheckStage(scip, "SCIPprintDisplayLine", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
6371
6372 if( (SCIP_VERBLEVEL)scip->set->disp_verblevel >= verblevel )
6373 {
6374 SCIP_CALL( SCIPdispPrintLine(scip->set, scip->messagehdlr, scip->stat, file, TRUE, endline) );
6375 }
6376
6377 return SCIP_OKAY;
6378}
6379
6380/** gets total number of implications between variables that are stored in the implication graph
6381 *
6382 * @return the total number of implications between variables that are stored in the implication graph
6383 *
6384 * @pre This method can be called if SCIP is in one of the following stages:
6385 * - \ref SCIP_STAGE_INITPRESOLVE
6386 * - \ref SCIP_STAGE_PRESOLVING
6387 * - \ref SCIP_STAGE_EXITPRESOLVE
6388 * - \ref SCIP_STAGE_PRESOLVED
6389 * - \ref SCIP_STAGE_INITSOLVE
6390 * - \ref SCIP_STAGE_SOLVING
6391 * - \ref SCIP_STAGE_SOLVED
6392 */
6394 SCIP* scip /**< SCIP data structure */
6395 )
6396{
6397 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetNImplications", FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE) );
6398
6399 return scip->stat->nimplications;
6400}
6401
6402/** update statistical information when a new solution was found */
6404 SCIP* scip /**< SCIP data structure */
6405 )
6406{
6408
6409 if( scip->primal->nsols == 1 )
6410 scip->stat->firstsolgap = scip->stat->lastsolgap;
6411
6412 if( scip->set->misc_calcintegral )
6413 {
6414 SCIP_Real upperbound = SCIPgetUpperbound(scip);
6415
6416 if( upperbound < scip->stat->lastupperbound )
6417 SCIPstatUpdatePrimalDualIntegrals(scip->stat, scip->set, scip->transprob, scip->origprob, upperbound, -SCIPinfinity(scip));
6418 }
6419}
6420
6421/** recomputes and returns the primal dual gap stored in the stats
6422 *
6423 * @return returns the primal dual gap stored in the stats
6424 */
6426 SCIP* scip /**< SCIP data structure */
6427 )
6428{
6429 return SCIPstatGetPrimalDualIntegral(scip->stat, scip->set, scip->transprob, scip->origprob, TRUE);
6430}
SCIP_Real SCIPbranchGetScore(SCIP_SET *set, SCIP_VAR *var, SCIP_Real downgain, SCIP_Real upgain)
Definition branch.c:2236
internal methods for branching rules and branching candidate storage
SCIP_Real SCIPclockGetTime(SCIP_CLOCK *clck)
Definition clock.c:438
internal methods for clocks and timing issues
SCIP_Longint SCIPconcsolverGetNNodes(SCIP_CONCSOLVER *concsolver)
Definition concsolver.c:576
SCIP_Longint SCIPconcsolverGetNSolsRecvd(SCIP_CONCSOLVER *concsolver)
Definition concsolver.c:586
SCIP_Real SCIPconcsolverGetSyncTime(SCIP_CONCSOLVER *concsolver)
Definition concsolver.c:556
SCIP_Longint SCIPconcsolverGetNTighterIntBnds(SCIP_CONCSOLVER *concsolver)
Definition concsolver.c:616
SCIP_Real SCIPconcsolverGetSolvingTime(SCIP_CONCSOLVER *concsolver)
Definition concsolver.c:546
SCIP_Longint SCIPconcsolverGetNTighterBnds(SCIP_CONCSOLVER *concsolver)
Definition concsolver.c:606
SCIP_Longint SCIPconcsolverGetNLPIterations(SCIP_CONCSOLVER *concsolver)
Definition concsolver.c:566
char * SCIPconcsolverGetName(SCIP_CONCSOLVER *concsolver)
Definition concsolver.c:303
SCIP_Longint SCIPconcsolverGetNSolsShared(SCIP_CONCSOLVER *concsolver)
Definition concsolver.c:596
data structures for concurrent solvers
SCIP_CONCSOLVER ** SCIPgetConcurrentSolvers(SCIP *scip)
Definition concurrent.c:137
int SCIPgetNConcurrentSolvers(SCIP *scip)
Definition concurrent.c:126
helper functions for concurrent scip solvers
internal methods for conflict analysis
int SCIPconflictGetNConflicts(SCIP_CONFLICT *conflict)
SCIP_Longint SCIPconflictGetNAppliedGlobalConss(SCIP_CONFLICT *conflict)
SCIP_Longint SCIPconflictGetNDualproofsInfLocal(SCIP_CONFLICT *conflict)
SCIP_Longint SCIPconflictGetNAppliedLocalLiterals(SCIP_CONFLICT *conflict)
SCIP_Longint SCIPconflictGetNResConflictVars(SCIP_CONFLICT *conflict)
SCIP_Longint SCIPconflictGetNPropCalls(SCIP_CONFLICT *conflict)
SCIP_Longint SCIPconflictGetNDualproofsInfNonzeros(SCIP_CONFLICT *conflict)
SCIP_Longint SCIPconflictGetNStrongbranchIterations(SCIP_CONFLICT *conflict)
SCIP_Real SCIPconflictGetInfeasibleLPTime(SCIP_CONFLICT *conflict)
SCIP_Longint SCIPconflictGetNInfeasibleLPCalls(SCIP_CONFLICT *conflict)
SCIP_Real SCIPconflictGetGlobalApplTime(SCIP_CONFLICT *conflict)
SCIP_Longint SCIPconflictGetNInfeasibleLPSuccess(SCIP_CONFLICT *conflict)
SCIP_Longint SCIPconflictGetNBoundexceedingLPReconvergenceConss(SCIP_CONFLICT *conflict)
SCIP_Longint SCIPconflictGetNGlobalChgBds(SCIP_CONFLICT *conflict)
SCIP_Longint SCIPconflictGetNPropConflictLiterals(SCIP_CONFLICT *conflict)
SCIP_Longint SCIPconflictGetNAppliedConss(SCIP_CONFLICT *conflict)
SCIP_Longint SCIPconflictGetNInfeasibleLPConflictConss(SCIP_CONFLICT *conflict)
SCIP_Longint SCIPconflictGetNBoundexceedingLPConflictConss(SCIP_CONFLICT *conflict)
SCIP_Longint SCIPconflictGetNBoundexceedingLPSuccess(SCIP_CONFLICT *conflict)
SCIP_Longint SCIPconflictGetNStrongbranchCalls(SCIP_CONFLICT *conflict)
SCIP_Longint SCIPconflictGetNInfeasibleLPReconvergenceLiterals(SCIP_CONFLICT *conflict)
SCIP_Longint SCIPconflictGetNPropReconvergenceConss(SCIP_CONFLICT *conflict)
SCIP_Real SCIPconflictGetBoundexceedingLPTime(SCIP_CONFLICT *conflict)
SCIP_Longint SCIPconflictGetNStrongbranchReconvergenceLiterals(SCIP_CONFLICT *conflict)
SCIP_Real SCIPconflictGetPseudoTime(SCIP_CONFLICT *conflict)
SCIP_Longint SCIPconflictGetNPseudoReconvergenceLiterals(SCIP_CONFLICT *conflict)
SCIP_Longint SCIPconflictGetNPropReconvergenceLiterals(SCIP_CONFLICT *conflict)
SCIP_Longint SCIPconflictGetNInfeasibleLPReconvergenceConss(SCIP_CONFLICT *conflict)
SCIP_Longint SCIPconflictGetNAppliedLocalConss(SCIP_CONFLICT *conflict)
SCIP_Longint SCIPconflictGetNStrongbranchReconvergenceConss(SCIP_CONFLICT *conflict)
SCIP_Longint SCIPconflictGetNBoundexceedingLPConflictLiterals(SCIP_CONFLICT *conflict)
SCIP_Real SCIPconflictGetStrongbranchTime(SCIP_CONFLICT *conflict)
SCIP_Longint SCIPconflictGetNPseudoSuccess(SCIP_CONFLICT *conflict)
SCIP_Longint SCIPconflictGetNInfeasibleLPConflictLiterals(SCIP_CONFLICT *conflict)
SCIP_Longint SCIPconflictGetNPseudoConflictLiterals(SCIP_CONFLICT *conflict)
SCIP_Longint SCIPconflictGetNLocalChgBds(SCIP_CONFLICT *conflict)
SCIP_Longint SCIPconflictGetNDualproofsBndSuccess(SCIP_CONFLICT *conflict)
SCIP_Longint SCIPconflictGetNPropSuccess(SCIP_CONFLICT *conflict)
SCIP_Longint SCIPconflictGetNDualproofsInfSuccess(SCIP_CONFLICT *conflict)
SCIP_Longint SCIPconflictGetNBoundexceedingLPCalls(SCIP_CONFLICT *conflict)
SCIP_Longint SCIPconflictGetNPropConflictConss(SCIP_CONFLICT *conflict)
SCIP_Longint SCIPconflictGetNStrongbranchSuccess(SCIP_CONFLICT *conflict)
SCIP_Real SCIPconflictGetResTime(SCIP_CONFLICT *conflict)
SCIP_Longint SCIPconflictGetNDualproofsBndGlobal(SCIP_CONFLICT *conflict)
SCIP_Longint SCIPconflictGetNPseudoReconvergenceConss(SCIP_CONFLICT *conflict)
SCIP_Longint SCIPconflictGetNAppliedGlobalLiterals(SCIP_CONFLICT *conflict)
SCIP_Longint SCIPconflictGetNDualproofsBndLocal(SCIP_CONFLICT *conflict)
SCIP_Longint SCIPconflictGetNPseudoCalls(SCIP_CONFLICT *conflict)
SCIP_Longint SCIPconflictGetNAppliedResConss(SCIP_CONFLICT *conflict)
SCIP_Real SCIPconflictGetPropTime(SCIP_CONFLICT *conflict)
SCIP_Longint SCIPconflictGetNBoundexceedingLPIterations(SCIP_CONFLICT *conflict)
SCIP_Longint SCIPconflictGetNStrongbranchConflictLiterals(SCIP_CONFLICT *conflict)
SCIP_Longint SCIPconflictGetNPseudoConflictConss(SCIP_CONFLICT *conflict)
SCIP_Longint SCIPconflictGetNDualproofsBndNonzeros(SCIP_CONFLICT *conflict)
SCIP_Longint SCIPconflictGetNDualproofsInfGlobal(SCIP_CONFLICT *conflict)
SCIP_Longint SCIPconflictGetNBoundexceedingLPReconvergenceLiterals(SCIP_CONFLICT *conflict)
SCIP_Longint SCIPconflictGetNStrongbranchConflictConss(SCIP_CONFLICT *conflict)
SCIP_Longint SCIPconflictGetNInfeasibleLPIterations(SCIP_CONFLICT *conflict)
SCIP_Longint SCIPconflictGetNResConflictConss(SCIP_CONFLICT *conflict)
SCIP_Longint SCIPconflictGetNResLargeCoefs(SCIP_CONFLICT *conflict)
SCIP_Longint SCIPconflictGetNResSuccess(SCIP_CONFLICT *conflict)
SCIP_Longint SCIPconflictGetNResCalls(SCIP_CONFLICT *conflict)
SCIP_Longint SCIPconflictGetNResLongConflicts(SCIP_CONFLICT *conflict)
int SCIPconflictstoreGetMaxPoolSize(SCIP_CONFLICTSTORE *conflictstore)
int SCIPconflictstoreGetInitPoolSize(SCIP_CONFLICTSTORE *conflictstore)
internal methods for storing conflicts
methods for debugging
#define SCIPcheckStage(scip, method, init, problem, transforming, transformed, initpresolve, presolving, exitpresolve, presolved, initsolve, solving, solved, exitsolve, freetrans, freescip)
Definition debug.h:364
#define NULL
Definition def.h:255
#define SCIP_MAXSTRLEN
Definition def.h:276
#define SCIP_Longint
Definition def.h:148
#define SCIP_INVALID
Definition def.h:185
#define SCIP_Bool
Definition def.h:98
#define SCIP_Real
Definition def.h:163
#define TRUE
Definition def.h:100
#define FALSE
Definition def.h:101
#define MAX(x, y)
Definition def.h:227
#define SCIP_CALL_ABORT(x)
Definition def.h:341
#define SCIP_LONGINT_FORMAT
Definition def.h:155
#define REALABS(x)
Definition def.h:189
#define SCIP_CALL(x)
Definition def.h:362
SCIP_RETCODE SCIPdispPrintLine(SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, SCIP_STAT *stat, FILE *file, SCIP_Bool forcedisplay, SCIP_Bool endline)
Definition disp.c:415
internal methods for displaying runtime statistics
#define nnodes
Definition gastrans.c:74
SCIP_RETCODE SCIPprintStage(SCIP *scip, FILE *file)
const char * SCIPstatusName(SCIP_STATUS status)
SCIP_STATUS SCIPgetStatus(SCIP *scip)
SCIP_STAGE SCIPgetStage(SCIP *scip)
void SCIPwarningMessage(SCIP *scip, const char *formatstr,...)
SCIP_Real SCIPcomputeGap(SCIP_Real eps, SCIP_Real inf, SCIP_Real primalbound, SCIP_Real dualbound)
Definition misc.c:11180
int SCIPgetNActiveBenders(SCIP *scip)
SCIP_Real SCIPbendersGetSetupTime(SCIP_BENDERS *benders)
Definition benders.c:6082
int SCIPbendersGetNTransferredCuts(SCIP_BENDERS *benders)
Definition benders.c:6861
int SCIPbendersGetNStrengthenFails(SCIP_BENDERS *benders)
Definition benders.c:6072
SCIP_BENDERS ** SCIPgetBenders(SCIP *scip)
int SCIPgetNBenders(SCIP *scip)
const char * SCIPbendersGetDesc(SCIP_BENDERS *benders)
Definition benders.c:5976
int SCIPbendersGetNStrengthenCalls(SCIP_BENDERS *benders)
Definition benders.c:6062
int SCIPbendersGetNBenderscuts(SCIP_BENDERS *benders)
Definition benders.c:7116
SCIP_Bool SCIPbendersIsActive(SCIP_BENDERS *benders)
Definition benders.c:2987
const char * SCIPbendersGetName(SCIP_BENDERS *benders)
Definition benders.c:5966
int SCIPbendersGetNStrengthenCutsFound(SCIP_BENDERS *benders)
Definition benders.c:6052
int SCIPbendersGetNCalls(SCIP_BENDERS *benders)
Definition benders.c:6032
int SCIPbendersGetNCutsFound(SCIP_BENDERS *benders)
Definition benders.c:6042
SCIP_Real SCIPbendersGetTime(SCIP_BENDERS *benders)
Definition benders.c:6092
SCIP_BENDERSCUT ** SCIPbendersGetBenderscuts(SCIP_BENDERS *benders)
Definition benders.c:7099
const char * SCIPbenderscutGetDesc(SCIP_BENDERSCUT *benderscut)
Definition benderscut.c:502
const char * SCIPbenderscutGetName(SCIP_BENDERSCUT *benderscut)
Definition benderscut.c:492
SCIP_Longint SCIPbenderscutGetNCalls(SCIP_BENDERSCUT *benderscut)
Definition benderscut.c:533
SCIP_Real SCIPbenderscutGetTime(SCIP_BENDERSCUT *benderscut)
Definition benderscut.c:573
SCIP_Real SCIPbenderscutGetSetupTime(SCIP_BENDERSCUT *benderscut)
Definition benderscut.c:563
SCIP_Longint SCIPbenderscutGetNFound(SCIP_BENDERSCUT *benderscut)
Definition benderscut.c:543
SCIP_Longint SCIPbranchruleGetNDomredsFound(SCIP_BRANCHRULE *branchrule)
Definition branch.c:2200
SCIP_Longint SCIPbranchruleGetNPseudoCalls(SCIP_BRANCHRULE *branchrule)
Definition branch.c:2158
SCIP_Longint SCIPbranchruleGetNConssFound(SCIP_BRANCHRULE *branchrule)
Definition branch.c:2190
SCIP_Longint SCIPbranchruleGetNLPCalls(SCIP_BRANCHRULE *branchrule)
Definition branch.c:2138
const char * SCIPbranchruleGetName(SCIP_BRANCHRULE *branchrule)
Definition branch.c:2018
SCIP_Longint SCIPbranchruleGetNChildren(SCIP_BRANCHRULE *branchrule)
Definition branch.c:2210
SCIP_Real SCIPbranchruleGetTime(SCIP_BRANCHRULE *branchrule)
Definition branch.c:2128
SCIP_Real SCIPbranchruleGetSetupTime(SCIP_BRANCHRULE *branchrule)
Definition branch.c:2118
const char * SCIPbranchruleGetDesc(SCIP_BRANCHRULE *branchrule)
Definition branch.c:2028
SCIP_Longint SCIPbranchruleGetNCutoffs(SCIP_BRANCHRULE *branchrule)
Definition branch.c:2168
SCIP_Longint SCIPbranchruleGetNExternCalls(SCIP_BRANCHRULE *branchrule)
Definition branch.c:2148
SCIP_Longint SCIPbranchruleGetNCutsFound(SCIP_BRANCHRULE *branchrule)
Definition branch.c:2178
SCIP_Longint SCIPcomprGetNCalls(SCIP_COMPR *compr)
Definition compr.c:510
SCIP_Longint SCIPcomprGetNFound(SCIP_COMPR *compr)
Definition compr.c:520
const char * SCIPcomprGetName(SCIP_COMPR *compr)
Definition compr.c:456
SCIP_Real SCIPcomprGetSetupTime(SCIP_COMPR *compr)
Definition compr.c:540
SCIP_Real SCIPcomprGetTime(SCIP_COMPR *compr)
Definition compr.c:550
const char * SCIPcomprGetDesc(SCIP_COMPR *compr)
Definition compr.c:466
int SCIPconshdlrGetMaxNActiveConss(SCIP_CONSHDLR *conshdlr)
Definition cons.c:5112
SCIP_Real SCIPconshdlrGetCheckTime(SCIP_CONSHDLR *conshdlr)
Definition cons.c:4942
SCIP_Longint SCIPconshdlrGetNCheckCalls(SCIP_CONSHDLR *conshdlr)
Definition cons.c:5012
int SCIPconshdlrGetNChgSides(SCIP_CONSHDLR *conshdlr)
Definition cons.c:5222
SCIP_Real SCIPconshdlrGetPresolTime(SCIP_CONSHDLR *conshdlr)
Definition cons.c:4872
SCIP_Bool SCIPconshdlrDoesPresolve(SCIP_CONSHDLR *conshdlr)
Definition cons.c:5323
int SCIPconshdlrGetNFixedVars(SCIP_CONSHDLR *conshdlr)
Definition cons.c:5132
SCIP_Real SCIPconshdlrGetEnfoLPTime(SCIP_CONSHDLR *conshdlr)
Definition cons.c:4892
int SCIPconshdlrGetNPresolCalls(SCIP_CONSHDLR *conshdlr)
Definition cons.c:5232
SCIP_Longint SCIPconshdlrGetNDomredsFound(SCIP_CONSHDLR *conshdlr)
Definition cons.c:5092
SCIP_Longint SCIPconshdlrGetNCutsApplied(SCIP_CONSHDLR *conshdlr)
Definition cons.c:5052
int SCIPconshdlrGetNChgCoefs(SCIP_CONSHDLR *conshdlr)
Definition cons.c:5212
SCIP_Real SCIPconshdlrGetStrongBranchPropTime(SCIP_CONSHDLR *conshdlr)
Definition cons.c:4932
SCIP_Longint SCIPconshdlrGetNCutsFound(SCIP_CONSHDLR *conshdlr)
Definition cons.c:5042
SCIP_Real SCIPconshdlrGetPropTime(SCIP_CONSHDLR *conshdlr)
Definition cons.c:4922
SCIP_Real SCIPconshdlrGetEnfoPSTime(SCIP_CONSHDLR *conshdlr)
Definition cons.c:4902
SCIP_Longint SCIPconshdlrGetNCutoffs(SCIP_CONSHDLR *conshdlr)
Definition cons.c:5032
const char * SCIPconshdlrGetName(SCIP_CONSHDLR *conshdlr)
Definition cons.c:4316
SCIP_Longint SCIPconshdlrGetNSepaCalls(SCIP_CONSHDLR *conshdlr)
Definition cons.c:4962
int SCIPconshdlrGetNDelConss(SCIP_CONSHDLR *conshdlr)
Definition cons.c:5182
SCIP_Longint SCIPconshdlrGetNChildren(SCIP_CONSHDLR *conshdlr)
Definition cons.c:5102
SCIP_Real SCIPconshdlrGetEnfoRelaxTime(SCIP_CONSHDLR *conshdlr)
Definition cons.c:4912
SCIP_Bool SCIPconshdlrNeedsCons(SCIP_CONSHDLR *conshdlr)
Definition cons.c:5302
int SCIPconshdlrGetNAggrVars(SCIP_CONSHDLR *conshdlr)
Definition cons.c:5142
SCIP_Longint SCIPconshdlrGetNEnfoPSCalls(SCIP_CONSHDLR *conshdlr)
Definition cons.c:4982
int SCIPconshdlrGetNAddHoles(SCIP_CONSHDLR *conshdlr)
Definition cons.c:5172
int SCIPconshdlrGetNUpgdConss(SCIP_CONSHDLR *conshdlr)
Definition cons.c:5202
int SCIPconshdlrGetStartNActiveConss(SCIP_CONSHDLR *conshdlr)
Definition cons.c:5122
int SCIPconshdlrGetNAddConss(SCIP_CONSHDLR *conshdlr)
Definition cons.c:5192
int SCIPconshdlrGetNChgBds(SCIP_CONSHDLR *conshdlr)
Definition cons.c:5162
const char * SCIPconshdlrGetDesc(SCIP_CONSHDLR *conshdlr)
Definition cons.c:4326
SCIP_Longint SCIPconshdlrGetNConssFound(SCIP_CONSHDLR *conshdlr)
Definition cons.c:5082
SCIP_Longint SCIPconshdlrGetNPropCalls(SCIP_CONSHDLR *conshdlr)
Definition cons.c:5002
SCIP_Longint SCIPconshdlrGetNEnfoLPCalls(SCIP_CONSHDLR *conshdlr)
Definition cons.c:4972
SCIP_Real SCIPconshdlrGetSetupTime(SCIP_CONSHDLR *conshdlr)
Definition cons.c:4862
SCIP_Longint SCIPconshdlrGetNRespropCalls(SCIP_CONSHDLR *conshdlr)
Definition cons.c:5022
SCIP_Real SCIPconshdlrGetSepaTime(SCIP_CONSHDLR *conshdlr)
Definition cons.c:4882
int SCIPconshdlrGetNChgVarTypes(SCIP_CONSHDLR *conshdlr)
Definition cons.c:5152
SCIP_Real SCIPconshdlrGetRespropTime(SCIP_CONSHDLR *conshdlr)
Definition cons.c:4952
SCIP_Longint SCIPconshdlrGetNEnfoRelaxCalls(SCIP_CONSHDLR *conshdlr)
Definition cons.c:4992
SCIP_Longint SCIPcutpoolGetNRootCalls(SCIP_CUTPOOL *cutpool)
Definition cutpool.c:1117
SCIP_Longint SCIPcutpoolGetNCutsFound(SCIP_CUTPOOL *cutpool)
Definition cutpool.c:1127
SCIP_Real SCIPcutpoolGetTime(SCIP_CUTPOOL *cutpool)
Definition cutpool.c:1097
SCIP_Longint SCIPcutpoolGetMaxNCuts(SCIP_CUTPOOL *cutpool)
Definition cutpool.c:1087
SCIP_Longint SCIPcutpoolGetNCalls(SCIP_CUTPOOL *cutpool)
Definition cutpool.c:1107
SCIP_Longint SCIPcutpoolGetNCutsAdded(SCIP_CUTPOOL *cutpool)
Definition cutpool.c:1137
SCIP_Longint SCIPcutselGetNLocalCuts(SCIP_CUTSEL *cutsel)
Definition cutsel.c:625
SCIP_Longint SCIPcutselGetNLocalCutsFiltered(SCIP_CUTSEL *cutsel)
Definition cutsel.c:645
SCIP_Longint SCIPcutselGetNRootCuts(SCIP_CUTSEL *cutsel)
Definition cutsel.c:595
SCIP_Longint SCIPcutselGetNRootForcedCuts(SCIP_CUTSEL *cutsel)
Definition cutsel.c:605
SCIP_Longint SCIPcutselGetNCalls(SCIP_CUTSEL *cutsel)
Definition cutsel.c:575
const char * SCIPcutselGetDesc(SCIP_CUTSEL *cutsel)
Definition cutsel.c:245
SCIP_Real SCIPcutselGetTime(SCIP_CUTSEL *cutsel)
Definition cutsel.c:565
const char * SCIPcutselGetName(SCIP_CUTSEL *cutsel)
Definition cutsel.c:159
SCIP_Longint SCIPcutselGetNRootCutsFiltered(SCIP_CUTSEL *cutsel)
Definition cutsel.c:615
SCIP_Real SCIPcutselGetSetupTime(SCIP_CUTSEL *cutsel)
Definition cutsel.c:555
SCIP_Longint SCIPcutselGetNLocalForcedCuts(SCIP_CUTSEL *cutsel)
Definition cutsel.c:635
SCIP_Longint SCIPcutselGetNRootCalls(SCIP_CUTSEL *cutsel)
Definition cutsel.c:585
void SCIPfreeDatatree(SCIP *scip, SCIP_DATATREE **datatree)
SCIP_RETCODE SCIPcreateDatatreeInTree(SCIP *scip, SCIP_DATATREE *datatree, SCIP_DATATREE **newtree, const char *name, int capacity)
SCIP_RETCODE SCIPinsertDatatreeString(SCIP *scip, SCIP_DATATREE *datatree, const char *name, const char *value)
SCIP_RETCODE SCIPinsertDatatreeBool(SCIP *scip, SCIP_DATATREE *datatree, const char *name, SCIP_Bool value)
SCIP_RETCODE SCIPcreateDatatree(SCIP *scip, SCIP_DATATREE **datatree, int capacity)
SCIP_RETCODE SCIPinsertDatatreeInt(SCIP *scip, SCIP_DATATREE *datatree, const char *name, int value)
SCIP_RETCODE SCIPinsertDatatreeLong(SCIP *scip, SCIP_DATATREE *datatree, const char *name, SCIP_Longint value)
SCIP_RETCODE SCIPwriteDatatreeJson(SCIP *scip, FILE *file, SCIP_DATATREE *datatree)
SCIP_RETCODE SCIPinsertDatatreeReal(SCIP *scip, SCIP_DATATREE *datatree, const char *name, SCIP_Real value)
SCIP_Longint SCIPdivesetGetNBacktracks(SCIP_DIVESET *diveset, SCIP_DIVECONTEXT divecontext)
Definition heur.c:615
SCIP_Longint SCIPdivesetGetNSols(SCIP_DIVESET *diveset, SCIP_DIVECONTEXT divecontext)
Definition heur.c:641
int SCIPdivesetGetMaxSolutionDepth(SCIP_DIVESET *diveset, SCIP_DIVECONTEXT divecontext)
Definition heur.c:563
SCIP_Longint SCIPdivesetGetNConflicts(SCIP_DIVESET *diveset, SCIP_DIVECONTEXT divecontext)
Definition heur.c:628
SCIP_Real SCIPdivesetGetAvgSolutionDepth(SCIP_DIVESET *diveset, SCIP_DIVECONTEXT divecontext)
Definition heur.c:576
int SCIPdivesetGetMaxDepth(SCIP_DIVESET *diveset, SCIP_DIVECONTEXT divecontext)
Definition heur.c:524
int SCIPdivesetGetMinDepth(SCIP_DIVESET *diveset, SCIP_DIVECONTEXT divecontext)
Definition heur.c:511
SCIP_Real SCIPdivesetGetAvgDepth(SCIP_DIVESET *diveset, SCIP_DIVECONTEXT divecontext)
Definition heur.c:537
SCIP_Longint SCIPdivesetGetNLPIterations(SCIP_DIVESET *diveset, SCIP_DIVECONTEXT divecontext)
Definition heur.c:589
int SCIPdivesetGetMinSolutionDepth(SCIP_DIVESET *diveset, SCIP_DIVECONTEXT divecontext)
Definition heur.c:550
const char * SCIPdivesetGetName(SCIP_DIVESET *diveset)
Definition heur.c:445
int SCIPdivesetGetNCalls(SCIP_DIVESET *diveset, SCIP_DIVECONTEXT divecontext)
Definition heur.c:485
SCIP_Longint SCIPdivesetGetNProbingNodes(SCIP_DIVESET *diveset, SCIP_DIVECONTEXT divecontext)
Definition heur.c:602
int SCIPdivesetGetNSolutionCalls(SCIP_DIVESET *diveset, SCIP_DIVECONTEXT divecontext)
Definition heur.c:498
SCIP_Bool SCIPisExact(SCIP *scip)
Definition scip_exact.c:193
const char * SCIPexprhdlrGetName(SCIP_EXPRHDLR *exprhdlr)
Definition expr.c:545
SCIP_Real SCIPexprhdlrGetEstimateTime(SCIP_EXPRHDLR *exprhdlr)
Definition expr.c:793
SCIP_Longint SCIPexprhdlrGetNDomainReductions(SCIP_EXPRHDLR *exprhdlr)
Definition expr.c:761
SCIP_Real SCIPexprhdlrGetReversepropTime(SCIP_EXPRHDLR *exprhdlr)
Definition expr.c:741
SCIP_Longint SCIPexprhdlrGetNReversepropCalls(SCIP_EXPRHDLR *exprhdlr)
Definition expr.c:731
const char * SCIPexprhdlrGetDescription(SCIP_EXPRHDLR *exprhdlr)
Definition expr.c:555
unsigned int SCIPexprhdlrGetNCreated(SCIP_EXPRHDLR *exprhdlr)
Definition expr.c:701
SCIP_Longint SCIPexprhdlrGetNBranchings(SCIP_EXPRHDLR *exprhdlr)
Definition expr.c:807
SCIP_Longint SCIPexprhdlrGetNSimplifyCalls(SCIP_EXPRHDLR *exprhdlr)
Definition expr.c:827
SCIP_Real SCIPexprhdlrGetIntevalTime(SCIP_EXPRHDLR *exprhdlr)
Definition expr.c:721
SCIP_Real SCIPexprhdlrGetSimplifyTime(SCIP_EXPRHDLR *exprhdlr)
Definition expr.c:837
SCIP_Longint SCIPexprhdlrGetNIntevalCalls(SCIP_EXPRHDLR *exprhdlr)
Definition expr.c:711
SCIP_Longint SCIPexprhdlrGetNSimplifications(SCIP_EXPRHDLR *exprhdlr)
Definition expr.c:847
SCIP_Longint SCIPexprhdlrGetNCutoffs(SCIP_EXPRHDLR *exprhdlr)
Definition expr.c:751
SCIP_Longint SCIPexprhdlrGetNEstimateCalls(SCIP_EXPRHDLR *exprhdlr)
Definition expr.c:783
const char * SCIPheurGetDesc(SCIP_HEUR *heur)
Definition heur.c:1477
SCIP_Longint SCIPheurGetNSolsFound(SCIP_HEUR *heur)
Definition heur.c:1603
SCIP_Longint SCIPheurGetNBestSolsFound(SCIP_HEUR *heur)
Definition heur.c:1613
SCIP_Longint SCIPheurGetNCalls(SCIP_HEUR *heur)
Definition heur.c:1593
SCIP_Real SCIPheurGetSetupTime(SCIP_HEUR *heur)
Definition heur.c:1645
int SCIPheurGetNDivesets(SCIP_HEUR *heur)
Definition heur.c:1675
SCIP_Real SCIPheurGetTime(SCIP_HEUR *heur)
Definition heur.c:1655
const char * SCIPheurGetName(SCIP_HEUR *heur)
Definition heur.c:1467
SCIP_DIVESET ** SCIPheurGetDivesets(SCIP_HEUR *heur)
Definition heur.c:1665
BMS_BUFMEM * SCIPbuffer(SCIP *scip)
Definition scip_mem.c:72
#define SCIPallocBufferArray(scip, ptr, num)
Definition scip_mem.h:124
#define SCIPfreeBufferArray(scip, ptr)
Definition scip_mem.h:136
int SCIPnlpiGetNSolves(SCIP_NLPI *nlpi)
Definition nlpi.c:774
SCIP_Real SCIPnlpiGetProblemTime(SCIP_NLPI *nlpi)
Definition nlpi.c:765
SCIP_Real SCIPnlpiGetSolveTime(SCIP_NLPI *nlpi)
Definition nlpi.c:783
int SCIPnlpiGetNTermStat(SCIP_NLPI *nlpi, SCIP_NLPTERMSTAT termstatus)
Definition nlpi.c:813
SCIP_Longint SCIPnlpiGetNIterations(SCIP_NLPI *nlpi)
Definition nlpi.c:804
int SCIPnlpiGetNProblems(SCIP_NLPI *nlpi)
Definition nlpi.c:756
const char * SCIPnlpiGetDesc(SCIP_NLPI *nlpi)
Definition nlpi.c:732
int SCIPnlpiGetNSolStat(SCIP_NLPI *nlpi, SCIP_NLPSOLSTAT solstatus)
Definition nlpi.c:823
const char * SCIPnlpiGetName(SCIP_NLPI *nlpi)
Definition nlpi.c:722
SCIP_Real SCIPnlpiGetEvalTime(SCIP_NLPI *nlpi)
Definition nlpi.c:795
SCIP_RETCODE SCIPgetNLPNlRowsStat(SCIP *scip, int *nlinear, int *nconvexineq, int *nnonconvexineq, int *nnonlineareq)
Definition scip_nlp.c:369
SCIP_Real SCIPpresolGetSetupTime(SCIP_PRESOL *presol)
Definition presol.c:722
int SCIPpresolGetNAggrVars(SCIP_PRESOL *presol)
Definition presol.c:752
int SCIPpresolGetNCalls(SCIP_PRESOL *presol)
Definition presol.c:842
int SCIPpresolGetNDelConss(SCIP_PRESOL *presol)
Definition presol.c:792
int SCIPpresolGetNChgCoefs(SCIP_PRESOL *presol)
Definition presol.c:822
int SCIPpresolGetNAddHoles(SCIP_PRESOL *presol)
Definition presol.c:782
SCIP_Real SCIPpresolGetTime(SCIP_PRESOL *presol)
Definition presol.c:732
int SCIPpresolGetNChgVarTypes(SCIP_PRESOL *presol)
Definition presol.c:762
int SCIPpresolGetNChgSides(SCIP_PRESOL *presol)
Definition presol.c:832
int SCIPpresolGetNFixedVars(SCIP_PRESOL *presol)
Definition presol.c:742
const char * SCIPpresolGetDesc(SCIP_PRESOL *presol)
Definition presol.c:635
int SCIPpresolGetNChgBds(SCIP_PRESOL *presol)
Definition presol.c:772
int SCIPpresolGetNAddConss(SCIP_PRESOL *presol)
Definition presol.c:802
const char * SCIPpresolGetName(SCIP_PRESOL *presol)
Definition presol.c:625
int SCIPpricerGetNVarsFound(SCIP_PRICER *pricer)
Definition pricer.c:673
const char * SCIPpricerGetName(SCIP_PRICER *pricer)
Definition pricer.c:619
SCIP_Real SCIPpricerGetSetupTime(SCIP_PRICER *pricer)
Definition pricer.c:683
SCIP_Real SCIPpricerGetTime(SCIP_PRICER *pricer)
Definition pricer.c:693
int SCIPpricerGetNCalls(SCIP_PRICER *pricer)
Definition pricer.c:663
SCIP_Bool SCIPpropDoesPresolve(SCIP_PROP *prop)
Definition prop.c:1307
SCIP_Real SCIPpropGetRespropTime(SCIP_PROP *prop)
Definition prop.c:1086
SCIP_Real SCIPpropGetPresolTime(SCIP_PROP *prop)
Definition prop.c:1096
SCIP_Longint SCIPpropGetNCutoffs(SCIP_PROP *prop)
Definition prop.c:1126
SCIP_Real SCIPpropGetSetupTime(SCIP_PROP *prop)
Definition prop.c:1044
int SCIPpropGetNAddHoles(SCIP_PROP *prop)
Definition prop.c:1216
int SCIPpropGetNChgBds(SCIP_PROP *prop)
Definition prop.c:1206
int SCIPpropGetNChgSides(SCIP_PROP *prop)
Definition prop.c:1266
int SCIPpropGetNPresolCalls(SCIP_PROP *prop)
Definition prop.c:1276
SCIP_Longint SCIPpropGetNRespropCalls(SCIP_PROP *prop)
Definition prop.c:1116
SCIP_Real SCIPpropGetStrongBranchPropTime(SCIP_PROP *prop)
Definition prop.c:1076
SCIP_Longint SCIPpropGetNDomredsFound(SCIP_PROP *prop)
Definition prop.c:1136
int SCIPpropGetNChgCoefs(SCIP_PROP *prop)
Definition prop.c:1256
int SCIPpropGetNAggrVars(SCIP_PROP *prop)
Definition prop.c:1186
const char * SCIPpropGetDesc(SCIP_PROP *prop)
Definition prop.c:961
int SCIPpropGetNFixedVars(SCIP_PROP *prop)
Definition prop.c:1176
const char * SCIPpropGetName(SCIP_PROP *prop)
Definition prop.c:951
int SCIPpropGetNAddConss(SCIP_PROP *prop)
Definition prop.c:1236
SCIP_Real SCIPpropGetTime(SCIP_PROP *prop)
Definition prop.c:1066
int SCIPpropGetNChgVarTypes(SCIP_PROP *prop)
Definition prop.c:1196
SCIP_Longint SCIPpropGetNCalls(SCIP_PROP *prop)
Definition prop.c:1106
int SCIPpropGetNDelConss(SCIP_PROP *prop)
Definition prop.c:1226
int SCIPrationalToString(SCIP_RATIONAL *rational, char *str, int strlen)
void SCIPrationalSetReal(SCIP_RATIONAL *res, SCIP_Real real)
Definition rational.cpp:604
void SCIPrationalFreeBuffer(BMS_BUFMEM *bufmem, SCIP_RATIONAL **rational)
Definition rational.cpp:474
SCIP_RETCODE SCIPrationalCreateBuffer(BMS_BUFMEM *bufmem, SCIP_RATIONAL **rational)
Definition rational.cpp:124
void SCIPrationalSetRational(SCIP_RATIONAL *res, SCIP_RATIONAL *src)
Definition rational.cpp:570
void SCIPrationalMessage(SCIP_MESSAGEHDLR *msg, FILE *file, SCIP_RATIONAL *rational)
void SCIPrationalSetNegInfinity(SCIP_RATIONAL *res)
Definition rational.cpp:631
SCIP_Bool SCIPrationalIsLE(SCIP_RATIONAL *rat1, SCIP_RATIONAL *rat2)
SCIP_Longint SCIPrelaxGetNAddedConss(SCIP_RELAX *relax)
Definition relax.c:673
SCIP_Real SCIPrelaxGetTime(SCIP_RELAX *relax)
Definition relax.c:633
const char * SCIPrelaxGetName(SCIP_RELAX *relax)
Definition relax.c:557
SCIP_Longint SCIPrelaxGetNCutoffs(SCIP_RELAX *relax)
Definition relax.c:653
SCIP_Longint SCIPrelaxGetNSeparatedCuts(SCIP_RELAX *relax)
Definition relax.c:703
SCIP_Longint SCIPrelaxGetNReducedDomains(SCIP_RELAX *relax)
Definition relax.c:693
SCIP_Real SCIPrelaxGetImprovedLowerboundTime(SCIP_RELAX *relax)
Definition relax.c:683
SCIP_Longint SCIPrelaxGetNImprovedLowerbound(SCIP_RELAX *relax)
Definition relax.c:663
SCIP_Longint SCIPrelaxGetNCalls(SCIP_RELAX *relax)
Definition relax.c:643
SCIP_Longint SCIPsepaGetNCutsApplied(SCIP_SEPA *sepa)
Definition sepa.c:954
SCIP_Longint SCIPsepaGetNCutoffs(SCIP_SEPA *sepa)
Definition sepa.c:903
SCIP_Longint SCIPsepaGetNCutsAppliedViaPool(SCIP_SEPA *sepa)
Definition sepa.c:964
SCIP_Longint SCIPsepaGetNCutsAppliedDirect(SCIP_SEPA *sepa)
Definition sepa.c:974
const char * SCIPsepaGetName(SCIP_SEPA *sepa)
Definition sepa.c:746
SCIP_Longint SCIPsepaGetNDomredsFound(SCIP_SEPA *sepa)
Definition sepa.c:1092
SCIP_Bool SCIPsepaIsParentsepa(SCIP_SEPA *sepa)
Definition sepa.c:1142
const char * SCIPsepaGetDesc(SCIP_SEPA *sepa)
Definition sepa.c:756
SCIP_Real SCIPsepaGetTime(SCIP_SEPA *sepa)
Definition sepa.c:863
SCIP_SEPA * SCIPsepaGetParentsepa(SCIP_SEPA *sepa)
Definition sepa.c:1152
SCIP_Longint SCIPsepaGetNCutsAddedViaPool(SCIP_SEPA *sepa)
Definition sepa.c:934
SCIP_Longint SCIPsepaGetNConssFound(SCIP_SEPA *sepa)
Definition sepa.c:1082
SCIP_Longint SCIPsepaGetNRootCalls(SCIP_SEPA *sepa)
Definition sepa.c:883
SCIP_Longint SCIPsepaGetNCutsAddedDirect(SCIP_SEPA *sepa)
Definition sepa.c:944
SCIP_Real SCIPsepaGetSetupTime(SCIP_SEPA *sepa)
Definition sepa.c:853
SCIP_Longint SCIPsepaGetNCutsFound(SCIP_SEPA *sepa)
Definition sepa.c:913
SCIP_Longint SCIPsepaGetNCalls(SCIP_SEPA *sepa)
Definition sepa.c:873
SCIP_Real SCIPsolGetTime(SCIP_SOL *sol)
Definition sol.c:4234
SCIP_Longint SCIPsolGetNodenum(SCIP_SOL *sol)
Definition sol.c:4254
SCIP_HEUR * SCIPsolGetHeur(SCIP_SOL *sol)
Definition sol.c:4274
int SCIPsolGetDepth(SCIP_SOL *sol)
Definition sol.c:4264
int SCIPsolGetRunnum(SCIP_SOL *sol)
Definition sol.c:4244
SCIP_Real SCIPretransformObj(SCIP *scip, SCIP_Real obj)
Definition scip_sol.c:2136
void SCIPprintPropagatorStatistics(SCIP *scip, FILE *file)
void SCIPprintTreeStatistics(SCIP *scip, FILE *file)
void SCIPprintStatusStatistics(SCIP *scip, FILE *file)
SCIP_Real SCIPgetAvgConflictScoreCurrentRun(SCIP *scip)
SCIP_RETCODE SCIPcollectTimingStatistics(SCIP *scip, SCIP_DATATREE *datatree)
SCIP_RATIONAL * SCIPgetCutoffboundExact(SCIP *scip)
void SCIPprintCompressionStatistics(SCIP *scip, FILE *file)
SCIP_Real SCIPgetAvgCutoffsCurrentRun(SCIP *scip, SCIP_BRANCHDIR dir)
void SCIPprintRootStatistics(SCIP *scip, FILE *file)
SCIP_Bool SCIPisPrimalboundSol(SCIP *scip)
SCIP_RETCODE SCIPcollectRelaxatorStatistics(SCIP *scip, SCIP_DATATREE *datatree)
SCIP_Longint SCIPgetNConflictDualproofsApplied(SCIP *scip)
int SCIPgetNImplications(SCIP *scip)
void SCIPprintConstraintTimingStatistics(SCIP *scip, FILE *file)
void SCIPaddNNodes(SCIP *scip, SCIP_Longint nnodes)
void SCIPincAvgGMIeff(SCIP *scip, SCIP_Real gmieff)
SCIP_RETCODE SCIPcollectCutselectorStatistics(SCIP *scip, SCIP_DATATREE *datatree)
SCIP_Real SCIPgetDeterministicTime(SCIP *scip)
SCIP_Longint SCIPgetNSolsFound(SCIP *scip)
SCIP_Real SCIPgetPrimalbound(SCIP *scip)
int SCIPgetMaxDepth(SCIP *scip)
SCIP_RETCODE SCIPcollectNLPIStatistics(SCIP *scip, SCIP_DATATREE *datatree)
SCIP_RETCODE SCIPupdateCutoffbound(SCIP *scip, SCIP_Real cutoffbound)
SCIP_Longint SCIPgetNBarrierLPIterations(SCIP *scip)
void SCIPgetUpperboundExact(SCIP *scip, SCIP_RATIONAL *result)
SCIP_Real SCIPgetAvgInferenceScore(SCIP *scip)
SCIP_RETCODE SCIPcollectStatusStatistics(SCIP *scip, SCIP_DATATREE *datatree)
SCIP_Longint SCIPgetNDivingLPIterations(SCIP *scip)
SCIP_Real SCIPgetAvgPseudocostScoreCurrentRun(SCIP *scip)
SCIP_RETCODE SCIPcollectConstraintStatistics(SCIP *scip, SCIP_DATATREE *datatree)
SCIP_RETCODE SCIPcollectHeuristicStatistics(SCIP *scip, SCIP_DATATREE *datatree)
SCIP_Real SCIPgetUpperbound(SCIP *scip)
SCIP_Real SCIPgetLowerboundRoot(SCIP *scip)
SCIP_Real SCIPgetAvgConflictlengthScore(SCIP *scip)
void SCIPprintSolutionStatistics(SCIP *scip, FILE *file)
SCIP_RETCODE SCIPcollectBendersStatistics(SCIP *scip, SCIP_DATATREE *datatree)
SCIP_Real SCIPgetAvgPseudocostCount(SCIP *scip, SCIP_BRANCHDIR dir)
SCIP_Longint SCIPgetNInfeasibleLeaves(SCIP *scip)
void SCIPprintRelaxatorStatistics(SCIP *scip, FILE *file)
SCIP_RETCODE SCIPcollectNLPStatistics(SCIP *scip, SCIP_DATATREE *datatree)
SCIP_Real SCIPgetGap(SCIP *scip)
SCIP_Longint SCIPgetNResolveLPIterations(SCIP *scip)
void SCIPprintOrigProblemStatistics(SCIP *scip, FILE *file)
SCIP_Longint SCIPgetNNodeZeroIterationLPs(SCIP *scip)
SCIP_Longint SCIPgetNNodes(SCIP *scip)
SCIP_Longint SCIPgetNFeasibleLeaves(SCIP *scip)
SCIP_Longint SCIPgetNNodeInitLPs(SCIP *scip)
int SCIPgetMaxTotalDepth(SCIP *scip)
SCIP_RETCODE SCIPcollectConflictStatistics(SCIP *scip, SCIP_DATATREE *datatree)
int SCIPgetNPricevars(SCIP *scip)
SCIP_Longint SCIPgetNResConflictConssApplied(SCIP *scip)
int SCIPgetNRootboundChgsRun(SCIP *scip)
SCIP_Real SCIPgetDualbound(SCIP *scip)
SCIP_RETCODE SCIPcollectSeparatorStatistics(SCIP *scip, SCIP_DATATREE *datatree)
void SCIPprintLPStatistics(SCIP *scip, FILE *file)
SCIP_Longint SCIPgetNRootStrongbranchs(SCIP *scip)
int SCIPgetNEnabledConss(SCIP *scip)
int SCIPgetNSepaRounds(SCIP *scip)
int SCIPgetNCutsFoundRound(SCIP *scip)
SCIP_RETCODE SCIPprintStatisticsJson(SCIP *scip, FILE *file)
void SCIPprintNLPStatistics(SCIP *scip, FILE *file)
int SCIPgetNRootboundChgs(SCIP *scip)
SCIP_Real SCIPgetFirstPrimalBound(SCIP *scip)
void SCIPgetDualboundExact(SCIP *scip, SCIP_RATIONAL *result)
SCIP_Longint SCIPgetNStrongbranchLPIterations(SCIP *scip)
int SCIPgetNPricevarsApplied(SCIP *scip)
SCIP_RETCODE SCIPcollectTreeStatistics(SCIP *scip, SCIP_DATATREE *datatree)
int SCIPgetNCutsApplied(SCIP *scip)
void SCIPprintPricerStatistics(SCIP *scip, FILE *file)
SCIP_RETCODE SCIPprintStatistics(SCIP *scip, FILE *file)
SCIP_RETCODE SCIPcollectOrigProblemStatistics(SCIP *scip, SCIP_DATATREE *datatree)
SCIP_Real SCIPgetLowerbound(SCIP *scip)
SCIP_Real SCIPgetAvgLowerbound(SCIP *scip)
SCIP_RETCODE SCIPcollectBranchruleStatistics(SCIP *scip, SCIP_DATATREE *datatree)
SCIP_RETCODE SCIPcollectPricerStatistics(SCIP *scip, SCIP_DATATREE *datatree)
SCIP_RETCODE SCIPprintBranchingStatistics(SCIP *scip, FILE *file)
SCIP_Longint SCIPgetNTotalNodes(SCIP *scip)
void SCIPprintSeparatorStatistics(SCIP *scip, FILE *file)
void SCIPprintConcsolverStatistics(SCIP *scip, FILE *file)
SCIP_RETCODE SCIPcollectRootStatistics(SCIP *scip, SCIP_DATATREE *datatree)
SCIP_Longint SCIPgetNResolveLPs(SCIP *scip)
void SCIPgetPrimalboundExact(SCIP *scip, SCIP_RATIONAL *result)
int SCIPgetNRuns(SCIP *scip)
void SCIPprintNLPIStatistics(SCIP *scip, FILE *file)
SCIP_Longint SCIPgetNNodeLPIterations(SCIP *scip)
SCIP_Longint SCIPgetNDualLPIterations(SCIP *scip)
void SCIPprintBranchruleStatistics(SCIP *scip, FILE *file)
int SCIPgetNActiveConss(SCIP *scip)
void SCIPprintConflictStatistics(SCIP *scip, FILE *file)
SCIP_Real SCIPgetDualboundRoot(SCIP *scip)
SCIP_Longint SCIPgetNDualLPs(SCIP *scip)
SCIP_Real SCIPgetAvgCutoffScoreCurrentRun(SCIP *scip)
SCIP_Real SCIPgetAvgGMIeff(SCIP *scip)
void SCIPprintExpressionHandlerStatistics(SCIP *scip, FILE *file)
int SCIPgetNPriceRounds(SCIP *scip)
SCIP_Longint SCIPgetNLPs(SCIP *scip)
int SCIPgetNReoptRuns(SCIP *scip)
SCIP_Real SCIPgetAvgDualbound(SCIP *scip)
void SCIPprintBendersStatistics(SCIP *scip, FILE *file)
void SCIPprintTimingStatistics(SCIP *scip, FILE *file)
SCIP_Longint SCIPgetNRootLPIterations(SCIP *scip)
SCIP_Longint SCIPgetNPrimalResolveLPIterations(SCIP *scip)
SCIP_Real SCIPgetAvgInferenceScoreCurrentRun(SCIP *scip)
void SCIPprintCutselectorStatistics(SCIP *scip, FILE *file)
SCIP_RETCODE SCIPcollectExpressionHandlerStatistics(SCIP *scip, SCIP_DATATREE *datatree)
SCIP_Real SCIPgetAvgConflictScore(SCIP *scip)
SCIP_Longint SCIPgetNLimSolsFound(SCIP *scip)
void SCIPstoreSolutionGap(SCIP *scip)
SCIP_Real SCIPgetAvgPseudocost(SCIP *scip, SCIP_Real solvaldelta)
int SCIPgetNRootIntFixingsRun(SCIP *scip)
SCIP_RETCODE SCIPcollectCompressionStatistics(SCIP *scip, SCIP_DATATREE *datatree)
void SCIPprintConstraintStatistics(SCIP *scip, FILE *file)
SCIP_Longint SCIPgetNBacktracks(SCIP *scip)
SCIP_RETCODE SCIPprintReoptStatistics(SCIP *scip, FILE *file)
SCIP_Longint SCIPgetNBarrierLPs(SCIP *scip)
SCIP_Longint SCIPgetNDualResolveLPIterations(SCIP *scip)
SCIP_Real SCIPgetTransGap(SCIP *scip)
SCIP_Longint SCIPgetNBestSolsFound(SCIP *scip)
SCIP_Real SCIPgetAvgPseudocostScore(SCIP *scip)
SCIP_Real SCIPgetPseudocostCount(SCIP *scip, SCIP_BRANCHDIR dir, SCIP_Bool onlycurrentrun)
SCIP_Real SCIPgetCutoffbound(SCIP *scip)
SCIP_Real SCIPgetFirstLPLowerboundRoot(SCIP *scip)
SCIP_Real SCIPgetAvgPseudocostCountCurrentRun(SCIP *scip, SCIP_BRANCHDIR dir)
SCIP_Longint SCIPgetNExactLPs(SCIP *scip)
SCIP_Longint SCIPgetNConflictConssApplied(SCIP *scip)
SCIP_Longint SCIPgetNObjlimLeaves(SCIP *scip)
SCIP_RETCODE SCIPcollectPropagatorStatistics(SCIP *scip, SCIP_DATATREE *datatree)
int SCIPgetNCutsFound(SCIP *scip)
void SCIPprintPresolverStatistics(SCIP *scip, FILE *file)
SCIP_RETCODE SCIPcollectPresolverStatistics(SCIP *scip, SCIP_DATATREE *datatree)
void SCIPprintTransProblemStatistics(SCIP *scip, FILE *file)
SCIP_RETCODE SCIPprintDisplayLine(SCIP *scip, FILE *file, SCIP_VERBLEVEL verblevel, SCIP_Bool endline)
SCIP_Longint SCIPgetNDivingLPs(SCIP *scip)
SCIP_Longint SCIPgetNNodeLPs(SCIP *scip)
SCIP_Real SCIPgetFirstLPDualboundRoot(SCIP *scip)
SCIP_Real SCIPgetAvgConflictlengthScoreCurrentRun(SCIP *scip)
SCIP_Longint SCIPgetNRootFirstLPIterations(SCIP *scip)
int SCIPgetNPricevarsFound(SCIP *scip)
void SCIPgetLowerboundExact(SCIP *scip, SCIP_RATIONAL *result)
SCIP_Longint SCIPgetNNodeInitLPIterations(SCIP *scip)
SCIP_Longint SCIPgetNNZs(SCIP *scip)
SCIP_Longint SCIPgetNDelayedCutoffs(SCIP *scip)
SCIP_Longint SCIPgetNPrimalResolveLPs(SCIP *scip)
SCIP_Longint SCIPgetNConflictConssFound(SCIP *scip)
SCIP_Real SCIPgetAvgDPseudocostScore(SCIP *scip, SCIP_Real discountfac)
SCIP_Real SCIPgetAvgPseudocostCurrentRun(SCIP *scip, SCIP_Real solvaldelta)
SCIP_Real SCIPgetAvgInferences(SCIP *scip, SCIP_BRANCHDIR dir)
SCIP_Longint SCIPgetNPrimalLPIterations(SCIP *scip)
SCIP_Longint SCIPgetNStrongbranchs(SCIP *scip)
SCIP_RETCODE SCIPcollectLPStatistics(SCIP *scip, SCIP_DATATREE *datatree)
SCIP_RETCODE SCIPcollectConcsolverStatistics(SCIP *scip, SCIP_DATATREE *datatree)
SCIP_RETCODE SCIPcollectBranchingStatistics(SCIP *scip, SCIP_DATATREE *datatree)
int SCIPgetNConflictConssFoundNode(SCIP *scip)
SCIP_Longint SCIPgetNLPIterations(SCIP *scip)
SCIP_RETCODE SCIPcollectConstraintTimingStatistics(SCIP *scip, SCIP_DATATREE *datatree)
SCIP_Real SCIPgetAvgInferencesCurrentRun(SCIP *scip, SCIP_BRANCHDIR dir)
SCIP_Longint SCIPgetNDualResolveLPs(SCIP *scip)
void SCIPprintHeuristicStatistics(SCIP *scip, FILE *file)
SCIP_Real SCIPgetPseudocostVariance(SCIP *scip, SCIP_BRANCHDIR branchdir, SCIP_Bool onlycurrentrun)
SCIP_Real SCIPgetPrimalDualIntegral(SCIP *scip)
SCIP_RETCODE SCIPcollectTransProblemStatistics(SCIP *scip, SCIP_DATATREE *datatree)
SCIP_Longint SCIPgetNPrimalLPs(SCIP *scip)
SCIP_Real SCIPgetAvgCutoffs(SCIP *scip, SCIP_BRANCHDIR dir)
SCIP_Longint SCIPgetNRootStrongbranchLPIterations(SCIP *scip)
SCIP_RETCODE SCIPcollectSolutionStatistics(SCIP *scip, SCIP_DATATREE *datatree)
SCIP_Real SCIPgetAvgCutoffScore(SCIP *scip)
int SCIPtableGetPosition(SCIP_TABLE *table)
Definition table.c:367
SCIP_TABLE ** SCIPgetTables(SCIP *scip)
Definition scip_table.c:114
int SCIPgetNTables(SCIP *scip)
Definition scip_table.c:125
const char * SCIPtableGetName(SCIP_TABLE *table)
Definition table.c:347
SCIP_STAGE SCIPtableGetEarliestStage(SCIP_TABLE *table)
Definition table.c:377
SCIP_Bool SCIPtableIsActive(SCIP_TABLE *table)
Definition table.c:387
SCIP_Real SCIPgetFirstLPTime(SCIP *scip)
SCIP_Real SCIPgetSolvingTime(SCIP *scip)
SCIP_Real SCIPgetReadingTime(SCIP *scip)
SCIP_Real SCIPinfinity(SCIP *scip)
SCIP_Bool SCIPisLE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisFeasZero(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisInfinity(SCIP *scip, SCIP_Real val)
SCIP_Real SCIPvarGetAvgBranchdepth(SCIP_VAR *var, SCIP_BRANCHDIR dir)
Definition var.c:21839
int SCIPvarGetNLocksUpType(SCIP_VAR *var, SCIP_LOCKTYPE locktype)
Definition var.c:4386
const char * SCIPvarGetName(SCIP_VAR *var)
Definition var.c:23267
SCIP_Real SCIPvarGetBranchFactor(SCIP_VAR *var)
Definition var.c:24450
SCIP_Longint SCIPvarGetNBranchings(SCIP_VAR *var, SCIP_BRANCHDIR dir)
Definition var.c:21751
int SCIPvarGetBranchPriority(SCIP_VAR *var)
Definition var.c:24462
int SCIPgetVarNStrongbranchs(SCIP *scip, SCIP_VAR *var)
Definition scip_var.c:5085
int SCIPvarGetNLocksDownType(SCIP_VAR *var, SCIP_LOCKTYPE locktype)
Definition var.c:4328
void SCIPsortPtr(void **ptrarray, SCIP_DECL_SORTPTRCOMP((*ptrcomp)), int len)
int SCIPsnprintf(char *t, int len, const char *s,...)
Definition misc.c:10827
return SCIP_OKAY
static SCIP_DIVESET * diveset
int c
int depth
SCIP_Real objval
assert(minobj< SCIPgetCutoffbound(scip))
SCIP_VAR * var
static SCIP_VAR ** vars
SCIP_Real SCIPhistoryGetPseudocost(SCIP_HISTORY *history, SCIP_Real solvaldelta)
Definition history.c:529
SCIP_Real SCIPhistoryGetAvgInferences(SCIP_HISTORY *history, SCIP_BRANCHDIR dir)
Definition history.c:790
SCIP_Longint SCIPhistoryGetNBranchings(SCIP_HISTORY *history, SCIP_BRANCHDIR dir)
Definition history.c:764
SCIP_Real SCIPhistoryGetAvgConflictlength(SCIP_HISTORY *history, SCIP_BRANCHDIR dir)
Definition history.c:703
SCIP_Real SCIPhistoryGetAvgCutoffs(SCIP_HISTORY *history, SCIP_BRANCHDIR dir)
Definition history.c:816
SCIP_Real SCIPhistoryGetAncPseudocost(SCIP_HISTORY *history, SCIP_Real solvaldelta)
Definition history.c:543
SCIP_Real SCIPhistoryGetCutoffSum(SCIP_HISTORY *history, SCIP_BRANCHDIR dir)
Definition history.c:803
SCIP_Real SCIPhistoryGetPseudocostCount(SCIP_HISTORY *history, SCIP_BRANCHDIR dir)
Definition history.c:581
SCIP_Real SCIPhistoryGetPseudocostVariance(SCIP_HISTORY *history, SCIP_BRANCHDIR direction)
Definition history.c:557
SCIP_Real SCIPhistoryGetVSIDS(SCIP_HISTORY *history, SCIP_BRANCHDIR dir)
Definition history.c:661
SCIP_Real SCIPhistoryGetAvgGMIeff(SCIP_HISTORY *history)
Definition history.c:874
SCIP_Real SCIPhistoryGetInferenceSum(SCIP_HISTORY *history, SCIP_BRANCHDIR dir)
Definition history.c:777
void SCIPhistoryIncGMIeffSum(SCIP_HISTORY *history, SCIP_Real gmieff)
Definition history.c:884
internal methods for branching and inference history
SCIP_Longint SCIPcliquetableGetNEntries(SCIP_CLIQUETABLE *cliquetable)
Definition implics.c:3540
methods for implications, variable bounds, and cliques
static SCIP_RETCODE strongbranch(SCIP_LPI *lpi, int col_index, SCIP_Real psol, int itlim, SCIP_Real *down, SCIP_Real *up, SCIP_Bool *downvalid, SCIP_Bool *upvalid, int *iter)
memory allocation routines
#define BMSclearMemoryArray(ptr, num)
Definition memory.h:130
void SCIPmessageFPrintInfo(SCIP_MESSAGEHDLR *messagehdlr, FILE *file, const char *formatstr,...)
Definition message.c:618
int SCIPpricestoreGetNVars(SCIP_PRICESTORE *pricestore)
Definition pricestore.c:617
int SCIPpricestoreGetNVarsApplied(SCIP_PRICESTORE *pricestore)
Definition pricestore.c:679
SCIP_Real SCIPpricestoreGetProbPricingTime(SCIP_PRICESTORE *pricestore)
Definition pricestore.c:639
int SCIPpricestoreGetNVarsFound(SCIP_PRICESTORE *pricestore)
Definition pricestore.c:669
int SCIPpricestoreGetNProbvarsFound(SCIP_PRICESTORE *pricestore)
Definition pricestore.c:659
int SCIPpricestoreGetNProbPricings(SCIP_PRICESTORE *pricestore)
Definition pricestore.c:649
internal methods for storing priced variables
SCIP_Bool SCIPprimalUpperboundIsSol(SCIP_PRIMAL *primal, SCIP_SET *set, SCIP_PROB *transprob, SCIP_PROB *origprob)
Definition primal.c:787
SCIP_RETCODE SCIPprimalSetCutoffbound(SCIP_PRIMAL *primal, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_EVENTQUEUE *eventqueue, SCIP_EVENTFILTER *eventfilter, SCIP_PROB *transprob, SCIP_PROB *origprob, SCIP_TREE *tree, SCIP_REOPT *reopt, SCIP_LP *lp, SCIP_Real cutoffbound, SCIP_Bool useforobjlimit)
Definition primal.c:348
internal methods for collecting primal CIP solutions and primal informations
void SCIPprobPrintStatistics(SCIP_PROB *prob, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, FILE *file)
Definition prob.c:2686
SCIP_RETCODE SCIPprobCollectStatistics(SCIP_PROB *prob, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_DATATREE *datatree)
Definition prob.c:2708
SCIP_Real SCIPprobExternObjval(SCIP_PROB *transprob, SCIP_PROB *origprob, SCIP_SET *set, SCIP_Real objval)
Definition prob.c:2520
void SCIPprobExternObjvalExact(SCIP_PROB *transprob, SCIP_PROB *origprob, SCIP_SET *set, SCIP_RATIONAL *objval, SCIP_RATIONAL *objvalext)
Definition prob.c:2546
SCIP_Real SCIPprobInternObjval(SCIP_PROB *transprob, SCIP_PROB *origprob, SCIP_SET *set, SCIP_Real objval)
Definition prob.c:2573
internal methods for storing and manipulating the main problem
public methods for Benders' decomposition
public methods for Benders' decomposition cuts
public methods for branching rules
public methods for tree compressions
public methods for managing constraints
public methods for storing cuts in a cut pool
public methods for cut selectors
public functions to work with algebraic expressions
public methods for primal heuristics
public methods for branching and inference history structure
public methods for message output
#define SCIPerrorMessage
Definition pub_message.h:64
public data structures and miscellaneous methods
methods for sorting joint arrays of various types
public methods for NLP solver interfaces
public methods for presolvers
public methods for variable pricers
public methods for propagators
public methods for input file readers
public methods for relaxation handlers
public methods for reoptimization
int SCIPreoptGetNTotalPrunedNodes(SCIP_REOPT *reopt)
Definition reopt.c:4967
int SCIPreoptGetNTotalFeasNodes(SCIP_REOPT *reopt)
Definition reopt.c:4947
int SCIPreoptGetFirstRestarts(SCIP_REOPT *reopt)
Definition reopt.c:4917
int SCIPreoptGetNTotalRestartsLocal(SCIP_REOPT *reopt)
Definition reopt.c:4907
int SCIPreoptGetLastRestarts(SCIP_REOPT *reopt)
Definition reopt.c:4927
int SCIPreoptGetNTotalCutoffReoptnodes(SCIP_REOPT *reopt)
Definition reopt.c:4987
int SCIPreoptGetNTotalInfNodes(SCIP_REOPT *reopt)
Definition reopt.c:5007
int SCIPreoptGetNRestartsGlobal(SCIP_REOPT *reopt)
Definition reopt.c:4887
public methods for separators
public methods for primal CIP solutions
public methods for displaying statistic tables
public methods for problem variables
internal methods for input file readers
SCIP_Real SCIPreoptGetSavingtime(SCIP_REOPT *reopt)
Definition reopt.c:7565
data structures and methods for collecting reoptimization information
public methods for Benders decomposition
public methods for data tree structure
public methods for exact solving
general public methods
public methods for memory management
public methods for message handling
public methods for nonlinear relaxation
public methods for numerical tolerances
public methods for solutions
static const char * nlptermstatToString(SCIP_NLPTERMSTAT termstat)
static const char * nlpsolstatToString(SCIP_NLPSOLSTAT solstat)
public methods for querying solving statistics
public methods for statistics table plugins
public methods for timing
public methods for SCIP variables
int SCIPsepastoreGetNCutsFoundRound(SCIP_SEPASTORE *sepastore)
Definition sepastore.c:1224
int SCIPsepastoreGetNCutsApplied(SCIP_SEPASTORE *sepastore)
Definition sepastore.c:1234
int SCIPsepastoreGetNCutsAdded(SCIP_SEPASTORE *sepastore)
Definition sepastore.c:1194
internal methods for storing separated cuts
void SCIPsetSortCutsels(SCIP_SET *set)
Definition set.c:4603
void SCIPsetSortBranchrulesName(SCIP_SET *set)
Definition set.c:5179
void SCIPsetSortPresolsName(SCIP_SET *set)
Definition set.c:4396
void SCIPsetSortRelaxsName(SCIP_SET *set)
Definition set.c:4470
void SCIPsetSortPropsName(SCIP_SET *set)
Definition set.c:4694
SCIP_Real SCIPsetEpsilon(SCIP_SET *set)
Definition set.c:6402
void SCIPsetSortComprsName(SCIP_SET *set)
Definition set.c:4973
void SCIPsetSortPricersName(SCIP_SET *set)
Definition set.c:4017
SCIP_Real SCIPsetInfinity(SCIP_SET *set)
Definition set.c:6380
SCIP_Bool SCIPsetIsInfinity(SCIP_SET *set, SCIP_Real val)
Definition set.c:6515
void SCIPsetSortHeursName(SCIP_SET *set)
Definition set.c:4899
void SCIPsetSortSepasName(SCIP_SET *set)
Definition set.c:4544
internal methods for global SCIP settings
SCIP_Real SCIPsolGetObj(SCIP_SOL *sol, SCIP_SET *set, SCIP_PROB *transprob, SCIP_PROB *origprob)
Definition sol.c:2261
internal methods for storing primal CIP solutions
void SCIPstatUpdatePrimalDualIntegrals(SCIP_STAT *stat, SCIP_SET *set, SCIP_PROB *transprob, SCIP_PROB *origprob, SCIP_Real upperbound, SCIP_Real lowerbound)
Definition stat.c:514
SCIP_Real SCIPstatGetPrimalReferenceIntegral(SCIP_STAT *stat, SCIP_SET *set, SCIP_PROB *transprob, SCIP_PROB *origprob, SCIP_Bool update)
Definition stat.c:628
SCIP_Real SCIPstatGetDualReferenceIntegral(SCIP_STAT *stat, SCIP_SET *set, SCIP_PROB *transprob, SCIP_PROB *origprob, SCIP_Bool update)
Definition stat.c:607
SCIP_Real SCIPstatGetPrimalDualIntegral(SCIP_STAT *stat, SCIP_SET *set, SCIP_PROB *transprob, SCIP_PROB *origprob, SCIP_Bool update)
Definition stat.c:649
internal methods for problem statistics
datastructures for block memory pools and memory buffers
datastructures for collecting primal CIP solutions and primal informations
datastructures for storing and manipulating the main problem
SCIP main data structure.
datastructures for global SCIP settings
datastructures for problem statistics
int SCIPsyncstoreGetWinner(SCIP_SYNCSTORE *syncstore)
Definition syncstore.c:531
SCIP_Bool SCIPsyncstoreIsInitialized(SCIP_SYNCSTORE *syncstore)
Definition syncstore.c:795
the function declarations for the synchronization store
SCIP_RETCODE SCIPtableOutput(SCIP_TABLE *table, BMS_BLKMEM *blkmem, SCIP_SET *set, FILE *file)
Definition table.c:273
SCIP_RETCODE SCIPtableCollect(SCIP_TABLE *table, SCIP_SET *set, SCIP_DATATREE *datatree)
Definition table.c:305
internal methods for displaying statistics tables
SCIP_Real SCIPtreeGetAvgLowerbound(SCIP_TREE *tree, SCIP_Real cutoffbound)
Definition tree.c:8416
SCIP_RATIONAL * SCIPtreeGetLowerboundExact(SCIP_TREE *tree, SCIP_SET *set)
Definition tree.c:8302
SCIP_Real SCIPtreeGetLowerbound(SCIP_TREE *tree, SCIP_SET *set)
Definition tree.c:8268
int SCIPtreeGetNNodes(SCIP_TREE *tree)
Definition tree.c:9364
internal methods for branch and bound tree
struct SCIP_Benders SCIP_BENDERS
struct SCIP_Benderscut SCIP_BENDERSCUT
struct SCIP_Compr SCIP_COMPR
Definition type_compr.h:52
struct SCIP_ConcSolver SCIP_CONCSOLVER
struct SCIP_Conshdlr SCIP_CONSHDLR
Definition type_cons.h:62
struct SCIP_Cutsel SCIP_CUTSEL
Definition type_cutsel.h:52
struct SCIP_Datatree SCIP_DATATREE
struct SCIP_Exprhdlr SCIP_EXPRHDLR
Definition type_expr.h:194
enum SCIP_DiveContext SCIP_DIVECONTEXT
Definition type_heur.h:73
struct SCIP_Diveset SCIP_DIVESET
Definition type_heur.h:78
@ SCIP_DIVECONTEXT_SINGLE
Definition type_heur.h:69
@ SCIP_DIVECONTEXT_ADAPTIVE
Definition type_heur.h:70
@ SCIP_DIVECONTEXT_SCHEDULER
Definition type_heur.h:71
struct SCIP_History SCIP_HISTORY
@ SCIP_BRANCHDIR_DOWNWARDS
@ SCIP_BRANCHDIR_UPWARDS
enum SCIP_BranchDir SCIP_BRANCHDIR
enum SCIP_VerbLevel SCIP_VERBLEVEL
#define SCIP_DECL_SORTPTRCOMP(x)
Definition type_misc.h:189
struct SCIP_Nlpi SCIP_NLPI
Definition type_nlpi.h:51
enum SCIP_NlpSolStat SCIP_NLPSOLSTAT
Definition type_nlpi.h:168
@ SCIP_NLPTERMSTAT_OKAY
Definition type_nlpi.h:173
@ SCIP_NLPTERMSTAT_TIMELIMIT
Definition type_nlpi.h:174
@ SCIP_NLPTERMSTAT_NUMERICERROR
Definition type_nlpi.h:178
@ SCIP_NLPTERMSTAT_OTHER
Definition type_nlpi.h:182
@ SCIP_NLPTERMSTAT_EVALERROR
Definition type_nlpi.h:179
@ SCIP_NLPTERMSTAT_LICENSEERROR
Definition type_nlpi.h:181
@ SCIP_NLPTERMSTAT_LOBJLIMIT
Definition type_nlpi.h:176
@ SCIP_NLPTERMSTAT_ITERLIMIT
Definition type_nlpi.h:175
@ SCIP_NLPTERMSTAT_OUTOFMEMORY
Definition type_nlpi.h:180
@ SCIP_NLPTERMSTAT_INTERRUPT
Definition type_nlpi.h:177
@ SCIP_NLPSOLSTAT_UNBOUNDED
Definition type_nlpi.h:165
@ SCIP_NLPSOLSTAT_GLOBINFEASIBLE
Definition type_nlpi.h:164
@ SCIP_NLPSOLSTAT_LOCINFEASIBLE
Definition type_nlpi.h:163
@ SCIP_NLPSOLSTAT_FEASIBLE
Definition type_nlpi.h:162
@ SCIP_NLPSOLSTAT_LOCOPT
Definition type_nlpi.h:161
@ SCIP_NLPSOLSTAT_GLOBOPT
Definition type_nlpi.h:160
@ SCIP_NLPSOLSTAT_UNKNOWN
Definition type_nlpi.h:166
enum SCIP_NlpTermStat SCIP_NLPTERMSTAT
Definition type_nlpi.h:184
struct SCIP_Presol SCIP_PRESOL
Definition type_presol.h:50
struct SCIP_Pricer SCIP_PRICER
Definition type_pricer.h:44
struct SCIP_Prop SCIP_PROP
Definition type_prop.h:51
struct SCIP_Rational SCIP_RATIONAL
struct SCIP_Relax SCIP_RELAX
Definition type_relax.h:50
@ SCIP_INVALIDCALL
enum SCIP_Retcode SCIP_RETCODE
struct Scip SCIP
Definition type_scip.h:39
struct SCIP_Sepa SCIP_SEPA
Definition type_sepa.h:51
@ SCIP_STAGE_PROBLEM
Definition type_set.h:45
@ SCIP_STAGE_INITPRESOLVE
Definition type_set.h:48
@ SCIP_STAGE_SOLVED
Definition type_set.h:54
@ SCIP_STAGE_PRESOLVING
Definition type_set.h:49
@ SCIP_STAGE_TRANSFORMED
Definition type_set.h:47
@ SCIP_STAGE_INITSOLVE
Definition type_set.h:52
@ SCIP_STAGE_EXITPRESOLVE
Definition type_set.h:50
@ SCIP_STAGE_INIT
Definition type_set.h:44
@ SCIP_STAGE_SOLVING
Definition type_set.h:53
@ SCIP_STAGE_PRESOLVED
Definition type_set.h:51
@ SCIP_STATUS_UNBOUNDED
Definition type_stat.h:45
@ SCIP_STATUS_INFORUNBD
Definition type_stat.h:46
@ SCIP_STATUS_INFEASIBLE
Definition type_stat.h:44
struct SCIP_Table SCIP_TABLE
Definition type_table.h:59
struct SCIP_Var SCIP_VAR
Definition type_var.h:166
@ SCIP_LOCKTYPE_MODEL
Definition type_var.h:141
SCIP_Real SCIPvarGetPseudocost(SCIP_VAR *var, SCIP_STAT *stat, SCIP_Real solvaldelta)
Definition var.c:20437
SCIP_Real SCIPvarGetPseudocostCount(SCIP_VAR *var, SCIP_BRANCHDIR dir)
Definition var.c:20580
SCIP_Real SCIPvarGetPseudocostVariance(SCIP_VAR *var, SCIP_BRANCHDIR dir, SCIP_Bool onlycurrentrun)
Definition var.c:20744
SCIP_Real SCIPvarGetAvgCutoffs(SCIP_VAR *var, SCIP_STAT *stat, SCIP_BRANCHDIR dir)
Definition var.c:22317
SCIP_Real SCIPvarGetAvgInferences(SCIP_VAR *var, SCIP_STAT *stat, SCIP_BRANCHDIR dir)
Definition var.c:22119
internal methods for problem variables