Detailed Description
constraint handler for nonlinear constraints \(\textrm{lhs} \leq \sum_{i=1}^n a_ix_i + \sum_{j=1}^m c_jf_j(x) \leq \textrm{rhs}\)
Definition in file cons_nonlinear.c.
#include "blockmemshell/memory.h"
#include <ctype.h>
#include "lpi/lpi.h"
#include "lpi/type_lpi.h"
#include "nlpi/exprinterpret.h"
#include "nlpi/nlpi_ipopt.h"
#include "nlpi/pub_expr.h"
#include "nlpi/type_exprinterpret.h"
#include "nlpi/type_nlpi.h"
#include "scip/cons_linear.h"
#include "scip/cons_nonlinear.h"
#include "scip/cons_quadratic.h"
#include "scip/debug.h"
#include "scip/heur_subnlp.h"
#include "scip/heur_trysol.h"
#include "scip/intervalarith.h"
#include "scip/pub_cons.h"
#include "scip/pub_event.h"
#include "scip/pub_heur.h"
#include "scip/pub_lp.h"
#include "scip/pub_message.h"
#include "scip/pub_misc.h"
#include "scip/pub_misc_sort.h"
#include "scip/pub_nlp.h"
#include "scip/pub_sol.h"
#include "scip/pub_tree.h"
#include "scip/pub_var.h"
#include "scip/scip_branch.h"
#include "scip/scip_cons.h"
#include "scip/scip_copy.h"
#include "scip/scip_cut.h"
#include "scip/scip_event.h"
#include "scip/scip_expr.h"
#include "scip/scip_general.h"
#include "scip/scip_heur.h"
#include "scip/scip_lp.h"
#include "scip/scip_mem.h"
#include "scip/scip_message.h"
#include "scip/scip_nlp.h"
#include "scip/scip_numerics.h"
#include "scip/scip_param.h"
#include "scip/scip_prob.h"
#include "scip/scip_probing.h"
#include "scip/scip_sepa.h"
#include "scip/scip_sol.h"
#include "scip/scip_solvingstats.h"
#include "scip/scip_tree.h"
#include "scip/scip_var.h"
#include <string.h>
Go to the source code of this file.
Data Structures | |
struct | LinVarEventData |
struct | SCIP_NlConsUpgrade |
Macros | |
#define | SCIP_PRIVATE_ROWPREP |
#define | CONSHDLR_NAME "nonlinear" |
#define | CONSHDLR_DESC "constraint handler for nonlinear constraints" |
#define | CONSHDLR_SEPAPRIORITY 10 |
#define | CONSHDLR_ENFOPRIORITY -60 |
#define | CONSHDLR_CHECKPRIORITY -4000010 |
#define | CONSHDLR_SEPAFREQ 1 |
#define | CONSHDLR_PROPFREQ 1 |
#define | CONSHDLR_EAGERFREQ 100 |
#define | CONSHDLR_MAXPREROUNDS -1 |
#define | CONSHDLR_DELAYSEPA FALSE |
#define | CONSHDLR_DELAYPROP FALSE |
#define | CONSHDLR_NEEDSCONS TRUE |
#define | CONSHDLR_PROP_TIMING SCIP_PROPTIMING_BEFORELP |
#define | CONSHDLR_PRESOLTIMING SCIP_PRESOLTIMING_ALWAYS |
#define | INTERVALINFTY 1E+43 |
#define | BOUNDTIGHTENING_MINSTRENGTH 0.05 |
#define | INITLPMAXVARVAL 1000.0 |
#define | infty2infty(infty1, infty2, val) ((val) >= (infty1) ? (infty2) : (val)) |
Typedefs | |
typedef struct LinVarEventData | LINVAREVENTDATA |
typedef struct SCIP_NlConsUpgrade | SCIP_NLCONSUPGRADE |
Macro Definition Documentation
◆ SCIP_PRIVATE_ROWPREP
#define SCIP_PRIVATE_ROWPREP |
Definition at line 35 of file cons_nonlinear.c.
◆ CONSHDLR_NAME
#define CONSHDLR_NAME "nonlinear" |
Definition at line 77 of file cons_nonlinear.c.
Referenced by SCIP_DECL_CONSEXITSOL(), SCIP_DECL_CONSINITSOL(), SCIPcreateConsNonlinear(), SCIPcreateConsNonlinear2(), SCIPincludeConshdlrNonlinear(), and SCIPincludeNonlinconsUpgrade().
◆ CONSHDLR_DESC
#define CONSHDLR_DESC "constraint handler for nonlinear constraints" |
Definition at line 78 of file cons_nonlinear.c.
Referenced by SCIPincludeConshdlrNonlinear().
◆ CONSHDLR_SEPAPRIORITY
#define CONSHDLR_SEPAPRIORITY 10 |
priority of the constraint handler for separation
Definition at line 79 of file cons_nonlinear.c.
Referenced by SCIPincludeConshdlrNonlinear().
◆ CONSHDLR_ENFOPRIORITY
#define CONSHDLR_ENFOPRIORITY -60 |
priority of the constraint handler for constraint enforcing
Definition at line 80 of file cons_nonlinear.c.
Referenced by SCIPincludeConshdlrNonlinear().
◆ CONSHDLR_CHECKPRIORITY
#define CONSHDLR_CHECKPRIORITY -4000010 |
priority of the constraint handler for checking feasibility
Definition at line 81 of file cons_nonlinear.c.
Referenced by SCIPincludeConshdlrNonlinear().
◆ CONSHDLR_SEPAFREQ
#define CONSHDLR_SEPAFREQ 1 |
frequency for separating cuts; zero means to separate only in the root node
Definition at line 82 of file cons_nonlinear.c.
Referenced by SCIPincludeConshdlrNonlinear().
◆ CONSHDLR_PROPFREQ
#define CONSHDLR_PROPFREQ 1 |
frequency for propagating domains; zero means only preprocessing propagation
Definition at line 83 of file cons_nonlinear.c.
Referenced by SCIPincludeConshdlrNonlinear().
◆ 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 84 of file cons_nonlinear.c.
Referenced by SCIPincludeConshdlrNonlinear().
◆ CONSHDLR_MAXPREROUNDS
#define CONSHDLR_MAXPREROUNDS -1 |
maximal number of presolving rounds the constraint handler participates in (-1: no limit)
Definition at line 87 of file cons_nonlinear.c.
Referenced by SCIPincludeConshdlrNonlinear().
◆ CONSHDLR_DELAYSEPA
#define CONSHDLR_DELAYSEPA FALSE |
should separation method be delayed, if other separators found cuts?
Definition at line 88 of file cons_nonlinear.c.
Referenced by SCIPincludeConshdlrNonlinear().
◆ CONSHDLR_DELAYPROP
#define CONSHDLR_DELAYPROP FALSE |
should propagation method be delayed, if other propagators found reductions?
Definition at line 89 of file cons_nonlinear.c.
Referenced by SCIPincludeConshdlrNonlinear().
◆ CONSHDLR_NEEDSCONS
#define CONSHDLR_NEEDSCONS TRUE |
should the constraint handler be skipped, if no constraints are available?
Definition at line 90 of file cons_nonlinear.c.
Referenced by SCIPincludeConshdlrNonlinear().
◆ CONSHDLR_PROP_TIMING
#define CONSHDLR_PROP_TIMING SCIP_PROPTIMING_BEFORELP |
propagation timing mask of the constraint handler
Definition at line 92 of file cons_nonlinear.c.
Referenced by SCIPincludeConshdlrNonlinear().
◆ CONSHDLR_PRESOLTIMING
#define CONSHDLR_PRESOLTIMING SCIP_PRESOLTIMING_ALWAYS |
presolving timing of the constraint handler (fast, medium, or exhaustive)
Definition at line 93 of file cons_nonlinear.c.
Referenced by SCIPincludeConshdlrNonlinear().
◆ INTERVALINFTY
#define INTERVALINFTY 1E+43 |
value for infinity in interval operations
Definition at line 95 of file cons_nonlinear.c.
Referenced by addIntervalGradientEstimator(), addUserEstimator(), checkCurvature(), consdataUpdateLinearActivity(), consdataUpdateLinearActivityLbChange(), consdataUpdateLinearActivityUbChange(), propagateBounds(), propagateBoundsCons(), propagateBoundsTightenVarLb(), propagateBoundsTightenVarUb(), propagateConstraintSides(), reformEnsureChildrenMinCurvature(), reformMonomial(), reformNode2Var(), reformulate(), replaceViolatedByLinearConstraints(), SCIP_DECL_CONSPRESOL(), SCIP_DECL_EVENTEXEC(), and SCIP_DECL_EXPRGRAPHVARADDED().
◆ BOUNDTIGHTENING_MINSTRENGTH
#define BOUNDTIGHTENING_MINSTRENGTH 0.05 |
minimal required bound tightening strength in expression graph domain tightening for propagating bound change
Definition at line 96 of file cons_nonlinear.c.
Referenced by propagateConstraintSides(), reformEnsureChildrenMinCurvature(), reformMonomial(), reformNode2Var(), and reformulate().
◆ INITLPMAXVARVAL
#define INITLPMAXVARVAL 1000.0 |
maximal absolute value of variable for still generating a linearization cut at that point in initlp
Definition at line 97 of file cons_nonlinear.c.
Referenced by SCIP_DECL_CONSINITLP().
◆ 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 212 of file cons_nonlinear.c.
Referenced by addIntervalGradientEstimator(), addUserEstimator(), checkCurvature(), propagateBoundsCons(), SCIP_DECL_EVENTEXEC(), and SCIP_DECL_EXPRGRAPHVARADDED().
Typedef Documentation
◆ LINVAREVENTDATA
typedef struct LinVarEventData LINVAREVENTDATA |
Definition at line 111 of file cons_nonlinear.c.
◆ SCIP_NLCONSUPGRADE
typedef struct SCIP_NlConsUpgrade SCIP_NLCONSUPGRADE |
Definition at line 166 of file cons_nonlinear.c.
Function Documentation
◆ catchLinearVarEvents()
|
static |
- Parameters
-
scip SCIP data structure cons constraint for which to catch bound change events linvarpos position of variable in linear variables array
Definition at line 216 of file cons_nonlinear.c.
References LinVarEventData::cons, LinVarEventData::conshdlrdata, dropLinearVarEvents(), LinVarEventData::filterpos, NULL, SCIP_CALL, SCIP_EVENTTYPE_LBCHANGED, SCIP_EVENTTYPE_UBCHANGED, SCIP_EVENTTYPE_VARFIXED, SCIP_INVALID, SCIP_OKAY, SCIPallocBlockMemory, SCIPallocBlockMemoryArray, SCIPcatchVarEvent(), SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetData(), SCIPconsIsEnabled(), SCIPconsIsTransformed(), SCIPisInfinity(), SCIPmarkConsPropagate(), and LinVarEventData::varidx.
Referenced by addLinearCoef(), chgLinearCoefPos(), SCIP_DECL_CONSENABLE(), and splitOffLinearPart().
◆ dropLinearVarEvents()
|
static |
- Parameters
-
scip SCIP data structure cons constraint for which to catch bound change events linvarpos position of variable in linear variables array
Definition at line 288 of file cons_nonlinear.c.
References LinVarEventData::conshdlrdata, lockLinearVariable(), NULL, SCIP_CALL, SCIP_EVENTTYPE_LBCHANGED, SCIP_EVENTTYPE_UBCHANGED, SCIP_EVENTTYPE_VARFIXED, SCIP_OKAY, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetData(), SCIPconsIsTransformed(), SCIPdropVarEvent(), SCIPfreeBlockMemory, and SCIPisInfinity().
Referenced by catchLinearVarEvents(), chgLinearCoefPos(), delLinearCoefPos(), SCIP_DECL_CONSDISABLE(), and splitOffLinearPart().
◆ lockLinearVariable()
|
static |
locks a linear variable in a constraint
- Parameters
-
scip SCIP data structure cons constraint where to lock a variable var variable to lock coef coefficient of variable in constraint
Definition at line 345 of file cons_nonlinear.c.
References NULL, SCIP_CALL, SCIP_OKAY, SCIPconsGetData(), SCIPisInfinity(), SCIPlockVarCons(), and unlockLinearVariable().
Referenced by addLinearCoef(), chgLinearCoefPos(), dropLinearVarEvents(), and splitOffLinearPart().
◆ unlockLinearVariable()
|
static |
unlocks a linear variable in a constraint
- Parameters
-
scip SCIP data structure cons constraint where to unlock a variable var variable to unlock coef coefficient of variable in constraint
Definition at line 376 of file cons_nonlinear.c.
References consdataUpdateLinearActivity(), NULL, SCIP_CALL, SCIP_LOCKTYPE_CONFLICT, SCIP_OKAY, SCIPconsGetData(), SCIPconsIsLockedType(), SCIPisInfinity(), and SCIPunlockVarCons().
Referenced by chgLinearCoefPos(), delLinearCoefPos(), lockLinearVariable(), and splitOffLinearPart().
◆ consdataUpdateLinearActivity()
|
static |
computes the minimal and maximal activity for the linear part in a constraint data only sums up terms that contribute finite values gives the number of terms that contribute infinite values only computes those activities where the corresponding side of the constraint is finite
- Parameters
-
scip SCIP data structure consdata constraint data
Definition at line 412 of file cons_nonlinear.c.
References consdataUpdateLinearActivityLbChange(), INTERVALINFTY, NULL, SCIP_INVALID, SCIP_Real, SCIPintervalGetRoundingMode(), SCIPintervalSetRoundingMode(), SCIPintervalSetRoundingModeDownwards(), SCIPintervalSetRoundingModeUpwards(), SCIPisInfinity(), SCIPvarGetLbLocal(), and SCIPvarGetUbLocal().
Referenced by propagateBoundsCons(), and unlockLinearVariable().
◆ consdataUpdateLinearActivityLbChange()
|
static |
update the linear activities after a change in the lower bound of a variable
- Parameters
-
scip SCIP data structure consdata constraint data coef coefficient of variable in constraint oldbnd previous lower bound of variable newbnd new lower bound of variable
Definition at line 522 of file cons_nonlinear.c.
References consdataUpdateLinearActivityUbChange(), INTERVALINFTY, NULL, SCIP_INVALID, SCIPintervalGetRoundingMode(), SCIPintervalNegateReal(), SCIPintervalSetRoundingMode(), SCIPintervalSetRoundingModeDownwards(), SCIPintervalSetRoundingModeUpwards(), and SCIPisInfinity().
Referenced by consdataUpdateLinearActivity(), and SCIP_DECL_EVENTEXEC().
◆ consdataUpdateLinearActivityUbChange()
|
static |
update the linear activities after a change in the upper bound of a variable
- Parameters
-
scip SCIP data structure consdata constraint data coef coefficient of variable in constraint oldbnd previous lower bound of variable newbnd new lower bound of variable
Definition at line 619 of file cons_nonlinear.c.
References INTERVALINFTY, NULL, SCIP_DECL_EVENTEXEC(), SCIP_INVALID, SCIPintervalGetRoundingMode(), SCIPintervalNegateReal(), SCIPintervalSetRoundingMode(), SCIPintervalSetRoundingModeDownwards(), SCIPintervalSetRoundingModeUpwards(), and SCIPisInfinity().
Referenced by consdataUpdateLinearActivityLbChange(), and SCIP_DECL_EVENTEXEC().
◆ SCIP_DECL_EVENTEXEC() [1/3]
|
static |
processes variable fixing or bound change event
Definition at line 715 of file cons_nonlinear.c.
References LinVarEventData::cons, consdataUpdateLinearActivityLbChange(), consdataUpdateLinearActivityUbChange(), LinVarEventData::conshdlrdata, FALSE, NULL, SCIP_CALL, SCIP_EVENTTYPE_BOUNDCHANGED, SCIP_EVENTTYPE_BOUNDTIGHTENED, SCIP_EVENTTYPE_LBCHANGED, SCIP_EVENTTYPE_VARFIXED, SCIP_OKAY, SCIPconsGetData(), SCIPeventGetNewbound(), SCIPeventGetOldbound(), SCIPeventGetType(), SCIPmarkConsPropagate(), and LinVarEventData::varidx.
Referenced by addLinearizationCuts(), and consdataUpdateLinearActivityUbChange().
◆ SCIP_DECL_EVENTEXEC() [2/3]
|
static |
processes bound change events for variables in expression graph
Definition at line 767 of file cons_nonlinear.c.
References LinVarEventData::conshdlrdata, FALSE, infty2infty, INTERVALINFTY, NULL, SCIP_DECL_EXPRGRAPHVARADDED(), SCIP_EVENTTYPE_BOUNDCHANGED, SCIP_EVENTTYPE_BOUNDTIGHTENED, SCIP_EVENTTYPE_LBCHANGED, SCIP_EVENTTYPE_VARFIXED, SCIP_OKAY, SCIP_Real, SCIPdebugMsg, SCIPepsilon(), SCIPeventGetNewbound(), SCIPeventGetOldbound(), SCIPeventGetType(), SCIPeventGetVar(), SCIPeventhdlrGetData(), SCIPexprgraphSetVarNodeLb(), SCIPexprgraphSetVarNodeUb(), SCIPinfinity(), and SCIPvarGetName().
◆ SCIP_DECL_EXPRGRAPHVARADDED()
|
static |
callback method for variable addition in expression graph
Definition at line 830 of file cons_nonlinear.c.
References LinVarEventData::conshdlrdata, FALSE, infty2infty, INTERVALINFTY, MAX, MIN, NULL, SCIP_CALL, SCIP_DECL_EXPRGRAPHVARREMOVE(), SCIP_EVENTTYPE_BOUNDCHANGED, SCIP_EVENTTYPE_VARFIXED, SCIP_LOCKTYPE_MODEL, SCIP_OKAY, SCIPaddVarLocksType(), SCIPcaptureVar(), SCIPcatchVarEvent(), SCIPdebugMessage, SCIPexprgraphSetVarNodeBounds(), SCIPinfinity(), SCIPintervalSetBounds(), SCIPvarGetLbLocal(), SCIPvarGetName(), SCIPvarGetUbLocal(), and SCIPvarIsActive().
Referenced by SCIP_DECL_EVENTEXEC().
◆ SCIP_DECL_EXPRGRAPHVARREMOVE()
|
static |
callback method for variable removal in expression graph
Definition at line 871 of file cons_nonlinear.c.
References consdataAddExprtrees(), LinVarEventData::conshdlrdata, NULL, SCIP_CALL, SCIP_EVENTTYPE_BOUNDCHANGED, SCIP_EVENTTYPE_VARFIXED, SCIP_LOCKTYPE_MODEL, SCIP_OKAY, SCIPaddVarLocksType(), SCIPdebugMessage, SCIPdropVarEvent(), SCIPreleaseVar(), and SCIPvarGetName().
Referenced by SCIP_DECL_EXPRGRAPHVARADDED().
◆ consdataAddExprtrees()
|
static |
- Parameters
-
scip SCIP data structure consdata nonlinear constraint data nexprtrees number of expression trees exprtrees expression trees coefs coefficients of expression trees, or NULL if all 1.0 copytrees whether trees should be copied or ownership should be assumed
Definition at line 900 of file cons_nonlinear.c.
References consdataSetExprtrees(), FALSE, NULL, SCIP_CALL, SCIP_EXPRCURV_UNKNOWN, SCIP_INVALID, SCIP_OKAY, SCIPallocBlockMemoryArray, SCIPblkmem(), SCIPexprtreeCopy(), SCIPexprtreeGetNVars(), SCIPexprtreeGetVars(), SCIPreallocBlockMemoryArray, and SCIPreleaseNlRow().
Referenced by consdataSetExprtrees(), SCIP_DECL_EXPRGRAPHVARREMOVE(), and SCIPaddExprtreesNonlinear().
◆ consdataSetExprtrees()
|
static |
- Parameters
-
scip SCIP data structure consdata nonlinear constraint data nexprtrees number of expression trees exprtrees expression trees coefs coefficients of expression trees, or NULL if all 1.0 copytrees whether trees should be copied or ownership should be assumed
Definition at line 973 of file cons_nonlinear.c.
References consdataAddExprtrees(), consdataEnsureLinearVarsSize(), FALSE, NULL, SCIP_CALL, SCIP_EXPRCURV_LINEAR, SCIP_INVALID, SCIP_OKAY, SCIPexprtreeFree(), SCIPfreeBlockMemoryArray, SCIPreleaseNlRow(), and TRUE.
Referenced by consdataAddExprtrees(), consdataCreate(), SCIP_DECL_CONSACTIVE(), SCIP_DECL_CONSDEACTIVE(), SCIP_DECL_CONSEXITPRE(), SCIP_DECL_CONSINITPRE(), SCIPcreateConsNonlinear(), and SCIPsetExprtreesNonlinear().
◆ consdataEnsureLinearVarsSize()
|
static |
ensures, that linear vars and coefs arrays can store at least num entries
- Parameters
-
scip SCIP data structure consdata nonlinear constraint data num minimum number of entries to store
Definition at line 1023 of file cons_nonlinear.c.
References consdataCreate(), NULL, SCIP_CALL, SCIP_OKAY, SCIPcalcMemGrowSize(), and SCIPreallocBlockMemoryArray.
Referenced by addLinearCoef(), consdataSetExprtrees(), removeFixedLinearVariables(), SCIPcreateConsNonlinear(), and SCIPcreateConsNonlinear2().
◆ consdataCreate()
|
static |
creates constraint data structure
- Parameters
-
scip SCIP data structure consdata a buffer to store pointer to new constraint data lhs left hand side of constraint rhs right hand side of constraint nlinvars number of linear variables linvars array of linear variables lincoefs array of coefficients of linear variables nexprtrees number of expression trees exprtrees expression trees nonlincoefs coefficients of expression trees capturevars whether we should capture variables
Definition at line 1053 of file cons_nonlinear.c.
References BMSclearMemory, consdataCreateEmpty(), consdataSetExprtrees(), NULL, SCIP_CALL, SCIP_INVALID, SCIP_OKAY, SCIPallocBlockMemory, SCIPcaptureVar(), SCIPduplicateBlockMemoryArray, SCIPisInfinity(), and TRUE.
Referenced by consdataEnsureLinearVarsSize(), and SCIP_DECL_CONSTRANS().
◆ consdataCreateEmpty()
|
static |
creates empty constraint data structure
- Parameters
-
scip SCIP data structure consdata a buffer to store pointer to new constraint data
Definition at line 1121 of file cons_nonlinear.c.
References BMSclearMemory, consdataFree(), NULL, SCIP_CALL, SCIP_EXPRCURV_LINEAR, SCIP_INVALID, SCIP_OKAY, SCIPallocBlockMemory, SCIPinfinity(), and TRUE.
Referenced by consdataCreate(), SCIPcreateConsNonlinear(), and SCIPcreateConsNonlinear2().
◆ consdataFree()
|
static |
frees constraint data structure
- Parameters
-
scip SCIP data structure consdata pointer to constraint data to free
Definition at line 1158 of file cons_nonlinear.c.
References consdataSortLinearVars(), NULL, SCIP_CALL, SCIP_OKAY, SCIPexprtreeFree(), SCIPfreeBlockMemory, SCIPfreeBlockMemoryArray, SCIPfreeBlockMemoryArrayNull, SCIPreleaseNlRow(), and SCIPreleaseVar().
Referenced by consdataCreateEmpty(), and SCIP_DECL_CONSDELETE().
◆ consdataSortLinearVars()
|
static |
sorts linear part of constraint data
- Parameters
-
consdata nonlinear constraint data
Definition at line 1218 of file cons_nonlinear.c.
References consdataMoveLinearVar(), NULL, SCIPsortedvecFindPtr(), SCIPsortPtrPtrReal(), SCIPsortPtrReal(), and TRUE.
Referenced by consdataFree(), and mergeAndCleanLinearVars().
◆ consdataMoveLinearVar()
|
static |
moves a linear variable from one position to another
- Parameters
-
consdata constraint data oldpos position of variable that shall be moved newpos new position of variable
Definition at line 1280 of file cons_nonlinear.c.
References addLinearCoef(), FALSE, and NULL.
Referenced by consdataSortLinearVars(), and delLinearCoefPos().
◆ addLinearCoef()
|
static |
adds linear coefficient in nonlinear constraint
- Parameters
-
scip SCIP data structure cons nonlinear constraint var variable of constraint entry coef coefficient of constraint entry
Definition at line 1313 of file cons_nonlinear.c.
References catchLinearVarEvents(), consdataEnsureLinearVarsSize(), delLinearCoefPos(), FALSE, lockLinearVariable(), NULL, SCIP_Bool, SCIP_CALL, SCIP_INVALID, SCIP_OKAY, SCIPcaptureVar(), SCIPconsGetData(), SCIPconsIsEnabled(), SCIPconsIsTransformed(), SCIPgetTransformedVar(), SCIPisZero(), SCIPreleaseNlRow(), SCIPvarCompare(), SCIPvarIsActive(), SCIPvarIsTransformed(), and TRUE.
Referenced by consdataMoveLinearVar(), removeFixedLinearVariables(), SCIPaddLinearVarNonlinear(), SCIPcreateConsNonlinear(), SCIPcreateConsNonlinear2(), and splitOffLinearPart().
◆ delLinearCoefPos()
|
static |
deletes linear coefficient at given position from nonlinear constraint data
- Parameters
-
scip SCIP data structure cons nonlinear constraint pos position of coefficient to delete
Definition at line 1392 of file cons_nonlinear.c.
References chgLinearCoefPos(), consdataMoveLinearVar(), dropLinearVarEvents(), FALSE, NULL, SCIP_CALL, SCIP_INVALID, SCIP_OKAY, SCIP_Real, SCIPconsGetData(), SCIPconsIsEnabled(), SCIPreleaseNlRow(), SCIPreleaseVar(), and unlockLinearVariable().
Referenced by addLinearCoef(), mergeAndCleanLinearVars(), and removeFixedLinearVariables().
◆ chgLinearCoefPos()
|
static |
changes linear coefficient value at given position of nonlinear constraint
- Parameters
-
scip SCIP data structure cons nonlinear constraint pos position of linear coefficient to change newcoef new value of linear coefficient
Definition at line 1451 of file cons_nonlinear.c.
References catchLinearVarEvents(), dropLinearVarEvents(), FALSE, lockLinearVariable(), mergeAndCleanLinearVars(), NULL, SCIP_CALL, SCIP_INVALID, SCIP_OKAY, SCIP_Real, SCIPconsGetData(), SCIPconsIsEnabled(), SCIPconsIsLocked(), SCIPconsIsTransformed(), SCIPisZero(), SCIPreleaseNlRow(), SCIPvarIsTransformed(), and unlockLinearVariable().
Referenced by delLinearCoefPos(), and mergeAndCleanLinearVars().
◆ mergeAndCleanLinearVars()
|
static |
- Parameters
-
scip SCIP data structure cons nonlinear constraint
Definition at line 1535 of file cons_nonlinear.c.
References chgLinearCoefPos(), consdataSortLinearVars(), delLinearCoefPos(), NULL, removeFixedLinearVariables(), SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPconsGetData(), SCIPisZero(), and TRUE.
Referenced by chgLinearCoefPos(), removeFixedLinearVariables(), and SCIP_DECL_CONSEXITPRE().
◆ removeFixedLinearVariables()
|
static |
removes fixes (or aggregated) linear variables from a nonlinear constraint
- Parameters
-
scip SCIP data structure cons nonlinearconstraint
Definition at line 1594 of file cons_nonlinear.c.
References addLinearCoef(), consdataEnsureLinearVarsSize(), delLinearCoefPos(), mergeAndCleanLinearVars(), NULL, REALABS, removeFixedNonlinearVariables(), SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIP_VARSTATUS_MULTAGGR, SCIPconsGetData(), SCIPconsGetName(), SCIPdebugMsg, SCIPdebugPrintCons, SCIPgetProbvarSum(), SCIPisInfinity(), SCIPvarGetMultaggrConstant(), SCIPvarGetMultaggrNVars(), SCIPvarGetMultaggrScalars(), SCIPvarGetMultaggrVars(), SCIPvarGetName(), SCIPvarGetStatus(), SCIPvarIsActive(), and TRUE.
Referenced by mergeAndCleanLinearVars(), SCIP_DECL_CONSEXITPRE(), and SCIP_DECL_CONSPRESOL().
◆ removeFixedNonlinearVariables()
|
static |
removes fixed variables from expression graph
- Parameters
-
scip SCIP data structure conshdlr constraint handler
Definition at line 1714 of file cons_nonlinear.c.
References LinVarEventData::conshdlrdata, NULL, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPconshdlrGetData(), SCIPdebug, SCIPdebugMsg, SCIPdebugMsgPrint, SCIPexprgraphGetNVars(), SCIPexprgraphGetVars(), SCIPexprgraphReplaceVarByLinearSum(), SCIPfreeBufferArray, SCIPgetProbvarLinearSum(), SCIPreallocBufferArray, SCIPvarGetName(), SCIPvarIsActive(), splitOffLinearPart(), and TRUE.
Referenced by removeFixedLinearVariables(), SCIP_DECL_CONSEXITPRE(), and SCIP_DECL_CONSPRESOL().
◆ splitOffLinearPart()
|
static |
moves constant and linear part from expression graph node into constraint sides and linear part frees expression graph node if expression is constant or linear
- Parameters
-
scip SCIP data structure conshdlr constraint handler cons nonlinear constraint infeasible pointer to store whether the problem is infeasible or not
Definition at line 1791 of file cons_nonlinear.c.
References addLinearCoef(), catchLinearVarEvents(), LinVarEventData::conshdlrdata, createNlRow(), dropLinearVarEvents(), FALSE, lockLinearVariable(), MAX, NULL, REALABS, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPconsGetData(), SCIPconshdlrGetData(), SCIPconsIsEnabled(), SCIPconsIsLocked(), SCIPexprgraphGetNodeNChildren(), SCIPexprgraphNodeSplitOffLinear(), SCIPfreeBufferArray, SCIPinfinity(), SCIPisInfinity(), TRUE, and unlockLinearVariable().
Referenced by removeFixedNonlinearVariables(), SCIP_DECL_CONSEXITPRE(), and SCIP_DECL_CONSPRESOL().
◆ createNlRow()
|
static |
create a nonlinear row representation of the constraint and stores them in consdata
- Parameters
-
scip SCIP data structure cons nonlinear constraint
Definition at line 1937 of file cons_nonlinear.c.
References LinVarEventData::conshdlrdata, NULL, presolveUpgrade(), SCIP_CALL, SCIP_OKAY, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconsGetName(), SCIPconshdlrGetData(), SCIPcreateNlRow(), SCIPexprgraphGetTree(), SCIPexprtreeFree(), and SCIPreleaseNlRow().
Referenced by SCIP_DECL_CONSINITSOL(), SCIPgetNlRowNonlinear(), and splitOffLinearPart().
◆ presolveUpgrade()
|
static |
tries to automatically convert a nonlinear constraint (or a part of it) into a more specific and more specialized constraint
- Parameters
-
scip SCIP data structure conshdlr constraint handler data structure cons source constraint to try to convert upgraded buffer to store whether constraint was upgraded nupgdconss buffer to increase if constraint was upgraded naddconss buffer to increase with number of additional constraints created during upgrade
Definition at line 1998 of file cons_nonlinear.c.
References checkCurvature(), LinVarEventData::conshdlrdata, FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPaddCons(), SCIPallocBufferArray, SCIPconsGetName(), SCIPconshdlrGetData(), SCIPconsIsModifiable(), SCIPdebugGetSolVal, SCIPdebugMsg, SCIPdebugMsgPrint, SCIPdebugPrintCons, SCIPdelCons(), SCIPexprgraphEval(), SCIPexprgraphGetNVars(), SCIPexprgraphGetVars(), SCIPfreeBufferArray, SCIPreallocBufferArray, SCIPreleaseCons(), and TRUE.
Referenced by createNlRow(), and SCIP_DECL_CONSPRESOL().
◆ checkCurvature()
|
static |
checks a nonlinear constraint for convexity and/or concavity
- Parameters
-
scip SCIP data structure cons nonlinear constraint expensivechecks whether also expensive checks should be executed assumeconvex whether to assume convexity in inequalities
Definition at line 2117 of file cons_nonlinear.c.
References infty2infty, INTERVALINFTY, MAX, MIN, NULL, reformReplaceNode(), SCIP_CALL, SCIP_EXPR_USER, SCIP_EXPRCURV_CONCAVE, SCIP_EXPRCURV_CONVEX, SCIP_EXPRCURV_LINEAR, SCIP_EXPRCURV_UNKNOWN, SCIP_OKAY, SCIP_VERBLEVEL_NORMAL, SCIPallocBufferArray, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconsGetName(), SCIPconshdlrGetData(), SCIPdebug, SCIPdebugMsg, SCIPdebugMsgPrint, SCIPexprcurvAdd(), SCIPexprcurvGetName(), SCIPexprcurvMultiply(), SCIPexprGetOperator(), SCIPexprtreeCheckCurvature(), SCIPexprtreeGetNVars(), SCIPexprtreeGetRoot(), SCIPexprtreeGetVars(), SCIPexprtreePrintWithNames(), SCIPfreeBufferArrayNull, SCIPgetMessagehdlr(), SCIPinfinity(), SCIPintervalSetBounds(), SCIPisInfinity(), SCIPreallocBufferArray, SCIPvarGetLbGlobal(), SCIPvarGetUbGlobal(), SCIPverbMessage(), and TRUE.
Referenced by addLinearizationCuts(), generateCut(), presolveUpgrade(), SCIP_DECL_CONSINITLP(), SCIP_DECL_CONSINITSOL(), SCIP_DECL_CONSSEPALP(), SCIPcheckCurvatureNonlinear(), SCIPgetCurvatureNonlinear(), and SCIPgetExprtreeCurvaturesNonlinear().
◆ reformReplaceNode()
|
static |
- Parameters
-
exprgraph expression graph node pointer to node to be replaced in expression graph replacement node which takes node's place conss constraints nconss number of constraints
Definition at line 2214 of file cons_nonlinear.c.
References FALSE, NULL, reformNode2Var(), SCIP_CALL, SCIP_OKAY, SCIPconsGetData(), SCIPexprgraphCaptureNode(), SCIPexprgraphGetNodeNParents(), SCIPexprgraphMoveNodeParents(), and SCIPexprgraphReleaseNode().
Referenced by checkCurvature(), reformNode2Var(), and reformulate().
◆ reformNode2Var()
|
static |
creates a new auxiliary variable and a new auxiliary nonlinear constraint connecting the var and a given node node is replaced by new new auxiliary variables node in all parents of node in expression graph and in all constraints that use node
- Parameters
-
scip SCIP data structure exprgraph expression graph node expression graph node conss constraints where to update exprgraphnode nconss number of constraints naddcons counter to increase when constraint is added donotmultaggr whether to mark auxiliary variable as not to multiaggregate
Definition at line 2268 of file cons_nonlinear.c.
References BOUNDTIGHTENING_MINSTRENGTH, FALSE, INTERVALINFTY, NULL, reformEnsureChildrenMinCurvature(), reformReplaceNode(), SCIP_Bool, SCIP_CALL, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_Real, SCIP_VARTYPE_CONTINUOUS, SCIPaddCons(), SCIPaddVar(), SCIPcreateConsNonlinear2(), SCIPcreateVar(), SCIPdebugAddSolVal, SCIPdebugMsg, SCIPexprgraphAddVars(), SCIPexprgraphGetNodeBounds(), SCIPexprgraphGetNodeDepth(), SCIPexprgraphGetNodePosition(), SCIPexprgraphGetNodeVal(), SCIPexprgraphSetVarNodeValue(), SCIPexprgraphTightenNodeBounds(), SCIPintervalGetInf(), SCIPintervalGetSup(), SCIPmarkDoNotMultaggrVar(), SCIPreleaseCons(), SCIPreleaseVar(), SCIPsnprintf(), and TRUE.
Referenced by reformEnsureChildrenMinCurvature(), reformReplaceNode(), and reformulate().
◆ reformEnsureChildrenMinCurvature()
|
static |
ensures that all children of a node have at least a given curvature by adding auxiliary variables
- Parameters
-
scip SCIP data structure exprgraph expression graph node expression graph node mincurv minimal desired curvature conss constraints to check whether they use one of the replaced nodes nconss number of constraints to check naddcons counter to increase when constraint is added
Definition at line 2341 of file cons_nonlinear.c.
References BOUNDTIGHTENING_MINSTRENGTH, FALSE, INTERVALINFTY, NULL, reformMonomial(), reformNode2Var(), SCIP_Bool, SCIP_CALL, SCIP_EXPR_VARIDX, SCIP_EXPRCURV_UNKNOWN, SCIP_OKAY, SCIPdebugMsg, SCIPexprcurvGetName(), SCIPexprgraphGetNodeBounds(), SCIPexprgraphGetNodeChildren(), SCIPexprgraphGetNodeCurvature(), SCIPexprgraphGetNodeDepth(), SCIPexprgraphGetNodeNChildren(), SCIPexprgraphGetNodeOperator(), SCIPexprgraphGetNodePosition(), SCIPexprgraphUpdateNodeBoundsCurvature(), SCIPintervalIsEmpty(), and TRUE.
Referenced by reformNode2Var(), and reformulate().
◆ reformMonomial()
|
static |
reformulates a monomial by adding auxiliary variables and constraints for bilinear terms
- Parameters
-
scip SCIP data structure exprgraph expression graph nfactors number of factors factors factors exponents exponents, or NULL if all 1.0 resultnode buffer to store node which represents the reformulated monomial createauxcons whether to create auxiliary var/cons mindepth minimal depth of new nodes in expression graph, or -1 naddcons buffer to increase by number of added cons
Definition at line 2396 of file cons_nonlinear.c.
References BOUNDTIGHTENING_MINSTRENGTH, fabs(), FALSE, INTERVALINFTY, NULL, pow(), reformulate(), SCIP_CALL, SCIP_EXPR_INTPOWER, SCIP_EXPR_MINUS, SCIP_EXPR_MUL, SCIP_EXPR_REALPOWER, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_Real, SCIP_VARTYPE_CONTINUOUS, SCIPaddCons(), SCIPaddVar(), SCIPblkmem(), SCIPcreateConsNonlinear2(), SCIPcreateVar(), SCIPdebugAddSolVal, SCIPdebugMsg, SCIPexprgraphAddNode(), SCIPexprgraphAddVars(), SCIPexprgraphCreateNode(), SCIPexprgraphGetNodeBounds(), SCIPexprgraphGetNodeChildren(), SCIPexprgraphGetNodeIntPowerExponent(), SCIPexprgraphGetNodeNChildren(), SCIPexprgraphGetNodeNParents(), SCIPexprgraphGetNodeOperator(), SCIPexprgraphGetNodeParents(), SCIPexprgraphGetNodeRealPowerExponent(), SCIPexprgraphGetNodeVal(), SCIPexprgraphSetVarNodeValue(), SCIPexprgraphUpdateNodeBoundsCurvature(), SCIPinfinity(), SCIPintervalIsEmpty(), SCIPisEQ(), SCIPisIntegral(), SCIPreleaseCons(), SCIPreleaseVar(), SCIPround(), SCIPsnprintf(), and TRUE.
Referenced by reformEnsureChildrenMinCurvature(), and reformulate().
◆ reformulate()
|
static |
reformulates expression graph into a form so that for each node under- and overestimators could be computed similar to factorable reformulation in other global solvers, but sometimes does not split up complex operands (like quadratic)
- Parameters
-
scip SCIP data structure conshdlr constraint handler conss constraints nconss number of constraints naddcons buffer to increase by the number of added constraints
Definition at line 2719 of file cons_nonlinear.c.
References BOUNDTIGHTENING_MINSTRENGTH, SCIP_QuadElement::coef, computeViolation(), LinVarEventData::conshdlrdata, FALSE, SCIP_QuadElement::idx1, SCIP_QuadElement::idx2, SCIP_Interval::inf, INTERVALINFTY, NULL, reformEnsureChildrenMinCurvature(), reformMonomial(), reformNode2Var(), reformReplaceNode(), SCIP_Bool, SCIP_CALL, SCIP_ERROR, SCIP_EXPR_ABS, SCIP_EXPR_CONST, SCIP_EXPR_COS, SCIP_EXPR_DIV, SCIP_EXPR_EXP, SCIP_EXPR_INTPOWER, SCIP_EXPR_LAST, SCIP_EXPR_LINEAR, SCIP_EXPR_LOG, SCIP_EXPR_MAX, SCIP_EXPR_MIN, SCIP_EXPR_MINUS, SCIP_EXPR_MUL, SCIP_EXPR_PARAM, SCIP_EXPR_PLUS, SCIP_EXPR_POLYNOMIAL, SCIP_EXPR_PRODUCT, SCIP_EXPR_QUADRATIC, SCIP_EXPR_REALPOWER, SCIP_EXPR_SIGN, SCIP_EXPR_SIGNPOWER, SCIP_EXPR_SIN, SCIP_EXPR_SQRT, SCIP_EXPR_SQUARE, SCIP_EXPR_SUM, SCIP_EXPR_TAN, SCIP_EXPR_USER, SCIP_EXPR_VARIDX, SCIP_EXPRCURV_CONCAVE, SCIP_EXPRCURV_CONVEX, SCIP_EXPRCURV_LINEAR, SCIP_EXPRCURV_UNKNOWN, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_Real, SCIP_STAGE_PRESOLVING, SCIP_VARTYPE_CONTINUOUS, SCIPABORT, SCIPaddCons(), SCIPaddVar(), SCIPallocBufferArray, SCIPallocClearBufferArray, SCIPblkmem(), SCIPconsGetData(), SCIPconsGetName(), SCIPconshdlrGetData(), SCIPconsIsDeleted(), SCIPcreateConsNonlinear2(), SCIPcreateVar(), SCIPdebug, SCIPdebugAddSolVal, SCIPdebugGetSolVal, SCIPdebugMessage, SCIPdebugMsg, SCIPdebugMsgPrint, SCIPdebugPrintCons, SCIPerrorMessage, SCIPexprCreateMonomial(), SCIPexprcurvGetName(), SCIPexprcurvMultiply(), SCIPexprcurvNegate(), SCIPexprcurvPower(), SCIPexprGetMonomialChildIndices(), SCIPexprGetMonomialCoef(), SCIPexprGetMonomialExponents(), SCIPexprGetMonomialNFactors(), SCIPexprgraphAddNode(), SCIPexprgraphAddVars(), SCIPexprgraphCreateNode(), SCIPexprgraphCreateNodeLinear(), SCIPexprgraphCreateNodePolynomial(), SCIPexprgraphCreateNodeQuadratic(), SCIPexprgraphEval(), SCIPexprgraphGetDepth(), SCIPexprgraphGetNNodes(), SCIPexprgraphGetNodeBounds(), SCIPexprgraphGetNodeChildren(), SCIPexprgraphGetNodeCurvature(), SCIPexprgraphGetNodeDepth(), SCIPexprgraphGetNodeIntPowerExponent(), SCIPexprgraphGetNodeNChildren(), SCIPexprgraphGetNodeNParents(), SCIPexprgraphGetNodeOperator(), SCIPexprgraphGetNodePolynomialConstant(), SCIPexprgraphGetNodePolynomialMonomialCurvature(), SCIPexprgraphGetNodePolynomialMonomials(), SCIPexprgraphGetNodePolynomialNMonomials(), SCIPexprgraphGetNodePosition(), SCIPexprgraphGetNodes(), SCIPexprgraphGetNodeSignPowerExponent(), SCIPexprgraphGetNodeVal(), SCIPexprgraphGetNVars(), SCIPexprgraphGetVars(), SCIPexprgraphHasNodeNonlinearAncestor(), SCIPexprgraphHasNodeSibling(), SCIPexprgraphIsNodeEnabled(), SCIPexprgraphPrintNode(), SCIPexprgraphPropagateVarBounds(), SCIPexprgraphSetVarNodeValue(), SCIPexprgraphUpdateNodeBoundsCurvature(), SCIPexpropGetName(), SCIPfreeBufferArray, SCIPgetMessagehdlr(), SCIPgetStage(), SCIPinProbing(), SCIPintervalGetInf(), SCIPintervalGetSup(), SCIPintervalIsEmpty(), SCIPisGE(), SCIPisInfinity(), SCIPisIntegral(), SCIPisLE(), SCIPreleaseCons(), SCIPreleaseVar(), SCIPround(), SCIPsnprintf(), SCIP_Interval::sup, and TRUE.
Referenced by reformMonomial(), and SCIP_DECL_CONSPRESOL().
◆ computeViolation()
|
static |
computes activity and violation of a constraint
During presolving and if the constraint is active, it is assumes that SCIPexprgraphEval has been called for sol before.
If a solution is found to violate the variable bounds, then violation calculation is stopped and solviolbounds is set to TRUE.
- Parameters
-
scip SCIP data structure conshdlr constraint handler cons nonlinear constraint sol solution or NULL if LP solution should be used solviolbounds buffer to indicate whether solution is found to violate variable bounds by more than feastol
Definition at line 3710 of file cons_nonlinear.c.
References computeViolations(), LinVarEventData::conshdlrdata, FALSE, MAX, MIN, NULL, REALABS, SCIP_CALL, SCIP_INVALID, SCIP_OKAY, SCIP_Real, SCIP_STAGE_EXITPRESOLVE, SCIP_STAGE_INITPRESOLVE, SCIPallocBufferArray, SCIPconsGetData(), SCIPconshdlrGetData(), SCIPexprgraphGetNodeVal(), SCIPexprintCompile(), SCIPexprintEval(), SCIPexprtreeGetInterpreterData(), SCIPexprtreeGetNVars(), SCIPexprtreeGetVars(), SCIPfeastol(), SCIPfreeBufferArray, SCIPgetSolVal(), SCIPgetStage(), SCIPinfinity(), SCIPisFeasGE(), SCIPisFeasLE(), SCIPisFinite, SCIPisGT(), SCIPisInfinity(), SCIPrelDiff(), SCIPupdateSolConsViolation(), SCIPvarGetLbLocal(), SCIPvarGetUbLocal(), TRUE, and x.
Referenced by computeViolations(), proposeFeasibleSolution(), reformulate(), SCIP_DECL_CONSCHECK(), and SCIPgetViolationNonlinear().
◆ computeViolations()
|
static |
computes violation of a set of constraints
If the solution is found to violate bounds of some variable in some constraint, then violation computation is stopped and solviolbounds is set to TRUE.
- Parameters
-
scip SCIP data structure conshdlr constraint handler conss constraints nconss number of constraints sol solution or NULL if LP solution should be used solviolbounds buffer to indicate whether solution violates bounds of some variable by more than feastol maxviolcon buffer to store constraint with largest violation, or NULL if solution is feasible
Definition at line 3962 of file cons_nonlinear.c.
References addLinearization(), computeViolation(), LinVarEventData::conshdlrdata, MAX, NULL, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIP_STAGE_EXITPRESOLVE, SCIP_STAGE_INITPRESOLVE, SCIPallocBufferArray, SCIPconsGetData(), SCIPconshdlrGetData(), SCIPexprgraphEval(), SCIPexprgraphGetNVars(), SCIPexprgraphGetVars(), SCIPfeastol(), SCIPfreeBufferArray, SCIPgetSolVals(), SCIPgetStage(), and SCIPisGT().
Referenced by computeViolation(), enforceConstraint(), SCIP_DECL_CONSENFOPS(), SCIP_DECL_CONSSEPALP(), and SCIP_DECL_CONSSEPASOL().
◆ addLinearization()
|
static |
adds linearization of a constraints expression tree in reference point to a row
- Parameters
-
scip SCIP data structure exprint expression interpreter cons constraint exprtreeidx for which tree a linearization should be added x value of expression tree variables where to generate cut newx whether the last evaluation of the expression with the expression interpreter was not at x rowprep rowprep where to add linearization success buffer to store whether a linearization was succefully added to the row
Definition at line 4033 of file cons_nonlinear.c.
References addConcaveEstimatorUnivariate(), FALSE, MIN, MIN3, NULL, REALABS, SCIP_Bool, SCIP_CALL, SCIP_EXPRCURV_CONCAVE, SCIP_EXPRCURV_CONVEX, SCIP_OKAY, SCIP_Real, SCIPaddRowprepConstant(), SCIPaddRowprepTerms(), SCIPallocBufferArray, SCIPconsGetData(), SCIPconsGetName(), SCIPdebug, SCIPdebugMsg, SCIPdebugMsgPrint, SCIPexprintCompile(), SCIPexprintGrad(), SCIPexprtreeGetInterpreterData(), SCIPexprtreeGetNVars(), SCIPexprtreeGetVars(), SCIPfeastol(), SCIPfreeBufferArray, SCIPisEQ(), SCIPisFinite, SCIPisInfinity(), SCIPisZero(), SCIPprintRowprep(), SCIPvarGetLbGlobal(), SCIPvarGetName(), SCIPvarGetUbGlobal(), TRUE, and x.
Referenced by computeViolations(), and generateCut().
◆ addConcaveEstimatorUnivariate()
|
static |
adds secant of a constraints univariate expression tree in reference point to a row
- Parameters
-
scip SCIP data structure cons constraint exprtreeidx for which tree a secant should be added rowprep rowprep where to add estimator success buffer to store whether a secant was succefully added to the row
Definition at line 4193 of file cons_nonlinear.c.
References addConcaveEstimatorBivariate(), FALSE, MAX, MIN, NULL, REALABS, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIP_SIDETYPE_LEFT, SCIPaddRowprepConstant(), SCIPaddRowprepTerm(), SCIPconsGetData(), SCIPconsGetName(), SCIPdebug, SCIPdebugMsg, SCIPexprtreeEval(), SCIPexprtreeGetNVars(), SCIPexprtreeGetVars(), SCIPisEQ(), SCIPisFinite, SCIPisInfinity(), SCIPisLE(), SCIPprintRowprep(), SCIPvarGetLbLocal(), SCIPvarGetUbLocal(), SCIP_RowPrep::sidetype, and TRUE.
Referenced by addLinearization(), and generateCut().
◆ addConcaveEstimatorBivariate()
|
static |
adds estimator of a constraints bivariate expression tree to a row a reference point is given to decide which hyperplane to choose
- Parameters
-
scip SCIP data structure cons constraint exprtreeidx for which tree a secant should be added ref reference values of expression tree variables where to generate cut rowprep rowprep where to add estimator success buffer to store whether a secant was succefully added to the row
Definition at line 4292 of file cons_nonlinear.c.
References FALSE, MAX, MIN, NULL, REALABS, SCIP_Bool, SCIP_CALL, SCIP_EXPRCURV_CONCAVE, SCIP_EXPRCURV_CONVEX, SCIP_OKAY, SCIP_Real, SCIPaddRowprepConstant(), SCIPaddRowprepTerm(), SCIPcomputeHyperplaneThreePoints(), SCIPconsGetData(), SCIPconsGetName(), SCIPdebug, SCIPdebugMsg, SCIPexprtreeEval(), SCIPexprtreeGetNVars(), SCIPexprtreeGetVars(), SCIPisEQ(), SCIPisFeasGE(), SCIPisFeasLE(), SCIPisFinite, SCIPisInfinity(), SCIPisNegative(), SCIPisRelEQ(), SCIPisRelLE(), SCIPisZero(), SCIPprintRowprep(), SCIPvarGetLbLocal(), SCIPvarGetName(), SCIPvarGetUbLocal(), TRUE, x, and y.
Referenced by addConcaveEstimatorUnivariate(), and generateCut().
◆ addConcaveEstimatorMultivariate()
|
static |
adds estimator of a constraints multivariate expression tree to a row Given concave function f(x) and reference point ref. Let (v_i: i=1,...,n) be corner points of current domain of x. Find (coef,constant) such that <coef,v_i> + constant <= f(v_i) (cut validity) and such that <coef, ref> + constant is maximized (cut efficacy). Then <coef, x> + constant <= f(x) for all x in current domain.
Similar to compute an overestimator for a convex function f(x). Find (coef,constant) such that <coef,v_i> + constant >= f(v_i) and such that <coef, ref> + constant is minimized. Then <coef, x> + constant >= f(x) for all x in current domain.
- Parameters
-
scip SCIP data structure cons constraint exprtreeidx for which tree a secant should be added ref reference values of expression tree variables where to generate cut rowprep rowprep where to add estimator success buffer to store whether a secant was succefully added to the row
Definition at line 4845 of file cons_nonlinear.c.
References FALSE, MAX, MIN, NULL, SCIP_Bool, SCIP_CALL, SCIP_ERROR, SCIP_EXPRCURV_CONCAVE, SCIP_EXPRCURV_CONVEX, SCIP_OBJSEN_MAXIMIZE, SCIP_OBJSEN_MINIMIZE, SCIP_OKAY, SCIPconsGetData(), SCIPconsGetName(), SCIPdebugMsg, SCIPerrorMessage, SCIPexprtreeGetNVars(), SCIPexprtreeGetVars(), SCIPgetMessagehdlr(), SCIPisFeasGE(), SCIPisFeasLE(), SCIPisInfinity(), SCIPlpiCreate(), SCIPvarGetLbLocal(), SCIPvarGetName(), SCIPvarGetUbLocal(), SCIPwarningMessage(), and TRUE.
Referenced by generateCut().
◆ getCoeffsAndConstantFromLinearExpr()
|
static |
Computes the linear coeffs and the constant in a linear expression both scaled by a given scalar value. The coeffs of the variables will be stored in the given array at their variable index. The constant of the given linear expression will be added to the given buffer.
- Parameters
-
expr the linear expression scalar the scalar value, i.e. the coeff of the given expression varcoeffs buffer array to store the computed coefficients constant buffer to hold the constant value of the given expression
Definition at line 4942 of file cons_nonlinear.c.
References addUserEstimator(), SCIP_CALL, SCIP_ERROR, SCIP_EXPR_CONST, SCIP_EXPR_LINEAR, SCIP_EXPR_MINUS, SCIP_EXPR_MUL, SCIP_EXPR_PLUS, SCIP_EXPR_SUM, SCIP_EXPR_VARIDX, SCIP_OKAY, SCIP_Real, SCIPABORT, SCIPerrorMessage, SCIPexprGetChildren(), SCIPexprGetLinearCoefs(), SCIPexprGetLinearConstant(), SCIPexprGetNChildren(), SCIPexprGetOperator(), SCIPexprGetOpIndex(), SCIPexprGetOpReal(), and SCIPexpropGetName().
Referenced by addUserEstimator().
◆ addUserEstimator()
|
static |
adds estimator from user callback of a constraints user expression tree to a row
- Parameters
-
scip SCIP data structure cons constraint exprtreeidx for which tree an estimator should be added x value of expression tree variables where to generate cut overestimate whether to compute an overestimator instead of an underestimator rowprep rowprep where to add estimator success buffer to store whether an estimator was succefully added to the rowprep
Definition at line 5056 of file cons_nonlinear.c.
References addIntervalGradientEstimator(), FALSE, getCoeffsAndConstantFromLinearExpr(), infty2infty, INTERVALINFTY, MAX, MIN, NULL, SCIP_CALL, SCIP_EXPR_USER, SCIP_OKAY, SCIP_Real, SCIPaddRowprepConstant(), SCIPaddRowprepTerms(), SCIPallocBufferArray, SCIPconsGetData(), SCIPexprEstimateUser(), SCIPexprEval(), SCIPexprEvalInt(), SCIPexprGetChildren(), SCIPexprGetNChildren(), SCIPexprGetOperator(), SCIPexprHasUserEstimator(), SCIPexprtreeGetNVars(), SCIPexprtreeGetParamVals(), SCIPexprtreeGetRoot(), SCIPexprtreeGetVars(), SCIPfreeBufferArray, SCIPinfinity(), SCIPintervalSetBounds(), SCIPvarGetLbLocal(), and SCIPvarGetUbLocal().
Referenced by generateCut(), and getCoeffsAndConstantFromLinearExpr().
◆ addIntervalGradientEstimator()
|
static |
adds estimator from interval gradient of a constraints univariate expression tree to a row a reference point is used to decide in which corner to generate the cut
- Parameters
-
scip SCIP data structure exprint expression interpreter cons constraint exprtreeidx for which tree a secant should be added x value of expression tree variables where to generate cut newx whether the last evaluation of the expression with the expression interpreter was not at x overestimate whether to compute an overestimator instead of an underestimator rowprep rowprep where to add estimator success buffer to store whether an estimator was succefully added to the rowprep
Definition at line 5167 of file cons_nonlinear.c.
References FALSE, generateCut(), infty2infty, INTERVALINFTY, MAX, MIN, NULL, SCIP_CALL, SCIP_EXPRINTCAPABILITY_INTGRADIENT, SCIP_OKAY, SCIP_Real, SCIPaddRowprepConstant(), SCIPaddRowprepTerms(), SCIPallocBufferArray, SCIPconsGetData(), SCIPconsGetName(), SCIPdebugMsg, SCIPexprintCompile(), SCIPexprintEval(), SCIPexprintGetCapability(), SCIPexprintGradInt(), SCIPexprtreeGetInterpreterData(), SCIPexprtreeGetNVars(), SCIPexprtreeGetVars(), SCIPfreeBufferArrayNull, SCIPinfinity(), SCIPintervalGetInf(), SCIPintervalGetSup(), SCIPintervalMulScalar(), SCIPintervalSetBounds(), SCIPisEQ(), SCIPisFinite, SCIPisInfinity(), SCIPisZero(), SCIPvarGetLbLocal(), SCIPvarGetName(), SCIPvarGetUbLocal(), and TRUE.
Referenced by addUserEstimator(), and generateCut().
◆ generateCut()
|
static |
generates a cut based on linearization (if convex), secant (if concave), or intervalgradient (if indefinite)
- Parameters
-
scip SCIP data structure exprint expression interpreter cons constraint ref reference point for each exprtree, or NULL if sol should be used sol reference solution where cut should be generated, or NULL if LP solution should be used newsol whether the last evaluation of the expression with the expression interpreter was not at sol side for which side a cut should be generated row storage for cut minviol minimal absolute violation we try to achieve maxrange maximal range allowed expensivecurvchecks whether also expensive checks should be executed assumeconvex whether to assume convexity in inequalities
Definition at line 5322 of file cons_nonlinear.c.
References addConcaveEstimatorBivariate(), addConcaveEstimatorMultivariate(), addConcaveEstimatorUnivariate(), addIntervalGradientEstimator(), addLinearization(), addUserEstimator(), checkCurvature(), SCIP_RowPrep::coefs, FALSE, SCIP_RowPrep::name, NULL, SCIP_RowPrep::nvars, REALABS, SCIP_Bool, SCIP_CALL, SCIP_EXPR_USER, SCIP_EXPRCURV_CONCAVE, SCIP_EXPRCURV_CONVEX, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_Real, SCIP_SIDETYPE_LEFT, SCIP_SIDETYPE_RIGHT, SCIPaddRowprepSide(), SCIPaddRowprepTerms(), SCIPaddVarsToRow(), SCIPallocBufferArray, SCIPcleanupRowprep(), SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconsGetName(), SCIPconsIsLocal(), SCIPcreateEmptyRowCons(), SCIPcreateRowprep(), SCIPdebugMsg, SCIPexprGetOperator(), SCIPexprtreeGetNVars(), SCIPexprtreeGetRoot(), SCIPexprtreeGetVars(), SCIPfreeBufferArray, SCIPfreeRowprep(), SCIPgetRowprepRowCons(), SCIPgetSolVals(), SCIPisInfinity(), SCIPmergeRowprepTerms(), SCIPreallocBufferArray, SCIPsnprintf(), separatePoint(), SCIP_RowPrep::side, TRUE, and x.
Referenced by addIntervalGradientEstimator(), addLinearizationCuts(), SCIP_DECL_CONSINITLP(), and separatePoint().
◆ separatePoint()
|
static |
tries to separate solution or LP solution by a linear cut
assumes that constraint violations have been computed
- Parameters
-
scip SCIP data structure conshdlr nonlinear constraints handler conss constraints nconss number of constraints nusefulconss number of constraints that seem to be useful sol solution to separate, or NULL if LP solution should be used newsol have the constraints just been evaluated at this point? minefficacy minimal efficacy of a cut if it should be added to the LP inenforcement whether we are in constraint enforcement result result of separation bestefficacy buffer to store best efficacy of a cut that was added to the LP, if found; or NULL if not of interest
Definition at line 5479 of file cons_nonlinear.c.
References addLinearizationCuts(), LinVarEventData::conshdlrdata, FALSE, generateCut(), MAX, NULL, SCIP_Bool, SCIP_CALL, SCIP_CUTOFF, SCIP_DIDNOTFIND, SCIP_FEASIBLE, SCIP_OKAY, SCIP_Real, SCIP_SEPARATED, SCIP_SIDETYPE_LEFT, SCIP_SIDETYPE_RIGHT, SCIPaddRow(), SCIPconsGetData(), SCIPconsGetName(), SCIPconshdlrGetData(), SCIPconsIsActive(), SCIPconsIsDeleted(), SCIPconsIsEnabled(), SCIPdebug, SCIPdebugMsg, SCIPfeastol(), SCIPgetRowLPFeasibility(), SCIPgetRowSolFeasibility(), SCIPisCutApplicable(), SCIPisGT(), SCIPisInfinity(), SCIPmarkRowNotRemovableLocal(), SCIPprintRow(), SCIPreleaseRow(), and SCIPresetConsAge().
Referenced by enforceConstraint(), generateCut(), SCIP_DECL_CONSSEPALP(), and SCIP_DECL_CONSSEPASOL().
◆ addLinearizationCuts()
|
static |
adds linearizations cuts for convex constraints w.r.t. a given reference point to cutpool and sepastore if separatedlpsol is not NULL, then a cut that separates the LP solution is added to the sepastore and is forced to enter the LP if separatedlpsol is not NULL, but cut does not separate the LP solution, then it is added to the cutpool only if separatedlpsol is NULL, then cut is added to cutpool only
- Parameters
-
scip SCIP data structure conshdlr quadratic constraints handler conss constraints nconss number of constraints ref reference point where to linearize, or NULL for LP solution separatedlpsol buffer to store whether a cut that separates the current LP solution was found and added to LP, or NULL if adding to cutpool only minefficacy minimal efficacy of a cut when checking for separation of LP solution
Definition at line 5598 of file cons_nonlinear.c.
References checkCurvature(), LinVarEventData::conshdlrdata, FALSE, generateCut(), NULL, SCIP_Bool, SCIP_CALL, SCIP_DECL_EVENTEXEC(), SCIP_EXPRCURV_CONCAVE, SCIP_EXPRCURV_CONVEX, SCIP_OKAY, SCIP_SIDETYPE_LEFT, SCIP_SIDETYPE_RIGHT, SCIPaddPoolCut(), SCIPaddRow(), SCIPconsGetData(), SCIPconshdlrGetData(), SCIPconsIsLocal(), SCIPgetRowLPFeasibility(), SCIPisInfinity(), SCIPreleaseRow(), SCIProwIsLocal(), and TRUE.
Referenced by SCIP_DECL_CONSSEPALP(), SCIP_DECL_EVENTEXEC(), and separatePoint().
◆ SCIP_DECL_EVENTEXEC() [3/3]
|
static |
processes the event that a new primal solution has been found
Definition at line 5677 of file cons_nonlinear.c.
References addLinearizationCuts(), LinVarEventData::conshdlrdata, NULL, registerBranchingVariables(), SCIP_CALL, SCIP_EVENTTYPE_FORMAT, SCIP_EVENTTYPE_SOLFOUND, SCIP_OKAY, SCIPconshdlrGetConss(), SCIPconshdlrGetData(), SCIPconshdlrGetNConss(), SCIPdebugMsg, SCIPeventGetSol(), SCIPeventGetType(), SCIPheurGetName(), and SCIPsolGetHeur().
◆ registerBranchingVariables()
|
static |
registers unfixed variables in nonlinear terms of violated constraints as external branching candidates
- Parameters
-
scip SCIP data structure conshdlr constraint handler conss constraints to check nconss number of constraints to check nnotify counter for number of notifications performed
Definition at line 5724 of file cons_nonlinear.c.
References MAX, NULL, registerLargeRelaxValueVariableForBranching(), SCIP_CALL, SCIP_EXPRCURV_CONCAVE, SCIP_EXPRCURV_CONVEX, SCIP_INVALID, SCIP_OKAY, SCIPaddExternBranchCand(), SCIPconsGetData(), SCIPconsGetName(), SCIPdebugMsg, SCIPexprcurvGetName(), SCIPexprtreeGetNVars(), SCIPexprtreeGetVars(), SCIPfeastol(), SCIPisGT(), SCIPisRelEQ(), SCIPvarGetLbLocal(), SCIPvarGetName(), and SCIPvarGetUbLocal().
Referenced by enforceConstraint(), and SCIP_DECL_EVENTEXEC().
◆ registerLargeRelaxValueVariableForBranching()
|
static |
registers a nonlinear variable from a violated constraint as branching candidate that has a large absolute value in the relaxation
- Parameters
-
scip SCIP data structure conss constraints nconss number of constraints sol solution to enforce (NULL for the LP solution) brvar buffer to store branching variable
Definition at line 5790 of file cons_nonlinear.c.
References ABS, NULL, REALABS, replaceViolatedByLinearConstraints(), SCIP_CALL, SCIP_INVALID, SCIP_OKAY, SCIP_Real, SCIPaddExternBranchCand(), SCIPconsGetData(), SCIPexprtreeGetNVars(), SCIPexprtreeGetVars(), SCIPfeastol(), SCIPgetSolVal(), SCIPisGT(), SCIPisRelEQ(), SCIPvarGetLbLocal(), and SCIPvarGetUbLocal().
Referenced by enforceConstraint(), and registerBranchingVariables().
◆ replaceViolatedByLinearConstraints()
|
static |
replaces violated nonlinear constraints where all nonlinear variables are almost fixed by linear constraints only adds constraint if it is violated in current solution first tries to fix almost fixed variables
- Parameters
-
scip SCIP data structure conss constraints nconss number of constraints addedcons buffer to store whether a linear constraint was added reduceddom whether a domain has been reduced infeasible whether we detected infeasibility
Definition at line 5852 of file cons_nonlinear.c.
References LinVarEventData::cons, FALSE, h, INTERVALINFTY, NULL, propagateBoundsTightenVarLb(), SCIP_Bool, SCIP_CALL, SCIP_INFEASIBLE, SCIP_LPSOLSTAT_OPTIMAL, SCIP_OKAY, SCIP_Real, SCIPaddConsLocal(), SCIPcheckCons(), SCIPconsGetData(), SCIPconsGetName(), SCIPconsIsChecked(), SCIPconsIsDynamic(), SCIPconsIsEnforced(), SCIPconsIsInitial(), SCIPconsIsModifiable(), SCIPconsIsPropagated(), SCIPconsIsRemovable(), SCIPconsIsSeparated(), SCIPconsIsStickingAtNode(), SCIPcreateConsLinear(), SCIPdebugMsg, SCIPdebugPrintCons, SCIPdelConsLocal(), SCIPevalExprtreeLocalBounds(), SCIPexprtreeGetNVars(), SCIPexprtreeGetVars(), SCIPfeastol(), SCIPgetLPSolstat(), SCIPinfinity(), SCIPintervalGetInf(), SCIPintervalGetSup(), SCIPintervalIsEmpty(), SCIPintervalMulScalar(), SCIPisEQ(), SCIPisFeasLE(), SCIPisGT(), SCIPisInfinity(), SCIPisRelEQ(), SCIPisZero(), SCIPreleaseCons(), SCIPtightenVarLb(), SCIPtightenVarUb(), SCIPvarGetLbLocal(), SCIPvarGetName(), SCIPvarGetUbLocal(), SCIPwarningMessage(), and TRUE.
Referenced by enforceConstraint(), and registerLargeRelaxValueVariableForBranching().
◆ propagateBoundsTightenVarLb()
|
static |
- Parameters
-
scip SCIP data structure cons constraint where we currently propagate, or NULL if tightening is from expression graph var variable which domain we might reduce bnd new lower bound for variable result result to update if there was a tightening or cutoff nchgbds counter to increase if a bound was tightened
Definition at line 6098 of file cons_nonlinear.c.
References FALSE, INTERVALINFTY, NULL, propagateBoundsTightenVarUb(), SCIP_Bool, SCIP_CALL, SCIP_CUTOFF, SCIP_DIDNOTFIND, SCIP_OKAY, SCIP_REDUCEDDOM, SCIPadjustedVarLb(), SCIPconsGetName(), SCIPdebugMsg, SCIPinProbing(), SCIPisInfinity(), SCIPresetConsAge(), SCIPtightenVarLb(), and SCIPvarGetName().
Referenced by propagateBoundsCons(), propagateConstraintSides(), and replaceViolatedByLinearConstraints().
◆ propagateBoundsTightenVarUb()
|
static |
- Parameters
-
scip SCIP data structure cons constraint where we currently propagate, or NULL if tightening is from expression graph var variable which domain we might reduce bnd new upper bound for variable result result to update if there was a tightening or cutoff nchgbds counter to increase if a bound was tightened
Definition at line 6159 of file cons_nonlinear.c.
References FALSE, INTERVALINFTY, NULL, propagateBoundsCons(), SCIP_Bool, SCIP_CALL, SCIP_CUTOFF, SCIP_DIDNOTFIND, SCIP_OKAY, SCIP_REDUCEDDOM, SCIPadjustedVarUb(), SCIPconsGetName(), SCIPdebugMsg, SCIPinProbing(), SCIPisInfinity(), SCIPresetConsAge(), SCIPtightenVarUb(), and SCIPvarGetName().
Referenced by propagateBoundsCons(), propagateBoundsTightenVarLb(), and propagateConstraintSides().
◆ propagateBoundsCons()
|
static |
tightens bounds of linear variables in a single nonlinear constraint
- Parameters
-
scip SCIP data structure conshdlr constraint handler cons constraint to process result pointer to store the result of the propagation call nchgbds buffer where to add the the number of changed bounds redundant buffer where to store whether constraint has been found to be redundant
Definition at line 6220 of file cons_nonlinear.c.
References consdataUpdateLinearActivity(), FALSE, infty2infty, INTERVALINFTY, MAX, NULL, propagateBoundsTightenVarLb(), propagateBoundsTightenVarUb(), propagateConstraintSides(), SCIP_CALL, SCIP_CUTOFF, SCIP_DIDNOTFIND, SCIP_DIDNOTRUN, SCIP_INVALID, SCIP_OKAY, SCIP_Real, SCIPconsGetData(), SCIPconsGetName(), SCIPconsIsMarkedPropagate(), SCIPdebugMsg, SCIPepsilon(), SCIPexprgraphGetNodeBounds(), SCIPfeastol(), SCIPinfinity(), SCIPintervalAdd(), SCIPintervalGetInf(), SCIPintervalGetRoundingMode(), SCIPintervalGetSup(), SCIPintervalIsEmpty(), SCIPintervalIsEntire(), SCIPintervalIsSubsetEQ(), SCIPintervalSet(), SCIPintervalSetBounds(), SCIPintervalSetRoundingMode(), SCIPintervalSetRoundingModeDownwards(), SCIPintervalSetRoundingModeUpwards(), SCIPintervalSub(), SCIPisEQ(), SCIPisGT(), SCIPisInfinity(), SCIPisLT(), SCIPunmarkConsPropagate(), SCIPvarGetLbLocal(), SCIPvarGetUbLocal(), and TRUE.
Referenced by propagateBounds(), and propagateBoundsTightenVarUb().
◆ propagateConstraintSides()
|
static |
propagate constraints sides minus linear activity into nonlinear variables
- Parameters
-
scip SCIP data structure conshdlr constraint handler conss constraints to process nconss number of constraints result pointer to store the result of the propagation calls nchgbds buffer where to add the number of changed bounds
Definition at line 6485 of file cons_nonlinear.c.
References BOUNDTIGHTENING_MINSTRENGTH, LinVarEventData::conshdlrdata, FALSE, SCIP_Interval::inf, INTERVALINFTY, NULL, propagateBounds(), propagateBoundsTightenVarLb(), propagateBoundsTightenVarUb(), SCIP_Bool, SCIP_CALL, SCIP_CUTOFF, SCIP_DIDNOTFIND, SCIP_OKAY, SCIPconsGetData(), SCIPconsGetName(), SCIPconshdlrGetData(), SCIPconsIsDeleted(), SCIPconsIsEnabled(), SCIPdebugMsg, SCIPexprgraphGetNodeBounds(), SCIPexprgraphGetNVars(), SCIPexprgraphGetVarNodes(), SCIPexprgraphGetVars(), SCIPexprgraphPrintDot(), SCIPexprgraphPropagateNodeBounds(), SCIPexprgraphTightenNodeBounds(), SCIPfeastol(), SCIPgetMessagehdlr(), SCIPinProbing(), SCIPintervalGetInf(), SCIPintervalGetRoundingMode(), SCIPintervalGetSup(), SCIPintervalNegateReal(), SCIPintervalSetRoundingMode(), SCIPintervalSetRoundingModeDownwards(), SCIPisInfinity(), and SCIP_Interval::sup.
Referenced by propagateBounds(), and propagateBoundsCons().
◆ propagateBounds()
|
static |
calls domain propagation for a set of constraints
- Parameters
-
scip SCIP data structure conshdlr constraint handler conss constraints to process nconss number of constraints needclear whether we may need to clear remainings from a previous backward propagation result pointer to store the result of the propagation calls nchgbds buffer where to add the the number of changed bounds ndelconss buffer where to increase if a constraint was deleted (locally) due to redundancy
Definition at line 6617 of file cons_nonlinear.c.
References consdataFindUnlockedLinearVar(), LinVarEventData::conshdlrdata, FALSE, INTERVALINFTY, NULL, propagateBoundsCons(), propagateConstraintSides(), SCIP_Bool, SCIP_CALL, SCIP_CUTOFF, SCIP_DIDNOTFIND, SCIP_DIDNOTRUN, SCIP_OKAY, SCIPconsGetData(), SCIPconsGetName(), SCIPconshdlrGetData(), SCIPconsIsActive(), SCIPconsIsDeleted(), SCIPconsIsEnabled(), SCIPdebugMsg, SCIPdelConsLocal(), SCIPexprgraphGetNodeBounds(), SCIPexprgraphPrintDot(), SCIPexprgraphPropagateVarBounds(), SCIPgetMessagehdlr(), SCIPintervalIsEmpty(), and TRUE.
Referenced by enforceConstraint(), propagateConstraintSides(), SCIP_DECL_CONSENFOPS(), SCIP_DECL_CONSPRESOL(), and SCIP_DECL_CONSPROP().
◆ consdataFindUnlockedLinearVar()
|
static |
- Parameters
-
scip SCIP data structure consdata constraint data
Definition at line 6740 of file cons_nonlinear.c.
References proposeFeasibleSolution(), SCIP_LOCKTYPE_MODEL, SCIPdebugMsg, SCIPisInfinity(), SCIPvarGetName(), SCIPvarGetNLocksDownType(), SCIPvarGetNLocksUpType(), and SCIPvarGetObj().
Referenced by propagateBounds(), SCIP_DECL_CONSCHECK(), SCIP_DECL_CONSINITSOL(), SCIPgetLinvarMayDecreaseNonlinear(), and SCIPgetLinvarMayIncreaseNonlinear().
◆ proposeFeasibleSolution()
|
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
-
scip SCIP data structure conshdlr constraint handler conss constraints to process nconss number of constraints sol solution to process success buffer to store whether we succeeded to construct a solution that satisfies all provided constraints
Definition at line 6805 of file cons_nonlinear.c.
References computeViolation(), LinVarEventData::conshdlrdata, enforceConstraint(), FALSE, MAX, MIN, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIP_STAGE_INITPRESOLVE, SCIP_STAGE_SOLVED, SCIPceil(), SCIPconsGetData(), SCIPconshdlrGetData(), SCIPcreateLPSol(), SCIPcreateSolCopy(), SCIPdebugMsg, SCIPfeastol(), SCIPfloor(), SCIPfreeSol(), SCIPgetSolTransObj(), SCIPgetSolVal(), SCIPgetStage(), SCIPgetUpperbound(), SCIPheurPassSolTrySol(), SCIPincSolVal(), SCIPisGT(), SCIPisInfinity(), SCIPisNegative(), SCIPisPositive(), SCIPisSumLT(), SCIPisZero(), SCIPunlinkSol(), SCIPvarGetLbGlobal(), SCIPvarGetName(), SCIPvarGetUbGlobal(), SCIPvarIsIntegral(), and TRUE.
Referenced by consdataFindUnlockedLinearVar(), and SCIP_DECL_CONSCHECK().
◆ enforceConstraint()
|
static |
helper function to enforce constraints
- Parameters
-
scip SCIP data structure conshdlr constraint handler conss constraints to process nconss number of constraints nusefulconss number of useful (non-obsolete) constraints to process sol solution to enforce (NULL for the LP solution) solinfeasible was the solution already declared infeasible by a constraint handler? result pointer to store the result of the enforcing call
Definition at line 6959 of file cons_nonlinear.c.
References computeViolations(), LinVarEventData::conshdlrdata, FALSE, NULL, propagateBounds(), registerBranchingVariables(), registerLargeRelaxValueVariableForBranching(), replaceViolatedByLinearConstraints(), SCIP_Bool, SCIP_BRANCHED, SCIP_CALL, SCIP_CONSADDED, SCIP_CUTOFF, SCIP_DECL_CONSHDLRCOPY(), SCIP_FEASIBLE, SCIP_INFEASIBLE, SCIP_OKAY, SCIP_Real, SCIP_REDUCEDDOM, SCIP_SEPARATED, SCIPconsGetData(), SCIPconsGetName(), SCIPconshdlrGetData(), SCIPconsIsActive(), SCIPcreateChild(), SCIPdebugMsg, SCIPfeastol(), SCIPgetCurrentNode(), SCIPgetSolVal(), SCIPisGT(), SCIPisInfinity(), SCIPisStopped(), SCIPlpfeastol(), SCIPnodeGetEstimate(), SCIPvarGetName(), SCIPwarningMessage(), separatePoint(), and TRUE.
Referenced by proposeFeasibleSolution(), SCIP_DECL_CONSENFOLP(), and SCIP_DECL_CONSENFORELAX().
◆ SCIP_DECL_CONSHDLRCOPY()
|
static |
copy method for constraint handler plugins (called when SCIP copies plugins)
Definition at line 7152 of file cons_nonlinear.c.
References NULL, SCIP_CALL, SCIP_DECL_CONSFREE(), SCIP_OKAY, SCIPincludeConshdlrNonlinear(), and TRUE.
Referenced by enforceConstraint().
◆ SCIP_DECL_CONSFREE()
|
static |
destructor of constraint handler to free constraint handler data (called when SCIP is exiting)
Definition at line 7168 of file cons_nonlinear.c.
References LinVarEventData::conshdlrdata, NULL, SCIP_CALL, SCIP_DECL_CONSINIT(), SCIP_OKAY, SCIPconshdlrGetData(), SCIPexprgraphFree(), SCIPexprgraphGetNVars(), SCIPexprintFree(), SCIPfreeBlockMemory, and SCIPfreeBlockMemoryArrayNull.
Referenced by SCIP_DECL_CONSHDLRCOPY().
◆ SCIP_DECL_CONSINIT()
|
static |
initialization method of constraint handler (called after problem was transformed)
Definition at line 7203 of file cons_nonlinear.c.
References LinVarEventData::conshdlrdata, NULL, SCIP_CALL, SCIP_DECL_CONSEXIT(), SCIP_OKAY, SCIPconshdlrGetData(), SCIPexprgraphPrintDot(), SCIPfindHeur(), and SCIPgetMessagehdlr().
Referenced by SCIP_DECL_CONSFREE().
◆ SCIP_DECL_CONSEXIT()
|
static |
deinitialization method of constraint handler (called before transformed problem is freed)
Definition at line 7236 of file cons_nonlinear.c.
References LinVarEventData::conshdlrdata, NULL, SCIP_DECL_CONSINITPRE(), SCIP_OKAY, and SCIPconshdlrGetData().
Referenced by SCIP_DECL_CONSINIT().
◆ SCIP_DECL_CONSINITPRE()
|
static |
presolving initialization method of constraint handler (called when presolving is about to begin)
Definition at line 7255 of file cons_nonlinear.c.
References consdataSetExprtrees(), FALSE, NULL, SCIP_CALL, SCIP_DECL_CONSEXITPRE(), SCIP_OKAY, SCIPconsGetData(), SCIPconsIsActive(), and SCIPmarkConsPropagate().
Referenced by SCIP_DECL_CONSEXIT().
◆ SCIP_DECL_CONSEXITPRE()
|
static |
presolving deinitialization method of constraint handler (called after presolving has been finished)
Definition at line 7287 of file cons_nonlinear.c.
References consdataSetExprtrees(), LinVarEventData::conshdlrdata, FALSE, mergeAndCleanLinearVars(), NULL, removeFixedLinearVariables(), removeFixedNonlinearVariables(), SCIP_Bool, SCIP_CALL, SCIP_DECL_CONSINITSOL(), SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPconsGetData(), SCIPconshdlrGetData(), SCIPconsIsActive(), SCIPconsIsAdded(), SCIPdebugMsg, SCIPenableNLP(), SCIPepsilon(), SCIPexprgraphGetSumTrees(), SCIPexprgraphGetSumTreesNSummands(), SCIPexprgraphSimplify(), SCIPexprtreeGetNVars(), SCIPexprtreeGetVars(), SCIPfreeBufferArray, SCIPgetMessagehdlr(), SCIPvarIsActive(), splitOffLinearPart(), and TRUE.
Referenced by SCIP_DECL_CONSINITPRE().
◆ SCIP_DECL_CONSINITSOL()
|
static |
solving process initialization method of constraint handler (called when branch and bound process is about to begin)
Definition at line 7400 of file cons_nonlinear.c.
References checkCurvature(), consdataFindUnlockedLinearVar(), CONSHDLR_NAME, LinVarEventData::conshdlrdata, createNlRow(), FALSE, MAX, MIN, NULL, REALABS, SCIP_CALL, SCIP_DECL_CONSEXITSOL(), SCIP_EVENTTYPE_SOLFOUND, SCIP_OKAY, SCIPaddNlRow(), SCIPcatchEvent(), SCIPconsGetData(), SCIPconshdlrGetData(), SCIPconsIsEnabled(), SCIPfindEventhdlr(), SCIPinfinity(), and SCIPisNLPConstructed().
Referenced by SCIP_DECL_CONSEXITPRE().
◆ SCIP_DECL_CONSEXITSOL()
|
static |
solving process deinitialization method of constraint handler (called before branch and bound process data is freed)
Definition at line 7468 of file cons_nonlinear.c.
References CONSHDLR_NAME, LinVarEventData::conshdlrdata, NULL, SCIP_CALL, SCIP_DECL_CONSDELETE(), SCIP_EVENTTYPE_SOLFOUND, SCIP_OKAY, SCIPconsGetData(), SCIPconshdlrGetData(), SCIPdropEvent(), SCIPfindEventhdlr(), and SCIPreleaseNlRow().
Referenced by SCIP_DECL_CONSINITSOL().
◆ SCIP_DECL_CONSDELETE()
|
static |
frees specific constraint data
Definition at line 7510 of file cons_nonlinear.c.
References consdataFree(), NULL, SCIP_CALL, SCIP_DECL_CONSTRANS(), SCIP_OKAY, SCIPconsGetData(), SCIPconsGetName(), SCIPconsIsActive(), and SCIPdebugMsg.
Referenced by SCIP_DECL_CONSEXITSOL().
◆ SCIP_DECL_CONSTRANS()
|
static |
transforms constraint data into data belonging to the transformed problem
Definition at line 7533 of file cons_nonlinear.c.
References BMScopyMemoryArray, consdataCreate(), FALSE, NULL, SCIP_CALL, SCIP_DECL_CONSINITLP(), SCIP_OKAY, SCIPcaptureVar(), SCIPconsGetData(), SCIPconsGetName(), SCIPconsIsChecked(), SCIPconsIsDynamic(), SCIPconsIsEnforced(), SCIPconsIsInitial(), SCIPconsIsLocal(), SCIPconsIsModifiable(), SCIPconsIsPropagated(), SCIPconsIsRemovable(), SCIPconsIsSeparated(), SCIPconsIsStickingAtNode(), SCIPcreateCons(), SCIPdebugMsg, SCIPdebugPrintCons, SCIPgetExprtreeTransformedVars(), SCIPgetTransformedVar(), and TRUE.
Referenced by SCIP_DECL_CONSDELETE().
◆ SCIP_DECL_CONSINITLP()
|
static |
LP initialization method of constraint handler (called before the initial LP relaxation at a node is solved)
Definition at line 7582 of file cons_nonlinear.c.
References checkCurvature(), LinVarEventData::conshdlrdata, FALSE, generateCut(), INITLPMAXVARVAL, MAX, MIN, NULL, SCIP_Bool, SCIP_CALL, SCIP_DECL_CONSSEPALP(), SCIP_EXPRCURV_CONCAVE, SCIP_EXPRCURV_CONVEX, SCIP_OKAY, SCIP_Real, SCIP_SIDETYPE_LEFT, SCIP_SIDETYPE_RIGHT, SCIPaddRow(), SCIPaddVarsToRow(), SCIPallocBufferArray, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconsGetName(), SCIPconshdlrGetData(), SCIPconsIsLocal(), SCIPcreateEmptyRowCons(), SCIPdebug, SCIPexprtreeGetNVars(), SCIPexprtreeGetVars(), SCIPfreeBufferArray, SCIPinfinity(), SCIPisInfinity(), SCIPprintRow(), SCIPreleaseRow(), SCIPvarGetLbGlobal(), SCIPvarGetUbGlobal(), TRUE, and x.
Referenced by SCIP_DECL_CONSTRANS().
◆ SCIP_DECL_CONSSEPALP()
|
static |
separation method of constraint handler for LP solutions
Definition at line 7711 of file cons_nonlinear.c.
References addLinearizationCuts(), checkCurvature(), computeViolations(), LinVarEventData::conshdlrdata, FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_CUTOFF, SCIP_DECL_CONSSEPASOL(), SCIP_DIDNOTFIND, SCIP_EXPRCURV_CONCAVE, SCIP_EXPRCURV_CONVEX, SCIP_LPSOLSTAT_OPTIMAL, SCIP_LPSOLSTAT_UNBOUNDEDRAY, SCIP_NLPSOLSTAT_FEASIBLE, SCIP_NLPSOLSTAT_GLOBINFEASIBLE, SCIP_NLPSOLSTAT_UNKNOWN, SCIP_OKAY, SCIP_SEPARATED, SCIPaddLinearConsToNlpHeurSubNlp(), SCIPconsGetData(), SCIPconshdlrGetData(), SCIPcreateNLPSol(), SCIPdebugMsg, SCIPfeastol(), SCIPfreeSol(), SCIPgetDepth(), SCIPgetLPSolstat(), SCIPgetNBinVars(), SCIPgetNContVars(), SCIPgetNIntVars(), SCIPgetNLPFracVars(), SCIPgetNLPSolstat(), SCIPgetNNlpis(), SCIPgetNVars(), SCIPgetSepaMinEfficacy(), SCIPheurPassSolTrySol(), SCIPisGT(), SCIPisNLPConstructed(), SCIPsetNLPInitialGuessSol(), SCIPsolveNLP(), separatePoint(), and TRUE.
Referenced by SCIP_DECL_CONSINITLP().
◆ SCIP_DECL_CONSSEPASOL()
|
static |
separation method of constraint handler for arbitrary primal solutions
Definition at line 7863 of file cons_nonlinear.c.
References computeViolations(), FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_DECL_CONSENFOLP(), SCIP_DIDNOTFIND, SCIP_OKAY, SCIPgetSepaMinEfficacy(), and separatePoint().
Referenced by SCIP_DECL_CONSSEPALP().
◆ SCIP_DECL_CONSENFOLP()
|
static |
constraint enforcing method of constraint handler for LP solutions
Definition at line 7896 of file cons_nonlinear.c.
References enforceConstraint(), NULL, SCIP_CALL, SCIP_DECL_CONSENFORELAX(), and SCIP_OKAY.
Referenced by SCIP_DECL_CONSSEPASOL().
◆ SCIP_DECL_CONSENFORELAX()
|
static |
constraint enforcing method of constraint handler for relaxation solutions
Definition at line 7905 of file cons_nonlinear.c.
References enforceConstraint(), SCIP_CALL, SCIP_DECL_CONSENFOPS(), and SCIP_OKAY.
Referenced by SCIP_DECL_CONSENFOLP().
◆ SCIP_DECL_CONSENFOPS()
|
static |
constraint enforcing method of constraint handler for pseudo solutions
Definition at line 7914 of file cons_nonlinear.c.
References computeViolations(), MAX, NULL, propagateBounds(), SCIP_Bool, SCIP_CALL, SCIP_CUTOFF, SCIP_DECL_CONSCHECK(), SCIP_FEASIBLE, SCIP_INFEASIBLE, SCIP_INVALID, SCIP_OKAY, SCIP_REDUCEDDOM, SCIP_SOLVELP, SCIPaddExternBranchCand(), SCIPconsGetData(), SCIPconsGetName(), SCIPconsIsActive(), SCIPdebugMsg, SCIPexprtreeGetNVars(), SCIPexprtreeGetVars(), SCIPfeastol(), SCIPisGT(), SCIPisRelEQ(), SCIPvarGetLbLocal(), SCIPvarGetUbLocal(), and TRUE.
Referenced by SCIP_DECL_CONSENFORELAX().
◆ SCIP_DECL_CONSCHECK()
|
static |
feasibility check method of constraint handler for integral solutions
Definition at line 8006 of file cons_nonlinear.c.
References computeViolation(), consdataFindUnlockedLinearVar(), LinVarEventData::conshdlrdata, FALSE, MAX, NULL, proposeFeasibleSolution(), REALABS, SCIP_Bool, SCIP_CALL, SCIP_DECL_CONSPROP(), SCIP_FEASIBLE, SCIP_INFEASIBLE, SCIP_OKAY, SCIP_Real, SCIP_STAGE_EXITPRESOLVE, SCIP_STAGE_INITPRESOLVE, SCIP_STAGE_SOLVING, SCIP_STAGE_TRANSFORMED, SCIPallocBufferArray, SCIPconsGetData(), SCIPconshdlrGetData(), SCIPexprgraphEval(), SCIPexprgraphGetNVars(), SCIPexprgraphGetVars(), SCIPfeastol(), SCIPfreeBufferArray, SCIPgetSolVals(), SCIPgetStage(), SCIPinfoMessage(), SCIPisGT(), SCIPisInfinity(), SCIPprintCons(), and SCIPupdateStartpointHeurSubNlp().
Referenced by SCIP_DECL_CONSENFOPS().
◆ SCIP_DECL_CONSPROP()
|
static |
domain propagation method of constraint handler
Definition at line 8135 of file cons_nonlinear.c.
References NULL, propagateBounds(), SCIP_CALL, SCIP_DECL_CONSPRESOL(), SCIP_OKAY, and TRUE.
Referenced by SCIP_DECL_CONSCHECK().
◆ SCIP_DECL_CONSPRESOL()
|
static |
presolving method of constraint handler
Definition at line 8152 of file cons_nonlinear.c.
References LinVarEventData::conshdlrdata, FALSE, INTERVALINFTY, NULL, presolveUpgrade(), propagateBounds(), reformulate(), removeFixedLinearVariables(), removeFixedNonlinearVariables(), SCIP_Bool, SCIP_CALL, SCIP_CUTOFF, SCIP_DECL_CONSLOCK(), SCIP_DIDNOTFIND, SCIP_DIDNOTRUN, SCIP_OKAY, SCIP_PRESOLTIMING_EXHAUSTIVE, SCIP_PRESOLTIMING_FAST, SCIP_REDUCEDDOM, SCIP_SUCCESS, SCIPconsGetData(), SCIPconsGetName(), SCIPconshdlrGetData(), SCIPconsIsActive(), SCIPdebugMsg, SCIPdebugPrintCons, SCIPdelCons(), SCIPepsilon(), SCIPexprgraphPropagateVarBounds(), SCIPexprgraphSimplify(), SCIPgetMessagehdlr(), SCIPisFeasNegative(), SCIPisFeasPositive(), SCIPisInfinity(), SCIPisPresolveFinished(), splitOffLinearPart(), and TRUE.
Referenced by SCIP_DECL_CONSPROP().
◆ SCIP_DECL_CONSLOCK()
|
static |
variable rounding lock method of constraint handler
Definition at line 8369 of file cons_nonlinear.c.
References NULL, SCIP_Bool, SCIP_CALL, SCIP_DECL_CONSACTIVE(), SCIP_LOCKTYPE_MODEL, SCIP_OKAY, SCIPaddVarLocksType(), SCIPconsGetData(), SCIPconsIsActive(), SCIPconsIsDeleted(), and SCIPisInfinity().
Referenced by SCIP_DECL_CONSPRESOL().
◆ SCIP_DECL_CONSACTIVE()
|
static |
constraint activation notification method of constraint handler
Definition at line 8422 of file cons_nonlinear.c.
References consdataSetExprtrees(), LinVarEventData::conshdlrdata, FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_DECL_CONSDEACTIVE(), SCIP_OKAY, SCIP_STAGE_EXITPRESOLVE, SCIP_STAGE_INITPRESOLVE, SCIPconsGetData(), SCIPconsGetName(), SCIPconshdlrGetData(), SCIPconsIsTransformed(), SCIPdebugMsg, SCIPexprgraphAddExprtreeSum(), SCIPgetStage(), and TRUE.
Referenced by SCIP_DECL_CONSLOCK().
◆ SCIP_DECL_CONSDEACTIVE()
|
static |
constraint deactivation notification method of constraint handler
Definition at line 8482 of file cons_nonlinear.c.
References consdataSetExprtrees(), LinVarEventData::conshdlrdata, FALSE, NULL, SCIP_CALL, SCIP_DECL_CONSENABLE(), SCIP_OKAY, SCIP_STAGE_EXITPRESOLVE, SCIP_STAGE_FREETRANS, SCIP_STAGE_PRESOLVING, SCIPconsGetData(), SCIPconsGetName(), SCIPconshdlrGetData(), SCIPconsIsTransformed(), SCIPdebugMsg, SCIPexprgraphGetTree(), SCIPexprgraphReleaseNode(), and SCIPgetStage().
Referenced by SCIP_DECL_CONSACTIVE().
◆ SCIP_DECL_CONSENABLE()
|
static |
constraint enabling notification method of constraint handler
Definition at line 8525 of file cons_nonlinear.c.
References catchLinearVarEvents(), LinVarEventData::conshdlrdata, NULL, SCIP_CALL, SCIP_DECL_CONSDISABLE(), SCIP_OKAY, SCIPconsGetData(), SCIPconsGetName(), SCIPconshdlrGetData(), SCIPconsIsActive(), SCIPconsIsTransformed(), SCIPdebugMsg, SCIPexprgraphEnableNode(), SCIPvarIsActive(), and TRUE.
Referenced by SCIP_DECL_CONSDEACTIVE().
◆ SCIP_DECL_CONSDISABLE()
|
static |
constraint disabling notification method of constraint handler
Definition at line 8566 of file cons_nonlinear.c.
References LinVarEventData::conshdlrdata, dropLinearVarEvents(), NULL, SCIP_CALL, SCIP_DECL_CONSPRINT(), SCIP_OKAY, SCIPconsGetData(), SCIPconsGetName(), SCIPconshdlrGetData(), SCIPconsIsTransformed(), SCIPdebugMsg, and SCIPexprgraphDisableNode().
Referenced by SCIP_DECL_CONSENABLE().
◆ SCIP_DECL_CONSPRINT()
|
static |
constraint display method of constraint handler
Definition at line 8604 of file cons_nonlinear.c.
References LinVarEventData::conshdlrdata, NULL, SCIP_CALL, SCIP_DECL_CONSCOPY(), SCIP_OKAY, SCIP_VARTYPE_BINARY, SCIP_VARTYPE_IMPLINT, SCIP_VARTYPE_INTEGER, SCIPconsGetData(), SCIPconshdlrGetData(), SCIPexprgraphGetTree(), SCIPexprtreeFree(), SCIPexprtreePrintWithNames(), SCIPgetMessagehdlr(), SCIPinfoMessage(), SCIPisEQ(), SCIPisInfinity(), SCIPvarGetName(), and SCIPvarGetType().
Referenced by SCIP_DECL_CONSDISABLE().
◆ SCIP_DECL_CONSCOPY()
|
static |
constraint copying method of constraint handler
Definition at line 8683 of file cons_nonlinear.c.
References BMSclearMemoryArray, LinVarEventData::conshdlrdata, NULL, SCIP_CALL, SCIP_DECL_CONSGETVARS(), SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPblkmem(), SCIPconsGetData(), SCIPconsGetName(), SCIPconshdlrGetData(), SCIPcreateConsNonlinear(), SCIPexprgraphGetTree(), SCIPexprtreeCopy(), SCIPexprtreeFree(), SCIPexprtreeGetNVars(), SCIPexprtreeGetVars(), SCIPexprtreeSetVars(), SCIPfreeBufferArray, SCIPfreeBufferArrayNull, SCIPgetVarCopy(), SCIPreallocBufferArray, and TRUE.
Referenced by SCIP_DECL_CONSPRINT().
◆ SCIP_DECL_CONSGETVARS()
|
static |
constraint method of constraint handler which returns the variables (if possible)
Definition at line 8807 of file cons_nonlinear.c.
References BMScopyMemoryArray, LinVarEventData::conshdlrdata, FALSE, NULL, SCIP_CALL, SCIP_DECL_CONSGETNVARS(), SCIP_OKAY, SCIPallocBufferArray, SCIPconsGetData(), SCIPconshdlrGetData(), SCIPexprgraphGetNVars(), SCIPexprgraphGetSubtreeVarsUsage(), SCIPexprgraphGetVars(), SCIPexprtreeGetNVars(), SCIPexprtreeGetVars(), SCIPfreeBufferArray, and TRUE.
Referenced by SCIP_DECL_CONSCOPY().
◆ SCIP_DECL_CONSGETNVARS()
|
static |
constraint method of constraint handler which returns the number of variables (if possible)
Definition at line 8886 of file cons_nonlinear.c.
References LinVarEventData::conshdlrdata, NULL, SCIP_CALL, SCIP_DECL_CONSPARSE(), SCIP_OKAY, SCIPallocBufferArray, SCIPconsGetData(), SCIPconshdlrGetData(), SCIPexprgraphGetNVars(), SCIPexprgraphGetSubtreeVarsUsage(), SCIPexprtreeGetNVars(), SCIPfreeBufferArray, and TRUE.
Referenced by SCIP_DECL_CONSGETVARS().
◆ SCIP_DECL_CONSPARSE()
|
static |
constraint parsing method of constraint handler
Definition at line 8929 of file cons_nonlinear.c.
References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIP_READERROR, SCIP_Real, SCIPallocBufferArray, SCIPblkmem(), SCIPcreateConsNonlinear(), SCIPdebugMsg, SCIPdebugPrintCons, SCIPerrorMessage, SCIPexprParse(), SCIPexprtreeCreate(), SCIPexprtreeFree(), SCIPexprtreeSetVars(), SCIPfindVar(), SCIPfreeBufferArray, SCIPgetMessagehdlr(), SCIPincludeConshdlrNonlinear(), SCIPinfinity(), SCIPisInfinity(), SCIPstrToRealValue(), and TRUE.
Referenced by SCIP_DECL_CONSGETNVARS().