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-2016 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 email to scip@zib.de. */
13 /* */
14 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
15 
16 /**@file visual.h
17  * @brief methods for creating output for visualization tools (VBC, BAK)
18  * @author Tobias Achterberg
19  * @author Marc Pfetsch
20  */
21 
22 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
23 
24 #ifndef __SCIP_VISUAL_H__
25 #define __SCIP_VISUAL_H__
26 
27 
28 #include "scip/def.h"
29 #include "scip/type_set.h"
30 #include "scip/type_sol.h"
31 #include "scip/type_stat.h"
32 #include "scip/type_tree.h"
33 #include "scip/type_visual.h"
34 
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
38 
39 /** creates visualization data structure */
40 extern
42  SCIP_VISUAL** visual, /**< pointer to store the visualization information */
43  SCIP_MESSAGEHDLR* messagehdlr /**< message handler */
44  );
45 
46 /** frees visualization data structure */
47 extern
48 void SCIPvisualFree(
49  SCIP_VISUAL** visual /**< pointer to store the visualization information */
50  );
51 
52 /** initializes visualization information and creates a file for visualization output */
53 extern
55  SCIP_VISUAL* visual, /**< visualization information */
56  BMS_BLKMEM* blkmem, /**< block memory */
57  SCIP_SET* set, /**< global SCIP settings */
58  SCIP_MESSAGEHDLR* messagehdlr /**< message handler */
59  );
60 
61 /** closes the visualization output file */
62 extern
63 void SCIPvisualExit(
64  SCIP_VISUAL* visual, /**< visualization information */
65  SCIP_SET* set, /**< global SCIP settings */
66  SCIP_MESSAGEHDLR* messagehdlr /**< message handler */
67  );
68 
69 /** creates a new node entry in the visualization output file */
70 extern
72  SCIP_VISUAL* visual, /**< visualization information */
73  SCIP_SET* set, /**< global SCIP settings */
74  SCIP_STAT* stat, /**< problem statistics */
75  SCIP_NODE* node /**< new node, that was created */
76  );
77 
78 /** updates a node entry in the visualization output file */
79 extern
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 */
88 extern
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 */
97 extern
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 */
107 extern
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 */
115 extern
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 */
123 extern
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 */
131 extern
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 */
142 extern
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 */
151 extern
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
void SCIPvisualLowerbound(SCIP_VISUAL *visual, SCIP_SET *set, SCIP_STAT *stat, SCIP_Real lowerbound)
Definition: visual.c:728
SCIP_RETCODE SCIPvisualNewChild(SCIP_VISUAL *visual, SCIP_SET *set, SCIP_STAT *stat, SCIP_NODE *node)
Definition: visual.c:253
void SCIPvisualExit(SCIP_VISUAL *visual, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr)
Definition: visual.c:176
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:656
SCIP_RETCODE SCIPvisualInit(SCIP_VISUAL *visual, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr)
Definition: visual.c:109
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:752
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:460
void SCIPvisualFree(SCIP_VISUAL **visual)
Definition: visual.c:95
#define SCIP_Bool
Definition: def.h:53
void SCIPvisualMarkedRepropagateNode(SCIP_VISUAL *visual, SCIP_STAT *stat, SCIP_NODE *node)
Definition: visual.c:617
void SCIPvisualCutoffNode(SCIP_VISUAL *visual, SCIP_SET *set, SCIP_STAT *stat, SCIP_NODE *node, SCIP_Bool infeasible)
Definition: visual.c:520
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:638
SCIP_MESSAGEHDLR * messagehdlr
Definition: struct_visual.h:42
#define SCIP_Real
Definition: def.h:127
common defines and data types used in all packages of SCIP
struct BMS_BlkMem BMS_BLKMEM
Definition: memory.h:392
void SCIPvisualFoundConflict(SCIP_VISUAL *visual, SCIP_STAT *stat, SCIP_NODE *node)
Definition: visual.c:599
SCIP_RETCODE SCIPvisualUpdateChild(SCIP_VISUAL *visual, SCIP_SET *set, SCIP_STAT *stat, SCIP_NODE *node)
Definition: visual.c:328