Scippy

SCIP

Solving Constraint Integer Programs

nlhdlr.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 2002-2022 Zuse Institute Berlin */
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 nlhdlr.h
26  * @ingroup INTERNALAPI
27  * @brief private functions of nonlinear handlers of nonlinear constraints
28  * @author Ksenia Bestuzheva
29  * @author Benjamin Mueller
30  * @author Felipe Serrano
31  * @author Stefan Vigerske
32  */
33 
34 #ifndef SCIP_NLHDLR_H_
35 #define SCIP_NLHDLR_H_
36 
37 #include "scip/pub_nlhdlr.h"
38 
39 #ifndef NDEBUG
40 #include "scip/struct_nlhdlr.h"
41 #endif
42 
43 #ifdef __cplusplus
44 extern "C" {
45 #endif
46 
47 /** creates a nonlinear handler */
49  SCIP* scip, /**< SCIP data structure */
50  SCIP_NLHDLR** nlhdlr, /**< buffer to store pointer to created nonlinear handler */
51  const char* name, /**< name of nonlinear handler (must not be NULL) */
52  const char* desc, /**< description of nonlinear handler (can be NULL) */
53  int detectpriority, /**< detection priority of nonlinear handler */
54  int enfopriority, /**< enforcement priority of nonlinear handler */
55  SCIP_DECL_NLHDLRDETECT((*detect)), /**< structure detection callback of nonlinear handler */
56  SCIP_DECL_NLHDLREVALAUX((*evalaux)), /**< auxiliary evaluation callback of nonlinear handler */
57  SCIP_NLHDLRDATA* nlhdlrdata /**< data of nonlinear handler (can be NULL) */
58  );
59 
60 /** frees a nonlinear handler */
62  SCIP* scip, /**< SCIP data structure */
63  SCIP_NLHDLR** nlhdlr /**< pointer to nonlinear handler to be freed */
64  );
65 
66 /** call the handler copy callback of a nonlinear handler */
67 SCIP_DECL_NLHDLRCOPYHDLR(SCIPnlhdlrCopyhdlr);
68 
69 /** call the free expression specific data callback of a nonlinear handler */
70 SCIP_DECL_NLHDLRFREEEXPRDATA(SCIPnlhdlrFreeexprdata);
71 
72 /** call the initialization callback of a nonlinear handler */
73 SCIP_DECL_NLHDLRINIT(SCIPnlhdlrInit);
74 
75 /** call the deinitialization callback of a nonlinear handler */
76 SCIP_DECL_NLHDLREXIT(SCIPnlhdlrExit);
77 
78 /** call the detect callback of a nonlinear handler */
79 SCIP_DECL_NLHDLRDETECT(SCIPnlhdlrDetect);
80 
81 /** call the auxiliary evaluation callback of a nonlinear handler */
82 SCIP_DECL_NLHDLREVALAUX(SCIPnlhdlrEvalaux);
83 
84 /** call the interval evaluation callback of a nonlinear handler */
85 SCIP_DECL_NLHDLRINTEVAL(SCIPnlhdlrInteval);
86 
87 /** call the reverse propagation callback of a nonlinear handler */
88 SCIP_DECL_NLHDLRREVERSEPROP(SCIPnlhdlrReverseprop);
89 
90 /** call the separation initialization callback of a nonlinear handler */
91 SCIP_DECL_NLHDLRINITSEPA(SCIPnlhdlrInitsepa);
92 
93 /** call the separation deinitialization callback of a nonlinear handler */
94 SCIP_DECL_NLHDLREXITSEPA(SCIPnlhdlrExitsepa);
95 
96 /** call the enforcement callback of a nonlinear handler */
97 SCIP_DECL_NLHDLRENFO(SCIPnlhdlrEnfo);
98 
99 /** call the estimator callback of a nonlinear handler */
100 SCIP_DECL_NLHDLRESTIMATE(SCIPnlhdlrEstimate);
101 
102 /** reset number of detections counter for last round */
104  SCIP_NLHDLR* nlhdlr /**< nonlinear handler */
105  );
106 
107 /** increments number of cutoffs in statistics */
109  SCIP_NLHDLR* nlhdlr /**< nonlinear handler */
110  );
111 
112 /** increments number of separations in statistics */
114  SCIP_NLHDLR* nlhdlr /**< nonlinear handler */
115  );
116 
117 /** print statistics for nonlinear handlers */
119  SCIP* scip, /**< SCIP data structure */
120  SCIP_NLHDLR** nlhdlrs, /**< nonlinear handlers */
121  int nnlhdlrs, /**< number of nonlinear handlers */
122  FILE* file /**< file handle, or NULL for standard out */
123  );
124 
125 #ifndef NDEBUG
126 #define SCIPnlhdlrResetNDetectionslast(nlhdlr) (nlhdlr)->ndetectionslast = 0
127 #define SCIPnlhdlrIncrementNCutoffs(nlhdlr) ++(nlhdlr)->ncutoffs
128 #define SCIPnlhdlrIncrementNSeparated(nlhdlr) ++(nlhdlr)->nseparated
129 #endif
130 
131 #ifdef __cplusplus
132 }
133 #endif
134 
135 #endif /* SCIP_NLHDLR_H_ */
SCIP_DECL_NLHDLREXIT(SCIPnlhdlrExit)
Definition: nlhdlr.c:447
SCIP_DECL_NLHDLRINTEVAL(SCIPnlhdlrInteval)
Definition: nlhdlr.c:493
SCIP_DECL_NLHDLRCOPYHDLR(SCIPnlhdlrCopyhdlr)
Definition: nlhdlr.c:391
SCIP_DECL_NLHDLRINITSEPA(SCIPnlhdlrInitsepa)
Definition: nlhdlr.c:542
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:63
SCIP_DECL_NLHDLRENFO(SCIPnlhdlrEnfo)
Definition: nlhdlr.c:584
#define SCIPnlhdlrResetNDetectionslast(nlhdlr)
Definition: nlhdlr.h:126
void SCIPnlhdlrPrintStatistics(SCIP *scip, SCIP_NLHDLR **nlhdlrs, int nnlhdlrs, FILE *file)
Definition: nlhdlr.c:698
SCIP_DECL_NLHDLREXITSEPA(SCIPnlhdlrExitsepa)
Definition: nlhdlr.c:567
SCIP_RETCODE SCIPnlhdlrCreate(SCIP *scip, SCIP_NLHDLR **nlhdlr, const char *name, const char *desc, int detectpriority, int enfopriority, SCIP_DECL_NLHDLRDETECT((*detect)), SCIP_DECL_NLHDLREVALAUX((*evalaux)), SCIP_NLHDLRDATA *nlhdlrdata)
Definition: nlhdlr.c:315
SCIP_DECL_NLHDLREVALAUX(SCIPnlhdlrEvalaux)
Definition: nlhdlr.c:482
SCIP_DECL_NLHDLRFREEEXPRDATA(SCIPnlhdlrFreeexprdata)
Definition: nlhdlr.c:403
SCIP_DECL_NLHDLRINIT(SCIPnlhdlrInit)
Definition: nlhdlr.c:419
#define SCIPnlhdlrIncrementNCutoffs(nlhdlr)
Definition: nlhdlr.h:127
SCIP_DECL_NLHDLRDETECT(SCIPnlhdlrDetect)
Definition: nlhdlr.c:460
SCIP_RETCODE SCIPnlhdlrFree(SCIP *scip, SCIP_NLHDLR **nlhdlr)
Definition: nlhdlr.c:363
SCIP_DECL_NLHDLRESTIMATE(SCIPnlhdlrEstimate)
Definition: nlhdlr.c:635
SCIP_DECL_NLHDLRREVERSEPROP(SCIPnlhdlrReverseprop)
Definition: nlhdlr.c:512
structure definitions related to nonlinear handlers of nonlinear constraints
struct SCIP_NlhdlrData SCIP_NLHDLRDATA
Definition: type_nlhdlr.h:412
public functions of nonlinear handlers of nonlinear constraints
#define SCIPnlhdlrIncrementNSeparated(nlhdlr)
Definition: nlhdlr.h:128