Scippy

SCIP

Solving Constraint Integer Programs

scip_debug.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-2020 Konrad-Zuse-Zentrum */
7 /* fuer Informationstechnik Berlin */
8 /* */
9 /* SCIP is distributed under the terms of the ZIB Academic License. */
10 /* */
11 /* You should have received a copy of the ZIB Academic License */
12 /* along with SCIP; see the file COPYING. If not visit scipopt.org. */
13 /* */
14 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
15 
16 /**@file scip_debug.c
17  * @ingroup OTHER_CFILES
18  * @brief public methods for debugging
19  * @author Tobias Achterberg
20  * @author Timo Berthold
21  * @author Gerald Gamrath
22  * @author Leona Gottwald
23  * @author Stefan Heinz
24  * @author Gregor Hendel
25  * @author Thorsten Koch
26  * @author Alexander Martin
27  * @author Marc Pfetsch
28  * @author Michael Winkler
29  * @author Kati Wolter
30  *
31  * @todo check all SCIP_STAGE_* switches, and include the new stages TRANSFORMED and INITSOLVE
32  */
33 
34 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
35 
36 #include "scip/debug.h"
37 #include "scip/pub_message.h"
38 #include "scip/scip_debug.h"
39 
40 /** enable debug solution mechanism
41  *
42  * the debug solution mechanism allows to trace back the invalidation of
43  * a debug solution during the solution process of SCIP. It must be explicitly
44  * enabled for the SCIP data structure.
45  *
46  * @see debug.h for more information on debug solution mechanism
47  */
49  SCIP* scip /**< SCIP data structure */
50  )
51 {
52  SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPenableDebugSol", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE) );
53 
54  SCIPdebugSolEnable(scip);
55 }
56 
57 /** disable solution debugging mechanism
58  *
59  * @see debug.h for more information on debug solution mechanism
60  */
62  SCIP* scip /**< SCIP data structure */
63  )
64 {
65  SCIP_CALL_ABORT( SCIPcheckStage(scip, "SCIPdisableDebugSol", TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE) );
66 
67  SCIPdebugSolDisable(scip);
68 }
#define FALSE
Definition: def.h:73
#define TRUE
Definition: def.h:72
SCIP_RETCODE SCIPcheckStage(SCIP *scip, const char *method, SCIP_Bool init, SCIP_Bool problem, SCIP_Bool transforming, SCIP_Bool transformed, SCIP_Bool initpresolve, SCIP_Bool presolving, SCIP_Bool exitpresolve, SCIP_Bool presolved, SCIP_Bool initsolve, SCIP_Bool solving, SCIP_Bool solved, SCIP_Bool exitsolve, SCIP_Bool freetrans, SCIP_Bool freescip)
Definition: debug.c:2011
void SCIPenableDebugSol(SCIP *scip)
Definition: scip_debug.c:48
methods for debugging
void SCIPdisableDebugSol(SCIP *scip)
Definition: scip_debug.c:61
public methods for debugging
public methods for message output
#define SCIPdebugSolDisable(scip)
Definition: debug.h:260
#define SCIP_CALL_ABORT(x)
Definition: def.h:343
#define SCIPdebugSolEnable(scip)
Definition: debug.h:259