Scippy

SCIP

Solving Constraint Integer Programs

visual.h
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 visual.h
17  * @ingroup INTERNALAPI
18  * @brief methods for creating output for visualization tools (VBC, BAK)
19  * @author Tobias Achterberg
20  * @author Marc Pfetsch
21  */
22 
23 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
24 
25 #ifndef __SCIP_VISUAL_H__
26 #define __SCIP_VISUAL_H__
27 
28 
29 #include "scip/def.h"
30 #include "scip/type_set.h"
31 #include "scip/type_sol.h"
32 #include "scip/type_stat.h"
33 #include "scip/type_tree.h"
34 #include "scip/type_visual.h"
35 
36 #ifdef __cplusplus
37 extern "C" {
38 #endif
39 
40 /** creates visualization data structure */
43  SCIP_VISUAL** visual, /**< pointer to store the visualization information */
44  SCIP_MESSAGEHDLR* messagehdlr /**< message handler */
45  );
46 
47 /** frees visualization data structure */
49 void SCIPvisualFree(
50  SCIP_VISUAL** visual /**< pointer to store the visualization information */
51  );
52 
53 /** initializes visualization information and creates a file for visualization output */
56  SCIP_VISUAL* visual, /**< visualization information */
57  BMS_BLKMEM* blkmem, /**< block memory */
58  SCIP_SET* set, /**< global SCIP settings */
59  SCIP_MESSAGEHDLR* messagehdlr /**< message handler */
60  );
61 
62 /** closes the visualization output file */
64 void SCIPvisualExit(
65  SCIP_VISUAL* visual, /**< visualization information */
66  SCIP_SET* set, /**< global SCIP settings */
67  SCIP_MESSAGEHDLR* messagehdlr /**< message handler */
68  );
69 
70 /** creates a new node entry in the visualization output file */
73  SCIP_VISUAL* visual, /**< visualization information */
74  SCIP_SET* set, /**< global SCIP settings */
75  SCIP_STAT* stat, /**< problem statistics */
76  SCIP_NODE* node /**< new node, that was created */
77  );
78 
79 /** updates a node entry in the visualization output file */
81  SCIP_VISUAL* visual, /**< visualization information */
82  SCIP_SET* set, /**< global SCIP settings */
83  SCIP_STAT* stat, /**< problem statistics */
84  SCIP_NODE* node /**< new node, that was created */
85  );
86 
87 /** marks node as solved in visualization output file */
90  SCIP_VISUAL* visual, /**< visualization information */
91  SCIP_SET* set, /**< global SCIP settings */
92  SCIP_STAT* stat, /**< problem statistics */
93  SCIP_NODE* node /**< node, that was solved */
94  );
95 
96 /** changes the color of the node to the color of cutoff nodes */
99  SCIP_VISUAL* visual, /**< visualization information */
100  SCIP_SET* set, /**< global SCIP settings */
101  SCIP_STAT* stat, /**< problem statistics */
102  SCIP_NODE* node, /**< node, that was cut off */
103  SCIP_Bool infeasible /**< whether the node is infeasible (otherwise exceeded the cutoff bound) */
104  );
105 
106 /** changes the color of the node to the color of nodes where a conflict constraint was found */
109  SCIP_VISUAL* visual, /**< visualization information */
110  SCIP_STAT* stat, /**< problem statistics */
111  SCIP_NODE* node /**< node, where the conflict was found */
112  );
113 
114 /** changes the color of the node to the color of nodes that were marked to be repropagated */
117  SCIP_VISUAL* visual, /**< visualization information */
118  SCIP_STAT* stat, /**< problem statistics */
119  SCIP_NODE* node /**< node, that was marked to be repropagated */
120  );
121 
122 /** changes the color of the node to the color of repropagated nodes */
125  SCIP_VISUAL* visual, /**< visualization information */
126  SCIP_STAT* stat, /**< problem statistics */
127  SCIP_NODE* node /**< node, that was repropagated */
128  );
129 
130 /** changes the color of the node to the color of nodes with a primal solution */
133  SCIP_VISUAL* visual, /**< visualization information */
134  SCIP_SET* set, /**< global SCIP settings */
135  SCIP_STAT* stat, /**< problem statistics */
136  SCIP_NODE* node, /**< node where the solution was found, or NULL */
137  SCIP_Bool bettersol, /**< the solution was better than the previous ones */
138  SCIP_SOL* sol /**< solution that has been found */
139  );
140 
141 /** outputs a new global lower bound to the visualization output file */
144  SCIP_VISUAL* visual, /**< visualization information */
145  SCIP_SET* set, /**< global SCIP settings */
146  SCIP_STAT* stat, /**< problem statistics */
147  SCIP_Real lowerbound /**< new lower bound */
148  );
149 
150 /** outputs a new global upper bound to the visualization output file */
153  SCIP_VISUAL* visual, /**< visualization information */
154  SCIP_SET* set, /**< global SCIP settings */
155  SCIP_STAT* stat, /**< problem statistics */
156  SCIP_Real upperbound /**< new upper bound */
157  );
158 
159 #ifdef __cplusplus
160 }
161 #endif
162 
163 #endif
SCIP_EXPORT void SCIPvisualFoundConflict(SCIP_VISUAL *visual, SCIP_STAT *stat, SCIP_NODE *node)
Definition: visual.c:603
#define SCIP_EXPORT
Definition: def.h:100
SCIP_EXPORT void SCIPvisualCutoffNode(SCIP_VISUAL *visual, SCIP_SET *set, SCIP_STAT *stat, SCIP_NODE *node, SCIP_Bool infeasible)
Definition: visual.c:524
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:54
type definitions for global SCIP settings
type definitions for problem statistics
type definitions for output for visualization tools (VBC, BAK)
SCIP_EXPORT void SCIPvisualSolvedNode(SCIP_VISUAL *visual, SCIP_SET *set, SCIP_STAT *stat, SCIP_NODE *node)
Definition: visual.c:464
SCIP_EXPORT void SCIPvisualMarkedRepropagateNode(SCIP_VISUAL *visual, SCIP_STAT *stat, SCIP_NODE *node)
Definition: visual.c:621
SCIP_EXPORT void SCIPvisualExit(SCIP_VISUAL *visual, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr)
Definition: visual.c:180
SCIP_EXPORT SCIP_RETCODE SCIPvisualInit(SCIP_VISUAL *visual, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr)
Definition: visual.c:111
SCIP_EXPORT SCIP_RETCODE SCIPvisualCreate(SCIP_VISUAL **visual, SCIP_MESSAGEHDLR *messagehdlr)
Definition: visual.c:76
#define SCIP_Bool
Definition: def.h:70
SCIP_EXPORT void SCIPvisualUpperbound(SCIP_VISUAL *visual, SCIP_SET *set, SCIP_STAT *stat, SCIP_Real upperbound)
Definition: visual.c:796
type definitions for branch and bound tree
type definitions for storing primal CIP solutions
SCIP_EXPORT void SCIPvisualRepropagatedNode(SCIP_VISUAL *visual, SCIP_STAT *stat, SCIP_NODE *node)
Definition: visual.c:642
SCIP_EXPORT void SCIPvisualLowerbound(SCIP_VISUAL *visual, SCIP_SET *set, SCIP_STAT *stat, SCIP_Real lowerbound)
Definition: visual.c:759
SCIP_MESSAGEHDLR * messagehdlr
Definition: struct_visual.h:44
#define SCIP_Real
Definition: def.h:163
SCIP_EXPORT SCIP_RETCODE SCIPvisualNewChild(SCIP_VISUAL *visual, SCIP_SET *set, SCIP_STAT *stat, SCIP_NODE *node)
Definition: visual.c:257
SCIP_EXPORT void SCIPvisualFoundSolution(SCIP_VISUAL *visual, SCIP_SET *set, SCIP_STAT *stat, SCIP_NODE *node, SCIP_Bool bettersol, SCIP_SOL *sol)
Definition: visual.c:660
SCIP_EXPORT void SCIPvisualFree(SCIP_VISUAL **visual)
Definition: visual.c:97
common defines and data types used in all packages of SCIP
struct BMS_BlkMem BMS_BLKMEM
Definition: memory.h:429
SCIP_RETCODE SCIPvisualUpdateChild(SCIP_VISUAL *visual, SCIP_SET *set, SCIP_STAT *stat, SCIP_NODE *node)
Definition: visual.c:332