Scippy

SCIP

Solving Constraint Integer Programs

scip_relax.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-2021 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 scip_relax.h
17  * @ingroup PUBLICCOREAPI
18  * @brief public methods for relaxator plugins
19  * @author Tobias Achterberg
20  * @author Timo Berthold
21  * @author Thorsten Koch
22  * @author Alexander Martin
23  * @author Marc Pfetsch
24  * @author Kati Wolter
25  * @author Gregor Hendel
26  * @author Leona Gottwald
27  */
28 
29 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
30 
31 #ifndef __SCIP_SCIP_RELAX_H__
32 #define __SCIP_SCIP_RELAX_H__
33 
34 
35 #include "scip/def.h"
36 #include "scip/type_relax.h"
37 #include "scip/type_result.h"
38 #include "scip/type_retcode.h"
39 #include "scip/type_scip.h"
40 
41 #ifdef __cplusplus
42 extern "C" {
43 #endif
44 
45 /**@addtogroup PublicRelaxatorMethods
46  *
47  * @{
48  */
49 
50 /** creates a relaxation handler and includes it in SCIP
51  *
52  * @note method has all relaxation handler callbacks as arguments and is thus changed every time a new
53  * callback is added
54  * in future releases; consider using SCIPincludeRelaxBasic() and setter functions
55  * if you seek for a method which is less likely to change in future releases
56  */
59  SCIP* scip, /**< SCIP data structure */
60  const char* name, /**< name of relaxation handler */
61  const char* desc, /**< description of relaxation handler */
62  int priority, /**< priority of the relaxation handler (negative: after LP, non-negative: before LP) */
63  int freq, /**< frequency for calling relaxation handler */
64  SCIP_DECL_RELAXCOPY ((*relaxcopy)), /**< copy method of relaxation handler or NULL if you don't want to copy your plugin into sub-SCIPs */
65  SCIP_DECL_RELAXFREE ((*relaxfree)), /**< destructor of relaxation handler */
66  SCIP_DECL_RELAXINIT ((*relaxinit)), /**< initialize relaxation handler */
67  SCIP_DECL_RELAXEXIT ((*relaxexit)), /**< deinitialize relaxation handler */
68  SCIP_DECL_RELAXINITSOL((*relaxinitsol)), /**< solving process initialization method of relaxation handler */
69  SCIP_DECL_RELAXEXITSOL((*relaxexitsol)), /**< solving process deinitialization method of relaxation handler */
70  SCIP_DECL_RELAXEXEC ((*relaxexec)), /**< execution method of relaxation handler */
71  SCIP_RELAXDATA* relaxdata /**< relaxation handler data */
72  );
73 
74 /** creates a relaxation handler and includes it in SCIP. All non fundamental
75  * (or optional) callbacks as, e.g., init and exit callbacks, will be set to NULL.
76  * Optional callbacks can be set via specific setter functions, see SCIPsetRelaxInit(), SCIPsetRelaxExit(),
77  * SCIPsetRelaxCopy(), SCIPsetRelaxFree(), SCIPsetRelaxInitsol(), and SCIPsetRelaxExitsol()
78  *
79  * @note if you want to set all callbacks with a single method call, consider using SCIPincludeRelax() instead
80  */
83  SCIP* scip, /**< SCIP data structure */
84  SCIP_RELAX** relaxptr, /**< reference to relaxation pointer, or NULL */
85  const char* name, /**< name of relaxation handler */
86  const char* desc, /**< description of relaxation handler */
87  int priority, /**< priority of the relaxation handler (negative: after LP, non-negative: before LP) */
88  int freq, /**< frequency for calling relaxation handler */
89  SCIP_DECL_RELAXEXEC ((*relaxexec)), /**< execution method of relaxation handler */
90  SCIP_RELAXDATA* relaxdata /**< relaxation handler data */
91  );
92 
93 /** sets copy method of relaxation handler */
96  SCIP* scip, /**< SCIP data structure */
97  SCIP_RELAX* relax, /**< relaxation handler */
98  SCIP_DECL_RELAXCOPY ((*relaxcopy)) /**< copy method of relaxation handler or NULL if you don't want to copy your plugin into sub-SCIPs */
99  );
100 
101 /** sets destructor method of relaxation handler */
104  SCIP* scip, /**< SCIP data structure */
105  SCIP_RELAX* relax, /**< relaxation handler */
106  SCIP_DECL_RELAXFREE ((*relaxfree)) /**< destructor of relaxation handler */
107  );
108 
109 /** sets initialization method of relaxation handler */
112  SCIP* scip, /**< SCIP data structure */
113  SCIP_RELAX* relax, /**< relaxation handler */
114  SCIP_DECL_RELAXINIT ((*relaxinit)) /**< initialize relaxation handler */
115  );
116 
117 /** sets deinitialization method of relaxation handler */
120  SCIP* scip, /**< SCIP data structure */
121  SCIP_RELAX* relax, /**< relaxation handler */
122  SCIP_DECL_RELAXEXIT ((*relaxexit)) /**< deinitialize relaxation handler */
123  );
124 
125 /** sets solving process initialization method of relaxation handler */
128  SCIP* scip, /**< SCIP data structure */
129  SCIP_RELAX* relax, /**< relaxation handler */
130  SCIP_DECL_RELAXINITSOL((*relaxinitsol)) /**< solving process initialization method of relaxation handler */
131  );
132 
133 /** sets solving process deinitialization method of relaxation handler */
136  SCIP* scip, /**< SCIP data structure */
137  SCIP_RELAX* relax, /**< relaxation handler */
138  SCIP_DECL_RELAXEXITSOL((*relaxexitsol)) /**< solving process deinitialization method of relaxation handler */
139  );
140 
141 /** returns the relaxation handler of the given name, or NULL if not existing */
144  SCIP* scip, /**< SCIP data structure */
145  const char* name /**< name of relaxation handler */
146  );
147 
148 /** returns the array of currently available relaxation handlers */
151  SCIP* scip /**< SCIP data structure */
152  );
153 
154 /** returns the number of currently available relaxation handlers */
156 int SCIPgetNRelaxs(
157  SCIP* scip /**< SCIP data structure */
158  );
159 
160 /** sets the priority of a relaxation handler*/
163  SCIP* scip, /**< SCIP data structure */
164  SCIP_RELAX* relax, /**< relaxation handler */
165  int priority /**< new priority of the relaxation handler */
166  );
167 
168 /** @} */
169 
170 #ifdef __cplusplus
171 }
172 #endif
173 
174 #endif
#define SCIP_DECL_RELAXFREE(x)
Definition: type_relax.h:55
#define SCIP_EXPORT
Definition: def.h:100
#define SCIP_DECL_RELAXINIT(x)
Definition: type_relax.h:63
#define SCIP_DECL_RELAXINITSOL(x)
Definition: type_relax.h:82
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:54
type definitions for return codes for SCIP methods
SCIP_EXPORT SCIP_RELAX * SCIPfindRelax(SCIP *scip, const char *name)
Definition: scip_relax.c:225
#define SCIP_DECL_RELAXEXIT(x)
Definition: type_relax.h:71
SCIP_EXPORT SCIP_RETCODE SCIPsetRelaxExitsol(SCIP *scip, SCIP_RELAX *relax, SCIP_DECL_RELAXEXITSOL((*relaxexitsol)))
Definition: scip_relax.c:208
SCIP_EXPORT SCIP_RETCODE SCIPsetRelaxExit(SCIP *scip, SCIP_RELAX *relax, SCIP_DECL_RELAXEXIT((*relaxexit)))
Definition: scip_relax.c:176
type definitions for SCIP&#39;s main datastructure
SCIP_EXPORT SCIP_RETCODE SCIPincludeRelax(SCIP *scip, const char *name, const char *desc, int priority, int freq, SCIP_DECL_RELAXCOPY((*relaxcopy)), SCIP_DECL_RELAXFREE((*relaxfree)), SCIP_DECL_RELAXINIT((*relaxinit)), SCIP_DECL_RELAXEXIT((*relaxexit)), SCIP_DECL_RELAXINITSOL((*relaxinitsol)), SCIP_DECL_RELAXEXITSOL((*relaxexitsol)), SCIP_DECL_RELAXEXEC((*relaxexec)), SCIP_RELAXDATA *relaxdata)
Definition: scip_relax.c:52
#define SCIP_DECL_RELAXCOPY(x)
Definition: type_relax.h:47
SCIP_EXPORT SCIP_RETCODE SCIPsetRelaxCopy(SCIP *scip, SCIP_RELAX *relax, SCIP_DECL_RELAXCOPY((*relaxcopy)))
Definition: scip_relax.c:128
SCIP_EXPORT SCIP_RETCODE SCIPsetRelaxPriority(SCIP *scip, SCIP_RELAX *relax, int priority)
Definition: scip_relax.c:262
type definitions for relaxators
SCIP_EXPORT SCIP_RETCODE SCIPsetRelaxInit(SCIP *scip, SCIP_RELAX *relax, SCIP_DECL_RELAXINIT((*relaxinit)))
Definition: scip_relax.c:160
SCIP_EXPORT SCIP_RELAX ** SCIPgetRelaxs(SCIP *scip)
Definition: scip_relax.c:238
SCIP_EXPORT SCIP_RETCODE SCIPincludeRelaxBasic(SCIP *scip, SCIP_RELAX **relaxptr, const char *name, const char *desc, int priority, int freq, SCIP_DECL_RELAXEXEC((*relaxexec)), SCIP_RELAXDATA *relaxdata)
Definition: scip_relax.c:94
SCIP_EXPORT SCIP_RETCODE SCIPsetRelaxFree(SCIP *scip, SCIP_RELAX *relax, SCIP_DECL_RELAXFREE((*relaxfree)))
Definition: scip_relax.c:144
SCIP_EXPORT int SCIPgetNRelaxs(SCIP *scip)
Definition: scip_relax.c:251
struct SCIP_RelaxData SCIP_RELAXDATA
Definition: type_relax.h:38
#define SCIP_DECL_RELAXEXEC(x)
Definition: type_relax.h:118
SCIP_EXPORT SCIP_RETCODE SCIPsetRelaxInitsol(SCIP *scip, SCIP_RELAX *relax, SCIP_DECL_RELAXINITSOL((*relaxinitsol)))
Definition: scip_relax.c:192
result codes for SCIP callback methods
#define SCIP_DECL_RELAXEXITSOL(x)
Definition: type_relax.h:93
common defines and data types used in all packages of SCIP