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-2019 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 scip.zib.de. */
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 */
41 extern
43  SCIP_VISUAL** visual, /**< pointer to store the visualization information */
44  SCIP_MESSAGEHDLR* messagehdlr /**< message handler */
45  );
46 
47 /** frees visualization data structure */
48 extern
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 */
54 extern
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 */
63 extern
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 */
71 extern
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 */
80 extern
82  SCIP_VISUAL* visual, /**< visualization information */
83  SCIP_SET* set, /**< global SCIP settings */
84  SCIP_STAT* stat, /**< problem statistics */
85  SCIP_NODE* node /**< new node, that was created */
86  );
87 
88 /** marks node as solved in visualization output file */
89 extern
91  SCIP_VISUAL* visual, /**< visualization information */
92  SCIP_SET* set, /**< global SCIP settings */
93  SCIP_STAT* stat, /**< problem statistics */
94  SCIP_NODE* node /**< node, that was solved */
95  );
96 
97 /** changes the color of the node to the color of cutoff nodes */
98 extern
100  SCIP_VISUAL* visual, /**< visualization information */
101  SCIP_SET* set, /**< global SCIP settings */
102  SCIP_STAT* stat, /**< problem statistics */
103  SCIP_NODE* node, /**< node, that was cut off */
104  SCIP_Bool infeasible /**< whether the node is infeasible (otherwise exceeded the cutoff bound) */
105  );
106 
107 /** changes the color of the node to the color of nodes where a conflict constraint was found */
108 extern
110  SCIP_VISUAL* visual, /**< visualization information */
111  SCIP_STAT* stat, /**< problem statistics */
112  SCIP_NODE* node /**< node, where the conflict was found */
113  );
114 
115 /** changes the color of the node to the color of nodes that were marked to be repropagated */
116 extern
118  SCIP_VISUAL* visual, /**< visualization information */
119  SCIP_STAT* stat, /**< problem statistics */
120  SCIP_NODE* node /**< node, that was marked to be repropagated */
121  );
122 
123 /** changes the color of the node to the color of repropagated nodes */
124 extern
126  SCIP_VISUAL* visual, /**< visualization information */
127  SCIP_STAT* stat, /**< problem statistics */
128  SCIP_NODE* node /**< node, that was repropagated */
129  );
130 
131 /** changes the color of the node to the color of nodes with a primal solution */
132 extern
134  SCIP_VISUAL* visual, /**< visualization information */
135  SCIP_SET* set, /**< global SCIP settings */
136  SCIP_STAT* stat, /**< problem statistics */
137  SCIP_NODE* node, /**< node where the solution was found, or NULL */
138  SCIP_Bool bettersol, /**< the solution was better than the previous ones */
139  SCIP_SOL* sol /**< solution that has been found */
140  );
141 
142 /** outputs a new global lower bound to the visualization output file */
143 extern
145  SCIP_VISUAL* visual, /**< visualization information */
146  SCIP_SET* set, /**< global SCIP settings */
147  SCIP_STAT* stat, /**< problem statistics */
148  SCIP_Real lowerbound /**< new lower bound */
149  );
150 
151 /** outputs a new global upper bound to the visualization output file */
152 extern
154  SCIP_VISUAL* visual, /**< visualization information */
155  SCIP_SET* set, /**< global SCIP settings */
156  SCIP_STAT* stat, /**< problem statistics */
157  SCIP_Real upperbound /**< new upper bound */
158  );
159 
160 #ifdef __cplusplus
161 }
162 #endif
163 
164 #endif
void SCIPvisualLowerbound(SCIP_VISUAL *visual, SCIP_SET *set, SCIP_STAT *stat, SCIP_Real lowerbound)
Definition: visual.c:758
SCIP_RETCODE SCIPvisualNewChild(SCIP_VISUAL *visual, SCIP_SET *set, SCIP_STAT *stat, SCIP_NODE *node)
Definition: visual.c:256
void SCIPvisualExit(SCIP_VISUAL *visual, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr)
Definition: visual.c:179
SCIP_RETCODE SCIPvisualCreate(SCIP_VISUAL **visual, SCIP_MESSAGEHDLR *messagehdlr)
Definition: visual.c:75
void SCIPvisualFoundSolution(SCIP_VISUAL *visual, SCIP_SET *set, SCIP_STAT *stat, SCIP_NODE *node, SCIP_Bool bettersol, SCIP_SOL *sol)
Definition: visual.c:659
SCIP_RETCODE SCIPvisualInit(SCIP_VISUAL *visual, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr)
Definition: visual.c:110
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:53
void SCIPvisualUpperbound(SCIP_VISUAL *visual, SCIP_SET *set, SCIP_STAT *stat, SCIP_Real upperbound)
Definition: visual.c:795
type definitions for global SCIP settings
type definitions for problem statistics
type definitions for output for visualization tools (VBC, BAK)
void SCIPvisualSolvedNode(SCIP_VISUAL *visual, SCIP_SET *set, SCIP_STAT *stat, SCIP_NODE *node)
Definition: visual.c:463
void SCIPvisualFree(SCIP_VISUAL **visual)
Definition: visual.c:96
#define SCIP_Bool
Definition: def.h:69
void SCIPvisualMarkedRepropagateNode(SCIP_VISUAL *visual, SCIP_STAT *stat, SCIP_NODE *node)
Definition: visual.c:620
void SCIPvisualCutoffNode(SCIP_VISUAL *visual, SCIP_SET *set, SCIP_STAT *stat, SCIP_NODE *node, SCIP_Bool infeasible)
Definition: visual.c:523
type definitions for branch and bound tree
type definitions for storing primal CIP solutions
void SCIPvisualRepropagatedNode(SCIP_VISUAL *visual, SCIP_STAT *stat, SCIP_NODE *node)
Definition: visual.c:641
SCIP_MESSAGEHDLR * messagehdlr
Definition: struct_visual.h:44
#define SCIP_Real
Definition: def.h:157
common defines and data types used in all packages of SCIP
struct BMS_BlkMem BMS_BLKMEM
Definition: memory.h:426
void SCIPvisualFoundConflict(SCIP_VISUAL *visual, SCIP_STAT *stat, SCIP_NODE *node)
Definition: visual.c:602
SCIP_RETCODE SCIPvisualUpdateChild(SCIP_VISUAL *visual, SCIP_SET *set, SCIP_STAT *stat, SCIP_NODE *node)
Definition: visual.c:331