Detailed Description
default nonlinear handler that calls expression handler methods
Definition in file nlhdlr_default.c.
#include <string.h>
#include "scip/nlhdlr_default.h"
#include "scip/pub_nlhdlr.h"
#include "scip/cons_nonlinear.h"
Go to the source code of this file.
Macros | |
#define | NLHDLR_NAME "default" |
#define | NLHDLR_DESC "default handler for expressions" |
#define | NLHDLR_DETECTPRIORITY 0 |
#define | NLHDLR_ENFOPRIORITY 0 |
#define | infty2infty(infty1, infty2, val) ((val) >= (infty1) ? (infty2) : (val)) |
#define | UNDERESTIMATEUSESACTIVITY 0x1u |
#define | OVERESTIMATEUSESACTIVITY 0x2u |
Functions | |
static SCIP_RETCODE | evalExprInAux (SCIP *scip, SCIP_EXPR *expr, SCIP_Real *val, SCIP_SOL *sol) |
static | SCIP_DECL_NLHDLRDETECT (nlhdlrDetectDefault) |
static | SCIP_DECL_NLHDLREVALAUX (nlhdlrEvalAuxDefault) |
static | SCIP_DECL_NLHDLRINITSEPA (nlhdlrInitSepaDefault) |
static | SCIP_DECL_NLHDLRESTIMATE (nlhdlrEstimateDefault) |
static | SCIP_DECL_NLHDLRINTEVAL (nlhdlrIntevalDefault) |
static | SCIP_DECL_NLHDLRREVERSEPROP (nlhdlrReversepropDefault) |
static | SCIP_DECL_NLHDLRCOPYHDLR (nlhdlrCopyhdlrDefault) |
static | SCIP_DECL_NLHDLRFREEEXPRDATA (nlhdlrFreeExprDataDefault) |
SCIP_RETCODE | SCIPincludeNlhdlrDefault (SCIP *scip) |
Macro Definition Documentation
◆ NLHDLR_NAME
#define NLHDLR_NAME "default" |
Definition at line 38 of file nlhdlr_default.c.
Referenced by SCIP_DECL_NLHDLRCOPYHDLR(), and SCIPincludeNlhdlrDefault().
◆ NLHDLR_DESC
#define NLHDLR_DESC "default handler for expressions" |
Definition at line 39 of file nlhdlr_default.c.
Referenced by SCIPincludeNlhdlrDefault().
◆ NLHDLR_DETECTPRIORITY
#define NLHDLR_DETECTPRIORITY 0 |
Definition at line 40 of file nlhdlr_default.c.
Referenced by SCIPincludeNlhdlrDefault().
◆ NLHDLR_ENFOPRIORITY
#define NLHDLR_ENFOPRIORITY 0 |
Definition at line 41 of file nlhdlr_default.c.
Referenced by SCIPincludeNlhdlrDefault().
◆ infty2infty
#define infty2infty | ( | infty1, | |
infty2, | |||
val | |||
) | ((val) >= (infty1) ? (infty2) : (val)) |
translate from one value of infinity to another
if val is ≥ infty1, then give infty2, else give val
Definition at line 47 of file nlhdlr_default.c.
Referenced by SCIP_DECL_NLHDLRESTIMATE(), and SCIP_DECL_NLHDLRINITSEPA().
◆ UNDERESTIMATEUSESACTIVITY
#define UNDERESTIMATEUSESACTIVITY 0x1u |
whether underestimation uses activity
Definition at line 49 of file nlhdlr_default.c.
Referenced by SCIP_DECL_NLHDLRDETECT(), SCIP_DECL_NLHDLRESTIMATE(), and SCIP_DECL_NLHDLRINITSEPA().
◆ OVERESTIMATEUSESACTIVITY
#define OVERESTIMATEUSESACTIVITY 0x2u |
whether overestimation uses activity
Definition at line 50 of file nlhdlr_default.c.
Referenced by SCIP_DECL_NLHDLRDETECT(), SCIP_DECL_NLHDLRESTIMATE(), and SCIP_DECL_NLHDLRINITSEPA().
Function Documentation
◆ evalExprInAux()
|
static |
evaluates an expression w.r.t. the values in the auxiliary variables
- Parameters
-
scip SCIP data structure expr expression to be evaluated val buffer to store value of expression sol solution to be evaluated
Definition at line 57 of file nlhdlr_default.c.
References NULL, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPcallExprEval(), SCIPexprGetChildren(), SCIPexprGetNChildren(), SCIPfreeBufferArray, SCIPgetExprAuxVarNonlinear(), and SCIPgetSolVal().
Referenced by SCIP_DECL_NLHDLREVALAUX().
◆ SCIP_DECL_NLHDLRDETECT()
|
static |
check whether expression should be handled by the default nlhdlr
if no nlhdlr so far provides enforcement or boundtightening for expr, then the default nlhdlr takes over
Definition at line 99 of file nlhdlr_default.c.
References FALSE, NULL, OVERESTIMATEUSESACTIVITY, SCIP_Bool, SCIP_CALL, SCIP_EXPRCURV_CONCAVE, SCIP_EXPRCURV_CONVEX, SCIP_NLHDLR_METHOD_ACTIVITY, SCIP_NLHDLR_METHOD_SEPAABOVE, SCIP_NLHDLR_METHOD_SEPABELOW, SCIP_NLHDLR_METHOD_SEPABOTH, SCIP_OKAY, SCIPallocBufferArray, SCIPexprGetChildren(), SCIPexprGetHdlr(), SCIPexprGetNChildren(), SCIPexprhdlrHasEstimate(), SCIPexprhdlrHasIntEval(), SCIPexprhdlrHasReverseProp(), SCIPfreeBufferArray, SCIPregisterExprUsageNonlinear(), and UNDERESTIMATEUSESACTIVITY.
◆ SCIP_DECL_NLHDLREVALAUX()
|
static |
evaluate expression w.r.t. values of auxiliary variables in children
Definition at line 198 of file nlhdlr_default.c.
References evalExprInAux(), NULL, SCIP_CALL, and SCIP_OKAY.
◆ SCIP_DECL_NLHDLRINITSEPA()
|
static |
initialize LP relaxation by initial estimators
Definition at line 210 of file nlhdlr_default.c.
References FALSE, infty2infty, NULL, OVERESTIMATEUSESACTIVITY, SCIP_Bool, SCIP_CALL, SCIP_EXPR_MAXINITESTIMATES, SCIP_INTERVAL_INFINITY, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_Real, SCIP_SIDETYPE_LEFT, SCIP_SIDETYPE_RIGHT, SCIPaddRow(), SCIPaddRowprepTerm(), SCIPallocBufferArray, SCIPchgRowLhs(), SCIPchgRowRhs(), SCIPcleanupRowprep2(), SCIPcreateRowprep(), SCIPdebug, SCIPdebugMsg, SCIPensureRowprepSize(), SCIPevalExprActivity(), SCIPexprGetActivity(), SCIPexprGetChildren(), SCIPexprGetHdlr(), SCIPexprGetNChildren(), SCIPexprhdlrGetName(), SCIPexprhdlrHasInitEstimates(), SCIPfreeBufferArray, SCIPfreeRowprep(), SCIPgetDepth(), SCIPgetExprAuxVarNonlinear(), SCIPgetHugeValue(), SCIPgetRowprepRowCons(), SCIPinfinity(), SCIPinfoMessage(), SCIPintervalIntersect(), SCIPintervalIsEmpty(), SCIPintervalSetBounds(), SCIPisExprSum(), SCIPisInfinity(), SCIPprintExpr(), SCIPprintRow(), SCIPreleaseRow(), SCIProwGetLhs(), SCIProwGetRhs(), SCIProwprepAddConstant(), SCIProwprepGetName(), SCIProwprepGetNVars(), SCIProwprepGetSidetype(), SCIProwprepReset(), SCIProwprepSetSidetype(), SCIPscaleupRowprep(), SCIPsnprintf(), SCIPvarGetLbGlobal(), SCIPvarGetUbGlobal(), TRUE, and UNDERESTIMATEUSESACTIVITY.
◆ SCIP_DECL_NLHDLRESTIMATE()
|
static |
compute linear estimator
Definition at line 376 of file nlhdlr_default.c.
References FALSE, infty2infty, NULL, OVERESTIMATEUSESACTIVITY, SCIP_Bool, SCIP_CALL, SCIP_INTERVAL_INFINITY, SCIP_Longint, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_Real, SCIP_SIDETYPE_LEFT, SCIP_SIDETYPE_RIGHT, SCIPaddExprsViolScoreNonlinear(), SCIPaddRowprepTerm(), SCIPallocBufferArray, SCIPcreateRowprep(), SCIPdebug, SCIPensureRowprepSize(), SCIPepsilon(), SCIPevalExprActivity(), SCIPexprGetActivity(), SCIPexprGetChildren(), SCIPexprGetHdlr(), SCIPexprGetNChildren(), SCIPexprhdlrGetName(), SCIPexprhdlrIncrementNBranchings(), SCIPfreeBufferArray, SCIPfreeRowprep(), SCIPgetExprAbsAuxViolationNonlinear(), SCIPgetExprAuxVarNonlinear(), SCIPgetExprRelAuxViolationNonlinear(), SCIPgetNLPs(), SCIPgetSolVal(), SCIPinfinity(), SCIPinfoMessage(), SCIPintervalIntersectEps(), SCIPintervalIsEmpty(), SCIPintervalSetBounds(), SCIPprintExpr(), SCIPprintRowprepSol(), SCIProwprepAddConstant(), SCIProwprepGetCoefs(), SCIProwprepGetName(), SCIProwprepSetLocal(), SCIPsetPtrarrayVal(), SCIPsnprintf(), SCIPsolGetIndex(), SCIPvarGetLbGlobal(), SCIPvarGetLbLocal(), SCIPvarGetUbGlobal(), SCIPvarGetUbLocal(), TRUE, and UNDERESTIMATEUSESACTIVITY.
◆ SCIP_DECL_NLHDLRINTEVAL()
|
static |
interval-evaluate expression w.r.t. activity of children
Definition at line 539 of file nlhdlr_default.c.
◆ SCIP_DECL_NLHDLRREVERSEPROP()
|
static |
tighten bounds on children from bounds on expression and bounds on children
Definition at line 552 of file nlhdlr_default.c.
References NULL, SCIP_CALL, SCIP_OKAY, SCIPallocBufferArray, SCIPexprGetChildren(), SCIPexprGetHdlr(), SCIPexprGetNChildren(), SCIPexprhdlrIncrementNDomainReductions(), SCIPfreeBufferArray, SCIPgetExprBoundsNonlinear(), and SCIPtightenExprIntervalNonlinear().
◆ SCIP_DECL_NLHDLRCOPYHDLR()
|
static |
nonlinear handler copy callback
Definition at line 588 of file nlhdlr_default.c.
References NLHDLR_NAME, NULL, SCIP_CALL, SCIP_OKAY, SCIPincludeNlhdlrDefault(), and SCIPnlhdlrGetName().
◆ SCIP_DECL_NLHDLRFREEEXPRDATA()
|
static |
callback to free expression specific data
Definition at line 601 of file nlhdlr_default.c.