1    	/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2    	/*                                                                           */
3    	/*                  This file is part of the program and library             */
4    	/*         SCIP --- Solving Constraint Integer Programs                      */
5    	/*                                                                           */
6    	/*  Copyright (c) 2002-2023 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   visual.h
26   	 * @ingroup INTERNALAPI
27   	 * @brief  methods for creating output for visualization tools (VBC, BAK)
28   	 * @author Tobias Achterberg
29   	 * @author Marc Pfetsch
30   	 */
31   	
32   	/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
33   	
34   	#ifndef __SCIP_VISUAL_H__
35   	#define __SCIP_VISUAL_H__
36   	
37   	
38   	#include "scip/def.h"
39   	#include "scip/type_set.h"
40   	#include "scip/type_sol.h"
41   	#include "scip/type_stat.h"
42   	#include "scip/type_tree.h"
43   	#include "scip/type_visual.h"
44   	
45   	#ifdef __cplusplus
46   	extern "C" {
47   	#endif
48   	
49   	/** creates visualization data structure */
50   	SCIP_EXPORT
51   	SCIP_RETCODE SCIPvisualCreate(
52   	   SCIP_VISUAL**         visual,             /**< pointer to store the visualization information */
53   	   SCIP_MESSAGEHDLR*     messagehdlr         /**< message handler */
54   	   );
55   	
56   	/** frees visualization data structure */
57   	SCIP_EXPORT
58   	void SCIPvisualFree(
59   	   SCIP_VISUAL**         visual              /**< pointer to store the visualization information */
60   	   );
61   	
62   	/** initializes visualization information and creates a file for visualization output */
63   	SCIP_EXPORT
64   	SCIP_RETCODE SCIPvisualInit(
65   	   SCIP_VISUAL*          visual,             /**< visualization information */
66   	   BMS_BLKMEM*           blkmem,             /**< block memory */
67   	   SCIP_SET*             set,                /**< global SCIP settings */
68   	   SCIP_MESSAGEHDLR*     messagehdlr         /**< message handler */
69   	   );
70   	
71   	/** closes the visualization output file */
72   	SCIP_EXPORT
73   	void SCIPvisualExit(
74   	   SCIP_VISUAL*          visual,             /**< visualization information */
75   	   SCIP_SET*             set,                /**< global SCIP settings */
76   	   SCIP_MESSAGEHDLR*     messagehdlr         /**< message handler */
77   	   );
78   	
79   	/** creates a new node entry in the visualization output file */
80   	SCIP_EXPORT
81   	SCIP_RETCODE SCIPvisualNewChild(
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   	/** updates a node entry in the visualization output file */
89   	SCIP_RETCODE SCIPvisualUpdateChild(
90   	   SCIP_VISUAL*          visual,             /**< visualization information */
91   	   SCIP_SET*             set,                /**< global SCIP settings */
92   	   SCIP_STAT*            stat,               /**< problem statistics */
93   	   SCIP_NODE*            node                /**< new node, that was created */
94   	   );
95   	
96   	/** marks node as solved in visualization output file */
97   	SCIP_EXPORT
98   	void SCIPvisualSolvedNode(
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 solved */
103  	   );
104  	
105  	/** changes the color of the node to the color of cutoff nodes */
106  	SCIP_EXPORT
107  	void SCIPvisualCutoffNode(
108  	   SCIP_VISUAL*          visual,             /**< visualization information */
109  	   SCIP_SET*             set,                /**< global SCIP settings */
110  	   SCIP_STAT*            stat,               /**< problem statistics */
111  	   SCIP_NODE*            node,               /**< node, that was cut off */
112  	   SCIP_Bool             infeasible          /**< whether the node is infeasible (otherwise exceeded the cutoff bound) */
113  	   );
114  	
115  	/** changes the color of the node to the color of nodes where a conflict constraint was found */
116  	SCIP_EXPORT
117  	void SCIPvisualFoundConflict(
118  	   SCIP_VISUAL*          visual,             /**< visualization information */
119  	   SCIP_STAT*            stat,               /**< problem statistics */
120  	   SCIP_NODE*            node                /**< node, where the conflict was found */
121  	   );
122  	
123  	/** changes the color of the node to the color of nodes that were marked to be repropagated */
124  	SCIP_EXPORT
125  	void SCIPvisualMarkedRepropagateNode(
126  	   SCIP_VISUAL*          visual,             /**< visualization information */
127  	   SCIP_STAT*            stat,               /**< problem statistics */
128  	   SCIP_NODE*            node                /**< node, that was marked to be repropagated */
129  	   );
130  	
131  	/** changes the color of the node to the color of repropagated nodes */
132  	SCIP_EXPORT
133  	void SCIPvisualRepropagatedNode(
134  	   SCIP_VISUAL*          visual,             /**< visualization information */
135  	   SCIP_STAT*            stat,               /**< problem statistics */
136  	   SCIP_NODE*            node                /**< node, that was repropagated */
137  	   );
138  	
139  	/** changes the color of the node to the color of nodes with a primal solution */
140  	SCIP_EXPORT
141  	void SCIPvisualFoundSolution(
142  	   SCIP_VISUAL*          visual,             /**< visualization information */
143  	   SCIP_SET*             set,                /**< global SCIP settings */
144  	   SCIP_STAT*            stat,               /**< problem statistics */
145  	   SCIP_NODE*            node,               /**< node where the solution was found, or NULL */
146  	   SCIP_Bool             bettersol,          /**< the solution was better than the previous ones */
147  	   SCIP_SOL*             sol                 /**< solution that has been found */
148  	   );
149  	
150  	/** outputs a new global lower bound to the visualization output file */
151  	SCIP_EXPORT
152  	void SCIPvisualLowerbound(
153  	   SCIP_VISUAL*          visual,             /**< visualization information */
154  	   SCIP_SET*             set,                /**< global SCIP settings */
155  	   SCIP_STAT*            stat,               /**< problem statistics */
156  	   SCIP_Real             lowerbound          /**< new lower bound */
157  	   );
158  	
159  	/** outputs a new global upper bound to the visualization output file */
160  	SCIP_EXPORT
161  	void SCIPvisualUpperbound(
162  	   SCIP_VISUAL*          visual,             /**< visualization information */
163  	   SCIP_SET*             set,                /**< global SCIP settings */
164  	   SCIP_STAT*            stat,               /**< problem statistics */
165  	   SCIP_Real             upperbound          /**< new upper bound */
166  	   );
167  	
168  	#ifdef __cplusplus
169  	}
170  	#endif
171  	
172  	#endif
173