Scippy

SCIP

Solving Constraint Integer Programs

Detailed Description

constraint handler for nonlinear constraints specified by algebraic expressions

Author
Ksenia Bestuzheva
Benjamin Mueller
Felipe Serrano
Stefan Vigerske

Definition in file cons_nonlinear.c.

#include <ctype.h>
#include "scip/cons_nonlinear.h"
#include "scip/nlhdlr.h"
#include "scip/expr_var.h"
#include "scip/expr_varidx.h"
#include "scip/expr_abs.h"
#include "scip/expr_sum.h"
#include "scip/expr_value.h"
#include "scip/expr_pow.h"
#include "scip/expr_trig.h"
#include "scip/nlhdlr_convex.h"
#include "scip/cons_linear.h"
#include "scip/cons_varbound.h"
#include "scip/cons_and.h"
#include "scip/cons_bounddisjunction.h"
#include "scip/heur_subnlp.h"
#include "scip/heur_trysol.h"
#include "scip/lapack_calls.h"
#include "scip/debug.h"
#include "scip/dialog_default.h"
#include "scip/scip_expr.h"
#include "scip/symmetry_graph.h"
#include "scip/prop_symmetry.h"
#include "symmetry/struct_symmetry.h"
#include "scip/pub_misc_sort.h"

Go to the source code of this file.

Data Structures

struct  EXPRENFO
 
struct  CONSUPGRADE
 
struct  BRANCHCAND
 

Macros

#define CONSHDLR_NAME   "nonlinear"
 
#define CONSHDLR_DESC   "handler for nonlinear constraints specified by algebraic expressions"
 
#define CONSHDLR_ENFOPRIORITY   50
 
#define CONSHDLR_CHECKPRIORITY   -4000010
 
#define CONSHDLR_EAGERFREQ   100
 
#define CONSHDLR_NEEDSCONS   TRUE
 
#define CONSHDLR_SEPAPRIORITY   10
 
#define CONSHDLR_SEPAFREQ   1
 
#define CONSHDLR_DELAYSEPA   FALSE
 
#define CONSHDLR_PROPFREQ   1
 
#define CONSHDLR_DELAYPROP   FALSE
 
#define CONSHDLR_PROP_TIMING   SCIP_PROPTIMING_BEFORELP
 
#define CONSHDLR_PRESOLTIMING   SCIP_PRESOLTIMING_ALWAYS
 
#define CONSHDLR_MAXPREROUNDS   -1
 
#define TABLE_NAME_NONLINEAR   "cons_nonlinear"
 
#define TABLE_DESC_NONLINEAR   "nonlinear constraint handler statistics"
 
#define TABLE_POSITION_NONLINEAR   14600
 
#define TABLE_EARLIEST_STAGE_NONLINEAR   SCIP_STAGE_TRANSFORMED
 
#define TABLE_NAME_NLHDLR   "nlhdlr"
 
#define TABLE_DESC_NLHDLR   "nonlinear handler statistics"
 
#define TABLE_POSITION_NLHDLR   14601
 
#define TABLE_EARLIEST_STAGE_NLHDLR   SCIP_STAGE_PRESOLVING
 
#define DIALOG_NAME   "nlhdlrs"
 
#define DIALOG_DESC   "display nonlinear handlers"
 
#define DIALOG_ISSUBMENU   FALSE
 
#define VERTEXPOLY_MAXPERTURBATION   1e-3
 
#define VERTEXPOLY_USEDUALSIMPLEX   TRUE
 
#define VERTEXPOLY_RANDNUMINITSEED   20181029
 
#define VERTEXPOLY_ADJUSTFACETFACTOR   1e1
 
#define BRANCH_RANDNUMINITSEED   20191229
 
#define BILIN_MAXNAUXEXPRS   10
 
#define infty2infty(infty1, infty2, val)   ((val) >= (infty1) ? (infty2) : (val))
 
#define POWEROFTWO(x)   (0x1u << (x))
 
#define ENFOLOG(x)
 
#define consInitpreNonlinear   NULL
 
#define consRespropNonlinear   NULL
 
#define consDelvarsNonlinear   NULL
 
#define consGetDiveBdChgsNonlinear   NULL
 

Functions

static SCIP_RETCODE forwardPropExpr (SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_EXPR *rootexpr, SCIP_Bool tightenauxvars, SCIP_Bool *infeasible, int *ntightenings)
 
static SCIP_RETCODE freeAuxVar (SCIP *scip, SCIP_EXPR *expr)
 
static SCIP_RETCODE freeEnfoData (SCIP *scip, SCIP_EXPR *expr, SCIP_Bool freeauxvar)
 
static SCIP_DECL_EXPR_OWNERFREE (exprownerFree)
 
static SCIP_DECL_EXPR_OWNERPRINT (exprownerPrint)
 
static SCIP_DECL_EXPR_OWNEREVALACTIVITY (exprownerEvalactivity)
 
static SCIP_DECL_EXPR_OWNERCREATE (exprownerCreate)
 
static SCIP_RETCODE createExprVar (SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_EXPR **expr, SCIP_VAR *var)
 
static SCIP_DECL_EXPR_MAPEXPR (mapexprvar)
 
static SCIP_DECL_EXPR_MAPEXPR (mapexprtransvar)
 
static SCIP_RETCODE storeVarExprs (SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONSDATA *consdata)
 
static SCIP_RETCODE freeVarExprs (SCIP *scip, SCIP_CONSDATA *consdata)
 
static SCIP_DECL_EXPR_INTEVALVAR (intEvalVarBoundTightening)
 
static SCIP_DECL_SORTPTRCOMP (compIndexConsNonlinear)
 
static SCIP_DECL_EVENTEXEC (processVarEvent)
 
static SCIP_RETCODE catchVarEvent (SCIP *scip, SCIP_EVENTHDLR *eventhdlr, SCIP_EXPR *expr, SCIP_CONS *cons)
 
static SCIP_RETCODE catchVarEvents (SCIP *scip, SCIP_EVENTHDLR *eventhdlr, SCIP_CONS *cons)
 
static SCIP_RETCODE dropVarEvent (SCIP *scip, SCIP_EVENTHDLR *eventhdlr, SCIP_EXPR *expr, SCIP_CONS *cons)
 
static SCIP_RETCODE dropVarEvents (SCIP *scip, SCIP_EVENTHDLR *eventhdlr, SCIP_CONS *cons)
 
static SCIP_RETCODE createCons (SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS **cons, const char *name, SCIP_EXPR *expr, SCIP_Real lhs, SCIP_Real rhs, SCIP_Bool copyexpr, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable)
 
static SCIP_Real getExprAbsOrigViolation (SCIP *scip, SCIP_EXPR *expr, SCIP_SOL *sol, SCIP_Bool *violunder, SCIP_Bool *violover)
 
static SCIP_Real getExprAbsAuxViolation (SCIP *scip, SCIP_EXPR *expr, SCIP_Real auxvalue, SCIP_SOL *sol, SCIP_Bool *violunder, SCIP_Bool *violover)
 
static SCIP_RETCODE computeViolation (SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol, SCIP_Longint soltag)
 
static SCIP_Real getConsAbsViolation (SCIP_CONS *cons)
 
static SCIP_RETCODE getConsRelViolation (SCIP *scip, SCIP_CONS *cons, SCIP_Real *viol, SCIP_SOL *sol, SCIP_Longint soltag)
 
static SCIP_Bool isConsViolated (SCIP *scip, SCIP_CONS *cons)
 
static void findUnlockedLinearVar (SCIP *scip, SCIP_CONS *cons)
 
static SCIP_RETCODE proposeFeasibleSolution (SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS **conss, int nconss, SCIP_SOL *sol, SCIP_Bool *success)
 
static SCIP_RETCODE notifyNlhdlrNewsol (SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS **conss, int nconss, SCIP_SOL *sol, SCIP_Bool solisbest)
 
static SCIP_DECL_EVENTEXEC (processNewSolutionEvent)
 
static SCIP_RETCODE tightenAuxVarBounds (SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_EXPR *expr, SCIP_INTERVAL bounds, SCIP_Bool *cutoff, int *ntightenings)
 
static SCIP_Bool isIntervalBetter (SCIP *scip, SCIP_Bool subsetsufficient, SCIP_INTERVAL newinterval, SCIP_INTERVAL oldinterval)
 
static SCIP_RETCODE reversePropQueue (SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_Bool *infeasible, int *ntightenings)
 
static SCIP_RETCODE propConss (SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS **conss, int nconss, SCIP_Bool force, SCIP_RESULT *result, int *nchgbds)
 
static SCIP_RETCODE propExprDomains (SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS **conss, int nconss, SCIP_RESULT *result, int *nchgbds)
 
static SCIP_RETCODE propagateLocks (SCIP *scip, SCIP_EXPR *expr, int nlockspos, int nlocksneg)
 
static SCIP_RETCODE addLocks (SCIP *scip, SCIP_CONS *cons, int nlockspos, int nlocksneg)
 
static SCIP_RETCODE createNlRow (SCIP *scip, SCIP_CONS *cons)
 
static SCIP_DECL_SORTPTRCOMP (enfodataCmp)
 
static SCIP_RETCODE detectNlhdlr (SCIP *scip, SCIP_EXPR *expr, SCIP_CONS *cons)
 
static SCIP_RETCODE detectNlhdlrs (SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS **conss, int nconss)
 
static SCIP_RETCODE initSolve (SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS **conss, int nconss)
 
static SCIP_RETCODE deinitSolve (SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS **conss, int nconss)
 
static SCIP_Bool isBinaryProduct (SCIP *scip, SCIP_EXPR *expr)
 
static SCIP_RETCODE getBilinearBinaryTerms (SCIP *scip, SCIP_EXPR *sumexpr, SCIP_VAR **xs, SCIP_VAR **ys, int *childidxs, int *nterms)
 
static SCIP_RETCODE reformulateFactorizedBinaryQuadratic (SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS *cons, SCIP_VAR *facvar, SCIP_VAR **vars, SCIP_Real *coefs, int nvars, SCIP_EXPR **newexpr, int *naddconss)
 
static SCIP_RETCODE getFactorizedBinaryQuadraticExpr (SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS *cons, SCIP_EXPR *sumexpr, int minterms, SCIP_EXPR **newexpr, int *naddconss)
 
static SCIP_RETCODE getBinaryProductExprDo (SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_EXPR *prodexpr, SCIP_EXPR **newexpr, int *naddconss, SCIP_Bool empathy4and)
 
static SCIP_RETCODE getBinaryProductExpr (SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_HASHMAP *exprmap, SCIP_EXPR *prodexpr, SCIP_EXPR **newexpr, int *naddconss, int *nchgcoefs)
 
static SCIP_RETCODE replaceBinaryProducts (SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS *cons, SCIP_HASHMAP *exprmap, SCIP_EXPRITER *it, int *naddconss, int *nchgcoefs)
 
static SCIP_RETCODE presolveBinaryProducts (SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS **conss, int nconss, int *naddconss, int *nchgcoefs)
 
static SCIP_RETCODE scaleConsSides (SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS *cons, SCIP_Bool *changed)
 
static SCIP_RETCODE forbidNonlinearVariablesMultiaggration (SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS **conss, int nconss)
 
static SCIP_RETCODE canonicalizeConstraints (SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS **conss, int nconss, SCIP_PRESOLTIMING presoltiming, SCIP_Bool *infeasible, int *ndelconss, int *naddconss, int *nchgcoefs)
 
static SCIP_RETCODE presolveMergeConss (SCIP *scip, SCIP_CONS **conss, int nconss, SCIP_Bool *success)
 
static SCIP_DECL_EXPR_INTEVALVAR (intEvalVarRedundancyCheck)
 
static SCIP_RETCODE presolveRedundantConss (SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS **conss, int nconss, SCIP_Bool *cutoff, int *ndelconss, int *nchgbds)
 
static SCIP_RETCODE presolveUpgrade (SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS *cons, SCIP_Bool *upgraded, int *nupgdconss, int *naddconss)
 
static SCIP_Bool isSingleLockedCand (SCIP *scip, SCIP_EXPR *expr)
 
static SCIP_RETCODE removeSingleLockedVars (SCIP *scip, SCIP_EXPR *expr, SCIP_EXPRITER *it, SCIP_HASHMAP *exprcands)
 
static SCIP_RETCODE presolveSingleLockedVars (SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS *cons, int *nchgvartypes, int *naddconss, SCIP_Bool *infeasible)
 
static SCIP_RETCODE presolveImplint (SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS **conss, int nconss, int *nchgvartypes, SCIP_Bool *infeasible)
 
static SCIP_RETCODE createAuxVar (SCIP *scip, SCIP_EXPR *expr)
 
static SCIP_RETCODE initSepa (SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS **conss, int nconss, SCIP_Bool *infeasible)
 
static SCIP_Bool branchAuxNonlinear (SCIP *scip, SCIP_CONSHDLR *conshdlr)
 
static SCIP_Real getViolSplitWeight (SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_VAR *var, SCIP_SOL *sol)
 
static void addExprsViolScore (SCIP *scip, SCIP_EXPR **exprs, int nexprs, SCIP_Real violscore, SCIP_SOL *sol, SCIP_Bool *success)
 
static SCIP_RETCODE addExprViolScoresAuxVars (SCIP *scip, SCIP_EXPR *expr, SCIP_Real violscore, SCIP_VAR **auxvars, int nauxvars, SCIP_SOL *sol, SCIP_Bool *success)
 
static SCIP_RETCODE registerBranchingCandidatesAllUnfixed (SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS **conss, int nconss, int *nnotify)
 
static SCIP_RETCODE registerBranchingCandidates (SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS **conss, int nconss, SCIP_Bool *success)
 
static SCIP_RETCODE collectBranchingCandidates (SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS **conss, int nconss, SCIP_Real maxrelconsviol, SCIP_SOL *sol, SCIP_Longint soltag, BRANCHCAND *cands, int *ncands)
 
static SCIP_Real getDualBranchscore (SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_VAR *var)
 
static void scoreBranchingCandidates (SCIP *scip, SCIP_CONSHDLR *conshdlr, BRANCHCAND *cands, int ncands, SCIP_Bool considerfracnl, SCIP_SOL *sol)
 
static SCIP_DECL_SORTINDCOMP (branchcandCompare)
 
static SCIP_RETCODE selectBranchingCandidate (SCIP *scip, SCIP_CONSHDLR *conshdlr, BRANCHCAND *cands, int ncands, SCIP_Bool considerfracnl, SCIP_SOL *sol, BRANCHCAND **selected)
 
static SCIP_RETCODE branching (SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS **conss, int nconss, SCIP_Real maxrelconsviol, SCIP_SOL *sol, SCIP_Longint soltag, SCIP_RESULT *result)
 
static SCIP_RETCODE enforceExprNlhdlr (SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS *cons, SCIP_NLHDLR *nlhdlr, SCIP_EXPR *expr, SCIP_NLHDLREXPRDATA *nlhdlrexprdata, SCIP_SOL *sol, SCIP_Real auxvalue, SCIP_Bool overestimate, SCIP_Bool separated, SCIP_Bool allowweakcuts, SCIP_Bool inenforcement, SCIP_Bool branchcandonly, SCIP_RESULT *result)
 
static SCIP_RETCODE enforceExpr (SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS *cons, SCIP_EXPR *expr, SCIP_SOL *sol, SCIP_Longint soltag, SCIP_Bool allowweakcuts, SCIP_Bool inenforcement, SCIP_Bool branchcandonly, SCIP_RESULT *result)
 
static SCIP_RETCODE enforceConstraint (SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS *cons, SCIP_SOL *sol, SCIP_Longint soltag, SCIP_EXPRITER *it, SCIP_Bool allowweakcuts, SCIP_Bool inenforcement, SCIP_Bool branchcandonly, SCIP_RESULT *result, SCIP_Bool *success)
 
static SCIP_RETCODE enforceConstraints (SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS **conss, int nconss, SCIP_SOL *sol, SCIP_Longint soltag, SCIP_Bool inenforcement, SCIP_Bool branchcandonly, SCIP_Real maxrelconsviol, SCIP_RESULT *result)
 
static SCIP_RETCODE branchingIntegralOrNonlinear (SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS **conss, int nconss, SCIP_Longint soltag, SCIP_Real maxrelconsviol, SCIP_Bool *branchintegral, SCIP_Bool *cutoff)
 
static SCIP_Bool branchingIntegralFirst (SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_SOL *sol)
 
static SCIP_RETCODE analyzeViolation (SCIP *scip, SCIP_CONS **conss, int nconss, SCIP_SOL *sol, SCIP_Longint soltag, SCIP_Real *maxabsconsviol, SCIP_Real *maxrelconsviol, SCIP_Real *minauxviol, SCIP_Real *maxauxviol, SCIP_Real *maxvarboundviol)
 
static SCIP_RETCODE consEnfo (SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS **conss, int nconss, SCIP_SOL *sol, SCIP_RESULT *result)
 
static SCIP_RETCODE consSepa (SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS **conss, int nconss, SCIP_SOL *sol, SCIP_RESULT *result)
 
static SCIP_DECL_HASHGETKEY (bilinearTermsGetHashkey)
 
static SCIP_DECL_HASHKEYEQ (bilinearTermsIsHashkeyEq)
 
static SCIP_DECL_HASHKEYVAL (bilinearTermsGetHashkeyVal)
 
static SCIP_DECL_SORTPTRCOMP (auxexprComp)
 
static SCIP_RETCODE bilinTermAddAuxExpr (SCIP *scip, SCIP_CONSHDLRDATA *conshdlrdata, SCIP_CONSNONLINEAR_BILINTERM *term, SCIP_CONSNONLINEAR_AUXEXPR *auxexpr, SCIP_Bool *added)
 
static SCIP_RETCODE bilinearTermsInsertAll (SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS **conss, int nconss)
 
static SCIP_RETCODE bilinearTermsInsertEntry (SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_VAR *x, SCIP_VAR *y, int nlockspos, int nlocksneg, int *idx, SCIP_Bool existing)
 
static SCIP_RETCODE bilinearTermsFree (SCIP *scip, SCIP_CONSHDLRDATA *conshdlrdata)
 
static SCIP_RETCODE buildVertexPolyhedralSeparationLP (SCIP *scip, int nvars, SCIP_LPI **lp)
 
static SCIP_Real computeVertexPolyhedralMaxFacetError (SCIP *scip, SCIP_Bool overestimate, SCIP_Real *funvals, SCIP_Real *box, int nallvars, int nvars, int *nonfixedpos, SCIP_Real *facetcoefs, SCIP_Real facetconstant)
 
static SCIP_RETCODE computeVertexPolyhedralFacetLP (SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_Bool overestimate, SCIP_Real *xstar, SCIP_Real *box, int nallvars, int *nonfixedpos, SCIP_Real *funvals, int nvars, SCIP_Real targetvalue, SCIP_Bool *success, SCIP_Real *facetcoefs, SCIP_Real *facetconstant)
 
static SCIP_RETCODE computeVertexPolyhedralFacetUnivariate (SCIP *scip, SCIP_Real left, SCIP_Real right, SCIP_Real funleft, SCIP_Real funright, SCIP_Bool *success, SCIP_Real *facetcoef, SCIP_Real *facetconstant)
 
static SCIP_RETCODE computeHyperplaneThreePoints (SCIP *scip, SCIP_Real a1, SCIP_Real a2, SCIP_Real a3, SCIP_Real b1, SCIP_Real b2, SCIP_Real b3, SCIP_Real c1, SCIP_Real c2, SCIP_Real c3, SCIP_Real *alpha, SCIP_Real *beta, SCIP_Real *gamma_, SCIP_Real *delta)
 
static SCIP_RETCODE computeVertexPolyhedralFacetBivariate (SCIP *scip, SCIP_Bool overestimate, SCIP_Real p1[2], SCIP_Real p2[2], SCIP_Real p3[2], SCIP_Real p4[2], SCIP_Real p1val, SCIP_Real p2val, SCIP_Real p3val, SCIP_Real p4val, SCIP_Real xstar[2], SCIP_Real targetvalue, SCIP_Bool *success, SCIP_Real *facetcoefs, SCIP_Real *facetconstant)
 
static SCIP_RETCODE ensureOpenArraySizeSymdetect (SCIP *scip, int **openidx, int nelems, int *maxnelems)
 
static SCIP_RETCODE ensureLocVarsArraySize (SCIP *scip, SCIP_VAR ***vars, SCIP_Real **vals, int nelems, int *maxnelems)
 
static SCIP_RETCODE tryAddGadgetBilinearProductSignedPerm (SCIP *scip, SCIP_EXPR *expr, SCIP_CONS *cons, SYM_GRAPH *graph, int parentidx, SCIP_Bool hasparentcoef, SCIP_Real parentcoef, SCIP_VAR ***consvars, SCIP_Real **consvals, int *maxnconsvars, SCIP_HASHSET *handledexprs, SCIP_Bool *success)
 
static SCIP_Bool isEvenOperator (SCIP *scip, SCIP_EXPR *expr, SCIP_Bool *hasvalue, SCIP_Real *value)
 
static SCIP_Bool varIsCenteredAt0 (SCIP *scip, SCIP_VAR *var)
 
static SCIP_RETCODE tryAddGadgetEvenOperatorVariable (SCIP *scip, SCIP_EXPR *evenopexpr, SCIP_EXPR *child, SCIP_CONS *cons, SYM_GRAPH *graph, int parentidx, SCIP_Bool hasparentcoef, SCIP_Real parentcoef, SCIP_Bool hassymval, SCIP_Real symval, SCIP_VAR ***consvars, SCIP_Real **consvals, int *maxnconsvars, SCIP_Bool *success)
 
static SCIP_RETCODE tryAddGadgetEvenOperatorSum (SCIP *scip, SCIP_EXPR *evenopexpr, SCIP_EXPR *child, SCIP_CONS *cons, SYM_GRAPH *graph, int parentidx, SCIP_Bool hasparentcoef, SCIP_Real parentcoef, SCIP_Bool hassymval, SCIP_Real symval, SCIP_VAR ***consvars, SCIP_Real **consvals, int *maxnconsvars, SCIP_HASHSET *handledexprs, SCIP_Bool *success)
 
static SCIP_RETCODE tryAddGadgetEvenOperator (SCIP *scip, SCIP_EXPR *expr, SCIP_CONS *cons, SYM_GRAPH *graph, int parentidx, SCIP_Bool hasparentcoef, SCIP_Real parentcoef, SCIP_VAR ***consvars, SCIP_Real **consvals, int *maxnconsvars, SCIP_HASHSET *handledexprs, SCIP_Bool *success)
 
static SCIP_DECL_SORTINDCOMP (SCIPsortVarPtr)
 
static SCIP_Real getDomainCenter (SCIP *scip, SCIP_VAR *var)
 
static SCIP_RETCODE tryAddGadgetSquaredDifference (SCIP *scip, SCIP_EXPR *sumexpr, SCIP_CONS *cons, SYM_GRAPH *graph, int sumnodeidx, SCIP_VAR ***consvars, SCIP_Real **consvals, int *maxnconsvars, SCIP_HASHSET *handledexprs)
 
static SCIP_RETCODE addSymmetryInformation (SCIP *scip, SYM_SYMTYPE symtype, SCIP_CONS *cons, SYM_GRAPH *graph, SCIP_Bool *success)
 
static SCIP_DECL_CONSHDLRCOPY (conshdlrCopyNonlinear)
 
static SCIP_DECL_CONSFREE (consFreeNonlinear)
 
static SCIP_DECL_CONSINIT (consInitNonlinear)
 
static SCIP_DECL_CONSEXIT (consExitNonlinear)
 
static SCIP_DECL_CONSEXITPRE (consExitpreNonlinear)
 
static SCIP_DECL_CONSINITSOL (consInitsolNonlinear)
 
static SCIP_DECL_CONSEXITSOL (consExitsolNonlinear)
 
static SCIP_DECL_CONSDELETE (consDeleteNonlinear)
 
static SCIP_DECL_CONSTRANS (consTransNonlinear)
 
static SCIP_DECL_CONSINITLP (consInitlpNonlinear)
 
static SCIP_DECL_CONSSEPALP (consSepalpNonlinear)
 
static SCIP_DECL_CONSSEPASOL (consSepasolNonlinear)
 
static SCIP_DECL_CONSENFOLP (consEnfolpNonlinear)
 
static SCIP_DECL_CONSENFORELAX (consEnforelaxNonlinear)
 
static SCIP_DECL_CONSENFOPS (consEnfopsNonlinear)
 
static SCIP_DECL_CONSCHECK (consCheckNonlinear)
 
static SCIP_DECL_CONSPROP (consPropNonlinear)
 
static SCIP_DECL_CONSPRESOL (consPresolNonlinear)
 
static SCIP_DECL_CONSLOCK (consLockNonlinear)
 
static SCIP_DECL_CONSACTIVE (consActiveNonlinear)
 
static SCIP_DECL_CONSDEACTIVE (consDeactiveNonlinear)
 
static SCIP_DECL_CONSENABLE (consEnableNonlinear)
 
static SCIP_DECL_CONSDISABLE (consDisableNonlinear)
 
static SCIP_DECL_CONSPRINT (consPrintNonlinear)
 
static SCIP_DECL_CONSCOPY (consCopyNonlinear)
 
static SCIP_DECL_CONSPARSE (consParseNonlinear)
 
static SCIP_DECL_CONSGETVARS (consGetVarsNonlinear)
 
static SCIP_DECL_CONSGETNVARS (consGetNVarsNonlinear)
 
static SCIP_DECL_CONSGETPERMSYMGRAPH (consGetPermsymGraphNonlinear)
 
static SCIP_DECL_CONSGETSIGNEDPERMSYMGRAPH (consGetSignedPermsymGraphNonlinear)
 
static SCIP_DECL_TABLEOUTPUT (tableOutputNonlinear)
 
static SCIP_DECL_TABLEOUTPUT (tableOutputNlhdlr)
 
static SCIP_DECL_DIALOGEXEC (dialogExecDisplayNlhdlrs)
 
SCIP_RETCODE SCIPincludeConshdlrNonlinear (SCIP *scip)
 
SCIP_RETCODE SCIPincludeConsUpgradeNonlinear (SCIP *scip, SCIP_DECL_NONLINCONSUPGD((*nlconsupgd)), int priority, SCIP_Bool active, const char *conshdlrname)
 
SCIP_RETCODE SCIPcreateConsNonlinear (SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_EXPR *expr, SCIP_Real lhs, SCIP_Real rhs, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable)
 
SCIP_RETCODE SCIPcreateConsBasicNonlinear (SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_EXPR *expr, SCIP_Real lhs, SCIP_Real rhs)
 
SCIP_RETCODE SCIPcreateConsQuadraticNonlinear (SCIP *scip, SCIP_CONS **cons, const char *name, int nlinvars, SCIP_VAR **linvars, SCIP_Real *lincoefs, int nquadterms, SCIP_VAR **quadvars1, SCIP_VAR **quadvars2, SCIP_Real *quadcoefs, SCIP_Real lhs, SCIP_Real rhs, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable)
 
SCIP_RETCODE SCIPcreateConsBasicQuadraticNonlinear (SCIP *scip, SCIP_CONS **cons, const char *name, int nlinvars, SCIP_VAR **linvars, SCIP_Real *lincoefs, int nquadterms, SCIP_VAR **quadvars1, SCIP_VAR **quadvars2, SCIP_Real *quadcoefs, SCIP_Real lhs, SCIP_Real rhs)
 
SCIP_RETCODE SCIPcreateConsBasicSOCNonlinear (SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, SCIP_Real *coefs, SCIP_Real *offsets, SCIP_Real constant, SCIP_VAR *rhsvar, SCIP_Real rhscoeff, SCIP_Real rhsoffset)
 
SCIP_RETCODE SCIPcreateConsBasicSignpowerNonlinear (SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_VAR *x, SCIP_VAR *z, SCIP_Real exponent, SCIP_Real xoffset, SCIP_Real zcoef, SCIP_Real lhs, SCIP_Real rhs)
 
SCIP_Longint SCIPgetCurBoundsTagNonlinear (SCIP_CONSHDLR *conshdlr)
 
SCIP_Longint SCIPgetLastBoundRelaxTagNonlinear (SCIP_CONSHDLR *conshdlr)
 
void SCIPincrementCurBoundsTagNonlinear (SCIP_CONSHDLR *conshdlr, SCIP_Bool boundrelax)
 
SCIP_HASHMAPSCIPgetVarExprHashmapNonlinear (SCIP_CONSHDLR *conshdlr)
 
SCIP_RETCODE SCIPprocessRowprepNonlinear (SCIP *scip, SCIP_NLHDLR *nlhdlr, SCIP_CONS *cons, SCIP_EXPR *expr, SCIP_ROWPREP *rowprep, SCIP_Bool overestimate, SCIP_VAR *auxvar, SCIP_Real auxvalue, SCIP_Bool allowweakcuts, SCIP_Bool branchscoresuccess, SCIP_Bool inenforcement, SCIP_SOL *sol, SCIP_RESULT *result)
 
SCIP_Bool SCIPassumeConvexNonlinear (SCIP_CONSHDLR *conshdlr)
 
SCIP_RETCODE SCIPcollectBilinTermsNonlinear (SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS **conss, int nconss)
 
int SCIPgetNBilinTermsNonlinear (SCIP_CONSHDLR *conshdlr)
 
SCIP_CONSNONLINEAR_BILINTERMSCIPgetBilinTermsNonlinear (SCIP_CONSHDLR *conshdlr)
 
int SCIPgetBilinTermIdxNonlinear (SCIP_CONSHDLR *conshdlr, SCIP_VAR *x, SCIP_VAR *y)
 
SCIP_CONSNONLINEAR_BILINTERMSCIPgetBilinTermNonlinear (SCIP_CONSHDLR *conshdlr, SCIP_VAR *x, SCIP_VAR *y)
 
SCIP_Real SCIPevalBilinAuxExprNonlinear (SCIP *scip, SCIP_VAR *x, SCIP_VAR *y, SCIP_CONSNONLINEAR_AUXEXPR *auxexpr, SCIP_SOL *sol)
 
SCIP_RETCODE SCIPinsertBilinearTermExistingNonlinear (SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_VAR *x, SCIP_VAR *y, SCIP_VAR *auxvar, int nlockspos, int nlocksneg)
 
SCIP_RETCODE SCIPinsertBilinearTermImplicitNonlinear (SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_VAR *x, SCIP_VAR *y, SCIP_VAR *auxvar, SCIP_Real coefx, SCIP_Real coefy, SCIP_Real coefaux, SCIP_Real cst, SCIP_Bool overestimate)
 
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)
 
SCIP_EXPRSCIPgetExprNonlinear (SCIP_CONS *cons)
 
SCIP_Real SCIPgetLhsNonlinear (SCIP_CONS *cons)
 
SCIP_Real SCIPgetRhsNonlinear (SCIP_CONS *cons)
 
SCIP_RETCODE SCIPgetNlRowNonlinear (SCIP *scip, SCIP_CONS *cons, SCIP_NLROW **nlrow)
 
SCIP_EXPRCURV SCIPgetCurvatureNonlinear (SCIP_CONS *cons)
 
SCIP_RETCODE SCIPcheckQuadraticNonlinear (SCIP *scip, SCIP_CONS *cons, SCIP_Bool *isquadratic)
 
SCIP_RETCODE SCIPchgLhsNonlinear (SCIP *scip, SCIP_CONS *cons, SCIP_Real lhs)
 
SCIP_RETCODE SCIPchgRhsNonlinear (SCIP *scip, SCIP_CONS *cons, SCIP_Real rhs)
 
SCIP_RETCODE SCIPchgExprNonlinear (SCIP *scip, SCIP_CONS *cons, SCIP_EXPR *expr)
 
SCIP_RETCODE SCIPaddLinearVarNonlinear (SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_Real coef)
 
SCIP_RETCODE SCIPaddExprNonlinear (SCIP *scip, SCIP_CONS *cons, SCIP_EXPR *expr, SCIP_Real coef)
 
SCIP_RETCODE SCIPgetExprActivityNonlinear (SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol, SCIP_Real *activity)
 
SCIP_RETCODE SCIPgetAbsViolationNonlinear (SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol, SCIP_Real *viol)
 
SCIP_RETCODE SCIPgetRelViolationNonlinear (SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol, SCIP_Real *viol)
 
void SCIPgetLinvarMayDecreaseNonlinear (SCIP *scip, SCIP_CONS *cons, SCIP_VAR **var, SCIP_Real *coef)
 
void SCIPgetLinvarMayIncreaseNonlinear (SCIP *scip, SCIP_CONS *cons, SCIP_VAR **var, SCIP_Real *coef)
 
int SCIPgetExprNLocksPosNonlinear (SCIP_EXPR *expr)
 
int SCIPgetExprNLocksNegNonlinear (SCIP_EXPR *expr)
 
SCIP_VARSCIPgetExprAuxVarNonlinear (SCIP_EXPR *expr)
 
int SCIPgetExprNEnfosNonlinear (SCIP_EXPR *expr)
 
void SCIPgetExprEnfoDataNonlinear (SCIP_EXPR *expr, int idx, SCIP_NLHDLR **nlhdlr, SCIP_NLHDLREXPRDATA **nlhdlrexprdata, SCIP_NLHDLR_METHOD *nlhdlrparticipation, SCIP_Bool *sepabelowusesactivity, SCIP_Bool *sepaaboveusesactivity, SCIP_Real *auxvalue)
 
void SCIPsetExprEnfoAuxValueNonlinear (SCIP_EXPR *expr, int idx, SCIP_Real auxvalue)
 
unsigned int SCIPgetExprNPropUsesActivityNonlinear (SCIP_EXPR *expr)
 
unsigned int SCIPgetExprNSepaUsesActivityNonlinear (SCIP_EXPR *expr)
 
unsigned int SCIPgetExprNAuxvarUsesNonlinear (SCIP_EXPR *expr)
 
SCIP_RETCODE SCIPregisterExprUsageNonlinear (SCIP *scip, SCIP_EXPR *expr, SCIP_Bool useauxvar, SCIP_Bool useactivityforprop, SCIP_Bool useactivityforsepabelow, SCIP_Bool useactivityforsepaabove)
 
SCIP_RETCODE SCIPgetExprAbsOrigViolationNonlinear (SCIP *scip, SCIP_EXPR *expr, SCIP_SOL *sol, SCIP_Longint soltag, SCIP_Real *viol, SCIP_Bool *violunder, SCIP_Bool *violover)
 
SCIP_RETCODE SCIPgetExprAbsAuxViolationNonlinear (SCIP *scip, SCIP_EXPR *expr, SCIP_Real auxvalue, SCIP_SOL *sol, SCIP_Real *viol, SCIP_Bool *violunder, SCIP_Bool *violover)
 
SCIP_RETCODE SCIPgetExprRelAuxViolationNonlinear (SCIP *scip, SCIP_EXPR *expr, SCIP_Real auxvalue, SCIP_SOL *sol, SCIP_Real *viol, SCIP_Bool *violunder, SCIP_Bool *violover)
 
SCIP_INTERVAL SCIPgetExprBoundsNonlinear (SCIP *scip, SCIP_EXPR *expr)
 
SCIP_RETCODE SCIPtightenExprIntervalNonlinear (SCIP *scip, SCIP_EXPR *expr, SCIP_INTERVAL newbounds, SCIP_Bool *cutoff, int *ntightenings)
 
SCIP_RETCODE SCIPmarkExprPropagateNonlinear (SCIP *scip, SCIP_EXPR *expr)
 
void SCIPaddExprViolScoreNonlinear (SCIP *scip, SCIP_EXPR *expr, SCIP_Real violscore)
 
SCIP_RETCODE SCIPaddExprsViolScoreNonlinear (SCIP *scip, SCIP_EXPR **exprs, int nexprs, SCIP_Real violscore, SCIP_SOL *sol, SCIP_Bool *success)
 
SCIP_Real SCIPgetExprViolScoreNonlinear (SCIP_EXPR *expr)
 
SCIP_Real SCIPgetExprPartialDiffNonlinear (SCIP *scip, SCIP_EXPR *expr, SCIP_VAR *var)
 
SCIP_Real SCIPgetExprPartialDiffGradientDirNonlinear (SCIP *scip, SCIP_EXPR *expr, SCIP_VAR *var)
 
SCIP_Real SCIPevalExprQuadraticAuxNonlinear (SCIP *scip, SCIP_EXPR *expr, SCIP_SOL *sol)
 
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)
 
int SCIPgetNNlhdlrsNonlinear (SCIP_CONSHDLR *conshdlr)
 
SCIP_NLHDLR ** SCIPgetNlhdlrsNonlinear (SCIP_CONSHDLR *conshdlr)
 
SCIP_NLHDLRSCIPfindNlhdlrNonlinear (SCIP_CONSHDLR *conshdlr, const char *name)
 
SCIP_NLHDLREXPRDATASCIPgetNlhdlrExprDataNonlinear (SCIP_NLHDLR *nlhdlr, SCIP_EXPR *expr)
 

Macro Definition Documentation

◆ CONSHDLR_NAME

#define CONSHDLR_NAME   "nonlinear"

Definition at line 83 of file cons_nonlinear.c.

◆ CONSHDLR_DESC

#define CONSHDLR_DESC   "handler for nonlinear constraints specified by algebraic expressions"

Definition at line 84 of file cons_nonlinear.c.

◆ CONSHDLR_ENFOPRIORITY

#define CONSHDLR_ENFOPRIORITY   50

priority of the constraint handler for constraint enforcing

Definition at line 85 of file cons_nonlinear.c.

◆ CONSHDLR_CHECKPRIORITY

#define CONSHDLR_CHECKPRIORITY   -4000010

priority of the constraint handler for checking feasibility

Definition at line 86 of file cons_nonlinear.c.

◆ CONSHDLR_EAGERFREQ

#define CONSHDLR_EAGERFREQ   100

frequency for using all instead of only the useful constraints in separation, propagation and enforcement, -1 for no eager evaluations, 0 for first only

Definition at line 88 of file cons_nonlinear.c.

◆ CONSHDLR_NEEDSCONS

#define CONSHDLR_NEEDSCONS   TRUE

should the constraint handler be skipped, if no constraints are available?

Definition at line 89 of file cons_nonlinear.c.

◆ CONSHDLR_SEPAPRIORITY

#define CONSHDLR_SEPAPRIORITY   10

priority of the constraint handler for separation

Definition at line 92 of file cons_nonlinear.c.

◆ CONSHDLR_SEPAFREQ

#define CONSHDLR_SEPAFREQ   1

frequency for separating cuts; zero means to separate only in the root node

Definition at line 93 of file cons_nonlinear.c.

◆ CONSHDLR_DELAYSEPA

#define CONSHDLR_DELAYSEPA   FALSE

should separation method be delayed, if other separators found cuts?

Definition at line 94 of file cons_nonlinear.c.

◆ CONSHDLR_PROPFREQ

#define CONSHDLR_PROPFREQ   1

frequency for propagating domains; zero means only preprocessing propagation

Definition at line 96 of file cons_nonlinear.c.

◆ CONSHDLR_DELAYPROP

#define CONSHDLR_DELAYPROP   FALSE

should propagation method be delayed, if other propagators found reductions?

Definition at line 97 of file cons_nonlinear.c.

◆ CONSHDLR_PROP_TIMING

#define CONSHDLR_PROP_TIMING   SCIP_PROPTIMING_BEFORELP

propagation timing mask of the constraint handler

Definition at line 98 of file cons_nonlinear.c.

◆ CONSHDLR_PRESOLTIMING

#define CONSHDLR_PRESOLTIMING   SCIP_PRESOLTIMING_ALWAYS

presolving timing of the constraint handler (fast, medium, or exhaustive)

Definition at line 100 of file cons_nonlinear.c.

◆ CONSHDLR_MAXPREROUNDS

#define CONSHDLR_MAXPREROUNDS   -1

maximal number of presolving rounds the constraint handler participates in (-1: no limit)

Definition at line 101 of file cons_nonlinear.c.

◆ TABLE_NAME_NONLINEAR

#define TABLE_NAME_NONLINEAR   "cons_nonlinear"

Definition at line 104 of file cons_nonlinear.c.

◆ TABLE_DESC_NONLINEAR

#define TABLE_DESC_NONLINEAR   "nonlinear constraint handler statistics"

Definition at line 105 of file cons_nonlinear.c.

◆ TABLE_POSITION_NONLINEAR

#define TABLE_POSITION_NONLINEAR   14600

the position of the statistics table

Definition at line 106 of file cons_nonlinear.c.

◆ TABLE_EARLIEST_STAGE_NONLINEAR

#define TABLE_EARLIEST_STAGE_NONLINEAR   SCIP_STAGE_TRANSFORMED

output of the statistics table is only printed from this stage onwards

Definition at line 107 of file cons_nonlinear.c.

◆ TABLE_NAME_NLHDLR

#define TABLE_NAME_NLHDLR   "nlhdlr"

Definition at line 110 of file cons_nonlinear.c.

◆ TABLE_DESC_NLHDLR

#define TABLE_DESC_NLHDLR   "nonlinear handler statistics"

Definition at line 111 of file cons_nonlinear.c.

◆ TABLE_POSITION_NLHDLR

#define TABLE_POSITION_NLHDLR   14601

the position of the statistics table

Definition at line 112 of file cons_nonlinear.c.

◆ TABLE_EARLIEST_STAGE_NLHDLR

#define TABLE_EARLIEST_STAGE_NLHDLR   SCIP_STAGE_PRESOLVING

output of the statistics table is only printed from this stage onwards

Definition at line 113 of file cons_nonlinear.c.

◆ DIALOG_NAME

#define DIALOG_NAME   "nlhdlrs"

Definition at line 115 of file cons_nonlinear.c.

◆ DIALOG_DESC

#define DIALOG_DESC   "display nonlinear handlers"

Definition at line 116 of file cons_nonlinear.c.

◆ DIALOG_ISSUBMENU

#define DIALOG_ISSUBMENU   FALSE

Definition at line 117 of file cons_nonlinear.c.

◆ VERTEXPOLY_MAXPERTURBATION

#define VERTEXPOLY_MAXPERTURBATION   1e-3

maximum perturbation

Definition at line 119 of file cons_nonlinear.c.

◆ VERTEXPOLY_USEDUALSIMPLEX

#define VERTEXPOLY_USEDUALSIMPLEX   TRUE

use dual or primal simplex algorithm?

Definition at line 120 of file cons_nonlinear.c.

◆ VERTEXPOLY_RANDNUMINITSEED

#define VERTEXPOLY_RANDNUMINITSEED   20181029

seed for random number generator, which is used to move points away from the boundary

Definition at line 121 of file cons_nonlinear.c.

◆ VERTEXPOLY_ADJUSTFACETFACTOR

#define VERTEXPOLY_ADJUSTFACETFACTOR   1e1

adjust resulting facets in checkRikun() up to a violation of this value times lpfeastol

Definition at line 122 of file cons_nonlinear.c.

◆ BRANCH_RANDNUMINITSEED

#define BRANCH_RANDNUMINITSEED   20191229

seed for random number generator, which is used to select from several similar good branching candidates

Definition at line 124 of file cons_nonlinear.c.

◆ BILIN_MAXNAUXEXPRS

#define BILIN_MAXNAUXEXPRS   10

maximal number of auxiliary expressions per bilinear term

Definition at line 126 of file cons_nonlinear.c.

◆ 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 132 of file cons_nonlinear.c.

◆ POWEROFTWO

#define POWEROFTWO (   x)    (0x1u << (x))

translates x to 2^x for non-negative integer x

Definition at line 135 of file cons_nonlinear.c.

◆ ENFOLOG

#define ENFOLOG (   x)

Definition at line 141 of file cons_nonlinear.c.

◆ consInitpreNonlinear

#define consInitpreNonlinear   NULL

presolving initialization method of constraint handler (called when presolving is about to begin)

Definition at line 11175 of file cons_nonlinear.c.

◆ consRespropNonlinear

#define consRespropNonlinear   NULL

propagation conflict resolving method of constraint handler

Definition at line 11744 of file cons_nonlinear.c.

◆ consDelvarsNonlinear

#define consDelvarsNonlinear   NULL

variable deletion of constraint handler

Definition at line 11965 of file cons_nonlinear.c.

◆ consGetDiveBdChgsNonlinear

#define consGetDiveBdChgsNonlinear   NULL

constraint handler method to suggest dive bound changes during the generic diving algorithm

Definition at line 12236 of file cons_nonlinear.c.

Function Documentation

◆ forwardPropExpr()

static SCIP_RETCODE forwardPropExpr ( SCIP scip,
SCIP_CONSHDLR conshdlr,
SCIP_EXPR rootexpr,
SCIP_Bool  tightenauxvars,
SCIP_Bool infeasible,
int *  ntightenings 
)
static

propagate bounds of the expressions in a given expression tree (that is, updates activity intervals) and tries to tighten the bounds of the auxiliary variables accordingly

Parameters
scipSCIP data structure
conshdlrconstraint handler
rootexprexpression
tightenauxvarsshould the bounds of auxiliary variables be tightened?
infeasiblebuffer to store whether the problem is infeasible (NULL if not needed)
ntighteningsbuffer to store the number of auxiliary variable tightenings (NULL if not needed)

Definition at line 2167 of file cons_nonlinear.c.

References FALSE, SCIP_Interval::inf, NULL, SCIP_Bool, SCIP_CALL, SCIP_EXPRITER_DFS, SCIP_EXPRITER_LEAVEEXPR, SCIP_EXPRITER_VISITINGCHILD, SCIP_INTERVAL_INFINITY, SCIP_LONGINT_FORMAT, SCIP_NLHDLR_METHOD_ACTIVITY, SCIP_OKAY, SCIPABORT, SCIPceil(), SCIPconshdlrGetData(), SCIPcreateExpriter(), SCIPdebugMsg, SCIPdebugMsgPrint, SCIPepsilon(), SCIPerrorMessage, SCIPexprGetActivity(), SCIPexprGetActivityTag(), SCIPexprGetHdlr(), SCIPexprGetNChildren(), SCIPexprGetOwnerData(), SCIPexprhdlrGetName(), SCIPexprIsIntegral(), SCIPexpriterGetChildExprDFS(), SCIPexpriterGetCurrent(), SCIPexpriterGetNext(), SCIPexpriterGetStageDFS(), SCIPexpriterInit(), SCIPexpriterIsEnd(), SCIPexpriterSetStagesDFS(), SCIPexpriterSkipDFS(), SCIPexprSetActivity(), SCIPfloor(), SCIPfreeExpriter(), SCIPgetVarExprVar(), SCIPintervalIntersectEps(), SCIPintervalIsEmpty(), SCIPintervalSetEmpty(), SCIPintervalSetEntire(), SCIPisExprVar(), SCIPisInfinity(), SCIPisRelEQ(), SCIPnlhdlrGetName(), SCIPnlhdlrHasIntEval(), SCIPprintExpr(), SCIPvarGetName(), SCIP_Interval::sup, tightenAuxVarBounds(), and TRUE.

Referenced by enforceConstraint(), presolveRedundantConss(), propConss(), and SCIP_DECL_EXPR_OWNEREVALACTIVITY().

◆ freeAuxVar()

static SCIP_RETCODE freeAuxVar ( SCIP scip,
SCIP_EXPR expr 
)
static

frees auxiliary variables of expression, if any

Parameters
scipSCIP data structure
exprexpression which auxvar to free, if any

Definition at line 386 of file cons_nonlinear.c.

References NULL, SCIP_CALL, SCIP_OKAY, SCIPaddVarLocks(), SCIPdebugMsg, SCIPexprGetOwnerData(), SCIPreleaseVar(), and SCIPvarGetName().

Referenced by freeEnfoData().

◆ freeEnfoData()

static SCIP_RETCODE freeEnfoData ( SCIP scip,
SCIP_EXPR expr,
SCIP_Bool  freeauxvar 
)
static

frees data used for enforcement of expression, that is, nonlinear handlers

can also clear indicators whether expr needs enforcement methods, that is, free an associated auxiliary variable and reset the nactivityuses counts

Parameters
scipSCIP data structure
exprexpression whose enforcement data will be released
freeauxvarwhether aux var should be released and activity usage counts be reset

Definition at line 422 of file cons_nonlinear.c.

References FALSE, freeAuxVar(), NULL, SCIP_CALL, SCIP_OKAY, SCIPexprGetOwnerData(), SCIPfreeBlockMemory, and SCIPfreeBlockMemoryArrayNull.

Referenced by deinitSolve(), detectNlhdlrs(), SCIP_DECL_EXPR_OWNERFREE(), and SCIPregisterExprUsageNonlinear().

◆ SCIP_DECL_EXPR_OWNERFREE()

static SCIP_DECL_EXPR_OWNERFREE ( exprownerFree  )
static

callback that frees data that this conshdlr stored in an expression

Definition at line 485 of file cons_nonlinear.c.

References freeEnfoData(), NULL, SCIP_CALL, SCIP_OKAY, SCIPconshdlrGetData(), SCIPfreeBlockMemory, SCIPfreeBlockMemoryArrayNull, SCIPgetVarExprVar(), SCIPhashmapGetImage(), SCIPhashmapRemove(), SCIPisExprVar(), and TRUE.

◆ SCIP_DECL_EXPR_OWNERPRINT()

◆ SCIP_DECL_EXPR_OWNEREVALACTIVITY()

static SCIP_DECL_EXPR_OWNEREVALACTIVITY ( exprownerEvalactivity  )
static

possibly reevaluates and then returns the activity of the expression

Reevaluate activity if currently stored is not up to date (some bound was changed since last evaluation).

Definition at line 578 of file cons_nonlinear.c.

References FALSE, forwardPropExpr(), NULL, SCIP_CALL, SCIP_OKAY, SCIPconshdlrGetData(), and SCIPexprGetActivityTag().

◆ SCIP_DECL_EXPR_OWNERCREATE()

static SCIP_DECL_EXPR_OWNERCREATE ( exprownerCreate  )
static

callback that creates data that this conshdlr wants to store in an expression

Definition at line 602 of file cons_nonlinear.c.

References NULL, SCIP_CALL, SCIP_OKAY, SCIPallocClearBlockMemory, SCIPconshdlrGetData(), SCIPgetVarExprVar(), SCIPhashmapExists(), SCIPhashmapGetImage(), SCIPhashmapInsert(), and SCIPisExprVar().

◆ createExprVar()

static SCIP_RETCODE createExprVar ( SCIP scip,
SCIP_CONSHDLR conshdlr,
SCIP_EXPR **  expr,
SCIP_VAR var 
)
static

creates a variable expression or retrieves from hashmap in conshdlr data

Parameters
scipSCIP data structure
conshdlrnonlinear constraint handler
exprpointer where to store expression
varvariable to be stored

Definition at line 652 of file cons_nonlinear.c.

References NULL, SCIP_CALL, SCIP_OKAY, SCIPcaptureExpr(), SCIPconshdlrGetData(), SCIPcreateExprVar(), and SCIPhashmapGetImage().

Referenced by getBinaryProductExpr(), getBinaryProductExprDo(), reformulateFactorizedBinaryQuadratic(), SCIP_DECL_EXPR_MAPEXPR(), and SCIPaddLinearVarNonlinear().

◆ SCIP_DECL_EXPR_MAPEXPR() [1/2]

static SCIP_DECL_EXPR_MAPEXPR ( mapexprvar  )
static

◆ SCIP_DECL_EXPR_MAPEXPR() [2/2]

static SCIP_DECL_EXPR_MAPEXPR ( mapexprtransvar  )
static

◆ storeVarExprs()

static SCIP_RETCODE storeVarExprs ( SCIP scip,
SCIP_CONSHDLR conshdlr,
SCIP_CONSDATA consdata 
)
static

stores all variable expressions into a given constraint

Parameters
scipSCIP data structure
conshdlrconstraint handler
consdataconstraint data

Definition at line 737 of file cons_nonlinear.c.

References NULL, SCIP_CALL, SCIP_OKAY, SCIPallocBlockMemoryArray, SCIPconshdlrGetData(), SCIPgetExprNVars(), SCIPgetExprVarExprs(), SCIPgetNVars(), SCIPgetVarExprVar(), SCIPhashmapExists(), SCIPhashmapInsert(), and SCIPreallocBlockMemoryArray.

Referenced by canonicalizeConstraints(), getConsRelViolation(), SCIP_DECL_CONSACTIVE(), SCIP_DECL_CONSGETNVARS(), SCIP_DECL_CONSGETVARS(), and SCIP_DECL_CONSINIT().

◆ freeVarExprs()

static SCIP_RETCODE freeVarExprs ( SCIP scip,
SCIP_CONSDATA consdata 
)
static

frees all variable expression stored in storeVarExprs()

Parameters
scipSCIP data structure
consdataconstraint data

Definition at line 801 of file cons_nonlinear.c.

References NULL, SCIP_CALL, SCIP_OKAY, SCIPfreeBlockMemoryArrayNull, and SCIPreleaseExpr().

Referenced by canonicalizeConstraints(), SCIP_DECL_CONSDEACTIVE(), SCIP_DECL_CONSDELETE(), SCIP_DECL_CONSEXIT(), and SCIPaddExprNonlinear().

◆ SCIP_DECL_EXPR_INTEVALVAR() [1/2]

static SCIP_DECL_EXPR_INTEVALVAR ( intEvalVarBoundTightening  )
static

interval evaluation of variables as used in bound tightening

Returns slightly relaxed local variable bounds of a variable as interval. Does not relax beyond integer values, thus does not relax bounds on integer variables at all.

Definition at line 840 of file cons_nonlinear.c.

References EPSFRAC, EPSROUND, infty2infty, MAX, MIN, NULL, REALABS, SCIP_INTERVAL_INFINITY, SCIP_Real, SCIP_VARTYPE_IMPLINT, SCIPABORT, SCIPerrorMessage, SCIPinfinity(), SCIPintervalSetBounds(), SCIPisInfinity(), SCIPvarGetLbGlobal(), SCIPvarGetLbLocal(), SCIPvarGetType(), SCIPvarGetUbGlobal(), SCIPvarGetUbLocal(), and SCIPvarIsIntegral().

◆ SCIP_DECL_SORTPTRCOMP() [1/3]

static SCIP_DECL_SORTPTRCOMP ( compIndexConsNonlinear  )
static

compares two nonlinear constraints by its index

Usable as compare operator in array sort functions.

Definition at line 967 of file cons_nonlinear.c.

References NULL, and SCIPconsGetData().

◆ SCIP_DECL_EVENTEXEC() [1/2]

◆ catchVarEvent()

static SCIP_RETCODE catchVarEvent ( SCIP scip,
SCIP_EVENTHDLR eventhdlr,
SCIP_EXPR expr,
SCIP_CONS cons 
)
static

registers event handler to catch variable events on variable

Additionally, the given constraint is stored in the ownerdata of the variable-expression. When an event occurs, all stored constraints are notified.

Parameters
scipSCIP data structure
eventhdlrevent handler
exprvariable expression
consnonlinear constraint

Definition at line 1096 of file cons_nonlinear.c.

References NULL, SCIP_CALL, SCIP_EVENTTYPE_BOUNDCHANGED, SCIP_EVENTTYPE_TYPECHANGED, SCIP_EVENTTYPE_VARFIXED, SCIP_OKAY, SCIPcatchVarEvent(), SCIPensureBlockMemoryArray, SCIPexprGetOwnerData(), SCIPgetVarExprVar(), SCIPisExprVar(), and TRUE.

Referenced by catchVarEvents().

◆ catchVarEvents()

static SCIP_RETCODE catchVarEvents ( SCIP scip,
SCIP_EVENTHDLR eventhdlr,
SCIP_CONS cons 
)
static

catch variable events

Parameters
scipSCIP data structure
eventhdlrevent handler
consconstraint for which to catch bound change events

Definition at line 1151 of file cons_nonlinear.c.

References catchVarEvent(), SCIP_Interval::inf, NULL, SCIP_CALL, SCIP_OKAY, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconsGetName(), SCIPconshdlrGetData(), SCIPdebugMsg, SCIPexprGetActivityTag(), SCIPexprSetActivity(), SCIPgetVarExprVar(), SCIPisExprVar(), SCIPvarGetName(), SCIP_Interval::sup, and TRUE.

Referenced by canonicalizeConstraints(), SCIP_DECL_CONSENABLE(), and SCIP_DECL_CONSINIT().

◆ dropVarEvent()

static SCIP_RETCODE dropVarEvent ( SCIP scip,
SCIP_EVENTHDLR eventhdlr,
SCIP_EXPR expr,
SCIP_CONS cons 
)
static

unregisters event handler to catch variable events on variable

The given constraint is removed from the constraints array in the ownerdata of the variable-expression. If this was the last constraint, then the event handler is unregistered for this variable.

Parameters
scipSCIP data structure
eventhdlrevent handler
exprvariable expression
consexpr constraint

Definition at line 1217 of file cons_nonlinear.c.

References FALSE, NULL, SCIP_CALL, SCIP_ERROR, SCIP_EVENTTYPE_BOUNDCHANGED, SCIP_EVENTTYPE_TYPECHANGED, SCIP_EVENTTYPE_VARFIXED, SCIP_OKAY, SCIPconsGetName(), SCIPdropVarEvent(), SCIPerrorMessage, SCIPexprGetOwnerData(), SCIPgetVarExprVar(), SCIPisExprVar(), SCIPsortedvecFindPtr(), SCIPsortPtr(), SCIPvarGetName(), and TRUE.

Referenced by dropVarEvents().

◆ dropVarEvents()

static SCIP_RETCODE dropVarEvents ( SCIP scip,
SCIP_EVENTHDLR eventhdlr,
SCIP_CONS cons 
)
static

drop variable events

Parameters
scipSCIP data structure
eventhdlrevent handler
consconstraint for which to drop bound change events

Definition at line 1283 of file cons_nonlinear.c.

References dropVarEvent(), FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPconsGetData(), SCIPconsGetName(), and SCIPdebugMsg.

Referenced by canonicalizeConstraints(), SCIP_DECL_CONSDEACTIVE(), SCIP_DECL_CONSDISABLE(), and SCIP_DECL_CONSEXIT().

◆ createCons()

static SCIP_RETCODE createCons ( SCIP scip,
SCIP_CONSHDLR conshdlr,
SCIP_CONS **  cons,
const char *  name,
SCIP_EXPR expr,
SCIP_Real  lhs,
SCIP_Real  rhs,
SCIP_Bool  copyexpr,
SCIP_Bool  initial,
SCIP_Bool  separate,
SCIP_Bool  enforce,
SCIP_Bool  check,
SCIP_Bool  propagate,
SCIP_Bool  local,
SCIP_Bool  modifiable,
SCIP_Bool  dynamic,
SCIP_Bool  removable 
)
static

creates and captures a nonlinear constraint

Attention
Use copyexpr=FALSE only if expr is already "owned" by conshdlr, that is, if expressions were created with exprownerCreate() and ownerdata passed in the last two arguments
Parameters
scipSCIP data structure
conshdlrconstraint handler
conspointer to hold the created constraint
namename of constraint
exprexpression of constraint (must not be NULL)
lhsleft hand side of constraint
rhsright hand side of constraint
copyexprwhether to copy the expression or reuse the given expr (capture it)
initialshould the LP relaxation of constraint be in the initial LP? Usually set to TRUE. Set to FALSE for 'lazy constraints'.
separateshould the constraint be separated during LP processing? Usually set to TRUE.
enforceshould the constraint be enforced during node processing? TRUE for model constraints, FALSE for additional, redundant constraints.
checkshould the constraint be checked for feasibility? TRUE for model constraints, FALSE for additional, redundant constraints.
propagateshould the constraint be propagated during node processing? Usually set to TRUE.
localis constraint only valid locally? Usually set to FALSE. Has to be set to TRUE, e.g., for branching constraints.
modifiableis constraint modifiable (subject to column generation)? Usually set to FALSE. In column generation applications, set to TRUE if pricing adds coefficients to this constraint.
dynamicis constraint subject to aging? Usually set to FALSE. Set to TRUE for own cuts which are separated as constraints.
removableshould the relaxation be removed from the LP due to aging or cleanup? Usually set to FALSE. Set to TRUE for 'lazy constraints' and 'user cuts'.

Definition at line 1324 of file cons_nonlinear.c.

References FALSE, NULL, SCIP_CALL, SCIP_EXPRCURV_UNKNOWN, SCIP_INVALIDCALL, SCIP_OKAY, SCIPallocClearBlockMemory, SCIPcaptureExpr(), SCIPconshdlrGetData(), SCIPcreateCons(), SCIPduplicateExpr(), SCIPerrorMessage, and SCIPgetDepth().

Referenced by SCIP_DECL_CONSCOPY(), SCIP_DECL_CONSPARSE(), SCIP_DECL_CONSTRANS(), SCIPcreateConsNonlinear(), and SCIPcreateConsQuadraticNonlinear().

◆ getExprAbsOrigViolation()

static SCIP_Real getExprAbsOrigViolation ( SCIP scip,
SCIP_EXPR expr,
SCIP_SOL sol,
SCIP_Bool violunder,
SCIP_Bool violover 
)
static

returns absolute violation for auxvar relation in an expression w.r.t. original variables

Assume the expression is f(x), where x are original (i.e., not auxiliary) variables. Assume that f(x) is associated with auxiliary variable z.

If there are negative locks, then return the violation of z ≤ f(x) and sets violover to TRUE. If there are positive locks, then return the violation of z ≥ f(x) and sets violunder to TRUE. Of course, if there both negative and positive locks, then return the violation of z = f(x). If f could not be evaluated, then return SCIPinfinity() and set both violover and violunder to TRUE.

Note
This does not reevaluate the violation, but assumes that the expression has been evaluated
Parameters
scipSCIP data structure
exprexpression
solsolution that has been evaluated
violunderbuffer to store whether z >= f(x) is violated, or NULL
violoverbuffer to store whether z <= f(x) is violated, or NULL

Definition at line 1415 of file cons_nonlinear.c.

References FALSE, NULL, SCIP_INVALID, SCIP_Real, SCIPexprGetEvalValue(), SCIPexprGetOwnerData(), SCIPgetSolVal(), SCIPinfinity(), and TRUE.

Referenced by analyzeViolation(), enforceExpr(), and SCIPgetExprAbsOrigViolationNonlinear().

◆ getExprAbsAuxViolation()

static SCIP_Real getExprAbsAuxViolation ( SCIP scip,
SCIP_EXPR expr,
SCIP_Real  auxvalue,
SCIP_SOL sol,
SCIP_Bool violunder,
SCIP_Bool violover 
)
static

returns absolute violation for auxvar relation in an expression w.r.t. auxiliary variables

Assume the expression is f(w), where w are auxiliary variables that were introduced by some nlhdlr. Assume that f(w) is associated with auxiliary variable z.

If there are negative locks, then return the violation of z ≤ f(w) and sets violover to TRUE. If there are positive locks, then return the violation of z ≥ f(w) and sets violunder to TRUE. Of course, if there both negative and positive locks, then return the violation of z = f(w). If f could not be evaluated, then return SCIPinfinity() and set both violover and violunder to TRUE.

Note
This does not reevaluate the violation, but assumes that f(w) is passed in with auxvalue.
Parameters
scipSCIP data structure
exprexpression
auxvaluevalue of f(w)
solsolution that has been evaluated
violunderbuffer to store whether z >= f(w) is violated, or NULL
violoverbuffer to store whether z <= f(w) is violated, or NULL

Definition at line 1481 of file cons_nonlinear.c.

References FALSE, NULL, SCIP_INVALID, SCIP_Real, SCIPexprGetOwnerData(), SCIPgetSolVal(), SCIPinfinity(), and TRUE.

Referenced by analyzeViolation(), enforceExpr(), SCIPgetExprAbsAuxViolationNonlinear(), SCIPgetExprRelAuxViolationNonlinear(), and SCIPprocessRowprepNonlinear().

◆ computeViolation()

static SCIP_RETCODE computeViolation ( SCIP scip,
SCIP_CONS cons,
SCIP_SOL sol,
SCIP_Longint  soltag 
)
static

computes violation of a constraint

Parameters
scipSCIP data structure
consconstraint
solsolution or NULL if LP solution should be used
soltagtag that uniquely identifies the solution (with its values), or 0.

Definition at line 1538 of file cons_nonlinear.c.

References NULL, SCIP_CALL, SCIP_INVALID, SCIP_OKAY, SCIP_Real, SCIPconsGetData(), SCIPevalExpr(), SCIPexprGetEvalValue(), SCIPinfinity(), and SCIPisInfinity().

Referenced by consEnfo(), consSepa(), SCIP_DECL_CONSCHECK(), SCIP_DECL_CONSENFOPS(), SCIPgetAbsViolationNonlinear(), and SCIPgetRelViolationNonlinear().

◆ getConsAbsViolation()

static SCIP_Real getConsAbsViolation ( SCIP_CONS cons)
static

returns absolute violation of a constraint

Note
This does not reevaluate the violation, but assumes that computeViolation() has been called before.
Parameters
consconstraint

Definition at line 1577 of file cons_nonlinear.c.

References MAX3, NULL, and SCIPconsGetData().

Referenced by analyzeViolation(), enforceConstraints(), getConsRelViolation(), isConsViolated(), registerBranchingCandidatesAllUnfixed(), SCIP_DECL_CONSCHECK(), and SCIPgetAbsViolationNonlinear().

◆ getConsRelViolation()

static SCIP_RETCODE getConsRelViolation ( SCIP scip,
SCIP_CONS cons,
SCIP_Real viol,
SCIP_SOL sol,
SCIP_Longint  soltag 
)
static

computes relative violation of a constraint

Note
This does not reevaluate the violation, but assumes that computeViolation() has been called before.
Parameters
scipSCIP data structure
consconstraint
violbuffer to store violation
solsolution or NULL if LP solution should be used
soltagtag that uniquely identifies the solution (with its values), or 0

Definition at line 1596 of file cons_nonlinear.c.

References getConsAbsViolation(), MAX, NULL, REALABS, SCIP_CALL, SCIP_INVALID, SCIP_OKAY, SCIP_Real, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetData(), SCIPevalExprGradient(), SCIPexprGetDerivative(), SCIPexprGetDiffTag(), SCIPexprGetEvalValue(), SCIPisInfinity(), and storeVarExprs().

Referenced by analyzeViolation(), collectBranchingCandidates(), enforceConstraints(), and SCIPgetRelViolationNonlinear().

◆ isConsViolated()

static SCIP_Bool isConsViolated ( SCIP scip,
SCIP_CONS cons 
)
static

returns whether constraint is currently violated

Note
This does not reevaluate the violation, but assumes that computeViolation() has been called before.
Parameters
scipSCIP data structure
consconstraint

Definition at line 1696 of file cons_nonlinear.c.

References getConsAbsViolation(), and SCIPfeastol().

Referenced by analyzeViolation(), collectBranchingCandidates(), consEnfo(), consSepa(), enforceConstraints(), registerBranchingCandidates(), registerBranchingCandidatesAllUnfixed(), SCIP_DECL_CONSCHECK(), and SCIP_DECL_CONSENFOPS().

◆ findUnlockedLinearVar()

static void findUnlockedLinearVar ( SCIP scip,
SCIP_CONS cons 
)
static

◆ proposeFeasibleSolution()

static SCIP_RETCODE proposeFeasibleSolution ( SCIP scip,
SCIP_CONSHDLR conshdlr,
SCIP_CONS **  conss,
int  nconss,
SCIP_SOL sol,
SCIP_Bool success 
)
static

Given a solution where every nonlinear constraint is either feasible or can be made feasible by moving a linear variable, construct the corresponding feasible solution and pass it to the trysol heuristic.

The method assumes that this is always possible and that not all constraints are feasible already.

Parameters
scipSCIP data structure
conshdlrconstraint handler
conssconstraints to process
nconssnumber of constraints
solsolution to process
successbuffer to store whether we succeeded to construct a solution that satisfies all provided constraints

Definition at line 1802 of file cons_nonlinear.c.

References FALSE, MAX, MIN, NULL, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIP_STAGE_INITPRESOLVE, SCIP_STAGE_SOLVED, SCIPceil(), SCIPconsGetData(), SCIPconsGetName(), SCIPconshdlrGetData(), SCIPcreateLPSol(), SCIPcreateSolCopy(), SCIPdebugMsg, SCIPfeastol(), SCIPfloor(), SCIPfreeSol(), SCIPgetSolTransObj(), SCIPgetSolVal(), SCIPgetStage(), SCIPgetUpperbound(), SCIPheurGetName(), SCIPheurPassSolTrySol(), SCIPincSolVal(), SCIPisInfinity(), SCIPisNegative(), SCIPisPositive(), SCIPisSumLT(), SCIPisZero(), SCIPsolGetHeur(), SCIPunlinkSol(), SCIPvarGetLbGlobal(), SCIPvarGetName(), SCIPvarGetUbGlobal(), SCIPvarIsIntegral(), and TRUE.

Referenced by SCIP_DECL_CONSCHECK().

◆ notifyNlhdlrNewsol()

static SCIP_RETCODE notifyNlhdlrNewsol ( SCIP scip,
SCIP_CONSHDLR conshdlr,
SCIP_CONS **  conss,
int  nconss,
SCIP_SOL sol,
SCIP_Bool  solisbest 
)
static

notify nonlinear handlers to add linearization in new solution that has been found

The idea is that nonlinear handlers add globally valid tight estimators in a given solution as cuts to the cutpool.

Essentially we want to ensure that the LP relaxation is tight in the new solution, if possible. As the nonlinear handlers define the extended formulation, they should know whether it is possible to generate a cut that is valid and supporting in the given solution. For example, for convex constraints, we achieve this by linearizing. For SOC, we also linearize, but on a a convex reformulation.

Since linearization may happen in auxiliary variables, we ensure that auxiliary variables are set to the eval-value of its expression, i.e., we change sol so it is also feasible in the extended formulation.

Parameters
scipSCIP data structure
conshdlrconstraint handler
conssconstraints
nconssnumber of constraints
solreference point where to estimate
solisbestwhether solution is best

Definition at line 1959 of file cons_nonlinear.c.

References ENFOLOG, FALSE, NULL, SCIP_CALL, SCIP_EXPRITER_DFS, SCIP_EXPRITER_LEAVEEXPR, SCIP_INVALID, SCIP_Longint, SCIP_NLHDLR_METHOD_SEPAABOVE, SCIP_NLHDLR_METHOD_SEPABELOW, SCIP_OKAY, SCIPconsGetData(), SCIPconsIsActive(), SCIPconsIsDeleted(), SCIPconsIsEnabled(), SCIPconsIsSeparationEnabled(), SCIPcreateExpriter(), SCIPevalExpr(), SCIPexprGetEvalTag(), SCIPexprGetEvalValue(), SCIPexprGetOwnerData(), SCIPexpriterGetNext(), SCIPexpriterInit(), SCIPexpriterIsEnd(), SCIPexpriterRestartDFS(), SCIPexpriterSetStagesDFS(), SCIPfreeExpriter(), SCIPgetExprNewSoltag(), SCIPgetSolVal(), SCIPgetVarExprVar(), SCIPheurGetName(), SCIPinfoMessage(), SCIPprintCons(), SCIPsetSolVal(), SCIPsolGetHeur(), SCIPvarGetLbLocal(), SCIPvarGetName(), and SCIPvarGetUbLocal().

Referenced by SCIP_DECL_EVENTEXEC().

◆ SCIP_DECL_EVENTEXEC() [2/2]

static SCIP_DECL_EVENTEXEC ( processNewSolutionEvent  )
static

◆ tightenAuxVarBounds()

static SCIP_RETCODE tightenAuxVarBounds ( SCIP scip,
SCIP_CONSHDLR conshdlr,
SCIP_EXPR expr,
SCIP_INTERVAL  bounds,
SCIP_Bool cutoff,
int *  ntightenings 
)
static

tightens the bounds of the auxiliary variable associated with an expression (or original variable if being a variable-expression) according to given bounds

The given bounds may very well be the exprs activity (when called from forwardPropExpr()), but can also be some tighter bounds (when called from SCIPtightenExprIntervalNonlinear()).

Nothing will happen if SCIP is not in presolve or solve.

Parameters
scipSCIP data structure
conshdlrconstraint handler
exprexpression whose auxvar is to be tightened
boundsbounds to be used for tightening (must not be empty)
cutoffbuffer to store whether a cutoff was detected
ntighteningsbuffer to add the total number of tightenings, or NULL

Definition at line 2096 of file cons_nonlinear.c.

References FALSE, SCIP_Interval::inf, NULL, SCIP_Bool, SCIP_CALL, SCIP_INTERVAL_INFINITY, SCIP_OKAY, SCIPconshdlrGetData(), SCIPdebugMsg, SCIPgetExprAuxVarNonlinear(), SCIPintervalIsEmpty(), SCIPisEQ(), SCIPtightenVarLb(), SCIPtightenVarUb(), SCIPvarGetLbLocal(), SCIPvarGetName(), SCIPvarGetUbLocal(), and SCIP_Interval::sup.

Referenced by createAuxVar(), forwardPropExpr(), and SCIPtightenExprIntervalNonlinear().

◆ isIntervalBetter()

static SCIP_Bool isIntervalBetter ( SCIP scip,
SCIP_Bool  subsetsufficient,
SCIP_INTERVAL  newinterval,
SCIP_INTERVAL  oldinterval 
)
static

returns whether intersecting oldinterval with newinterval would provide a properly smaller interval

If subsetsufficient is TRUE, then the intersection being smaller than oldinterval is sufficient.

If subsetsufficient is FALSE, then we require

  • a change from an unbounded interval to a bounded one, or
  • or a change from an unfixed (width > epsilon) to a fixed interval, or
  • a minimal tightening of one of the interval bounds as defined by SCIPis{Lb,Ub}Better().
Parameters
scipSCIP data structure
subsetsufficientwhether the intersection being a proper subset of oldinterval is sufficient
newintervalnew interval
oldintervalold interval

Definition at line 2465 of file cons_nonlinear.c.

References FALSE, SCIP_Interval::inf, MAX, MIN, NULL, SCIP_INTERVAL_INFINITY, SCIPintervalIsEmpty(), SCIPintervalIsSubsetEQ(), SCIPisEQ(), SCIPisLbBetter(), SCIPisUbBetter(), SCIP_Interval::sup, and TRUE.

Referenced by SCIPtightenExprIntervalNonlinear().

◆ reversePropQueue()

static SCIP_RETCODE reversePropQueue ( SCIP scip,
SCIP_CONSHDLR conshdlr,
SCIP_Bool infeasible,
int *  ntightenings 
)
static

propagates bounds for each sub-expression in the reversepropqueue by starting from the root expressions

The expression will be traversed in breadth first search by using this queue.

Note
Calling this function requires feasible intervals for each sub-expression; this is guaranteed by calling forwardPropExpr() before calling this function.
Calling this function with *infeasible = TRUE will only empty the queue.
Parameters
scipSCIP data structure
conshdlrconstraint handler
infeasiblebuffer to update whether an expression's bounds were propagated to an empty interval
ntighteningsbuffer to store the number of (variable) tightenings

Definition at line 2513 of file cons_nonlinear.c.

References FALSE, SCIP_Interval::inf, NULL, SCIP_CALL, SCIP_INTERVAL_INFINITY, SCIP_NLHDLR_METHOD_ACTIVITY, SCIP_OKAY, SCIPallocBufferArray, SCIPconshdlrGetData(), SCIPdebugMsg, SCIPdebugMsgPrint, SCIPexprGetActivity(), SCIPexprGetChildren(), SCIPexprGetHdlr(), SCIPexprGetNChildren(), SCIPexprGetOwnerData(), SCIPexprhdlrGetName(), SCIPexprhdlrHasReverseProp(), SCIPfreeBufferArray, SCIPgetExprBoundsNonlinear(), SCIPintervalIsEmpty(), SCIPintervalIsEntire(), SCIPnlhdlrGetName(), SCIPprintExpr(), SCIPqueueIsEmpty(), SCIPqueueRemove(), SCIPtightenExprIntervalNonlinear(), SCIP_Interval::sup, and TRUE.

Referenced by propConss(), and propExprDomains().

◆ propConss()

static SCIP_RETCODE propConss ( SCIP scip,
SCIP_CONSHDLR conshdlr,
SCIP_CONS **  conss,
int  nconss,
SCIP_Bool  force,
SCIP_RESULT result,
int *  nchgbds 
)
static

calls domain propagation for a given set of constraints

The algorithm alternates calls of forward and reverse propagation. Forward propagation ensures that activity of expressions is up to date. Reverse propagation tries to derive tighter variable bounds by reversing the activity computation, using the constraints [lhs,rhs] interval as starting point.

The propagation algorithm works as follows:

  1. apply forward propagation (update activities) for all constraints not marked as propagated
  2. if presolve or propauxvars is disabled: collect expressions for which the constraint sides provide tighter bounds if solve and propauxvars is enabled: collect expressions for which auxvars (including those in root exprs) provide tighter bounds
  3. apply reverse propagation to all collected expressions; don't explore sub-expressions which have not changed since the beginning of the propagation loop
  4. if we have found enough tightenings go to 1, otherwise leave propagation loop
Note
After calling forward propagation for a constraint, we mark this constraint as propagated. This flag might be reset during the reverse propagation when we find a bound tightening of a variable expression contained in the constraint. Resetting this flag is done in the EVENTEXEC callback of the event handler

TODO should we distinguish between expressions where activity information is used for separation and those where not, e.g., try less to propagate on convex constraints?

Parameters
scipSCIP data structure
conshdlrconstraint handler
conssconstraints to propagate
nconsstotal number of constraints
forceforce tightening even if below bound strengthening tolerance
resultpointer to store the result
nchgbdsbuffer to add the number of changed bounds

Definition at line 2674 of file cons_nonlinear.c.

References FALSE, forwardPropExpr(), NULL, reversePropQueue(), SCIP_Bool, SCIP_CALL, SCIP_CUTOFF, SCIP_DIDNOTFIND, SCIP_DIDNOTRUN, SCIP_EXPRITER_BFS, SCIP_INTERVAL_INFINITY, SCIP_OKAY, SCIP_Real, SCIP_REDUCEDDOM, SCIPconsGetData(), SCIPconsGetName(), SCIPconshdlrGetData(), SCIPconsIsActive(), SCIPconsIsDeleted(), SCIPconsIsPropagationEnabled(), SCIPcreateExpriter(), SCIPdebugMsg, SCIPdebugPrintCons, SCIPexprGetActivity(), SCIPexprGetOwnerData(), SCIPexpriterGetCurrent(), SCIPexpriterGetNext(), SCIPexpriterInit(), SCIPexpriterIsEnd(), SCIPfreeExpriter(), SCIPintervalIsEmpty(), SCIPintervalSetBounds(), SCIPisInfinity(), SCIPqueueIsEmpty(), SCIPtightenExprIntervalNonlinear(), and TRUE.

Referenced by consEnfo(), SCIP_DECL_CONSENFOPS(), SCIP_DECL_CONSPRESOL(), and SCIP_DECL_CONSPROP().

◆ propExprDomains()

static SCIP_RETCODE propExprDomains ( SCIP scip,
SCIP_CONSHDLR conshdlr,
SCIP_CONS **  conss,
int  nconss,
SCIP_RESULT result,
int *  nchgbds 
)
static

calls the reverseprop callbacks of all nlhdlrs in all expressions in all constraints using activity as bounds

This is meant to propagate any domain restrictions on functions onto variable bounds, if possible.

Assumes that activities are still valid and curpropboundstag does not need to be increased. Therefore, a good place to call this function is immediately after propConss() or after forwardPropExpr() if outside propagation.

Parameters
scipSCIP data structure
conshdlrconstraint handler
conssconstraints to propagate
nconsstotal number of constraints
resultpointer to store the result
nchgbdsbuffer to add the number of changed bounds

Definition at line 2878 of file cons_nonlinear.c.

References FALSE, NULL, reversePropQueue(), SCIP_Bool, SCIP_CALL, SCIP_CUTOFF, SCIP_DIDNOTFIND, SCIP_EXPRITER_DFS, SCIP_NLHDLR_METHOD_ACTIVITY, SCIP_OKAY, SCIP_REDUCEDDOM, SCIPconsGetData(), SCIPconsGetName(), SCIPconshdlrGetData(), SCIPconsIsActive(), SCIPconsIsDeleted(), SCIPconsIsPropagationEnabled(), SCIPcreateExpriter(), SCIPdebugMsg, SCIPexprGetActivity(), SCIPexprGetOwnerData(), SCIPexpriterGetNext(), SCIPexpriterInit(), SCIPexpriterIsEnd(), SCIPexpriterRestartDFS(), SCIPfreeExpriter(), and SCIPqueueIsEmpty().

Referenced by initSepa(), and SCIP_DECL_CONSPRESOL().

◆ propagateLocks()

◆ addLocks()

static SCIP_RETCODE addLocks ( SCIP scip,
SCIP_CONS cons,
int  nlockspos,
int  nlocksneg 
)
static

main function for adding locks to expressions and variables

Locks for a nonlinear constraint are used to update locks for all sub-expressions and variables. Locks of expressions depend on the monotonicity of expressions w.r.t. their children, e.g., consider the constraint \(x^2 \leq 1\) with \(x \in [-2,-1]\) implies an up-lock for the root expression (pow) and a down-lock for its child \(x\) because \(x^2\) is decreasing on [-2,-1]. Since the monotonicity (and thus the locks) might also depend on variable bounds, the function remembers the computed monotonicity information of each expression until all locks of an expression have been removed, which implies that updating the monotonicity information during the next locking of this expression does not break existing locks.

Note
When modifying the structure of an expression, e.g., during simplification, it is necessary to remove all locks from an expression and repropagating them after the structural changes have been applied. Because of existing common sub-expressions, it might be necessary to remove the locks of all constraints to ensure that an expression is unlocked (see canonicalizeConstraints() for an example)
Parameters
scipSCIP data structure
consnonlinear constraint
nlocksposnumber of positive rounding locks
nlocksnegnumber of negative rounding locks

Definition at line 3144 of file cons_nonlinear.c.

References NULL, propagateLocks(), SCIP_CALL, SCIP_OKAY, SCIPconsGetData(), and SCIPisInfinity().

Referenced by canonicalizeConstraints(), presolveMergeConss(), SCIP_DECL_CONSACTIVE(), SCIP_DECL_CONSDEACTIVE(), and SCIP_DECL_CONSLOCK().

◆ createNlRow()

static SCIP_RETCODE createNlRow ( SCIP scip,
SCIP_CONS cons 
)
static

◆ SCIP_DECL_SORTPTRCOMP() [2/3]

static SCIP_DECL_SORTPTRCOMP ( enfodataCmp  )
static

compares enfodata by enforcement priority of nonlinear handler

If handlers have same enforcement priority, then compare by detection priority, then by name.

Definition at line 3266 of file cons_nonlinear.c.

References NULL, SCIPnlhdlrGetDetectPriority(), SCIPnlhdlrGetEnfoPriority(), and SCIPnlhdlrGetName().

◆ detectNlhdlr()

◆ detectNlhdlrs()

static SCIP_RETCODE detectNlhdlrs ( SCIP scip,
SCIP_CONSHDLR conshdlr,
SCIP_CONS **  conss,
int  nconss 
)
static

◆ initSolve()

static SCIP_RETCODE initSolve ( SCIP scip,
SCIP_CONSHDLR conshdlr,
SCIP_CONS **  conss,
int  nconss 
)
static

initializes (pre)solving data of constraints

This initializes data in a constraint that is used for separation, propagation, etc, and assumes that expressions will not be modified. In particular, this function

  • runs the detection method of nlhldrs
  • looks for unlocked linear variables
  • checks curvature (if not in presolve)
  • creates and add row to NLP (if not in presolve)

This function can be called in presolve and solve and can be called several times with different sets of constraints, e.g., it should be called in INITSOL and for constraints that are added during solve.

Parameters
scipSCIP data structure
conshdlrconstraint handler
conssconstraints
nconssnumber of constraints

Definition at line 3606 of file cons_nonlinear.c.

References createNlRow(), detectNlhdlrs(), FALSE, findUnlockedLinearVar(), NULL, SCIP_Bool, SCIP_CALL, SCIP_EXPRCURV_CONCAVE, SCIP_EXPRCURV_CONVEX, SCIP_EXPRCURV_LINEAR, SCIP_OKAY, SCIP_STAGE_INITSOLVE, SCIP_STAGE_SOLVING, SCIPaddNlRow(), SCIPconsGetData(), SCIPconsGetName(), SCIPconshdlrGetData(), SCIPconsIsActive(), SCIPdebugMsg, SCIPgetStage(), SCIPhasExprCurvature(), SCIPisInfinity(), SCIPisNLPConstructed(), SCIPsetNlRowCurvature(), and SCIPwarningMessage().

Referenced by canonicalizeConstraints(), SCIP_DECL_CONSACTIVE(), SCIP_DECL_CONSINITSOL(), and SCIP_DECL_CONSLOCK().

◆ deinitSolve()

static SCIP_RETCODE deinitSolve ( SCIP scip,
SCIP_CONSHDLR conshdlr,
SCIP_CONS **  conss,
int  nconss 
)
static

deinitializes (pre)solving data of constraints

This removes the initialization data created in initSolve().

This function can be called in presolve and solve.

TODO At the moment, it should not be called for a constraint if there are other constraints that use the same expressions but still require their nlhdlr. We should probably only decrement the auxvar and activity usage for the root expr and then proceed as in detectNlhdlrs(), i.e., free enfo data only where none is used.

Parameters
scipSCIP data structure
conshdlrconstraint handler
conssconstraints
nconssnumber of constraints

Definition at line 3695 of file cons_nonlinear.c.

References FALSE, freeEnfoData(), NULL, SCIP_Bool, SCIP_CALL, SCIP_EXPRCURV_UNKNOWN, SCIP_EXPRITER_DFS, SCIP_EXPRITER_LEAVEEXPR, SCIP_OKAY, SCIP_STAGE_SOLVING, SCIPconsGetData(), SCIPconshdlrGetData(), SCIPcreateExpriter(), SCIPdebugMsg, SCIPdelNlRow(), SCIPevalExprActivity(), SCIPexprGetActivityTag(), SCIPexpriterGetNext(), SCIPexpriterInit(), SCIPexpriterIsEnd(), SCIPexpriterRestartDFS(), SCIPexpriterSetStagesDFS(), SCIPfreeExpriter(), SCIPfreeExprQuadratic(), SCIPgetStage(), SCIPreleaseNlRow(), and TRUE.

Referenced by canonicalizeConstraints(), SCIP_DECL_CONSDEACTIVE(), SCIP_DECL_CONSEXITSOL(), and SCIP_DECL_CONSLOCK().

◆ isBinaryProduct()

static SCIP_Bool isBinaryProduct ( SCIP scip,
SCIP_EXPR expr 
)
static

helper method to decide whether a given expression is product of at least two binary variables

Parameters
scipSCIP data structure
exprexpression

Definition at line 3777 of file cons_nonlinear.c.

References FALSE, NULL, SCIP_Real, SCIPexprGetChildren(), SCIPexprGetNChildren(), SCIPgetCoefExprProduct(), SCIPgetVarExprVar(), SCIPisEQ(), SCIPisExprProduct(), SCIPisExprVar(), SCIPvarGetLbLocal(), SCIPvarGetUbLocal(), SCIPvarIsIntegral(), and TRUE.

Referenced by getBilinearBinaryTerms(), and getBinaryProductExpr().

◆ getBilinearBinaryTerms()

static SCIP_RETCODE getBilinearBinaryTerms ( SCIP scip,
SCIP_EXPR sumexpr,
SCIP_VAR **  xs,
SCIP_VAR **  ys,
int *  childidxs,
int *  nterms 
)
static

helper method to collect all bilinear binary product terms

Parameters
scipSCIP data structure
sumexprsum expression
xsarray to collect first variable of each bilinear binary product
ysarray to collect second variable of each bilinear binary product
childidxsarray to store the index of the child of each stored bilinear binary product
ntermspointer to store the total number of bilinear binary terms

Definition at line 3823 of file cons_nonlinear.c.

References isBinaryProduct(), nterms, NULL, SCIP_OKAY, SCIPexprGetChildren(), SCIPexprGetNChildren(), SCIPgetVarExprVar(), SCIPisExprSum(), x, and y.

Referenced by getFactorizedBinaryQuadraticExpr().

◆ reformulateFactorizedBinaryQuadratic()

static SCIP_RETCODE reformulateFactorizedBinaryQuadratic ( SCIP scip,
SCIP_CONSHDLR conshdlr,
SCIP_CONS cons,
SCIP_VAR facvar,
SCIP_VAR **  vars,
SCIP_Real coefs,
int  nvars,
SCIP_EXPR **  newexpr,
int *  naddconss 
)
static

helper method to reformulate \(x_i \sum_j c_{ij} x_j\)

Parameters
scipSCIP data structure
conshdlrconstraint handler
consconstraint
facvarvariable that has been factorized
varsvariables of sum_j c_ij x_j
coefscoefficients of sum_j c_ij x_j
nvarstotal number of variables in sum_j c_ij x_j
newexprpointer to store the new expression
naddconsspointer to update the total number of added constraints (might be NULL)

Definition at line 3873 of file cons_nonlinear.c.

References createExprVar(), MAX, MIN, NULL, SCIP_Bool, SCIP_CALL, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_Real, SCIP_VARTYPE_CONTINUOUS, SCIP_VARTYPE_IMPLINT, SCIPaddCoefLinear(), SCIPaddCons(), SCIPaddVar(), SCIPconsGetName(), SCIPcreateConsBasicLinear(), SCIPcreateConsBasicVarbound(), SCIPcreateVarBasic(), SCIPdebugAddSolVal, SCIPdebugGetSolVal, SCIPinfinity(), SCIPisIntegral(), SCIPisZero(), SCIPreleaseCons(), SCIPreleaseVar(), SCIPsnprintf(), SCIPvarGetName(), and TRUE.

Referenced by getFactorizedBinaryQuadraticExpr().

◆ getFactorizedBinaryQuadraticExpr()

static SCIP_RETCODE getFactorizedBinaryQuadraticExpr ( SCIP scip,
SCIP_CONSHDLR conshdlr,
SCIP_CONS cons,
SCIP_EXPR sumexpr,
int  minterms,
SCIP_EXPR **  newexpr,
int *  naddconss 
)
static

helper method to generate an expression for a sum of products of binary variables; note that the method captures the generated expression

Parameters
scipSCIP data structure
conshdlrconstraint handler
consconstraint
sumexprexpression
mintermsminimum number of terms in a the sum of x_i sum_j c_j x_j
newexprpointer to store the expression that represents the binary quadratic
naddconsspointer to update the total number of added constraints (might be NULL)

Definition at line 3996 of file cons_nonlinear.c.

References getBilinearBinaryTerms(), MIN, nterms, NULL, reformulateFactorizedBinaryQuadratic(), SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPallocClearBufferArray, SCIPcreateExprSum(), SCIPdebugMsg, SCIPduplicateBufferArray, SCIPexprGetChildren(), SCIPexprGetNChildren(), SCIPfreeBufferArray, SCIPfreeBufferArrayNull, SCIPgetCoefsExprSum(), SCIPgetConstantExprSum(), SCIPgetNTotalVars(), SCIPgetNVars(), SCIPgetVars(), SCIPisExprSum(), SCIPreleaseExpr(), SCIPsortDownIntPtr(), SCIPvarGetIndex(), SCIPvarGetName(), and TRUE.

Referenced by presolveBinaryProducts(), and replaceBinaryProducts().

◆ getBinaryProductExprDo()

static SCIP_RETCODE getBinaryProductExprDo ( SCIP scip,
SCIP_CONSHDLR conshdlr,
SCIP_EXPR prodexpr,
SCIP_EXPR **  newexpr,
int *  naddconss,
SCIP_Bool  empathy4and 
)
static

helper method to create an AND constraint or varbound constraints for a given binary product expression

Parameters
scipSCIP data structure
conshdlrconstraint handler
prodexprproduct expression
newexprpointer to store the expression that represents the product
naddconsspointer to update the total number of added constraints (might be NULL)
empathy4andwhether to use an AND constraint, if possible

Definition at line 4194 of file cons_nonlinear.c.

References createExprVar(), NULL, SCIP_CALL, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_Real, SCIP_VARTYPE_IMPLINT, SCIPaddCons(), SCIPaddVar(), SCIPallocBufferArray, SCIPcreateConsBasicAnd(), SCIPcreateConsBasicLinear(), SCIPcreateConsBasicVarbound(), SCIPcreateVarBasic(), SCIPdebugAddSolVal, SCIPdebugGetSolVal, SCIPdebugMsg, SCIPexprGetChildren(), SCIPexprGetNChildren(), SCIPfreeBufferArray, SCIPgetVarExprVar(), SCIPinfinity(), SCIPisExprProduct(), SCIPreleaseCons(), SCIPreleaseVar(), SCIPsnprintf(), SCIPvarGetName(), w, x, and y.

Referenced by getBinaryProductExpr().

◆ getBinaryProductExpr()

static SCIP_RETCODE getBinaryProductExpr ( SCIP scip,
SCIP_CONSHDLR conshdlr,
SCIP_HASHMAP exprmap,
SCIP_EXPR prodexpr,
SCIP_EXPR **  newexpr,
int *  naddconss,
int *  nchgcoefs 
)
static

helper method to generate an expression for the product of binary variables; note that the method captures the generated expression

Parameters
scipSCIP data structure
conshdlrconstraint handler
exprmapmap to remember generated variables for visited product expressions
prodexprproduct expression
newexprpointer to store the expression that represents the product
naddconsspointer to update the total number of added constraints (might be NULL)
nchgcoefspointer to update the total number of changed coefficients (might be NULL)

Definition at line 4323 of file cons_nonlinear.c.

References createExprVar(), FALSE, getBinaryProductExprDo(), isBinaryProduct(), NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPcaptureExpr(), SCIPcliqueHasVar(), SCIPconshdlrGetData(), SCIPcreateExprSum(), SCIPcreateExprValue(), SCIPdebugMsg, SCIPexprGetChildren(), SCIPexprGetNChildren(), SCIPgetVarExprVar(), SCIPhashmapExists(), SCIPhashmapGetImage(), SCIPhashmapInsert(), SCIPreleaseExpr(), SCIPvarGetCliques(), SCIPvarGetNCliques(), TRUE, x, and y.

Referenced by replaceBinaryProducts().

◆ replaceBinaryProducts()

static SCIP_RETCODE replaceBinaryProducts ( SCIP scip,
SCIP_CONSHDLR conshdlr,
SCIP_CONS cons,
SCIP_HASHMAP exprmap,
SCIP_EXPRITER it,
int *  naddconss,
int *  nchgcoefs 
)
static

helper function to replace binary products in a given constraint

Parameters
scipSCIP data structure
conshdlrconstraint handler
consconstraint
exprmapmap to remember generated variables for visited product expressions
itexpression iterator
naddconsspointer to update the total number of added constraints (might be NULL)
nchgcoefspointer to update the total number of changed coefficients (might be NULL)

Definition at line 4472 of file cons_nonlinear.c.

References FALSE, getBinaryProductExpr(), getFactorizedBinaryQuadraticExpr(), NULL, SCIP_CALL, SCIP_OKAY, SCIPconsGetData(), SCIPconsGetName(), SCIPconshdlrGetData(), SCIPdebugMsg, SCIPexprGetNChildren(), SCIPexpriterGetChildExprDFS(), SCIPexpriterGetChildIdxDFS(), SCIPexpriterGetNext(), SCIPexpriterIsEnd(), SCIPexpriterRestartDFS(), SCIPreleaseExpr(), and SCIPreplaceExprChild().

Referenced by presolveBinaryProducts().

◆ presolveBinaryProducts()

static SCIP_RETCODE presolveBinaryProducts ( SCIP scip,
SCIP_CONSHDLR conshdlr,
SCIP_CONS **  conss,
int  nconss,
int *  naddconss,
int *  nchgcoefs 
)
static

reformulates products of binary variables during presolving in the following way:

Let \(\sum_{i,j} Q_{ij} x_i x_j\) be a subexpression that only contains binary variables. Each term \(x_i x_j\) is reformulated with the help of an extra (implicit integer) variable \(z_{ij}\) in {0,1}:

\[ z_{ij} \leq x_i, \qquad z_{ij} \leq x_j, \qquad x_i + x_j - z_{ij} \leq 1. \]

Before reformulating \(x_i x_j\) in this way, it is checked whether there is a clique that contains \(x_i\) and \(x_j\). These cliques allow for a better reformulation. There are four cases:

  1. \(x_i + x_j \leq 1\) implies that \(x_i x_j = 0\)
  2. \(x_i + (1 - x_j) \leq 1\) implies \(x_i x_j = x_i\)
  3. \((1 - x_i) + x_j \leq 1\) implies \(x_i x_j = x_j\)
  4. \((1 - x_i) + (1 - x_j) \leq 1\) implies \(x_i x_j = x_i + x_j - 1\)

The reformulation using \(z_{ij}\) or the cliques is implemented in getBinaryProductExpr().

Introducing too many extra variables and constraints can have a negative impact on the performance (e.g., due to slow probing). For this reason, it is checked in getFactorizedBinaryQuadraticExpr() whether \(\sum_{i,j} Q_{ij} x_i x_j\) contains large (≥ reformbinprodsfac parameter) lower sums of the form \(x_i \sum_j Q_{ij} x_j\). Such a lower sum is reformulated with only one extra variable w_i:

\begin{align} \text{maxact} & := \sum_j \max(0, Q_{ij}), \\ \text{minact} & := \sum_j \min(0, Q_{ij}), \\ \text{minact}\, x_i & \leq w_i, \\ w_i &\leq \text{maxact}\, x_i, \\ \text{minact} &\leq \sum_j Q_{ij} x_j - w_i + \text{minact}\, x_i \\ \text{maxact} &\geq \sum_j Q_{ij} x_j - w_i + \text{maxact}\, x_i \end{align}

We mark \(w_i\) to be implicit integer if all \(Q_{ij}\) are integer. After each replacement of a lower sum, it is checked whether there are enough terms left to factorize other binary variables. Lower sums with a larger number of terms are prioritized.

Parameters
scipSCIP data structure
conshdlrconstraint handler
conssconstraints
nconsstotal number of constraints
naddconsspointer to store the total number of added constraints (might be NULL)
nchgcoefspointer to store the total number of changed coefficients (might be NULL)

Definition at line 4576 of file cons_nonlinear.c.

References FALSE, getFactorizedBinaryQuadraticExpr(), NULL, replaceBinaryProducts(), SCIP_CALL, SCIP_EXPRITER_DFS, SCIP_EXPRITER_VISITINGCHILD, SCIP_OKAY, SCIPblkmem(), SCIPconsGetData(), SCIPconshdlrGetData(), SCIPcreateExpriter(), SCIPdebugMsg, SCIPexpriterInit(), SCIPexpriterSetStagesDFS(), SCIPfreeExpriter(), SCIPgetNBinVars(), SCIPgetNVars(), SCIPhashmapCreate(), SCIPhashmapFree(), and SCIPreleaseExpr().

Referenced by canonicalizeConstraints().

◆ scaleConsSides()

static SCIP_RETCODE scaleConsSides ( SCIP scip,
SCIP_CONSHDLR conshdlr,
SCIP_CONS cons,
SCIP_Bool changed 
)
static

scales the sides of the constraint \(\ell \leq \sum_i c_i f_i(x) \leq r\).

Let \(n_+\) the number of positive coefficients \(c_i\) and \(n_-\) be the number of negative coefficients. Then scale by -1 if

  • \(n_+ < n_-\), or
  • \(n_+ = n_-\) and \(r = \infty\).
Parameters
scipSCIP data structure
conshdlrnonlinear constraint handler
consnonlinear constraint
changedbuffer to store if the expression of cons changed

Definition at line 4655 of file cons_nonlinear.c.

References NULL, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPcaptureExpr(), SCIPconsGetData(), SCIPcreateExprSum(), SCIPexprGetChildren(), SCIPexprGetNChildren(), SCIPfreeBufferArray, SCIPgetCoefsExprSum(), SCIPgetConstantExprSum(), SCIPisExprSum(), SCIPisInfinity(), SCIPreleaseExpr(), SCIPswapReals(), and TRUE.

Referenced by canonicalizeConstraints().

◆ forbidNonlinearVariablesMultiaggration()

static SCIP_RETCODE forbidNonlinearVariablesMultiaggration ( SCIP scip,
SCIP_CONSHDLR conshdlr,
SCIP_CONS **  conss,
int  nconss 
)
static

forbid multiaggrations of variables that appear nonlinear in constraints

Parameters
scipSCIP data structure
conshdlrconstraint handler
conssconstraints
nconssnumber of constraints

Definition at line 4738 of file cons_nonlinear.c.

References FALSE, NULL, SCIP_CALL, SCIP_EXPRITER_DFS, SCIP_OKAY, SCIPconsGetData(), SCIPconshdlrGetData(), SCIPcreateExpriter(), SCIPexprGetChildren(), SCIPexprGetNChildren(), SCIPexpriterGetNext(), SCIPexpriterInit(), SCIPexpriterIsEnd(), SCIPexpriterRestartDFS(), SCIPfreeExpriter(), SCIPgetVarExprVar(), SCIPisExprSum(), SCIPisExprVar(), and SCIPmarkDoNotMultaggrVar().

Referenced by canonicalizeConstraints().

◆ canonicalizeConstraints()

static SCIP_RETCODE canonicalizeConstraints ( SCIP scip,
SCIP_CONSHDLR conshdlr,
SCIP_CONS **  conss,
int  nconss,
SCIP_PRESOLTIMING  presoltiming,
SCIP_Bool infeasible,
int *  ndelconss,
int *  naddconss,
int *  nchgcoefs 
)
static

simplifies expressions and replaces common subexpressions for a set of constraints

Parameters
scipSCIP data structure
conshdlrconstraint handler
conssconstraints
nconsstotal number of constraints
presoltimingpresolve timing (SCIP_PRESOLTIMING_ALWAYS if not in presolving)
infeasiblebuffer to store whether infeasibility has been detected
ndelconsscounter to add number of deleted constraints, or NULL
naddconsscounter to add number of added constraints, or NULL
nchgcoefscounter to add number of changed coefficients, or NULL

Definition at line 4805 of file cons_nonlinear.c.

References addLocks(), catchVarEvents(), deinitSolve(), dropVarEvents(), FALSE, forbidNonlinearVariablesMultiaggration(), freeVarExprs(), initSolve(), SCIP_Cons::nlockspos, NULL, presolveBinaryProducts(), scaleConsSides(), SCIP_Bool, SCIP_CALL, SCIP_EXPRITER_RTOPOLOGIC, SCIP_OKAY, SCIP_PRESOLTIMING_EXHAUSTIVE, SCIP_Real, SCIP_STAGE_PRESOLVING, SCIPallocBufferArray, SCIPconsGetData(), SCIPconsGetName(), SCIPconshdlrGetData(), SCIPconsIsDeleted(), SCIPcreateExpriter(), SCIPdebugMsg, SCIPdebugPrintCons, SCIPdelCons(), SCIPduplicateBufferArray, SCIPexprGetOwnerData(), SCIPexpriterGetNext(), SCIPexpriterInit(), SCIPexpriterIsEnd(), SCIPfreeBufferArray, SCIPfreeExpriter(), SCIPgetStage(), SCIPgetValueExprValue(), SCIPisExprValue(), SCIPisFeasNegative(), SCIPisFeasPositive(), SCIPisInfinity(), SCIPnlhdlrResetNDetectionslast, SCIPreleaseExpr(), SCIPreplaceCommonSubexpressions(), SCIPsimplifyExpr(), SCIPsortPtr(), SCIPstartClock(), SCIPstopClock(), storeVarExprs(), and TRUE.

Referenced by SCIP_DECL_CONSEXITPRE(), and SCIP_DECL_CONSPRESOL().

◆ presolveMergeConss()

static SCIP_RETCODE presolveMergeConss ( SCIP scip,
SCIP_CONS **  conss,
int  nconss,
SCIP_Bool success 
)
static

merges constraints that have the same root expression

Parameters
scipSCIP data structure
conssconstraints to process
nconssnumber of constraints
successpointer to store whether at least one constraint could be deleted

Definition at line 5077 of file cons_nonlinear.c.

References addLocks(), FALSE, MAX, MIN, SCIP_Cons::nlockspos, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPallocBufferArray, SCIPallocClearBufferArray, SCIPblkmem(), SCIPconsGetData(), SCIPconsGetName(), SCIPconsIsDeleted(), SCIPdebugMsg, SCIPdelCons(), SCIPfreeBufferArray, SCIPhashmapCreate(), SCIPhashmapExists(), SCIPhashmapFree(), SCIPhashmapGetImageInt(), SCIPhashmapInsertInt(), SCIPisInfinity(), and TRUE.

Referenced by SCIP_DECL_CONSPRESOL().

◆ SCIP_DECL_EXPR_INTEVALVAR() [2/2]

static SCIP_DECL_EXPR_INTEVALVAR ( intEvalVarRedundancyCheck  )
static

interval evaluation of variables as used in redundancy check

Returns local variable bounds of a variable, relaxed by feastol, as interval.

Definition at line 5180 of file cons_nonlinear.c.

References infty2infty, NULL, SCIP_INTERVAL_INFINITY, SCIP_Real, SCIPfeastol(), SCIPinfinity(), SCIPintervalSetBounds(), SCIPisInfinity(), SCIPisRelEQ(), SCIPvarGetLbGlobal(), SCIPvarGetLbLocal(), SCIPvarGetUbGlobal(), and SCIPvarGetUbLocal().

◆ presolveRedundantConss()

static SCIP_RETCODE presolveRedundantConss ( SCIP scip,
SCIP_CONSHDLR conshdlr,
SCIP_CONS **  conss,
int  nconss,
SCIP_Bool cutoff,
int *  ndelconss,
int *  nchgbds 
)
static

removes constraints that are always feasible or very simple

Checks whether the activity of constraint functions is a subset of the constraint sides (relaxed by feastol). To compute the activity, we use forwardPropExpr(), but relax variable bounds by feastol, because solutions to be checked might violate variable bounds by up to feastol, too. This is the main reason why the redundancy check is not done in propConss(), which relaxes variable bounds by epsilon only.

Also removes constraints of the form lhs ≤ variable ≤ rhs.

Note
This could should not run during solving, because the forwardProp takes the bounds of auxiliary variables into account. For the root expression, these bounds are already set to the constraint sides, so that the activity of every expression would appear as if the constraint is redundant.
Parameters
scipSCIP data structure
conshdlrconstraint handler
conssconstraints to propagate
nconsstotal number of constraints
cutoffpointer to store whether infeasibility has been identified
ndelconssbuffer to add the number of deleted constraints
nchgbdsbuffer to add the number of variable bound tightenings

Definition at line 5243 of file cons_nonlinear.c.

References FALSE, forwardPropExpr(), SCIP_Interval::inf, NULL, SCIP_Bool, SCIP_CALL, SCIP_INTERVAL_INFINITY, SCIP_OKAY, SCIP_Real, SCIPconsGetData(), SCIPconsGetName(), SCIPconshdlrGetData(), SCIPconsIsActive(), SCIPconsIsDeleted(), SCIPdebugMsg, SCIPdebugPrintCons, SCIPdelConsLocal(), SCIPexprGetActivity(), SCIPexprGetActivityTag(), SCIPfeastol(), SCIPgetValueExprValue(), SCIPgetVarExprVar(), SCIPintervalIsEmpty(), SCIPintervalIsSubsetEQ(), SCIPintervalSetBounds(), SCIPisExprValue(), SCIPisExprVar(), SCIPisInfinity(), SCIPtightenVarLb(), SCIPtightenVarUb(), SCIPvarGetLbLocal(), SCIPvarGetName(), SCIPvarGetUbLocal(), SCIP_Interval::sup, and TRUE.

Referenced by SCIP_DECL_CONSPRESOL().

◆ presolveUpgrade()

static SCIP_RETCODE presolveUpgrade ( SCIP scip,
SCIP_CONSHDLR conshdlr,
SCIP_CONS cons,
SCIP_Bool upgraded,
int *  nupgdconss,
int *  naddconss 
)
static

tries to automatically convert a nonlinear constraint into a more specific and more specialized constraint

Parameters
scipSCIP data structure
conshdlrconstraint handler data structure
conssource constraint to try to convert
upgradedbuffer to store whether constraint was upgraded
nupgdconssbuffer to increase if constraint was upgraded
naddconssbuffer to increase with number of additional constraints created during upgrade

Definition at line 5412 of file cons_nonlinear.c.

References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPaddCons(), SCIPallocBufferArray, SCIPconsGetData(), SCIPconsGetName(), SCIPconshdlrGetData(), SCIPconsIsModifiable(), SCIPdebugMsg, SCIPdebugMsgPrint, SCIPdebugPrintCons, SCIPdelCons(), SCIPfreeBufferArray, SCIPreallocBufferArray, SCIPreleaseCons(), and TRUE.

Referenced by SCIP_DECL_CONSPRESOL().

◆ isSingleLockedCand()

static SCIP_Bool isSingleLockedCand ( SCIP scip,
SCIP_EXPR expr 
)
static

returns whether the variable of a given variable expression is a candidate for presolveSingleLockedVars(), i.e., the variable is only contained in a single nonlinear constraint, has no objective coefficient, has finite variable bounds, and is not binary

Parameters
scipSCIP data structure
exprvariable expression

Definition at line 5519 of file cons_nonlinear.c.

References NULL, SCIP_LOCKTYPE_MODEL, SCIP_VARTYPE_BINARY, SCIPexprGetOwnerData(), SCIPgetVarExprVar(), SCIPisEQ(), SCIPisExprVar(), SCIPisInfinity(), SCIPisZero(), SCIPvarGetLbGlobal(), SCIPvarGetNLocksDownType(), SCIPvarGetNLocksUpType(), SCIPvarGetObj(), SCIPvarGetType(), and SCIPvarGetUbGlobal().

Referenced by presolveSingleLockedVars().

◆ removeSingleLockedVars()

static SCIP_RETCODE removeSingleLockedVars ( SCIP scip,
SCIP_EXPR expr,
SCIP_EXPRITER it,
SCIP_HASHMAP exprcands 
)
static

removes all variable expressions that are contained in a given expression from a hash map

Parameters
scipSCIP data structure
exprexpression
itexpression iterator
exprcandsmap to hash variable expressions

Definition at line 5545 of file cons_nonlinear.c.

References SCIP_CALL, SCIP_OKAY, SCIPexpriterGetNext(), SCIPexpriterIsEnd(), SCIPexpriterRestartDFS(), SCIPhashmapExists(), SCIPhashmapRemove(), and SCIPisExprVar().

Referenced by presolveSingleLockedVars().

◆ presolveSingleLockedVars()

static SCIP_RETCODE presolveSingleLockedVars ( SCIP scip,
SCIP_CONSHDLR conshdlr,
SCIP_CONS cons,
int *  nchgvartypes,
int *  naddconss,
SCIP_Bool infeasible 
)
static

presolving method to fix a variable \(x_i\) to one of its bounds if the variable is only contained in a single nonlinear constraint g(x) ≤ rhs (≥ lhs) if g() is concave (convex) in \(x_i\)

If a continuous variable has bounds [0,1], then the variable type is changed to be binary. Otherwise, a bound disjunction constraint is added.

Parameters
scipSCIP data structure
conshdlrnonlinear constraint handler
consnonlinear constraint
nchgvartypespointer to store the total number of changed variable types
naddconsspointer to store the total number of added constraints
infeasiblepointer to store whether problem is infeasible

Definition at line 5577 of file cons_nonlinear.c.

References FALSE, isSingleLockedCand(), NULL, removeSingleLockedVars(), SCIP_Bool, SCIP_BOUNDTYPE_LOWER, SCIP_BOUNDTYPE_UPPER, SCIP_CALL, SCIP_EXPRITER_DFS, SCIP_EXPRITER_ENTEREXPR, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_Real, SCIP_VARTYPE_BINARY, SCIPaddCons(), SCIPallocBufferArray, SCIPblkmem(), SCIPchgVarType(), SCIPconsGetData(), SCIPconsGetName(), SCIPconshdlrGetData(), SCIPcreateConsBounddisjunction(), SCIPcreateExpriter(), SCIPdebugMsg, SCIPexprGetChildren(), SCIPexprGetNChildren(), SCIPexpriterInit(), SCIPexpriterSetStagesDFS(), SCIPfindConshdlr(), SCIPfreeBufferArray, SCIPfreeExpriter(), SCIPgetCoefsExprSum(), SCIPgetExponentExprPow(), SCIPgetVarExprVar(), SCIPhashmapCreate(), SCIPhashmapExists(), SCIPhashmapFree(), SCIPhashmapInsert(), SCIPisEQ(), SCIPisExprPower(), SCIPisExprProduct(), SCIPisExprSum(), SCIPisExprVar(), SCIPisInfinity(), SCIPreleaseCons(), SCIPsnprintf(), SCIPvarGetLbGlobal(), SCIPvarGetName(), SCIPvarGetType(), SCIPvarGetUbGlobal(), and TRUE.

Referenced by SCIP_DECL_CONSPRESOL().

◆ presolveImplint()

static SCIP_RETCODE presolveImplint ( SCIP scip,
SCIP_CONSHDLR conshdlr,
SCIP_CONS **  conss,
int  nconss,
int *  nchgvartypes,
SCIP_Bool infeasible 
)
static

presolving method to check if there is a single linear continuous variable that can be made implicit integer

Parameters
scipSCIP data structure
conshdlrconstraint handler
conssnonlinear constraints
nconsstotal number of nonlinear constraints
nchgvartypespointer to update the total number of changed variable types
infeasiblepointer to store whether problem is infeasible

Definition at line 5781 of file cons_nonlinear.c.

References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIP_VARTYPE_IMPLINT, SCIPchgVarType(), SCIPconsGetData(), SCIPconsGetName(), SCIPdebugMsg, SCIPexprGetChildren(), SCIPexprGetNChildren(), SCIPexprIsIntegral(), SCIPexprSetIntegrality(), SCIPgetCoefsExprSum(), SCIPgetConstantExprSum(), SCIPgetNBinVars(), SCIPgetNContVars(), SCIPgetNIntVars(), SCIPgetVarExprVar(), SCIPisEQ(), SCIPisExprSum(), SCIPisExprVar(), SCIPisIntegral(), SCIPvarGetName(), SCIPvarIsIntegral(), and TRUE.

Referenced by SCIP_DECL_CONSPRESOL().

◆ createAuxVar()

◆ initSepa()

static SCIP_RETCODE initSepa ( SCIP scip,
SCIP_CONSHDLR conshdlr,
SCIP_CONS **  conss,
int  nconss,
SCIP_Bool infeasible 
)
static

initializes separation for constraint

  • ensures that activities are up to date in all expressions
  • creates auxiliary variables where required
  • calls propExprDomains() to possibly tighten auxvar bounds
  • calls separation initialization callback of nlhdlrs
Parameters
scipSCIP data structure
conshdlrnonlinear constraints handler
conssconstraints
nconssnumber of constraints
infeasiblepointer to store whether the problem is infeasible or not

Definition at line 6033 of file cons_nonlinear.c.

References createAuxVar(), FALSE, NULL, propExprDomains(), SCIP_Bool, SCIP_CALL, SCIP_CUTOFF, SCIP_EXPRITER_DFS, SCIP_NLHDLR_METHOD_SEPABOTH, SCIP_OKAY, SCIPconsGetData(), SCIPconsGetName(), SCIPconshdlrGetData(), SCIPcreateExpriter(), SCIPdebugMsg, SCIPevalExpr(), SCIPevalExprActivity(), SCIPexprGetOwnerData(), SCIPexpriterGetNext(), SCIPexpriterInit(), SCIPexpriterIsEnd(), SCIPexpriterRestartDFS(), SCIPfreeExpriter(), SCIPnlhdlrHasInitSepa(), SCIPtightenVarLb(), SCIPtightenVarUb(), SCIPvarGetLbLocal(), SCIPvarGetName(), SCIPvarGetUbLocal(), and TRUE.

Referenced by SCIP_DECL_CONSINITLP().

◆ branchAuxNonlinear()

static SCIP_Bool branchAuxNonlinear ( SCIP scip,
SCIP_CONSHDLR conshdlr 
)
static

returns whether we are ok to branch on auxiliary variables

Currently returns whether depth of node in B&B tree is at least value of constraints/nonlinear/branching/aux parameter.

Parameters
scipSCIP data structure
conshdlrconstraint handler

Definition at line 6215 of file cons_nonlinear.c.

References NULL, SCIPconshdlrGetData(), and SCIPgetDepth().

Referenced by collectBranchingCandidates(), registerBranchingCandidates(), SCIPaddExprsViolScoreNonlinear(), and SCIPaddExprViolScoreNonlinear().

◆ getViolSplitWeight()

static SCIP_Real getViolSplitWeight ( SCIP scip,
SCIP_CONSHDLR conshdlr,
SCIP_VAR var,
SCIP_SOL sol 
)
static

gets weight of variable when splitting violation score onto several variables in an expression

Parameters
scipSCIP data structure
conshdlrexpr constraint handler
varvariable
solcurrent solution

Definition at line 6232 of file cons_nonlinear.c.

References MAX, MIN, NULL, SCIP_INVALID, SCIP_Real, SCIPABORT, SCIPconshdlrGetData(), SCIPerrorMessage, SCIPgetSolVal(), SCIPvarGetLbLocal(), and SCIPvarGetUbLocal().

Referenced by addExprsViolScore().

◆ addExprsViolScore()

static void addExprsViolScore ( SCIP scip,
SCIP_EXPR **  exprs,
int  nexprs,
SCIP_Real  violscore,
SCIP_SOL sol,
SCIP_Bool success 
)
static

adds violation-branching score to a set of expressions, thereby distributing the score

Each expression must either be a variable expression or have an aux-variable.

If unbounded variables are present, each unbounded var gets an even score. If no unbounded variables, then parameter constraints/nonlinear/branching/violsplit decides weight for each var.

Parameters
scipSCIP data structure
exprsexpressions where to add branching score
nexprsnumber of expressions
violscoreviolation-branching score to add to expression
solcurrent solution
successbuffer to store whether at least one violscore was added

Definition at line 6285 of file cons_nonlinear.c.

References FALSE, getViolSplitWeight(), NULL, SCIP_Real, SCIPaddExprViolScoreNonlinear(), SCIPdebugMsg, SCIPexprGetOwnerData(), SCIPgetExprAuxVarNonlinear(), SCIPisEQ(), SCIPisInfinity(), SCIPvarGetLbLocal(), SCIPvarGetName(), SCIPvarGetUbLocal(), and TRUE.

Referenced by SCIPaddExprsViolScoreNonlinear().

◆ addExprViolScoresAuxVars()

static SCIP_RETCODE addExprViolScoresAuxVars ( SCIP scip,
SCIP_EXPR expr,
SCIP_Real  violscore,
SCIP_VAR **  auxvars,
int  nauxvars,
SCIP_SOL sol,
SCIP_Bool success 
)
static

adds violation-branching score to children of expression for given auxiliary variables

Iterates over the successors of expr to find expressions that are associated with one of the given auxiliary variables. Adds violation-branching scores to all found exprs by means of SCIPaddExprsViolScoreNonlinear().

Note
This method may modify the given auxvars array by means of sorting.
Parameters
scipSCIP data structure
exprexpression where to start searching
violscoreviolation score to add to expression
auxvarsauxiliary variables for which to find expression
nauxvarsnumber of auxiliary variables
solcurrent solution (NULL for the LP solution)
successbuffer to store whether at least one violscore was added

Definition at line 6371 of file cons_nonlinear.c.

References FALSE, NULL, SCIP_CALL, SCIP_EXPRITER_BFS, SCIP_OKAY, SCIPaddExprsViolScoreNonlinear(), SCIPallocBufferArray, SCIPcreateExpriter(), SCIPdebugMsg, SCIPexpriterGetNext(), SCIPexpriterInit(), SCIPexpriterIsEnd(), SCIPfreeBufferArray, SCIPfreeExpriter(), SCIPgetExprAuxVarNonlinear(), SCIPsortedvecFindPtr(), SCIPsortPtr(), and SCIPvarGetName().

Referenced by SCIPprocessRowprepNonlinear().

◆ registerBranchingCandidatesAllUnfixed()

static SCIP_RETCODE registerBranchingCandidatesAllUnfixed ( SCIP scip,
SCIP_CONSHDLR conshdlr,
SCIP_CONS **  conss,
int  nconss,
int *  nnotify 
)
static

registers all unfixed variables in violated constraints as branching candidates

Parameters
scipSCIP data structure
conshdlrnonlinear constraints handler
conssconstraints
nconssnumber of constraints
nnotifycounter for number of notifications performed

Definition at line 6436 of file cons_nonlinear.c.

References getConsAbsViolation(), isConsViolated(), NULL, SCIP_CALL, SCIP_INVALID, SCIP_OKAY, SCIPaddExternBranchCand(), SCIPconsGetData(), SCIPgetVarExprVar(), SCIPisEQ(), SCIPvarGetLbLocal(), and SCIPvarGetUbLocal().

Referenced by consEnfo(), and SCIP_DECL_CONSENFOPS().

◆ registerBranchingCandidates()

static SCIP_RETCODE registerBranchingCandidates ( SCIP scip,
SCIP_CONSHDLR conshdlr,
SCIP_CONS **  conss,
int  nconss,
SCIP_Bool success 
)
static

registers all variables in violated constraints with branching scores as external branching candidates

Parameters
scipSCIP data structure
conshdlrnonlinear constraints handler
conssconstraints
nconssnumber of constraints
successbuffer to store whether at least one branching candidate was added

Definition at line 6486 of file cons_nonlinear.c.

References branchAuxNonlinear(), ENFOLOG, FALSE, isConsViolated(), NULL, SCIP_CALL, SCIP_EXPRITER_DFS, SCIP_INVALID, SCIP_OKAY, SCIP_Real, SCIPaddExternBranchCand(), SCIPconsGetData(), SCIPcreateExpriter(), SCIPexprGetOwnerData(), SCIPexpriterGetNext(), SCIPexpriterInit(), SCIPexpriterIsEnd(), SCIPexpriterRestartDFS(), SCIPfreeExpriter(), SCIPgetExprAuxVarNonlinear(), SCIPgetExprViolScoreNonlinear(), SCIPgetVarExprVar(), SCIPinfoMessage(), SCIPisEQ(), SCIPvarGetLbLocal(), SCIPvarGetName(), SCIPvarGetUbLocal(), and TRUE.

Referenced by branching().

◆ collectBranchingCandidates()

static SCIP_RETCODE collectBranchingCandidates ( SCIP scip,
SCIP_CONSHDLR conshdlr,
SCIP_CONS **  conss,
int  nconss,
SCIP_Real  maxrelconsviol,
SCIP_SOL sol,
SCIP_Longint  soltag,
BRANCHCAND cands,
int *  ncands 
)
static

collect branching candidates from violated constraints

Fills array with expressions that serve as branching candidates. Collects those expressions that have a branching score assigned and stores the score in the auxviol field of the branching candidate.

If branching on aux-variables is allowed, then iterate through expressions of violated constraints, otherwise iterate through variable-expressions only.

Parameters
scipSCIP data structure
conshdlrconstraint handler
conssconstraints to process
nconssnumber of constraints
maxrelconsviolmaximal scaled constraint violation
solsolution to enforce (NULL for the LP solution)
soltagtag of solution
candsarray where to store candidates, must be at least SCIPgetNVars() long
ncandsnumber of candidates found

Definition at line 6621 of file cons_nonlinear.c.

References BRANCHCAND::auxviol, branchAuxNonlinear(), ENFOLOG, BRANCHCAND::expr, FALSE, getConsRelViolation(), isConsViolated(), NULL, SCIP_CALL, SCIP_EXPRITER_DFS, SCIP_OKAY, SCIP_Real, SCIPconsGetData(), SCIPconshdlrGetData(), SCIPcreateExpriter(), SCIPexprGetOwnerData(), SCIPexpriterGetNext(), SCIPexpriterInit(), SCIPexpriterIsEnd(), SCIPexpriterRestartDFS(), SCIPfreeExpriter(), SCIPgetExprAuxVarNonlinear(), SCIPgetExprViolScoreNonlinear(), SCIPgetNVars(), SCIPgetVarExprVar(), SCIPinfoMessage(), SCIPisEQ(), SCIPvarGetLbLocal(), SCIPvarGetName(), SCIPvarGetUbLocal(), and BRANCHCAND::var.

Referenced by branching(), and branchingIntegralOrNonlinear().

◆ getDualBranchscore()

static SCIP_Real getDualBranchscore ( SCIP scip,
SCIP_CONSHDLR conshdlr,
SCIP_VAR var 
)
static

computes a branching score for a variable that reflects how important branching on this variable would be for improving the dual bound from the LP relaxation

Assume the Lagrangian for the current LP is something of the form L(x,z,lambda) = c'x + sum_i lambda_i (a_i'x - z_i + b_i) + ... where x are the original variables, z the auxiliary variables, and a_i'x - z_i + b_i <= 0 are the rows of the LP.

Assume that a_i'x + b_i <= z_i was derived from some nonlinear constraint f(x) <= z and drop index i. If we could have used not only an estimator, but the actual function f(x), then this would have contributed lambda*(f(x) - z) to the Lagrangian function (though the value of z would be different). Using a lot of handwaving, we claim that lambda_i * (f(x) - a_i'x + b_i) is a value that can be used to quantity how much improving the estimator a'x + b <= z could change the dual bound. If an estimator depended on local bounds, then it could be improved by branching. We use row-is-local as proxy for estimator-depending-on-lower-bounds.

To score a variable, we then sum the values lambda_i * (f(x) - a_i'x + b_i) for all rows in which the variable appears. To scale, we divide by the LP objective value (if >1).

TODO if we branch only on original variables, we neglect here estimators that are build on auxiliary variables; these are affected by the bounds on original variables indirectly (through forward-propagation)

TODO if we branch also on auxiliary variables, then separating z from the x-variables in the row a'x+b <= z should happen; in effect, we should go from the row to the expression for which it was generated and consider only variables that would also be branching candidates

Parameters
scipSCIP data structure
conshdlrnonlinear constraints handler
varvariable

Definition at line 6799 of file cons_nonlinear.c.

References MAX, NULL, r, REALABS, SCIP_LPSOLSTAT_OPTIMAL, SCIP_Real, SCIP_VARSTATUS_COLUMN, SCIPcolGetNLPNonz(), SCIPcolGetRows(), SCIPcolIsInLP(), SCIPgetHugeValue(), SCIPgetLPObjval(), SCIPgetLPSolstat(), SCIPisFinite, SCIPisHugeValue(), SCIPisZero(), SCIProwGetDualsol(), SCIProwGetName(), SCIProwGetOriginConshdlr(), SCIPvarGetCol(), and SCIPvarGetStatus().

Referenced by scoreBranchingCandidates().

◆ scoreBranchingCandidates()

static void scoreBranchingCandidates ( SCIP scip,
SCIP_CONSHDLR conshdlr,
BRANCHCAND cands,
int  ncands,
SCIP_Bool  considerfracnl,
SCIP_SOL sol 
)
static

computes branching scores (including weighted score) for a set of candidates

For each candidate in the array, compute and store the various branching scores (violation, pseudo-costs, vartype, domainwidth). For pseudo-costs, it's possible that the score is not available, in which case cands[c].pscost will be set to SCIP_INVALID.

For each score, compute the maximum over all candidates.

Then compute for each candidate a "weighted" score using the weights as specified by parameters and the scores as previously computed, but scale each score to be in [0,1], i.e., divide each score by the maximum score of all candidates. Further divide by the sum of all weights where a score was available (even if the score was 0).

For example:

  • Let variable x have violation-score 10.0 and pseudo-cost-score 5.0.
  • Let variable y have violation-score 12.0 but no pseudo-cost-score (because it hasn't yet been branched on sufficiently often).
  • Assuming violation is weighted by 2.0 and pseudo-costs are weighted by 3.0.
  • Then the weighted scores for x will be (2.0 * 10.0/12.0 + 3.0 * 5.0/5.0) / (2.0 + 3.0) = 0.9333. The weighted score for y will be (2.0 * 12.0/12.0) / 2.0 = 1.0.
Parameters
scipSCIP data structure
conshdlrconstraint handler
candsbranching candidates
ncandsnumber of candidates
considerfracnlwhether to consider fractionality for spatial branching candidates
solsolution to enforce (NULL for the LP solution)

Definition at line 6895 of file cons_nonlinear.c.

References BRANCHCAND::auxviol, BRANCHCAND::domain, BRANCHCAND::dual, ENFOLOG, BRANCHCAND::expr, BRANCHCAND::fractionality, getDualBranchscore(), MAX, NULL, BRANCHCAND::pscost, REALABS, SCIP_BRANCHDIR_DOWNWARDS, SCIP_BRANCHDIR_UPWARDS, SCIP_INVALID, SCIP_Real, SCIP_VARTYPE_BINARY, SCIP_VARTYPE_CONTINUOUS, SCIP_VARTYPE_IMPLINT, SCIP_VARTYPE_INTEGER, SCIPadjustedVarLb(), SCIPadjustedVarUb(), SCIPconshdlrGetData(), SCIPepsilon(), SCIPerrorMessage, SCIPfeasCeil(), SCIPfeasFloor(), SCIPgetBranchingPoint(), SCIPgetBranchScore(), SCIPgetExprAuxVarNonlinear(), SCIPgetNObjVars(), SCIPgetSolVal(), SCIPgetVarPseudocostCountCurrentRun(), SCIPgetVarPseudocostVal(), SCIPinfinity(), SCIPinfoMessage(), SCIPisInfinity(), SCIPround(), SCIPvarGetLbLocal(), SCIPvarGetName(), SCIPvarGetType(), SCIPvarGetUbLocal(), BRANCHCAND::var, BRANCHCAND::vartype, and BRANCHCAND::weighted.

Referenced by selectBranchingCandidate().

◆ SCIP_DECL_SORTINDCOMP() [1/2]

static SCIP_DECL_SORTINDCOMP ( branchcandCompare  )
static

compare two branching candidates by their weighted score

if weighted score is equal, use variable index of (aux)var if variables are the same, then use whether variable was added due to nonlinearity or fractionality

Definition at line 7232 of file cons_nonlinear.c.

References BRANCHCAND::expr, NULL, SCIPvarGetIndex(), and BRANCHCAND::weighted.

◆ selectBranchingCandidate()

static SCIP_RETCODE selectBranchingCandidate ( SCIP scip,
SCIP_CONSHDLR conshdlr,
BRANCHCAND cands,
int  ncands,
SCIP_Bool  considerfracnl,
SCIP_SOL sol,
BRANCHCAND **  selected 
)
static

picks a candidate from array of branching candidates

Parameters
scipSCIP data structure
conshdlrconstraint handler
candsbranching candidates
ncandsnumber of candidates
considerfracnlwhether to consider fractionality for spatial branching candidates
solrelaxation solution, NULL for LP
selectedbuffer to store selected branching candidates

Definition at line 7247 of file cons_nonlinear.c.

References BRANCH_RANDNUMINITSEED, ENFOLOG, NULL, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPconshdlrGetData(), SCIPcreateRandom(), SCIPfreeBufferArray, SCIPinfoMessage(), SCIPrandomGetInt(), SCIPsortDown(), SCIPvarGetName(), scoreBranchingCandidates(), TRUE, and BRANCHCAND::weighted.

Referenced by branching(), and branchingIntegralOrNonlinear().

◆ branching()

static SCIP_RETCODE branching ( SCIP scip,
SCIP_CONSHDLR conshdlr,
SCIP_CONS **  conss,
int  nconss,
SCIP_Real  maxrelconsviol,
SCIP_SOL sol,
SCIP_Longint  soltag,
SCIP_RESULT result 
)
static

do spatial branching or register branching candidates

Parameters
scipSCIP data structure
conshdlrconstraint handler
conssconstraints to process
nconssnumber of constraints
maxrelconsviolmaximal scaled constraint violation
solsolution to enforce (NULL for the LP solution)
soltagtag of solution
resultpointer to store the result of branching

Definition at line 7343 of file cons_nonlinear.c.

References collectBranchingCandidates(), ENFOLOG, BRANCHCAND::expr, NULL, registerBranchingCandidates(), SCIP_Bool, SCIP_BRANCHED, SCIP_CALL, SCIP_DIDNOTFIND, SCIP_INFEASIBLE, SCIP_INVALID, SCIP_OKAY, SCIP_REDUCEDDOM, SCIPallocBufferArray, SCIPbranchVarVal(), SCIPconshdlrGetData(), SCIPfreeBufferArray, SCIPgetBranchingPoint(), SCIPgetNLPBranchCands(), SCIPgetNVars(), SCIPinfoMessage(), SCIPvarGetLbLocal(), SCIPvarGetName(), SCIPvarGetUbLocal(), selectBranchingCandidate(), and BRANCHCAND::var.

Referenced by enforceConstraints().

◆ enforceExprNlhdlr()

static SCIP_RETCODE enforceExprNlhdlr ( SCIP scip,
SCIP_CONSHDLR conshdlr,
SCIP_CONS cons,
SCIP_NLHDLR nlhdlr,
SCIP_EXPR expr,
SCIP_NLHDLREXPRDATA nlhdlrexprdata,
SCIP_SOL sol,
SCIP_Real  auxvalue,
SCIP_Bool  overestimate,
SCIP_Bool  separated,
SCIP_Bool  allowweakcuts,
SCIP_Bool  inenforcement,
SCIP_Bool  branchcandonly,
SCIP_RESULT result 
)
static

call enforcement or estimate callback of nonlinear handler

Calls the enforcement callback, if available. Otherwise, calls the estimate callback, if available, and constructs a cut from the estimator.

If cut is weak, but estimator is not tight, tries to add branching candidates.

Parameters
scipSCIP main data structure
conshdlrconstraint handler
consnonlinear constraint
nlhdlrnonlinear handler
exprexpression
nlhdlrexprdatanonlinear handler data of expression
solsolution to be separated (NULL for the LP solution)
auxvaluecurrent value of expression w.r.t. auxiliary variables as obtained from EVALAUX
overestimatewhether the expression needs to be over- or underestimated
separatedwhether another nonlinear handler already added a cut for this expression
allowweakcutswhether we allow for weak cuts
inenforcementwhether we are in enforcement (and not just separation)
branchcandonlyonly collect branching candidates, do not separate or propagate
resultpointer to store the result

Definition at line 7424 of file cons_nonlinear.c.

References ENFOLOG, FALSE, NULL, r, SCIP_Bool, SCIP_BRANCHED, SCIP_CALL, SCIP_DIDNOTFIND, SCIP_DIDNOTRUN, SCIP_OKAY, SCIP_SIDETYPE_LEFT, SCIP_SIDETYPE_RIGHT, SCIPaddRowprepTerm(), SCIPcreatePtrarray(), SCIPfreePtrarray(), SCIPfreeRowprep(), SCIPgetExprAuxVarNonlinear(), SCIPgetPtrarrayMaxIdx(), SCIPgetPtrarrayMinIdx(), SCIPgetPtrarrayVal(), SCIPgetSolVal(), SCIPinfoMessage(), SCIPnlhdlrGetName(), SCIPnlhdlrHasEstimate(), SCIPprocessRowprepNonlinear(), and SCIProwprepGetSidetype().

Referenced by enforceExpr().

◆ enforceExpr()

static SCIP_RETCODE enforceExpr ( SCIP scip,
SCIP_CONSHDLR conshdlr,
SCIP_CONS cons,
SCIP_EXPR expr,
SCIP_SOL sol,
SCIP_Longint  soltag,
SCIP_Bool  allowweakcuts,
SCIP_Bool  inenforcement,
SCIP_Bool  branchcandonly,
SCIP_RESULT result 
)
static

tries to enforce violation in an expression by separation, bound tightening, or finding a branching candidate

if not inenforcement, then we should be called by consSepa(), and thus only try separation

Parameters
scipSCIP data structure
conshdlrnonlinear constraints handler
consnonlinear constraint
exprexpression
solsolution to separate, or NULL if LP solution should be used
soltagtag of solution
allowweakcutswhether we allow weak cuts
inenforcementwhether we are in enforcement (and not just separation)
branchcandonlyonly collect branching candidates, do not separate or propagate
resultpointer to store the result of the enforcing call

Definition at line 7531 of file cons_nonlinear.c.

References ENFOLOG, enforceExprNlhdlr(), FALSE, getExprAbsAuxViolation(), getExprAbsOrigViolation(), NULL, SCIP_Bool, SCIP_BRANCHED, SCIP_CALL, SCIP_CUTOFF, SCIP_DIDNOTFIND, SCIP_NLHDLR_METHOD_SEPAABOVE, SCIP_NLHDLR_METHOD_SEPABELOW, SCIP_NLHDLR_METHOD_SEPABOTH, SCIP_OKAY, SCIP_Real, SCIP_REDUCEDDOM, SCIP_SEPARATED, SCIPconshdlrGetData(), SCIPevalExpr(), SCIPexprGetActivity(), SCIPexprGetEvalValue(), SCIPexprGetHdlr(), SCIPexprGetOwnerData(), SCIPexprhdlrGetName(), SCIPfeastol(), SCIPgetSolVal(), SCIPinfoMessage(), SCIPisInfinity(), SCIPnlhdlrGetName(), SCIPprintExpr(), and TRUE.

Referenced by enforceConstraint().

◆ enforceConstraint()

static SCIP_RETCODE enforceConstraint ( SCIP scip,
SCIP_CONSHDLR conshdlr,
SCIP_CONS cons,
SCIP_SOL sol,
SCIP_Longint  soltag,
SCIP_EXPRITER it,
SCIP_Bool  allowweakcuts,
SCIP_Bool  inenforcement,
SCIP_Bool  branchcandonly,
SCIP_RESULT result,
SCIP_Bool success 
)
static

helper function to enforce a single constraint

Parameters
scipSCIP data structure
conshdlrconstraint handler
consconstraint to process
solsolution to enforce (NULL for the LP solution)
soltagtag of solution
itexpression iterator that we can just use here
allowweakcutswhether to allow weak cuts in this round
inenforcementwhether to we are in enforcement, and not just separation
branchcandonlyonly collect branching candidates, do not separate or propagate
resultpointer to update with result of the enforcing call
successbuffer to store whether some enforcement took place

Definition at line 7745 of file cons_nonlinear.c.

References ENFOLOG, enforceExpr(), FALSE, forwardPropExpr(), NULL, SCIP_Bool, SCIP_BRANCHED, SCIP_CALL, SCIP_CUTOFF, SCIP_DIDNOTFIND, SCIP_OKAY, SCIP_REDUCEDDOM, SCIP_SEPARATED, SCIPconsGetData(), SCIPconshdlrGetData(), SCIPexprGetOwnerData(), SCIPexpriterGetNext(), SCIPexpriterIsEnd(), SCIPexpriterRestartDFS(), SCIPinfoMessage(), SCIPprintExpr(), and TRUE.

Referenced by enforceConstraints().

◆ enforceConstraints()

static SCIP_RETCODE enforceConstraints ( SCIP scip,
SCIP_CONSHDLR conshdlr,
SCIP_CONS **  conss,
int  nconss,
SCIP_SOL sol,
SCIP_Longint  soltag,
SCIP_Bool  inenforcement,
SCIP_Bool  branchcandonly,
SCIP_Real  maxrelconsviol,
SCIP_RESULT result 
)
static

try to separate violated constraints and, if in enforcement, register branching scores

If branchcandonly=TRUE, then do not separate or propagate, but register branching scores only.

Sets result to

  • SCIP_DIDNOTFIND, if nothing of the below has been done
  • SCIP_CUTOFF, if node can be cutoff,
  • SCIP_SEPARATED, if a cut has been added,
  • SCIP_REDUCEDDOM, if a domain reduction has been found or a variable got fixed (in an attempt to branch on it),
  • SCIP_BRANCHED, if branching has been done (if branchcandonly=TRUE, then collected branching candidates only),
  • SCIP_INFEASIBLE, if external branching candidates were registered
Parameters
scipSCIP data structure
conshdlrconstraint handler
conssconstraints to process
nconssnumber of constraints
solsolution to enforce (NULL for the LP solution)
soltagtag of solution
inenforcementwhether we are in enforcement, and not just separation
branchcandonlyonly collect branching candidates, do not separate or propagate
maxrelconsviollargest scaled violation among all violated expr-constraints, only used if in enforcement
resultpointer to store the result of the enforcing call

Definition at line 7865 of file cons_nonlinear.c.

References branching(), ENFOLOG, enforceConstraint(), FALSE, getConsAbsViolation(), getConsRelViolation(), isConsViolated(), NULL, SCIP_Bool, SCIP_BRANCHED, SCIP_CALL, SCIP_CUTOFF, SCIP_DIDNOTFIND, SCIP_EXPRITER_DFS, SCIP_INFEASIBLE, SCIP_OKAY, SCIP_Real, SCIP_REDUCEDDOM, SCIPconsGetData(), SCIPconsGetName(), SCIPconshdlrGetData(), SCIPconsIsActive(), SCIPconsIsDeleted(), SCIPconsIsEnabled(), SCIPconsIsSeparationEnabled(), SCIPcreateExpriter(), SCIPexpriterInit(), SCIPfreeExpriter(), SCIPgetSolVal(), SCIPgetVarExprVar(), SCIPinfoMessage(), SCIPprintCons(), SCIPvarGetLbLocal(), SCIPvarGetName(), SCIPvarGetUbLocal(), and TRUE.

Referenced by branchingIntegralOrNonlinear(), consEnfo(), and consSepa().

◆ branchingIntegralOrNonlinear()

static SCIP_RETCODE branchingIntegralOrNonlinear ( SCIP scip,
SCIP_CONSHDLR conshdlr,
SCIP_CONS **  conss,
int  nconss,
SCIP_Longint  soltag,
SCIP_Real  maxrelconsviol,
SCIP_Bool branchintegral,
SCIP_Bool cutoff 
)
static

decide whether to branch on fractional integer or nonlinear variable

The routine collects spatial branching candidates by a call to enforceConstraints(branchcandonly=TRUE) and collectBranchingCandidates(). Then it adds fractional integer variables to the candidate list. Variables that are candidate for both spatial branching and fractionality are considered as two separate candidates. selectBranchingCandidate() then selects a variable for branching from the joined candidate list. If the selected variable is a fractional integer one, then branchintegral=TRUE is returned, otherwise FALSE. Some shortcuts exist for cases where there are no candidates of the one kind or the other.

Parameters
scipSCIP data structure
conshdlrconstraint handler
conssconstraints to process
nconssnumber of constraints
soltagtag of LP solution
maxrelconsviolmaximal scaled constraint violation
branchintegralbuffer to store whether to branch on fractional integer variables first
cutoffbuffer to store whether infeasibility has been detected

Definition at line 7996 of file cons_nonlinear.c.

References BRANCHCAND::auxviol, collectBranchingCandidates(), ENFOLOG, enforceConstraints(), BRANCHCAND::expr, FALSE, BRANCHCAND::fractionality, NULL, SCIP_BRANCHED, SCIP_CALL, SCIP_CUTOFF, SCIP_DIDNOTFIND, SCIP_ERROR, SCIP_INFEASIBLE, SCIP_Longint, SCIP_OKAY, SCIP_Real, SCIP_REDUCEDDOM, SCIP_SEPARATED, SCIP_VARTYPE_INTEGER, SCIPallocBufferArray, SCIPerrorMessage, SCIPfreeBufferArray, SCIPgetLPBranchCands(), SCIPgetNBinVars(), SCIPgetNIntVars(), SCIPgetNLPBranchCands(), SCIPgetNVars(), SCIPinfoMessage(), SCIPvarGetName(), SCIPvarGetType(), selectBranchingCandidate(), TRUE, and BRANCHCAND::var.

Referenced by consEnfo().

◆ branchingIntegralFirst()

static SCIP_Bool branchingIntegralFirst ( SCIP scip,
SCIP_CONSHDLR conshdlr,
SCIP_SOL sol 
)
static

decide whether to consider spatial branching before integrality has been enforced

This decides whether we are still at a phase where we always want to branch on fractional integer variables if any (return TRUE), or whether branchingIntegralOrNonlinear() should be used (return FALSE).

This essentially checks whether the average pseudo cost count exceeds the value of parameter branchmixfractional.

Parameters
scipSCIP data structure
conshdlrconstraint handler
solsolution to be enforced

Definition at line 8108 of file cons_nonlinear.c.

References FALSE, NULL, SCIP_Bool, SCIP_BRANCHDIR_DOWNWARDS, SCIP_BRANCHDIR_UPWARDS, SCIP_LPSOLSTAT_UNBOUNDEDRAY, SCIPconshdlrGetData(), SCIPgetAvgPseudocostCount(), SCIPgetLPSolstat(), SCIPgetNBinVars(), SCIPgetNIntVars(), SCIPgetNLPBranchCands(), SCIPgetSolVal(), SCIPgetVars(), SCIPisFeasIntegral(), SCIPisInfinity(), SCIPvarIsIntegral(), and TRUE.

Referenced by consEnfo().

◆ analyzeViolation()

static SCIP_RETCODE analyzeViolation ( SCIP scip,
SCIP_CONS **  conss,
int  nconss,
SCIP_SOL sol,
SCIP_Longint  soltag,
SCIP_Real maxabsconsviol,
SCIP_Real maxrelconsviol,
SCIP_Real minauxviol,
SCIP_Real maxauxviol,
SCIP_Real maxvarboundviol 
)
static

collect (and print (if debugging enfo)) information on violation in expressions

assumes that constraint violations have been computed

Parameters
scipSCIP data structure
conssconstraints
nconssnumber of constraints
solsolution to separate, or NULL if LP solution should be used
soltagtag of solution
maxabsconsviolbuffer to store maximal absolute violation of constraints
maxrelconsviolbuffer to store maximal relative violation of constraints
minauxviolbuffer to store minimal (nonzero) violation of auxiliaries
maxauxviolbuffer to store maximal violation of auxiliaries (violation in "extended formulation")
maxvarboundviolbuffer to store maximal violation of variable bounds

Definition at line 8183 of file cons_nonlinear.c.

References ENFOLOG, FALSE, getConsAbsViolation(), getConsRelViolation(), getExprAbsAuxViolation(), getExprAbsOrigViolation(), isConsViolated(), MAX, MIN, NULL, SCIP_Bool, SCIP_CALL, SCIP_EXPRITER_DFS, SCIP_NLHDLR_METHOD_SEPABOTH, SCIP_OKAY, SCIP_Real, SCIPconsGetData(), SCIPconsIsActive(), SCIPconsIsDeleted(), SCIPconsIsEnabled(), SCIPconsIsSeparationEnabled(), SCIPcreateExpriter(), SCIPexprGetActivity(), SCIPexprGetEvalValue(), SCIPexprGetOwnerData(), SCIPexpriterGetNext(), SCIPexpriterInit(), SCIPexpriterIsEnd(), SCIPexpriterRestartDFS(), SCIPfreeExpriter(), SCIPgetSolVal(), SCIPgetVarExprVar(), SCIPinfinity(), SCIPinfoMessage(), SCIPisExprVar(), SCIPisInfinity(), SCIPnlhdlrGetName(), SCIPprintExpr(), SCIPvarGetLbLocal(), SCIPvarGetName(), and SCIPvarGetUbLocal().

Referenced by consEnfo().

◆ consEnfo()

static SCIP_RETCODE consEnfo ( SCIP scip,
SCIP_CONSHDLR conshdlr,
SCIP_CONS **  conss,
int  nconss,
SCIP_SOL sol,
SCIP_RESULT result 
)
static

enforcement of constraints called by enfolp and enforelax

Parameters
scipSCIP data structure
conshdlrconstraint handler
conssconstraints to process
nconssnumber of constraints
solsolution to enforce (NULL for the LP solution)
resultpointer to store the result of the enforcing call

Definition at line 8359 of file cons_nonlinear.c.

References analyzeViolation(), branchingIntegralFirst(), branchingIntegralOrNonlinear(), computeViolation(), ENFOLOG, enforceConstraints(), FALSE, isConsViolated(), MAX, MIN, NULL, propConss(), registerBranchingCandidatesAllUnfixed(), SCIP_Bool, SCIP_BRANCHED, SCIP_CALL, SCIP_CUTOFF, SCIP_DIDNOTFIND, SCIP_FEASIBLE, SCIP_INFEASIBLE, SCIP_Longint, SCIP_OKAY, SCIP_Real, SCIP_REDUCEDDOM, SCIP_SEPARATED, SCIP_SOLVELP, SCIPconshdlrGetData(), SCIPepsilon(), SCIPgetCurrentNode(), SCIPgetExprNewSoltag(), SCIPgetLPFeastol(), SCIPgetNLPBranchCands(), SCIPinfoMessage(), SCIPisPositive(), SCIPisZero(), SCIPnodeGetNumber(), SCIPsetLPFeastol(), and TRUE.

Referenced by SCIP_DECL_CONSENFOLP(), and SCIP_DECL_CONSENFORELAX().

◆ consSepa()

static SCIP_RETCODE consSepa ( SCIP scip,
SCIP_CONSHDLR conshdlr,
SCIP_CONS **  conss,
int  nconss,
SCIP_SOL sol,
SCIP_RESULT result 
)
static

separation for all violated constraints to be used by SEPA callbacks

Parameters
scipSCIP data structure
conshdlrconstraint handler
conssconstraints to process
nconssnumber of constraints
solsolution to enforce (NULL for the LP solution)
resultpointer to store the result of the enforcing call

Definition at line 8585 of file cons_nonlinear.c.

References computeViolation(), ENFOLOG, enforceConstraints(), FALSE, isConsViolated(), NULL, SCIP_Bool, SCIP_CALL, SCIP_DIDNOTFIND, SCIP_INVALID, SCIP_Longint, SCIP_OKAY, SCIPconsIsActive(), SCIPconsIsDeleted(), SCIPconsIsEnabled(), SCIPconsIsSeparationEnabled(), SCIPgetCurrentNode(), SCIPgetExprNewSoltag(), SCIPinfoMessage(), SCIPnodeGetNumber(), and TRUE.

Referenced by SCIP_DECL_CONSSEPALP(), and SCIP_DECL_CONSSEPASOL().

◆ SCIP_DECL_HASHGETKEY()

static SCIP_DECL_HASHGETKEY ( bilinearTermsGetHashkey  )
static

hash key retrieval function for bilinear term entries

Definition at line 8635 of file cons_nonlinear.c.

References NULL.

◆ SCIP_DECL_HASHKEYEQ()

static SCIP_DECL_HASHKEYEQ ( bilinearTermsIsHashkeyEq  )
static

returns TRUE iff the bilinear term entries are equal

Definition at line 8651 of file cons_nonlinear.c.

References NULL, SCIPvarCompare(), SCIP_ConsNonlinear_BilinTerm::x, and SCIP_ConsNonlinear_BilinTerm::y.

◆ SCIP_DECL_HASHKEYVAL()

static SCIP_DECL_HASHKEYVAL ( bilinearTermsGetHashkeyVal  )
static

returns the hash value of the key

Definition at line 8669 of file cons_nonlinear.c.

References NULL, SCIPhashTwo, SCIPvarCompare(), SCIPvarGetIndex(), SCIP_ConsNonlinear_BilinTerm::x, and SCIP_ConsNonlinear_BilinTerm::y.

◆ SCIP_DECL_SORTPTRCOMP() [3/3]

static SCIP_DECL_SORTPTRCOMP ( auxexprComp  )
static

compare two auxiliary expressions

Compares auxiliary variables, followed by coefficients, and then constants.

Definition at line 8685 of file cons_nonlinear.c.

References SCIP_ConsNonlinear_Auxexpr::auxvar, SCIP_ConsNonlinear_Auxexpr::coefs, SCIP_ConsNonlinear_Auxexpr::cst, and SCIPvarCompare().

◆ bilinTermAddAuxExpr()

static SCIP_RETCODE bilinTermAddAuxExpr ( SCIP scip,
SCIP_CONSHDLRDATA conshdlrdata,
SCIP_CONSNONLINEAR_BILINTERM term,
SCIP_CONSNONLINEAR_AUXEXPR auxexpr,
SCIP_Bool added 
)
static
Parameters
scipSCIP data structure
conshdlrdatanonlinear constraint handler data
termbilinear term
auxexprauxiliary expression to add
addedpointer to store whether auxexpr has been added

Definition at line 8710 of file cons_nonlinear.c.

References SCIP_ConsNonlinear_BilinTerm::aux, SCIP_ConsNonlinear_BilinTerm::auxexprssize, SCIP_ConsNonlinear_BilinTerm::exprs, FALSE, SCIP_ConsNonlinear_BilinTerm::nauxexprs, NULL, SCIP_ConsNonlinear_Auxexpr::overestimate, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPensureBlockMemoryArray, SCIPsortedvecFindPtr(), TRUE, and SCIP_ConsNonlinear_Auxexpr::underestimate.

Referenced by SCIPinsertBilinearTermImplicitNonlinear().

◆ bilinearTermsInsertAll()

static SCIP_RETCODE bilinearTermsInsertAll ( SCIP scip,
SCIP_CONSHDLR conshdlr,
SCIP_CONS **  conss,
int  nconss 
)
static

iterates through all expressions of all nonlinear constraints and adds the corresponding bilinear terms to the hash table

Parameters
scipSCIP data structure
conshdlrconstraint handler
conssnonlinear constraints
nconsstotal number of nonlinear constraints

Definition at line 8764 of file cons_nonlinear.c.

References FALSE, NULL, SCIP_CALL, SCIP_EXPRITER_DFS, SCIP_EXPRITER_ENTEREXPR, SCIP_OKAY, SCIPconsGetData(), SCIPconshdlrGetData(), SCIPcreateExpriter(), SCIPexprGetChildren(), SCIPexprGetNChildren(), SCIPexpriterGetNext(), SCIPexpriterInit(), SCIPexpriterIsEnd(), SCIPexpriterRestartDFS(), SCIPexpriterSetStagesDFS(), SCIPfreeExpriter(), SCIPgetExponentExprPow(), SCIPgetExprAuxVarNonlinear(), SCIPgetExprNLocksNegNonlinear(), SCIPgetExprNLocksPosNonlinear(), SCIPinsertBilinearTermExistingNonlinear(), SCIPisExprPower(), SCIPisExprProduct(), x, and y.

Referenced by SCIP_DECL_CONSINITLP(), and SCIPcollectBilinTermsNonlinear().

◆ bilinearTermsInsertEntry()

static SCIP_RETCODE bilinearTermsInsertEntry ( SCIP scip,
SCIP_CONSHDLR conshdlr,
SCIP_VAR x,
SCIP_VAR y,
int  nlockspos,
int  nlocksneg,
int *  idx,
SCIP_Bool  existing 
)
static

store x, y and the locks in a new bilinear term

Parameters
scipSCIP data structure
conshdlrnonlinear constraint handler
xthe first variable
ythe second variable
nlocksposnumber of positive locks of the bilinear term
nlocksnegnumber of negative locks of the bilinear term
idxpointer to store the position of the term in bilinterms array
existingwhether the term exists explicitly in the problem

Definition at line 8839 of file cons_nonlinear.c.

References SCIP_ConsNonlinear_BilinTerm::aux, SCIP_ConsNonlinear_BilinTerm::auxexprssize, SCIP_ConsNonlinear_BilinTerm::existing, SCIP_ConsNonlinear_BilinTerm::exprs, SCIP_ConsNonlinear_BilinTerm::nauxexprs, SCIP_ConsNonlinear_BilinTerm::nlocksneg, SCIP_ConsNonlinear_BilinTerm::nlockspos, NULL, SCIP_CALL, SCIP_OKAY, SCIPblkmem(), SCIPcaptureVar(), SCIPconshdlrGetData(), SCIPensureBlockMemoryArray, SCIPgetBilinTermIdxNonlinear(), SCIPhashtableCreate(), SCIPhashtableInsert(), SCIPswapPointers(), SCIPvarCompare(), SCIP_ConsNonlinear_BilinTerm::var, x, SCIP_ConsNonlinear_BilinTerm::x, y, and SCIP_ConsNonlinear_BilinTerm::y.

Referenced by SCIPinsertBilinearTermExistingNonlinear(), and SCIPinsertBilinearTermImplicitNonlinear().

◆ bilinearTermsFree()

static SCIP_RETCODE bilinearTermsFree ( SCIP scip,
SCIP_CONSHDLRDATA conshdlrdata 
)
static

frees array of bilinear terms and hash table

Parameters
scipSCIP data structure
conshdlrdataconstraint handler data

Definition at line 8932 of file cons_nonlinear.c.

References NULL, SCIP_CALL, SCIP_OKAY, SCIPfreeBlockMemory, SCIPfreeBlockMemoryArray, SCIPfreeBlockMemoryArrayNull, SCIPhashtableFree(), and SCIPreleaseVar().

Referenced by SCIP_DECL_CONSEXITSOL().

◆ buildVertexPolyhedralSeparationLP()

static SCIP_RETCODE buildVertexPolyhedralSeparationLP ( SCIP scip,
int  nvars,
SCIP_LPI **  lp 
)
static

builds LP used to compute facets of the convex envelope of vertex-polyhedral functions

Parameters
scipSCIP data structure
nvarsnumber of (unfixed) variables in vertex-polyhedral functions
lppointer to store created LP

Definition at line 9002 of file cons_nonlinear.c.

References a, NULL, POWEROFTWO, SCIP_CALL, SCIP_MAXVERTEXPOLYDIM, SCIP_OBJSEN_MINIMIZE, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPallocClearBufferArray, SCIPdebugMsg, SCIPfreeBufferArray, SCIPgetMessagehdlr(), SCIPlpiChgSides(), SCIPlpiCreate(), SCIPlpiInfinity(), and SCIPlpiLoadColLP().

Referenced by computeVertexPolyhedralFacetLP().

◆ computeVertexPolyhedralMaxFacetError()

static SCIP_Real computeVertexPolyhedralMaxFacetError ( SCIP scip,
SCIP_Bool  overestimate,
SCIP_Real funvals,
SCIP_Real box,
int  nallvars,
int  nvars,
int *  nonfixedpos,
SCIP_Real facetcoefs,
SCIP_Real  facetconstant 
)
static

the given facet might not be a valid under(over)estimator, because of numerics and bad fixings; we compute \( \max_{v \in V} f(v) - (\alpha v + \beta) \) ( \(\max_{v \in V} \alpha v + \beta - f(v) \)) where \( V \) is the set of vertices of the domain

Parameters
scipSCIP data structure
overestimatewhether we check for an over or underestimator
funvalsarray containing the evaluation of the function at all corners, length: 2^nvars
boxbox for which facet was computed, length: 2*nallvars
nallvarsnumber of all variables
nvarsnumber of unfixed variables
nonfixedposindices of unfixed variables, length: nvars
facetcoefscurrent facet candidate's coefficients, length: nallvars
facetconstantcurrent facet candidate's constant, length: nallvars

Definition at line 9113 of file cons_nonlinear.c.

References MAX, NULL, POWEROFTWO, SCIP_Real, and SCIPdebugMsg.

Referenced by SCIPcomputeFacetVertexPolyhedralNonlinear().

◆ computeVertexPolyhedralFacetLP()

static SCIP_RETCODE computeVertexPolyhedralFacetLP ( SCIP scip,
SCIP_CONSHDLR conshdlr,
SCIP_Bool  overestimate,
SCIP_Real xstar,
SCIP_Real box,
int  nallvars,
int *  nonfixedpos,
SCIP_Real funvals,
int  nvars,
SCIP_Real  targetvalue,
SCIP_Bool success,
SCIP_Real facetcoefs,
SCIP_Real facetconstant 
)
static

computes a facet of the convex or concave envelope of a vertex polyhedral function by solving an LP

Parameters
scipSCIP data structure
conshdlrnonlinear constraint handler
overestimatewhether to compute facet of concave (TRUE) or convex (FALSE) envelope
xstarpoint to be separated
boxbox where to compute facet: should be lb_1, ub_1, lb_2, ub_2...
nallvarshalf of the length of box
nonfixedposindices of nonfixed variables
funvalsvalues of function in all corner points (w.r.t. nonfixed variables)
nvarsnumber of nonfixed variables
targetvaluetarget value: no need to compute facet if value in xstar would be worse than this value
successbuffer to store whether a facet could be computed successfully
facetcoefsbuffer to store coefficients of facet defining inequality; must be an zero'ed array of length at least nallvars
facetconstantbuffer to store constant part of facet defining inequality

Definition at line 9201 of file cons_nonlinear.c.

References buildVertexPolyhedralSeparationLP(), FALSE, MAX, MIN, NULL, POWEROFTWO, REALABS, SCIP_CALL, SCIP_LPERROR, SCIP_LPPAR_DUALFEASTOL, SCIP_LPPAR_FEASTOL, SCIP_LPPAR_LPINFO, SCIP_LPPAR_LPITLIM, SCIP_LPPAR_OBJLIM, SCIP_MAXVERTEXPOLYDIM, SCIP_OBJSEN_MAXIMIZE, SCIP_OBJSEN_MINIMIZE, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPconshdlrGetData(), SCIPcreateRandom(), SCIPdebugMsg, SCIPdebugMsgPrint, SCIPepsilon(), SCIPfeastol(), SCIPfreeBufferArray, SCIPinfinity(), SCIPisEQ(), SCIPisInfinity(), SCIPlpiChgObj(), SCIPlpiChgObjsen(), SCIPlpiChgSides(), SCIPlpiGetNCols(), SCIPlpiGetNRows(), SCIPlpiGetSol(), SCIPlpiIsDualFeasible(), SCIPlpiSetIntpar(), SCIPlpiSetRealpar(), SCIPlpiSolveDual(), SCIPlpiSolvePrimal(), SCIPrandomGetReal(), TRUE, and VERTEXPOLY_RANDNUMINITSEED.

Referenced by SCIPcomputeFacetVertexPolyhedralNonlinear().

◆ computeVertexPolyhedralFacetUnivariate()

static SCIP_RETCODE computeVertexPolyhedralFacetUnivariate ( SCIP scip,
SCIP_Real  left,
SCIP_Real  right,
SCIP_Real  funleft,
SCIP_Real  funright,
SCIP_Bool success,
SCIP_Real facetcoef,
SCIP_Real facetconstant 
)
static

computes a facet of the convex or concave envelope of a univariate vertex polyhedral function

In other words, compute the line that passes through two given points.

Parameters
scipSCIP data structure
leftleft coordinate
rightright coordinate
funleftvalue of function in left coordinate
funrightvalue of function in right coordinate
successbuffer to store whether a facet could be computed successfully
facetcoefbuffer to store coefficient of facet defining inequality
facetconstantbuffer to store constant part of facet defining inequality

Definition at line 9457 of file cons_nonlinear.c.

References NULL, SCIP_INVALID, SCIP_OKAY, SCIPisFinite, SCIPisInfinity(), SCIPisLE(), and TRUE.

Referenced by SCIPcomputeFacetVertexPolyhedralNonlinear().

◆ computeHyperplaneThreePoints()

static SCIP_RETCODE computeHyperplaneThreePoints ( SCIP scip,
SCIP_Real  a1,
SCIP_Real  a2,
SCIP_Real  a3,
SCIP_Real  b1,
SCIP_Real  b2,
SCIP_Real  b3,
SCIP_Real  c1,
SCIP_Real  c2,
SCIP_Real  c3,
SCIP_Real alpha,
SCIP_Real beta,
SCIP_Real gamma_,
SCIP_Real delta 
)
static

given three points, constructs coefficient of equation for hyperplane generated by these three points

Three points a, b, and c are given. Computes coefficients alpha, beta, gamma, and delta, such that a, b, and c, satisfy alpha * x1 + beta * x2 + gamma * x3 = delta and gamma >= 0.0.

Parameters
scipSCIP data structure
a1first coordinate of a
a2second coordinate of a
a3third coordinate of a
b1first coordinate of b
b2second coordinate of b
b3third coordinate of b
c1first coordinate of c
c2second coordinate of c
c3third coordinate of c
alphacoefficient of first coordinate
betacoefficient of second coordinate
gamma_coefficient of third coordinate
deltaconstant right-hand side

Definition at line 9493 of file cons_nonlinear.c.

References NULL, REALABS, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPbuffer(), SCIPdebugMsg, SCIPisInfinity(), SCIPisRelEQ(), SCIPlapackSolveLinearEquations(), and x.

Referenced by computeVertexPolyhedralFacetBivariate().

◆ computeVertexPolyhedralFacetBivariate()

static SCIP_RETCODE computeVertexPolyhedralFacetBivariate ( SCIP scip,
SCIP_Bool  overestimate,
SCIP_Real  p1[2],
SCIP_Real  p2[2],
SCIP_Real  p3[2],
SCIP_Real  p4[2],
SCIP_Real  p1val,
SCIP_Real  p2val,
SCIP_Real  p3val,
SCIP_Real  p4val,
SCIP_Real  xstar[2],
SCIP_Real  targetvalue,
SCIP_Bool success,
SCIP_Real facetcoefs,
SCIP_Real facetconstant 
)
static

computes a facet of the convex or concave envelope of a bivariate vertex polyhedral function

Parameters
scipSCIP data structure
overestimatewhether to compute facet of concave (TRUE) or convex (FALSE) envelope
p1first vertex of box
p2second vertex of box
p3third vertex of box
p4forth vertex of box
p1valvalue in p1
p2valvalue in p2
p3valvalue in p3
p4valvalue in p4
xstarpoint to be separated
targetvaluetarget value: no need to compute facet if value in xstar would be worse than this value
successbuffer to store whether a facet could be computed successfully
facetcoefsbuffer to store coefficients of facet defining inequality; must be an array of length at least 2
facetconstantbuffer to store constant part of facet defining inequality

Definition at line 9604 of file cons_nonlinear.c.

References computeHyperplaneThreePoints(), FALSE, NULL, SCIP_CALL, SCIP_INVALID, SCIP_OKAY, SCIP_Real, SCIPdebugMsg, SCIPisFinite, SCIPisNegative(), SCIPisZero(), and TRUE.

Referenced by SCIPcomputeFacetVertexPolyhedralNonlinear().

◆ ensureOpenArraySizeSymdetect()

static SCIP_RETCODE ensureOpenArraySizeSymdetect ( SCIP scip,
int **  openidx,
int  nelems,
int *  maxnelems 
)
static

ensures that we can store information about open expressions (i.e., not fully encoded in the symmetry detection graph yet) in an array

Parameters
scipSCIP pointer
openidxaddress of openidx array
nelemsnumber of elements that need to be stored
maxnelemspointer to store maximum number that can be stored

Definition at line 9747 of file cons_nonlinear.c.

References NULL, SCIP_CALL, SCIP_OKAY, SCIPcalcMemGrowSize(), and SCIPreallocBufferArray.

Referenced by addSymmetryInformation().

◆ ensureLocVarsArraySize()

static SCIP_RETCODE ensureLocVarsArraySize ( SCIP scip,
SCIP_VAR ***  vars,
SCIP_Real **  vals,
int  nelems,
int *  maxnelems 
)
static

ensures that we can store information about local variables in an array

Parameters
scipSCIP pointer
varsaddress of variable array
valsaddress of value array
nelemsnumber of elements that need to be stored
maxnelemspointer to store maximum number that can be stored

Definition at line 9775 of file cons_nonlinear.c.

References NULL, SCIP_CALL, SCIP_OKAY, SCIPcalcMemGrowSize(), and SCIPreallocBufferArray.

Referenced by addSymmetryInformation(), tryAddGadgetBilinearProductSignedPerm(), tryAddGadgetEvenOperatorSum(), and tryAddGadgetEvenOperatorVariable().

◆ tryAddGadgetBilinearProductSignedPerm()

static SCIP_RETCODE tryAddGadgetBilinearProductSignedPerm ( SCIP scip,
SCIP_EXPR expr,
SCIP_CONS cons,
SYM_GRAPH graph,
int  parentidx,
SCIP_Bool  hasparentcoef,
SCIP_Real  parentcoef,
SCIP_VAR ***  consvars,
SCIP_Real **  consvals,
int *  maxnconsvars,
SCIP_HASHSET handledexprs,
SCIP_Bool success 
)
static

tries to add gadget for finding signed permutations of bilinear products

If a product has exactly two children being variables, negating both simultanteoulsy is a signed permutation.

Parameters
scipSCIP pointer
exprproduct expression for which gadget is tried to be added
consconstraint containing product expression
graphsymmetry detection graph to be extended by gadget
parentidxindex of parent node in symmetry detection graph for gadget
hasparentcoefwhether the parent gives a coefficient to the expression
parentcoefthe parent coefficient (if it exists)
consvarspointer to allocated array to store temporary variables
consvalspointer to allocated arrat to store temporary values
maxnconsvarspointer to maximum number consvars/consvals can hold
handledexprshashset to store handled expressions
successpointer to store whether gadget could be added successfully

Definition at line 9810 of file cons_nonlinear.c.

References ensureLocVarsArraySize(), FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPaddSymgraphEdge(), SCIPaddSymgraphOpnode(), SCIPaddSymgraphValnode(), SCIPblkmem(), SCIPconsIsTransformed(), SCIPexprGetChildren(), SCIPexprGetHdlr(), SCIPexprGetNChildren(), SCIPexprhdlrGetName(), SCIPfreeSymDataExpr(), SCIPgetSymActiveVariables(), SCIPgetSymDataExpr(), SCIPgetSymExprdataConstants(), SCIPgetSymExprdataNConstants(), SCIPgetSymgraphNegatedVarnodeidx(), SCIPgetSymgraphNNodes(), SCIPgetSymgraphVarnodeidx(), SCIPgetSymOpNodeType(), SCIPgetVarExprVar(), SCIPhashsetInsert(), SCIPisExprProduct(), SCIPisExprVar(), SCIPisInfinity(), SCIPisZero(), SCIPvarGetLbGlobal(), SCIPvarGetUbGlobal(), SYM_SYMTYPE_SIGNPERM, and TRUE.

Referenced by addSymmetryInformation().

◆ isEvenOperator()

static SCIP_Bool isEvenOperator ( SCIP scip,
SCIP_EXPR expr,
SCIP_Bool hasvalue,
SCIP_Real value 
)
static

returns whether an operator is even and, if yes, stores data about operator

Parameters
scipSCIP pointer
exprexpression corresponding to operator
hasvaluepointer to store whether even operator has a value needed for symmetry computation
valuepointer to store value for symmetry computation

Definition at line 9951 of file cons_nonlinear.c.

References FALSE, NULL, SCIP_CALL_ABORT, SCIP_Real, SCIPfreeSymDataExpr(), SCIPgetSymDataExpr(), SCIPgetSymExprdataConstants(), SCIPgetSymExprdataNConstants(), SCIPisEQ(), SCIPisExprAbs(), SCIPisExprCos(), SCIPisExprPower(), SCIPisExprSignpower(), SCIPisIntegral(), SCIPisLE(), and TRUE.

Referenced by tryAddGadgetEvenOperator().

◆ varIsCenteredAt0()

static SCIP_Bool varIsCenteredAt0 ( SCIP scip,
SCIP_VAR var 
)
static

returns whether a variable is centered at 0

Parameters
scipSCIP pointer
varvariable to be checked

Definition at line 10028 of file cons_nonlinear.c.

References FALSE, NULL, SCIPisEQ(), SCIPisInfinity(), SCIPvarGetLbGlobal(), SCIPvarGetUbGlobal(), and TRUE.

Referenced by tryAddGadgetEvenOperatorSum(), and tryAddGadgetEvenOperatorVariable().

◆ tryAddGadgetEvenOperatorVariable()

static SCIP_RETCODE tryAddGadgetEvenOperatorVariable ( SCIP scip,
SCIP_EXPR evenopexpr,
SCIP_EXPR child,
SCIP_CONS cons,
SYM_GRAPH graph,
int  parentidx,
SCIP_Bool  hasparentcoef,
SCIP_Real  parentcoef,
SCIP_Bool  hassymval,
SCIP_Real  symval,
SCIP_VAR ***  consvars,
SCIP_Real **  consvals,
int *  maxnconsvars,
SCIP_Bool success 
)
static

tries to add gadget for finding signed permutation of even univariate operators with variable child

Parameters
scipSCIP pointer
evenopexpreven operator expression for which gadget is tried to be added
childchild expression of evenopexpr
consconstraint containing expression
graphsymmetry detection graph to be extended by gadget
parentidxindex of parent node in symmetry detection graph for gadget
hasparentcoefwhether the parent gives a coefficient to the expression
parentcoefthe parent coefficient (if it exists)
hassymvalwhether evenopexpr has a value needed for symmetry detection
symvalvalue needed for symmetry detection (if hassymval is TRUE)
consvarspointer to allocated array to store temporary variables
consvalspointer to allocated arrat to store temporary values
maxnconsvarspointer to maximum number consvars/consvals can hold
successpointer to store whether gadget could be added successfully

Definition at line 10050 of file cons_nonlinear.c.

References ensureLocVarsArraySize(), FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPaddSymgraphEdge(), SCIPaddSymgraphOpnode(), SCIPaddSymgraphValnode(), SCIPconsIsTransformed(), SCIPexprGetHdlr(), SCIPexprhdlrGetName(), SCIPgetSymActiveVariables(), SCIPgetSymgraphNegatedVarnodeidx(), SCIPgetSymgraphVarnodeidx(), SCIPgetSymOpNodeType(), SCIPgetVarExprVar(), SCIPisExprVar(), SCIPisZero(), SYM_SYMTYPE_SIGNPERM, TRUE, and varIsCenteredAt0().

Referenced by tryAddGadgetEvenOperator().

◆ tryAddGadgetEvenOperatorSum()

static SCIP_RETCODE tryAddGadgetEvenOperatorSum ( SCIP scip,
SCIP_EXPR evenopexpr,
SCIP_EXPR child,
SCIP_CONS cons,
SYM_GRAPH graph,
int  parentidx,
SCIP_Bool  hasparentcoef,
SCIP_Real  parentcoef,
SCIP_Bool  hassymval,
SCIP_Real  symval,
SCIP_VAR ***  consvars,
SCIP_Real **  consvals,
int *  maxnconsvars,
SCIP_HASHSET handledexprs,
SCIP_Bool success 
)
static

tries to add gadget for finding signed permutation of even univariate operators with sum child

Parameters
scipSCIP pointer
evenopexpreven operator expression for which gadget is tried to be added
childchild expression of evenopexpr
consconstraint containing expression
graphsymmetry detection graph to be extended by gadget
parentidxindex of parent node in symmetry detection graph for gadget
hasparentcoefwhether the parent gives a coefficient to the expression
parentcoefthe parent coefficient (if it exists)
hassymvalwhether evenopexpr has a value needed for symmetry detection
symvalvalue needed for symmetry detection (if hassymval is TRUE)
consvarspointer to allocated array to store temporary variables
consvalspointer to allocated arrat to store temporary values
maxnconsvarspointer to maximum number consvars/consvals can hold
handledexprshashset to store handled expressions
successpointer to store whether gadget could be added successfully

Definition at line 10135 of file cons_nonlinear.c.

References ABS, ensureLocVarsArraySize(), FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPaddSymgraphEdge(), SCIPaddSymgraphOpnode(), SCIPaddSymgraphValnode(), SCIPblkmem(), SCIPconsIsTransformed(), SCIPexprGetChildren(), SCIPexprGetHdlr(), SCIPexprGetNChildren(), SCIPexprhdlrGetName(), SCIPgetCoefsExprSum(), SCIPgetConstantExprSum(), SCIPgetSymActiveVariables(), SCIPgetSymgraphNegatedVarnodeidx(), SCIPgetSymgraphVarnodeidx(), SCIPgetSymOpNodeType(), SCIPgetVarExprVar(), SCIPhashsetInsert(), SCIPisExprSum(), SCIPisExprVar(), SCIPisZero(), SYM_CONSOPTYPE_SUM, SYM_SYMTYPE_SIGNPERM, TRUE, and varIsCenteredAt0().

Referenced by tryAddGadgetEvenOperator().

◆ tryAddGadgetEvenOperator()

static SCIP_RETCODE tryAddGadgetEvenOperator ( SCIP scip,
SCIP_EXPR expr,
SCIP_CONS cons,
SYM_GRAPH graph,
int  parentidx,
SCIP_Bool  hasparentcoef,
SCIP_Real  parentcoef,
SCIP_VAR ***  consvars,
SCIP_Real **  consvals,
int *  maxnconsvars,
SCIP_HASHSET handledexprs,
SCIP_Bool success 
)
static

tries to add gadget for finding signed permutations of even univariate operators

We handle two cases. First, if a univariate operator is even and has a variable as child, negating the child is signed permutation. Second, the univariate operator is even and has a weighted sum of two variables as child.

Parameters
scipSCIP pointer
exprexpression for which gadget is tried to be added
consconstraint containing expression
graphsymmetry detection graph to be extended by gadget
parentidxindex of parent node in symmetry detection graph for gadget
hasparentcoefwhether the parent gives a coefficient to the expression
parentcoefthe parent coefficient (if it exists)
consvarspointer to allocated array to store temporary variables
consvalspointer to allocated arrat to store temporary values
maxnconsvarspointer to maximum number consvars/consvals can hold
handledexprshashset to store handled expressions
successpointer to store whether gadget could be added successfully

Definition at line 10277 of file cons_nonlinear.c.

References FALSE, isEvenOperator(), NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPblkmem(), SCIPexprGetChildren(), SCIPexprGetNChildren(), SCIPgetSymgraphNNodes(), SCIPhashsetInsert(), SCIPisExprSum(), SCIPisExprValue(), SCIPisExprVar(), SCIPisExprVaridx(), tryAddGadgetEvenOperatorSum(), and tryAddGadgetEvenOperatorVariable().

Referenced by addSymmetryInformation().

◆ SCIP_DECL_SORTINDCOMP() [2/2]

static SCIP_DECL_SORTINDCOMP ( SCIPsortVarPtr  )
static

compares two variable pointers

Definition at line 10345 of file cons_nonlinear.c.

References NULL, and SCIPvarGetIndex().

◆ getDomainCenter()

static SCIP_Real getDomainCenter ( SCIP scip,
SCIP_VAR var 
)
static

gets domain center of a variable which has not semi-infinite domain

Parameters
scipSCIP pointer
varvariable

Definition at line 10369 of file cons_nonlinear.c.

References SCIP_Real, SCIPisInfinity(), SCIPvarGetLbGlobal(), and SCIPvarGetUbGlobal().

Referenced by tryAddGadgetSquaredDifference().

◆ tryAddGadgetSquaredDifference()

static SCIP_RETCODE tryAddGadgetSquaredDifference ( SCIP scip,
SCIP_EXPR sumexpr,
SCIP_CONS cons,
SYM_GRAPH graph,
int  sumnodeidx,
SCIP_VAR ***  consvars,
SCIP_Real **  consvals,
int *  maxnconsvars,
SCIP_HASHSET handledexprs 
)
static

tries to add gadget for finding signed permutations for squared differences in a sum expression

Parameters
scipSCIP pointer
sumexprsum expression
consconstraint containing the sum expression
graphsymmetry detection graph to be extended by gadget
sumnodeidxindex of sum node in symmetry detection graph for gadget
consvarspointer to allocated array to store temporary variables
consvalspointer to allocated arrat to store temporary values
maxnconsvarspointer to maximum number consvars/consvals can hold
handledexprshashset to store handled expressions

Definition at line 10390 of file cons_nonlinear.c.

References FALSE, getDomainCenter(), nterms, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIP_VARSTATUS_MULTAGGR, SCIPaddSymgraphEdge(), SCIPaddSymgraphOpnode(), SCIPaddSymgraphValnode(), SCIPallocBufferArray, SCIPallocClearBufferArray, SCIPblkmem(), SCIPconsIsTransformed(), SCIPexprGetChildren(), SCIPexprGetNChildren(), SCIPfreeBufferArray, SCIPfreeBufferArrayNull, SCIPfreeSymDataExpr(), SCIPgetCoefsExprSum(), SCIPgetSymActiveVariables(), SCIPgetSymDataExpr(), SCIPgetSymExprdataConstants(), SCIPgetSymExprdataNConstants(), SCIPgetSymgraphNegatedVarnodeidx(), SCIPgetSymgraphVarnodeidx(), SCIPgetVarExprVar(), SCIPhashsetInsert(), SCIPisEQ(), SCIPisExprPower(), SCIPisExprProduct(), SCIPisExprSum(), SCIPisExprVar(), SCIPisInfinity(), SCIPround(), SCIPsort(), SCIPvarGetIndex(), SCIPvarGetLbGlobal(), SCIPvarGetStatus(), SCIPvarGetUbGlobal(), SYM_CONSOPTYPE_SQDIFF, SYM_SYMTYPE_SIGNPERM, and TRUE.

Referenced by addSymmetryInformation().

◆ addSymmetryInformation()

static SCIP_RETCODE addSymmetryInformation ( SCIP scip,
SYM_SYMTYPE  symtype,
SCIP_CONS cons,
SYM_GRAPH graph,
SCIP_Bool success 
)
static

adds symmetry information of constraint to a symmetry detection graph

Parameters
scipSCIP pointer
symtypetype of symmetries that need to be added
consconstraint
graphsymmetry detection graph
successpointer to store whether symmetry information could be added

Definition at line 10651 of file cons_nonlinear.c.

References ensureLocVarsArraySize(), ensureOpenArraySizeSymdetect(), FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_EXPRITER_DFS, SCIP_EXPRITER_ENTEREXPR, SCIP_EXPRITER_LEAVEEXPR, SCIP_OKAY, SCIP_Real, SCIPaddSymgraphConsnode(), SCIPaddSymgraphEdge(), SCIPaddSymgraphOpnode(), SCIPaddSymgraphValnode(), SCIPaddSymgraphVarAggregation(), SCIPallocBufferArray, SCIPblkmem(), SCIPconsIsTransformed(), SCIPcreateExpriter(), SCIPexprGetChildren(), SCIPexprGetHdlr(), SCIPexprGetNChildren(), SCIPexprhdlrGetName(), SCIPexprhdlrHasGetSymData(), SCIPexpriterGetCurrent(), SCIPexpriterGetNext(), SCIPexpriterGetParentDFS(), SCIPexpriterGetStageDFS(), SCIPexpriterInit(), SCIPexpriterIsEnd(), SCIPexpriterSetStagesDFS(), SCIPfreeBufferArray, SCIPfreeExpriter(), SCIPfreeSymDataExpr(), SCIPgetCoefsExprSum(), SCIPgetCoefSymData(), SCIPgetConstantExprSum(), SCIPgetExprNonlinear(), SCIPgetLhsNonlinear(), SCIPgetNVars(), SCIPgetRhsNonlinear(), SCIPgetSymActiveVariables(), SCIPgetSymDataExpr(), SCIPgetSymExprdataConstants(), SCIPgetSymExprdataNConstants(), SCIPgetSymOpNodeType(), SCIPgetValueExprValue(), SCIPgetVarExprVar(), SCIPhashsetCreate(), SCIPhashsetExists(), SCIPhashsetFree(), SCIPhashsetInsert(), SCIPhashsetIsEmpty(), SCIPhashsetRemove(), SCIPisEQ(), SCIPisExprProduct(), SCIPisExprSum(), SCIPisExprValue(), SCIPisExprVar(), SCIPisZero(), SYM_CONSOPTYPE_COEF, SYM_CONSOPTYPE_SUM, SYM_SYMTYPE_SIGNPERM, TRUE, tryAddGadgetBilinearProductSignedPerm(), tryAddGadgetEvenOperator(), and tryAddGadgetSquaredDifference().

Referenced by SCIP_DECL_CONSGETPERMSYMGRAPH(), and SCIP_DECL_CONSGETSIGNEDPERMSYMGRAPH().

◆ SCIP_DECL_CONSHDLRCOPY()

static SCIP_DECL_CONSHDLRCOPY ( conshdlrCopyNonlinear  )
static

copy method for constraint handler plugins (called when SCIP copies plugins)

Definition at line 10961 of file cons_nonlinear.c.

References CONSHDLR_NAME, NULL, SCIP_CALL, SCIP_OKAY, SCIPconshdlrGetData(), SCIPconshdlrGetName(), SCIPfindConshdlr(), SCIPincludeConshdlrNonlinear(), and TRUE.

◆ SCIP_DECL_CONSFREE()

static SCIP_DECL_CONSFREE ( consFreeNonlinear  )
static

◆ SCIP_DECL_CONSINIT()

static SCIP_DECL_CONSINIT ( consInitNonlinear  )
static

initialization method of constraint handler (called after problem was transformed)

Definition at line 11050 of file cons_nonlinear.c.

References catchVarEvents(), ENFOLOG, NULL, SCIP_CALL, SCIP_OKAY, SCIPconsGetData(), SCIPconshdlrGetData(), SCIPfindHeur(), SCIPresetClock(), SCIPsortDownPtr(), and storeVarExprs().

◆ SCIP_DECL_CONSEXIT()

static SCIP_DECL_CONSEXIT ( consExitNonlinear  )
static

deinitialization method of constraint handler (called before transformed problem is freed)

Definition at line 11105 of file cons_nonlinear.c.

References dropVarEvents(), ENFOLOG, freeVarExprs(), NULL, SCIP_CALL, SCIP_MAXVERTEXPOLYDIM, SCIP_OKAY, SCIPconsGetData(), SCIPconshdlrGetData(), SCIPduplicateBufferArray, SCIPfreeBufferArray, SCIPfreeRandom(), SCIPlpiFree(), and SCIPsortDownPtr().

◆ SCIP_DECL_CONSEXITPRE()

static SCIP_DECL_CONSEXITPRE ( consExitpreNonlinear  )
static

presolving deinitialization method of constraint handler (called after presolving has been finished)

Definition at line 11181 of file cons_nonlinear.c.

References canonicalizeConstraints(), NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_PRESOLTIMING_ALWAYS, SCIP_STATUS_INFEASIBLE, SCIPenableNLP(), and SCIPgetStatus().

◆ SCIP_DECL_CONSINITSOL()

static SCIP_DECL_CONSINITSOL ( consInitsolNonlinear  )
static

solving process initialization method of constraint handler (called when branch and bound process is about to begin)

Definition at line 11211 of file cons_nonlinear.c.

References initSolve(), NULL, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_STATUS_INFEASIBLE, SCIP_STATUS_INFORUNBD, SCIP_STATUS_OPTIMAL, SCIP_STATUS_UNBOUNDED, SCIPABORT, SCIPconshdlrGetData(), SCIPerrorMessage, SCIPgetCharParam(), SCIPgetStatus(), and SCIPnlhdlrResetNDetectionslast.

◆ SCIP_DECL_CONSEXITSOL()

static SCIP_DECL_CONSEXITSOL ( consExitsolNonlinear  )
static

solving process deinitialization method of constraint handler (called before branch and bound process data is freed)

Definition at line 11257 of file cons_nonlinear.c.

References bilinearTermsFree(), CONSHDLR_NAME, deinitSolve(), FALSE, NULL, SCIP_CALL, SCIP_EVENTTYPE_BESTSOLFOUND, SCIP_EVENTTYPE_SOLFOUND, SCIP_OKAY, SCIPconshdlrGetData(), SCIPdropEvent(), and SCIPfindEventhdlr().

◆ SCIP_DECL_CONSDELETE()

static SCIP_DECL_CONSDELETE ( consDeleteNonlinear  )
static

frees specific constraint data

Definition at line 11290 of file cons_nonlinear.c.

References freeVarExprs(), NULL, SCIP_CALL, SCIP_OKAY, SCIPfreeBlockMemory, SCIPreleaseExpr(), and SCIPreleaseNlRow().

◆ SCIP_DECL_CONSTRANS()

static SCIP_DECL_CONSTRANS ( consTransNonlinear  )
static

◆ SCIP_DECL_CONSINITLP()

static SCIP_DECL_CONSINITLP ( consInitlpNonlinear  )
static

LP initialization method of constraint handler (called before the initial LP relaxation at a node is solved)

Definition at line 11348 of file cons_nonlinear.c.

References bilinearTermsInsertAll(), CONSHDLR_NAME, initSepa(), NULL, SCIP_CALL, SCIP_EVENTTYPE_BESTSOLFOUND, SCIP_EVENTTYPE_SOLFOUND, SCIP_OKAY, SCIPcatchEvent(), SCIPconshdlrGetData(), and SCIPfindEventhdlr().

◆ SCIP_DECL_CONSSEPALP()

static SCIP_DECL_CONSSEPALP ( consSepalpNonlinear  )
static

separation method of constraint handler for LP solutions

Definition at line 11387 of file cons_nonlinear.c.

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

◆ SCIP_DECL_CONSSEPASOL()

static SCIP_DECL_CONSSEPASOL ( consSepasolNonlinear  )
static

separation method of constraint handler for arbitrary primal solutions

Definition at line 11397 of file cons_nonlinear.c.

References consSepa(), SCIP_CALL, and SCIP_OKAY.

◆ SCIP_DECL_CONSENFOLP()

static SCIP_DECL_CONSENFOLP ( consEnfolpNonlinear  )
static

constraint enforcing method of constraint handler for LP solutions

Definition at line 11407 of file cons_nonlinear.c.

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

◆ SCIP_DECL_CONSENFORELAX()

static SCIP_DECL_CONSENFORELAX ( consEnforelaxNonlinear  )
static

constraint enforcing method of constraint handler for relaxation solutions

Definition at line 11417 of file cons_nonlinear.c.

References consEnfo(), SCIP_CALL, and SCIP_OKAY.

◆ SCIP_DECL_CONSENFOPS()

static SCIP_DECL_CONSENFOPS ( consEnfopsNonlinear  )
static

◆ SCIP_DECL_CONSCHECK()

◆ SCIP_DECL_CONSPROP()

static SCIP_DECL_CONSPROP ( consPropNonlinear  )
static

domain propagation method of constraint handler

Definition at line 11592 of file cons_nonlinear.c.

References FALSE, propConss(), SCIP_CALL, and SCIP_OKAY.

◆ SCIP_DECL_CONSPRESOL()

◆ SCIP_DECL_CONSLOCK()

static SCIP_DECL_CONSLOCK ( consLockNonlinear  )
static

variable rounding lock method of constraint handler

Definition at line 11750 of file cons_nonlinear.c.

References addLocks(), deinitSolve(), FALSE, initSolve(), NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPconsGetData(), SCIPexprGetOwnerData(), and TRUE.

◆ SCIP_DECL_CONSACTIVE()

◆ SCIP_DECL_CONSDEACTIVE()

static SCIP_DECL_CONSDEACTIVE ( consDeactiveNonlinear  )
static

◆ SCIP_DECL_CONSENABLE()

static SCIP_DECL_CONSENABLE ( consEnableNonlinear  )
static

constraint enabling notification method of constraint handler

Definition at line 11921 of file cons_nonlinear.c.

References catchVarEvents(), NULL, SCIP_CALL, SCIP_OKAY, SCIP_STAGE_TRANSFORMED, SCIPconshdlrGetData(), and SCIPgetStage().

◆ SCIP_DECL_CONSDISABLE()

static SCIP_DECL_CONSDISABLE ( consDisableNonlinear  )
static

constraint disabling notification method of constraint handler

Definition at line 11939 of file cons_nonlinear.c.

References dropVarEvents(), NULL, SCIP_CALL, SCIP_OKAY, SCIP_STAGE_TRANSFORMED, SCIPconshdlrGetData(), and SCIPgetStage().

◆ SCIP_DECL_CONSPRINT()

static SCIP_DECL_CONSPRINT ( consPrintNonlinear  )
static

constraint display method of constraint handler

Definition at line 11971 of file cons_nonlinear.c.

References NULL, SCIP_CALL, SCIP_OKAY, SCIPconsGetData(), SCIPinfoMessage(), SCIPisEQ(), SCIPisInfinity(), and SCIPprintExpr().

◆ SCIP_DECL_CONSCOPY()

static SCIP_DECL_CONSCOPY ( consCopyNonlinear  )
static

constraint copying method of constraint handler

Definition at line 12004 of file cons_nonlinear.c.

References CONSHDLR_NAME, createCons(), FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPconsGetData(), SCIPconsGetName(), SCIPcopyExpr(), SCIPfindConshdlr(), and SCIPreleaseExpr().

◆ SCIP_DECL_CONSPARSE()

static SCIP_DECL_CONSPARSE ( consParseNonlinear  )
static

◆ SCIP_DECL_CONSGETVARS()

static SCIP_DECL_CONSGETVARS ( consGetVarsNonlinear  )
static

constraint method of constraint handler which returns the variables (if possible)

Definition at line 12178 of file cons_nonlinear.c.

References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPconsGetData(), SCIPgetVarExprVar(), storeVarExprs(), and TRUE.

◆ SCIP_DECL_CONSGETNVARS()

static SCIP_DECL_CONSGETNVARS ( consGetNVarsNonlinear  )
static

constraint method of constraint handler which returns the number of variables (if possible)

Definition at line 12209 of file cons_nonlinear.c.

References NULL, SCIP_CALL, SCIP_OKAY, SCIPconsGetData(), storeVarExprs(), and TRUE.

◆ SCIP_DECL_CONSGETPERMSYMGRAPH()

static SCIP_DECL_CONSGETPERMSYMGRAPH ( consGetPermsymGraphNonlinear  )
static

constraint handler method which returns the permutation symmetry detection graph of a constraint (if possible)

Definition at line 12241 of file cons_nonlinear.c.

References addSymmetryInformation(), SCIP_CALL, SCIP_OKAY, and SYM_SYMTYPE_PERM.

◆ SCIP_DECL_CONSGETSIGNEDPERMSYMGRAPH()

static SCIP_DECL_CONSGETSIGNEDPERMSYMGRAPH ( consGetSignedPermsymGraphNonlinear  )
static

constraint handler method which returns the signed permutation symmetry detection graph of a constraint (if possible)

Definition at line 12250 of file cons_nonlinear.c.

References addSymmetryInformation(), SCIP_CALL, SCIP_OKAY, and SYM_SYMTYPE_SIGNPERM.

◆ SCIP_DECL_TABLEOUTPUT() [1/2]

static SCIP_DECL_TABLEOUTPUT ( tableOutputNonlinear  )
static

output method of statistics table to output file stream 'file'

Definition at line 12259 of file cons_nonlinear.c.

References CONSHDLR_NAME, NULL, SCIP_OKAY, SCIPconshdlrGetData(), SCIPfindConshdlr(), SCIPgetClockTime(), and SCIPinfoMessage().

◆ SCIP_DECL_TABLEOUTPUT() [2/2]

static SCIP_DECL_TABLEOUTPUT ( tableOutputNlhdlr  )
static

output method of statistics table to output file stream 'file'

Definition at line 12289 of file cons_nonlinear.c.

References CONSHDLR_NAME, NULL, SCIP_OKAY, SCIPconshdlrGetData(), SCIPconshdlrGetMaxNActiveConss(), SCIPfindConshdlr(), and SCIPnlhdlrPrintStatistics().

◆ SCIP_DECL_DIALOGEXEC()