Scippy

SCIP

Solving Constraint Integer Programs

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-2024 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 *
40 * @todo check all SCIP_STAGE_* switches, and include the new stages TRANSFORMED and INITSOLVE
41 */
42
43/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
44
46#include "scip/branch.h"
47#include "scip/clock.h"
48#include "scip/concsolver.h"
49#include "scip/concurrent.h"
50#include "scip/conflict.h"
51#include "scip/conflictstore.h"
52#include "scip/debug.h"
53#include "scip/disp.h"
54#include "scip/history.h"
55#include "scip/implics.h"
56#include "scip/pricestore.h"
57#include "scip/primal.h"
58#include "scip/prob.h"
59#include "scip/pub_benderscut.h"
60#include "scip/pub_benders.h"
61#include "scip/pub_branch.h"
62#include "scip/pub_compr.h"
63#include "scip/pub_cons.h"
64#include "scip/pub_cutpool.h"
65#include "scip/pub_cutsel.h"
66#include "scip/pub_expr.h"
67#include "scip/pub_heur.h"
68#include "scip/pub_history.h"
69#include "scip/pub_message.h"
70#include "scip/pub_misc.h"
71#include "scip/pub_misc_sort.h"
72#include "scip/pub_nlpi.h"
73#include "scip/pub_presol.h"
74#include "scip/pub_pricer.h"
75#include "scip/pub_prop.h"
76#include "scip/pub_reader.h"
77#include "scip/pub_relax.h"
78#include "scip/pub_reopt.h"
79#include "scip/pub_sepa.h"
80#include "scip/pub_sol.h"
81#include "scip/pub_table.h"
82#include "scip/pub_var.h"
83#include "scip/reader.h"
84#include "scip/reopt.h"
85#include "scip/scip_benders.h"
86#include "scip/scip_general.h"
87#include "scip/scip_mem.h"
88#include "scip/scip_message.h"
89#include "scip/scip_nlp.h"
90#include "scip/scip_numerics.h"
91#include "scip/scip_sol.h"
93#include "scip/scip_table.h"
94#include "scip/scip_timing.h"
95#include "scip/scip_var.h"
96#include "scip/sepastore.h"
97#include "scip/set.h"
98#include "scip/sol.h"
99#include "scip/stat.h"
100#include "scip/struct_mem.h"
101#include "scip/struct_primal.h"
102#include "scip/struct_prob.h"
103#include "scip/struct_scip.h"
104#include "scip/struct_set.h"
105#include "scip/struct_stat.h"
106#include "scip/syncstore.h"
107#include "scip/table.h"
108#include "scip/tree.h"
109#include "scip/var.h"
110#include <string.h>
111
112/** gets number of branch and bound runs performed, including the current run
113 *
114 * @return the number of branch and bound runs performed, including the current run
115 *
116 * @pre This method can be called if SCIP is in one of the following stages:
117 * - \ref SCIP_STAGE_PROBLEM
118 * - \ref SCIP_STAGE_TRANSFORMING
119 * - \ref SCIP_STAGE_TRANSFORMED
120 * - \ref SCIP_STAGE_INITPRESOLVE
121 * - \ref SCIP_STAGE_PRESOLVING
122 * - \ref SCIP_STAGE_EXITPRESOLVE
123 * - \ref SCIP_STAGE_PRESOLVED
124 * - \ref SCIP_STAGE_INITSOLVE
125 * - \ref SCIP_STAGE_SOLVING
126 * - \ref SCIP_STAGE_SOLVED
127 * - \ref SCIP_STAGE_EXITSOLVE
128 * - \ref SCIP_STAGE_FREETRANS
129 */
131 SCIP* scip /**< SCIP data structure */
132 )
133{
135
136 return scip->stat->nruns;
137}
138
139/** gets number of reoptimization runs performed, including the current run
140 *
141 * @return the number of reoptimization runs performed, including the current run
142 *
143 * @pre This method can be called if SCIP is in one of the following stages:
144 * - \ref SCIP_STAGE_PROBLEM
145 * - \ref SCIP_STAGE_TRANSFORMING
146 * - \ref SCIP_STAGE_TRANSFORMED
147 * - \ref SCIP_STAGE_INITPRESOLVE
148 * - \ref SCIP_STAGE_PRESOLVING
149 * - \ref SCIP_STAGE_EXITPRESOLVE
150 * - \ref SCIP_STAGE_PRESOLVED
151 * - \ref SCIP_STAGE_INITSOLVE
152 * - \ref SCIP_STAGE_SOLVING
153 * - \ref SCIP_STAGE_SOLVED
154 * - \ref SCIP_STAGE_EXITSOLVE
155 * - \ref SCIP_STAGE_FREETRANS
156 */
158 SCIP* scip /**< SCIP data structure */
159 )
160{
161 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetNReoptRuns", FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE) );
162
163 return scip->stat->nreoptruns;
164}
165
166/** add given number to the number of processed nodes in current run and in all runs, including the focus node
167 *
168 * @pre This method can be called if SCIP is in one of the following stages:
169 * - \ref SCIP_STAGE_PROBLEM
170 * - \ref SCIP_STAGE_TRANSFORMING
171 * - \ref SCIP_STAGE_TRANSFORMED
172 * - \ref SCIP_STAGE_INITPRESOLVE
173 * - \ref SCIP_STAGE_PRESOLVING
174 * - \ref SCIP_STAGE_EXITPRESOLVE
175 * - \ref SCIP_STAGE_PRESOLVED
176 * - \ref SCIP_STAGE_INITSOLVE
177 * - \ref SCIP_STAGE_SOLVING
178 * - \ref SCIP_STAGE_SOLVED
179 * - \ref SCIP_STAGE_EXITSOLVE
180 * - \ref SCIP_STAGE_FREETRANS
181 */
183 SCIP* scip, /**< SCIP data structure */
184 SCIP_Longint nnodes /**< number of processed nodes to add to the statistics */
185 )
186{
188
189 scip->stat->nnodes += nnodes;
190 scip->stat->ntotalnodes += nnodes;
191}
192
193/** gets number of processed nodes in current run, including the focus node
194 *
195 * @return the number of processed nodes in current run, including the focus node
196 *
197 * @pre This method can be called if SCIP is in one of the following stages:
198 * - \ref SCIP_STAGE_PROBLEM
199 * - \ref SCIP_STAGE_TRANSFORMING
200 * - \ref SCIP_STAGE_TRANSFORMED
201 * - \ref SCIP_STAGE_INITPRESOLVE
202 * - \ref SCIP_STAGE_PRESOLVING
203 * - \ref SCIP_STAGE_EXITPRESOLVE
204 * - \ref SCIP_STAGE_PRESOLVED
205 * - \ref SCIP_STAGE_INITSOLVE
206 * - \ref SCIP_STAGE_SOLVING
207 * - \ref SCIP_STAGE_SOLVED
208 * - \ref SCIP_STAGE_EXITSOLVE
209 * - \ref SCIP_STAGE_FREETRANS
210 */
212 SCIP* scip /**< SCIP data structure */
213 )
214{
216
217 return scip->stat->nnodes;
218}
219
220/** gets total number of processed nodes in all runs, including the focus node
221 *
222 * @return the total number of processed nodes in all runs, including the focus node
223 *
224 * @pre This method can be called if SCIP is in one of the following stages:
225 * - \ref SCIP_STAGE_PROBLEM
226 * - \ref SCIP_STAGE_TRANSFORMING
227 * - \ref SCIP_STAGE_TRANSFORMED
228 * - \ref SCIP_STAGE_INITPRESOLVE
229 * - \ref SCIP_STAGE_PRESOLVING
230 * - \ref SCIP_STAGE_EXITPRESOLVE
231 * - \ref SCIP_STAGE_PRESOLVED
232 * - \ref SCIP_STAGE_INITSOLVE
233 * - \ref SCIP_STAGE_SOLVING
234 * - \ref SCIP_STAGE_SOLVED
235 * - \ref SCIP_STAGE_EXITSOLVE
236 * - \ref SCIP_STAGE_FREETRANS
237 */
239 SCIP* scip /**< SCIP data structure */
240 )
241{
242 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetNTotalNodes", FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE) );
243
244 return scip->stat->ntotalnodes;
245}
246
247/** gets number of leaf nodes processed with feasible relaxation solution
248 *
249 * @return number of leaf nodes processed with feasible relaxation solution
250 *
251 * @pre This method can be called if SCIP is in one of the following stages:
252 * - \ref SCIP_STAGE_PROBLEM
253 * - \ref SCIP_STAGE_TRANSFORMING
254 * - \ref SCIP_STAGE_TRANSFORMED
255 * - \ref SCIP_STAGE_INITPRESOLVE
256 * - \ref SCIP_STAGE_PRESOLVING
257 * - \ref SCIP_STAGE_EXITPRESOLVE
258 * - \ref SCIP_STAGE_PRESOLVED
259 * - \ref SCIP_STAGE_INITSOLVE
260 * - \ref SCIP_STAGE_SOLVING
261 * - \ref SCIP_STAGE_SOLVED
262 * - \ref SCIP_STAGE_EXITSOLVE
263 * - \ref SCIP_STAGE_FREETRANS
264 */
266 SCIP* scip /**< SCIP data structure */
267 )
268{
269 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetNFeasibleLeaves", FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE) );
270
271 return scip->stat->nfeasleaves;
272}
273
274/** gets number of infeasible leaf nodes processed
275 *
276 * @return number of infeasible leaf nodes processed
277 *
278 * @pre This method can be called if SCIP is in one of the following stages:
279 * - \ref SCIP_STAGE_PROBLEM
280 * - \ref SCIP_STAGE_TRANSFORMING
281 * - \ref SCIP_STAGE_TRANSFORMED
282 * - \ref SCIP_STAGE_INITPRESOLVE
283 * - \ref SCIP_STAGE_PRESOLVING
284 * - \ref SCIP_STAGE_EXITPRESOLVE
285 * - \ref SCIP_STAGE_PRESOLVED
286 * - \ref SCIP_STAGE_INITSOLVE
287 * - \ref SCIP_STAGE_SOLVING
288 * - \ref SCIP_STAGE_SOLVED
289 * - \ref SCIP_STAGE_EXITSOLVE
290 * - \ref SCIP_STAGE_FREETRANS
291 */
293 SCIP* scip /**< SCIP data structure */
294 )
295{
296 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetNInfeasibleLeaves", FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE) );
297
298 return scip->stat->ninfeasleaves;
299}
300
301/** gets number of processed leaf nodes that hit LP objective limit
302 *
303 * @return number of processed leaf nodes that hit LP objective limit
304 *
305 * @pre This method can be called if SCIP is in one of the following stages:
306 * - \ref SCIP_STAGE_PROBLEM
307 * - \ref SCIP_STAGE_TRANSFORMING
308 * - \ref SCIP_STAGE_TRANSFORMED
309 * - \ref SCIP_STAGE_INITPRESOLVE
310 * - \ref SCIP_STAGE_PRESOLVING
311 * - \ref SCIP_STAGE_EXITPRESOLVE
312 * - \ref SCIP_STAGE_PRESOLVED
313 * - \ref SCIP_STAGE_INITSOLVE
314 * - \ref SCIP_STAGE_SOLVING
315 * - \ref SCIP_STAGE_SOLVED
316 * - \ref SCIP_STAGE_EXITSOLVE
317 * - \ref SCIP_STAGE_FREETRANS
318 */
320 SCIP* scip /**< Scip data structure */
321 )
322{
323 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetNObjlimLeaves", FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE) );
324
325 return scip->stat->nobjleaves;
326}
327
328/** gets number of global bound changes
329 *
330 * @return number of global bound changes
331 *
332 * @pre This method can be called if SCIP is in one of the following stages:
333 * - \ref SCIP_STAGE_PROBLEM
334 * - \ref SCIP_STAGE_TRANSFORMING
335 * - \ref SCIP_STAGE_TRANSFORMED
336 * - \ref SCIP_STAGE_INITPRESOLVE
337 * - \ref SCIP_STAGE_PRESOLVING
338 * - \ref SCIP_STAGE_EXITPRESOLVE
339 * - \ref SCIP_STAGE_PRESOLVED
340 * - \ref SCIP_STAGE_INITSOLVE
341 * - \ref SCIP_STAGE_SOLVING
342 * - \ref SCIP_STAGE_SOLVED
343 * - \ref SCIP_STAGE_EXITSOLVE
344 * - \ref SCIP_STAGE_FREETRANS
345 */
347 SCIP* scip /**< Scip data structure */
348 )
349{
350 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetNRootboundChgs", FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE) );
351
352 return scip->stat->nrootboundchgs;
353}
354
355/** gets number of global bound changes applied in the current run
356 *
357 * @return number of global bound changes
358 *
359 * @pre This method can be called if SCIP is in one of the following stages:
360 * - \ref SCIP_STAGE_PROBLEM
361 * - \ref SCIP_STAGE_TRANSFORMING
362 * - \ref SCIP_STAGE_TRANSFORMED
363 * - \ref SCIP_STAGE_INITPRESOLVE
364 * - \ref SCIP_STAGE_PRESOLVING
365 * - \ref SCIP_STAGE_EXITPRESOLVE
366 * - \ref SCIP_STAGE_PRESOLVED
367 * - \ref SCIP_STAGE_INITSOLVE
368 * - \ref SCIP_STAGE_SOLVING
369 * - \ref SCIP_STAGE_SOLVED
370 * - \ref SCIP_STAGE_EXITSOLVE
371 * - \ref SCIP_STAGE_FREETRANS
372 */
374 SCIP* scip /**< Scip data structure */
375 )
376{
377 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetNRootboundChgsRun", FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE) );
378
379 return scip->stat->nrootboundchgsrun;
380}
381
382/** gets number of times a selected node was from a cut off subtree
383 *
384 * @return number of times a selected node was from a cut off subtree
385 *
386 * @pre This method can be called if SCIP is in one of the following stages:
387 * - \ref SCIP_STAGE_PROBLEM
388 * - \ref SCIP_STAGE_TRANSFORMING
389 * - \ref SCIP_STAGE_TRANSFORMED
390 * - \ref SCIP_STAGE_INITPRESOLVE
391 * - \ref SCIP_STAGE_PRESOLVING
392 * - \ref SCIP_STAGE_EXITPRESOLVE
393 * - \ref SCIP_STAGE_PRESOLVED
394 * - \ref SCIP_STAGE_INITSOLVE
395 * - \ref SCIP_STAGE_SOLVING
396 * - \ref SCIP_STAGE_SOLVED
397 * - \ref SCIP_STAGE_EXITSOLVE
398 * - \ref SCIP_STAGE_FREETRANS
399 */
401 SCIP* scip /**< SCIP data structure */
402 )
403{
404 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetNDelayedCutoffs", FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE) );
405
406 return scip->stat->ndelayedcutoffs;
407}
408
409/** gets total number of LPs solved so far
410 *
411 * @return the total number of LPs solved so far
412 *
413 * @pre This method can be called if SCIP is in one of the following stages:
414 * - \ref SCIP_STAGE_PROBLEM
415 * - \ref SCIP_STAGE_TRANSFORMING
416 * - \ref SCIP_STAGE_TRANSFORMED
417 * - \ref SCIP_STAGE_INITPRESOLVE
418 * - \ref SCIP_STAGE_PRESOLVING
419 * - \ref SCIP_STAGE_EXITPRESOLVE
420 * - \ref SCIP_STAGE_PRESOLVED
421 * - \ref SCIP_STAGE_INITSOLVE
422 * - \ref SCIP_STAGE_SOLVING
423 * - \ref SCIP_STAGE_SOLVED
424 * - \ref SCIP_STAGE_EXITSOLVE
425 * - \ref SCIP_STAGE_FREETRANS
426 */
428 SCIP* scip /**< SCIP data structure */
429 )
430{
432
433 return scip->stat->nlps;
434}
435
436/** gets total number of iterations used so far in primal and dual simplex and barrier algorithm
437 *
438 * @return the total number of iterations used so far in primal and dual simplex and barrier algorithm
439 *
440 * @pre This method can be called if SCIP is in one of the following stages:
441 * - \ref SCIP_STAGE_PRESOLVING
442 * - \ref SCIP_STAGE_PRESOLVED
443 * - \ref SCIP_STAGE_SOLVING
444 * - \ref SCIP_STAGE_SOLVED
445 */
447 SCIP* scip /**< SCIP data structure */
448 )
449{
451
452 return scip->stat->nlpiterations;
453}
454
455/** gets number of active non-zeros in the current transformed problem
456 *
457 * @return the number of active non-zeros in the current transformed problem
458 *
459 * @pre This method can be called if SCIP is in one of the following stages:
460 * - \ref SCIP_STAGE_PROBLEM
461 * - \ref SCIP_STAGE_TRANSFORMING
462 * - \ref SCIP_STAGE_TRANSFORMED
463 * - \ref SCIP_STAGE_INITPRESOLVE
464 * - \ref SCIP_STAGE_PRESOLVING
465 * - \ref SCIP_STAGE_EXITPRESOLVE
466 * - \ref SCIP_STAGE_PRESOLVED
467 * - \ref SCIP_STAGE_INITSOLVE
468 * - \ref SCIP_STAGE_SOLVING
469 * - \ref SCIP_STAGE_SOLVED
470 * - \ref SCIP_STAGE_EXITSOLVE
471 */
473 SCIP* scip /**< SCIP data structure */
474 )
475{
477
478 return scip->stat->nnz;
479}
480
481/** gets total number of iterations used so far in primal and dual simplex and barrier algorithm for the root node
482 *
483 * @return the total number of iterations used so far in primal and dual simplex and barrier algorithm for the root node
484 *
485 * @pre This method can be called if SCIP is in one of the following stages:
486 * - \ref SCIP_STAGE_PRESOLVED
487 * - \ref SCIP_STAGE_SOLVING
488 * - \ref SCIP_STAGE_SOLVED
489 */
491 SCIP* scip /**< SCIP data structure */
492 )
493{
494 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetNRootLPIterations", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
495
496 return scip->stat->nrootlpiterations;
497}
498
499/** gets total number of iterations used in primal and dual simplex and barrier algorithm for the first LP at the root
500 * node
501 *
502 * @return the total number of iterations used in primal and dual simplex and barrier algorithm for the first root LP
503 *
504 * @pre This method can be called if SCIP is in one of the following stages:
505 * - \ref SCIP_STAGE_PRESOLVED
506 * - \ref SCIP_STAGE_SOLVING
507 * - \ref SCIP_STAGE_SOLVED
508 */
510 SCIP* scip /**< SCIP data structure */
511 )
512{
513 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetNRootFirstLPIterations", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
514
515 return scip->stat->nrootfirstlpiterations;
516}
517
518/** gets total number of primal LPs solved so far
519 *
520 * @return the total number of primal LPs solved so far
521 *
522 * @pre This method can be called if SCIP is in one of the following stages:
523 * - \ref SCIP_STAGE_PRESOLVED
524 * - \ref SCIP_STAGE_SOLVING
525 * - \ref SCIP_STAGE_SOLVED
526 */
528 SCIP* scip /**< SCIP data structure */
529 )
530{
532
533 return scip->stat->nprimallps;
534}
535
536/** gets total number of iterations used so far in primal simplex
537 *
538 * @return total number of iterations used so far in primal simplex
539 *
540 * @pre This method can be called if SCIP is in one of the following stages:
541 * - \ref SCIP_STAGE_PRESOLVED
542 * - \ref SCIP_STAGE_SOLVING
543 * - \ref SCIP_STAGE_SOLVED
544 */
546 SCIP* scip /**< SCIP data structure */
547 )
548{
549 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetNPrimalLPIterations", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
550
551 return scip->stat->nprimallpiterations;
552}
553
554/** gets total number of dual LPs solved so far
555 *
556 * @return the total number of dual LPs solved so far
557 *
558 * @pre This method can be called if SCIP is in one of the following stages:
559 * - \ref SCIP_STAGE_PRESOLVED
560 * - \ref SCIP_STAGE_SOLVING
561 * - \ref SCIP_STAGE_SOLVED
562 */
564 SCIP* scip /**< SCIP data structure */
565 )
566{
568
569 return scip->stat->nduallps;
570}
571
572/** gets total number of iterations used so far in dual simplex
573 *
574 * @return the total number of iterations used so far in dual simplex
575 *
576 * @pre This method can be called if SCIP is in one of the following stages:
577 * - \ref SCIP_STAGE_PRESOLVED
578 * - \ref SCIP_STAGE_SOLVING
579 * - \ref SCIP_STAGE_SOLVED
580 */
582 SCIP* scip /**< SCIP data structure */
583 )
584{
585 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetNDualLPIterations", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
586
587 return scip->stat->nduallpiterations;
588}
589
590/** gets total number of barrier LPs solved so far
591 *
592 * @return the total number of barrier LPs solved so far
593 *
594 * @pre This method can be called if SCIP is in one of the following stages:
595 * - \ref SCIP_STAGE_PRESOLVED
596 * - \ref SCIP_STAGE_SOLVING
597 * - \ref SCIP_STAGE_SOLVED
598 */
600 SCIP* scip /**< SCIP data structure */
601 )
602{
604
605 return scip->stat->nbarrierlps;
606}
607
608/** gets total number of iterations used so far in barrier algorithm
609 *
610 * @return the total number of iterations used so far in barrier algorithm
611 *
612 * @pre This method can be called if SCIP is in one of the following stages:
613 * - \ref SCIP_STAGE_PRESOLVED
614 * - \ref SCIP_STAGE_SOLVING
615 * - \ref SCIP_STAGE_SOLVED
616 */
618 SCIP* scip /**< SCIP data structure */
619 )
620{
621 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetNBarrierLPIterations", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
622
623 return scip->stat->nbarrierlpiterations;
624}
625
626/** gets total number of LPs solved so far that were resolved from an advanced start basis
627 *
628 * @return the total number of LPs solved so far that were resolved from an advanced start basis
629 *
630 * @pre This method can be called if SCIP is in one of the following stages:
631 * - \ref SCIP_STAGE_PRESOLVED
632 * - \ref SCIP_STAGE_SOLVING
633 * - \ref SCIP_STAGE_SOLVED
634 */
636 SCIP* scip /**< SCIP data structure */
637 )
638{
640
641 return scip->stat->nprimalresolvelps + scip->stat->ndualresolvelps;
642}
643
644/** gets total number of simplex iterations used so far in primal and dual simplex calls where an advanced start basis
645 * was available
646 *
647 * @return the total number of simplex iterations used so far in primal and dual simplex calls where an advanced start
648 * basis was available
649 *
650 * @pre This method can be called if SCIP is in one of the following stages:
651 * - \ref SCIP_STAGE_PRESOLVED
652 * - \ref SCIP_STAGE_SOLVING
653 * - \ref SCIP_STAGE_SOLVED
654 */
656 SCIP* scip /**< SCIP data structure */
657 )
658{
659 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetNResolveLPIterations", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
660
661 return scip->stat->nprimalresolvelpiterations + scip->stat->ndualresolvelpiterations;
662}
663
664/** gets total number of primal LPs solved so far that were resolved from an advanced start basis
665 *
666 * @return the total number of primal LPs solved so far that were resolved from an advanced start basis
667 *
668 * @pre This method can be called if SCIP is in one of the following stages:
669 * - \ref SCIP_STAGE_PRESOLVED
670 * - \ref SCIP_STAGE_SOLVING
671 * - \ref SCIP_STAGE_SOLVED
672 */
674 SCIP* scip /**< SCIP data structure */
675 )
676{
677 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetNPrimalResolveLPs", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
678
679 return scip->stat->nprimalresolvelps;
680}
681
682/** gets total number of simplex iterations used so far in primal simplex calls where an advanced start basis
683 * was available
684 *
685 * @return the total number of simplex iterations used so far in primal simplex calls where an advanced start
686 * basis was available
687 *
688 * @pre This method can be called if SCIP is in one of the following stages:
689 * - \ref SCIP_STAGE_PRESOLVED
690 * - \ref SCIP_STAGE_SOLVING
691 * - \ref SCIP_STAGE_SOLVED
692 */
694 SCIP* scip /**< SCIP data structure */
695 )
696{
697 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetNPrimalResolveLPIterations", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
698
699 return scip->stat->nprimalresolvelpiterations;
700}
701
702/** gets total number of dual LPs solved so far that were resolved from an advanced start basis
703 *
704 * @return the total number of dual LPs solved so far that were resolved from an advanced start basis
705 *
706 * @pre This method can be called if SCIP is in one of the following stages:
707 * - \ref SCIP_STAGE_PRESOLVED
708 * - \ref SCIP_STAGE_SOLVING
709 * - \ref SCIP_STAGE_SOLVED
710 */
712 SCIP* scip /**< SCIP data structure */
713 )
714{
716
717 return scip->stat->ndualresolvelps;
718}
719
720/** gets total number of simplex iterations used so far in dual simplex calls where an advanced start basis
721 * was available
722 *
723 * @return the total number of simplex iterations used so far in dual simplex calls where an advanced start
724 * basis was available
725 *
726 * @pre This method can be called if SCIP is in one of the following stages:
727 * - \ref SCIP_STAGE_PRESOLVED
728 * - \ref SCIP_STAGE_SOLVING
729 * - \ref SCIP_STAGE_SOLVED
730 */
732 SCIP* scip /**< SCIP data structure */
733 )
734{
735 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetNDualResolveLPIterations", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
736
737 return scip->stat->ndualresolvelpiterations;
738}
739
740/** gets total number of LPs solved so far for node relaxations
741 *
742 * @return the total number of LPs solved so far for node relaxations
743 *
744 * @pre This method can be called if SCIP is in one of the following stages:
745 * - \ref SCIP_STAGE_PRESOLVED
746 * - \ref SCIP_STAGE_SOLVING
747 * - \ref SCIP_STAGE_SOLVED
748 */
750 SCIP* scip /**< SCIP data structure */
751 )
752{
754
755 return scip->stat->nnodelps;
756}
757
758/** gets total number of LPs solved in 0 iterations for node relaxations
759 *
760 * @return the total number of LPs solved with 0 iteratins for node relaxations
761 *
762 * @pre This method can be called if SCIP is in one of the following stages:
763 * - \ref SCIP_STAGE_PRESOLVED
764 * - \ref SCIP_STAGE_SOLVING
765 * - \ref SCIP_STAGE_SOLVED
766 */
768 SCIP* scip /**< SCIP data structure */
769 )
770{
771 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetNNodeZeroIterationLPs", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
772
773 return scip->stat->nnodezeroitlps;
774}
775
776/** gets total number of simplex iterations used so far for node relaxations
777 *
778 * @return the total number of simplex iterations used so far for node relaxations
779 *
780 * @pre This method can be called if SCIP is in one of the following stages:
781 * - \ref SCIP_STAGE_PRESOLVED
782 * - \ref SCIP_STAGE_SOLVING
783 * - \ref SCIP_STAGE_SOLVED
784 */
786 SCIP* scip /**< SCIP data structure */
787 )
788{
789 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetNNodeLPIterations", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
790
791 return scip->stat->nnodelpiterations;
792}
793
794/** gets total number of LPs solved so far for initial LP in node relaxations
795 *
796 * @return the total number of LPs solved so far for initial LP in node relaxations
797 *
798 * @pre This method can be called if SCIP is in one of the following stages:
799 * - \ref SCIP_STAGE_PRESOLVED
800 * - \ref SCIP_STAGE_SOLVING
801 * - \ref SCIP_STAGE_SOLVED
802 */
804 SCIP* scip /**< SCIP data structure */
805 )
806{
808
809 return scip->stat->ninitlps;
810}
811
812/** gets total number of simplex iterations used so far for initial LP in node relaxations
813 *
814 * @return the total number of simplex iterations used so far for initial LP in node relaxations
815 *
816 * @pre This method can be called if SCIP is in one of the following stages:
817 * - \ref SCIP_STAGE_PRESOLVED
818 * - \ref SCIP_STAGE_SOLVING
819 * - \ref SCIP_STAGE_SOLVED
820 */
822 SCIP* scip /**< SCIP data structure */
823 )
824{
825 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetNNodeInitLPIterations", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
826
827 return scip->stat->ninitlpiterations;
828}
829
830/** gets total number of LPs solved so far during diving and probing
831 *
832 * @return total number of LPs solved so far during diving and probing
833 *
834 * @pre This method can be called if SCIP is in one of the following stages:
835 * - \ref SCIP_STAGE_PRESOLVED
836 * - \ref SCIP_STAGE_SOLVING
837 * - \ref SCIP_STAGE_SOLVED
838 */
840 SCIP* scip /**< SCIP data structure */
841 )
842{
844
845 return scip->stat->ndivinglps;
846}
847
848/** gets total number of simplex iterations used so far during diving and probing
849 *
850 * @return the total number of simplex iterations used so far during diving and probing
851 *
852 * @pre This method can be called if SCIP is in one of the following stages:
853 * - \ref SCIP_STAGE_PRESOLVED
854 * - \ref SCIP_STAGE_SOLVING
855 * - \ref SCIP_STAGE_SOLVED
856 */
858 SCIP* scip /**< SCIP data structure */
859 )
860{
861 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetNDivingLPIterations", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
862
863 return scip->stat->ndivinglpiterations;
864}
865
866/** gets total number of times, strong branching was called (each call represents solving two LPs)
867 *
868 * @return the total number of times, strong branching was called (each call represents solving two LPs)
869 *
870 * @pre This method can be called if SCIP is in one of the following stages:
871 * - \ref SCIP_STAGE_PRESOLVED
872 * - \ref SCIP_STAGE_SOLVING
873 * - \ref SCIP_STAGE_SOLVED
874 */
876 SCIP* scip /**< SCIP data structure */
877 )
878{
880
881 return scip->stat->nstrongbranchs;
882}
883
884/** gets total number of simplex iterations used so far in strong branching
885 *
886 * @return the total number of simplex iterations used so far in strong branching
887 *
888 * @pre This method can be called if SCIP is in one of the following stages:
889 * - \ref SCIP_STAGE_PRESOLVED
890 * - \ref SCIP_STAGE_SOLVING
891 * - \ref SCIP_STAGE_SOLVED
892 */
894 SCIP* scip /**< SCIP data structure */
895 )
896{
897 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetNStrongbranchLPIterations", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
898
899 return scip->stat->nsblpiterations;
900}
901
902/** gets total number of times, strong branching was called at the root node (each call represents solving two LPs)
903 *
904 * @return the total number of times, strong branching was called at the root node (each call represents solving two LPs)
905 *
906 * @pre This method can be called if SCIP is in one of the following stages:
907 * - \ref SCIP_STAGE_PRESOLVED
908 * - \ref SCIP_STAGE_SOLVING
909 * - \ref SCIP_STAGE_SOLVED
910 */
912 SCIP* scip /**< SCIP data structure */
913 )
914{
915 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetNRootStrongbranchs", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
916
917 return scip->stat->nrootstrongbranchs;
918}
919
920/** gets total number of simplex iterations used so far in strong branching at the root node
921 *
922 * @return the total number of simplex iterations used so far in strong branching at the root node
923 *
924 * @pre This method can be called if SCIP is in one of the following stages:
925 * - \ref SCIP_STAGE_PRESOLVED
926 * - \ref SCIP_STAGE_SOLVING
927 * - \ref SCIP_STAGE_SOLVED
928 */
930 SCIP* scip /**< SCIP data structure */
931 )
932{
933 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetNRootStrongbranchLPIterations", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
934
935 return scip->stat->nrootsblpiterations;
936}
937
938/** gets number of pricing rounds performed so far at the current node
939 *
940 * @return the number of pricing rounds performed so far at the current node
941 *
942 * @pre This method can be called if SCIP is in one of the following stages:
943 * - \ref SCIP_STAGE_SOLVING
944 */
946 SCIP* scip /**< SCIP data structure */
947 )
948{
950
951 return scip->stat->npricerounds;
952}
953
954/** get current number of variables in the pricing store
955 *
956 * @return the current number of variables in the pricing store
957 *
958 * @pre This method can be called if SCIP is in one of the following stages:
959 * - \ref SCIP_STAGE_PRESOLVED
960 * - \ref SCIP_STAGE_SOLVING
961 * - \ref SCIP_STAGE_SOLVED
962 */
964 SCIP* scip /**< SCIP data structure */
965 )
966{
968
969 return scip->pricestore == NULL ? 0 : SCIPpricestoreGetNVars(scip->pricestore);
970}
971
972/** get total number of pricing variables found so far
973 *
974 * @return the total number of pricing variables found so far
975 *
976 * @pre This method can be called if SCIP is in one of the following stages:
977 * - \ref SCIP_STAGE_PRESOLVED
978 * - \ref SCIP_STAGE_SOLVING
979 * - \ref SCIP_STAGE_SOLVED
980 */
982 SCIP* scip /**< SCIP data structure */
983 )
984{
986
987 return scip->pricestore == NULL ? 0 : SCIPpricestoreGetNVarsFound(scip->pricestore);
988}
989
990/** get total number of pricing variables applied to the LPs
991 *
992 * @return the total number of pricing variables applied to the LPs
993 *
994 * @pre This method can be called if SCIP is in one of the following stages:
995 * - \ref SCIP_STAGE_PRESOLVED
996 * - \ref SCIP_STAGE_SOLVING
997 * - \ref SCIP_STAGE_SOLVED
998 */
1000 SCIP* scip /**< SCIP data structure */
1001 )
1002{
1003 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetNPricevarsApplied", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
1004
1005 return scip->pricestore == NULL ? 0 : SCIPpricestoreGetNVarsApplied(scip->pricestore);
1006}
1007
1008/** gets number of separation rounds performed so far at the current node
1009 *
1010 * @return the number of separation rounds performed so far at the current node
1011 *
1012 * @pre This method can be called if SCIP is in one of the following stages:
1013 * - \ref SCIP_STAGE_SOLVING
1014 */
1016 SCIP* scip /**< SCIP data structure */
1017 )
1018{
1020
1021 return scip->stat->nseparounds;
1022}
1023
1024/** 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
1025 *
1026 * @return the total number of cuts added to the sepastore so far
1027 *
1028 * @pre This method can be called if SCIP is in one of the following stages:
1029 * - \ref SCIP_STAGE_PRESOLVED
1030 * - \ref SCIP_STAGE_SOLVING
1031 * - \ref SCIP_STAGE_SOLVED
1032 */
1034 SCIP* scip /**< SCIP data structure */
1035 )
1036{
1038
1039 return scip->sepastore == NULL ? 0 : SCIPsepastoreGetNCutsAdded(scip->sepastore);
1040}
1041
1042/** get number of cuts found so far in current separation round
1043 *
1044 * @return the number of cuts found so far in current separation round
1045 *
1046 * @pre This method can be called if SCIP is in one of the following stages:
1047 * - \ref SCIP_STAGE_PRESOLVED
1048 * - \ref SCIP_STAGE_SOLVING
1049 * - \ref SCIP_STAGE_SOLVED
1050 */
1052 SCIP* scip /**< SCIP data structure */
1053 )
1054{
1055 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetNCutsFoundRound", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
1056
1057 return scip->sepastore == NULL ? 0 : SCIPsepastoreGetNCutsFoundRound(scip->sepastore);
1058}
1059
1060/** get total number of cuts applied to the LPs
1061 *
1062 * @return the total number of cuts applied to the LPs
1063 *
1064 * @pre This method can be called if SCIP is in one of the following stages:
1065 * - \ref SCIP_STAGE_PRESOLVED
1066 * - \ref SCIP_STAGE_SOLVING
1067 * - \ref SCIP_STAGE_SOLVED
1068 */
1070 SCIP* scip /**< SCIP data structure */
1071 )
1072{
1074
1075 return scip->sepastore == NULL ? 0 : SCIPsepastoreGetNCutsApplied(scip->sepastore);
1076}
1077
1078/** get total number of constraints found in conflict analysis (conflict, reconvergence constraints, and dual proofs)
1079 *
1080 * @return the total number of constraints found in conflict analysis (conflict, reconvergence constraints, and dual proofs)
1081 *
1082 * @pre This method can be called if SCIP is in one of the following stages:
1083 * - \ref SCIP_STAGE_TRANSFORMED
1084 * - \ref SCIP_STAGE_INITPRESOLVE
1085 * - \ref SCIP_STAGE_PRESOLVING
1086 * - \ref SCIP_STAGE_EXITPRESOLVE
1087 * - \ref SCIP_STAGE_PRESOLVED
1088 * - \ref SCIP_STAGE_INITSOLVE
1089 * - \ref SCIP_STAGE_SOLVING
1090 * - \ref SCIP_STAGE_SOLVED
1091 * - \ref SCIP_STAGE_EXITSOLVE
1092 */
1094 SCIP* scip /**< SCIP data structure */
1095 )
1096{
1097 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetNConflictConssFound", FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE) );
1098
1099 return scip->conflict == NULL ? 0 : (SCIPconflictGetNPropConflictConss(scip->conflict)
1111}
1112
1113/** get number of conflict constraints found so far at the current node
1114 *
1115 * @return the number of conflict constraints found so far at the current node
1116 *
1117 * @pre This method can be called if SCIP is in one of the following stages:
1118 * - \ref SCIP_STAGE_TRANSFORMED
1119 * - \ref SCIP_STAGE_INITPRESOLVE
1120 * - \ref SCIP_STAGE_PRESOLVING
1121 * - \ref SCIP_STAGE_EXITPRESOLVE
1122 * - \ref SCIP_STAGE_PRESOLVED
1123 * - \ref SCIP_STAGE_INITSOLVE
1124 * - \ref SCIP_STAGE_SOLVING
1125 * - \ref SCIP_STAGE_SOLVED
1126 * - \ref SCIP_STAGE_EXITSOLVE
1127 */
1129 SCIP* scip /**< SCIP data structure */
1130 )
1131{
1132 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetNConflictConssFoundNode", FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE) );
1133
1134 return scip->conflict == NULL ? 0 : SCIPconflictGetNConflicts(scip->conflict);
1135}
1136
1137/** get total number of conflict constraints added to the problem
1138 *
1139 * @return the total number of conflict constraints added to the problem
1140 *
1141 * @pre This method can be called if SCIP is in one of the following stages:
1142 * - \ref SCIP_STAGE_TRANSFORMED
1143 * - \ref SCIP_STAGE_INITPRESOLVE
1144 * - \ref SCIP_STAGE_PRESOLVING
1145 * - \ref SCIP_STAGE_EXITPRESOLVE
1146 * - \ref SCIP_STAGE_PRESOLVED
1147 * - \ref SCIP_STAGE_INITSOLVE
1148 * - \ref SCIP_STAGE_SOLVING
1149 * - \ref SCIP_STAGE_SOLVED
1150 * - \ref SCIP_STAGE_EXITSOLVE
1151 */
1153 SCIP* scip /**< SCIP data structure */
1154 )
1155{
1156 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetNConflictConssApplied", FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE) );
1157
1158 return scip->conflict == NULL ? 0 : SCIPconflictGetNAppliedConss(scip->conflict);
1159}
1160
1161/** get total number of dual proof constraints added to the problem
1162 *
1163 * @return the total number of dual proof constraints added to the problem
1164 *
1165 * @pre This method can be called if SCIP is in one of the following stages:
1166 * - \ref SCIP_STAGE_TRANSFORMED
1167 * - \ref SCIP_STAGE_INITPRESOLVE
1168 * - \ref SCIP_STAGE_PRESOLVING
1169 * - \ref SCIP_STAGE_EXITPRESOLVE
1170 * - \ref SCIP_STAGE_PRESOLVED
1171 * - \ref SCIP_STAGE_INITSOLVE
1172 * - \ref SCIP_STAGE_SOLVING
1173 * - \ref SCIP_STAGE_SOLVED
1174 * - \ref SCIP_STAGE_EXITSOLVE
1175 */
1177 SCIP* scip /**< SCIP data structure */
1178 )
1179{
1180 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetNConflictDualproofsApplied", FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE) );
1181
1182 return scip->conflict == NULL ? 0 : (SCIPconflictGetNDualproofsInfSuccess(scip->conflict) +
1184}
1185
1186/** gets maximal depth of all processed nodes in current branch and bound run (excluding probing nodes)
1187 *
1188 * @return the maximal depth of all processed nodes in current branch and bound run (excluding probing nodes)
1189 *
1190 * @pre This method can be called if SCIP is in one of the following stages:
1191 * - \ref SCIP_STAGE_TRANSFORMED
1192 * - \ref SCIP_STAGE_INITPRESOLVE
1193 * - \ref SCIP_STAGE_PRESOLVING
1194 * - \ref SCIP_STAGE_EXITPRESOLVE
1195 * - \ref SCIP_STAGE_PRESOLVED
1196 * - \ref SCIP_STAGE_INITSOLVE
1197 * - \ref SCIP_STAGE_SOLVING
1198 * - \ref SCIP_STAGE_SOLVED
1199 * - \ref SCIP_STAGE_EXITSOLVE
1200 */
1202 SCIP* scip /**< SCIP data structure */
1203 )
1204{
1206
1207 return scip->stat->maxdepth;
1208}
1209
1210/** gets maximal depth of all processed nodes over all branch and bound runs
1211 *
1212 * @return the maximal depth of all processed nodes over all branch and bound runs
1213 *
1214 * @pre This method can be called if SCIP is in one of the following stages:
1215 * - \ref SCIP_STAGE_TRANSFORMED
1216 * - \ref SCIP_STAGE_INITPRESOLVE
1217 * - \ref SCIP_STAGE_PRESOLVING
1218 * - \ref SCIP_STAGE_EXITPRESOLVE
1219 * - \ref SCIP_STAGE_PRESOLVED
1220 * - \ref SCIP_STAGE_INITSOLVE
1221 * - \ref SCIP_STAGE_SOLVING
1222 * - \ref SCIP_STAGE_SOLVED
1223 * - \ref SCIP_STAGE_EXITSOLVE
1224 */
1226 SCIP* scip /**< SCIP data structure */
1227 )
1228{
1229 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetMaxTotalDepth", FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE) );
1230
1231 return scip->stat->maxtotaldepth;
1232}
1233
1234/** gets total number of backtracks, i.e. number of times, the new node was selected from the leaves queue
1235 *
1236 * @return the total number of backtracks, i.e. number of times, the new node was selected from the leaves queue
1237 *
1238 * @pre This method can be called if SCIP is in one of the following stages:
1239 * - \ref SCIP_STAGE_TRANSFORMED
1240 * - \ref SCIP_STAGE_INITPRESOLVE
1241 * - \ref SCIP_STAGE_PRESOLVING
1242 * - \ref SCIP_STAGE_EXITPRESOLVE
1243 * - \ref SCIP_STAGE_PRESOLVED
1244 * - \ref SCIP_STAGE_INITSOLVE
1245 * - \ref SCIP_STAGE_SOLVING
1246 * - \ref SCIP_STAGE_SOLVED
1247 * - \ref SCIP_STAGE_EXITSOLVE
1248 */
1250 SCIP* scip /**< SCIP data structure */
1251 )
1252{
1253 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetNBacktracks", FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE) );
1254
1255 return scip->stat->nbacktracks;
1256}
1257
1258/** gets total number of active constraints at the current node
1259 *
1260 * @return the total number of active constraints at the current node
1261 *
1262 * @pre This method can be called if SCIP is in one of the following stages:
1263 * - \ref SCIP_STAGE_INITPRESOLVE
1264 * - \ref SCIP_STAGE_PRESOLVING
1265 * - \ref SCIP_STAGE_EXITPRESOLVE
1266 * - \ref SCIP_STAGE_PRESOLVED
1267 * - \ref SCIP_STAGE_SOLVING
1268 */
1270 SCIP* scip /**< SCIP data structure */
1271 )
1272{
1274
1275 return scip->stat->nactiveconss;
1276}
1277
1278/** gets total number of enabled constraints at the current node
1279 *
1280 * @return the total number of enabled constraints at the current node
1281 *
1282 * @pre This method can be called if SCIP is in one of the following stages:
1283 * - \ref SCIP_STAGE_PRESOLVED
1284 * - \ref SCIP_STAGE_SOLVING
1285 */
1287 SCIP* scip /**< SCIP data structure */
1288 )
1289{
1291
1292 return scip->stat->nenabledconss;
1293}
1294
1295/** gets average dual bound of all unprocessed nodes for original problem
1296 *
1297 * @return the average dual bound of all unprocessed nodes for original problem
1298 *
1299 * @pre This method can be called if SCIP is in one of the following stages:
1300 * - \ref SCIP_STAGE_PRESOLVED
1301 * - \ref SCIP_STAGE_SOLVING
1302 * - \ref SCIP_STAGE_SOLVED
1303 */
1305 SCIP* scip /**< SCIP data structure */
1306 )
1307{
1309
1310 return SCIPprobExternObjval(scip->transprob, scip->origprob, scip->set,
1311 SCIPtreeGetAvgLowerbound(scip->tree, scip->primal->cutoffbound));
1312}
1313
1314/** gets average lower (dual) bound of all unprocessed nodes in transformed problem
1315 *
1316 * @return the average lower (dual) bound of all unprocessed nodes in transformed problem
1317 *
1318 * @pre This method can be called if SCIP is in one of the following stages:
1319 * - \ref SCIP_STAGE_PRESOLVED
1320 * - \ref SCIP_STAGE_SOLVING
1321 * - \ref SCIP_STAGE_SOLVED
1322 */
1324 SCIP* scip /**< SCIP data structure */
1325 )
1326{
1328
1329 return SCIPtreeGetAvgLowerbound(scip->tree, scip->primal->cutoffbound);
1330}
1331
1332/** gets global dual bound
1333 *
1334 * @return the global dual bound
1335 *
1336 * @pre This method can be called if SCIP is in one of the following stages:
1337 * - \ref SCIP_STAGE_TRANSFORMED
1338 * - \ref SCIP_STAGE_INITPRESOLVE
1339 * - \ref SCIP_STAGE_PRESOLVING
1340 * - \ref SCIP_STAGE_EXITPRESOLVE
1341 * - \ref SCIP_STAGE_PRESOLVED
1342 * - \ref SCIP_STAGE_INITSOLVE
1343 * - \ref SCIP_STAGE_SOLVING
1344 * - \ref SCIP_STAGE_SOLVED
1345 * - \ref SCIP_STAGE_EXITSOLVE
1346 */
1348 SCIP* scip /**< SCIP data structure */
1349 )
1350{
1352
1353 /* in case we are in presolving we use the stored dual bound if it exits */
1354 if( scip->set->stage <= SCIP_STAGE_INITSOLVE && scip->transprob->dualbound < SCIP_INVALID )
1355 return scip->transprob->dualbound;
1356
1357 return SCIPprobExternObjval(scip->transprob, scip->origprob, scip->set, SCIPgetLowerbound(scip));
1358}
1359
1360/** gets global lower (dual) bound in transformed problem
1361 *
1362 * @return the global lower (dual) bound in transformed problem
1363 *
1364 * @pre This method can be called if SCIP is in one of the following stages:
1365 * - \ref SCIP_STAGE_TRANSFORMED
1366 * - \ref SCIP_STAGE_INITPRESOLVE
1367 * - \ref SCIP_STAGE_PRESOLVING
1368 * - \ref SCIP_STAGE_EXITPRESOLVE
1369 * - \ref SCIP_STAGE_PRESOLVED
1370 * - \ref SCIP_STAGE_INITSOLVE
1371 * - \ref SCIP_STAGE_SOLVING
1372 * - \ref SCIP_STAGE_SOLVED
1373 */
1375 SCIP* scip /**< SCIP data structure */
1376 )
1377{
1379
1380 if( scip->set->stage <= SCIP_STAGE_INITSOLVE )
1381 return -SCIPinfinity(scip);
1383 {
1384 /* in case we could not prove whether the problem is unbounded or infeasible, we want to terminate with lower
1385 * bound = -inf instead of lower bound = upper bound = +inf also in case we prove that the problem is unbounded,
1386 * it seems to make sense to return with lower bound = -inf, since -infinity is the only valid lower bound
1387 */
1388 return -SCIPinfinity(scip);
1389 }
1391 {
1392 /* SCIPtreeGetLowerbound() should return +inf in the case of infeasibility, but when infeasibility is detected
1393 * during presolving this does not seem to be the case; hence, we treat this case explicitly
1394 */
1395 return SCIPinfinity(scip);
1396 }
1397 else
1398 {
1399 SCIP_Real treelowerbound;
1400
1401 /* it may happen that the remaining tree is empty or all open nodes have a lower bound above the cutoff bound, but
1402 * have not yet been cut off, e.g., when the user calls SCIPgetDualbound() in some event handler; in this case,
1403 * the global lower bound is given by the upper bound value
1404 */
1405 treelowerbound = SCIPtreeGetLowerbound(scip->tree, scip->set);
1406
1407 if( treelowerbound < scip->primal->upperbound)
1408 return treelowerbound;
1409 else
1410 return scip->primal->upperbound;
1411 }
1412}
1413
1414/** gets dual bound of the root node for the original problem
1415 *
1416 * @return the dual bound of the root node for the original problem
1417 *
1418 * @pre This method can be called if SCIP is in one of the following stages:
1419 * - \ref SCIP_STAGE_PRESOLVING
1420 * - \ref SCIP_STAGE_EXITPRESOLVE
1421 * - \ref SCIP_STAGE_PRESOLVED
1422 * - \ref SCIP_STAGE_INITSOLVE
1423 * - \ref SCIP_STAGE_SOLVING
1424 * - \ref SCIP_STAGE_SOLVED
1425 */
1427 SCIP* scip /**< SCIP data structure */
1428 )
1429{
1430 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetDualboundRoot", FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE) );
1431
1432 if( SCIPsetIsInfinity(scip->set, scip->stat->rootlowerbound) )
1433 return SCIPgetPrimalbound(scip);
1434 else
1435 return SCIPprobExternObjval(scip->transprob, scip->origprob, scip->set, scip->stat->rootlowerbound);
1436}
1437
1438/** gets lower (dual) bound in transformed problem of the root node
1439 *
1440 * @return the lower (dual) bound in transformed problem of the root node
1441 *
1442 * @pre This method can be called if SCIP is in one of the following stages:
1443 * - \ref SCIP_STAGE_PRESOLVING
1444 * - \ref SCIP_STAGE_EXITPRESOLVE
1445 * - \ref SCIP_STAGE_PRESOLVED
1446 * - \ref SCIP_STAGE_INITSOLVE
1447 * - \ref SCIP_STAGE_SOLVING
1448 * - \ref SCIP_STAGE_SOLVED
1449 */
1451 SCIP* scip /**< SCIP data structure */
1452 )
1453{
1454 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetLowerboundRoot", FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE) );
1455
1456 if( SCIPsetIsInfinity(scip->set, scip->stat->rootlowerbound) )
1457 return SCIPgetUpperbound(scip);
1458 else
1459 return scip->stat->rootlowerbound;
1460}
1461
1462/** gets dual bound for the original problem obtained by the first LP solve at the root node
1463 *
1464 * @return the dual bound for the original problem of the first LP solve at the root node
1465 *
1466 * @pre This method can be called if SCIP is in one of the following stages:
1467 * - \ref SCIP_STAGE_PRESOLVING
1468 * - \ref SCIP_STAGE_EXITPRESOLVE
1469 * - \ref SCIP_STAGE_PRESOLVED
1470 * - \ref SCIP_STAGE_INITSOLVE
1471 * - \ref SCIP_STAGE_SOLVING
1472 * - \ref SCIP_STAGE_SOLVED
1473 */
1475 SCIP* scip /**< SCIP data structure */
1476 )
1477{
1478 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetFirstLPDualboundRoot", FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE) );
1479
1480 return scip->stat->firstlpdualbound;
1481}
1482
1483/** gets lower (dual) bound in transformed problem obtained by the first LP solve at the root node
1484 *
1485 * @return the lower (dual) bound in transformed problem obtained by first LP solve at the root node
1486 *
1487 * @pre This method can be called if SCIP is in one of the following stages:
1488 * - \ref SCIP_STAGE_PRESOLVING
1489 * - \ref SCIP_STAGE_EXITPRESOLVE
1490 * - \ref SCIP_STAGE_PRESOLVED
1491 * - \ref SCIP_STAGE_INITSOLVE
1492 * - \ref SCIP_STAGE_SOLVING
1493 * - \ref SCIP_STAGE_SOLVED
1494 */
1496 SCIP* scip /**< SCIP data structure */
1497 )
1498{
1499 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetFirstLPLowerboundRoot", FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE) );
1500
1501 if( scip->stat->firstlpdualbound == SCIP_INVALID ) /*lint !e777*/
1502 return -SCIPinfinity(scip);
1503 else
1504 return SCIPprobInternObjval(scip->transprob, scip->origprob, scip->set, scip->stat->firstlpdualbound);
1505}
1506
1507/** the primal bound of the very first solution */
1509 SCIP* scip /**< SCIP data structure */
1510 )
1511{
1512 return scip->stat->firstprimalbound;
1513}
1514
1515/** gets global primal bound (objective value of best solution or user objective limit) for the original problem
1516 *
1517 * @return the global primal bound (objective value of best solution or user objective limit) for the original problem
1518 *
1519 * @pre This method can be called if SCIP is in one of the following stages:
1520 * - \ref SCIP_STAGE_TRANSFORMED
1521 * - \ref SCIP_STAGE_INITPRESOLVE
1522 * - \ref SCIP_STAGE_PRESOLVING
1523 * - \ref SCIP_STAGE_EXITPRESOLVE
1524 * - \ref SCIP_STAGE_PRESOLVED
1525 * - \ref SCIP_STAGE_INITSOLVE
1526 * - \ref SCIP_STAGE_SOLVING
1527 * - \ref SCIP_STAGE_SOLVED
1528 * - \ref SCIP_STAGE_EXITSOLVE
1529 */
1531 SCIP* scip /**< SCIP data structure */
1532 )
1533{
1534 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetPrimalbound", FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE) );
1535
1536 return SCIPprobExternObjval(scip->transprob, scip->origprob, scip->set, SCIPgetUpperbound(scip));
1537}
1538
1539/** gets global upper (primal) bound in transformed problem (objective value of best solution or user objective limit)
1540 *
1541 * @return the global upper (primal) bound in transformed problem (objective value of best solution or user objective limit)
1542 *
1543 * @pre This method can be called if SCIP is in one of the following stages:
1544 * - \ref SCIP_STAGE_TRANSFORMED
1545 * - \ref SCIP_STAGE_INITPRESOLVE
1546 * - \ref SCIP_STAGE_PRESOLVING
1547 * - \ref SCIP_STAGE_EXITPRESOLVE
1548 * - \ref SCIP_STAGE_PRESOLVED
1549 * - \ref SCIP_STAGE_INITSOLVE
1550 * - \ref SCIP_STAGE_SOLVING
1551 * - \ref SCIP_STAGE_SOLVED
1552 * - \ref SCIP_STAGE_EXITSOLVE
1553 */
1555 SCIP* scip /**< SCIP data structure */
1556 )
1557{
1559
1561 return -SCIPinfinity(scip);
1562 else
1563 return scip->primal->upperbound;
1564}
1565
1566/** gets global cutoff bound in transformed problem: a sub problem with lower bound larger than the cutoff
1567 * cannot contain a better feasible solution; usually, this bound is equal to the upper bound, but if the
1568 * objective value is always integral, the cutoff bound is (nearly) one less than the upper bound;
1569 * additionally, due to objective function domain propagation, the cutoff bound can be further reduced
1570 *
1571 * @return global cutoff bound in transformed problem
1572 *
1573 * @pre This method can be called if SCIP is in one of the following stages:
1574 * - \ref SCIP_STAGE_TRANSFORMED
1575 * - \ref SCIP_STAGE_INITPRESOLVE
1576 * - \ref SCIP_STAGE_PRESOLVING
1577 * - \ref SCIP_STAGE_EXITPRESOLVE
1578 * - \ref SCIP_STAGE_PRESOLVED
1579 * - \ref SCIP_STAGE_INITSOLVE
1580 * - \ref SCIP_STAGE_SOLVING
1581 * - \ref SCIP_STAGE_SOLVED
1582 * - \ref SCIP_STAGE_EXITSOLVE
1583 */
1585 SCIP* scip /**< SCIP data structure */
1586 )
1587{
1588 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetCutoffbound", FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE) );
1589
1590 return scip->primal->cutoffbound;
1591}
1592
1593/** updates the cutoff bound
1594 *
1595 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1596 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1597 *
1598 * @note using this method in the solving stage can lead to an erroneous SCIP solving status; in particular,
1599 * if a solution not respecting the cutoff bound was found before installing a cutoff bound which
1600 * renders the remaining problem infeasible, this solution may be reported as optimal
1601 *
1602 * @pre This method can be called if SCIP is in one of the following stages:
1603 * - \ref SCIP_STAGE_TRANSFORMED
1604 * - \ref SCIP_STAGE_PRESOLVING
1605 * - \ref SCIP_STAGE_PRESOLVED
1606 * - \ref SCIP_STAGE_INITSOLVE
1607 * - \ref SCIP_STAGE_SOLVING
1608 *
1609 * @note the given cutoff bound has to better or equal to known one (SCIPgetCutoffbound())
1610 * @note a given cutoff bound is also used for updating the objective limit, if possible
1611 */
1613 SCIP* scip, /**< SCIP data structure */
1614 SCIP_Real cutoffbound /**< new cutoff bound */
1615 )
1616{
1617 SCIP_CALL( SCIPcheckStage(scip, "SCIPupdateCutoffbound", FALSE, FALSE, FALSE, TRUE, FALSE, TRUE, FALSE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE) );
1618
1619 assert(cutoffbound <= SCIPgetCutoffbound(scip));
1620
1621 SCIP_CALL( SCIPprimalSetCutoffbound(scip->primal, scip->mem->probmem, scip->set, scip->stat, scip->eventfilter,
1622 scip->eventqueue, scip->transprob, scip->origprob, scip->tree, scip->reopt, scip->lp, cutoffbound, FALSE) );
1623
1624 return SCIP_OKAY;
1625}
1626
1627
1628/** returns whether the current primal bound is justified with a feasible primal solution; if not, the primal bound
1629 * was set from the user as objective limit
1630 *
1631 * @return TRUE if the current primal bound is justified with a feasible primal solution, otherwise FALSE
1632 *
1633 * @pre This method can be called if SCIP is in one of the following stages:
1634 * - \ref SCIP_STAGE_TRANSFORMED
1635 * - \ref SCIP_STAGE_INITPRESOLVE
1636 * - \ref SCIP_STAGE_PRESOLVING
1637 * - \ref SCIP_STAGE_EXITPRESOLVE
1638 * - \ref SCIP_STAGE_PRESOLVED
1639 * - \ref SCIP_STAGE_INITSOLVE
1640 * - \ref SCIP_STAGE_SOLVING
1641 * - \ref SCIP_STAGE_SOLVED
1642 * - \ref SCIP_STAGE_EXITSOLVE
1643 */
1645 SCIP* scip /**< SCIP data structure */
1646 )
1647{
1648 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPisPrimalboundSol", FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE) );
1649
1650 return SCIPprimalUpperboundIsSol(scip->primal, scip->set, scip->transprob, scip->origprob);
1651}
1652
1653/** gets current gap |(primalbound - dualbound)/min(|primalbound|,|dualbound|)| if both bounds have same sign,
1654 * or infinity, if they have opposite sign
1655 *
1656 * @return the current gap |(primalbound - dualbound)/min(|primalbound|,|dualbound|)| if both bounds have same sign,
1657 * or infinity, if they have opposite sign
1658 *
1659 * @pre This method can be called if SCIP is in one of the following stages:
1660 * - \ref SCIP_STAGE_PRESOLVING
1661 * - \ref SCIP_STAGE_EXITPRESOLVE
1662 * - \ref SCIP_STAGE_PRESOLVED
1663 * - \ref SCIP_STAGE_INITSOLVE
1664 * - \ref SCIP_STAGE_SOLVING
1665 * - \ref SCIP_STAGE_SOLVED
1666 */
1668 SCIP* scip /**< SCIP data structure */
1669 )
1670{
1672
1673 /* in case we could not prove whether the problem is unbounded or infeasible, we want to terminate with gap = +inf;
1674 * if the problem was proven to be unbounded or proven to be infeasible we return gap = 0
1675 */
1677 return SCIPsetInfinity(scip->set);
1679 return 0.0;
1680
1681 /* the lowerbound is infinity, but SCIP may not have updated the status; in this case, the problem was already solved
1682 * so we return gap = 0
1683 */
1685 return 0.0;
1686
1688}
1689
1690/** gets current gap |(upperbound - lowerbound)/min(|upperbound|,|lowerbound|)| in transformed problem if both bounds
1691 * have same sign, or infinity, if they have opposite sign
1692 *
1693 * @return current gap |(upperbound - lowerbound)/min(|upperbound|,|lowerbound|)| in transformed problem if both bounds
1694 * have same sign, or infinity, if they have opposite sign
1695 *
1696 * @pre This method can be called if SCIP is in one of the following stages:
1697 * - \ref SCIP_STAGE_PRESOLVED
1698 * - \ref SCIP_STAGE_SOLVING
1699 * - \ref SCIP_STAGE_SOLVED
1700 */
1702 SCIP* scip /**< SCIP data structure */
1703 )
1704{
1706
1707 /* in case we could not prove whether the problem is unbounded or infeasible, we want to terminate with gap = +inf;
1708 * if the problem was proven to be unbounded or proven to be infeasible we return gap = 0
1709 */
1711 return SCIPsetInfinity(scip->set);
1713 return 0.0;
1714
1715 /* the lowerbound is infinity, but SCIP may not have updated the status; in this case, the problem was already solved
1716 * so we return gap = 0
1717 */
1719 return 0.0;
1720
1722}
1723
1724/** gets number of feasible primal solutions found so far
1725 *
1726 * @return the number of feasible primal solutions found so far
1727 *
1728 * @pre This method can be called if SCIP is in one of the following stages:
1729 * - \ref SCIP_STAGE_TRANSFORMED
1730 * - \ref SCIP_STAGE_INITPRESOLVE
1731 * - \ref SCIP_STAGE_PRESOLVING
1732 * - \ref SCIP_STAGE_EXITPRESOLVE
1733 * - \ref SCIP_STAGE_PRESOLVED
1734 * - \ref SCIP_STAGE_INITSOLVE
1735 * - \ref SCIP_STAGE_SOLVING
1736 * - \ref SCIP_STAGE_SOLVED
1737 * - \ref SCIP_STAGE_EXITSOLVE
1738 */
1740 SCIP* scip /**< SCIP data structure */
1741 )
1742{
1744
1745 return scip->primal->nsolsfound;
1746}
1747
1748/** gets number of feasible primal solutions respecting the objective limit found so far
1749 *
1750 * @return the number of feasible primal solutions respecting the objective limit found so far
1751 *
1752 * @pre This method can be called if SCIP is in one of the following stages:
1753 * - \ref SCIP_STAGE_INIT
1754 * - \ref SCIP_STAGE_PROBLEM
1755 * - \ref SCIP_STAGE_TRANSFORMING
1756 * - \ref SCIP_STAGE_TRANSFORMED
1757 * - \ref SCIP_STAGE_INITPRESOLVE
1758 * - \ref SCIP_STAGE_PRESOLVING
1759 * - \ref SCIP_STAGE_EXITPRESOLVE
1760 * - \ref SCIP_STAGE_PRESOLVED
1761 * - \ref SCIP_STAGE_INITSOLVE
1762 * - \ref SCIP_STAGE_SOLVING
1763 * - \ref SCIP_STAGE_SOLVED
1764 * - \ref SCIP_STAGE_EXITSOLVE
1765 */
1767 SCIP* scip /**< SCIP data structure */
1768 )
1769{
1771 return 0;
1772
1773 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetNLimSolsFound", FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE) );
1774
1775 return scip->primal->nlimsolsfound;
1776}
1777
1778/** gets number of feasible primal solutions found so far, that improved the primal bound at the time they were found
1779 *
1780 * @return the number of feasible primal solutions found so far, that improved the primal bound at the time they were found
1781 *
1782 * @pre This method can be called if SCIP is in one of the following stages:
1783 * - \ref SCIP_STAGE_TRANSFORMED
1784 * - \ref SCIP_STAGE_INITPRESOLVE
1785 * - \ref SCIP_STAGE_PRESOLVING
1786 * - \ref SCIP_STAGE_EXITPRESOLVE
1787 * - \ref SCIP_STAGE_PRESOLVED
1788 * - \ref SCIP_STAGE_INITSOLVE
1789 * - \ref SCIP_STAGE_SOLVING
1790 * - \ref SCIP_STAGE_SOLVED
1791 * - \ref SCIP_STAGE_EXITSOLVE
1792 */
1794 SCIP* scip /**< SCIP data structure */
1795 )
1796{
1797 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetNBestSolsFound", FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE) );
1798
1799 return scip->primal->nbestsolsfound;
1800}
1801
1802/** gets the average pseudo cost value for the given direction over all variables
1803 *
1804 * @return the average pseudo cost value for the given direction over all variables
1805 *
1806 * @pre This method can be called if SCIP is in one of the following stages:
1807 * - \ref SCIP_STAGE_SOLVING
1808 * - \ref SCIP_STAGE_SOLVED
1809 */
1811 SCIP* scip, /**< SCIP data structure */
1812 SCIP_Real solvaldelta /**< difference of variable's new LP value - old LP value */
1813 )
1814{
1816
1817 return SCIPhistoryGetPseudocost(scip->stat->glbhistory, solvaldelta);
1818}
1819
1820/** gets the average pseudo cost value for the given direction over all variables,
1821 * only using the pseudo cost information of the current run
1822 *
1823 * @return the average pseudo cost value for the given direction over all variables,
1824 * only using the pseudo cost information of the current run
1825 *
1826 * @pre This method can be called if SCIP is in one of the following stages:
1827 * - \ref SCIP_STAGE_SOLVING
1828 * - \ref SCIP_STAGE_SOLVED
1829 */
1831 SCIP* scip, /**< SCIP data structure */
1832 SCIP_Real solvaldelta /**< difference of variable's new LP value - old LP value */
1833 )
1834{
1835 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetAvgPseudocostCurrentRun", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
1836
1837 return SCIPhistoryGetPseudocost(scip->stat->glbhistorycrun, solvaldelta);
1838}
1839
1840/** gets the average number of pseudo cost updates for the given direction over all variables
1841 *
1842 * @return the average number of pseudo cost updates for the given direction over all variables
1843 *
1844 * @pre This method can be called if SCIP is in one of the following stages:
1845 * - \ref SCIP_STAGE_SOLVING
1846 * - \ref SCIP_STAGE_SOLVED
1847 */
1849 SCIP* scip, /**< SCIP data structure */
1850 SCIP_BRANCHDIR dir /**< branching direction (downwards, or upwards) */
1851 )
1852{
1853 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetAvgPseudocostCount", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
1854
1855 return SCIPhistoryGetPseudocostCount(scip->stat->glbhistory, dir)
1856 / MAX(scip->transprob->nbinvars + scip->transprob->nintvars, 1);
1857}
1858
1859/** gets the average number of pseudo cost updates for the given direction over all variables,
1860 * only using the pseudo cost information of the current run
1861 *
1862 * @return the average number of pseudo cost updates for the given direction over all variables,
1863 * only using the pseudo cost information of the current run
1864 *
1865 * @pre This method can be called if SCIP is in one of the following stages:
1866 * - \ref SCIP_STAGE_SOLVING
1867 * - \ref SCIP_STAGE_SOLVED
1868 */
1870 SCIP* scip, /**< SCIP data structure */
1871 SCIP_BRANCHDIR dir /**< branching direction (downwards, or upwards) */
1872 )
1873{
1874 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetAvgPseudocostCountCurrentRun", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
1875
1876 return SCIPhistoryGetPseudocostCount(scip->stat->glbhistorycrun, dir)
1877 / MAX(scip->transprob->nbinvars + scip->transprob->nintvars, 1);
1878}
1879
1880/** gets the average pseudo cost score value over all variables, assuming a fractionality of 0.5
1881 *
1882 * @return the average pseudo cost score value over all variables, assuming a fractionality of 0.5
1883 *
1884 * @pre This method can be called if SCIP is in one of the following stages:
1885 * - \ref SCIP_STAGE_SOLVING
1886 * - \ref SCIP_STAGE_SOLVED
1887 */
1889 SCIP* scip /**< SCIP data structure */
1890 )
1891{
1892 SCIP_Real pscostdown;
1893 SCIP_Real pscostup;
1894
1895 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetAvgPseudocostScore", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
1896
1897 pscostdown = SCIPhistoryGetPseudocost(scip->stat->glbhistory, -0.5);
1898 pscostup = SCIPhistoryGetPseudocost(scip->stat->glbhistory, +0.5);
1899
1900 return SCIPbranchGetScore(scip->set, NULL, pscostdown, pscostup);
1901}
1902
1903/** returns the variance of pseudo costs for all variables in the requested direction
1904 *
1905 * @return the variance of pseudo costs for all variables in the requested direction
1906 *
1907 * @pre This method can be called if SCIP is in one of the following stages:
1908 * - \ref SCIP_STAGE_SOLVING
1909 * - \ref SCIP_STAGE_SOLVED
1910 */
1912 SCIP* scip, /**< SCIP data structure */
1913 SCIP_BRANCHDIR branchdir, /**< the branching direction, up or down */
1914 SCIP_Bool onlycurrentrun /**< use only history of current run? */
1915 )
1916{
1917 SCIP_HISTORY* history;
1918
1919 assert(scip != NULL);
1920 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetPseudocostVariance", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
1921
1922 history = (onlycurrentrun ? scip->stat->glbhistorycrun : scip->stat->glbhistory);
1923 assert(history != NULL);
1924
1925 return SCIPhistoryGetPseudocostVariance(history, branchdir);
1926}
1927
1928/** gets the number of pseudo cost updates for the given direction over all variables
1929 *
1930 * @return the number of pseudo cost updates for the given direction over all variables
1931 *
1932 * @pre This method can be called if SCIP is in one of the following stages:
1933 * - \ref SCIP_STAGE_SOLVING
1934 * - \ref SCIP_STAGE_SOLVED
1935 */
1937 SCIP* scip, /**< SCIP data structure */
1938 SCIP_BRANCHDIR dir, /**< branching direction (downwards, or upwards) */
1939 SCIP_Bool onlycurrentrun /**< use only history of current run? */
1940 )
1941{
1942 SCIP_HISTORY* history;
1943
1944 assert(scip != NULL);
1946
1947 history = (onlycurrentrun ? scip->stat->glbhistorycrun : scip->stat->glbhistory);
1948
1949 return SCIPhistoryGetPseudocostCount(history, dir);
1950}
1951
1952/** gets the average pseudo cost score value over all variables, assuming a fractionality of 0.5,
1953 * only using the pseudo cost information of the current run
1954 *
1955 * @return the average pseudo cost score value over all variables, assuming a fractionality of 0.5,
1956 * only using the pseudo cost information of the current run
1957 *
1958 * @pre This method can be called if SCIP is in one of the following stages:
1959 * - \ref SCIP_STAGE_SOLVING
1960 * - \ref SCIP_STAGE_SOLVED
1961 */
1963 SCIP* scip /**< SCIP data structure */
1964 )
1965{
1966 SCIP_Real pscostdown;
1967 SCIP_Real pscostup;
1968
1969 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetAvgPseudocostScoreCurrentRun", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
1970
1971 pscostdown = SCIPhistoryGetPseudocost(scip->stat->glbhistorycrun, -0.5);
1972 pscostup = SCIPhistoryGetPseudocost(scip->stat->glbhistorycrun, +0.5);
1973
1974 return SCIPbranchGetScore(scip->set, NULL, pscostdown, pscostup);
1975}
1976
1977/** gets the average conflict score value over all variables
1978 *
1979 * @return the average conflict score value over all variables
1980 *
1981 * @pre This method can be called if SCIP is in one of the following stages:
1982 * - \ref SCIP_STAGE_SOLVING
1983 * - \ref SCIP_STAGE_SOLVED
1984 */
1986 SCIP* scip /**< SCIP data structure */
1987 )
1988{
1989 SCIP_Real conflictscoredown;
1990 SCIP_Real conflictscoreup;
1991 SCIP_Real scale;
1992
1993 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetAvgConflictScore", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
1994
1995 scale = scip->transprob->nvars * scip->stat->vsidsweight;
1996 conflictscoredown = SCIPhistoryGetVSIDS(scip->stat->glbhistory, SCIP_BRANCHDIR_DOWNWARDS) / scale;
1997 conflictscoreup = SCIPhistoryGetVSIDS(scip->stat->glbhistory, SCIP_BRANCHDIR_UPWARDS) / scale;
1998
1999 return SCIPbranchGetScore(scip->set, NULL, conflictscoredown, conflictscoreup);
2000}
2001
2002/** gets the average conflict score value over all variables, only using the conflict score information of the current run
2003 *
2004 * @return the average conflict score value over all variables, only using the conflict score information of the current run
2005 *
2006 * @pre This method can be called if SCIP is in one of the following stages:
2007 * - \ref SCIP_STAGE_SOLVING
2008 * - \ref SCIP_STAGE_SOLVED
2009 */
2011 SCIP* scip /**< SCIP data structure */
2012 )
2013{
2014 SCIP_Real conflictscoredown;
2015 SCIP_Real conflictscoreup;
2016 SCIP_Real scale;
2017
2018 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetAvgConflictScoreCurrentRun", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
2019
2020 scale = scip->transprob->nvars * scip->stat->vsidsweight;
2021 conflictscoredown = SCIPhistoryGetVSIDS(scip->stat->glbhistorycrun, SCIP_BRANCHDIR_DOWNWARDS) / scale;
2022 conflictscoreup = SCIPhistoryGetVSIDS(scip->stat->glbhistorycrun, SCIP_BRANCHDIR_UPWARDS) / scale;
2023
2024 return SCIPbranchGetScore(scip->set, NULL, conflictscoredown, conflictscoreup);
2025}
2026
2027/** gets the average inference score value over all variables
2028 *
2029 * @return the average inference score value over all variables
2030 *
2031 * @pre This method can be called if SCIP is in one of the following stages:
2032 * - \ref SCIP_STAGE_SOLVING
2033 * - \ref SCIP_STAGE_SOLVED
2034 */
2036 SCIP* scip /**< SCIP data structure */
2037 )
2038{
2039 SCIP_Real conflictlengthdown;
2040 SCIP_Real conflictlengthup;
2041
2042 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetAvgConflictlengthScore", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
2043
2044 conflictlengthdown = SCIPhistoryGetAvgConflictlength(scip->stat->glbhistory, SCIP_BRANCHDIR_DOWNWARDS);
2045 conflictlengthup = SCIPhistoryGetAvgConflictlength(scip->stat->glbhistory, SCIP_BRANCHDIR_UPWARDS);
2046
2047 return SCIPbranchGetScore(scip->set, NULL, conflictlengthdown, conflictlengthup);
2048}
2049
2050/** gets the average conflictlength score value over all variables, only using the conflictlength information of the
2051 * current run
2052 *
2053 * @return the average conflictlength score value over all variables, only using the conflictlength information of the
2054 * current run
2055 *
2056 * @pre This method can be called if SCIP is in one of the following stages:
2057 * - \ref SCIP_STAGE_SOLVING
2058 * - \ref SCIP_STAGE_SOLVED
2059 */
2061 SCIP* scip /**< SCIP data structure */
2062 )
2063{
2064 SCIP_Real conflictlengthdown;
2065 SCIP_Real conflictlengthup;
2066
2067 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetAvgConflictlengthScoreCurrentRun", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
2068
2069 conflictlengthdown = SCIPhistoryGetAvgConflictlength(scip->stat->glbhistorycrun, SCIP_BRANCHDIR_DOWNWARDS);
2070 conflictlengthup = SCIPhistoryGetAvgConflictlength(scip->stat->glbhistorycrun, SCIP_BRANCHDIR_UPWARDS);
2071
2072 return SCIPbranchGetScore(scip->set, NULL, conflictlengthdown, conflictlengthup);
2073}
2074
2075/** returns the average number of inferences found after branching in given direction over all variables
2076 *
2077 * @return the average number of inferences found after branching in given direction over all variables
2078 *
2079 * @pre This method can be called if SCIP is in one of the following stages:
2080 * - \ref SCIP_STAGE_SOLVING
2081 * - \ref SCIP_STAGE_SOLVED
2082 */
2084 SCIP* scip, /**< SCIP data structure */
2085 SCIP_BRANCHDIR dir /**< branching direction (downwards, or upwards) */
2086 )
2087{
2089
2090 return SCIPhistoryGetAvgInferences(scip->stat->glbhistory, dir);
2091}
2092
2093/** returns the average number of inferences found after branching in given direction over all variables,
2094 * only using the inference information of the current run
2095 *
2096 * @return the average number of inferences found after branching in given direction over all variables,
2097 * only using the inference information of the current run
2098 *
2099 * @pre This method can be called if SCIP is in one of the following stages:
2100 * - \ref SCIP_STAGE_SOLVING
2101 * - \ref SCIP_STAGE_SOLVED
2102 */
2104 SCIP* scip, /**< SCIP data structure */
2105 SCIP_BRANCHDIR dir /**< branching direction (downwards, or upwards) */
2106 )
2107{
2108 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetAvgInferencesCurrentRun", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
2109
2110 return SCIPhistoryGetAvgInferences(scip->stat->glbhistorycrun, dir);
2111}
2112
2113/** gets the average inference score value over all variables
2114 *
2115 * @return the average inference score value over all variables
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 inferencesdown;
2126 SCIP_Real inferencesup;
2127
2128 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetAvgInferenceScore", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
2129
2130 inferencesdown = SCIPhistoryGetAvgInferences(scip->stat->glbhistory, SCIP_BRANCHDIR_DOWNWARDS);
2131 inferencesup = SCIPhistoryGetAvgInferences(scip->stat->glbhistory, SCIP_BRANCHDIR_UPWARDS);
2132
2133 return SCIPbranchGetScore(scip->set, NULL, inferencesdown, inferencesup);
2134}
2135
2136/** gets the average inference score value over all variables, only using the inference information of the
2137 * current run
2138 *
2139 * @return the average inference score value over all variables, only using the inference information of the
2140 * current run
2141 *
2142 * @pre This method can be called if SCIP is in one of the following stages:
2143 * - \ref SCIP_STAGE_SOLVING
2144 * - \ref SCIP_STAGE_SOLVED
2145 */
2147 SCIP* scip /**< SCIP data structure */
2148 )
2149{
2150 SCIP_Real inferencesdown;
2151 SCIP_Real inferencesup;
2152
2153 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetAvgInferenceScoreCurrentRun", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
2154
2155 inferencesdown = SCIPhistoryGetAvgInferences(scip->stat->glbhistorycrun, SCIP_BRANCHDIR_DOWNWARDS);
2156 inferencesup = SCIPhistoryGetAvgInferences(scip->stat->glbhistorycrun, SCIP_BRANCHDIR_UPWARDS);
2157
2158 return SCIPbranchGetScore(scip->set, NULL, inferencesdown, inferencesup);
2159}
2160
2161/** returns the average number of cutoffs found after branching in given direction over all variables
2162 *
2163 * @return the average number of cutoffs found after branching in given direction over all variables
2164 *
2165 * @pre This method can be called if SCIP is in one of the following stages:
2166 * - \ref SCIP_STAGE_SOLVING
2167 * - \ref SCIP_STAGE_SOLVED
2168 */
2170 SCIP* scip, /**< SCIP data structure */
2171 SCIP_BRANCHDIR dir /**< branching direction (downwards, or upwards) */
2172 )
2173{
2175
2176 return SCIPhistoryGetAvgCutoffs(scip->stat->glbhistory, dir);
2177}
2178
2179/** returns the average number of cutoffs found after branching in given direction over all variables,
2180 * only using the cutoff information of the current run
2181 *
2182 * @return the average number of cutoffs found after branching in given direction over all variables,
2183 * only using the cutoff information of the current run
2184 *
2185 * @pre This method can be called if SCIP is in one of the following stages:
2186 * - \ref SCIP_STAGE_SOLVING
2187 * - \ref SCIP_STAGE_SOLVED
2188 */
2190 SCIP* scip, /**< SCIP data structure */
2191 SCIP_BRANCHDIR dir /**< branching direction (downwards, or upwards) */
2192 )
2193{
2194 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetAvgCutoffsCurrentRun", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
2195
2196 return SCIPhistoryGetAvgCutoffs(scip->stat->glbhistorycrun, dir);
2197}
2198
2199/** gets the average cutoff score value over all variables
2200 *
2201 * @return the average cutoff score value over all variables
2202 *
2203 * @pre This method can be called if SCIP is in one of the following stages:
2204 * - \ref SCIP_STAGE_SOLVING
2205 * - \ref SCIP_STAGE_SOLVED
2206 */
2208 SCIP* scip /**< SCIP data structure */
2209 )
2210{
2211 SCIP_Real cutoffsdown;
2212 SCIP_Real cutoffsup;
2213
2215
2216 cutoffsdown = SCIPhistoryGetAvgCutoffs(scip->stat->glbhistory, SCIP_BRANCHDIR_DOWNWARDS);
2217 cutoffsup = SCIPhistoryGetAvgCutoffs(scip->stat->glbhistory, SCIP_BRANCHDIR_UPWARDS);
2218
2219 return SCIPbranchGetScore(scip->set, NULL, cutoffsdown, cutoffsup);
2220}
2221
2222/** gets the average cutoff score value over all variables, only using the cutoff score information of the current run
2223 *
2224 * @return the average cutoff score value over all variables, only using the cutoff score information of the current run
2225 *
2226 * @pre This method can be called if SCIP is in one of the following stages:
2227 * - \ref SCIP_STAGE_SOLVING
2228 * - \ref SCIP_STAGE_SOLVED
2229 */
2231 SCIP* scip /**< SCIP data structure */
2232 )
2233{
2234 SCIP_Real cutoffsdown;
2235 SCIP_Real cutoffsup;
2236
2237 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetAvgCutoffScoreCurrentRun", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
2238
2239 cutoffsdown = SCIPhistoryGetAvgCutoffs(scip->stat->glbhistorycrun, SCIP_BRANCHDIR_DOWNWARDS);
2240 cutoffsup = SCIPhistoryGetAvgCutoffs(scip->stat->glbhistorycrun, SCIP_BRANCHDIR_UPWARDS);
2241
2242 return SCIPbranchGetScore(scip->set, NULL, cutoffsdown, cutoffsup);
2243}
2244
2245/** increases the average normalized efficacy of a GMI cut over all variables
2246 *
2247 * @pre This method can be called if SCIP is in one of the following stages:
2248 * - \ref SCIP_STAGE_SOLVING
2249 * - \ref SCIP_STAGE_SOLVED
2250 */
2252 SCIP* scip, /**< SCIP data structure */
2253 SCIP_Real gmieff /**< average normalized GMI cut efficacy over all variables */
2254 )
2255{
2257
2258 SCIPhistoryIncGMIeffSum(scip->stat->glbhistory, gmieff);
2259}
2260
2261/** Increases the cumulative normalized efficacy of average (over all variables) GMI cuts
2262 *
2263 * @return the average normalized efficacy of a GMI cut over all variables
2264 *
2265 * @pre This method can be called if SCIP is in one of the following stages:
2266 * - \ref SCIP_STAGE_SOLVING
2267 * - \ref SCIP_STAGE_SOLVED
2268 */
2270 SCIP* scip /**< SCIP data structure */
2271 )
2272{
2274
2275 return SCIPhistoryGetAvgGMIeff(scip->stat->glbhistory);
2276}
2277
2278/** computes a deterministic measure of time from statistics
2279 *
2280 * @return the deterministic time
2281 *
2282 * @pre This method can be called if SCIP is in one of the following stages:
2283 * - \ref SCIP_STAGE_PRESOLVING
2284 * - \ref SCIP_STAGE_PRESOLVED
2285 * - \ref SCIP_STAGE_SOLVING
2286 * - \ref SCIP_STAGE_SOLVED
2287 */
2289 SCIP* scip /**< SCIP data structure */
2290 )
2291{
2292/* TODO: SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPgetDeterministicTime", FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) ); */
2293 if(scip->stat == NULL)
2294 return 0.0;
2295
2296 return 1e-6 * scip->stat->nnz * (
2297 0.00328285264101 * scip->stat->nprimalresolvelpiterations +
2298 0.00531625104146 * scip->stat->ndualresolvelpiterations +
2299 0.000738719124051 * scip->stat->nprobboundchgs +
2300 0.0011123144764 * scip->stat->nisstoppedcalls );
2301}
2302
2303/** outputs problem to file stream */
2304static
2306 SCIP* scip, /**< SCIP data structure */
2307 SCIP_PROB* prob, /**< problem data */
2308 FILE* file, /**< output file (or NULL for standard output) */
2309 const char* extension, /**< file format (or NULL for default CIP format) */
2310 SCIP_Bool genericnames /**< using generic variable and constraint names? */
2311 )
2312{
2313 SCIP_RESULT result;
2314 int i;
2315 assert(scip != NULL);
2316 assert(prob != NULL);
2317
2318 /* try all readers until one could read the file */
2319 result = SCIP_DIDNOTRUN;
2320 for( i = 0; i < scip->set->nreaders && result == SCIP_DIDNOTRUN; ++i )
2321 {
2322 SCIP_RETCODE retcode;
2323
2324 if( extension != NULL )
2325 retcode = SCIPreaderWrite(scip->set->readers[i], prob, scip->set, file, extension, genericnames, &result);
2326 else
2327 retcode = SCIPreaderWrite(scip->set->readers[i], prob, scip->set, file, "cip", genericnames, &result);
2328
2329 /* check for reader errors */
2330 if( retcode == SCIP_WRITEERROR )
2331 return retcode;
2332
2333 SCIP_CALL( retcode );
2334 }
2335
2336 switch( result )
2337 {
2338 case SCIP_DIDNOTRUN:
2339 return SCIP_PLUGINNOTFOUND;
2340
2341 case SCIP_SUCCESS:
2342 return SCIP_OKAY;
2343
2344 default:
2345 assert(i < scip->set->nreaders);
2346 SCIPerrorMessage("invalid result code <%d> from reader <%s> writing <%s> format\n",
2347 result, SCIPreaderGetName(scip->set->readers[i]), extension);
2348 return SCIP_READERROR;
2349 } /*lint !e788*/
2350}
2351
2352/** outputs original problem to file stream
2353 *
2354 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2355 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2356 *
2357 * @pre This method can be called if SCIP is in one of the following stages:
2358 * - \ref SCIP_STAGE_PROBLEM
2359 * - \ref SCIP_STAGE_TRANSFORMING
2360 * - \ref SCIP_STAGE_TRANSFORMED
2361 * - \ref SCIP_STAGE_INITPRESOLVE
2362 * - \ref SCIP_STAGE_PRESOLVING
2363 * - \ref SCIP_STAGE_EXITPRESOLVE
2364 * - \ref SCIP_STAGE_PRESOLVED
2365 * - \ref SCIP_STAGE_INITSOLVE
2366 * - \ref SCIP_STAGE_SOLVING
2367 * - \ref SCIP_STAGE_SOLVED
2368 * - \ref SCIP_STAGE_EXITSOLVE
2369 * - \ref SCIP_STAGE_FREETRANS
2370 */
2372 SCIP* scip, /**< SCIP data structure */
2373 FILE* file, /**< output file (or NULL for standard output) */
2374 const char* extension, /**< file format (or NULL for default CIP format)*/
2375 SCIP_Bool genericnames /**< using generic variable and constraint names? */
2376 )
2377{
2378 SCIP_RETCODE retcode;
2379
2380 SCIP_CALL( SCIPcheckStage(scip, "SCIPprintOrigProblem", FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE) );
2381
2382 assert(scip != NULL);
2383 assert( scip->origprob != NULL );
2384
2385 retcode = printProblem(scip, scip->origprob, file, extension, genericnames);
2386
2387 /* check for write errors */
2388 if( retcode == SCIP_WRITEERROR || retcode == SCIP_PLUGINNOTFOUND )
2389 return retcode;
2390 else
2391 {
2392 SCIP_CALL( retcode );
2393 }
2394
2395 return SCIP_OKAY;
2396}
2397
2398/** outputs transformed problem of the current node to file stream
2399 *
2400 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2401 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2402 *
2403 * @pre This method can be called if SCIP is in one of the following stages:
2404 * - \ref SCIP_STAGE_TRANSFORMED
2405 * - \ref SCIP_STAGE_INITPRESOLVE
2406 * - \ref SCIP_STAGE_PRESOLVING
2407 * - \ref SCIP_STAGE_EXITPRESOLVE
2408 * - \ref SCIP_STAGE_PRESOLVED
2409 * - \ref SCIP_STAGE_INITSOLVE
2410 * - \ref SCIP_STAGE_SOLVING
2411 * - \ref SCIP_STAGE_SOLVED
2412 * - \ref SCIP_STAGE_EXITSOLVE
2413 * - \ref SCIP_STAGE_FREETRANS
2414 */
2416 SCIP* scip, /**< SCIP data structure */
2417 FILE* file, /**< output file (or NULL for standard output) */
2418 const char* extension, /**< file format (or NULL for default CIP format)*/
2419 SCIP_Bool genericnames /**< using generic variable and constraint names? */
2420 )
2421{
2422 SCIP_RETCODE retcode;
2423
2424 SCIP_CALL( SCIPcheckStage(scip, "SCIPprintTransProblem", FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE) );
2425
2426 assert(scip != NULL);
2427 assert(scip->transprob != NULL );
2428
2429 retcode = printProblem(scip, scip->transprob, file, extension, genericnames);
2430
2431 /* check for write errors */
2432 if( retcode == SCIP_WRITEERROR || retcode == SCIP_PLUGINNOTFOUND )
2433 return retcode;
2434 else
2435 {
2436 SCIP_CALL( retcode );
2437 }
2438
2439 return SCIP_OKAY;
2440}
2441
2442/** outputs status statistics
2443 *
2444 * @note If limits have been changed between the solution and the call to this function, the status is recomputed and
2445 * thus may to correspond to the original status.
2446 *
2447 * @pre This method can be called if SCIP is in one of the following stages:
2448 * - \ref SCIP_STAGE_INIT
2449 * - \ref SCIP_STAGE_PROBLEM
2450 * - \ref SCIP_STAGE_TRANSFORMED
2451 * - \ref SCIP_STAGE_INITPRESOLVE
2452 * - \ref SCIP_STAGE_PRESOLVING
2453 * - \ref SCIP_STAGE_EXITPRESOLVE
2454 * - \ref SCIP_STAGE_PRESOLVED
2455 * - \ref SCIP_STAGE_SOLVING
2456 * - \ref SCIP_STAGE_SOLVED
2457 */
2459 SCIP* scip, /**< SCIP data structure */
2460 FILE* file /**< output file */
2461 )
2462{
2463 assert(scip != NULL);
2464 assert(scip->set != NULL);
2465
2466 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPprintStatusStatistics", TRUE, TRUE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
2467
2468 SCIPmessageFPrintInfo(scip->messagehdlr, file, "SCIP Status : ");
2470 SCIPmessageFPrintInfo(scip->messagehdlr, file, "\n");
2471}
2472
2473/** outputs statistics for original problem
2474 *
2475 * @pre This method can be called if SCIP is in one of the following stages:
2476 * - \ref SCIP_STAGE_PROBLEM
2477 * - \ref SCIP_STAGE_TRANSFORMED
2478 * - \ref SCIP_STAGE_INITPRESOLVE
2479 * - \ref SCIP_STAGE_PRESOLVING
2480 * - \ref SCIP_STAGE_EXITPRESOLVE
2481 * - \ref SCIP_STAGE_PRESOLVED
2482 * - \ref SCIP_STAGE_SOLVING
2483 * - \ref SCIP_STAGE_SOLVED
2484 */
2486 SCIP* scip, /**< SCIP data structure */
2487 FILE* file /**< output file */
2488 )
2489{
2490 assert(scip != NULL);
2491 assert(scip->set != NULL);
2492
2493 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPprintOrigProblemStatistics", FALSE, TRUE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
2494
2495 SCIPmessageFPrintInfo(scip->messagehdlr, file, "Original Problem :\n");
2496 SCIPprobPrintStatistics(scip->origprob, scip->set, scip->messagehdlr, file);
2497}
2498
2499/** outputs statistics for transformed problem
2500 *
2501 * @pre This method can be called if SCIP is in one of the following stages:
2502 * - \ref SCIP_STAGE_PROBLEM
2503 * - \ref SCIP_STAGE_TRANSFORMED
2504 * - \ref SCIP_STAGE_INITPRESOLVE
2505 * - \ref SCIP_STAGE_PRESOLVING
2506 * - \ref SCIP_STAGE_EXITPRESOLVE
2507 * - \ref SCIP_STAGE_PRESOLVED
2508 * - \ref SCIP_STAGE_SOLVING
2509 * - \ref SCIP_STAGE_SOLVED
2510 */
2512 SCIP* scip, /**< SCIP data structure */
2513 FILE* file /**< output file */
2514 )
2515{
2516 assert(scip != NULL);
2517 assert(scip->set != NULL);
2518
2519 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPprintTransProblemStatistics", FALSE, TRUE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
2520
2521 SCIPmessageFPrintInfo(scip->messagehdlr, file, "Presolved Problem :\n");
2522 SCIPprobPrintStatistics(scip->transprob, scip->set, scip->messagehdlr, file);
2523 SCIPmessageFPrintInfo(scip->messagehdlr, file, " Nonzeros : %" SCIP_LONGINT_FORMAT " constraint, %" SCIP_LONGINT_FORMAT " clique table\n",
2524 scip->stat->nnz, SCIPcliquetableGetNEntries(scip->cliquetable));
2525}
2526
2527/** outputs presolver statistics
2528 *
2529 * @pre This method can be called if SCIP is in one of the following stages:
2530 * - \ref SCIP_STAGE_TRANSFORMED
2531 * - \ref SCIP_STAGE_INITPRESOLVE
2532 * - \ref SCIP_STAGE_PRESOLVING
2533 * - \ref SCIP_STAGE_EXITPRESOLVE
2534 * - \ref SCIP_STAGE_PRESOLVED
2535 * - \ref SCIP_STAGE_SOLVING
2536 * - \ref SCIP_STAGE_SOLVED
2537 */
2539 SCIP* scip, /**< SCIP data structure */
2540 FILE* file /**< output file */
2541 )
2542{
2543 int i;
2544
2545 assert(scip != NULL);
2546 assert(scip->set != NULL);
2547
2548 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPprintPresolverStatistics", FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
2549
2550 SCIPmessageFPrintInfo(scip->messagehdlr, file, "Presolvers : ExecTime SetupTime Calls FixedVars AggrVars ChgTypes ChgBounds AddHoles DelCons AddCons ChgSides ChgCoefs\n");
2551
2552 /* sort presolvers w.r.t. their name */
2554
2555 /* presolver statistics */
2556 for( i = 0; i < scip->set->npresols; ++i )
2557 {
2558 SCIP_PRESOL* presol;
2559 presol = scip->set->presols[i];
2560 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %-17.17s:", SCIPpresolGetName(presol));
2561 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %10.2f %10.2f %6d %10d %10d %10d %10d %10d %10d %10d %10d %10d\n",
2562 SCIPpresolGetTime(presol),
2563 SCIPpresolGetSetupTime(presol),
2564 SCIPpresolGetNCalls(presol),
2566 SCIPpresolGetNAggrVars(presol),
2568 SCIPpresolGetNChgBds(presol),
2569 SCIPpresolGetNAddHoles(presol),
2570 SCIPpresolGetNDelConss(presol),
2571 SCIPpresolGetNAddConss(presol),
2572 SCIPpresolGetNChgSides(presol),
2573 SCIPpresolGetNChgCoefs(presol));
2574 }
2575
2576 /* sort propagators w.r.t. their name */
2578
2579 for( i = 0; i < scip->set->nprops; ++i )
2580 {
2581 SCIP_PROP* prop;
2582 prop = scip->set->props[i];
2583 if( SCIPpropDoesPresolve(prop) )
2584 {
2585 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %-17.17s:", SCIPpropGetName(prop));
2586 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %10.2f %10.2f %6d %10d %10d %10d %10d %10d %10d %10d %10d %10d\n",
2593 SCIPpropGetNChgBds(prop),
2598 SCIPpropGetNChgCoefs(prop));
2599 }
2600 }
2601
2602 /* constraint handler presolving methods statistics */
2603 for( i = 0; i < scip->set->nconshdlrs; ++i )
2604 {
2605 SCIP_CONSHDLR* conshdlr;
2606 int maxnactiveconss;
2607
2608 conshdlr = scip->set->conshdlrs[i];
2609 maxnactiveconss = SCIPconshdlrGetMaxNActiveConss(conshdlr);
2610 if( SCIPconshdlrDoesPresolve(conshdlr)
2611 && (maxnactiveconss > 0 || !SCIPconshdlrNeedsCons(conshdlr)
2612 || SCIPconshdlrGetNFixedVars(conshdlr) > 0
2613 || SCIPconshdlrGetNAggrVars(conshdlr) > 0
2614 || SCIPconshdlrGetNChgVarTypes(conshdlr) > 0
2615 || SCIPconshdlrGetNChgBds(conshdlr) > 0
2616 || SCIPconshdlrGetNAddHoles(conshdlr) > 0
2617 || SCIPconshdlrGetNDelConss(conshdlr) > 0
2618 || SCIPconshdlrGetNAddConss(conshdlr) > 0
2619 || SCIPconshdlrGetNChgSides(conshdlr) > 0
2620 || SCIPconshdlrGetNChgCoefs(conshdlr) > 0
2621 || SCIPconshdlrGetNUpgdConss(conshdlr) > 0) )
2622 {
2623 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %-17.17s:", SCIPconshdlrGetName(conshdlr));
2624 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %10.2f %10.2f %6d %10d %10d %10d %10d %10d %10d %10d %10d %10d\n",
2625 SCIPconshdlrGetPresolTime(conshdlr),
2626 SCIPconshdlrGetSetupTime(conshdlr),
2628 SCIPconshdlrGetNFixedVars(conshdlr),
2629 SCIPconshdlrGetNAggrVars(conshdlr),
2631 SCIPconshdlrGetNChgBds(conshdlr),
2632 SCIPconshdlrGetNAddHoles(conshdlr),
2633 SCIPconshdlrGetNDelConss(conshdlr),
2634 SCIPconshdlrGetNAddConss(conshdlr),
2635 SCIPconshdlrGetNChgSides(conshdlr),
2636 SCIPconshdlrGetNChgCoefs(conshdlr));
2637 }
2638 }
2639
2640 /* root node bound changes */
2641 SCIPmessageFPrintInfo(scip->messagehdlr, file, " root node : - - - %10d - - %10d - - - - -\n",
2642 scip->stat->nrootintfixings, scip->stat->nrootboundchgs);
2643}
2644
2645/** outputs constraint statistics
2646 *
2647 * @pre This method can be called if SCIP is in one of the following stages:
2648 * - \ref SCIP_STAGE_TRANSFORMED
2649 * - \ref SCIP_STAGE_INITPRESOLVE
2650 * - \ref SCIP_STAGE_PRESOLVING
2651 * - \ref SCIP_STAGE_EXITPRESOLVE
2652 * - \ref SCIP_STAGE_PRESOLVED
2653 * - \ref SCIP_STAGE_SOLVING
2654 * - \ref SCIP_STAGE_SOLVED
2655 */
2657 SCIP* scip, /**< SCIP data structure */
2658 FILE* file /**< output file */
2659 )
2660{
2661 int i;
2662
2663 assert(scip != NULL);
2664 assert(scip->set != NULL);
2665
2666 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPprintConstraintStatistics", FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
2667
2668 /* Add maximal number of constraints of the same type? So far this information is not added because of lack of space. */
2669 SCIPmessageFPrintInfo(scip->messagehdlr, file, "Constraints : Number MaxNumber #Separate #Propagate #EnfoLP #EnfoRelax #EnfoPS #Check #ResProp Cutoffs DomReds Cuts Applied Conss Children\n");
2670
2671 for( i = 0; i < scip->set->nconshdlrs; ++i )
2672 {
2673 SCIP_CONSHDLR* conshdlr;
2674 int startnactiveconss;
2675 int maxnactiveconss;
2676
2677 conshdlr = scip->set->conshdlrs[i];
2678 startnactiveconss = SCIPconshdlrGetStartNActiveConss(conshdlr);
2679 maxnactiveconss = SCIPconshdlrGetMaxNActiveConss(conshdlr);
2680 if( maxnactiveconss > 0 || !SCIPconshdlrNeedsCons(conshdlr) )
2681 {
2682 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %-17.17s:", SCIPconshdlrGetName(conshdlr));
2684 startnactiveconss,
2685 maxnactiveconss > startnactiveconss ? '+' : ' ',
2686 maxnactiveconss,
2687 SCIPconshdlrGetNSepaCalls(conshdlr),
2688 SCIPconshdlrGetNPropCalls(conshdlr),
2694 SCIPconshdlrGetNCutoffs(conshdlr),
2696 SCIPconshdlrGetNCutsFound(conshdlr),
2699 SCIPconshdlrGetNChildren(conshdlr));
2700 }
2701 }
2702}
2703
2704/** outputs constraint timing statistics
2705 *
2706 * @pre This method can be called if SCIP is in one of the following stages:
2707 * - \ref SCIP_STAGE_TRANSFORMED
2708 * - \ref SCIP_STAGE_INITPRESOLVE
2709 * - \ref SCIP_STAGE_PRESOLVING
2710 * - \ref SCIP_STAGE_EXITPRESOLVE
2711 * - \ref SCIP_STAGE_PRESOLVED
2712 * - \ref SCIP_STAGE_SOLVING
2713 * - \ref SCIP_STAGE_SOLVED
2714 */
2716 SCIP* scip, /**< SCIP data structure */
2717 FILE* file /**< output file */
2718 )
2719{
2720 int i;
2721
2722 assert(scip != NULL);
2723 assert(scip->set != NULL);
2724
2725 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPprintConstraintTimingStatistics", FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
2726
2727 SCIPmessageFPrintInfo(scip->messagehdlr, file, "Constraint Timings : TotalTime SetupTime Separate Propagate EnfoLP EnfoPS EnfoRelax Check ResProp SB-Prop\n");
2728
2729 for( i = 0; i < scip->set->nconshdlrs; ++i )
2730 {
2731 SCIP_CONSHDLR* conshdlr;
2732 int maxnactiveconss;
2733
2734 conshdlr = scip->set->conshdlrs[i];
2735 maxnactiveconss = SCIPconshdlrGetMaxNActiveConss(conshdlr);
2736 if( maxnactiveconss > 0 || !SCIPconshdlrNeedsCons(conshdlr) )
2737 {
2738 SCIP_Real totaltime;
2739
2740 totaltime = SCIPconshdlrGetSepaTime(conshdlr) + SCIPconshdlrGetPropTime(conshdlr)
2742 + SCIPconshdlrGetEnfoLPTime(conshdlr)
2743 + SCIPconshdlrGetEnfoPSTime(conshdlr)
2745 + SCIPconshdlrGetCheckTime(conshdlr)
2746 + SCIPconshdlrGetRespropTime(conshdlr)
2747 + SCIPconshdlrGetSetupTime(conshdlr);
2748
2749 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %-17.17s:", SCIPconshdlrGetName(conshdlr));
2750 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",
2751 totaltime,
2752 SCIPconshdlrGetSetupTime(conshdlr),
2753 SCIPconshdlrGetSepaTime(conshdlr),
2754 SCIPconshdlrGetPropTime(conshdlr),
2755 SCIPconshdlrGetEnfoLPTime(conshdlr),
2756 SCIPconshdlrGetEnfoPSTime(conshdlr),
2758 SCIPconshdlrGetCheckTime(conshdlr),
2761 }
2762 }
2763}
2764
2765/** outputs propagator statistics
2766 *
2767 * @pre This method can be called if SCIP is in one of the following stages:
2768 * - \ref SCIP_STAGE_TRANSFORMED
2769 * - \ref SCIP_STAGE_INITPRESOLVE
2770 * - \ref SCIP_STAGE_PRESOLVING
2771 * - \ref SCIP_STAGE_EXITPRESOLVE
2772 * - \ref SCIP_STAGE_PRESOLVED
2773 * - \ref SCIP_STAGE_SOLVING
2774 * - \ref SCIP_STAGE_SOLVED
2775 */
2777 SCIP* scip, /**< SCIP data structure */
2778 FILE* file /**< output file */
2779 )
2780{
2781 int i;
2782
2783 assert(scip != NULL);
2784 assert(scip->set != NULL);
2785
2786 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPprintPropagatorStatistics", FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
2787
2788 SCIPmessageFPrintInfo(scip->messagehdlr, file, "Propagators : #Propagate #ResProp Cutoffs DomReds\n");
2789
2790 /* sort propagaters w.r.t. their name */
2792
2793 for( i = 0; i < scip->set->nprops; ++i )
2794 {
2795 SCIP_PROP* prop;
2796 prop = scip->set->props[i];
2797
2798 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %-17.17s: %10" SCIP_LONGINT_FORMAT " %10" SCIP_LONGINT_FORMAT " %10" SCIP_LONGINT_FORMAT " %10" SCIP_LONGINT_FORMAT "\n",
2799 SCIPpropGetName(prop),
2800 SCIPpropGetNCalls(prop),
2802 SCIPpropGetNCutoffs(prop),
2804 }
2805
2806 SCIPmessageFPrintInfo(scip->messagehdlr, file, "Propagator Timings : TotalTime SetupTime Presolve Propagate ResProp SB-Prop\n");
2807
2808 for( i = 0; i < scip->set->nprops; ++i )
2809 {
2810 SCIP_PROP* prop;
2811 SCIP_Real totaltime;
2812
2813 prop = scip->set->props[i];
2814 totaltime = SCIPpropGetPresolTime(prop) + SCIPpropGetTime(prop) + SCIPpropGetRespropTime(prop)
2816
2817 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %-17.17s:", SCIPpropGetName(prop));
2818 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %10.2f %10.2f %10.2f %10.2f %10.2f %10.2f\n",
2819 totaltime,
2822 SCIPpropGetTime(prop),
2825 }
2826}
2827
2828/** outputs conflict statistics
2829 *
2830 * @pre This method can be called if SCIP is in one of the following stages:
2831 * - \ref SCIP_STAGE_TRANSFORMED
2832 * - \ref SCIP_STAGE_INITPRESOLVE
2833 * - \ref SCIP_STAGE_PRESOLVING
2834 * - \ref SCIP_STAGE_EXITPRESOLVE
2835 * - \ref SCIP_STAGE_PRESOLVED
2836 * - \ref SCIP_STAGE_SOLVING
2837 * - \ref SCIP_STAGE_SOLVED
2838 */
2840 SCIP* scip, /**< SCIP data structure */
2841 FILE* file /**< output file */
2842 )
2843{
2844 char initstoresize[SCIP_MAXSTRLEN];
2845 char maxstoresize[SCIP_MAXSTRLEN];
2846
2847 assert(scip != NULL);
2848 assert(scip->set != NULL);
2849
2850 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPprintConflictStatistics", FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
2851
2852 if( scip->set->conf_maxstoresize == 0 )
2853 {
2854 (void)SCIPsnprintf(initstoresize, SCIP_MAXSTRLEN, "inf");
2855 (void)SCIPsnprintf(maxstoresize, SCIP_MAXSTRLEN, "inf");
2856 }
2857 else
2858 {
2859 int initsize = SCIPconflictstoreGetInitPoolSize(scip->conflictstore);
2860 int maxsize = SCIPconflictstoreGetMaxPoolSize(scip->conflictstore);
2861
2862 if( maxsize == -1 )
2863 {
2864 (void)SCIPsnprintf(initstoresize, SCIP_MAXSTRLEN, "--");
2865 (void)SCIPsnprintf(maxstoresize, SCIP_MAXSTRLEN, "--");
2866 }
2867 else
2868 {
2869 assert(initsize >= 0);
2870 assert(maxsize >= 0);
2871
2872 (void)SCIPsnprintf(initstoresize, SCIP_MAXSTRLEN, "%d", initsize);
2873 (void)SCIPsnprintf(maxstoresize, SCIP_MAXSTRLEN, "%d", maxsize);
2874 }
2875 }
2876 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);
2877 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",
2878 SCIPconflictGetPropTime(scip->conflict),
2889 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",
2906 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",
2923 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",
2936 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",
2948 SCIPmessageFPrintInfo(scip->messagehdlr, file, " applied globally : %10.2f - - %10" SCIP_LONGINT_FORMAT " %10" SCIP_LONGINT_FORMAT " %10.1f - - %10" SCIP_LONGINT_FORMAT " - -\n",
2956 SCIPmessageFPrintInfo(scip->messagehdlr, file, " applied locally : - - - %10" SCIP_LONGINT_FORMAT " %10" SCIP_LONGINT_FORMAT " %10.1f - - %10" SCIP_LONGINT_FORMAT " - -\n",
2963}
2964
2965/** outputs separator statistics
2966 *
2967 * Columns:
2968 * - RootCalls: The number of calls that happened at the root.
2969 * - FoundCuts: The total number of cuts generated by the separators.
2970 * Note: Cutpool-FoundCuts \f$= \sum_{i=1}^nsepas ( Foundcuts_i - DirectAdd_i )\f$.
2971 * - ViaPoolAdd: The total number of cuts added to the sepastore from the cutpool.
2972 * - DirectAdd: The total number of cuts added directly to the sepastore from the separator.
2973 * - Applied: The sum of all cuts from the separator that were applied to the LP.
2974 * - ViaPoolApp: The number of cuts that entered the sepastore from the cutpool that were applied to the LP.
2975 * - DirectApp: The number of cuts that entered the sepastore directly and were applied to the LP.
2976 *
2977 * The number of cuts ViaPoolAdd + Directly should be equal to the number of cuts Filtered + Forced + Selected in the
2978 * cutselector statistics.
2979 *
2980 * @note The following edge case may lead to over or undercounting of statistics: When SCIPapplyCutsProbing() is
2981 * called, cuts are counted for the cut selection statistics, but not for the separator statistics. This
2982 * happens, e.g., in the default plugin prop_obbt.c.
2983 *
2984 * @pre This method can be called if SCIP is in one of the following stages:
2985 * - \ref SCIP_STAGE_SOLVING
2986 * - \ref SCIP_STAGE_SOLVED
2987 */
2989 SCIP* scip, /**< SCIP data structure */
2990 FILE* file /**< output file */
2991 )
2992{
2993 int i;
2994
2995 assert(scip != NULL);
2996 assert(scip->set != NULL);
2997
2998 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPprintSeparatorStatistics", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
2999
3000 SCIPmessageFPrintInfo(scip->messagehdlr, file, "Separators : ExecTime SetupTime Calls RootCalls Cutoffs DomReds FoundCuts ViaPoolAdd DirectAdd Applied ViaPoolApp DirectApp Conss\n");
3001 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",
3002 SCIPcutpoolGetTime(scip->cutpool),
3003 SCIPcutpoolGetNCalls(scip->cutpool),
3007 SCIPcutpoolGetMaxNCuts(scip->cutpool));
3008
3009 /* sort separators w.r.t. their name */
3011
3012 for( i = 0; i < scip->set->nsepas; ++i )
3013 {
3014 SCIP_SEPA* sepa;
3015
3016 sepa = scip->set->sepas[i];
3017
3018 /* only output data for separators without parent separator */
3019 if( SCIPsepaGetParentsepa(sepa) == NULL )
3020 {
3021 /* output data */
3023 SCIPsepaGetName(sepa),
3024 SCIPsepaGetTime(sepa),
3026 SCIPsepaGetNCalls(sepa),
3028 SCIPsepaGetNCutoffs(sepa),
3037
3038 /* for parent separators search for dependent separators */
3039 if( SCIPsepaIsParentsepa(sepa) )
3040 {
3041 SCIP_SEPA* parentsepa;
3042 int k;
3043
3044 for( k = 0; k < scip->set->nsepas; ++k )
3045 {
3046 if( k == i )
3047 continue;
3048
3049 parentsepa = SCIPsepaGetParentsepa(scip->set->sepas[k]);
3050 if( parentsepa != sepa )
3051 continue;
3052
3053 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",
3054 SCIPsepaGetName(scip->set->sepas[k]), "-", "-", "-", "-", "-", "-", "-",
3055 SCIPsepaGetNCutsAddedViaPool(scip->set->sepas[k]),
3056 SCIPsepaGetNCutsAddedDirect(scip->set->sepas[k]),
3057 SCIPsepaGetNCutsApplied(scip->set->sepas[k]),
3058 SCIPsepaGetNCutsAppliedViaPool(scip->set->sepas[k]),
3059 SCIPsepaGetNCutsAppliedDirect(scip->set->sepas[k]), "-");
3060 }
3061 }
3062 }
3063 }
3064}
3065
3066/** outputs cutselector statistics
3067 *
3068 * Filtered = ViaPoolAdd(Separators) + DirectAdd(Separators) - Selected - Cuts(Constraints)
3069 * Selected = Applied(Separators) + Applied(Constraints)
3070 *
3071 * @pre This method can be called if SCIP is in one of the following stages:
3072 * - \ref SCIP_STAGE_SOLVING
3073 * - \ref SCIP_STAGE_SOLVED
3074 */
3076 SCIP* scip, /**< SCIP data structure */
3077 FILE* file /**< output file */
3078 )
3079{
3080 int i;
3081
3082 assert(scip != NULL);
3083 assert(scip->set != NULL);
3084
3085 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPprintCutselectorStatistics", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
3086
3087 SCIPmessageFPrintInfo(scip->messagehdlr, file, "Cutselectors : ExecTime SetupTime Calls RootCalls Selected Forced Filtered RootSelec RootForc RootFilt \n");
3088
3089 /* sort cutsels w.r.t. their priority */
3091
3092 for( i = 0; i < scip->set->ncutsels; ++i )
3093 {
3094 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",
3095 SCIPcutselGetName(scip->set->cutsels[i]),
3096 SCIPcutselGetTime(scip->set->cutsels[i]),
3097 SCIPcutselGetSetupTime(scip->set->cutsels[i]),
3098 SCIPcutselGetNCalls(scip->set->cutsels[i]),
3099 SCIPcutselGetNRootCalls(scip->set->cutsels[i]),
3100 SCIPcutselGetNRootCuts(scip->set->cutsels[i]) + SCIPcutselGetNLocalCuts(scip->set->cutsels[i]),
3101 SCIPcutselGetNRootForcedCuts(scip->set->cutsels[i]) + SCIPcutselGetNLocalForcedCuts(scip->set->cutsels[i]),
3102 SCIPcutselGetNRootCutsFiltered(scip->set->cutsels[i]) + SCIPcutselGetNLocalCutsFiltered(scip->set->cutsels[i]),
3103 SCIPcutselGetNRootCuts(scip->set->cutsels[i]),
3104 SCIPcutselGetNRootForcedCuts(scip->set->cutsels[i]),
3105 SCIPcutselGetNRootCutsFiltered(scip->set->cutsels[i])
3106 );
3107 }
3108}
3109
3110/** outputs pricer statistics
3111 *
3112 * @pre This method can be called if SCIP is in one of the following stages:
3113 * - \ref SCIP_STAGE_SOLVING
3114 * - \ref SCIP_STAGE_SOLVED
3115 */
3117 SCIP* scip, /**< SCIP data structure */
3118 FILE* file /**< output file */
3119 )
3120{
3121 int i;
3122
3123 assert(scip != NULL);
3124 assert(scip->set != NULL);
3125
3126 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPprintPricerStatistics", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
3127
3128 SCIPmessageFPrintInfo(scip->messagehdlr, file, "Pricers : ExecTime SetupTime Calls Vars\n");
3129 SCIPmessageFPrintInfo(scip->messagehdlr, file, " problem variables: %10.2f - %10d %10d\n",
3133
3134 /* sort pricers w.r.t. their name */
3136
3137 for( i = 0; i < scip->set->nactivepricers; ++i )
3138 {
3139 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %-17.17s: %10.2f %10.2f %10d %10d\n",
3140 SCIPpricerGetName(scip->set->pricers[i]),
3141 SCIPpricerGetTime(scip->set->pricers[i]),
3142 SCIPpricerGetSetupTime(scip->set->pricers[i]),
3143 SCIPpricerGetNCalls(scip->set->pricers[i]),
3144 SCIPpricerGetNVarsFound(scip->set->pricers[i]));
3145 }
3146}
3147
3148/** outputs branching rule statistics
3149 *
3150 * @pre This method can be called if SCIP is in one of the following stages:
3151 * - \ref SCIP_STAGE_SOLVING
3152 * - \ref SCIP_STAGE_SOLVED
3153 */
3155 SCIP* scip, /**< SCIP data structure */
3156 FILE* file /**< output file */
3157 )
3158{
3159 int i;
3160
3161 assert(scip != NULL);
3162 assert(scip->set != NULL);
3163
3164 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPprintBranchruleStatistics", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
3165
3166 SCIPmessageFPrintInfo(scip->messagehdlr, file, "Branching Rules : ExecTime SetupTime BranchLP BranchExt BranchPS Cutoffs DomReds Cuts Conss Children\n");
3167
3168 /* sort branching rules w.r.t. their name */
3170
3171 for( i = 0; i < scip->set->nbranchrules; ++i )
3172 {
3173 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",
3174 SCIPbranchruleGetName(scip->set->branchrules[i]),
3175 SCIPbranchruleGetTime(scip->set->branchrules[i]),
3176 SCIPbranchruleGetSetupTime(scip->set->branchrules[i]),
3177 SCIPbranchruleGetNLPCalls(scip->set->branchrules[i]),
3178 SCIPbranchruleGetNExternCalls(scip->set->branchrules[i]),
3179 SCIPbranchruleGetNPseudoCalls(scip->set->branchrules[i]),
3180 SCIPbranchruleGetNCutoffs(scip->set->branchrules[i]),
3181 SCIPbranchruleGetNDomredsFound(scip->set->branchrules[i]),
3182 SCIPbranchruleGetNCutsFound(scip->set->branchrules[i]),
3183 SCIPbranchruleGetNConssFound(scip->set->branchrules[i]),
3184 SCIPbranchruleGetNChildren(scip->set->branchrules[i]));
3185 }
3186}
3187
3188/** outputs heuristics statistics
3189 *
3190 * @pre This method can be called if SCIP is in one of the following stages:
3191 * - \ref SCIP_STAGE_PRESOLVING
3192 * - \ref SCIP_STAGE_EXITPRESOLVE
3193 * - \ref SCIP_STAGE_PRESOLVED
3194 * - \ref SCIP_STAGE_SOLVING
3195 * - \ref SCIP_STAGE_SOLVED
3196 */
3198 SCIP* scip, /**< SCIP data structure */
3199 FILE* file /**< output file */
3200 )
3201{
3202 int ndivesets = 0;
3203 int i;
3204
3205 assert(scip != NULL);
3206 assert(scip->set != NULL);
3207 assert(scip->tree != NULL);
3208
3209 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPprintHeuristicStatistics", FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
3210
3211 SCIPmessageFPrintInfo(scip->messagehdlr, file, "Primal Heuristics : ExecTime SetupTime Calls Found Best\n");
3212 SCIPmessageFPrintInfo(scip->messagehdlr, file, " LP solutions : %10.2f - - %10" SCIP_LONGINT_FORMAT " %10" SCIP_LONGINT_FORMAT "\n",
3213 SCIPclockGetTime(scip->stat->lpsoltime),
3214 scip->stat->nlpsolsfound, scip->stat->nlpbestsolsfound);
3215 SCIPmessageFPrintInfo(scip->messagehdlr, file, " relax solutions : %10.2f - - %10" SCIP_LONGINT_FORMAT " %10" SCIP_LONGINT_FORMAT "\n",
3216 SCIPclockGetTime(scip->stat->relaxsoltime),
3217 scip->stat->nrelaxsolsfound, scip->stat->nrelaxbestsolsfound);
3218 SCIPmessageFPrintInfo(scip->messagehdlr, file, " pseudo solutions : %10.2f - - %10" SCIP_LONGINT_FORMAT " %10" SCIP_LONGINT_FORMAT "\n",
3219 SCIPclockGetTime(scip->stat->pseudosoltime),
3220 scip->stat->npssolsfound, scip->stat->npsbestsolsfound);
3221 SCIPmessageFPrintInfo(scip->messagehdlr, file, " strong branching : %10.2f - - %10" SCIP_LONGINT_FORMAT " %10" SCIP_LONGINT_FORMAT "\n",
3222 SCIPclockGetTime(scip->stat->sbsoltime),
3223 scip->stat->nsbsolsfound, scip->stat->nsbbestsolsfound);
3224
3225 /* sort heuristics w.r.t. their names */
3227
3228 for( i = 0; i < scip->set->nheurs; ++i )
3229 {
3230 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %-17.17s: %10.2f %10.2f %10" SCIP_LONGINT_FORMAT " %10" SCIP_LONGINT_FORMAT " %10" SCIP_LONGINT_FORMAT "\n",
3231 SCIPheurGetName(scip->set->heurs[i]),
3232 SCIPheurGetTime(scip->set->heurs[i]),
3233 SCIPheurGetSetupTime(scip->set->heurs[i]),
3234 SCIPheurGetNCalls(scip->set->heurs[i]),
3235 SCIPheurGetNSolsFound(scip->set->heurs[i]),
3236 SCIPheurGetNBestSolsFound(scip->set->heurs[i]));
3237
3238 /* count heuristics that use diving; needed to determine output later */
3239 ndivesets += SCIPheurGetNDivesets(scip->set->heurs[i]);
3240 }
3241
3242 SCIPmessageFPrintInfo(scip->messagehdlr, file, " other solutions : - - - %10" SCIP_LONGINT_FORMAT " -\n",
3243 scip->stat->nexternalsolsfound);
3244
3245 if ( ndivesets > 0 && scip->set->misc_showdivingstats )
3246 {
3247 int c;
3249
3250 /* print statistics for all three contexts individually */
3251 for( c = 0; c < 3; ++c )
3252 {
3253 SCIP_DIVECONTEXT divecontext = divecontexts[c];
3254
3255 if( divecontext == SCIP_DIVECONTEXT_SINGLE )
3256 {
3257 SCIPmessageFPrintInfo(scip->messagehdlr, file,
3258 "Diving %-12s: Calls Nodes LP Iters Backtracks Conflicts MinDepth MaxDepth AvgDepth RoundSols NLeafSols MinSolDpt MaxSolDpt AvgSolDpt\n", "(single)");
3259 }
3260 else
3261 {
3262 SCIPmessageFPrintInfo(scip->messagehdlr, file,
3263 "Diving %-12s: Calls Nodes LP Iters Backtracks Conflicts MinDepth MaxDepth AvgDepth RoundSols NLeafSols MinSolDpt MaxSolDpt AvgSolDpt\n",
3264 divecontext == SCIP_DIVECONTEXT_ADAPTIVE ? "(adaptive)" : "(scheduler)");
3265 }
3266
3267 for( i = 0; i < scip->set->nheurs; ++i )
3268 {
3269 int s;
3270 for( s = 0; s < SCIPheurGetNDivesets(scip->set->heurs[i]); ++s )
3271 {
3272 SCIP_DIVESET* diveset = SCIPheurGetDivesets(scip->set->heurs[i])[s];
3273
3274 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %-17.17s: %10d",
3275 SCIPdivesetGetName(diveset),
3276 SCIPdivesetGetNCalls(diveset, divecontext));
3277 if( SCIPdivesetGetNCalls(diveset, divecontext) > 0 )
3278 {
3279 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,
3280 SCIPdivesetGetNProbingNodes(diveset, divecontext),
3281 SCIPdivesetGetNLPIterations(diveset, divecontext),
3282 SCIPdivesetGetNBacktracks(diveset, divecontext),
3283 SCIPdivesetGetNConflicts(diveset, divecontext),
3284 SCIPdivesetGetMinDepth(diveset, divecontext),
3285 SCIPdivesetGetMaxDepth(diveset, divecontext),
3286 SCIPdivesetGetAvgDepth(diveset, divecontext),
3287 SCIPdivesetGetNSols(diveset, divecontext) - SCIPdivesetGetNSolutionCalls(diveset, divecontext));
3288
3289 if( SCIPdivesetGetNSolutionCalls(diveset, divecontext) > 0 )
3290 {
3291 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %10d %10d %10d %10.1f\n",
3292 SCIPdivesetGetNSolutionCalls(diveset, divecontext),
3293 SCIPdivesetGetMinSolutionDepth(diveset, divecontext),
3294 SCIPdivesetGetMaxSolutionDepth(diveset, divecontext),
3295 SCIPdivesetGetAvgSolutionDepth(diveset, divecontext));
3296 }
3297 else
3298 SCIPmessageFPrintInfo(scip->messagehdlr, file, " - - - -\n");
3299 }
3300 else
3301 SCIPmessageFPrintInfo(scip->messagehdlr, file, " - - - - - - - - - - - -\n");
3302 }
3303 }
3304 }
3305 }
3306}
3307
3308/** outputs compression statistics
3309 *
3310 * @pre This method can be called if SCIP is in one of the following stages:
3311 * - \ref SCIP_STAGE_PRESOLVING
3312 * - \ref SCIP_STAGE_EXITPRESOLVE
3313 * - \ref SCIP_STAGE_PRESOLVED
3314 * - \ref SCIP_STAGE_SOLVING
3315 * - \ref SCIP_STAGE_SOLVED
3316 */
3318 SCIP* scip, /**< SCIP data structure */
3319 FILE* file /**< output file */
3320 )
3321{
3322 int i;
3323
3324 assert(scip != NULL);
3325
3326 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPprintCompressionStatistics", FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
3327
3328 /* only print compression statistics if tree reoptimization is enabled */
3329 if( !scip->set->reopt_enable )
3330 return;
3331
3332 SCIPmessageFPrintInfo(scip->messagehdlr, file, "Tree Compressions : ExecTime SetupTime Calls Found\n");
3333
3334 /* sort compressions w.r.t. their names */
3336
3337 for( i = 0; i < scip->set->ncomprs; ++i )
3338 {
3339 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %-17.17s: %10.2f %10.2f %10" SCIP_LONGINT_FORMAT " %10" SCIP_LONGINT_FORMAT "\n",
3340 SCIPcomprGetName(scip->set->comprs[i]),
3341 SCIPcomprGetTime(scip->set->comprs[i]),
3342 SCIPcomprGetSetupTime(scip->set->comprs[i]),
3343 SCIPcomprGetNCalls(scip->set->comprs[i]),
3344 SCIPcomprGetNFound(scip->set->comprs[i]));
3345 }
3346}
3347
3348/** outputs LP statistics
3349 *
3350 * @pre This method can be called if SCIP is in one of the following stages:
3351 * - \ref SCIP_STAGE_SOLVING
3352 * - \ref SCIP_STAGE_SOLVED
3353 */
3355 SCIP* scip, /**< SCIP data structure */
3356 FILE* file /**< output file */
3357 )
3358{
3359 assert(scip != NULL);
3360 assert(scip->stat != NULL);
3361 assert(scip->lp != NULL);
3362
3364
3365 SCIPmessageFPrintInfo(scip->messagehdlr, file, "LP : Time Calls Iterations Iter/call Iter/sec Time-0-It Calls-0-It ItLimit\n");
3366
3367 SCIPmessageFPrintInfo(scip->messagehdlr, file, " primal LP : %10.2f %10" SCIP_LONGINT_FORMAT " %10" SCIP_LONGINT_FORMAT " %10.2f",
3368 SCIPclockGetTime(scip->stat->primallptime),
3369 scip->stat->nprimallps + scip->stat->nprimalzeroitlps,
3370 scip->stat->nprimallpiterations,
3371 scip->stat->nprimallps > 0 ? (SCIP_Real)scip->stat->nprimallpiterations/(SCIP_Real)scip->stat->nprimallps : 0.0);
3372 if( SCIPclockGetTime(scip->stat->primallptime) >= 0.01 )
3373 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %10.2f", (SCIP_Real)scip->stat->nprimallpiterations/SCIPclockGetTime(scip->stat->primallptime));
3374 else
3375 SCIPmessageFPrintInfo(scip->messagehdlr, file, " -");
3376 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %10.2f %10" SCIP_LONGINT_FORMAT "\n",
3377 scip->stat->primalzeroittime,
3378 scip->stat->nprimalzeroitlps);
3379
3380 SCIPmessageFPrintInfo(scip->messagehdlr, file, " dual LP : %10.2f %10" SCIP_LONGINT_FORMAT " %10" SCIP_LONGINT_FORMAT " %10.2f",
3381 SCIPclockGetTime(scip->stat->duallptime),
3382 scip->stat->nduallps + scip->stat->ndualzeroitlps,
3383 scip->stat->nduallpiterations,
3384 scip->stat->nduallps > 0 ? (SCIP_Real)scip->stat->nduallpiterations/(SCIP_Real)scip->stat->nduallps : 0.0);
3385 if( SCIPclockGetTime(scip->stat->duallptime) >= 0.01 )
3386 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %10.2f", (SCIP_Real)scip->stat->nduallpiterations/SCIPclockGetTime(scip->stat->duallptime));
3387 else
3388 SCIPmessageFPrintInfo(scip->messagehdlr, file, " -");
3389 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %10.2f %10" SCIP_LONGINT_FORMAT "\n",
3390 scip->stat->dualzeroittime,
3391 scip->stat->ndualzeroitlps);
3392
3393 SCIPmessageFPrintInfo(scip->messagehdlr, file, " lex dual LP : %10.2f %10" SCIP_LONGINT_FORMAT " %10" SCIP_LONGINT_FORMAT " %10.2f",
3394 SCIPclockGetTime(scip->stat->lexduallptime),
3395 scip->stat->nlexduallps,
3396 scip->stat->nlexduallpiterations,
3397 scip->stat->nlexduallps > 0 ? (SCIP_Real)scip->stat->nlexduallpiterations/(SCIP_Real)scip->stat->nlexduallps : 0.0);
3398 if( SCIPclockGetTime(scip->stat->lexduallptime) >= 0.01 )
3399 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %10.2f\n", (SCIP_Real)scip->stat->nlexduallpiterations/SCIPclockGetTime(scip->stat->lexduallptime));
3400 else
3401 SCIPmessageFPrintInfo(scip->messagehdlr, file, " -\n");
3402
3403 SCIPmessageFPrintInfo(scip->messagehdlr, file, " barrier LP : %10.2f %10" SCIP_LONGINT_FORMAT " %10" SCIP_LONGINT_FORMAT " %10.2f",
3404 SCIPclockGetTime(scip->stat->barrierlptime),
3405 scip->stat->nbarrierlps,
3406 scip->stat->nbarrierlpiterations,
3407 scip->stat->nbarrierlps > 0 ? (SCIP_Real)scip->stat->nbarrierlpiterations/(SCIP_Real)scip->stat->nbarrierlps : 0.0);
3408 if( SCIPclockGetTime(scip->stat->barrierlptime) >= 0.01 )
3409 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %10.2f", (SCIP_Real)scip->stat->nbarrierlpiterations/SCIPclockGetTime(scip->stat->barrierlptime));
3410 else
3411 SCIPmessageFPrintInfo(scip->messagehdlr, file, " -");
3412 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %10.2f %10" SCIP_LONGINT_FORMAT "\n",
3413 scip->stat->barrierzeroittime,
3414 scip->stat->nbarrierzeroitlps);
3415
3416 SCIPmessageFPrintInfo(scip->messagehdlr, file, " resolve instable : %10.2f %10" SCIP_LONGINT_FORMAT " %10" SCIP_LONGINT_FORMAT " %10.2f",
3417 SCIPclockGetTime(scip->stat->resolveinstablelptime),
3418 scip->stat->nresolveinstablelps,
3419 scip->stat->nresolveinstablelpiters,
3420 scip->stat->nresolveinstablelps > 0 ? (SCIP_Real)scip->stat->nresolveinstablelpiters/(SCIP_Real)scip->stat->nresolveinstablelps : 0.0);
3421 if( SCIPclockGetTime(scip->stat->resolveinstablelptime) >= 0.01 )
3422 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %10.2f\n", (SCIP_Real)scip->stat->nresolveinstablelpiters/SCIPclockGetTime(scip->stat->resolveinstablelptime));
3423 else
3424 SCIPmessageFPrintInfo(scip->messagehdlr, file, " -\n");
3425
3426 SCIPmessageFPrintInfo(scip->messagehdlr, file, " diving/probing LP: %10.2f %10" SCIP_LONGINT_FORMAT " %10" SCIP_LONGINT_FORMAT " %10.2f",
3427 SCIPclockGetTime(scip->stat->divinglptime),
3428 scip->stat->ndivinglps,
3429 scip->stat->ndivinglpiterations,
3430 scip->stat->ndivinglps > 0 ? (SCIP_Real)scip->stat->ndivinglpiterations/(SCIP_Real)scip->stat->ndivinglps : 0.0);
3431 if( SCIPclockGetTime(scip->stat->divinglptime) >= 0.01 )
3432 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %10.2f\n", (SCIP_Real)scip->stat->ndivinglpiterations/SCIPclockGetTime(scip->stat->divinglptime));
3433 else
3434 SCIPmessageFPrintInfo(scip->messagehdlr, file, " -\n");
3435
3436 SCIPmessageFPrintInfo(scip->messagehdlr, file, " strong branching : %10.2f %10" SCIP_LONGINT_FORMAT " %10" SCIP_LONGINT_FORMAT " %10.2f",
3437 SCIPclockGetTime(scip->stat->strongbranchtime),
3438 scip->stat->nstrongbranchs,
3439 scip->stat->nsblpiterations,
3440 scip->stat->nstrongbranchs > 0 ? (SCIP_Real)scip->stat->nsblpiterations/(SCIP_Real)scip->stat->nstrongbranchs : 0.0);
3441 if( SCIPclockGetTime(scip->stat->strongbranchtime) >= 0.01 )
3442 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %10.2f", (SCIP_Real)scip->stat->nsblpiterations/SCIPclockGetTime(scip->stat->strongbranchtime));
3443 else
3444 SCIPmessageFPrintInfo(scip->messagehdlr, file, " -");
3445 SCIPmessageFPrintInfo(scip->messagehdlr, file, " - - %10" SCIP_LONGINT_FORMAT "\n", scip->stat->nsbtimesiterlimhit);
3446
3447 SCIPmessageFPrintInfo(scip->messagehdlr, file, " (at root node) : - %10" SCIP_LONGINT_FORMAT " %10" SCIP_LONGINT_FORMAT " %10.2f -\n",
3448 scip->stat->nrootstrongbranchs,
3449 scip->stat->nrootsblpiterations,
3450 scip->stat->nrootstrongbranchs > 0
3451 ? (SCIP_Real)scip->stat->nrootsblpiterations/(SCIP_Real)scip->stat->nrootstrongbranchs : 0.0);
3452
3453 SCIPmessageFPrintInfo(scip->messagehdlr, file, " conflict analysis: %10.2f %10" SCIP_LONGINT_FORMAT " %10" SCIP_LONGINT_FORMAT " %10.2f",
3454 SCIPclockGetTime(scip->stat->conflictlptime),
3455 scip->stat->nconflictlps,
3456 scip->stat->nconflictlpiterations,
3457 scip->stat->nconflictlps > 0 ? (SCIP_Real)scip->stat->nconflictlpiterations/(SCIP_Real)scip->stat->nconflictlps : 0.0);
3458 if( SCIPclockGetTime(scip->stat->conflictlptime) >= 0.01 )
3459 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %10.2f\n", (SCIP_Real)scip->stat->nconflictlpiterations/SCIPclockGetTime(scip->stat->conflictlptime));
3460 else
3461 SCIPmessageFPrintInfo(scip->messagehdlr, file, " -\n");
3462}
3463
3464/** outputs NLP statistics
3465 *
3466 * @pre This method can be called if SCIP is in one of the following stages:
3467 * - \ref SCIP_STAGE_SOLVING
3468 * - \ref SCIP_STAGE_SOLVED
3469 */
3471 SCIP* scip, /**< SCIP data structure */
3472 FILE* file /**< output file */
3473 )
3474{
3475 int nnlrowlinear;
3476 int nnlrowconvexineq;
3477 int nnlrownonconvexineq;
3478 int nnlrownonlineareq;
3479
3480 assert(scip != NULL);
3481 assert(scip->stat != NULL);
3482
3484
3485 if( scip->nlp == NULL )
3486 return;
3487
3488 SCIPmessageFPrintInfo(scip->messagehdlr, file, "NLP relaxation :\n");
3489
3490 SCIPmessageFPrintInfo(scip->messagehdlr, file, " solve time : %10.2f (%" SCIP_LONGINT_FORMAT " calls)\n",
3491 SCIPclockGetTime(scip->stat->nlpsoltime),
3492 scip->stat->nnlps);
3493
3494 SCIP_CALL_ABORT( SCIPgetNLPNlRowsStat(scip, &nnlrowlinear, &nnlrowconvexineq, &nnlrownonconvexineq, &nnlrownonlineareq) );
3495 SCIPmessageFPrintInfo(scip->messagehdlr, file, " convexity : %10s (%d linear rows, %d convex ineq., %d nonconvex ineq., %d nonlinear eq. or two-sided ineq.)\n",
3496 (nnlrownonconvexineq == 0 && nnlrownonlineareq == 0) ? "convex" : "nonconvex",
3497 nnlrowlinear, nnlrowconvexineq, nnlrownonconvexineq, nnlrownonlineareq);
3498}
3499
3500/** outputs relaxator statistics
3501 *
3502 * @pre This method can be called if SCIP is in one of the following stages:
3503 * - \ref SCIP_STAGE_SOLVING
3504 * - \ref SCIP_STAGE_SOLVED
3505 */
3507 SCIP* scip, /**< SCIP data structure */
3508 FILE* file /**< output file */
3509 )
3510{
3511 int i;
3512
3513 assert(scip != NULL);
3514 assert(scip->set != NULL);
3515
3516 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPprintRelaxatorStatistics", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
3517
3518 if( scip->set->nrelaxs == 0 )
3519 return;
3520
3521 SCIPmessageFPrintInfo(scip->messagehdlr, file, "Relaxators : Time Calls Cutoffs ImprBounds ImprTime ReducedDom Separated AddedConss\n");
3522
3523 /* sort relaxators w.r.t. their name */
3525
3526 for( i = 0; i < scip->set->nrelaxs; ++i )
3527 {
3528 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",
3529 SCIPrelaxGetName(scip->set->relaxs[i]),
3530 SCIPrelaxGetTime(scip->set->relaxs[i]),
3531 SCIPrelaxGetNCalls(scip->set->relaxs[i]),
3532 SCIPrelaxGetNCutoffs(scip->set->relaxs[i]),
3533 SCIPrelaxGetNImprovedLowerbound(scip->set->relaxs[i]),
3535 SCIPrelaxGetNReducedDomains(scip->set->relaxs[i]),
3536 SCIPrelaxGetNSeparatedCuts(scip->set->relaxs[i]),
3537 SCIPrelaxGetNAddedConss(scip->set->relaxs[i])
3538 );
3539 }
3540}
3541
3542/** outputs tree statistics
3543 *
3544 * @pre This method can be called if SCIP is in one of the following stages:
3545 * - \ref SCIP_STAGE_SOLVING
3546 * - \ref SCIP_STAGE_SOLVED
3547 */
3549 SCIP* scip, /**< SCIP data structure */
3550 FILE* file /**< output file */
3551 )
3552{
3553 assert(scip != NULL);
3554 assert(scip->stat != NULL);
3555 assert(scip->tree != NULL);
3556
3557 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPprintTreeStatistics", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
3558
3559 SCIPmessageFPrintInfo(scip->messagehdlr, file, "B&B Tree :\n");
3560 SCIPmessageFPrintInfo(scip->messagehdlr, file, " number of runs : %10d\n", scip->stat->nruns);
3561 SCIPmessageFPrintInfo(scip->messagehdlr, file,
3562 " nodes : %10" SCIP_LONGINT_FORMAT " (%" SCIP_LONGINT_FORMAT " internal, %" SCIP_LONGINT_FORMAT " leaves)\n",
3563 scip->stat->nnodes, scip->stat->ninternalnodes, scip->stat->nnodes - scip->stat->ninternalnodes );
3564 SCIPmessageFPrintInfo(scip->messagehdlr, file, " feasible leaves : %10" SCIP_LONGINT_FORMAT "\n", scip->stat->nfeasleaves);
3565 SCIPmessageFPrintInfo(scip->messagehdlr, file, " infeas. leaves : %10" SCIP_LONGINT_FORMAT "\n", scip->stat->ninfeasleaves);
3566 SCIPmessageFPrintInfo(scip->messagehdlr, file, " objective leaves : %10" SCIP_LONGINT_FORMAT "\n", scip->stat->nobjleaves);
3567 SCIPmessageFPrintInfo(scip->messagehdlr, file,
3568 " nodes (total) : %10" SCIP_LONGINT_FORMAT " (%" SCIP_LONGINT_FORMAT " internal, %" SCIP_LONGINT_FORMAT " leaves)\n",
3569 scip->stat->ntotalnodes, scip->stat->ntotalinternalnodes, scip->stat->ntotalnodes - scip->stat->ntotalinternalnodes);
3570 SCIPmessageFPrintInfo(scip->messagehdlr, file, " nodes left : %10d\n", SCIPtreeGetNNodes(scip->tree));
3571 SCIPmessageFPrintInfo(scip->messagehdlr, file, " max depth : %10d\n", scip->stat->maxdepth);
3572 SCIPmessageFPrintInfo(scip->messagehdlr, file, " max depth (total): %10d\n", scip->stat->maxtotaldepth);
3573 SCIPmessageFPrintInfo(scip->messagehdlr, file, " backtracks : %10" SCIP_LONGINT_FORMAT " (%.1f%%)\n", scip->stat->nbacktracks,
3574 scip->stat->nnodes > 0 ? 100.0 * (SCIP_Real)scip->stat->nbacktracks / (SCIP_Real)scip->stat->nnodes : 0.0);
3575 SCIPmessageFPrintInfo(scip->messagehdlr, file, " early backtracks : %10" SCIP_LONGINT_FORMAT " (%.1f%%)\n", scip->stat->nearlybacktracks,
3576 scip->stat->nbacktracks > 0 ? 100.0 * (SCIP_Real)scip->stat->nearlybacktracks / (SCIP_Real)scip->stat->nbacktracks : 0.0);
3577 SCIPmessageFPrintInfo(scip->messagehdlr, file, " nodes exc. ref. : %10" SCIP_LONGINT_FORMAT " (%.1f%%)\n", scip->stat->nnodesaboverefbound,
3578 scip->stat->nnodes > 0 ? 100.0 * (SCIP_Real)scip->stat->nnodesaboverefbound / (SCIP_Real)scip->stat->nnodes : 0.0);
3579
3580 SCIPmessageFPrintInfo(scip->messagehdlr, file, " delayed cutoffs : %10" SCIP_LONGINT_FORMAT "\n", scip->stat->ndelayedcutoffs);
3581 SCIPmessageFPrintInfo(scip->messagehdlr, file, " repropagations : %10" SCIP_LONGINT_FORMAT " (%" SCIP_LONGINT_FORMAT " domain reductions, %" SCIP_LONGINT_FORMAT " cutoffs)\n",
3582 scip->stat->nreprops, scip->stat->nrepropboundchgs, scip->stat->nrepropcutoffs);
3583 SCIPmessageFPrintInfo(scip->messagehdlr, file, " avg switch length: %10.2f\n",
3584 scip->stat->nnodes > 0
3585 ? (SCIP_Real)(scip->stat->nactivatednodes + scip->stat->ndeactivatednodes) / (SCIP_Real)scip->stat->nnodes : 0.0);
3586 SCIPmessageFPrintInfo(scip->messagehdlr, file, " switching time : %10.2f\n", SCIPclockGetTime(scip->stat->nodeactivationtime));
3587}
3588
3589/** outputs solution statistics
3590 *
3591 * @pre This method can be called if SCIP is in one of the following stages:
3592 * - \ref SCIP_STAGE_PRESOLVING
3593 * - \ref SCIP_STAGE_EXITPRESOLVE
3594 * - \ref SCIP_STAGE_PRESOLVED
3595 * - \ref SCIP_STAGE_SOLVING
3596 * - \ref SCIP_STAGE_SOLVED
3597 */
3599 SCIP* scip, /**< SCIP data structure */
3600 FILE* file /**< output file */
3601 )
3602{
3603 SCIP_Real primalbound;
3604 SCIP_Real dualbound;
3605 SCIP_Real gap;
3606 SCIP_Real firstprimalbound;
3607 SCIP_Bool objlimitreached;
3608 char limsolstring[SCIP_MAXSTRLEN];
3609
3610 assert(scip != NULL);
3611 assert(scip->stat != NULL);
3612 assert(scip->primal != NULL);
3613
3614 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPprintSolutionStatistics", FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
3615
3616 primalbound = SCIPgetPrimalbound(scip);
3617 dualbound = SCIPgetDualbound(scip);
3618 gap = SCIPgetGap(scip);
3619
3620 /* We output that the objective limit has been reached if the problem has been solved, no solution respecting the
3621 * objective limit has been found (nlimsolsfound == 0) and the primal bound is finite. Note that it still might be
3622 * that the original problem is infeasible, even without the objective limit, i.e., we cannot be sure that we
3623 * actually reached the objective limit. */
3624 objlimitreached = FALSE;
3625 if( SCIPgetStage(scip) == SCIP_STAGE_SOLVED && scip->primal->nlimsolsfound == 0
3627 objlimitreached = TRUE;
3628
3629 if( scip->primal->nsolsfound != scip->primal->nlimsolsfound )
3630 (void) SCIPsnprintf(limsolstring, SCIP_MAXSTRLEN, ", %" SCIP_LONGINT_FORMAT " respecting the objective limit", scip->primal->nlimsolsfound);
3631 else
3632 limsolstring[0] = '\0';
3633
3634 SCIPmessageFPrintInfo(scip->messagehdlr, file, "Solution :\n");
3635 SCIPmessageFPrintInfo(scip->messagehdlr, file, " Solutions found : %10" SCIP_LONGINT_FORMAT " (%" SCIP_LONGINT_FORMAT " improvements%s)\n",
3636 scip->primal->nsolsfound, scip->primal->nbestsolsfound, limsolstring);
3637
3638 if( SCIPsetIsInfinity(scip->set, REALABS(primalbound)) )
3639 {
3640 if( scip->set->stage == SCIP_STAGE_SOLVED )
3641 {
3642 if( scip->primal->nlimsolsfound == 0 )
3643 {
3645 {
3646 assert(!objlimitreached);
3647 SCIPmessageFPrintInfo(scip->messagehdlr, file, " Primal Bound : infeasible or unbounded\n");
3648 }
3649 else
3650 {
3652 if( objlimitreached )
3653 SCIPmessageFPrintInfo(scip->messagehdlr, file, " Primal Bound : infeasible (objective limit reached)\n");
3654 else
3655 SCIPmessageFPrintInfo(scip->messagehdlr, file, " Primal Bound : infeasible\n");
3656 }
3657 }
3658 else
3659 {
3660 assert(!objlimitreached);
3662 SCIPmessageFPrintInfo(scip->messagehdlr, file, " Primal Bound : unbounded\n");
3663 }
3664 }
3665 else
3666 SCIPmessageFPrintInfo(scip->messagehdlr, file, " Primal Bound : -\n");
3667 }
3668 else
3669 {
3670 if( scip->primal->nlimsolsfound == 0 )
3671 {
3672 SCIPmessageFPrintInfo(scip->messagehdlr, file, " Primal Bound : %+21.14e (objective limit)\n", primalbound);
3673
3674 /* display (best) primal bound */
3675 if( scip->primal->nsolsfound > 0 )
3676 {
3677 SCIP_Real bestsol;
3678 bestsol = SCIPsolGetObj(scip->primal->sols[0], scip->set, scip->transprob, scip->origprob);
3679 bestsol = SCIPretransformObj(scip, bestsol);
3680
3681 SCIPmessageFPrintInfo(scip->messagehdlr, file, " Best Solution : %+21.14e\n", bestsol);
3682 }
3683 }
3684 else
3685 {
3686 /* display first primal bound line */
3687 firstprimalbound = scip->stat->firstprimalbound;
3688 SCIPmessageFPrintInfo(scip->messagehdlr, file, " First Solution : %+21.14e", firstprimalbound);
3689
3690 SCIPmessageFPrintInfo(scip->messagehdlr, file, " (in run %d, after %" SCIP_LONGINT_FORMAT " nodes, %.2f seconds, depth %d, found by <%s>)\n",
3691 scip->stat->nrunsbeforefirst,
3692 scip->stat->nnodesbeforefirst,
3693 scip->stat->firstprimaltime,
3694 scip->stat->firstprimaldepth,
3695 ( scip->stat->firstprimalheur != NULL )
3696 ? ( SCIPheurGetName(scip->stat->firstprimalheur) )
3697 : (( scip->stat->nrunsbeforefirst == 0 ) ? "initial" : "relaxation"));
3698
3699 if( SCIPisInfinity(scip, scip->stat->firstsolgap) )
3700 SCIPmessageFPrintInfo(scip->messagehdlr, file, " Gap First Sol. : infinite\n");
3701 else
3702 SCIPmessageFPrintInfo(scip->messagehdlr, file, " Gap First Sol. : %10.2f %%\n", 100.0 * scip->stat->firstsolgap);
3703
3704 if( SCIPisInfinity(scip, scip->stat->lastsolgap) )
3705 SCIPmessageFPrintInfo(scip->messagehdlr, file, " Gap Last Sol. : infinite\n");
3706 else
3707 SCIPmessageFPrintInfo(scip->messagehdlr, file, " Gap Last Sol. : %10.2f %%\n", 100.0 * scip->stat->lastsolgap);
3708
3709 SCIPmessageFPrintInfo(scip->messagehdlr, file, " Primal Bound : %+21.14e", primalbound);
3710
3711 SCIPmessageFPrintInfo(scip->messagehdlr, file, " (in run %d, after %" SCIP_LONGINT_FORMAT " nodes, %.2f seconds, depth %d, found by <%s>)\n",
3712 SCIPsolGetRunnum(scip->primal->sols[0]),
3713 SCIPsolGetNodenum(scip->primal->sols[0]),
3714 SCIPsolGetTime(scip->primal->sols[0]),
3715 SCIPsolGetDepth(scip->primal->sols[0]),
3716 SCIPsolGetHeur(scip->primal->sols[0]) != NULL
3717 ? SCIPheurGetName(SCIPsolGetHeur(scip->primal->sols[0]))
3718 : (SCIPsolGetRunnum(scip->primal->sols[0]) == 0 ? "initial" : "relaxation"));
3719 }
3720 }
3721
3722 if( SCIPsetIsInfinity(scip->set, REALABS(dualbound)) )
3723 SCIPmessageFPrintInfo(scip->messagehdlr, file, " Dual Bound : -\n");
3724 else
3725 SCIPmessageFPrintInfo(scip->messagehdlr, file, " Dual Bound : %+21.14e\n", dualbound);
3726
3727 if( SCIPsetIsInfinity(scip->set, gap) )
3728 SCIPmessageFPrintInfo(scip->messagehdlr, file, " Gap : infinite\n");
3729 else
3730 SCIPmessageFPrintInfo(scip->messagehdlr, file, " Gap : %10.2f %%\n", 100.0 * gap);
3731
3732 if( scip->set->misc_calcintegral )
3733 {
3734 int s;
3735 const char* names[] = {
3736 "primal-dual",
3737 "primal-ref",
3738 "dual-ref"
3739 };
3740 SCIPmessageFPrintInfo(scip->messagehdlr, file, "Integrals : Total Avg%%\n");
3741 if( SCIPgetStatus(scip) == SCIP_STATUS_INFEASIBLE && ! objlimitreached )
3742 {
3743 for( s = 0; s < 3; ++s )
3744 {
3745 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %-17s: %10s %10s (problem infeasible)\n",
3746 names[s], "-", "-");
3747 }
3748 }
3749 else
3750 {
3751 SCIP_Real integrals[3];
3752 SCIP_Real solvingtime = SCIPgetSolvingTime(scip);
3753
3754 if( !SCIPisFeasZero(scip, solvingtime) )
3755 {
3756 integrals[0] = SCIPstatGetPrimalDualIntegral(scip->stat, scip->set, scip->transprob, scip->origprob, TRUE);
3757
3758 if( scip->set->misc_referencevalue != SCIP_INVALID ) /*lint !e777*/
3759 {
3760 integrals[1] = SCIPstatGetPrimalReferenceIntegral(scip->stat, scip->set, scip->transprob, scip->origprob, FALSE);
3761 integrals[2] = SCIPstatGetDualReferenceIntegral(scip->stat, scip->set, scip->transprob, scip->origprob, FALSE);
3762 }
3763 else
3764 integrals[1] = integrals[2] = SCIP_INVALID;
3765 }
3766 else
3767 {
3768 BMSclearMemoryArray(integrals, 3);
3769 }
3770
3771 /* print integrals, if computed */
3772 for( s = 0; s < 3; ++s )
3773 {
3774 if( integrals[s] == SCIP_INVALID ) /*lint !e777*/
3775 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %-17s: - - (not evaluated)\n", names[s]);
3776 else
3777 {
3778 SCIP_Real avg = integrals[s] / MAX(solvingtime,1e-6);
3779
3780 /* caution: this assert is non-deterministic since it depends on the solving time */
3781 assert(0.0 <= avg && SCIPisLE(scip, avg, 100.0));
3782 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %-17s: %10.2f %10.2f\n", names[s], integrals[s], avg);
3783 }
3784 }
3785 }
3786 }
3787}
3788
3789/** outputs concurrent solver statistics
3790 *
3791 * @pre This method can be called if SCIP is in one of the following stages:
3792 * - \ref SCIP_STAGE_TRANSFORMED
3793 * - \ref SCIP_STAGE_INITPRESOLVE
3794 * - \ref SCIP_STAGE_PRESOLVING
3795 * - \ref SCIP_STAGE_EXITPRESOLVE
3796 * - \ref SCIP_STAGE_PRESOLVED
3797 * - \ref SCIP_STAGE_SOLVING
3798 * - \ref SCIP_STAGE_SOLVED
3799 */
3801 SCIP* scip, /**< SCIP data structure */
3802 FILE* file /**< output file */
3803 )
3804{
3805 SCIP_CONCSOLVER** concsolvers;
3806 int nconcsolvers;
3807 int i;
3808 int winner;
3809
3810 assert(scip != NULL);
3811 assert(scip->set != NULL);
3812
3813 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPprintConcsolverStatistics", FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
3814
3815 if( !SCIPsyncstoreIsInitialized(scip->syncstore) )
3816 return;
3817
3818 nconcsolvers = SCIPgetNConcurrentSolvers(scip);
3819 concsolvers = SCIPgetConcurrentSolvers(scip);
3820 winner = SCIPsyncstoreGetWinner(scip->syncstore);
3821
3822 if( nconcsolvers > 0 )
3823 {
3824 SCIPmessageFPrintInfo(scip->messagehdlr, file, "Concurrent Solvers : SolvingTime SyncTime Nodes LP Iters SolsShared SolsRecvd TighterBnds TighterIntBnds\n");
3825 for( i = 0; i < nconcsolvers; ++i )
3826 {
3827 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",
3828 winner == i ? '*' : ' ',
3829 SCIPconcsolverGetName(concsolvers[i]),
3830 SCIPconcsolverGetSolvingTime(concsolvers[i]),
3831 SCIPconcsolverGetSyncTime(concsolvers[i]),
3832 SCIPconcsolverGetNNodes(concsolvers[i]),
3833 SCIPconcsolverGetNLPIterations(concsolvers[i]),
3834 SCIPconcsolverGetNSolsShared(concsolvers[i]),
3835 SCIPconcsolverGetNSolsRecvd(concsolvers[i]),
3836 SCIPconcsolverGetNTighterBnds(concsolvers[i]),
3837 SCIPconcsolverGetNTighterIntBnds(concsolvers[i])
3838 );
3839 }
3840 }
3841}
3842
3843/** display Benders' decomposition statistics */
3845 SCIP* scip, /**< SCIP data structure */
3846 FILE* file /**< output file */
3847 )
3848{
3849 SCIP_BENDERS** benders;
3850 int nbenders;
3851 int i;
3852
3853 assert(scip != NULL);
3854 assert(scip->set != NULL);
3855
3856 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPprintBendersStatistics", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
3857
3858 if( SCIPgetNActiveBenders(scip) == 0 )
3859 return;
3860
3861 nbenders = SCIPgetNBenders(scip);
3862 benders = SCIPgetBenders(scip);
3863
3864 SCIPmessageFPrintInfo(scip->messagehdlr, file, "Benders Decomp : ExecTime SetupTime Calls Found Transfer StrCalls StrFails StrCuts\n");
3865 for( i = 0; i < nbenders; ++i )
3866 {
3867 if( SCIPbendersIsActive(benders[i]) )
3868 {
3869 SCIP_BENDERSCUT** benderscuts;
3870 int nbenderscuts;
3871 int j;
3872
3873 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %-17.17s: %10.2f %10.2f %10d %10d %10d %10d %10d %10d\n",
3874 SCIPbendersGetName(scip->set->benders[i]),
3875 SCIPbendersGetTime(scip->set->benders[i]),
3876 SCIPbendersGetSetupTime(scip->set->benders[i]),
3877 SCIPbendersGetNCalls(scip->set->benders[i]),
3878 SCIPbendersGetNCutsFound(scip->set->benders[i]),
3879 SCIPbendersGetNTransferredCuts(scip->set->benders[i]),
3880 SCIPbendersGetNStrengthenCalls(scip->set->benders[i]),
3881 SCIPbendersGetNStrengthenFails(scip->set->benders[i]),
3882 SCIPbendersGetNStrengthenCutsFound(scip->set->benders[i]));
3883
3884 nbenderscuts = SCIPbendersGetNBenderscuts(scip->set->benders[i]);
3885 benderscuts = SCIPbendersGetBenderscuts(scip->set->benders[i]);
3886
3887 for( j = 0; j < nbenderscuts; j++ )
3888 {
3889 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %-15.17s: %10.2f %10.2f %10" SCIP_LONGINT_FORMAT " %10" SCIP_LONGINT_FORMAT " -\n",
3890 SCIPbenderscutGetName(benderscuts[j]),
3891 SCIPbenderscutGetTime(benderscuts[j]),
3892 SCIPbenderscutGetSetupTime(benderscuts[j]),
3893 SCIPbenderscutGetNCalls(benderscuts[j]),
3894 SCIPbenderscutGetNFound(benderscuts[j]));
3895 }
3896 }
3897 }
3898}
3899
3900/** outputs root statistics
3901 *
3902 * @pre This method can be called if SCIP is in one of the following stages:
3903 * - \ref SCIP_STAGE_SOLVING
3904 * - \ref SCIP_STAGE_SOLVED
3905 */
3907 SCIP* scip, /**< SCIP data structure */
3908 FILE* file /**< output file */
3909 )
3910{
3911 SCIP_Real dualboundroot;
3912 SCIP_Real firstdualboundroot;
3913 SCIP_Real firstlptime;
3914 SCIP_Real firstlpspeed;
3915
3916 assert(scip != NULL);
3917 assert(scip->stat != NULL);
3918 assert(scip->primal != NULL);
3919
3920 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPprintRootStatistics", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
3921
3922 dualboundroot = SCIPgetDualboundRoot(scip);
3923 firstdualboundroot = SCIPgetFirstLPDualboundRoot(scip);
3924 firstlptime = SCIPgetFirstLPTime(scip);
3925
3926 if( firstlptime > 0.0 )
3927 firstlpspeed = (SCIP_Real)scip->stat->nrootfirstlpiterations/firstlptime;
3928 else
3929 firstlpspeed = 0.0;
3930
3931 SCIPmessageFPrintInfo(scip->messagehdlr, file, "Root Node :\n");
3932 if( SCIPsetIsInfinity(scip->set, REALABS(firstdualboundroot)) )
3933 SCIPmessageFPrintInfo(scip->messagehdlr, file, " First LP value : -\n");
3934 else
3935 SCIPmessageFPrintInfo(scip->messagehdlr, file, " First LP value : %+21.14e\n", firstdualboundroot);
3936 if( firstlpspeed > 0.0 )
3937 SCIPmessageFPrintInfo(scip->messagehdlr, file, " First LP Iters : %10" SCIP_LONGINT_FORMAT " (%.2f Iter/sec)\n",
3938 scip->stat->nrootfirstlpiterations,
3939 (SCIP_Real)scip->stat->nrootfirstlpiterations/firstlptime);
3940 else
3941 SCIPmessageFPrintInfo(scip->messagehdlr, file, " First LP Iters : %10" SCIP_LONGINT_FORMAT "\n", scip->stat->nrootfirstlpiterations);
3942 SCIPmessageFPrintInfo(scip->messagehdlr, file, " First LP Time : %10.2f\n", firstlptime);
3943
3944 if( SCIPsetIsInfinity(scip->set, REALABS(dualboundroot)) )
3945 SCIPmessageFPrintInfo(scip->messagehdlr, file, " Final Dual Bound : -\n");
3946 else
3947 SCIPmessageFPrintInfo(scip->messagehdlr, file, " Final Dual Bound : %+21.14e\n", dualboundroot);
3948 SCIPmessageFPrintInfo(scip->messagehdlr, file, " Final Root Iters : %10" SCIP_LONGINT_FORMAT "\n", scip->stat->nrootlpiterations);
3949
3950 SCIPmessageFPrintInfo(scip->messagehdlr, file, " Root LP Estimate : ");
3951 if( scip->stat->rootlpbestestimate != SCIP_INVALID ) /*lint !e777*/
3952 {
3953 SCIPmessageFPrintInfo(scip->messagehdlr, file, "%+21.14e\n", SCIPretransformObj(scip, scip->stat->rootlpbestestimate));
3954 }
3955 else
3956 SCIPmessageFPrintInfo(scip->messagehdlr, file, "%21s\n","-");
3957}
3958
3959/** outputs timing statistics
3960 *
3961 * @pre This method can be called if SCIP is in one of the following stages:
3962 * - \ref SCIP_STAGE_PROBLEM
3963 * - \ref SCIP_STAGE_TRANSFORMED
3964 * - \ref SCIP_STAGE_INITPRESOLVE
3965 * - \ref SCIP_STAGE_PRESOLVING
3966 * - \ref SCIP_STAGE_EXITPRESOLVE
3967 * - \ref SCIP_STAGE_PRESOLVED
3968 * - \ref SCIP_STAGE_SOLVING
3969 * - \ref SCIP_STAGE_SOLVED
3970 */
3972 SCIP* scip, /**< SCIP data structure */
3973 FILE* file /**< output file */
3974 )
3975{
3976 SCIP_Real readingtime;
3977
3978 assert(scip != NULL);
3979 assert(scip->set != NULL);
3980
3981 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPprintTimingStatistics", FALSE, TRUE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
3982
3983 readingtime = SCIPgetReadingTime(scip);
3984
3986 {
3987 SCIPmessageFPrintInfo(scip->messagehdlr, file, "Total Time : %10.2f\n", readingtime);
3988 SCIPmessageFPrintInfo(scip->messagehdlr, file, " reading : %10.2f\n", readingtime);
3989 }
3990 else
3991 {
3992 SCIP_Real totaltime;
3993 SCIP_Real solvingtime;
3994
3995 solvingtime = SCIPclockGetTime(scip->stat->solvingtime);
3996
3997 if( scip->set->time_reading )
3998 totaltime = solvingtime;
3999 else
4000 totaltime = solvingtime + readingtime;
4001
4002 SCIPmessageFPrintInfo(scip->messagehdlr, file, "Total Time : %10.2f\n", totaltime);
4003 SCIPmessageFPrintInfo(scip->messagehdlr, file, " solving : %10.2f\n", solvingtime);
4004 SCIPmessageFPrintInfo(scip->messagehdlr, file, " presolving : %10.2f (included in solving)\n", SCIPclockGetTime(scip->stat->presolvingtime));
4005 SCIPmessageFPrintInfo(scip->messagehdlr, file, " reading : %10.2f%s\n", readingtime, scip->set->time_reading ? " (included in solving)" : "");
4006
4007 if( scip->stat->ncopies > 0 )
4008 {
4009 SCIP_Real copytime;
4010
4011 copytime = SCIPclockGetTime(scip->stat->copyclock);
4012
4013 SCIPmessageFPrintInfo(scip->messagehdlr, file, " copying : %10.2f (%d #copies) (minimal %.2f, maximal %.2f, average %.2f)\n",
4014 copytime, scip->stat->ncopies, scip->stat->mincopytime, scip->stat->maxcopytime, copytime / scip->stat->ncopies);
4015 }
4016 else
4017 SCIPmessageFPrintInfo(scip->messagehdlr, file, " copying : %10.2f %s\n", 0.0, "(0 times copied the problem)");
4018 }
4019}
4020
4021/** outputs expression handler statistics
4022 *
4023 * @pre This method can be called if SCIP is in one of the following stages:
4024 * - \ref SCIP_STAGE_PROBLEM
4025 * - \ref SCIP_STAGE_TRANSFORMED
4026 * - \ref SCIP_STAGE_INITPRESOLVE
4027 * - \ref SCIP_STAGE_PRESOLVING
4028 * - \ref SCIP_STAGE_EXITPRESOLVE
4029 * - \ref SCIP_STAGE_PRESOLVED
4030 * - \ref SCIP_STAGE_SOLVING
4031 * - \ref SCIP_STAGE_SOLVED
4032 */
4034 SCIP* scip, /**< SCIP data structure */
4035 FILE* file /**< output file */
4036 )
4037{
4038 SCIP_Bool headerprinted = FALSE;
4039 int i;
4040
4041 assert(scip != NULL);
4042 assert(scip->set != NULL);
4043
4044 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPprintExpressionHandlerStatistics", FALSE, TRUE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
4045
4046 for( i = 0; i < scip->set->nexprhdlrs; ++i )
4047 {
4048 SCIP_EXPRHDLR* exprhdlr = scip->set->exprhdlrs[i];
4049 assert(exprhdlr != NULL);
4050
4051 /* skip unused expression handler */
4052 if( SCIPexprhdlrGetNCreated(exprhdlr) == 0 )
4053 continue;
4054
4055 if( !headerprinted )
4056 {
4057 SCIPmessageFPrintInfo(scip->messagehdlr, file,
4058 "Expressions : %10s %10s %10s %10s %10s %10s %10s %10s %10s %10s %10s %10s\n",
4059 "#IntEval", "IntEvalTi", "#RevProp", "RevPropTi", "DomReds", "Cutoffs", "#Estimate", "EstimTime", "Branching", "#Simplify", "SimplifyTi", "Simplified");
4060 headerprinted = TRUE;
4061 }
4062
4063 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %-17s:", SCIPexprhdlrGetName(exprhdlr));
4064 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %10lld", SCIPexprhdlrGetNIntevalCalls(exprhdlr));
4065 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %10.2f", SCIPexprhdlrGetIntevalTime(exprhdlr));
4066 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %10lld", SCIPexprhdlrGetNReversepropCalls(exprhdlr));
4067 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %10.2f", SCIPexprhdlrGetReversepropTime(exprhdlr));
4068 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %10lld", SCIPexprhdlrGetNDomainReductions(exprhdlr));
4069 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %10lld", SCIPexprhdlrGetNCutoffs(exprhdlr));
4070 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %10lld", SCIPexprhdlrGetNEstimateCalls(exprhdlr));
4071 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %10.2f", SCIPexprhdlrGetEstimateTime(exprhdlr));
4072 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %10lld", SCIPexprhdlrGetNBranchings(exprhdlr));
4073 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %10lld", SCIPexprhdlrGetNSimplifyCalls(exprhdlr));
4074 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %10.2f", SCIPexprhdlrGetSimplifyTime(exprhdlr));
4075 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %10lld", SCIPexprhdlrGetNSimplifications(exprhdlr));
4076 SCIPmessageFPrintInfo(scip->messagehdlr, file, "\n");
4077 }
4078}
4079
4080/** outputs NLPI statistics
4081 *
4082 * @pre This method can be called if SCIP is in one of the following stages:
4083 * - \ref SCIP_STAGE_PROBLEM
4084 * - \ref SCIP_STAGE_TRANSFORMED
4085 * - \ref SCIP_STAGE_INITPRESOLVE
4086 * - \ref SCIP_STAGE_PRESOLVING
4087 * - \ref SCIP_STAGE_EXITPRESOLVE
4088 * - \ref SCIP_STAGE_PRESOLVED
4089 * - \ref SCIP_STAGE_SOLVING
4090 * - \ref SCIP_STAGE_SOLVED
4091 */
4093 SCIP* scip, /**< SCIP data structure */
4094 FILE* file /**< output file */
4095 )
4096{
4097 SCIP_Bool printedheader = FALSE;
4098 int i;
4099
4100 assert(scip != NULL);
4101 assert(scip->set != NULL);
4102
4103 SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPprintNLPIStatistics", FALSE, TRUE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
4104
4105 for( i = 0; i < scip->set->nnlpis; ++i )
4106 {
4107 SCIP_Real solvetime;
4108 SCIP_Real evaltime = 0.0;
4109 SCIP_Longint niter;
4110 SCIP_NLPI* nlpi;
4111 int j;
4112
4113 nlpi = scip->set->nlpis[i];
4114 assert(nlpi != NULL);
4115
4116 /* skip unused NLP solver */
4117 if( SCIPnlpiGetNProblems(nlpi) == 0 )
4118 continue;
4119
4120 if( !printedheader )
4121 {
4122 SCIPmessageFPrintInfo(scip->messagehdlr, file,
4123 "NLP Solvers : %10s %10s %10s %10s %s%10s %10s"
4124 " %10s %10s %10s %10s %10s %10s %10s %10s %10s %10s"
4125 " %10s %10s %10s %10s %10s %10s %10s\n",
4126 "#Problems", "ProblemTi", "#Solves", "SolveTime",
4127 scip->set->time_nlpieval ? " EvalTime%" : "",
4128 "#Iter", "Time/Iter",
4129 "#Okay", "#TimeLimit", "#IterLimit", "#LObjLimit", "#Interrupt", "#NumError", "#EvalError", "#OutOfMem", "#LicenseEr", "#OtherTerm",
4130 "#GlobOpt", "#LocOpt", "#Feasible", "#LocInfeas", "#GlobInfea", "#Unbounded", "#Unknown"
4131 );
4132 printedheader = TRUE;
4133 }
4134
4135 solvetime = SCIPnlpiGetSolveTime(nlpi);
4136 if( scip->set->time_nlpieval )
4137 evaltime = SCIPnlpiGetEvalTime(nlpi);
4138 niter = SCIPnlpiGetNIterations(nlpi);
4139
4140 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %-17s:", SCIPnlpiGetName(nlpi));
4141 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %10d", SCIPnlpiGetNProblems(nlpi));
4142 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %10.2f", SCIPnlpiGetProblemTime(nlpi));
4143 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %10d", SCIPnlpiGetNSolves(nlpi));
4144 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %10.2f", solvetime);
4145 if( scip->set->time_nlpieval )
4146 SCIPmessageFPrintInfo(scip->messagehdlr, file, " %10.2f", solvetime > 0.0 ? 100.0 * evaltime / solvetime : 0.0);
4147