Detailed Description
Constraint handler for absolute power constraints \(\textrm{lhs} \leq \textrm{sign}(x+a) |x+a|^n + c z \leq \textrm{rhs}\).
Definition in file cons_abspower.c.
#include <ctype.h>
#include "nlpi/pub_expr.h"
#include "nlpi/type_expr.h"
#include "nlpi/type_nlpi.h"
#include "scip/cons_abspower.h"
#include "scip/cons_indicator.h"
#include "scip/cons_linear.h"
#include "scip/cons_nonlinear.h"
#include "scip/cons_quadratic.h"
#include "scip/cons_varbound.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_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_conflict.h"
#include "scip/scip_cons.h"
#include "scip/scip_copy.h"
#include "scip/scip_cut.h"
#include "scip/scip_event.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_tree.h"
#include "scip/scip_var.h"
#include <string.h>
Go to the source code of this file.
Macros | |
#define | SCIP_PRIVATE_ROWPREP |
#define | CONSHDLR_NAME "abspower" |
#define | CONSHDLR_DESC "constraint handler for absolute power constraints lhs <= sign(x+offset)abs(x+offset)^n + c*z <= rhs" |
#define | CONSHDLR_SEPAPRIORITY 0 |
#define | CONSHDLR_ENFOPRIORITY -30 |
#define | CONSHDLR_CHECKPRIORITY -3500000 |
#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_PRESOLTIMING SCIP_PRESOLTIMING_FAST | SCIP_PRESOLTIMING_MEDIUM |
#define | CONSHDLR_PROP_TIMING SCIP_PROPTIMING_ALWAYS |
#define | QUADCONSUPGD_PRIORITY 50000 |
#define | NONLINCONSUPGD_PRIORITY 50000 |
#define | PROPVARTOL SCIPepsilon(scip) |
#define | PROPSIDETOL SCIPepsilon(scip) |
#define | INITLPMAXVARVAL 1000.0 |
#define | DECL_MYPOW(x) SCIP_Real x (SCIP_Real base, SCIP_Real exponent) |
#define | SIGN(x) ((x) >= 0.0 ? 1.0 : -1.0) |
#define | ROOTS_KNOWN 10 |
Typedefs | |
typedef enum Proprule | PROPRULE |
Enumerations | |
enum | Proprule { PROPRULE_1, PROPRULE_2, PROPRULE_3, PROPRULE_4, PROPRULE_INVALID, PROPRULE_INVALID = 0, PROPRULE_1 = 1, PROPRULE_2 = 2, PROPRULE_3 = 3, PROPRULE_4 = 4, PROPRULE_1_CORETIMES = 1, PROPRULE_2_EDGEFINDING = 2, PROPRULE_3_TTEF = 3, PROPRULE_1_RHS = 1, PROPRULE_1_LHS = 2, PROPRULE_1_RANGEDROW = 3, PROPRULE_INVALID = 0, PROPRULE_1 = 0, PROPRULE_2 = 1, PROPRULE_3 = 2, PROPRULE_4 = 3, PROPRULE_INVALID = 4, PROPRULE_1, PROPRULE_2, PROPRULE_3, PROPRULE_4, PROPRULE_0, PROPRULE_1, PROPRULE_INTLB, PROPRULE_INTUB, PROPRULE_INVALID } |
Functions | |
static void | computeBoundsX (SCIP *scip, SCIP_CONS *cons, SCIP_INTERVAL zbnds, SCIP_INTERVAL *xbnds) |
static | DECL_MYPOW (square) |
static | SCIP_DECL_EVENTEXEC (processVarEvent) |
static SCIP_RETCODE | catchVarEvents (SCIP *scip, SCIP_EVENTHDLR *eventhdlr, SCIP_CONS *cons) |
static SCIP_RETCODE | dropVarEvents (SCIP *scip, SCIP_EVENTHDLR *eventhdlr, SCIP_CONS *cons) |
static | SCIP_DECL_HASHGETKEY (presolveFindDuplicatesGetKey) |
static | SCIP_DECL_HASHKEYEQ (presolveFindDuplicatesKeyEQ) |
static | SCIP_DECL_HASHKEYVAL (presolveFindDuplicatesKeyVal) |
static | SCIP_DECL_HASHKEYEQ (presolveFindDuplicatesKeyEQ2) |
static | SCIP_DECL_HASHKEYVAL (presolveFindDuplicatesKeyVal2) |
static SCIP_RETCODE | presolveFindDuplicatesUpgradeCons (SCIP *scip, SCIP_CONS *cons1, SCIP_CONS *cons2, SCIP_Bool *infeas, int *nupgdconss, int *ndelconss, int *naggrvars) |
static void | presolveFindDuplicatesSolveEquations (SCIP *scip, SCIP_Bool *infeas, SCIP_Real *xval, SCIP_Real *zval, SCIP_Real exponent, SCIP_Real xoffset1, SCIP_Real zcoef1, SCIP_Real rhs1, SCIP_Real xoffset2, SCIP_Real zcoef2, SCIP_Real rhs2) |
static SCIP_RETCODE | presolveFindDuplicates (SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS **conss, int nconss, int *nupgdconss, int *ndelconss, int *naddconss, int *nfixedvars, int *naggrvars, SCIP_Bool *success, SCIP_Bool *infeas) |
static SCIP_RETCODE | presolveDual (SCIP *scip, SCIP_CONS *cons, SCIP_Bool *cutoff, int *ndelconss, int *nfixedvars) |
static SCIP_RETCODE | tightenBounds (SCIP *scip, SCIP_VAR *var, SCIP_INTERVAL bounds, SCIP_Bool force, SCIP_CONS *cons, SCIP_RESULT *result, int *nchgbds, int *nfixedvars, int *naddconss) |
static void | computeBoundsZ (SCIP *scip, SCIP_CONS *cons, SCIP_INTERVAL xbnds, SCIP_INTERVAL *zbnds) |
static SCIP_RETCODE | checkFixedVariables (SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS *cons, int *ndelconss, int *nupgdconss, int *nchgbds, int *nfixedvars, SCIP_RESULT *result) |
static SCIP_RETCODE | computeViolation (SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS *cons, SCIP_SOL *sol, SCIP_Real *viol, SCIP_Bool *solviolbounds) |
static SCIP_RETCODE | computeViolations (SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS **conss, int nconss, SCIP_SOL *sol, SCIP_Bool *solviolbounds, SCIP_CONS **maxviolcon) |
static SCIP_Real | proposeBranchingPoint (SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol, int preferzero, SCIP_Bool branchminconverror) |
static SCIP_RETCODE | registerBranchingCandidates (SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS **conss, int nconss, SCIP_SOL *sol, int *nnotify) |
static SCIP_RETCODE | registerLargeRelaxValueVariableForBranching (SCIP *scip, SCIP_CONS **conss, int nconss, SCIP_SOL *sol, SCIP_VAR **brvar) |
static SCIP_RETCODE | fixAlmostFixedX (SCIP *scip, SCIP_CONS **conss, int nconss, SCIP_Bool *infeasible, SCIP_Bool *reduceddom) |
static SCIP_RETCODE | resolvePropagation (SCIP *scip, SCIP_CONS *cons, SCIP_VAR *infervar, PROPRULE proprule, SCIP_BOUNDTYPE boundtype, SCIP_BDCHGIDX *bdchgidx) |
static SCIP_RETCODE | analyzeConflict (SCIP *scip, SCIP_CONS *cons, SCIP_VAR *infervar, PROPRULE proprule, SCIP_BOUNDTYPE boundtype) |
static SCIP_RETCODE | propagateCons (SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS *cons, SCIP_Bool canaddcons, SCIP_Bool *cutoff, int *nchgbds, int *naddconss) |
static SCIP_RETCODE | addVarbound (SCIP *scip, SCIP_CONS *cons, SCIP_Bool addcons, SCIP_VAR *var, SCIP_VAR *vbdvar, SCIP_Real vbdcoef, SCIP_Real lhs, SCIP_Real rhs, SCIP_Bool *infeas, int *nbdchgs, int *naddconss) |
static SCIP_RETCODE | propagateVarbounds (SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS *cons, SCIP_Bool *infeas, int *nbdchgs, int *naddconss) |
static SCIP_RETCODE | generateLinearizationCut (SCIP *scip, SCIP_ROWPREP **rowprep, SCIP_CONSHDLR *conshdlr, SCIP_Real refpoint, SCIP_Real exponent, SCIP_Real xoffset, SCIP_Real xmult, SCIP_Real zcoef, SCIP_Real rhs, SCIP_VAR *x, SCIP_VAR *z, SCIP_Bool islocal) |
static SCIP_RETCODE | generateLinearizationCutProject (SCIP *scip, SCIP_ROWPREP **rowprep, SCIP_CONSHDLR *conshdlr, SCIP_Real xref, SCIP_Real zref, SCIP_Real xmin, SCIP_Real exponent, SCIP_Real xoffset, SCIP_Real xmult, SCIP_Real zcoef, SCIP_Real rhs, SCIP_VAR *x, SCIP_VAR *z, SCIP_Bool islocal) |
static SCIP_RETCODE | generateSecantCut (SCIP *scip, SCIP_ROWPREP **rowprep, SCIP_CONSHDLR *conshdlr, SCIP_SOL *sol, SCIP_Real xlb, SCIP_Real xub, SCIP_Real exponent, SCIP_Real xoffset, DECL_MYPOW((*mypow)), SCIP_Real xmult, SCIP_Real zcoef, SCIP_Real rhs, SCIP_VAR *x, SCIP_VAR *z) |
static SCIP_RETCODE | generateSecantCutNoCheck (SCIP *scip, SCIP_ROWPREP **rowprep, SCIP_Real xlb, SCIP_Real xub, SCIP_Real exponent, SCIP_Real xoffset, DECL_MYPOW((*mypow)), SCIP_Real xmult, SCIP_Real zcoef, SCIP_Real rhs, SCIP_VAR *x, SCIP_VAR *z) |
static SCIP_RETCODE | generateCut (SCIP *scip, SCIP_CONS *cons, SCIP_SIDETYPE violside, SCIP_SOL *sol, SCIP_ROW **row, SCIP_Bool onlyinbounds, SCIP_Real minviol) |
static SCIP_RETCODE | separatePoint (SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS **conss, int nconss, int nusefulconss, SCIP_SOL *sol, SCIP_Real minefficacy, SCIP_Bool inenforcement, SCIP_Bool onlyinbounds, SCIP_Bool *success, SCIP_Bool *cutoff, SCIP_Real *bestefficacy) |
static SCIP_RETCODE | addLinearizationCuts (SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS **conss, int nconss, SCIP_SOL *ref, SCIP_Bool *separatedlpsol, SCIP_Real minefficacy) |
static | SCIP_DECL_EVENTEXEC (processNewSolutionEvent) |
static SCIP_RETCODE | proposeFeasibleSolution (SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS **conss, int nconss, SCIP_SOL *sol) |
static SCIP_RETCODE | createNlRow (SCIP *scip, SCIP_CONS *cons) |
static | SCIP_DECL_QUADCONSUPGD (quadconsUpgdAbspower) |
static | SCIP_DECL_NONLINCONSUPGD (nonlinconsUpgdAbspower) |
static | SCIP_DECL_EXPRGRAPHNODEREFORM (exprgraphnodeReformAbspower) |
static SCIP_RETCODE | enforceConstraint (SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS **conss, int nconss, int nusefulconss, SCIP_SOL *sol, SCIP_Bool solinfeasible, SCIP_RESULT *result) |
static | SCIP_DECL_CONSHDLRCOPY (conshdlrCopyAbspower) |
static | SCIP_DECL_CONSFREE (consFreeAbspower) |
static | SCIP_DECL_CONSINIT (consInitAbspower) |
static | SCIP_DECL_CONSEXIT (consExitAbspower) |
static | SCIP_DECL_CONSINITPRE (consInitpreAbspower) |
static | SCIP_DECL_CONSEXITPRE (consExitpreAbspower) |
static | SCIP_DECL_CONSINITSOL (consInitsolAbspower) |
static | SCIP_DECL_CONSEXITSOL (consExitsolAbspower) |
static | SCIP_DECL_CONSDELETE (consDeleteAbspower) |
static | SCIP_DECL_CONSTRANS (consTransAbspower) |
static | SCIP_DECL_CONSINITLP (consInitlpAbspower) |
static | SCIP_DECL_CONSSEPALP (consSepalpAbspower) |
static | SCIP_DECL_CONSSEPASOL (consSepasolAbspower) |
static | SCIP_DECL_CONSENFOLP (consEnfolpAbspower) |
static | SCIP_DECL_CONSENFORELAX (consEnforelaxAbspower) |
static | SCIP_DECL_CONSENFOPS (consEnfopsAbspower) |
static | SCIP_DECL_CONSPROP (consPropAbspower) |
static | SCIP_DECL_CONSPRESOL (consPresolAbspower) |
static | SCIP_DECL_CONSRESPROP (consRespropAbspower) |
static | SCIP_DECL_CONSLOCK (consLockAbspower) |
static | SCIP_DECL_CONSACTIVE (consActiveAbspower) |
static | SCIP_DECL_CONSENABLE (consEnableAbspower) |
static | SCIP_DECL_CONSDISABLE (consDisableAbspower) |
static | SCIP_DECL_CONSPRINT (consPrintAbspower) |
static | SCIP_DECL_CONSCHECK (consCheckAbspower) |
static | SCIP_DECL_CONSCOPY (consCopyAbspower) |
static | SCIP_DECL_CONSPARSE (consParseAbspower) |
static | SCIP_DECL_CONSGETVARS (consGetVarsAbspower) |
static | SCIP_DECL_CONSGETNVARS (consGetNVarsAbspower) |
SCIP_RETCODE | SCIPincludeConshdlrAbspower (SCIP *scip) |
SCIP_RETCODE | SCIPcreateConsAbspower (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_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_Bool stickingatnode) |
SCIP_RETCODE | SCIPcreateConsBasicAbspower (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_RETCODE | SCIPgetNlRowAbspower (SCIP *scip, SCIP_CONS *cons, SCIP_NLROW **nlrow) |
SCIP_VAR * | SCIPgetNonlinearVarAbspower (SCIP *scip, SCIP_CONS *cons) |
SCIP_VAR * | SCIPgetLinearVarAbspower (SCIP *scip, SCIP_CONS *cons) |
SCIP_Real | SCIPgetExponentAbspower (SCIP *scip, SCIP_CONS *cons) |
SCIP_Real | SCIPgetOffsetAbspower (SCIP *scip, SCIP_CONS *cons) |
SCIP_Real | SCIPgetCoefLinearAbspower (SCIP *scip, SCIP_CONS *cons) |
SCIP_Real | SCIPgetLhsAbspower (SCIP *scip, SCIP_CONS *cons) |
SCIP_Real | SCIPgetRhsAbspower (SCIP *scip, SCIP_CONS *cons) |
SCIP_Real | SCIPgetViolationAbspower (SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol) |
SCIP_Bool | SCIPisConvexAbspower (SCIP *scip, SCIP_CONS *cons) |
Variables | |
static SCIP_Real | roots [ROOTS_KNOWN+1] |
Macro Definition Documentation
◆ SCIP_PRIVATE_ROWPREP
#define SCIP_PRIVATE_ROWPREP |
Definition at line 24 of file cons_abspower.c.
◆ CONSHDLR_NAME
#define CONSHDLR_NAME "abspower" |
Definition at line 73 of file cons_abspower.c.
Referenced by SCIP_DECL_CONSEXITSOL(), SCIP_DECL_CONSHDLRCOPY(), SCIP_DECL_CONSINITSOL(), SCIPcreateConsAbspower(), SCIPgetCoefLinearAbspower(), SCIPgetExponentAbspower(), SCIPgetLhsAbspower(), SCIPgetLinearVarAbspower(), SCIPgetNlRowAbspower(), SCIPgetNonlinearVarAbspower(), SCIPgetOffsetAbspower(), SCIPgetRhsAbspower(), SCIPgetViolationAbspower(), SCIPincludeConshdlrAbspower(), and SCIPisConvexAbspower().
◆ CONSHDLR_DESC
#define CONSHDLR_DESC "constraint handler for absolute power constraints lhs <= sign(x+offset)abs(x+offset)^n + c*z <= rhs" |
Definition at line 74 of file cons_abspower.c.
Referenced by SCIPincludeConshdlrAbspower().
◆ CONSHDLR_SEPAPRIORITY
#define CONSHDLR_SEPAPRIORITY 0 |
priority of the constraint handler for separation
Definition at line 75 of file cons_abspower.c.
Referenced by SCIPincludeConshdlrAbspower().
◆ CONSHDLR_ENFOPRIORITY
#define CONSHDLR_ENFOPRIORITY -30 |
priority of the constraint handler for constraint enforcing
Definition at line 76 of file cons_abspower.c.
Referenced by SCIPincludeConshdlrAbspower().
◆ CONSHDLR_CHECKPRIORITY
#define CONSHDLR_CHECKPRIORITY -3500000 |
priority of the constraint handler for checking feasibility
Definition at line 77 of file cons_abspower.c.
Referenced by SCIPincludeConshdlrAbspower().
◆ CONSHDLR_SEPAFREQ
#define CONSHDLR_SEPAFREQ 1 |
frequency for separating cuts; zero means to separate only in the root node
Definition at line 78 of file cons_abspower.c.
Referenced by SCIPincludeConshdlrAbspower().
◆ CONSHDLR_PROPFREQ
#define CONSHDLR_PROPFREQ 1 |
frequency for propagating domains; zero means only preprocessing propagation
Definition at line 79 of file cons_abspower.c.
Referenced by SCIPincludeConshdlrAbspower().
◆ 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 80 of file cons_abspower.c.
Referenced by SCIPincludeConshdlrAbspower().
◆ CONSHDLR_MAXPREROUNDS
#define CONSHDLR_MAXPREROUNDS -1 |
maximal number of presolving rounds the constraint handler participates in (-1: no limit)
Definition at line 83 of file cons_abspower.c.
Referenced by SCIPincludeConshdlrAbspower().
◆ CONSHDLR_DELAYSEPA
#define CONSHDLR_DELAYSEPA FALSE |
should separation method be delayed, if other separators found cuts?
Definition at line 84 of file cons_abspower.c.
Referenced by SCIPincludeConshdlrAbspower().
◆ CONSHDLR_DELAYPROP
#define CONSHDLR_DELAYPROP FALSE |
should propagation method be delayed, if other propagators found reductions?
Definition at line 85 of file cons_abspower.c.
Referenced by SCIPincludeConshdlrAbspower().
◆ CONSHDLR_NEEDSCONS
#define CONSHDLR_NEEDSCONS TRUE |
should the constraint handler be skipped, if no constraints are available?
Definition at line 86 of file cons_abspower.c.
Referenced by SCIPincludeConshdlrAbspower().
◆ CONSHDLR_PRESOLTIMING
#define CONSHDLR_PRESOLTIMING SCIP_PRESOLTIMING_FAST | SCIP_PRESOLTIMING_MEDIUM |
Definition at line 88 of file cons_abspower.c.
Referenced by SCIPincludeConshdlrAbspower().
◆ CONSHDLR_PROP_TIMING
#define CONSHDLR_PROP_TIMING SCIP_PROPTIMING_ALWAYS |
when should the constraint handlers propagation routines be called?
Definition at line 89 of file cons_abspower.c.
Referenced by SCIPincludeConshdlrAbspower().
◆ QUADCONSUPGD_PRIORITY
#define QUADCONSUPGD_PRIORITY 50000 |
priority of the constraint handler for upgrading of quadratic constraints
Definition at line 91 of file cons_abspower.c.
Referenced by SCIPincludeConshdlrAbspower().
◆ NONLINCONSUPGD_PRIORITY
#define NONLINCONSUPGD_PRIORITY 50000 |
priority of the constraint handler for upgrading of nonlinear constraints and reformulating expression graph nodes
Definition at line 92 of file cons_abspower.c.
Referenced by SCIPincludeConshdlrAbspower().
◆ PROPVARTOL
#define PROPVARTOL SCIPepsilon(scip) |
tolerance to add to variable bounds in domain propagation
Definition at line 98 of file cons_abspower.c.
Referenced by computeBoundsX(), computeBoundsZ(), and propagateCons().
◆ PROPSIDETOL
#define PROPSIDETOL SCIPepsilon(scip) |
tolerance to add to constraint sides in domain propagation
Definition at line 99 of file cons_abspower.c.
Referenced by computeBoundsX(), computeBoundsZ(), and propagateCons().
◆ INITLPMAXVARVAL
#define INITLPMAXVARVAL 1000.0 |
maximal absolute value of variable for still generating a linearization cut at that point in initlp
Definition at line 100 of file cons_abspower.c.
Referenced by SCIP_DECL_CONSINITLP().
◆ DECL_MYPOW
power function type to be used by a constraint instead of the general pow
Definition at line 103 of file cons_abspower.c.
◆ SIGN
sign of a value (-1 or +1)
0.0 has sign +1
Definition at line 109 of file cons_abspower.c.
Referenced by checkFixedVariables(), computeBoundsX(), computeBoundsZ(), computeViolation(), generateSecantCut(), generateSecantCutNoCheck(), presolveDual(), presolveFindDuplicates(), propagateCons(), propagateVarbounds(), proposeFeasibleSolution(), SCIP_DECL_CONSPRESOL(), SCIP_DECL_EXPRGRAPHNODEREFORM(), and SCIPgetViolationAbspower().
◆ ROOTS_KNOWN
#define ROOTS_KNOWN 10 |
up to which (integer) exponents precomputed roots have been stored
Definition at line 116 of file cons_abspower.c.
Referenced by SCIP_DECL_CONSINITSOL().
Typedef Documentation
◆ PROPRULE
Definition at line 199 of file cons_abspower.c.
Enumeration Type Documentation
◆ Proprule
enum Proprule |
Definition at line 191 of file cons_abspower.c.
Function Documentation
◆ computeBoundsX()
|
static |
computes bounds on x in a absolute power constraints for given bounds on z
- Parameters
-
scip SCIP data structure cons constraint zbnds bounds on x that are to be propagated xbnds buffer to store corresponding bounds on z
Definition at line 1642 of file cons_abspower.c.
References checkFixedVariables(), SCIP_Interval::inf, NULL, pow(), PROPSIDETOL, PROPVARTOL, REALABS, SCIP_Real, SCIPconsGetData(), SCIPdebugMsg, SCIPdebugPrintCons, SCIPinfinity(), SCIPintervalIsEmpty(), SCIPintervalSetEntire(), SCIPisInfinity(), SIGN, sqrt(), and SCIP_Interval::sup.
Referenced by checkFixedVariables(), computeBoundsZ(), presolveDual(), and propagateCons().
◆ DECL_MYPOW()
|
static |
power function for square, that should be faster than using pow(x, 2.0)
Definition at line 216 of file cons_abspower.c.
References SCIP_DECL_EVENTEXEC().
◆ SCIP_DECL_EVENTEXEC() [1/2]
|
static |
process variable event
Definition at line 224 of file cons_abspower.c.
References catchVarEvents(), NULL, SCIP_CALL, SCIP_EVENTTYPE_BOUNDTIGHTENED, SCIP_OKAY, SCIPconsGetData(), SCIPeventGetType(), SCIPeventGetVar(), SCIPmarkConsPropagate(), and x.
Referenced by addLinearizationCuts(), and DECL_MYPOW().
◆ catchVarEvents()
|
static |
catch variable bound tightening events
- Parameters
-
scip SCIP data structure eventhdlr event handler for variables cons constraint for which to catch bound change events
Definition at line 245 of file cons_abspower.c.
References dropVarEvents(), NULL, SCIP_CALL, SCIP_EVENTTYPE_DISABLED, SCIP_EVENTTYPE_LBTIGHTENED, SCIP_EVENTTYPE_UBTIGHTENED, SCIP_OKAY, SCIP_VARSTATUS_MULTAGGR, SCIPcatchVarEvent(), SCIPconsGetData(), SCIPisInfinity(), SCIPmarkConsPropagate(), and SCIPvarGetStatus().
Referenced by checkFixedVariables(), presolveFindDuplicates(), SCIP_DECL_CONSENABLE(), and SCIP_DECL_EVENTEXEC().
◆ dropVarEvents()
|
static |
drop variable bound tightening events
- Parameters
-
scip SCIP data structure eventhdlr event handler for variables cons constraint for which to drop bound change events
Definition at line 304 of file cons_abspower.c.
References NULL, SCIP_CALL, SCIP_DECL_HASHGETKEY(), SCIP_EVENTTYPE_DISABLED, SCIP_EVENTTYPE_LBTIGHTENED, SCIP_EVENTTYPE_UBTIGHTENED, SCIP_OKAY, SCIP_VARSTATUS_MULTAGGR, SCIPconsGetData(), SCIPdropVarEvent(), SCIPisInfinity(), and SCIPvarGetStatus().
Referenced by catchVarEvents(), checkFixedVariables(), presolveFindDuplicates(), and SCIP_DECL_CONSDISABLE().
◆ SCIP_DECL_HASHGETKEY()
|
static |
get key of hash element
Definition at line 362 of file cons_abspower.c.
References SCIP_DECL_HASHKEYEQ().
Referenced by dropVarEvents().
◆ SCIP_DECL_HASHKEYEQ() [1/2]
|
static |
checks if two constraints have the same x variable, the same exponent, and either the same offset or the same linear variable and are both equality constraint
Definition at line 369 of file cons_abspower.c.
References FALSE, NULL, SCIP_DECL_HASHKEYVAL(), SCIPconsGetData(), and TRUE.
Referenced by SCIP_DECL_HASHGETKEY(), and SCIP_DECL_HASHKEYVAL().
◆ SCIP_DECL_HASHKEYVAL() [1/2]
|
static |
get value of hash element when comparing on x
Definition at line 393 of file cons_abspower.c.
References NULL, SCIP_DECL_HASHKEYEQ(), SCIPconsGetData(), SCIPhashTwo, SCIPrealHashCode(), and SCIPvarGetIndex().
Referenced by SCIP_DECL_HASHKEYEQ().
◆ SCIP_DECL_HASHKEYEQ() [2/2]
|
static |
checks if two constraints have the same z variable and the same exponent
Definition at line 406 of file cons_abspower.c.
References FALSE, NULL, SCIP_DECL_HASHKEYVAL(), SCIPconsGetData(), and TRUE.
◆ SCIP_DECL_HASHKEYVAL() [2/2]
|
static |
get value of hash element when comparing on z
Definition at line 427 of file cons_abspower.c.
References NULL, presolveFindDuplicatesUpgradeCons(), SCIPconsGetData(), SCIPhashTwo, SCIPrealHashCode(), and SCIPvarGetIndex().
◆ presolveFindDuplicatesUpgradeCons()
|
static |
upgrades a signpower constraint to a linear constraint if a second signpower constraint with same nonlinear term is available
- Parameters
-
scip SCIP data structure cons1 constraint to upgrade to a linear constraint cons2 constraint which defines a relation for x|x|^{n-1} infeas buffer where to indicate if infeasibility has been detected nupgdconss buffer where to add number of upgraded conss ndelconss buffer where to add number of deleted conss naggrvars buffer where to add number of aggregated variables
Definition at line 440 of file cons_abspower.c.
References NULL, presolveFindDuplicatesSolveEquations(), SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPaddCons(), SCIPaggregateVars(), SCIPconsGetData(), SCIPconsGetName(), SCIPconsIsChecked(), SCIPconsIsDynamic(), SCIPconsIsEnforced(), SCIPconsIsInitial(), SCIPconsIsLocal(), SCIPconsIsModifiable(), SCIPconsIsPropagated(), SCIPconsIsRemovable(), SCIPconsIsSeparated(), SCIPconsIsStickingAtNode(), SCIPcreateConsLinear(), SCIPdelCons(), SCIPisEQ(), SCIPisInfinity(), and SCIPreleaseCons().
Referenced by presolveFindDuplicates(), and SCIP_DECL_HASHKEYVAL().
◆ presolveFindDuplicatesSolveEquations()
|
static |
solves a system of two absolute power equations Given: (x+xoffset1)|x+xoffset1|^{exponent-1} + zcoef1 * z == rhs1 and (x+xoffset2)|x+xoffset2|^{exponent-1} + zcoef2 * z == rhs2 with xoffset1 != xoffset2 and zcoef1 * rhs2 == zcoef2 * rhs1 and exponent == 2, finds values for x and z that satisfy these equations, or reports infeasibility if no solution exists.
Multiplying the second equation by -zcoef1/zcoef2 and adding it to the first one gives (x+xoffset1)|x+xoffset1| - zcoef1/zcoef2 (x+offset2)|x+offset2| == 0
If zcoef1 == zcoef2, then there exists, due to monotonicity of x|x|, no x such that (x+xoffset1)|x+xoffset1| == (x+xoffset2)|x+xoffset2|.
In general, for zcoef1 / zcoef2 > 0.0, we get x = (xoffset2 - xoffset1) / (sqrt(zcoef2 / zcoef1) - 1.0) - xoffset1, and for zcoef1 / zcoef2 < 0.0, we get x = (xoffset2 - xoffset1) / (-sqrt(-zcoef2 / zcoef1) - 1.0) - xoffset1.
This then yields z = (rhs1 - (x+xoffset1)|x+xoffset1|) / zcoef1.
- Parameters
-
scip SCIP data structure infeas buffer to indicate if the system of equations has no solution xval buffer to store value of x in the solution, if any zval buffer to store value of z in the solution, if any exponent exponent in absolute power equations xoffset1 offset for x in first absolute power equation zcoef1 coefficient of z in first absolute power equation rhs1 right-hand-side in first absolute power equation xoffset2 offset for x in second absolute power equation zcoef2 coefficient of z in second absolute power equation rhs2 right-hand-side in second absolute power equation
Definition at line 557 of file cons_abspower.c.
References FALSE, NULL, presolveFindDuplicates(), REALABS, SCIPisEQ(), SCIPisFeasEQ(), sqrt(), and TRUE.
Referenced by presolveFindDuplicates(), and presolveFindDuplicatesUpgradeCons().
◆ presolveFindDuplicates()
|
static |
finds and removes duplicates in a set of absolute power constraints
- Parameters
-
scip SCIP data structure conshdlr constraint handler for absolute power constraints conss constraints nconss number of constraints nupgdconss pointer where to add number of upgraded constraints ndelconss pointer where to add number of deleted constraints naddconss pointer where to add number of added constraints nfixedvars pointer where to add number of fixed variables naggrvars pointer where to add number of aggregated variables success pointer to store whether a duplicate was found (and removed) infeas pointer to store whether infeasibility was detected
Definition at line 618 of file cons_abspower.c.
References catchVarEvents(), dropVarEvents(), FALSE, MAX, NULL, pow(), presolveDual(), presolveFindDuplicatesSolveEquations(), presolveFindDuplicatesUpgradeCons(), REALABS, SCIP_Bool, SCIP_CALL, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_Real, SCIP_VARSTATUS_MULTAGGR, SCIP_VARTYPE_CONTINUOUS, SCIPaddCons(), SCIPaddVar(), SCIPaggregateVars(), SCIPblkmem(), SCIPcalcMultihashSize(), SCIPconsGetData(), SCIPconsGetName(), SCIPconshdlrGetData(), SCIPconsIsActive(), SCIPconsIsChecked(), SCIPconsIsDeleted(), SCIPconsIsDynamic(), SCIPconsIsEnforced(), SCIPconsIsInitial(), SCIPconsIsLocal(), SCIPconsIsModifiable(), SCIPconsIsPropagated(), SCIPconsIsRemovable(), SCIPconsIsSeparated(), SCIPconsIsStickingAtNode(), SCIPcreateConsAbspower(), SCIPcreateConsLinear(), SCIPcreateVar(), SCIPdebugAddSolVal, SCIPdebugGetSolVal, SCIPdebugMsg, SCIPdebugPrintCons, SCIPdelCons(), SCIPfixVar(), SCIPinfinity(), SCIPisEQ(), SCIPisGT(), SCIPisInfinity(), SCIPisZero(), SCIPlockVarCons(), SCIPmultihashCreate(), SCIPmultihashFree(), SCIPmultihashInsert(), SCIPmultihashRemove(), SCIPmultihashRetrieveNext(), SCIPreleaseCons(), SCIPreleaseVar(), SCIPsnprintf(), SCIPunlockVarCons(), SCIPvarGetLbLocal(), SCIPvarGetName(), SCIPvarGetProbvar(), SCIPvarGetStatus(), SCIPvarGetUbLocal(), SIGN, sqrt(), and TRUE.
Referenced by presolveFindDuplicatesSolveEquations(), and SCIP_DECL_CONSPRESOL().
◆ presolveDual()
|
static |
fix variables not appearing in any other constraint
- Parameters
-
scip SCIP data structure cons constraint cutoff buffer to indicate whether a cutoff was detected ndelconss buffer to increase with the number of deleted constraint nfixedvars buffer to increase with the number of fixed variables
Definition at line 1133 of file cons_abspower.c.
References a, b, computeBoundsX(), SCIP_Interval::inf, MAX, NULL, SCIP_Bool, SCIP_CALL, SCIP_INVALID, SCIP_LOCKTYPE_MODEL, SCIP_OKAY, SCIP_Real, SCIP_VARSTATUS_MULTAGGR, SCIP_VARTYPE_INTEGER, SCIPconsGetData(), SCIPconsGetName(), SCIPconsIsChecked(), SCIPconsIsMarkedPropagate(), SCIPdebugMsg, SCIPdebugPrintCons, SCIPdelCons(), SCIPfixVar(), SCIPinfinity(), SCIPintervalSetBounds(), SCIPisEQ(), SCIPisFeasGE(), SCIPisFeasLE(), SCIPisGE(), SCIPisGT(), SCIPisInfinity(), SCIPisLE(), SCIPisLT(), SCIPisZero(), SCIPvarGetLbGlobal(), SCIPvarGetName(), SCIPvarGetNLocksDownType(), SCIPvarGetNLocksUpType(), SCIPvarGetObj(), SCIPvarGetStatus(), SCIPvarGetType(), SCIPvarGetUbGlobal(), SIGN, SCIP_Interval::sup, and tightenBounds().
Referenced by presolveFindDuplicates(), and SCIP_DECL_CONSPRESOL().
◆ tightenBounds()
|
static |
given a variable and an interval, tightens the local bounds of this variable to the given interval
- Parameters
-
scip SCIP data structure var variable which bounds to tighten bounds new bounds force force tightening even if below bound strengthening tolerance cons constraint that is propagated result pointer to store the result of the propagation call nchgbds buffer where to add the number of changed bounds nfixedvars buffer where to add the number of fixed variables, can be equal to nchgbds naddconss buffer where to add the number of added constraints, can be NULL if force is FALSE
Definition at line 1435 of file cons_abspower.c.
References computeBoundsZ(), FALSE, SCIP_Interval::inf, NULL, SCIP_Bool, SCIP_CALL, SCIP_CONSADDED, SCIP_CUTOFF, SCIP_DIDNOTFIND, SCIP_OKAY, SCIP_Real, SCIP_REDUCEDDOM, SCIP_STAGE_SOLVING, SCIPaddCons(), SCIPaddConsLocal(), SCIPconsGetName(), SCIPconsIsChecked(), SCIPconsIsEnforced(), SCIPconsIsInitial(), SCIPconsIsPropagated(), SCIPconsIsSeparated(), SCIPcreateConsLinear(), SCIPdebugMsg, SCIPfixVar(), SCIPgetCurrentNode(), SCIPgetStage(), SCIPinProbing(), SCIPintervalGetInf(), SCIPintervalGetSup(), SCIPisEQ(), SCIPisGT(), SCIPisInfinity(), SCIPisLT(), SCIPnodeGetDepth(), SCIPreleaseCons(), SCIPtightenVarLb(), SCIPtightenVarUb(), SCIPvarGetLbLocal(), SCIPvarGetName(), SCIPvarGetProbvar(), SCIPvarGetUbLocal(), SCIPvarIsActive(), SCIP_Interval::sup, and TRUE.
Referenced by checkFixedVariables(), presolveDual(), and propagateCons().
◆ computeBoundsZ()
|
static |
computes bounds on z in a absolute power constraints for given bounds on x
- Parameters
-
scip SCIP data structure cons constraint xbnds bounds on x that are to be propagated zbnds buffer to store corresponding bounds on z
Definition at line 1589 of file cons_abspower.c.
References computeBoundsX(), SCIP_Interval::inf, NULL, PROPSIDETOL, PROPVARTOL, REALABS, SCIP_Real, SCIPconsGetData(), SCIPdebugMsg, SCIPdebugPrintCons, SCIPinfinity(), SCIPintervalIsEmpty(), SCIPintervalSetEntire(), SCIPisInfinity(), SIGN, SCIP_Interval::sup, and x.
Referenced by checkFixedVariables(), propagateCons(), and tightenBounds().
◆ checkFixedVariables()
|
static |
checks if x or z is fixed and replaces them or deletes constraint
- Parameters
-
scip SCIP data structure conshdlr constraint handler for absolute power constraints cons constraint ndelconss counter for number of deleted constraints nupgdconss counter for number of upgraded constraints nchgbds counter for number of variable bound changes nfixedvars counter for number of variable fixations result to store result if we detect infeasibility or remove constraint
Definition at line 1695 of file cons_abspower.c.
References catchVarEvents(), computeBoundsX(), computeBoundsZ(), computeViolation(), dropVarEvents(), FALSE, SCIP_Interval::inf, MAX, NULL, pow(), REALABS, SCIP_CALL, SCIP_CUTOFF, SCIP_DIDNOTFIND, SCIP_OKAY, SCIP_Real, SCIP_VARSTATUS_MULTAGGR, SCIPconsGetData(), SCIPconsGetName(), SCIPconshdlrGetData(), SCIPdebugMsg, SCIPdebugPrintCons, SCIPdelCons(), SCIPgetProbvarSum(), SCIPinfinity(), SCIPintervalSet(), SCIPisEQ(), SCIPisFeasEQ(), SCIPisFeasGT(), SCIPisFeasLT(), SCIPisGE(), SCIPisInfinity(), SCIPisLE(), SCIPisZero(), SCIPlockVarCons(), SCIPmarkDoNotMultaggrVar(), SCIPunlockVarCons(), SCIPvarGetLbGlobal(), SCIPvarGetName(), SCIPvarGetStatus(), SCIPvarGetUbGlobal(), SCIPvarIsActive(), SCIPwarningMessage(), SIGN, sqrt(), SCIP_Interval::sup, tightenBounds(), and TRUE.
Referenced by computeBoundsX(), and SCIP_DECL_CONSPRESOL().
◆ computeViolation()
|
static |
computes violation of a constraint
- Parameters
-
scip SCIP data structure conshdlr constraint handler cons constraint sol solution or NULL if LP solution should be used viol pointer to store absolute (unscaled) constraint violation solviolbounds buffer to store whether the solution violates bounds on x by more than feastol
Definition at line 1988 of file cons_abspower.c.
References computeViolations(), FALSE, MAX, NULL, REALABS, SCIP_OKAY, SCIP_Real, SCIPconsGetData(), SCIPgetSolVal(), SCIPinfinity(), SCIPisFeasGE(), SCIPisFeasLE(), SCIPisInfinity(), SCIPrelDiff(), SCIPupdateSolConsViolation(), SCIPvarGetLbLocal(), SCIPvarGetUbLocal(), SIGN, and TRUE.
Referenced by checkFixedVariables(), computeViolations(), proposeFeasibleSolution(), and SCIP_DECL_CONSCHECK().
◆ computeViolations()
|
static |
computes violation of a set of constraints
- 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 store whether the solution violates bounds on x by more than feastol maxviolcon buffer to store constraint with largest violation, or NULL if solution is feasible
Definition at line 2070 of file cons_abspower.c.
References computeViolation(), FALSE, MAX, NULL, proposeBranchingPoint(), SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPconsGetData(), SCIPfeastol(), and SCIPisGT().
Referenced by computeViolation(), enforceConstraint(), SCIP_DECL_CONSENFOPS(), SCIP_DECL_CONSSEPALP(), and SCIP_DECL_CONSSEPASOL().
◆ proposeBranchingPoint()
|
static |
proposes branching point for constraint
- Parameters
-
scip SCIP data structure cons constraint which variable to get branching point for sol solution to branch on (NULL for LP or pseudosol) preferzero how much we prefer branching on -xoffset (0, 1, or 2) if sign is not fixed branchminconverror whether to minimize convexification error if sign is fixed
Definition at line 2120 of file cons_abspower.c.
References MAX, NULL, pow(), registerBranchingCandidates(), SCIP_INVALID, SCIP_Real, SCIPconsGetData(), SCIPfeastol(), SCIPgetSolVal(), SCIPisFeasNegative(), SCIPisFeasPositive(), SCIPisGE(), SCIPisGT(), SCIPisInfinity(), SCIPisLE(), SCIPisLT(), SCIPvarGetLbLocal(), SCIPvarGetUbLocal(), and x.
Referenced by computeViolations(), registerBranchingCandidates(), and SCIP_DECL_CONSENFOPS().
◆ registerBranchingCandidates()
|
static |
registers branching variable candidates registers x for all violated absolute power constraints where x is not in convex region
- Parameters
-
scip SCIP data structure conshdlr constraint handler conss constraints to check nconss number of constraints to check sol solution to enforce (NULL for the LP solution) nnotify counter for number of notifications performed
Definition at line 2231 of file cons_abspower.c.
References FALSE, MAX, NULL, proposeBranchingPoint(), registerLargeRelaxValueVariableForBranching(), SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPaddExternBranchCand(), SCIPconsGetData(), SCIPconsGetName(), SCIPconshdlrGetData(), SCIPconsIsEnabled(), SCIPdebugMsg, SCIPfeastol(), SCIPgetSolVal(), SCIPisGT(), SCIPisInfinity(), SCIPisLT(), SCIPisRelEQ(), SCIPvarGetLbLocal(), SCIPvarGetName(), SCIPvarGetUbLocal(), and TRUE.
Referenced by enforceConstraint(), and proposeBranchingPoint().
◆ registerLargeRelaxValueVariableForBranching()
|
static |
registers a 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 2305 of file cons_abspower.c.
References fixAlmostFixedX(), NULL, REALABS, SCIP_CALL, SCIP_INVALID, SCIP_OKAY, SCIP_Real, SCIPaddExternBranchCand(), SCIPconsGetData(), SCIPconsIsEnabled(), SCIPfeastol(), SCIPgetSolVal(), and SCIPisGT().
Referenced by enforceConstraint(), and registerBranchingCandidates().
◆ fixAlmostFixedX()
|
static |
- Parameters
-
scip SCIP data structure conss constraints nconss number of constraints infeasible buffer to store whether infeasibility was detected reduceddom buffer to store whether some variable bound was tightened
Definition at line 2355 of file cons_abspower.c.
References FALSE, NULL, resolvePropagation(), SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPconsGetData(), SCIPdebugMsg, SCIPfeastol(), SCIPisEQ(), SCIPisGT(), SCIPisInfinity(), SCIPisRelEQ(), SCIPtightenVarLb(), SCIPtightenVarUb(), SCIPvarGetLbLocal(), SCIPvarGetName(), SCIPvarGetUbLocal(), and TRUE.
Referenced by enforceConstraint(), and registerLargeRelaxValueVariableForBranching().
◆ resolvePropagation()
|
static |
resolves a propagation on the given variable by supplying the variables needed for applying the corresponding propagation rule (see propagateCons()): see cons_varbound
- Parameters
-
scip SCIP data structure cons constraint that inferred the bound change infervar variable that was deduced proprule propagation rule that deduced the bound change boundtype the type of the changed bound (lower or upper bound) bdchgidx bound change index (time stamp of bound change), or NULL for current time
Definition at line 2438 of file cons_abspower.c.
References analyzeConflict(), NULL, PROPRULE_1, PROPRULE_2, PROPRULE_3, PROPRULE_4, PROPRULE_INVALID, SCIP_BOUNDTYPE_LOWER, SCIP_BOUNDTYPE_UPPER, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIPaddConflictLb(), SCIPaddConflictUb(), SCIPconsGetData(), SCIPconsGetName(), SCIPerrorMessage, and SCIPisInfinity().
Referenced by analyzeConflict(), fixAlmostFixedX(), and SCIP_DECL_CONSRESPROP().
◆ analyzeConflict()
|
static |
analyze infeasibility
- Parameters
-
scip SCIP data structure cons variable bound constraint infervar variable that was deduced proprule propagation rule that deduced the bound change boundtype the type of the changed bound (lower or upper bound)
Definition at line 2514 of file cons_abspower.c.
References FALSE, NULL, propagateCons(), resolvePropagation(), SCIP_BOUNDTYPE_LOWER, SCIP_BOUNDTYPE_UPPER, SCIP_CALL, SCIP_CONFTYPE_PROPAGATION, SCIP_OKAY, SCIP_STAGE_SOLVING, SCIPaddConflictLb(), SCIPaddConflictUb(), SCIPanalyzeConflictCons(), SCIPgetStage(), SCIPinitConflictAnalysis(), SCIPinProbing(), and SCIPisConflictAnalysisApplicable().
Referenced by propagateCons(), and resolvePropagation().
◆ propagateCons()
|
static |
propagation method for absolute power constraint SCIPinferVarXbCons to allow for repropagation
- Parameters
-
scip SCIP data structure conshdlr constraint handler cons variable bound constraint canaddcons are we allowed to add a linear constraint when enforcing bounds for a multiaggregated variable? cutoff pointer to store whether the node can be cut off nchgbds pointer to count number of bound changes naddconss pointer to count number of added constraints
Definition at line 2553 of file cons_abspower.c.
References addVarbound(), analyzeConflict(), computeBoundsX(), computeBoundsZ(), FALSE, MAX, NULL, pow(), PROPRULE_1, PROPRULE_2, PROPRULE_3, PROPRULE_4, PROPSIDETOL, PROPVARTOL, REALABS, SCIP_Bool, SCIP_BOUNDTYPE_LOWER, SCIP_BOUNDTYPE_UPPER, SCIP_CALL, SCIP_CUTOFF, SCIP_OKAY, SCIP_Real, SCIP_VARSTATUS_MULTAGGR, SCIPconsGetData(), SCIPconsGetName(), SCIPconsIsMarkedPropagate(), SCIPdebugMsg, SCIPdelConsLocal(), SCIPinferVarLbCons(), SCIPinferVarUbCons(), SCIPinfinity(), SCIPintervalSetBounds(), SCIPisFeasEQ(), SCIPisFeasGT(), SCIPisFeasLT(), SCIPisGE(), SCIPisGT(), SCIPisInfinity(), SCIPisLbBetter(), SCIPisLE(), SCIPisLT(), SCIPisRelEQ(), SCIPisUbBetter(), SCIPunmarkConsPropagate(), SCIPvarGetLbLocal(), SCIPvarGetName(), SCIPvarGetProbvar(), SCIPvarGetStatus(), SCIPvarGetUbLocal(), SCIPvarIsActive(), SIGN, sqrt(), tightenBounds(), and TRUE.
Referenced by analyzeConflict(), enforceConstraint(), SCIP_DECL_CONSENFOPS(), SCIP_DECL_CONSPRESOL(), and SCIP_DECL_CONSPROP().
◆ addVarbound()
|
static |
notifies SCIP about a variable bound lhs <= x + c*y <= rhs
- Parameters
-
scip SCIP data structure cons absolute power constraint this variable bound is derived form addcons should the variable bound be added as constraint to SCIP? var variable x for which we want to add a variable bound vbdvar variable y which makes the bound a variable bound vbdcoef coefficient c of bounding variable vbdvar lhs left hand side of varbound constraint rhs right hand side of varbound constraint infeas pointer to store whether an infeasibility was detected nbdchgs pointer where to add number of performed bound changes naddconss pointer where to add number of added constraints
Definition at line 3158 of file cons_abspower.c.
References FALSE, NULL, propagateVarbounds(), SCIP_CALL, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_Real, SCIP_VARSTATUS_MULTAGGR, SCIPaddCons(), SCIPaddVarVlb(), SCIPaddVarVub(), SCIPconsGetName(), SCIPcreateConsVarbound(), SCIPdebugMsg, SCIPgetProbvarSum(), SCIPisEQ(), SCIPisInfinity(), SCIPisZero(), SCIPreleaseCons(), SCIPsnprintf(), SCIPvarGetLbGlobal(), SCIPvarGetName(), SCIPvarGetStatus(), SCIPvarGetUbGlobal(), SCIPvarIsActive(), SCIPvarIsIntegral(), and TRUE.
Referenced by propagateCons(), and propagateVarbounds().
◆ propagateVarbounds()
|
static |
propagates varbounds of variables Let f(x) = sign(x+offset)|x+offset|^n, f^{-1}(y) = sign(y)|y|^(1/n) - offset. Thus, constraint is lhs <= f(x) + c*z <= rhs.
Given a variable bound constraint x <= a*y + b with y a binary variable, one obtains y = 0 -> f(x) <= f(b) -> lhs <= f(b) + c*z y = 1 -> f(x) <= f(a+b) -> lhs <= f(a+b) + c*z => lhs <= f(b) + y * (f(a+b)-f(b)) + c*z
Given a variable bound constraint x >= a*y + b with y a binary variable, one obtains analogously f(b) + y * (f(a+b)-f(b)) + c*z <= rhs
Given a variable bound constraint c*z <= a*y + b with y a binary variable, one obtains y = 0 -> lhs <= f(x) + b -> x >= f^{-1}(lhs - b) y = 1 -> lhs <= f(x) + a+b -> x >= f^{-1}(lhs - (a+b)) => x >= f^{-1}(lhs - b) + y * (f^{-1}(lhs - (a+b)) - f^{-1}(lhs - b))
Given a variable bound constraint c*z >= a*y + b with y a binary variable, one obtains analogously x <= f^{-1}(rhs - b) + y * (f^{-1}(rhs - (a+b)) - f^{-1}(rhs - b))
- Parameters
-
scip SCIP data structure conshdlr constraint handler cons absolute power constraint infeas pointer to store whether an infeasibility was detected nbdchgs pointer where to add number of performed bound changes naddconss pointer where to add number of added constraints
Definition at line 3264 of file cons_abspower.c.
References a, addVarbound(), b, FALSE, generateLinearizationCut(), NULL, pow(), SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPconsGetData(), SCIPconshdlrGetData(), SCIPdebugMsg, SCIPinfinity(), SCIPisFeasZero(), SCIPisInfinity(), SCIPisZero(), SCIPvarGetLbGlobal(), SCIPvarGetName(), SCIPvarGetNVlbs(), SCIPvarGetNVubs(), SCIPvarGetUbGlobal(), SCIPvarGetVlbCoefs(), SCIPvarGetVlbConstants(), SCIPvarGetVlbVars(), SCIPvarGetVubCoefs(), SCIPvarGetVubConstants(), SCIPvarGetVubVars(), SCIPvarIsBinary(), SIGN, and y.
Referenced by addVarbound(), and SCIP_DECL_CONSPRESOL().
◆ generateLinearizationCut()
|
static |
computes linear underestimator for (x+offset)^n + c*z <= rhs by linearization in x
the generated cut is xmul * n * (refpoint+offset)^(n-1) * x + c*z <= rhs + ((n-1)*refpoint-offset) * (refpoint+offset)^(n-1)
- Parameters
-
scip SCIP data structure rowprep buffer to store rowprep conshdlr constraint handler refpoint base point for linearization exponent exponent n in sign(x)abs(x)^n xoffset offset of x xmult multiplier for coefficient of x zcoef coefficient of z rhs right hand side x variable x z variable z islocal whether the cut is valid only locally
Definition at line 3482 of file cons_abspower.c.
References generateLinearizationCutProject(), NULL, pow(), SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIP_SIDETYPE_RIGHT, SCIPaddRowprepSide(), SCIPaddRowprepTerm(), SCIPconshdlrGetData(), SCIPcreateRowprep(), SCIPdebugMsg, SCIPisFeasNegative(), SCIPisInfinity(), and SCIPsnprintf().
Referenced by generateCut(), generateLinearizationCutProject(), propagateVarbounds(), and SCIP_DECL_CONSINITLP().
◆ generateLinearizationCutProject()
|
static |
computes linear underestimator for (x+xoffset)^n + c*z <= rhs by linearization in x
the generated cut is xmul * n * (refpoint+offset)^(n-1) * x + c*z <= rhs + ((n-1)*refpoint-offset) * (refpoint+offset)^(n-1) where refpoint is computed by projecting (xref, zref) onto the graph of (x+offset)^n w.r.t. euclidean norm
Thus, the projection is computed by minimizing 1/2(x-xref)^2 + 1/2(((x+offset)^n-rhs)/(-c) - zref)^2. I.e., we aim to find a root of g(x) = x - xref + n/c (x+offset)^(n-1) (zref - rhs/c) + n/c^2 (x+offset)^(2n-1) We do this numerically by executing up to five newton iterations. It is g'(x) = 1 + n(n-1)/c (x+offset)^(n-2) (zref - rhs/c) + n(2n-1)/c^2 (x+offset)^(2n-2)
- Parameters
-
scip SCIP data structure rowprep buffer to store rowprep conshdlr constraint handler xref reference point for x zref reference point for z xmin minimal value x is allowed to take exponent exponent n in sign(x+offset)abs(x+offset)^n xoffset offset of x xmult multiplier for coefficient of x zcoef coefficient of z rhs right hand side x variable x z variable z islocal whether the cut is valid only locally
Definition at line 3549 of file cons_abspower.c.
References generateLinearizationCut(), generateSecantCut(), NULL, pow(), SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPisFeasNegative(), SCIPisFeasPositive(), and SCIPisInfinity().
Referenced by generateCut(), and generateLinearizationCut().
◆ generateSecantCut()
|
static |
computes secant underestimator for sign(x+offset)abs(x+offset)^n + c*z <= rhs
the generated cut is slope*xmult*x + c*z <= rhs + (-xlb-offset)^n + slope*xlb, where slope = (sign(xub+offset)*abs(xub+offset)^n + (-xlb-offset)^n) / (xub - xlb).
the cut is not generated if the given solution (or the LP solution) would not be cutoff
- Parameters
-
scip SCIP data structure rowprep buffer to store rowprep conshdlr constraint handler sol point we want to cut off, or NULL for LP solution xlb lower bound of x xub upper bound of x exponent exponent n in sign(x+offset)abs(x+offset)^n xoffset offset of x xmult multiplier for coefficient of x zcoef coefficient of z rhs right hand side x variable x z variable z
Definition at line 3626 of file cons_abspower.c.
References generateSecantCutNoCheck(), NULL, REALABS, SCIP_CALL, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_Real, SCIP_SIDETYPE_RIGHT, SCIPaddRowprepSide(), SCIPaddRowprepTerm(), SCIPconshdlrGetData(), SCIPcreateRowprep(), SCIPdebugMsg, SCIPgetCurrentNode(), SCIPgetSolVal(), SCIPisFeasPositive(), SCIPisInfinity(), SCIPisLE(), SCIPisPositive(), SCIPisRelEQ(), SCIPnodeGetDepth(), SCIPsnprintf(), SCIPvarGetLbLocal(), SCIPvarGetName(), SCIPvarGetUbLocal(), and SIGN.
Referenced by generateCut(), and generateLinearizationCutProject().
◆ generateSecantCutNoCheck()
|
static |
computes secant underestimator for sign(x+xoffset)abs(x+xoffset)^n + c*z <= rhs
The generated cut is slope*xmult*x + c*z <= rhs + (-xlb-xoffset)^n + slope*xlb, where slope = (sign(xub+xoffset)*abs(xub+xoffset)^n + (-xlb-xoffset)^n) / (xub - xlb).
- Parameters
-
scip SCIP data structure rowprep buffer to store rowprep xlb lower bound of x xub upper bound of x exponent exponent n in sign(x)abs(x)^n xoffset offset of x xmult multiplier for coefficient of x zcoef coefficient of z rhs right hand side x variable x z variable z
Definition at line 3691 of file cons_abspower.c.
References generateCut(), NULL, REALABS, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIP_SIDETYPE_RIGHT, SCIPaddRowprepSide(), SCIPaddRowprepTerm(), SCIPcreateRowprep(), SCIPgetCurrentNode(), SCIPisInfinity(), SCIPisLE(), SCIPisPositive(), SCIPisRelEQ(), SCIPmemccpy(), SCIPnodeGetDepth(), and SIGN.
Referenced by generateSecantCut(), and SCIP_DECL_CONSINITLP().
◆ generateCut()
|
static |
generates a cut based on Liberti and Pantelides, Convex Envelopes of Monomials of Odd Degree, J. Global Optimization 25, 157-168, 2003, and previous publications
- Parameters
-
scip SCIP data structure cons constraint violside side to separate sol solution to separate, or NULL if LP solution should be used row storage for cut onlyinbounds whether linearization is allowed only in variable bounds minviol a minimal violation in sol we hope to achieve
Definition at line 3740 of file cons_abspower.c.
References SCIP_RowPrep::coefs, generateLinearizationCut(), generateLinearizationCutProject(), generateSecantCut(), NULL, SCIP_RowPrep::nvars, REALABS, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIP_SIDETYPE_LEFT, SCIP_SIDETYPE_RIGHT, SCIPcleanupRowprep(), SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconsGetName(), SCIPconshdlrGetData(), SCIPconsIsGlobal(), SCIPdebug, SCIPdebugMsg, SCIPdebugPrintCons, SCIPfeastol(), SCIPfreeRowprep(), SCIPgetCurrentNode(), SCIPgetRowprepRowConshdlr(), SCIPgetSolVal(), SCIPisGT(), SCIPisInfinity(), SCIPisLT(), SCIPisNegative(), SCIPisPositive(), SCIPnodeGetDepth(), SCIPprintRowprep(), SCIPvarGetLbGlobal(), SCIPvarGetLbLocal(), SCIPvarGetUbGlobal(), SCIPvarGetUbLocal(), separatePoint(), and SCIP_RowPrep::side.
Referenced by addLinearizationCuts(), generateSecantCutNoCheck(), 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 quadratic 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 minefficacy minimal efficacy of a cut if it should be added to the LP inenforcement whether we are in constraint enforcement onlyinbounds whether linearization is allowed only in variable bounds success result of separation: separated point (TRUE) or not (FALSE) cutoff whether a cutoff has been detected 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 3911 of file cons_abspower.c.
References addLinearizationCuts(), FALSE, generateCut(), NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIP_SIDETYPE_LEFT, SCIP_SIDETYPE_RIGHT, SCIPaddRow(), SCIPaddRowIndicator(), SCIPconsGetData(), SCIPconshdlrGetData(), SCIPconsIsEnabled(), SCIPfeastol(), SCIPgetRowSolFeasibility(), SCIPisCutApplicable(), SCIPisGT(), SCIPmarkRowNotRemovableLocal(), SCIPreleaseRow(), SCIProwIsLocal(), and TRUE.
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 4012 of file cons_abspower.c.
References FALSE, generateCut(), NULL, SCIP_Bool, SCIP_CALL, SCIP_DECL_EVENTEXEC(), SCIP_OKAY, SCIP_SIDETYPE_LEFT, SCIP_SIDETYPE_RIGHT, SCIPaddPoolCut(), SCIPaddRow(), SCIPconsGetData(), SCIPconsIsLocal(), SCIPgetRowLPFeasibility(), SCIPisGT(), SCIPisInfinity(), SCIPisLT(), SCIPreleaseRow(), SCIProwIsLocal(), SCIPvarGetLbGlobal(), SCIPvarGetUbGlobal(), and TRUE.
Referenced by SCIP_DECL_CONSSEPALP(), SCIP_DECL_EVENTEXEC(), and separatePoint().
◆ SCIP_DECL_EVENTEXEC() [2/2]
|
static |
processes the event that a new primal solution has been found
Definition at line 4096 of file cons_abspower.c.
References addLinearizationCuts(), NULL, proposeFeasibleSolution(), SCIP_CALL, SCIP_EVENTTYPE_FORMAT, SCIP_EVENTTYPE_SOLFOUND, SCIP_OKAY, SCIPconshdlrGetConss(), SCIPconshdlrGetData(), SCIPconshdlrGetNConss(), SCIPdebugMsg, SCIPeventGetSol(), SCIPeventGetType(), SCIPheurGetName(), and SCIPsolGetHeur().
◆ proposeFeasibleSolution()
|
static |
given a solution, try to make absolute power constraints feasible by shifting the linear variable z and pass this solution to the trysol heuristic
- Parameters
-
scip SCIP data structure conshdlr constraint handler conss constraints to process nconss number of constraints sol solution to process
Definition at line 4143 of file cons_abspower.c.
References computeViolation(), createNlRow(), MAX, NULL, REALABS, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIP_STAGE_INITPRESOLVE, SCIP_STAGE_SOLVED, SCIP_VARSTATUS_MULTAGGR, SCIPconsGetData(), SCIPconshdlrGetData(), SCIPcreateLPSol(), SCIPcreateSolCopy(), SCIPdebugMsg, SCIPfeastol(), SCIPfreeSol(), SCIPgetSolTransObj(), SCIPgetSolVal(), SCIPgetStage(), SCIPheurPassSolTrySol(), SCIPisFeasGT(), SCIPisFeasLT(), SCIPisGT(), SCIPisInfinity(), SCIPsetSolVal(), SCIPunlinkSol(), SCIPvarGetLbGlobal(), SCIPvarGetStatus(), SCIPvarGetUbGlobal(), and SIGN.
Referenced by SCIP_DECL_CONSCHECK(), and SCIP_DECL_EVENTEXEC().
◆ createNlRow()
|
static |
create a nonlinear row representation of the constraint and stores them in consdata
- Parameters
-
scip SCIP data structure cons absolute power constraint
Definition at line 4251 of file cons_abspower.c.
References SCIP_QuadElement::coef, SCIP_QuadElement::idx1, SCIP_QuadElement::idx2, NULL, SCIP_Bool, SCIP_CALL, SCIP_DECL_QUADCONSUPGD(), SCIP_EXPR_CONST, SCIP_EXPR_INTPOWER, SCIP_EXPR_MUL, SCIP_EXPR_PLUS, SCIP_EXPR_REALPOWER, SCIP_EXPR_SIGNPOWER, SCIP_EXPR_VARIDX, SCIP_EXPRCURV_CONCAVE, SCIP_EXPRCURV_CONVEX, SCIP_EXPRCURV_UNKNOWN, SCIP_OKAY, SCIP_Real, SCIPblkmem(), SCIPconsGetData(), SCIPconsGetName(), SCIPcreateNlRow(), SCIPexprCreate(), SCIPexprtreeCreate(), SCIPexprtreeFree(), SCIPexprtreeSetVars(), SCIPisIntegral(), SCIPisNegative(), SCIPisPositive(), SCIPreleaseNlRow(), SCIPround(), SCIPvarGetLbGlobal(), SCIPvarGetUbGlobal(), and sign().
Referenced by proposeFeasibleSolution(), SCIP_DECL_CONSINITSOL(), and SCIPgetNlRowAbspower().
◆ SCIP_DECL_QUADCONSUPGD()
|
static |
upgrades a quadratic constraint where the quadratic part is only a single square term and the quadratic variable sign is fixed to a signpower constraint
Definition at line 4416 of file cons_abspower.c.
References SCIP_QuadVarTerm::lincoef, NULL, REALABS, SCIP_CALL, SCIP_DECL_NONLINCONSUPGD(), SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_Real, SCIP_VARTYPE_CONTINUOUS, SCIPaddCoefLinear(), SCIPaddVar(), SCIPconsGetName(), SCIPconsIsChecked(), SCIPconsIsDynamic(), SCIPconsIsEnforced(), SCIPconsIsInitial(), SCIPconsIsLocal(), SCIPconsIsModifiable(), SCIPconsIsPropagated(), SCIPconsIsRemovable(), SCIPconsIsSeparated(), SCIPconsIsStickingAtNode(), SCIPcreateConsAbspower(), SCIPcreateConsLinear(), SCIPcreateVar(), SCIPdebugAddSolVal, SCIPdebugGetSolVal, SCIPdebugMsg, SCIPdebugPrintCons, SCIPgetCoefsLinearVarsQuadratic(), SCIPgetLhsQuadratic(), SCIPgetLinearVarsQuadratic(), SCIPgetNBilinTermsQuadratic(), SCIPgetNLinearVarsQuadratic(), SCIPgetNQuadVarTermsQuadratic(), SCIPgetQuadVarTermsQuadratic(), SCIPgetRhsQuadratic(), SCIPinfinity(), SCIPisInfinity(), SCIPisNegative(), SCIPisPositive(), SCIPisZero(), SCIPreleaseVar(), SCIPsnprintf(), SCIPvarGetLbGlobal(), SCIPvarGetUbGlobal(), SCIP_QuadVarTerm::sqrcoef, TRUE, SCIP_QuadVarTerm::var, and x.
Referenced by createNlRow().
◆ SCIP_DECL_NONLINCONSUPGD()
|
static |
tries to upgrade a nonlinear constraint into a absolute power constraint
Definition at line 4576 of file cons_abspower.c.
References FALSE, SCIP_Interval::inf, NULL, pow(), REALABS, SCIP_CALL, SCIP_DECL_EXPRGRAPHNODEREFORM(), SCIP_EXPR_INTPOWER, SCIP_EXPR_LINEAR, SCIP_EXPR_POLYNOMIAL, SCIP_EXPR_REALPOWER, SCIP_EXPR_SIGNPOWER, SCIP_EXPR_SQUARE, SCIP_EXPR_VARIDX, SCIP_EXPRCURV_UNKNOWN, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_Real, SCIP_VARTYPE_CONTINUOUS, SCIPaddCoefLinear(), SCIPaddVar(), SCIPconsGetHdlr(), SCIPconsGetName(), SCIPconsIsChecked(), SCIPconsIsDynamic(), SCIPconsIsEnforced(), SCIPconsIsInitial(), SCIPconsIsLocal(), SCIPconsIsModifiable(), SCIPconsIsPropagated(), SCIPconsIsRemovable(), SCIPconsIsSeparated(), SCIPconsIsStickingAtNode(), SCIPcreateConsAbspower(), SCIPcreateConsLinear(), SCIPcreateConsNonlinear2(), SCIPcreateVar(), SCIPdebugAddSolVal, SCIPdebugGetSolVal, SCIPdebugMsg, SCIPexprGetMonomialCoef(), SCIPexprGetMonomialExponents(), SCIPexprGetMonomialNFactors(), SCIPexprgraphGetNodeBounds(), SCIPexprgraphGetNodeChildren(), SCIPexprgraphGetNodeCurvature(), SCIPexprgraphGetNodeDepth(), SCIPexprgraphGetNodeIntPowerExponent(), SCIPexprgraphGetNodeLinearCoefs(), SCIPexprgraphGetNodeLinearConstant(), SCIPexprgraphGetNodeNChildren(), SCIPexprgraphGetNodeOperator(), SCIPexprgraphGetNodePolynomialConstant(), SCIPexprgraphGetNodePolynomialMonomials(), SCIPexprgraphGetNodePolynomialNMonomials(), SCIPexprgraphGetNodePosition(), SCIPexprgraphGetNodeRealPowerExponent(), SCIPexprgraphGetNodeSignPowerExponent(), SCIPexprgraphGetNodeVal(), SCIPexprgraphGetNodeVar(), SCIPgetExprgraphNodeNonlinear(), SCIPgetExprgraphNonlinear(), SCIPgetLhsNonlinear(), SCIPgetLinearCoefsNonlinear(), SCIPgetLinearVarsNonlinear(), SCIPgetNLinearVarsNonlinear(), SCIPgetRhsNonlinear(), SCIPinfinity(), SCIPintervalGetInf(), SCIPintervalGetSup(), SCIPisInfinity(), SCIPisIntegral(), SCIPisZero(), SCIPreleaseVar(), SCIPround(), SCIPsnprintf(), SCIP_Interval::sup, TRUE, and x.
Referenced by SCIP_DECL_QUADCONSUPGD().
◆ SCIP_DECL_EXPRGRAPHNODEREFORM()
|
static |
tries to reformulate a expression graph node via introducing a absolute power constraint if node fits to absolute power and has indefinte curvature and has no nonlinear parents and has siblings, then replace by auxvar and absolute power constraint if it still has nonlinear parents, then we wait to see if reformulation code move node into auxiliary constraint, so we do not add unnessary auxiliary variables for something like an x^2 in an exp(x^2) if it has no siblings, then we let the upgrading for nonlinear constraints take care of it, since it may be able to upgrade the constraint as a whole and can take the constraint sides into account too (may need only <=/>= auxcons)
Definition at line 4929 of file cons_abspower.c.
References enforceConstraint(), FALSE, SCIP_Interval::inf, NULL, pow(), REALABS, SCIP_CALL, SCIP_EXPR_ABS, SCIP_EXPR_INTPOWER, SCIP_EXPR_LINEAR, SCIP_EXPR_MUL, SCIP_EXPR_POLYNOMIAL, SCIP_EXPR_REALPOWER, SCIP_EXPR_SIGNPOWER, SCIP_EXPR_SQUARE, SCIP_EXPR_VARIDX, SCIP_EXPRCURV_UNKNOWN, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_Real, SCIP_VARTYPE_CONTINUOUS, SCIPaddCons(), SCIPaddVar(), SCIPblkmem(), SCIPcreateConsAbspower(), SCIPcreateConsNonlinear2(), SCIPcreateVar(), SCIPdebugAddSolVal, SCIPdebugGetSolVal, SCIPdebugMsg, SCIPdebugPrintCons, SCIPexprGetMonomialChildIndices(), SCIPexprGetMonomialCoef(), SCIPexprGetMonomialExponents(), SCIPexprGetMonomialNFactors(), SCIPexprgraphAddNode(), SCIPexprgraphAddVars(), SCIPexprgraphCreateNodeLinear(), SCIPexprgraphGetNodeBounds(), SCIPexprgraphGetNodeChildren(), SCIPexprgraphGetNodeCurvature(), SCIPexprgraphGetNodeDepth(), SCIPexprgraphGetNodeIntPowerExponent(), SCIPexprgraphGetNodeLinearCoefs(), SCIPexprgraphGetNodeLinearConstant(), SCIPexprgraphGetNodeNChildren(), SCIPexprgraphGetNodeOperator(), SCIPexprgraphGetNodePolynomialConstant(), SCIPexprgraphGetNodePolynomialMonomials(), SCIPexprgraphGetNodePolynomialNMonomials(), SCIPexprgraphGetNodePosition(), SCIPexprgraphGetNodeRealPowerExponent(), SCIPexprgraphGetNodeSignPowerExponent(), SCIPexprgraphGetNodeVal(), SCIPexprgraphGetNodeVar(), SCIPexprgraphHasNodeNonlinearAncestor(), SCIPexprgraphHasNodeSibling(), SCIPexprgraphSetVarNodeValue(), SCIPfeastol(), SCIPinfinity(), SCIPintervalGetInf(), SCIPintervalGetSup(), SCIPisIntegral(), SCIPisZero(), SCIPreleaseCons(), SCIPreleaseVar(), SCIPround(), SCIPsnprintf(), SIGN, SCIP_Interval::sup, TRUE, and x.
Referenced by SCIP_DECL_NONLINCONSUPGD().
◆ 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 5276 of file cons_abspower.c.
References computeViolations(), FALSE, fixAlmostFixedX(), NULL, propagateCons(), registerBranchingCandidates(), registerLargeRelaxValueVariableForBranching(), 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(), SCIPcreateChild(), SCIPdebugMsg, SCIPfeastol(), SCIPgetCurrentNode(), SCIPgetLPFeastol(), SCIPgetSolVal(), SCIPisGT(), SCIPisStopped(), SCIPnodeGetEstimate(), SCIPvarGetName(), SCIPwarningMessage(), separatePoint(), and TRUE.
Referenced by SCIP_DECL_CONSENFOLP(), SCIP_DECL_CONSENFORELAX(), and SCIP_DECL_EXPRGRAPHNODEREFORM().
◆ SCIP_DECL_CONSHDLRCOPY()
|
static |
copy method for constraint handler plugins (called when SCIP copies plugins)
Definition at line 5488 of file cons_abspower.c.
References CONSHDLR_NAME, NULL, SCIP_CALL, SCIP_DECL_CONSFREE(), SCIP_OKAY, SCIPconshdlrGetName(), SCIPincludeConshdlrAbspower(), 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 5504 of file cons_abspower.c.
References NULL, SCIP_DECL_CONSINIT(), SCIP_OKAY, SCIPconshdlrGetData(), and SCIPfreeBlockMemory.
Referenced by SCIP_DECL_CONSHDLRCOPY().
◆ SCIP_DECL_CONSINIT()
|
static |
initialization method of constraint handler (called after problem was transformed)
Definition at line 5521 of file cons_abspower.c.
References NULL, SCIP_DECL_CONSEXIT(), SCIP_OKAY, SCIPconshdlrGetData(), SCIPfindConshdlr(), and SCIPfindHeur().
Referenced by SCIP_DECL_CONSFREE().
◆ SCIP_DECL_CONSEXIT()
|
static |
deinitialization method of constraint handler (called before transformed problem is freed)
Definition at line 5542 of file cons_abspower.c.
References 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 5561 of file cons_abspower.c.
References NULL, SCIP_DECL_CONSEXITPRE(), SCIP_OKAY, and SCIPconshdlrGetData().
Referenced by SCIP_DECL_CONSEXIT().
◆ SCIP_DECL_CONSEXITPRE()
|
static |
presolving deinitialization method of constraint handler (called after presolving has been finished)
Definition at line 5578 of file cons_abspower.c.
References NULL, SCIP_DECL_CONSINITSOL(), SCIP_OKAY, SCIPconsIsAdded(), and SCIPenableNLP().
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 5602 of file cons_abspower.c.
References CONSHDLR_NAME, createNlRow(), FALSE, NULL, pow(), roots, ROOTS_KNOWN, SCIP_CALL, SCIP_DECL_CONSEXITSOL(), SCIP_ERROR, SCIP_EVENTTYPE_SOLFOUND, SCIP_OKAY, SCIP_Real, SCIPaddNlRow(), SCIPcatchEvent(), SCIPconsGetData(), SCIPconshdlrGetData(), SCIPconsIsEnabled(), SCIPdebugMsg, SCIPerrorMessage, SCIPfindEventhdlr(), SCIPfloor(), SCIPisEQ(), SCIPisIntegral(), SCIPisNLPConstructed(), and SCIPisZero().
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 5710 of file cons_abspower.c.
References CONSHDLR_NAME, 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 5752 of file cons_abspower.c.
References NULL, SCIP_CALL, SCIP_DECL_CONSTRANS(), SCIP_OKAY, SCIPfreeBlockMemory, and SCIPreleaseNlRow().
Referenced by SCIP_DECL_CONSEXITSOL().
◆ SCIP_DECL_CONSTRANS()
|
static |
transforms constraint data into data belonging to the transformed problem
Definition at line 5775 of file cons_abspower.c.
References NULL, SCIP_CALL, SCIP_DECL_CONSINITLP(), SCIP_OKAY, SCIPconsGetData(), SCIPconsGetName(), SCIPconsIsChecked(), SCIPconsIsDynamic(), SCIPconsIsEnforced(), SCIPconsIsInitial(), SCIPconsIsLocal(), SCIPconsIsModifiable(), SCIPconsIsPropagated(), SCIPconsIsRemovable(), SCIPconsIsSeparated(), SCIPconsIsStickingAtNode(), SCIPcreateCons(), SCIPduplicateBlockMemory, SCIPgetTransformedVar(), SCIPmarkDoNotMultaggrVar(), and SCIPvarIsActive().
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)
we add secant underestimators
Definition at line 5813 of file cons_abspower.c.
References FALSE, generateLinearizationCut(), generateSecantCutNoCheck(), INITLPMAXVARVAL, NULL, REALABS, SCIP_CALL, SCIP_DECL_CONSSEPALP(), SCIP_OKAY, SCIP_Real, SCIPaddRow(), SCIPaddRowIndicator(), SCIPcleanupRowprep(), SCIPconsGetData(), SCIPconshdlrGetData(), SCIPfreeRowprep(), SCIPgetRowprepRowConshdlr(), SCIPinfinity(), SCIPisInfinity(), SCIPisNegative(), SCIPisPositive(), SCIPisRelEQ(), SCIPreleaseRow(), SCIProwIsLocal(), SCIPvarGetLbGlobal(), SCIPvarGetUbGlobal(), and SCIP_RowPrep::side.
Referenced by SCIP_DECL_CONSTRANS().
◆ SCIP_DECL_CONSSEPALP()
|
static |
separation method of constraint handler for LP solutions
Definition at line 6014 of file cons_abspower.c.
References addLinearizationCuts(), computeViolations(), FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_CUTOFF, SCIP_DECL_CONSSEPASOL(), SCIP_DIDNOTFIND, 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(), SCIPisInfinity(), SCIPisLT(), SCIPisNLPConstructed(), SCIPsetNLPInitialGuessSol(), SCIPsolveNLP(), SCIPvarGetLbGlobal(), SCIPvarGetUbGlobal(), separatePoint(), and TRUE.
Referenced by SCIP_DECL_CONSINITLP().
◆ SCIP_DECL_CONSSEPASOL()
|
static |
separation method of constraint handler for arbitrary primal solutions
Definition at line 6169 of file cons_abspower.c.
References computeViolations(), FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_CUTOFF, SCIP_DECL_CONSENFOLP(), SCIP_DIDNOTFIND, SCIP_OKAY, SCIP_SEPARATED, SCIPgetSepaMinEfficacy(), and separatePoint().
Referenced by SCIP_DECL_CONSSEPALP().
◆ SCIP_DECL_CONSENFOLP()
|
static |
constraint enforcing method of constraint handler for LP solutions
Definition at line 6205 of file cons_abspower.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 6214 of file cons_abspower.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 6223 of file cons_abspower.c.
References computeViolations(), NULL, propagateCons(), proposeBranchingPoint(), SCIP_Bool, SCIP_CALL, SCIP_CONSADDED, SCIP_CUTOFF, SCIP_DECL_CONSPROP(), SCIP_FEASIBLE, SCIP_INFEASIBLE, SCIP_OKAY, SCIP_REDUCEDDOM, SCIP_SOLVELP, SCIPaddExternBranchCand(), SCIPconsGetData(), SCIPconsGetName(), SCIPconshdlrGetData(), SCIPdebugMsg, SCIPfeastol(), SCIPisGT(), SCIPisRelEQ(), SCIPvarGetLbLocal(), SCIPvarGetUbLocal(), and TRUE.
Referenced by SCIP_DECL_CONSENFORELAX().
◆ SCIP_DECL_CONSPROP()
|
static |
domain propagation method of constraint handler
Definition at line 6318 of file cons_abspower.c.
References FALSE, NULL, propagateCons(), SCIP_Bool, SCIP_CALL, SCIP_CUTOFF, SCIP_DECL_CONSPRESOL(), SCIP_DIDNOTFIND, SCIP_OKAY, and SCIP_REDUCEDDOM.
Referenced by SCIP_DECL_CONSENFOPS().
◆ SCIP_DECL_CONSPRESOL()
|
static |
presolving method of constraint handler
Definition at line 6360 of file cons_abspower.c.
References checkFixedVariables(), NULL, presolveDual(), presolveFindDuplicates(), propagateCons(), propagateVarbounds(), REALABS, SCIP_Bool, SCIP_CALL, SCIP_CONSADDED, SCIP_CUTOFF, SCIP_DECL_CONSRESPROP(), SCIP_DIDNOTFIND, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_PRESOLTIMING_MEDIUM, SCIP_Real, SCIP_REDUCEDDOM, SCIP_SUCCESS, SCIP_VARSTATUS_MULTAGGR, SCIP_VARTYPE_CONTINUOUS, SCIP_VARTYPE_IMPLINT, SCIPABORT, SCIPaddCoefLinear(), SCIPaddCons(), SCIPallowStrongDualReds(), SCIPallowWeakDualReds(), SCIPchgVarType(), SCIPconsGetData(), SCIPconsGetName(), SCIPconshdlrGetData(), SCIPconsIsChecked(), SCIPconsIsDeleted(), SCIPconsIsDynamic(), SCIPconsIsEnforced(), SCIPconsIsInitial(), SCIPconsIsLocal(), SCIPconsIsModifiable(), SCIPconsIsPropagated(), SCIPconsIsRemovable(), SCIPconsIsSeparated(), SCIPconsIsStickingAtNode(), SCIPcreateConsLinear(), SCIPcreateConsVarbound(), SCIPdebugMsg, SCIPdebugPrintCons, SCIPdelCons(), SCIPerrorMessage, SCIPfixVar(), SCIPinfinity(), SCIPisEQ(), SCIPisInfinity(), SCIPisIntegral(), SCIPisZero(), SCIPreleaseCons(), SCIPvarGetName(), SCIPvarGetStatus(), SCIPvarGetType(), SCIPvarIsBinary(), SIGN, and TRUE.
Referenced by SCIP_DECL_CONSPROP().
◆ SCIP_DECL_CONSRESPROP()
|
static |
resolves a propagation on the given variable by supplying the variables needed for applying the corresponding propagation rule (see propagateCons()): (1) left hand side and bounds on z -> lower bound on x (2) left hand side and upper bound on x -> bound on z (3) right hand side and bounds on z -> upper bound on x (4) right hand side and lower bound on x -> bound on z
Definition at line 6683 of file cons_abspower.c.
References NULL, resolvePropagation(), SCIP_CALL, SCIP_DECL_CONSLOCK(), SCIP_OKAY, and SCIP_SUCCESS.
Referenced by SCIP_DECL_CONSPRESOL().
◆ SCIP_DECL_CONSLOCK()
|
static |
variable rounding lock method of constraint handler
Definition at line 6696 of file cons_abspower.c.
References NULL, SCIP_Bool, SCIP_CALL, SCIP_DECL_CONSACTIVE(), SCIP_LOCKTYPE_MODEL, SCIP_OKAY, SCIPaddVarLocksType(), SCIPconsGetData(), and SCIPisInfinity().
Referenced by SCIP_DECL_CONSRESPROP().
◆ SCIP_DECL_CONSACTIVE()
|
static |
constraint activation notification method of constraint handler
Definition at line 6755 of file cons_abspower.c.
References FALSE, NULL, SCIP_DECL_CONSENABLE(), SCIP_OKAY, and SCIPconshdlrGetData().
Referenced by SCIP_DECL_CONSLOCK().
◆ SCIP_DECL_CONSENABLE()
|
static |
constraint enabling notification method of constraint handler
Definition at line 6772 of file cons_abspower.c.
References catchVarEvents(), NULL, SCIP_CALL, SCIP_DECL_CONSDISABLE(), SCIP_OKAY, and SCIPconshdlrGetData().
Referenced by SCIP_DECL_CONSACTIVE().
◆ SCIP_DECL_CONSDISABLE()
|
static |
constraint disabling notification method of constraint handler
Definition at line 6791 of file cons_abspower.c.
References dropVarEvents(), NULL, SCIP_CALL, SCIP_DECL_CONSPRINT(), SCIP_OKAY, and SCIPconshdlrGetData().
Referenced by SCIP_DECL_CONSENABLE().
◆ SCIP_DECL_CONSPRINT()
|
static |
constraint display method of constraint handler
Definition at line 6810 of file cons_abspower.c.
References NULL, SCIP_CALL, SCIP_DECL_CONSCHECK(), SCIP_OKAY, SCIPconsGetData(), SCIPinfoMessage(), SCIPisEQ(), SCIPisInfinity(), SCIPwriteVarName(), and TRUE.
Referenced by SCIP_DECL_CONSDISABLE().
◆ SCIP_DECL_CONSCHECK()
|
static |
feasibility check method of constraint handler for integral solutions
Definition at line 6857 of file cons_abspower.c.
References computeViolation(), MAX, NULL, proposeFeasibleSolution(), SCIP_Bool, SCIP_CALL, SCIP_DECL_CONSCOPY(), SCIP_FEASIBLE, SCIP_INFEASIBLE, SCIP_INVALID, SCIP_OKAY, SCIP_Real, SCIP_STAGE_PROBLEM, SCIP_STAGE_SOLVED, SCIPconsGetData(), SCIPconsGetName(), SCIPconshdlrGetData(), SCIPfeastol(), SCIPgetStage(), SCIPinfoMessage(), SCIPisGT(), SCIPisInfinity(), and SCIPupdateStartpointHeurSubNlp().
Referenced by SCIP_DECL_CONSPRINT().
◆ SCIP_DECL_CONSCOPY()
|
static |
constraint copying method of constraint handler
Definition at line 6924 of file cons_abspower.c.
References FALSE, NULL, SCIP_CALL, SCIP_DECL_CONSPARSE(), SCIP_OKAY, SCIPconsGetData(), SCIPconsGetName(), SCIPcreateConsAbspower(), SCIPgetVarCopy(), TRUE, and x.
Referenced by SCIP_DECL_CONSCHECK().
◆ SCIP_DECL_CONSPARSE()
|
static |
constraint parsing method of constraint handler
Definition at line 6963 of file cons_abspower.c.
References FALSE, NULL, SCIP_CALL, SCIP_DECL_CONSGETVARS(), SCIP_INVALIDDATA, SCIP_OKAY, SCIP_Real, SCIP_VERBLEVEL_MINIMAL, SCIPABORT, SCIPcreateConsAbspower(), SCIPdebugMsg, SCIPinfinity(), SCIPparseVarName(), SCIPstrToRealValue(), SCIPverbMessage(), TRUE, and x.
Referenced by SCIP_DECL_CONSCOPY().
◆ SCIP_DECL_CONSGETVARS()
|
static |
constraint method of constraint handler which returns the variables (if possible)
Definition at line 7126 of file cons_abspower.c.
References FALSE, NULL, SCIP_DECL_CONSGETNVARS(), SCIP_OKAY, SCIPconsGetData(), and TRUE.
Referenced by SCIP_DECL_CONSPARSE().
◆ SCIP_DECL_CONSGETNVARS()
|
static |
constraint method of constraint handler which returns the number of variables (if possible)
Definition at line 7149 of file cons_abspower.c.
References SCIP_OKAY, SCIPincludeConshdlrAbspower(), and TRUE.
Referenced by SCIP_DECL_CONSGETVARS().
Variable Documentation
◆ roots
|
static |
The positive root of the polynomial (n-1) y^n + n y^(n-1) - 1 is needed in separation. Here we store these roots for small integer values of n.
Definition at line 122 of file cons_abspower.c.
Referenced by reduce_daPcMw(), and SCIP_DECL_CONSINITSOL().