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-2022 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 scip.zib.de. */
13 /* */
14 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
15 
16 /**@file nlhdlr.h
17  * @ingroup INTERNALAPI
18  * @brief private functions of nonlinear handlers of nonlinear constraints
19  * @author Ksenia Bestuzheva
20  * @author Benjamin Mueller
21  * @author Felipe Serrano
22  * @author Stefan Vigerske
23  */
24 
25 #ifndef SCIP_NLHDLR_H_
26 #define SCIP_NLHDLR_H_
27 
28 #include "scip/pub_nlhdlr.h"
29 
30 #ifndef NDEBUG
31 #include "scip/struct_nlhdlr.h"
32 #endif
33 
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37 
38 /** creates a nonlinear handler */
40  SCIP* scip, /**< SCIP data structure */
41  SCIP_NLHDLR** nlhdlr, /**< buffer to store pointer to created nonlinear handler */
42  const char* name, /**< name of nonlinear handler (must not be NULL) */
43  const char* desc, /**< description of nonlinear handler (can be NULL) */
44  int detectpriority, /**< detection priority of nonlinear handler */
45  int enfopriority, /**< enforcement priority of nonlinear handler */
46  SCIP_DECL_NLHDLRDETECT((*detect)), /**< structure detection callback of nonlinear handler */
47  SCIP_DECL_NLHDLREVALAUX((*evalaux)), /**< auxiliary evaluation callback of nonlinear handler */
48  SCIP_NLHDLRDATA* nlhdlrdata /**< data of nonlinear handler (can be NULL) */
49  );
50 
51 /** frees a nonlinear handler */
53  SCIP* scip, /**< SCIP data structure */
54  SCIP_NLHDLR** nlhdlr /**< pointer to nonlinear handler to be freed */
55  );
56 
57 /** call the handler copy callback of a nonlinear handler */
58 SCIP_DECL_NLHDLRCOPYHDLR(SCIPnlhdlrCopyhdlr);
59 
60 /** call the free expression specific data callback of a nonlinear handler */
61 SCIP_DECL_NLHDLRFREEEXPRDATA(SCIPnlhdlrFreeexprdata);
62 
63 /** call the initialization callback of a nonlinear handler */
64 SCIP_DECL_NLHDLRINIT(SCIPnlhdlrInit);
65 
66 /** call the deinitialization callback of a nonlinear handler */
67 SCIP_DECL_NLHDLREXIT(SCIPnlhdlrExit);
68 
69 /** call the detect callback of a nonlinear handler */
70 SCIP_DECL_NLHDLRDETECT(SCIPnlhdlrDetect);
71 
72 /** call the auxiliary evaluation callback of a nonlinear handler */
73 SCIP_DECL_NLHDLREVALAUX(SCIPnlhdlrEvalaux);
74 
75 /** call the interval evaluation callback of a nonlinear handler */
76 SCIP_DECL_NLHDLRINTEVAL(SCIPnlhdlrInteval);
77 
78 /** call the reverse propagation callback of a nonlinear handler */
79 SCIP_DECL_NLHDLRREVERSEPROP(SCIPnlhdlrReverseprop);
80 
81 /** call the separation initialization callback of a nonlinear handler */
82 SCIP_DECL_NLHDLRINITSEPA(SCIPnlhdlrInitsepa);
83 
84 /** call the separation deinitialization callback of a nonlinear handler */
85 SCIP_DECL_NLHDLREXITSEPA(SCIPnlhdlrExitsepa);
86 
87 /** call the enforcement callback of a nonlinear handler */
88 SCIP_DECL_NLHDLRENFO(SCIPnlhdlrEnfo);
89 
90 /** call the estimator callback of a nonlinear handler */
91 SCIP_DECL_NLHDLRESTIMATE(SCIPnlhdlrEstimate);
92 
93 /** reset number of detections counter for last round */
95  SCIP_NLHDLR* nlhdlr /**< nonlinear handler */
96  );
97 
98 /** increments number of cutoffs in statistics */
100  SCIP_NLHDLR* nlhdlr /**< nonlinear handler */
101  );
102 
103 /** increments number of separations in statistics */
105  SCIP_NLHDLR* nlhdlr /**< nonlinear handler */
106  );
107 
108 /** print statistics for nonlinear handlers */
110  SCIP* scip, /**< SCIP data structure */
111  SCIP_NLHDLR** nlhdlrs, /**< nonlinear handlers */
112  int nnlhdlrs, /**< number of nonlinear handlers */
113  FILE* file /**< file handle, or NULL for standard out */
114  );
115 
116 #ifndef NDEBUG
117 #define SCIPnlhdlrResetNDetectionslast(nlhdlr) (nlhdlr)->ndetectionslast = 0
118 #define SCIPnlhdlrIncrementNCutoffs(nlhdlr) ++(nlhdlr)->ncutoffs
119 #define SCIPnlhdlrIncrementNSeparated(nlhdlr) ++(nlhdlr)->nseparated
120 #endif
121 
122 #ifdef __cplusplus
123 }
124 #endif
125 
126 #endif /* SCIP_NLHDLR_H_ */
SCIP_DECL_NLHDLREXIT(SCIPnlhdlrExit)
Definition: nlhdlr.c:437
SCIP_DECL_NLHDLRINTEVAL(SCIPnlhdlrInteval)
Definition: nlhdlr.c:483
SCIP_DECL_NLHDLRCOPYHDLR(SCIPnlhdlrCopyhdlr)
Definition: nlhdlr.c:381
SCIP_DECL_NLHDLRINITSEPA(SCIPnlhdlrInitsepa)
Definition: nlhdlr.c:532
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:54
SCIP_DECL_NLHDLRENFO(SCIPnlhdlrEnfo)
Definition: nlhdlr.c:574
#define SCIPnlhdlrResetNDetectionslast(nlhdlr)
Definition: nlhdlr.h:117
void SCIPnlhdlrPrintStatistics(SCIP *scip, SCIP_NLHDLR **nlhdlrs, int nnlhdlrs, FILE *file)
Definition: nlhdlr.c:688
SCIP_DECL_NLHDLREXITSEPA(SCIPnlhdlrExitsepa)
Definition: nlhdlr.c:557
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:306
SCIP_DECL_NLHDLREVALAUX(SCIPnlhdlrEvalaux)
Definition: nlhdlr.c:472
SCIP_DECL_NLHDLRFREEEXPRDATA(SCIPnlhdlrFreeexprdata)
Definition: nlhdlr.c:393
SCIP_DECL_NLHDLRINIT(SCIPnlhdlrInit)
Definition: nlhdlr.c:409
#define SCIPnlhdlrIncrementNCutoffs(nlhdlr)
Definition: nlhdlr.h:118
SCIP_DECL_NLHDLRDETECT(SCIPnlhdlrDetect)
Definition: nlhdlr.c:450
SCIP_RETCODE SCIPnlhdlrFree(SCIP *scip, SCIP_NLHDLR **nlhdlr)
Definition: nlhdlr.c:353
SCIP_DECL_NLHDLRESTIMATE(SCIPnlhdlrEstimate)
Definition: nlhdlr.c:625
SCIP_DECL_NLHDLRREVERSEPROP(SCIPnlhdlrReverseprop)
Definition: nlhdlr.c:502
structure definitions related to nonlinear handlers of nonlinear constraints
struct SCIP_NlhdlrData SCIP_NLHDLRDATA
Definition: type_nlhdlr.h:403
public functions of nonlinear handlers of nonlinear constraints
#define SCIPnlhdlrIncrementNSeparated(nlhdlr)
Definition: nlhdlr.h:119