44#define CONVEX_NLHDLR_NAME "convex"
45#define CONVEX_NLHDLR_DESC "handler that identifies and estimates convex expressions"
46#define CONVEX_NLHDLR_DETECTPRIORITY 50
47#define CONVEX_NLHDLR_ENFOPRIORITY 50
49#define CONCAVE_NLHDLR_NAME "concave"
50#define CONCAVE_NLHDLR_DESC "handler that identifies and estimates concave expressions"
51#define CONCAVE_NLHDLR_DETECTPRIORITY 40
52#define CONCAVE_NLHDLR_ENFOPRIORITY 40
54#define DEFAULT_DETECTSUM FALSE
55#define DEFAULT_EXTENDEDFORM TRUE
56#define DEFAULT_CVXQUADRATIC_CONVEX TRUE
57#define DEFAULT_CVXQUADRATIC_CONCAVE FALSE
58#define DEFAULT_CVXSIGNOMIAL TRUE
59#define DEFAULT_CVXPRODCOMP TRUE
60#define DEFAULT_HANDLETRIVIAL FALSE
61#define DEFAULT_MAXPERTURB 0.01
63#define INITLPMAXVARVAL 1000.0
64#define RANDNUMINITSEED 220802
76struct SCIP_NlhdlrExprData
88 SCIP_Bool isnlhdlrconvex;
95 SCIP_Bool extendedform;
99 SCIP_Bool cvxquadratic;
100 SCIP_Bool cvxsignomial;
101 SCIP_Bool cvxprodcomp;
102 SCIP_Bool handletrivial;
121#define DECL_CURVCHECK(x) SCIP_RETCODE x( \
124 SCIP_Bool isrootexpr, \
126 SCIP_HASHMAP* nlexpr2origexpr, \
127 SCIP_NLHDLRDATA* nlhdlrdata, \
128 SCIP_HASHMAP* assumevarfixed, \
205 for(
i = 0;
i < nchildren; ++
i )
230#ifdef SCIP_MORE_DEBUG
235#ifdef SCIP_MORE_DEBUG
382 if( nquadexprs <= 1 )
408 for(
i = 0;
i < nquadexprs; ++
i )
664#ifndef NLHDLR_CONVEX_UNITTEST
679#ifdef SCIP_MORE_DEBUG
788#ifndef NLHDLR_CONVEX_UNITTEST
864#ifdef SCIP_MORE_DEBUG
883 for(
i = 0;
i < nchildren; ++
i )
936 for(
c = 0;
c < nchildren; ++
c )
1010#ifdef SCIP_MORE_DEBUG
1087#ifdef SCIP_MORE_DEBUG
1089 SCIPinfoMessage(
scip,
NULL,
"... is a multivariate linear sum that we'll treat as auxvar instead (postprocess)\n");
1163 assert(nlhdlrexprdata->nlexpr2origexpr !=
NULL);
1167 assert(nlhdlrexprdata->nleafs > 0);
1172 nlhdlrexprdata->nleafs = 0;
1242 assert(nlhdlrexprdata->nleafs > 0);
1266 nlhdlrexprdata->leafexprs[idx] = leaf;
1303 (*nlhdlrexprdata)->nlexpr = nlexpr;
1304 (*nlhdlrexprdata)->nlexpr2origexpr = nlexpr2origexpr;
1305 (*nlhdlrexprdata)->nleafs = nleafs;
1378 SCIP_Bool overestimate,
1379 SCIP_Real targetvalue,
1409 for(
i = 0;
i < nlhdlrexprdata->nleafs; ++
i )
1428 evaldata.nlhdlrexprdata = nlhdlrexprdata;
1436 for(
i = 0;
i < nlhdlrexprdata->nleafs; ++
i )
1485 for(
i = 0;
i < nlhdlrexprdata->nleafs; ++
i )
1513 SCIP_Real
QUAD(constant);
1521 nlexpr = nlhdlrexprdata->nlexpr;
1540 for(
i = 0;
i < nlhdlrexprdata->nleafs; ++
i )
1550 SCIPdebugMsg(
scip,
"gradient evaluation error for component %d of %p\n",
i, (
void*)nlexpr);
1628 for(
i = 0;
i < nlhdlrexprdata->nleafs; ++
i )
1642 val =
MIN(ub,
MAX(lb, val));
1653 else if( val +
p >= ub )
1688 SCIP_Real left, right;
1692 assert(nlhdlrexprdata->nleafs == 1);
1696 nlexpr = nlhdlrexprdata->nlexpr;
1886 if( nlexpr !=
NULL )
1892 SCIPdebugMsg(
scip,
"detected expr %p to be convex -> can enforce expr <= auxvar\n", (
void*)expr);
1904 if( nlexpr !=
NULL )
1910 SCIPdebugMsg(
scip,
"detected expr %p to be concave -> can enforce expr >= auxvar\n", (
void*)expr);
1968 nlexpr = nlhdlrexprdata->nlexpr;
1977 overestimate =
FALSE;
1979 underestimate =
FALSE;
1980 if( !overestimate && !underestimate )
1989 *infeasible =
FALSE;
1991 for(
k = 0;
k < 5; ++
k )
1994 lambda = 0.1 * (
k+1);
1996 for(
i = 0;
i < nlhdlrexprdata->nleafs; ++
i )
2045 overestimate ?
"over" :
"under", (
void*)expr,
k);
2097 if( nlhdlrexprdata->nleafs == 1 &&
SCIPexprIsIntegral(nlhdlrexprdata->leafexprs[0]) )
2102 overestimate ?
"over" :
"under",
2114 overestimate ?
"over" :
"under",
2151 assert(underestimate == !overestimate);
2158 if( nlhdlrexprdata->nleafs == 1 &&
SCIPexprIsIntegral(nlhdlrexprdata->leafexprs[0]) )
2230 "whether to run convexity detection when the root of an expression is a non-quadratic sum",
2234 "whether to create extended formulations instead of looking for maximal convex expressions",
2238 "maximal relative perturbation of non-differentiable reference point",
2242 "whether to use convexity check on quadratics",
2246 "whether to use convexity check on signomials",
2250 "whether to use convexity check on product composition f(h)*h",
2254 "whether to also handle trivial convex expressions",
2332 SCIPdebugMsg(
scip,
"Too many variables (%d) in constructed expression. Will not be able to estimate. Rejecting.\n", nleafs);
2336 if( nlexpr !=
NULL )
2342 SCIPdebugMsg(
scip,
"detected expr %p to be concave -> can enforce expr <= auxvar\n", (
void*)expr);
2357 SCIPdebugMsg(
scip,
"Too many variables (%d) in constructed expression. Will not be able to estimate. Rejecting.\n", nleafs);
2361 if( nlexpr !=
NULL )
2367 SCIPdebugMsg(
scip,
"detected expr %p to be convex -> can enforce expr >= auxvar\n", (
void*)expr);
2403 nlexpr = nlhdlrexprdata->nlexpr;
2414 overestimate =
FALSE;
2416 underestimate =
FALSE;
2417 if( !overestimate && !underestimate )
2442 overestimate ?
"over" :
"under", (
void*)expr);
2493 overestimate ?
"over" :
"under",
2533 if( nlhdlrexprdata->nleafs == 1 )
2548 for(
c = 0;
c < nlhdlrexprdata->nleafs; ++
c )
2593 "whether to run convexity detection when the root of an expression is a sum",
2600 "whether to use convexity check on quadratics",
2604 "whether to use convexity check on signomials",
2608 "whether to use convexity check on product composition f(h)*h",
2612 "whether to also handle trivial convex expressions",
constraint handler for nonlinear constraints specified by algebraic expressions
defines macros for basic operations in double-double arithmetic giving roughly twice the precision of...
#define SCIPquadprecSumQD(r, a, b)
#define QUAD_ASSIGN(a, constant)
#define SCIP_CALL_ABORT(x)
#define SCIP_LONGINT_FORMAT
absolute expression handler
variable expression handler
SCIP_Bool SCIPassumeConvexNonlinear(SCIP_CONSHDLR *conshdlr)
SCIP_VAR * SCIPgetExprAuxVarNonlinear(SCIP_EXPR *expr)
SCIP_RETCODE SCIPaddExprsViolScoreNonlinear(SCIP *scip, SCIP_EXPR **exprs, int nexprs, SCIP_Real violscore, SCIP_SOL *sol, SCIP_Bool *success)
SCIP_RETCODE SCIPregisterExprUsageNonlinear(SCIP *scip, SCIP_EXPR *expr, SCIP_Bool useauxvar, SCIP_Bool useactivityforprop, SCIP_Bool useactivityforsepabelow, SCIP_Bool useactivityforsepaabove)
SCIP_RETCODE SCIPcomputeFacetVertexPolyhedralNonlinear(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_Bool overestimate, SCIP_DECL_VERTEXPOLYFUN((*function)), void *fundata, SCIP_Real *xstar, SCIP_Real *box, int nallvars, SCIP_Real targetvalue, SCIP_Bool *success, SCIP_Real *facetcoefs, SCIP_Real *facetconstant)
#define SCIP_DECL_VERTEXPOLYFUN(f)
#define SCIP_MAXVERTEXPOLYDIM
SCIP_RETCODE SCIPcreateExprVar(SCIP *scip, SCIP_EXPR **expr, SCIP_VAR *var, SCIP_DECL_EXPR_OWNERCREATE((*ownercreate)), void *ownercreatedata)
SCIP_Bool SCIPisExprAbs(SCIP *scip, SCIP_EXPR *expr)
void SCIPhashmapFree(SCIP_HASHMAP **hashmap)
void * SCIPhashmapGetImage(SCIP_HASHMAP *hashmap, void *origin)
SCIP_RETCODE SCIPhashmapInsert(SCIP_HASHMAP *hashmap, void *origin, void *image)
SCIP_RETCODE SCIPhashmapSetImage(SCIP_HASHMAP *hashmap, void *origin, void *image)
int SCIPhashmapEntryGetImageInt(SCIP_HASHMAPENTRY *entry)
int SCIPhashmapGetNEntries(SCIP_HASHMAP *hashmap)
SCIP_HASHMAPENTRY * SCIPhashmapGetEntry(SCIP_HASHMAP *hashmap, int entryidx)
SCIP_RETCODE SCIPhashmapCreate(SCIP_HASHMAP **hashmap, BMS_BLKMEM *blkmem, int mapsize)
void * SCIPhashmapEntryGetOrigin(SCIP_HASHMAPENTRY *entry)
SCIP_Bool SCIPhashmapExists(SCIP_HASHMAP *hashmap, void *origin)
SCIP_RETCODE SCIPhashmapInsertInt(SCIP_HASHMAP *hashmap, void *origin, int image)
SCIP_RETCODE SCIPhashmapRemoveAll(SCIP_HASHMAP *hashmap)
void SCIPhashsetFree(SCIP_HASHSET **hashset, BMS_BLKMEM *blkmem)
SCIP_Bool SCIPhashsetExists(SCIP_HASHSET *hashset, void *element)
SCIP_RETCODE SCIPhashsetInsert(SCIP_HASHSET *hashset, BMS_BLKMEM *blkmem, void *element)
SCIP_RETCODE SCIPhashsetCreate(SCIP_HASHSET **hashset, BMS_BLKMEM *blkmem, int size)
void SCIPinfoMessage(SCIP *scip, FILE *file, const char *formatstr,...)
SCIP_RETCODE SCIPhasExprCurvature(SCIP *scip, SCIP_EXPR *expr, SCIP_EXPRCURV curv, SCIP_Bool *success, SCIP_HASHMAP *assumevarfixed)
SCIP_RETCODE SCIPincludeNlhdlrConvex(SCIP *scip)
SCIP_RETCODE SCIPincludeNlhdlrConcave(SCIP *scip)
SCIP_RETCODE SCIPaddRealParam(SCIP *scip, const char *name, const char *desc, SCIP_Real *valueptr, SCIP_Bool isadvanced, SCIP_Real defaultvalue, SCIP_Real minvalue, SCIP_Real maxvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
SCIP_RETCODE SCIPaddBoolParam(SCIP *scip, const char *name, const char *desc, SCIP_Bool *valueptr, SCIP_Bool isadvanced, SCIP_Bool defaultvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
SCIP_RETCODE SCIPaddPoolCut(SCIP *scip, SCIP_ROW *row)
SCIP_RETCODE SCIPaddRow(SCIP *scip, SCIP_ROW *row, SCIP_Bool forcecut, SCIP_Bool *infeasible)
SCIP_RETCODE SCIPsetPtrarrayVal(SCIP *scip, SCIP_PTRARRAY *ptrarray, int idx, void *val)
const char * SCIPexprhdlrGetName(SCIP_EXPRHDLR *exprhdlr)
SCIP_Bool SCIPexprhdlrHasBwdiff(SCIP_EXPRHDLR *exprhdlr)
const char * SCIPexprcurvGetName(SCIP_EXPRCURV curv)
SCIP_RETCODE SCIPappendExprChild(SCIP *scip, SCIP_EXPR *expr, SCIP_EXPR *child)
SCIP_RETCODE SCIPevalExpr(SCIP *scip, SCIP_EXPR *expr, SCIP_SOL *sol, SCIP_Longint soltag)
int SCIPexprGetNChildren(SCIP_EXPR *expr)
SCIP_RETCODE SCIPcomputeExprIntegrality(SCIP *scip, SCIP_EXPR *expr)
SCIP_Real SCIPgetExponentExprPow(SCIP_EXPR *expr)
SCIP_Bool SCIPisExprProduct(SCIP *scip, SCIP_EXPR *expr)
SCIP_RETCODE SCIPevalExprGradient(SCIP *scip, SCIP_EXPR *expr, SCIP_SOL *sol, SCIP_Longint soltag)
SCIP_Bool SCIPexpriterIsEnd(SCIP_EXPRITER *iterator)
void SCIPexprSetCurvature(SCIP_EXPR *expr, SCIP_EXPRCURV curvature)
SCIP_EXPR * SCIPexpriterSkipDFS(SCIP_EXPRITER *iterator)
SCIP_Real SCIPexprGetDerivative(SCIP_EXPR *expr)
SCIP_Bool SCIPisExprSum(SCIP *scip, SCIP_EXPR *expr)
SCIP_RETCODE SCIPduplicateExprShallow(SCIP *scip, SCIP_EXPR *expr, SCIP_EXPR **copyexpr, SCIP_DECL_EXPR_OWNERCREATE((*ownercreate)), void *ownercreatedata)
SCIP_Bool SCIPexprIsIntegral(SCIP_EXPR *expr)
void SCIPexprGetQuadraticData(SCIP_EXPR *expr, SCIP_Real *constant, int *nlinexprs, SCIP_EXPR ***linexprs, SCIP_Real **lincoefs, int *nquadexprs, int *nbilinexprs, SCIP_Real **eigenvalues, SCIP_Real **eigenvectors)
SCIP_RETCODE SCIPreplaceExprChild(SCIP *scip, SCIP_EXPR *expr, int childidx, SCIP_EXPR *newchild)
SCIP_Real * SCIPgetCoefsExprSum(SCIP_EXPR *expr)
SCIP_Bool SCIPisExprValue(SCIP *scip, SCIP_EXPR *expr)
SCIP_Real SCIPgetCoefExprProduct(SCIP_EXPR *expr)
int SCIPcompareExpr(SCIP *scip, SCIP_EXPR *expr1, SCIP_EXPR *expr2)
SCIP_RETCODE SCIPreleaseExpr(SCIP *scip, SCIP_EXPR **expr)
SCIP_EXPR * SCIPexpriterGetCurrent(SCIP_EXPRITER *iterator)
SCIP_Bool SCIPexprcurvMonomialInv(SCIP_EXPRCURV monomialcurv, int nfactors, SCIP_Real *exponents, SCIP_INTERVAL *factorbounds, SCIP_EXPRCURV *factorcurv)
void SCIPexpriterSetStagesDFS(SCIP_EXPRITER *iterator, SCIP_EXPRITER_STAGE stopstages)
SCIP_Bool SCIPisExprVar(SCIP *scip, SCIP_EXPR *expr)
SCIP_RETCODE SCIPcomputeExprQuadraticCurvature(SCIP *scip, SCIP_EXPR *expr, SCIP_EXPRCURV *curv, SCIP_HASHMAP *assumevarfixed, SCIP_Bool storeeigeninfo)
SCIP_EXPRCURV SCIPexprcurvMultiply(SCIP_Real factor, SCIP_EXPRCURV curvature)
SCIP_RETCODE SCIPcreateExpriter(SCIP *scip, SCIP_EXPRITER **iterator)
SCIP_RETCODE SCIPprintExpr(SCIP *scip, SCIP_EXPR *expr, FILE *file)
SCIP_EXPRCURV SCIPexprGetCurvature(SCIP_EXPR *expr)
SCIP_Bool SCIPisExprPower(SCIP *scip, SCIP_EXPR *expr)
SCIP_Real SCIPexprGetEvalValue(SCIP_EXPR *expr)
SCIP_EXPR * SCIPexpriterGetNext(SCIP_EXPRITER *iterator)
SCIP_RETCODE SCIPcheckExprQuadratic(SCIP *scip, SCIP_EXPR *expr, SCIP_Bool *isquadratic)
SCIP_EXPR ** SCIPexprGetChildren(SCIP_EXPR *expr)
SCIP_Real SCIPgetConstantExprSum(SCIP_EXPR *expr)
SCIP_VAR * SCIPgetVarExprVar(SCIP_EXPR *expr)
SCIP_INTERVAL SCIPexprGetActivity(SCIP_EXPR *expr)
void SCIPexprGetQuadraticQuadTerm(SCIP_EXPR *quadexpr, int termidx, SCIP_EXPR **expr, SCIP_Real *lincoef, SCIP_Real *sqrcoef, int *nadjbilin, int **adjbilin, SCIP_EXPR **sqrexpr)
int SCIPexpriterGetChildIdxDFS(SCIP_EXPRITER *iterator)
void SCIPfreeExpriter(SCIP_EXPRITER **iterator)
void SCIPcaptureExpr(SCIP_EXPR *expr)
SCIP_RETCODE SCIPexpriterInit(SCIP_EXPRITER *iterator, SCIP_EXPR *expr, SCIP_EXPRITER_TYPE type, SCIP_Bool allowrevisit)
SCIP_Longint SCIPexprGetDiffTag(SCIP_EXPR *expr)
SCIP_RETCODE SCIPremoveExprChildren(SCIP *scip, SCIP_EXPR *expr)
SCIP_RETCODE SCIPevalExprActivity(SCIP *scip, SCIP_EXPR *expr)
SCIP_EXPRHDLR * SCIPexprGetHdlr(SCIP_EXPR *expr)
SCIP_EXPR * SCIPexpriterGetChildExprDFS(SCIP_EXPRITER *iterator)
#define SCIPallocClearBlockMemory(scip, ptr)
int SCIPcalcMemGrowSize(SCIP *scip, int num)
#define SCIPallocBufferArray(scip, ptr, num)
#define SCIPreallocBufferArray(scip, ptr, num)
#define SCIPfreeBufferArray(scip, ptr)
#define SCIPallocBlockMemoryArray(scip, ptr, num)
#define SCIPfreeBlockMemory(scip, ptr)
#define SCIPfreeBlockMemoryArrayNull(scip, ptr, num)
#define SCIPallocBlockMemory(scip, ptr)
void SCIPnlhdlrSetInitExit(SCIP_NLHDLR *nlhdlr, SCIP_DECL_NLHDLRINIT((*init)),)
SCIP_NLHDLRDATA * SCIPnlhdlrGetData(SCIP_NLHDLR *nlhdlr)
void SCIPnlhdlrSetFreeExprData(SCIP_NLHDLR *nlhdlr,)
const char * SCIPnlhdlrGetName(SCIP_NLHDLR *nlhdlr)
void SCIPnlhdlrSetSollinearize(SCIP_NLHDLR *nlhdlr,)
void SCIPnlhdlrSetSepa(SCIP_NLHDLR *nlhdlr, SCIP_DECL_NLHDLRINITSEPA((*initsepa)), SCIP_DECL_NLHDLRENFO((*enfo)), SCIP_DECL_NLHDLRESTIMATE((*estimate)),)
void SCIPnlhdlrSetFreeHdlrData(SCIP_NLHDLR *nlhdlr,)
void SCIPnlhdlrSetCopyHdlr(SCIP_NLHDLR *nlhdlr,)
SCIP_RETCODE SCIPincludeNlhdlrNonlinear(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)
SCIP_RETCODE SCIPprintRow(SCIP *scip, SCIP_ROW *row, FILE *file)
SCIP_RETCODE SCIPreleaseRow(SCIP *scip, SCIP_ROW **row)
int SCIPsolGetIndex(SCIP_SOL *sol)
SCIP_RETCODE SCIPsetSolVal(SCIP *scip, SCIP_SOL *sol, SCIP_VAR *var, SCIP_Real val)
SCIP_Real SCIPgetSolVal(SCIP *scip, SCIP_SOL *sol, SCIP_VAR *var)
SCIP_Longint SCIPgetNLPs(SCIP *scip)
SCIP_Bool SCIPisRelEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Real SCIPinfinity(SCIP *scip)
SCIP_Bool SCIPisIntegral(SCIP *scip, SCIP_Real val)
SCIP_Real SCIPfloor(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisInfinity(SCIP *scip, SCIP_Real val)
SCIP_Real SCIPround(SCIP *scip, SCIP_Real val)
SCIP_Real SCIPgetHugeValue(SCIP *scip)
SCIP_Real SCIPceil(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisZero(SCIP *scip, SCIP_Real val)
SCIP_Real SCIPepsilon(SCIP *scip)
SCIP_BOUNDTYPE SCIPvarGetBestBoundType(SCIP_VAR *var)
SCIP_Real SCIPvarGetUbLocal(SCIP_VAR *var)
SCIP_Real SCIPvarGetUbGlobal(SCIP_VAR *var)
const char * SCIPvarGetName(SCIP_VAR *var)
SCIP_Real SCIPvarGetLbLocal(SCIP_VAR *var)
SCIP_Real SCIPvarGetLbGlobal(SCIP_VAR *var)
SCIP_Real SCIPrandomGetReal(SCIP_RANDNUMGEN *randnumgen, SCIP_Real minrandval, SCIP_Real maxrandval)
SCIP_RETCODE SCIPcleanupRowprep2(SCIP *scip, SCIP_ROWPREP *rowprep, SCIP_SOL *sol, SCIP_Real maxcoefbound, SCIP_Bool *success)
SCIP_RETCODE SCIPensureRowprepSize(SCIP *scip, SCIP_ROWPREP *rowprep, int size)
SCIP_Real * SCIProwprepGetCoefs(SCIP_ROWPREP *rowprep)
char * SCIProwprepGetName(SCIP_ROWPREP *rowprep)
SCIP_Bool SCIProwprepIsLocal(SCIP_ROWPREP *rowprep)
void SCIProwprepAddConstant(SCIP_ROWPREP *rowprep, SCIP_Real constant)
SCIP_RETCODE SCIPaddRowprepTerm(SCIP *scip, SCIP_ROWPREP *rowprep, SCIP_VAR *var, SCIP_Real coef)
SCIP_RETCODE SCIPgetRowprepRowCons(SCIP *scip, SCIP_ROW **row, SCIP_ROWPREP *rowprep, SCIP_CONS *cons)
SCIP_RETCODE SCIPcreateRowprep(SCIP *scip, SCIP_ROWPREP **rowprep, SCIP_SIDETYPE sidetype, SCIP_Bool local)
void SCIProwprepSetLocal(SCIP_ROWPREP *rowprep, SCIP_Bool islocal)
void SCIPfreeRowprep(SCIP *scip, SCIP_ROWPREP **rowprep)
void SCIPprintRowprep(SCIP *scip, SCIP_ROWPREP *rowprep, FILE *file)
int SCIPsnprintf(char *t, int len, const char *s,...)
SCIPfreeSol(scip, &heurdata->sol))
SCIPcreateSol(scip, &heurdata->sol, heur))
SCIPfreeRandom(scip, &heurdata->randnumgen)
SCIPcreateRandom(scip, &heurdata->randnumgen, DEFAULT_RANDSEED, TRUE))
assert(minobj< SCIPgetCutoffbound(scip))
#define DEFAULT_HANDLETRIVIAL
static SCIP_RETCODE exprstackInit(SCIP *scip, EXPRSTACK *exprstack, int initsize)
static SCIP_RETCODE estimateGradientInner(SCIP *scip, SCIP_NLHDLREXPRDATA *nlhdlrexprdata, SCIP_SOL *sol, SCIP_ROWPREP *rowprep, SCIP_Bool *success)
#define CONCAVE_NLHDLR_NAME
static SCIP_Bool exprIsMultivarLinear(SCIP *scip, SCIP_EXPR *expr)
#define CONCAVE_NLHDLR_DESC
static SCIP_RETCODE exprstackPush(SCIP *scip, EXPRSTACK *exprstack, int nexprs, SCIP_EXPR **exprs)
static void exprstackFree(SCIP *scip, EXPRSTACK *exprstack)
#define CONVEX_NLHDLR_DETECTPRIORITY
#define DEFAULT_EXTENDEDFORM
static SCIP_RETCODE estimateVertexPolyhedral(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_NLHDLR *nlhdlr, SCIP_NLHDLREXPRDATA *nlhdlrexprdata, SCIP_SOL *sol, SCIP_Bool usemidpoint, SCIP_Bool overestimate, SCIP_Real targetvalue, SCIP_ROWPREP *rowprep, SCIP_Bool *success)
static SCIP_RETCODE createNlhdlrExprData(SCIP *scip, SCIP_NLHDLRDATA *nlhdlrdata, SCIP_NLHDLREXPRDATA **nlhdlrexprdata, SCIP_EXPR *expr, SCIP_EXPR *nlexpr, SCIP_HASHMAP *nlexpr2origexpr, int nleafs, SCIP_NLHDLR_METHOD participating)
#define CONVEX_NLHDLR_DESC
#define CONVEX_NLHDLR_NAME
#define DEFAULT_MAXPERTURB
#define CONCAVE_NLHDLR_DETECTPRIORITY
static const int NCURVCHECKS
#define CONVEX_NLHDLR_ENFOPRIORITY
#define DEFAULT_CVXSIGNOMIAL
static SCIP_RETCODE constructExpr(SCIP *scip, SCIP_NLHDLRDATA *nlhdlrdata, SCIP_EXPR **rootnlexpr, SCIP_HASHMAP *nlexpr2origexpr, int *nleafs, SCIP_EXPR *rootexpr, SCIP_EXPRCURV curv, SCIP_HASHMAP *assumevarfixed, SCIP_Bool assumecurvature, SCIP_Bool *curvsuccess)
static SCIP_RETCODE collectLeafs(SCIP *scip, SCIP_NLHDLREXPRDATA *nlhdlrexprdata)
#define DEFAULT_DETECTSUM
static SCIP_RETCODE nlhdlrExprCreate(SCIP *scip, SCIP_HASHMAP *nlexpr2origexpr, SCIP_EXPR **nlhdlrexpr, SCIP_EXPR *origexpr, SCIP_EXPRCURV curv)
#define DEFAULT_CVXPRODCOMP
#define DEFAULT_CVXQUADRATIC_CONCAVE
#define DEFAULT_CVXQUADRATIC_CONVEX
static SCIP_RETCODE estimateConvexSecant(SCIP *scip, SCIP_NLHDLR *nlhdlr, SCIP_NLHDLREXPRDATA *nlhdlrexprdata, SCIP_SOL *sol, SCIP_ROWPREP *rowprep, SCIP_Bool *success)
static SCIP_RETCODE nlhdlrExprGrowChildren(SCIP *scip, SCIP_HASHMAP *nlexpr2origexpr, SCIP_EXPR *nlhdlrexpr, SCIP_EXPRCURV *childrencurv)
#define DECL_CURVCHECK(x)
static SCIP_Bool exprstackIsEmpty(EXPRSTACK *exprstack)
static SCIP_EXPR * exprstackPop(EXPRSTACK *exprstack)
#define CONCAVE_NLHDLR_ENFOPRIORITY
static SCIP_RETCODE estimateGradient(SCIP *scip, SCIP_NLHDLR *nlhdlr, SCIP_NLHDLREXPRDATA *nlhdlrexprdata, SCIP_SOL *sol, SCIP_ROWPREP *rowprep, SCIP_Bool *success)
nonlinear handlers for convex and concave expressions, respectively
BMS_BLKMEM * SCIPblkmem(SCIP *scip)
preparation of a linear inequality to become a SCIP_ROW
public functions of nonlinear handlers of nonlinear constraints
public functions to work with algebraic expressions
SCIP_NLHDLREXPRDATA * nlhdlrexprdata
#define SCIP_EXPRITER_VISITINGCHILD
#define SCIP_NLHDLR_METHOD_SEPAABOVE
#define SCIP_DECL_NLHDLREVALAUX(x)
#define SCIP_DECL_NLHDLRESTIMATE(x)
struct SCIP_NlhdlrData SCIP_NLHDLRDATA
#define SCIP_NLHDLR_METHOD_SEPABOTH
#define SCIP_DECL_NLHDLRCOPYHDLR(x)
unsigned int SCIP_NLHDLR_METHOD
#define SCIP_DECL_NLHDLRSOLLINEARIZE(x)
#define SCIP_DECL_NLHDLREXIT(x)
#define SCIP_DECL_NLHDLRFREEEXPRDATA(x)
#define SCIP_DECL_NLHDLRDETECT(x)
#define SCIP_DECL_NLHDLRINITSEPA(x)
#define SCIP_DECL_NLHDLRFREEHDLRDATA(x)
struct SCIP_NlhdlrExprData SCIP_NLHDLREXPRDATA
#define SCIP_NLHDLR_METHOD_SEPABELOW
enum SCIP_Retcode SCIP_RETCODE