Scippy

SCIP

Solving Constraint Integer Programs

Detailed Description

default nonlinear handler that calls expression handler methods

Author
Stefan Vigerske

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 29 of file nlhdlr_default.c.

Referenced by SCIP_DECL_NLHDLRCOPYHDLR(), and SCIPincludeNlhdlrDefault().

◆ NLHDLR_DESC

#define NLHDLR_DESC   "default handler for expressions"

Definition at line 30 of file nlhdlr_default.c.

Referenced by SCIPincludeNlhdlrDefault().

◆ NLHDLR_DETECTPRIORITY

#define NLHDLR_DETECTPRIORITY   0

Definition at line 31 of file nlhdlr_default.c.

Referenced by SCIPincludeNlhdlrDefault().

◆ NLHDLR_ENFOPRIORITY

#define NLHDLR_ENFOPRIORITY   0

Definition at line 32 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 38 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 40 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 41 of file nlhdlr_default.c.

Referenced by SCIP_DECL_NLHDLRDETECT(), SCIP_DECL_NLHDLRESTIMATE(), and SCIP_DECL_NLHDLRINITSEPA().

Function Documentation

◆ evalExprInAux()

static SCIP_RETCODE evalExprInAux ( SCIP scip,
SCIP_EXPR expr,
SCIP_Real val,
SCIP_SOL sol 
)
static

evaluates an expression w.r.t. the values in the auxiliary variables

Parameters
scipSCIP data structure
exprexpression to be evaluated
valbuffer to store value of expression
solsolution to be evaluated

Definition at line 48 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 SCIP_DECL_NLHDLRDETECT ( nlhdlrDetectDefault  )
static

◆ SCIP_DECL_NLHDLREVALAUX()

static SCIP_DECL_NLHDLREVALAUX ( nlhdlrEvalAuxDefault  )
static

evaluate expression w.r.t. values of auxiliary variables in children

Definition at line 189 of file nlhdlr_default.c.

References evalExprInAux(), NULL, SCIP_CALL, and SCIP_OKAY.

◆ SCIP_DECL_NLHDLRINITSEPA()

◆ SCIP_DECL_NLHDLRESTIMATE()

◆ SCIP_DECL_NLHDLRINTEVAL()

static SCIP_DECL_NLHDLRINTEVAL ( nlhdlrIntevalDefault  )
static

interval-evaluate expression w.r.t. activity of children

Definition at line 530 of file nlhdlr_default.c.

References NULL, SCIP_CALL, and SCIP_OKAY.

◆ SCIP_DECL_NLHDLRREVERSEPROP()

static SCIP_DECL_NLHDLRREVERSEPROP ( nlhdlrReversepropDefault  )
static

◆ SCIP_DECL_NLHDLRCOPYHDLR()

static SCIP_DECL_NLHDLRCOPYHDLR ( nlhdlrCopyhdlrDefault  )
static

nonlinear handler copy callback

Definition at line 579 of file nlhdlr_default.c.

References NLHDLR_NAME, NULL, SCIP_CALL, SCIP_OKAY, SCIPincludeNlhdlrDefault(), and SCIPnlhdlrGetName().

◆ SCIP_DECL_NLHDLRFREEEXPRDATA()

static SCIP_DECL_NLHDLRFREEEXPRDATA ( nlhdlrFreeExprDataDefault  )
static

callback to free expression specific data

Definition at line 592 of file nlhdlr_default.c.

References NULL, and SCIP_OKAY.