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