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   scip_cutsel.h
26   	 * @ingroup PUBLICCOREAPI
27   	 * @brief  public methods for cut selector plugins
28   	 * @author Felipe Serrano
29   	 * @author Mark Turner
30   	 */
31   	
32   	/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
33   	
34   	#ifndef __SCIP_SCIP_CUTSEL_H__
35   	#define __SCIP_SCIP_CUTSEL_H__
36   	
37   	
38   	#include "scip/def.h"
39   	#include "scip/type_cutsel.h"
40   	#include "scip/type_retcode.h"
41   	#include "scip/type_scip.h"
42   	#include "scip/type_tree.h"
43   	
44   	#ifdef __cplusplus
45   	extern "C" {
46   	#endif
47   	
48   	/**@addtogroup PublicCutSelectorMethods
49   	 *
50   	 * @{
51   	 */
52   	
53   	/** creates a cut selector and includes it in SCIP
54   	 *
55   	 *  @note this method has all cut selector callbacks as arguments and is thus changed every time a new
56   	 *        callback is added in future releases; consider using SCIPincludeCutselBasic() and setter functions
57   	 *        if you seek for a method which is less likely to change in future releases
58   	 */
59   	SCIP_EXPORT
60   	SCIP_RETCODE SCIPincludeCutsel(
61   	   SCIP*                 scip,               /**< SCIP data structure */
62   	   const char*           name,               /**< name of cut selector */
63   	   const char*           desc,               /**< description of cut selector */
64   	   int                   priority,           /**< priority of the cut selector */
65   	   SCIP_DECL_CUTSELCOPY ((*cutselcopy)),     /**< copy method of cut selector or NULL if you don't want to copy your plugin into sub-SCIPs */
66   	   SCIP_DECL_CUTSELFREE ((*cutselfree)),     /**< destructor of cut selector */
67   	   SCIP_DECL_CUTSELINIT ((*cutselinit)),     /**< initialize cut selector */
68   	   SCIP_DECL_CUTSELEXIT ((*cutselexit)),     /**< deinitialize cut selector */
69   	   SCIP_DECL_CUTSELINITSOL((*cutselinitsol)),/**< solving process initialization method of cut selector */
70   	   SCIP_DECL_CUTSELEXITSOL((*cutselexitsol)),/**< solving process deinitialization method of cut selector */
71   	   SCIP_DECL_CUTSELSELECT((*cutselselect)),  /**< cut selection method */
72   	   SCIP_CUTSELDATA*      cutseldata          /**< cut selector data */
73   	   );
74   	
75   	/** Creates a cut selector and includes it in SCIP with its most fundamental callbacks.
76   	 *
77   	 *  All non-fundamental (or optional) callbacks as, e.g., init and exit callbacks, will be set to NULL. Optional
78   	 *  callbacks can be set via specific setter functions, see SCIPsetCutselCopy(), SCIPsetCutselFree(),
79   	 *  SCIPsetCutselInit(), SCIPsetCutselExit(), SCIPsetCutselInitsol(), and SCIPsetCutselExitsol()
80   	 *
81   	 *  @note if you want to set all callbacks with a single method call, consider using SCIPincludeCutsel() instead
82   	 */
83   	SCIP_EXPORT
84   	SCIP_RETCODE SCIPincludeCutselBasic(
85   	   SCIP*                 scip,               /**< SCIP data structure */
86   	   SCIP_CUTSEL**         cutsel,             /**< reference to a cut selector, or NULL */
87   	   const char*           name,               /**< name of cut selector */
88   	   const char*           desc,               /**< description of cut selector */
89   	   int                   priority,           /**< priority of the cut selector in standard mode */
90   	   SCIP_DECL_CUTSELSELECT((*cutselselect)),  /**< cut selection method */
91   	   SCIP_CUTSELDATA*      cutseldata          /**< cut selector data */
92   	   );
93   	
94   	/** sets copy method of cut selector */
95   	SCIP_EXPORT
96   	SCIP_RETCODE SCIPsetCutselCopy(
97   	   SCIP*                 scip,               /**< SCIP data structure */
98   	   SCIP_CUTSEL*          cutsel,             /**< cut selector */
99   	   SCIP_DECL_CUTSELCOPY  ((*cutselcopy))     /**< copy method of cut selector or NULL if you don't want to copy your plugin into sub-SCIPs */
100  	   );
101  	
102  	/** sets destructor method of cut selector */
103  	SCIP_EXPORT
104  	SCIP_RETCODE SCIPsetCutselFree(
105  	   SCIP*                 scip,               /**< SCIP data structure */
106  	   SCIP_CUTSEL*          cutsel,             /**< cut selector */
107  	   SCIP_DECL_CUTSELFREE  ((*cutselfree))     /**< destructor of cut selector */
108  	   );
109  	
110  	/** sets initialization method of cut selector */
111  	SCIP_EXPORT
112  	SCIP_RETCODE SCIPsetCutselInit(
113  	   SCIP*                 scip,               /**< SCIP data structure */
114  	   SCIP_CUTSEL*          cutsel,             /**< cut selector */
115  	   SCIP_DECL_CUTSELINIT  ((*cutselinit))     /**< initialize cut selector */
116  	   );
117  	
118  	/** sets deinitialization method of cut selector */
119  	SCIP_EXPORT
120  	SCIP_RETCODE SCIPsetCutselExit(
121  	   SCIP*                 scip,               /**< SCIP data structure */
122  	   SCIP_CUTSEL*          cutsel,             /**< cut selector */
123  	   SCIP_DECL_CUTSELEXIT  ((*cutselexit))     /**< deinitialize cut selector */
124  	   );
125  	
126  	/** sets solving process initialization method of cut selector */
127  	SCIP_EXPORT
128  	SCIP_RETCODE SCIPsetCutselInitsol(
129  	   SCIP*                 scip,               /**< SCIP data structure */
130  	   SCIP_CUTSEL*          cutsel,             /**< cut selector */
131  	   SCIP_DECL_CUTSELINITSOL ((*cutselinitsol))/**< solving process initialization method of cut selector */
132  	   );
133  	
134  	/** sets solving process deinitialization method of cut selector */
135  	SCIP_EXPORT
136  	SCIP_RETCODE SCIPsetCutselExitsol(
137  	   SCIP*                 scip,               /**< SCIP data structure */
138  	   SCIP_CUTSEL*          cutsel,             /**< cut selector */
139  	   SCIP_DECL_CUTSELEXITSOL ((*cutselexitsol))/**< solving process deinitialization method of cut selector */
140  	   );
141  	
142  	/** returns the cut selector of the given name, or NULL if not existing */
143  	SCIP_EXPORT
144  	SCIP_CUTSEL* SCIPfindCutsel(
145  	   SCIP*                 scip,               /**< SCIP data structure */
146  	   const char*           name                /**< name of cut selector */
147  	   );
148  	
149  	/** returns the array of currently available cut selectors */
150  	SCIP_EXPORT
151  	SCIP_CUTSEL** SCIPgetCutsels(
152  	   SCIP*                 scip                /**< SCIP data structure */
153  	   );
154  	
155  	/** returns the number of currently available cut selectors */
156  	SCIP_EXPORT
157  	int SCIPgetNCutsels(
158  	   SCIP*                 scip                /**< SCIP data structure */
159  	   );
160  	
161  	/** sets the priority of a cut selector */
162  	SCIP_EXPORT
163  	SCIP_RETCODE SCIPsetCutselPriority(
164  	   SCIP*                 scip,               /**< SCIP data structure */
165  	   SCIP_CUTSEL*          cutsel,             /**< cut selector */
166  	   int                   priority            /**< new priority of the separator */
167  	   );
168  	
169  	/** @} */
170  	
171  	#ifdef __cplusplus
172  	}
173  	#endif
174  	
175  	#endif
176