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 (c) 2002-2024 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 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 /** call the solution linearization callback of a nonlinear handler */
103 SCIP_DECL_NLHDLRSOLLINEARIZE(SCIPnlhdlrSollinearize);
104 
105 /** reset number of detections counter for last round */
107  SCIP_NLHDLR* nlhdlr /**< nonlinear handler */
108  );
109 
110 /** increments number of cutoffs in statistics */
112  SCIP_NLHDLR* nlhdlr /**< nonlinear handler */
113  );
114 
115 /** increments number of separations in statistics */
117  SCIP_NLHDLR* nlhdlr /**< nonlinear handler */
118  );
119 
120 /** print statistics for nonlinear handlers */
122  SCIP* scip, /**< SCIP data structure */
123  SCIP_NLHDLR** nlhdlrs, /**< nonlinear handlers */
124  int nnlhdlrs, /**< number of nonlinear handlers */
125  FILE* file /**< file handle, or NULL for standard out */
126  );
127 
128 #ifndef NDEBUG
129 #define SCIPnlhdlrResetNDetectionslast(nlhdlr) (nlhdlr)->ndetectionslast = 0
130 #define SCIPnlhdlrIncrementNCutoffs(nlhdlr) ++(nlhdlr)->ncutoffs
131 #define SCIPnlhdlrIncrementNSeparated(nlhdlr) ++(nlhdlr)->nseparated
132 #endif
133 
134 #ifdef __cplusplus
135 }
136 #endif
137 
138 #endif /* SCIP_NLHDLR_H_ */
SCIP_DECL_NLHDLREXIT(SCIPnlhdlrExit)
Definition: nlhdlr.c:485
SCIP_DECL_NLHDLRSOLLINEARIZE(SCIPnlhdlrSollinearize)
Definition: nlhdlr.c:709
SCIP_DECL_NLHDLRINTEVAL(SCIPnlhdlrInteval)
Definition: nlhdlr.c:531
SCIP_DECL_NLHDLRCOPYHDLR(SCIPnlhdlrCopyhdlr)
Definition: nlhdlr.c:429
SCIP_DECL_NLHDLRINITSEPA(SCIPnlhdlrInitsepa)
Definition: nlhdlr.c:580
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:63
SCIP_DECL_NLHDLRENFO(SCIPnlhdlrEnfo)
Definition: nlhdlr.c:622
#define SCIPnlhdlrResetNDetectionslast(nlhdlr)
Definition: nlhdlr.h:129
void SCIPnlhdlrPrintStatistics(SCIP *scip, SCIP_NLHDLR **nlhdlrs, int nnlhdlrs, FILE *file)
Definition: nlhdlr.c:750
SCIP_DECL_NLHDLREXITSEPA(SCIPnlhdlrExitsepa)
Definition: nlhdlr.c:605
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:353
SCIP_DECL_NLHDLREVALAUX(SCIPnlhdlrEvalaux)
Definition: nlhdlr.c:520
SCIP_DECL_NLHDLRFREEEXPRDATA(SCIPnlhdlrFreeexprdata)
Definition: nlhdlr.c:441
SCIP_DECL_NLHDLRINIT(SCIPnlhdlrInit)
Definition: nlhdlr.c:457
#define SCIPnlhdlrIncrementNCutoffs(nlhdlr)
Definition: nlhdlr.h:130
SCIP_DECL_NLHDLRDETECT(SCIPnlhdlrDetect)
Definition: nlhdlr.c:498
SCIP_RETCODE SCIPnlhdlrFree(SCIP *scip, SCIP_NLHDLR **nlhdlr)
Definition: nlhdlr.c:401
SCIP_DECL_NLHDLRESTIMATE(SCIPnlhdlrEstimate)
Definition: nlhdlr.c:673
SCIP_DECL_NLHDLRREVERSEPROP(SCIPnlhdlrReverseprop)
Definition: nlhdlr.c:550
structure definitions related to nonlinear handlers of nonlinear constraints
struct SCIP_NlhdlrData SCIP_NLHDLRDATA
Definition: type_nlhdlr.h:442
public functions of nonlinear handlers of nonlinear constraints
#define SCIPnlhdlrIncrementNSeparated(nlhdlr)
Definition: nlhdlr.h:131