|
|
Constraint handler for linear constraints in their most general form, .
- Author
- Tobias Achterberg
-
Timo Berthold
-
Marc Pfetsch
-
Kati Wolter
-
Michael Winkler
-
Gerald Gamrath
-
Domenico Salvagnin
Linear constraints are separated with a high priority, because they are easy to separate. Instead of using the global cut pool, the same effect can be implemented by adding linear constraints to the root node, such that they are separated each time, the linear constraints are separated. A constraint handler, which generates linear constraints in this way should have a lower separation priority than the linear constraint handler, and it should have a separation frequency that is a multiple of the frequency of the linear constraint handler. In this way, it can be avoided to separate the same cut twice, because if a separation run of the handler is always preceded by a separation of the linear constraints, the priorily added constraints are always satisfied.
Linear constraints are enforced and checked with a very low priority. Checking of (many) linear constraints is much more involved than checking the solution values for integrality. Because we are separating the linear constraints quite often, it is only necessary to enforce them for integral solutions. A constraint handler which generates pool cuts in its enforcing method should have an enforcing priority smaller than that of the linear constraint handler to avoid regenerating constraints which already exist.
Definition in file cons_linear.c.
#include <assert.h>
#include <string.h>
#include <limits.h>
#include <ctype.h>
#include "scip/cons_linear.h"
#include "scip/cons_knapsack.h"
#include "scip/cons_quadratic.h"
#include "scip/cons_nonlinear.h"
#include "scip/pub_misc.h"
#include "scip/debug.h"
Go to the source code of this file.
|
| 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_INVALID = 0,
PROPRULE_1,
PROPRULE_2,
PROPRULE_3,
PROPRULE_4,
PROPRULE_INVALID,
PROPRULE_1,
PROPRULE_2,
PROPRULE_3,
PROPRULE_4,
PROPRULE_0,
PROPRULE_1,
PROPRULE_INTLB,
PROPRULE_INTUB,
PROPRULE_INVALID
} |
| |
|
| static INFERINFO | intToInferInfo (int i) |
| |
| static int | inferInfoToInt (INFERINFO inferinfo) |
| |
| static int | inferInfoGetProprule (INFERINFO inferinfo) |
| |
| static int | inferInfoGetPos (INFERINFO inferinfo) |
| |
| static INFERINFO | getInferInfo (PROPRULE proprule, int pos) |
| |
| static int | getInferInt (PROPRULE proprule, int pos) |
| |
| static SCIP_RETCODE | conshdlrdataEnsureLinconsupgradesSize (SCIP *scip, SCIP_CONSHDLRDATA *conshdlrdata, int num) |
| |
| static SCIP_RETCODE | consdataEnsureVarsSize (SCIP *scip, SCIP_CONSDATA *consdata, int num) |
| |
| static SCIP_RETCODE | linconsupgradeCreate (SCIP *scip, SCIP_LINCONSUPGRADE **linconsupgrade, SCIP_DECL_LINCONSUPGD((*linconsupgd)), int priority) |
| |
| static void | linconsupgradeFree (SCIP *scip, SCIP_LINCONSUPGRADE **linconsupgrade) |
| |
| static SCIP_RETCODE | conshdlrdataCreate (SCIP *scip, SCIP_CONSHDLRDATA **conshdlrdata, SCIP_EVENTHDLR *eventhdlr) |
| |
| static void | conshdlrdataFree (SCIP *scip, SCIP_CONSHDLRDATA **conshdlrdata) |
| |
| static SCIP_Bool | conshdlrdataHasUpgrade (SCIP *scip, SCIP_CONSHDLRDATA *conshdlrdata, SCIP_DECL_LINCONSUPGD((*linconsupgd)), const char *conshdlrname) |
| |
| static SCIP_RETCODE | conshdlrdataIncludeUpgrade (SCIP *scip, SCIP_CONSHDLRDATA *conshdlrdata, SCIP_LINCONSUPGRADE *linconsupgrade) |
| |
| static SCIP_RETCODE | lockRounding (SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_Real val) |
| |
| static SCIP_RETCODE | unlockRounding (SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_Real val) |
| |
| static SCIP_RETCODE | consCatchEvent (SCIP *scip, SCIP_CONS *cons, SCIP_EVENTHDLR *eventhdlr, int pos) |
| |
| static SCIP_RETCODE | consDropEvent (SCIP *scip, SCIP_CONS *cons, SCIP_EVENTHDLR *eventhdlr, int pos) |
| |
| static SCIP_RETCODE | consCatchAllEvents (SCIP *scip, SCIP_CONS *cons, SCIP_EVENTHDLR *eventhdlr) |
| |
| static SCIP_RETCODE | consDropAllEvents (SCIP *scip, SCIP_CONS *cons, SCIP_EVENTHDLR *eventhdlr) |
| |
| static SCIP_Bool | needEvents (SCIP *scip) |
| |
| static SCIP_RETCODE | consdataCreate (SCIP *scip, SCIP_CONSDATA **consdata, int nvars, SCIP_VAR **vars, SCIP_Real *vals, SCIP_Real lhs, SCIP_Real rhs) |
| |
| static SCIP_RETCODE | consdataFree (SCIP *scip, SCIP_CONSDATA **consdata) |
| |
| static SCIP_RETCODE | consdataPrint (SCIP *scip, SCIP_CONSDATA *consdata, FILE *file) |
| |
| static void | consdataInvalidateActivities (SCIP_CONSDATA *consdata) |
| |
| static SCIP_Real | consdataComputePseudoActivity (SCIP *scip, SCIP_CONSDATA *consdata) |
| |
| static void | consdataRecomputeMinactivity (SCIP *scip, SCIP_CONSDATA *consdata) |
| |
| static void | consdataRecomputeMaxactivity (SCIP *scip, SCIP_CONSDATA *consdata) |
| |
| static void | consdataRecomputeGlbMinactivity (SCIP *scip, SCIP_CONSDATA *consdata) |
| |
| static void | consdataRecomputeGlbMaxactivity (SCIP *scip, SCIP_CONSDATA *consdata) |
| |
| static void | consdataCalcMaxAbsval (SCIP_CONSDATA *consdata) |
| |
| static void | consdataCheckNonbinvar (SCIP_CONSDATA *consdata) |
| |
| static void | consdataRecomputeMaxActivityDelta (SCIP *scip, SCIP_CONSDATA *consdata) |
| |
| static void | consdataUpdateActivities (SCIP *scip, SCIP_CONSDATA *consdata, SCIP_VAR *var, SCIP_Real oldbound, SCIP_Real newbound, SCIP_Real val, SCIP_BOUNDTYPE boundtype, SCIP_Bool global, SCIP_Bool checkreliability) |
| |
| static void | consdataUpdateActivitiesLb (SCIP *scip, SCIP_CONSDATA *consdata, SCIP_VAR *var, SCIP_Real oldlb, SCIP_Real newlb, SCIP_Real val, SCIP_Bool checkreliability) |
| |
| static void | consdataUpdateActivitiesUb (SCIP *scip, SCIP_CONSDATA *consdata, SCIP_VAR *var, SCIP_Real oldub, SCIP_Real newub, SCIP_Real val, SCIP_Bool checkreliability) |
| |
| static void | consdataUpdateActivitiesGlbLb (SCIP *scip, SCIP_CONSDATA *consdata, SCIP_Real oldlb, SCIP_Real newlb, SCIP_Real val, SCIP_Bool checkreliability) |
| |
| static void | consdataUpdateActivitiesGlbUb (SCIP *scip, SCIP_CONSDATA *consdata, SCIP_Real oldub, SCIP_Real newub, SCIP_Real val, SCIP_Bool checkreliability) |
| |
| static void | consdataUpdateAddCoef (SCIP *scip, SCIP_CONSDATA *consdata, SCIP_VAR *var, SCIP_Real val, SCIP_Bool checkreliability) |
| |
| static void | consdataUpdateDelCoef (SCIP *scip, SCIP_CONSDATA *consdata, SCIP_VAR *var, SCIP_Real val, SCIP_Bool checkreliability) |
| |
| static void | consdataUpdateChgCoef (SCIP *scip, SCIP_CONSDATA *consdata, SCIP_VAR *var, SCIP_Real oldval, SCIP_Real newval, SCIP_Bool checkreliability) |
| |
| static SCIP_Real | consdataGetMaxAbsval (SCIP_CONSDATA *consdata) |
| |
| static void | consdataCalcActivities (SCIP *scip, SCIP_CONSDATA *consdata) |
| |
| static void | getMinActivity (SCIP *scip, SCIP_CONSDATA *consdata, int posinf, int neginf, int poshuge, int neghuge, SCIP_Real delta, SCIP_Bool global, SCIP_Bool goodrelax, SCIP_Real *minactivity, SCIP_Bool *isrelax, SCIP_Bool *issettoinfinity) |
| |
| static void | getMaxActivity (SCIP *scip, SCIP_CONSDATA *consdata, int posinf, int neginf, int poshuge, int neghuge, SCIP_Real delta, SCIP_Bool global, SCIP_Bool goodrelax, SCIP_Real *maxactivity, SCIP_Bool *isrelax, SCIP_Bool *issettoinfinity) |
| |
| static void | consdataGetActivityBounds (SCIP *scip, SCIP_CONSDATA *consdata, SCIP_Bool goodrelax, SCIP_Real *minactivity, SCIP_Real *maxactivity, SCIP_Bool *minisrelax, SCIP_Bool *maxisrelax) |
| |
| static void | consdataGetReliableResidualActivity (SCIP *scip, SCIP_CONSDATA *consdata, SCIP_VAR *cancelvar, SCIP_Real *resactivity, SCIP_Bool isminresact, SCIP_Bool useglobalbounds) |
| |
| static void | consdataGetActivityResiduals (SCIP *scip, SCIP_CONSDATA *consdata, SCIP_VAR *var, SCIP_Real val, SCIP_Bool goodrelax, SCIP_Real *minresactivity, SCIP_Real *maxresactivity, SCIP_Bool *minisrelax, SCIP_Bool *maxisrelax, SCIP_Bool *isminsettoinfinity, SCIP_Bool *ismaxsettoinfinity) |
| |
| static void | consdataGetGlbActivityBounds (SCIP *scip, SCIP_CONSDATA *consdata, SCIP_Bool goodrelax, SCIP_Real *glbminactivity, SCIP_Real *glbmaxactivity, SCIP_Bool *minisrelax, SCIP_Bool *maxisrelax, SCIP_Bool *isminsettoinfinity, SCIP_Bool *ismaxsettoinfinity) |
| |
| static void | consdataGetGlbActivityResiduals (SCIP *scip, SCIP_CONSDATA *consdata, SCIP_VAR *var, SCIP_Real val, SCIP_Bool goodrelax, SCIP_Real *minresactivity, SCIP_Real *maxresactivity, SCIP_Bool *minisrelax, SCIP_Bool *maxisrelax, SCIP_Bool *isminsettoinfinity, SCIP_Bool *ismaxsettoinfinity) |
| |
| static SCIP_Real | consdataGetActivity (SCIP *scip, SCIP_CONSDATA *consdata, SCIP_SOL *sol) |
| |
| static SCIP_Real | consdataGetFeasibility (SCIP *scip, SCIP_CONSDATA *consdata, SCIP_SOL *sol) |
| |
| static SCIP_Longint | getVarSignature (SCIP_VAR *var) |
| |
| static void | consdataUpdateSignatures (SCIP_CONSDATA *consdata, int pos) |
| |
| static void | consdataCalcSignatures (SCIP_CONSDATA *consdata) |
| |
| static | SCIP_DECL_SORTINDCOMP (consdataCompVar) |
| |
| static void | permSortConsdata (SCIP_CONSDATA *consdata, int *perm, int nvars) |
| |
| static SCIP_RETCODE | consdataSort (SCIP *scip, SCIP_CONSDATA *consdata) |
| |
| static SCIP_RETCODE | chgLhs (SCIP *scip, SCIP_CONS *cons, SCIP_Real lhs) |
| |
| static SCIP_RETCODE | chgRhs (SCIP *scip, SCIP_CONS *cons, SCIP_Real rhs) |
| |
| static SCIP_RETCODE | addCoef (SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_Real val) |
| |
| static SCIP_RETCODE | delCoefPos (SCIP *scip, SCIP_CONS *cons, int pos) |
| |
| static SCIP_RETCODE | chgCoefPos (SCIP *scip, SCIP_CONS *cons, int pos, SCIP_Real newval) |
| |
| static SCIP_RETCODE | scaleCons (SCIP *scip, SCIP_CONS *cons, SCIP_Real scalar) |
| |
| static SCIP_RETCODE | performVarDeletions (SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS **conss, int nconss) |
| |
| static SCIP_RETCODE | normalizeCons (SCIP *scip, SCIP_CONS *cons) |
| |
| static SCIP_RETCODE | mergeMultiples (SCIP *scip, SCIP_CONS *cons) |
| |
| static SCIP_RETCODE | applyFixings (SCIP *scip, SCIP_CONS *cons, SCIP_Bool *infeasible) |
| |
| static SCIP_RETCODE | addConflictBounds (SCIP *scip, SCIP_CONS *cons, SCIP_VAR *infervar, SCIP_BDCHGIDX *bdchgidx, int inferpos, SCIP_Bool reasonisrhs) |
| |
| static SCIP_RETCODE | resolvePropagation (SCIP *scip, SCIP_CONS *cons, SCIP_VAR *infervar, INFERINFO inferinfo, SCIP_BOUNDTYPE boundtype, SCIP_BDCHGIDX *bdchgidx, SCIP_RESULT *result) |
| |
| static SCIP_RETCODE | analyzeConflict (SCIP *scip, SCIP_CONS *cons, SCIP_Bool reasonisrhs) |
| |
| static SCIP_Bool | canTightenBounds (SCIP *scip, SCIP_CONS *cons) |
| |
| static SCIP_RETCODE | tightenVarUb (SCIP *scip, SCIP_CONS *cons, int pos, PROPRULE proprule, SCIP_Real newub, SCIP_Real oldub, SCIP_Bool *cutoff, int *nchgbds, SCIP_Bool force) |
| |
| static SCIP_RETCODE | tightenVarLb (SCIP *scip, SCIP_CONS *cons, int pos, PROPRULE proprule, SCIP_Real newlb, SCIP_Real oldlb, SCIP_Bool *cutoff, int *nchgbds, SCIP_Bool force) |
| |
| static SCIP_RETCODE | tightenVarBoundsEasy (SCIP *scip, SCIP_CONS *cons, int pos, SCIP_Bool *cutoff, int *nchgbds, SCIP_Bool force) |
| |
| static SCIP_RETCODE | tightenVarBounds (SCIP *scip, SCIP_CONS *cons, int pos, SCIP_Bool *cutoff, int *nchgbds, SCIP_Bool force) |
| |
| static SCIP_RETCODE | tightenBounds (SCIP *scip, SCIP_CONS *cons, SCIP_Bool sortvars, SCIP_Bool *cutoff, int *nchgbds) |
| |
| static SCIP_RETCODE | checkCons (SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol, SCIP_Bool checklprows, SCIP_Bool checkrelmaxabs, SCIP_Bool *violated) |
| |
| static SCIP_RETCODE | createRow (SCIP *scip, SCIP_CONS *cons) |
| |
| static SCIP_RETCODE | addRelaxation (SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol, SCIP_Bool *cutoff) |
| |
| static SCIP_RETCODE | separateCons (SCIP *scip, SCIP_CONS *cons, SCIP_CONSHDLRDATA *conshdlrdata, SCIP_SOL *sol, SCIP_Bool separatecards, SCIP_Bool separateall, int *ncuts, SCIP_Bool *cutoff) |
| |
| static SCIP_RETCODE | propagateCons (SCIP *scip, SCIP_CONS *cons, SCIP_Bool tightenbounds, SCIP_Bool sortvars, SCIP_Bool *cutoff, int *nchgbds) |
| |
| static SCIP_RETCODE | fixVariables (SCIP *scip, SCIP_CONS *cons, SCIP_Bool *cutoff, int *nfixedvars) |
| |
| static SCIP_RETCODE | extractCliques (SCIP *scip, SCIP_CONS *cons, SCIP_Bool sortvars, int *nfixedvars, int *nchgbds, SCIP_Bool *cutoff) |
| |
| static SCIP_RETCODE | tightenSides (SCIP *scip, SCIP_CONS *cons, int *nchgsides) |
| |
| static SCIP_RETCODE | consdataTightenCoefs (SCIP *scip, SCIP_CONS *cons, int *nchgcoefs, int *nchgsides) |
| |
| static SCIP_RETCODE | convertUnaryEquality (SCIP *scip, SCIP_CONS *cons, SCIP_Bool *cutoff, int *nfixedvars, int *ndelconss) |
| |
| static SCIP_RETCODE | convertBinaryEquality (SCIP *scip, SCIP_CONS *cons, SCIP_Bool *cutoff, int *naggrvars, int *ndelconss) |
| |
| static void | getNewSidesAfterAggregation (SCIP *scip, SCIP_CONSDATA *consdata, SCIP_VAR *slackvar, SCIP_Real slackcoef, SCIP_Real *newlhs, SCIP_Real *newrhs) |
| |
| static SCIP_RETCODE | convertLongEquality (SCIP *scip, SCIP_CONS *cons, SCIP_Bool *cutoff, int *naggrvars, int *ndelconss) |
| |
| static SCIP_Bool | checkEqualObjective (SCIP *scip, SCIP_CONSDATA *consdata, SCIP_Real *scale, SCIP_Real *offset) |
| |
| static SCIP_RETCODE | checkPartialObjective (SCIP *scip, SCIP_CONS *cons, SCIP_CONSHDLRDATA *conshdlrdata) |
| |
| static SCIP_RETCODE | updateCutoffbound (SCIP *scip, SCIP_CONS *cons, SCIP_Real primalbound) |
| |
| static SCIP_RETCODE | checkParallelObjective (SCIP *scip, SCIP_CONS *cons, SCIP_CONSHDLRDATA *conshdlrdata) |
| |
| static SCIP_RETCODE | convertEquality (SCIP *scip, SCIP_CONS *cons, SCIP_CONSHDLRDATA *conshdlrdata, SCIP_Bool *cutoff, int *nfixedvars, int *naggrvars, int *ndelconss) |
| |
| static SCIP_Bool | consdataIsResidualIntegral (SCIP *scip, SCIP_CONSDATA *consdata, int pos, SCIP_Real val) |
| |
| static void | calculateMinvalAndMaxval (SCIP *scip, SCIP_Real side, SCIP_Real val, SCIP_Real minresactivity, SCIP_Real maxresactivity, SCIP_Real *minval, SCIP_Real *maxval) |
| |
| static SCIP_RETCODE | dualPresolve (SCIP *scip, SCIP_CONS *cons, SCIP_Bool *cutoff, int *nfixedvars, int *naggrvars, int *ndelconss) |
| |
| static int | getVarWeight (SCIP_VAR *var) |
| |
| static SCIP_RETCODE | aggregateVariables (SCIP *scip, SCIP_CONS *cons, SCIP_Bool *cutoff, int *nfixedvars, int *naggrvars, int *ndelconss) |
| |
| static | SCIP_DECL_SORTINDCOMP (consdataCompSim) |
| |
| static SCIP_RETCODE | rangedRowSimplify (SCIP *scip, SCIP_CONS *cons, int *nchgcoefs, int *nchgsides) |
| |
| static SCIP_RETCODE | simplifyInequalities (SCIP *scip, SCIP_CONS *cons, int *nchgcoefs, int *nchgsides) |
| |
| static SCIP_RETCODE | aggregateConstraints (SCIP *scip, SCIP_CONS *cons0, SCIP_CONS *cons1, int *commonidx0, int *commonidx1, int *diffidx0minus1, int *diffidx1minus0, int nvarscommon, int commonidxweight, int diffidx0minus1weight, int diffidx1minus0weight, SCIP_Real maxaggrnormscale, int *nchgcoefs, SCIP_Bool *aggregated) |
| |
| static | SCIP_DECL_HASHGETKEY (hashGetKeyLinearcons) |
| |
| static | SCIP_DECL_HASHKEYEQ (hashKeyEqLinearcons) |
| |
| static | SCIP_DECL_HASHKEYVAL (hashKeyValLinearcons) |
| |
| static SCIP_RETCODE | detectRedundantConstraints (SCIP *scip, BMS_BLKMEM *blkmem, SCIP_CONS **conss, int nconss, int *firstchange, SCIP_Bool *cutoff, int *ndelconss, int *nchgsides) |
| |
| static SCIP_RETCODE | preprocessConstraintPairs (SCIP *scip, SCIP_CONS **conss, int firstchange, int chkind, SCIP_Real maxaggrnormscale, SCIP_Bool *cutoff, int *ndelconss, int *nchgsides, int *nchgcoefs) |
| |
| static SCIP_RETCODE | fullDualPresolve (SCIP *scip, SCIP_CONS **conss, int nconss, SCIP_Bool *cutoff, int *nchgbds) |
| |
| static | SCIP_DECL_CONSHDLRCOPY (conshdlrCopyLinear) |
| |
| static | SCIP_DECL_CONSFREE (consFreeLinear) |
| |
| static | SCIP_DECL_CONSINIT (consInitLinear) |
| |
| static | SCIP_DECL_CONSEXIT (consExitLinear) |
| |
| static | SCIP_DECL_CONSEXITPRE (consExitpreLinear) |
| |
| static | SCIP_DECL_CONSEXITSOL (consExitsolLinear) |
| |
| static | SCIP_DECL_CONSDELETE (consDeleteLinear) |
| |
| static | SCIP_DECL_CONSTRANS (consTransLinear) |
| |
| static | SCIP_DECL_CONSINITLP (consInitlpLinear) |
| |
| static | SCIP_DECL_CONSSEPALP (consSepalpLinear) |
| |
| static | SCIP_DECL_CONSSEPASOL (consSepasolLinear) |
| |
| static | SCIP_DECL_CONSENFOLP (consEnfolpLinear) |
| |
| static | SCIP_DECL_CONSENFOPS (consEnfopsLinear) |
| |
| static | SCIP_DECL_CONSCHECK (consCheckLinear) |
| |
| static | SCIP_DECL_CONSPROP (consPropLinear) |
| |
| static | SCIP_DECL_CONSPRESOL (consPresolLinear) |
| |
| static | SCIP_DECL_CONSRESPROP (consRespropLinear) |
| |
| static | SCIP_DECL_CONSLOCK (consLockLinear) |
| |
| static | SCIP_DECL_CONSDELVARS (consDelvarsLinear) |
| |
| static | SCIP_DECL_CONSPRINT (consPrintLinear) |
| |
| static | SCIP_DECL_CONSCOPY (consCopyLinear) |
| |
| static | SCIP_DECL_CONSPARSE (consParseLinear) |
| |
| static | SCIP_DECL_CONSGETVARS (consGetVarsLinear) |
| |
| static | SCIP_DECL_CONSGETNVARS (consGetNVarsLinear) |
| |
| static | SCIP_DECL_EVENTEXEC (eventExecLinear) |
| |
| static | SCIP_DECL_CONFLICTEXEC (conflictExecLinear) |
| |
| static | SCIP_DECL_QUADCONSUPGD (upgradeConsQuadratic) |
| |
| static | SCIP_DECL_NONLINCONSUPGD (upgradeConsNonlinear) |
| |
| SCIP_RETCODE | SCIPincludeConshdlrLinear (SCIP *scip) |
| |
| SCIP_RETCODE | SCIPincludeLinconsUpgrade (SCIP *scip, SCIP_DECL_LINCONSUPGD((*linconsupgd)), int priority, const char *conshdlrname) |
| |
| SCIP_RETCODE | SCIPcreateConsLinear (SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, SCIP_Real *vals, 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 | SCIPcreateConsBasicLinear (SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, SCIP_Real *vals, SCIP_Real lhs, SCIP_Real rhs) |
| |
| SCIP_RETCODE | SCIPcopyConsLinear (SCIP *scip, SCIP_CONS **cons, SCIP *sourcescip, const char *name, int nvars, SCIP_VAR **sourcevars, SCIP_Real *sourcecoefs, SCIP_Real lhs, SCIP_Real rhs, SCIP_HASHMAP *varmap, SCIP_HASHMAP *consmap, 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_Bool global, SCIP_Bool *valid) |
| |
| SCIP_RETCODE | SCIPaddCoefLinear (SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_Real val) |
| |
| SCIP_Real | SCIPgetLhsLinear (SCIP *scip, SCIP_CONS *cons) |
| |
| SCIP_Real | SCIPgetRhsLinear (SCIP *scip, SCIP_CONS *cons) |
| |
| SCIP_RETCODE | SCIPchgLhsLinear (SCIP *scip, SCIP_CONS *cons, SCIP_Real lhs) |
| |
| SCIP_RETCODE | SCIPchgRhsLinear (SCIP *scip, SCIP_CONS *cons, SCIP_Real rhs) |
| |
| int | SCIPgetNVarsLinear (SCIP *scip, SCIP_CONS *cons) |
| |
| SCIP_VAR ** | SCIPgetVarsLinear (SCIP *scip, SCIP_CONS *cons) |
| |
| SCIP_Real * | SCIPgetValsLinear (SCIP *scip, SCIP_CONS *cons) |
| |
| SCIP_Real | SCIPgetActivityLinear (SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol) |
| |
| SCIP_Real | SCIPgetFeasibilityLinear (SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol) |
| |
| SCIP_Real | SCIPgetDualsolLinear (SCIP *scip, SCIP_CONS *cons) |
| |
| SCIP_Real | SCIPgetDualfarkasLinear (SCIP *scip, SCIP_CONS *cons) |
| |
| SCIP_ROW * | SCIPgetRowLinear (SCIP *scip, SCIP_CONS *cons) |
| |
| SCIP_RETCODE | SCIPupgradeConsLinear (SCIP *scip, SCIP_CONS *cons, SCIP_CONS **upgdcons) |
| |
| #define CONSHDLR_NAME "linear" |
| #define CONSHDLR_DESC "linear constraints of the form lhs <= a^T x <= rhs" |
| #define CONSHDLR_SEPAPRIORITY +100000 |
priority of the constraint handler for separation
Definition at line 63 of file cons_linear.c.
| #define CONSHDLR_ENFOPRIORITY -1000000 |
priority of the constraint handler for constraint enforcing
Definition at line 64 of file cons_linear.c.
| #define CONSHDLR_CHECKPRIORITY -1000000 |
priority of the constraint handler for checking feasibility
Definition at line 65 of file cons_linear.c.
| #define CONSHDLR_SEPAFREQ 0 |
frequency for separating cuts; zero means to separate only in the root node
Definition at line 66 of file cons_linear.c.
| #define CONSHDLR_PROPFREQ 1 |
frequency for propagating domains; zero means only preprocessing propagation
Definition at line 67 of file cons_linear.c.
| #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 68 of file cons_linear.c.
| #define CONSHDLR_MAXPREROUNDS -1 |
maximal number of presolving rounds the constraint handler participates in (-1: no limit)
Definition at line 71 of file cons_linear.c.
| #define CONSHDLR_DELAYSEPA FALSE |
should separation method be delayed, if other separators found cuts?
Definition at line 72 of file cons_linear.c.
| #define CONSHDLR_DELAYPROP FALSE |
should propagation method be delayed, if other propagators found reductions?
Definition at line 73 of file cons_linear.c.
| #define CONSHDLR_DELAYPRESOL FALSE |
should presolving method be delayed, if other presolvers found reductions?
Definition at line 74 of file cons_linear.c.
| #define CONSHDLR_NEEDSCONS TRUE |
should the constraint handler be skipped, if no constraints are available?
Definition at line 75 of file cons_linear.c.
| #define EVENTHDLR_NAME "linear" |
| #define EVENTHDLR_DESC "bound change event handler for linear constraints" |
| #define CONFLICTHDLR_NAME "linear" |
| #define CONFLICTHDLR_DESC "conflict handler creating linear constraints" |
| #define CONFLICTHDLR_PRIORITY -1000000 |
| #define DEFAULT_TIGHTENBOUNDSFREQ 1 |
multiplier on propagation frequency, how often the bounds are tightened
Definition at line 86 of file cons_linear.c.
| #define DEFAULT_MAXROUNDS 5 |
maximal number of separation rounds per node (-1: unlimited)
Definition at line 87 of file cons_linear.c.
| #define DEFAULT_MAXROUNDSROOT -1 |
maximal number of separation rounds in the root node (-1: unlimited)
Definition at line 88 of file cons_linear.c.
| #define DEFAULT_MAXSEPACUTS 50 |
maximal number of cuts separated per separation round
Definition at line 89 of file cons_linear.c.
| #define DEFAULT_MAXSEPACUTSROOT 200 |
maximal number of cuts separated per separation round in root node
Definition at line 90 of file cons_linear.c.
| #define DEFAULT_PRESOLPAIRWISE TRUE |
should pairwise constraint comparison be performed in presolving?
Definition at line 91 of file cons_linear.c.
| #define DEFAULT_PRESOLUSEHASHING TRUE |
should hash table be used for detecting redundant constraints in advance
Definition at line 92 of file cons_linear.c.
| #define DEFAULT_NMINCOMPARISONS 200000 |
number for minimal pairwise presolving comparisons
Definition at line 93 of file cons_linear.c.
| #define DEFAULT_MINGAINPERNMINCOMP 1e-06 |
minimal gain per minimal pairwise presolving comparisons to repeat pairwise comparison round
Definition at line 94 of file cons_linear.c.
| #define DEFAULT_SORTVARS TRUE |
should variables be sorted after presolve w.r.t their coefficient absolute for faster propagation?
Definition at line 97 of file cons_linear.c.
| #define DEFAULT_CHECKRELMAXABS FALSE |
should the violation for a constraint with side 0.0 be checked relative to 1.0 (FALSE) or to the maximum absolute value in the activity (TRUE)?
Definition at line 100 of file cons_linear.c.
| #define DEFAULT_MAXAGGRNORMSCALE 0.0 |
maximal allowed relative gain in maximum norm for constraint aggregation (0.0: disable constraint aggregation)
Definition at line 103 of file cons_linear.c.
| #define DEFAULT_MAXCARDBOUNDDIST 0.0 |
maximal relative distance from current node's dual bound to primal bound compared to best node's dual bound for separating knapsack cardinality cuts
Definition at line 106 of file cons_linear.c.
| #define DEFAULT_SEPARATEALL FALSE |
should all constraints be subject to cardinality cut generation instead of only the ones with non-zero dual value?
Definition at line 109 of file cons_linear.c.
| #define DEFAULT_AGGREGATEVARIABLES TRUE |
should presolving search for redundant variables in equations
Definition at line 112 of file cons_linear.c.
| #define DEFAULT_SIMPLIFYINEQUALITIES TRUE |
should presolving try to simplify inequalities
Definition at line 113 of file cons_linear.c.
| #define DEFAULT_DUALPRESOLVING TRUE |
should dual presolving steps be performed?
Definition at line 114 of file cons_linear.c.
| #define DEFAULT_DETECTCUTOFFBOUND TRUE |
should presolving try to detect constraints parallel to the objective function defining an upper bound and prevent these constraints from entering the LP
Definition at line 115 of file cons_linear.c.
| #define DEFAULT_DETECTLOWERBOUND TRUE |
should presolving try to detect constraints parallel to the objective function defining a lower bound and prevent these constraints from entering the LP
Definition at line 120 of file cons_linear.c.
| #define DEFAULT_DETECTPARTIALOBJECTIVE TRUE |
should presolving try to detect subsets of constraints parallel to the objective function
Definition at line 125 of file cons_linear.c.
| #define MAXSCALEDCOEF 1e+03 |
maximal coefficient value after scaling
Definition at line 130 of file cons_linear.c.
| #define MAXSCALEDCOEFINTEGER 1e+05 |
maximal coefficient value after scaling if all variables are of integral type
Definition at line 131 of file cons_linear.c.
| #define HASHSIZE_LINEARCONS 131101 |
minimal size of hash table in linear constraint tables
Definition at line 137 of file cons_linear.c.
| #define QUADCONSUPGD_PRIORITY 1000000 |
priority of the constraint handler for upgrading of quadratic constraints
Definition at line 139 of file cons_linear.c.
| #define NONLINCONSUPGD_PRIORITY 1000000 |
priority of the constraint handler for upgrading of nonlinear constraints
Definition at line 140 of file cons_linear.c.
| #define checkMaxActivityDelta |
( |
|
scip, |
|
|
|
consdata |
|
) |
| |
| #define MAXTIGHTENROUNDS 10 |
| #define MAXACTIVITYDELTATHR 1e6 |
| #define MAX_CLIQUE_NONZEROS_PER_CONS 1000000 |
| #define MAXVALRECOMP 1e+06 |
| #define MAXMULTIAGGRQUOTIENT 1e+03 |
| #define MAXCONSPRESOLROUNDS 10 |
| Enumerator |
|---|
| PROPRULE_1 |
left hand side and bounds on z -> lower bound on x
|
| PROPRULE_2 |
left hand side and upper bound on x -> bound on z
|
| PROPRULE_3 |
right hand side and bounds on z -> upper bound on x
|
| PROPRULE_4 |
right hand side and lower bound on x -> bound on z
|
| PROPRULE_INVALID |
propagation was applied without a specific propagation rule
|
| PROPRULE_INVALID |
propagation was applied without a specific propagation rule
|
| PROPRULE_1 |
v_i = FALSE => r = FALSE
|
| PROPRULE_2 |
r = TRUE => v_i = TRUE for all i
|
| PROPRULE_3 |
v_i = TRUE for all i => r = TRUE
|
| PROPRULE_4 |
r = FALSE, v_i = TRUE for all i except j => v_j = FALSE
|
| PROPRULE_1_CORETIMES |
core-time propagator
|
| PROPRULE_2_EDGEFINDING |
edge-finder
|
| PROPRULE_3_TTEF |
time-table edeg-finding
|
| PROPRULE_1_RHS |
activity residuals of all other variables tighten bounds of single variable due to the right hand side of the inequality
|
| PROPRULE_1_LHS |
activity residuals of all other variables tighten bounds of single variable due to the left hand side of the inequality
|
| PROPRULE_INVALID |
propagation was applied without a specific propagation rule
|
| PROPRULE_1 |
v_i = TRUE => r = TRUE
|
| PROPRULE_2 |
r = FALSE => v_i = FALSE for all i
|
| PROPRULE_3 |
v_i = FALSE for all i => r = FALSE
|
| PROPRULE_4 |
r = TRUE, v_i = FALSE for all i except j => v_j = TRUE
|
| PROPRULE_INVALID |
propagation was applied without a specific propagation rule
|
| PROPRULE_1 |
left hand side and bounds on y -> lower bound on x
|
| PROPRULE_2 |
left hand side and upper bound on x -> bound on y
|
| PROPRULE_3 |
right hand side and bounds on y -> upper bound on x
|
| PROPRULE_4 |
right hand side and lower bound on x -> bound on y
|
| PROPRULE_0 |
all variables are fixed => fix integral variable
|
| PROPRULE_1 |
all except one variable fixed => fix remaining variable
|
| PROPRULE_INTLB |
lower bound propagation of integral variable
|
| PROPRULE_INTUB |
upper bound propagation of integral variable
|
| PROPRULE_INVALID |
propagation was applied without a specific propagation rule
|
Definition at line 308 of file cons_linear.c.
converts an integer into an inference information
- Parameters
-
Definition at line 335 of file cons_linear.c.
| static int inferInfoToInt |
( |
INFERINFO |
inferinfo | ) |
|
|
static |
converts an inference information into an int
- Parameters
-
| inferinfo | inference information to convert |
Definition at line 348 of file cons_linear.c.
Referenced by getInferInfo().
| static int inferInfoGetProprule |
( |
INFERINFO |
inferinfo | ) |
|
|
static |
returns the propagation rule stored in the inference information
- Parameters
-
| inferinfo | inference information to convert |
Definition at line 357 of file cons_linear.c.
| static int inferInfoGetPos |
( |
INFERINFO |
inferinfo | ) |
|
|
static |
returns the position stored in the inference information
- Parameters
-
| inferinfo | inference information to convert |
Definition at line 366 of file cons_linear.c.
constructs an inference information out of a propagation rule and a position number
- Parameters
-
| proprule | propagation rule that deduced the value |
| pos | variable position, the propagation rule was applied at |
Definition at line 375 of file cons_linear.c.
References inferInfoToInt().
| static int getInferInt |
( |
PROPRULE |
proprule, |
|
|
int |
pos |
|
) |
| |
|
static |
constructs an inference information out of a propagation rule and a position number, returns info as int
- Parameters
-
| proprule | propagation rule that deduced the value |
| pos | variable position, the propagation rule was applied at |
Definition at line 391 of file cons_linear.c.
References NULL.
ensures, that linconsupgrades array can store at least num entries
- Parameters
-
| scip | SCIP data structure |
| conshdlrdata | linear constraint handler data |
| num | minimum number of entries to store |
Definition at line 406 of file cons_linear.c.
ensures, that vars and vals arrays can store at least num entries
- Parameters
-
| scip | SCIP data structure |
| consdata | linear constraint data |
| num | minimum number of entries to store |
Definition at line 431 of file cons_linear.c.
creates a linear constraint upgrade data object
- Parameters
-
| scip | SCIP data structure |
| linconsupgrade | pointer to store the linear constraint upgrade |
| priority | priority of upgrading method |
Definition at line 466 of file cons_linear.c.
frees a linear constraint upgrade data object
- Parameters
-
| scip | SCIP data structure |
| linconsupgrade | pointer to the linear constraint upgrade |
Definition at line 487 of file cons_linear.c.
References NULL, SCIP_CALL, and SCIPallocMemory.
creates constraint handler data for linear constraint handler
- Parameters
-
| scip | SCIP data structure |
| conshdlrdata | pointer to store the constraint handler data |
| eventhdlr | event handler |
Definition at line 501 of file cons_linear.c.
frees constraint handler data for linear constraint handler
- Parameters
-
| scip | SCIP data structure |
| conshdlrdata | pointer to the constraint handler data |
Definition at line 524 of file cons_linear.c.
Referenced by SCIP_DECL_CONSHDLRCOPY().
creates a linear constraint upgrade data object
- Parameters
-
| scip | SCIP data structure |
| conshdlrdata | constraint handler data |
| conshdlrname | name of the constraint handler |
Definition at line 546 of file cons_linear.c.
References SCIPwarningMessage(), and TRUE.
adds a linear constraint update method to the constraint handler's data
- Parameters
-
| scip | SCIP data structure |
| conshdlrdata | constraint handler data |
| linconsupgrade | linear constraint upgrade method |
Definition at line 576 of file cons_linear.c.
installs rounding locks for the given variable associated to the given coefficient in the linear constraint
- Parameters
-
| scip | SCIP data structure |
| cons | linear constraint |
| var | variable of constraint entry |
| val | coefficient of constraint entry |
Definition at line 608 of file cons_linear.c.
removes rounding locks for the given variable associated to the given coefficient in the linear constraint
- Parameters
-
| scip | SCIP data structure |
| cons | linear constraint |
| var | variable of constraint entry |
| val | coefficient of constraint entry |
Definition at line 641 of file cons_linear.c.
creates event data for variable at given position, and catches events
- Parameters
-
| scip | SCIP data structure |
| cons | linear constraint |
| eventhdlr | event handler to call for the event processing |
| pos | array position of variable to catch bound change events for |
Definition at line 674 of file cons_linear.c.
deletes event data for variable at given position, and drops events
- Parameters
-
| scip | SCIP data structure |
| cons | linear constraint |
| eventhdlr | event handler to call for the event processing |
| pos | array position of variable to catch bound change events for |
Definition at line 710 of file cons_linear.c.
catches bound change events for all variables in transformed linear constraint
- Parameters
-
| scip | SCIP data structure |
| cons | linear constraint |
| eventhdlr | event handler to call for the event processing |
Definition at line 744 of file cons_linear.c.
Referenced by SCIP_DECL_CONSINIT(), and SCIPcreateConsLinear().
drops bound change events for all variables in transformed linear constraint
- Parameters
-
| scip | SCIP data structure |
| cons | linear constraint |
| eventhdlr | event handler to call for the event processing |
Definition at line 776 of file cons_linear.c.
Referenced by SCIP_DECL_CONSDELETE(), and SCIP_DECL_CONSEXIT().
creates a linear constraint data
- Parameters
-
| scip | SCIP data structure |
| consdata | pointer to linear constraint data |
| nvars | number of nonzeros in the constraint |
| vars | array with variables of constraint entries |
| vals | array with coefficients of constraint entries |
| lhs | left hand side of row |
| rhs | right hand side of row |
Definition at line 818 of file cons_linear.c.
Referenced by SCIPcreateConsLinear().
prints linear constraint in CIP format to file stream
- Parameters
-
| scip | SCIP data structure |
| consdata | linear constraint data |
| file | output file (or NULL for standard output) |
Definition at line 1007 of file cons_linear.c.
Referenced by SCIP_DECL_CONSDELVARS().
| static void consdataInvalidateActivities |
( |
SCIP_CONSDATA * |
consdata | ) |
|
|
static |
invalidates activity bounds, such that they are recalculated in next get
- Parameters
-
| consdata | linear constraint |
Definition at line 1046 of file cons_linear.c.
recompute the minactivity of a constraint
- Parameters
-
| scip | SCIP data structure |
| consdata | linear constraint data |
Definition at line 1143 of file cons_linear.c.
Referenced by getMinActivity().
recompute the maxactivity of a constraint
- Parameters
-
| scip | SCIP data structure |
| consdata | linear constraint data |
Definition at line 1170 of file cons_linear.c.
Referenced by getMaxActivity().
| static void consdataRecomputeGlbMinactivity |
( |
SCIP * |
scip, |
|
|
SCIP_CONSDATA * |
consdata |
|
) |
| |
|
static |
recompute the global minactivity of a constraint
- Parameters
-
| scip | SCIP data structure |
| consdata | linear constraint data |
Definition at line 1197 of file cons_linear.c.
Referenced by getMinActivity().
| static void consdataRecomputeGlbMaxactivity |
( |
SCIP * |
scip, |
|
|
SCIP_CONSDATA * |
consdata |
|
) |
| |
|
static |
recompute the global maxactivity of a constraint
- Parameters
-
| scip | SCIP data structure |
| consdata | linear constraint data |
Definition at line 1223 of file cons_linear.c.
Referenced by getMaxActivity().
calculates maximum absolute value of coefficients
- Parameters
-
| consdata | linear constraint data |
Definition at line 1249 of file cons_linear.c.
References REALABS.
checks the type of all variables of the constraint and sets hasnonbinvar and hascontvar flags accordingly
- Parameters
-
| consdata | linear constraint data |
Definition at line 1273 of file cons_linear.c.
References SCIP_VARTYPE_CONTINUOUS, and TRUE.
| static void consdataRecomputeMaxActivityDelta |
( |
SCIP * |
scip, |
|
|
SCIP_CONSDATA * |
consdata |
|
) |
| |
|
static |
updates activities for a change in a bound
- Parameters
-
| scip | SCIP data structure |
| consdata | linear constraint data |
| var | variable that has been changed; can be NULL for global bound changes |
| oldbound | old bound of variable |
| newbound | new bound of variable |
| val | coefficient of constraint entry |
| boundtype | type of the bound change |
| global | is it a global or a local bound change? |
| checkreliability | should the reliability of the recalculated activity be checked? |
Definition at line 1411 of file cons_linear.c.
Referenced by consdataUpdateActivitiesLb(), and consdataUpdateActivitiesUb().
updates minimum and maximum activity for a change in lower bound
- Parameters
-
| scip | SCIP data structure |
| consdata | linear constraint data |
| var | variable that has been changed |
| oldlb | old lower bound of variable |
| newlb | new lower bound of variable |
| val | coefficient of constraint entry |
| checkreliability | should the reliability of the recalculated activity be checked? |
Definition at line 1769 of file cons_linear.c.
References consdataUpdateActivities(), FALSE, SCIP_BOUNDTYPE_LOWER, and SCIPisInfinity().
updates minimum and maximum activity for a change in upper bound
- Parameters
-
| scip | SCIP data structure |
| consdata | linear constraint data |
| var | variable that has been changed |
| oldub | old upper bound of variable |
| newub | new upper bound of variable |
| val | coefficient of constraint entry |
| checkreliability | should the reliability of the recalculated activity be checked? |
Definition at line 1794 of file cons_linear.c.
References consdataUpdateActivities(), FALSE, SCIP_BOUNDTYPE_UPPER, and SCIPisInfinity().
updates minimum and maximum global activity for a change in the global lower bound
- Parameters
-
| scip | SCIP data structure |
| consdata | linear constraint data |
| oldlb | old lower bound of variable |
| newlb | new lower bound of variable |
| val | coefficient of constraint entry |
| checkreliability | should the reliability of the recalculated activity be checked? |
Definition at line 1819 of file cons_linear.c.
updates minimum and maximum global activity for a change in global upper bound
- Parameters
-
| scip | SCIP data structure |
| consdata | linear constraint data |
| oldub | old upper bound of variable |
| newub | new upper bound of variable |
| val | coefficient of constraint entry |
| checkreliability | should the reliability of the recalculated activity be checked? |
Definition at line 1842 of file cons_linear.c.
updates minimum and maximum activity and maximum absolute value for coefficient addition
- Parameters
-
| scip | SCIP data structure |
| consdata | linear constraint data |
| var | variable of constraint entry |
| val | coefficient of constraint entry |
| checkreliability | should the reliability of the recalculated activity be checked? |
Definition at line 1865 of file cons_linear.c.
References MAX, REALABS, SCIP_INVALID, and SCIP_Real.
updates minimum and maximum activity for coefficient deletion, invalidates maximum absolute value if necessary
- Parameters
-
| scip | SCIP data structure |
| consdata | linear constraint data |
| var | variable of constraint entry |
| val | coefficient of constraint entry |
| checkreliability | should the reliability of the recalculated activity be checked? |
Definition at line 1905 of file cons_linear.c.
References FALSE, REALABS, SCIP_INVALID, SCIP_Real, and SCIPisEQ().
updates minimum and maximum activity for coefficient change, invalidates maximum absolute value if necessary
- Parameters
-
| scip | SCIP data structure |
| consdata | linear constraint data |
| var | variable of constraint entry |
| oldval | old coefficient of constraint entry |
| newval | new coefficient of constraint entry |
| checkreliability | should the reliability of the recalculated activity be checked? |
Definition at line 1948 of file cons_linear.c.
| static void getMinActivity |
( |
SCIP * |
scip, |
|
|
SCIP_CONSDATA * |
consdata, |
|
|
int |
posinf, |
|
|
int |
neginf, |
|
|
int |
poshuge, |
|
|
int |
neghuge, |
|
|
SCIP_Real |
delta, |
|
|
SCIP_Bool |
global, |
|
|
SCIP_Bool |
goodrelax, |
|
|
SCIP_Real * |
minactivity, |
|
|
SCIP_Bool * |
isrelax, |
|
|
SCIP_Bool * |
issettoinfinity |
|
) |
| |
|
static |
gets minimal activity for constraint and given values of counters for infinite and huge contributions and (if needed) delta to subtract from stored finite part of activity in case of a residual activity
- Parameters
-
| scip | SCIP data structure |
| consdata | linear constraint |
| posinf | number of coefficients contributing pos. infinite value |
| neginf | number of coefficients contributing neg. infinite value |
| poshuge | number of coefficients contributing huge pos. value |
| neghuge | number of coefficients contributing huge neg. value |
| delta | value to subtract from stored minactivity (contribution of the variable set to zero when getting residual activity) |
| global | should the global or local minimal activity be returned? |
| goodrelax | should a good relaxation be computed or are relaxed acticities ignored, anyway? |
| minactivity | pointer to store the minimal activity |
| isrelax | pointer to store whether the activity is a relaxation, i.e. is <= the exact minactivity (in case of huge contributing values) |
| issettoinfinity | pointer to store whether minactivity was set to infinity or calculated |
Definition at line 2101 of file cons_linear.c.
References consdataRecomputeGlbMinactivity(), consdataRecomputeMinactivity(), FALSE, NULL, SCIP_Real, SCIPgetHugeValue(), SCIPinfinity(), and TRUE.
Referenced by consdataGetActivityBounds(), consdataGetActivityResiduals(), consdataGetGlbActivityBounds(), and consdataGetGlbActivityResiduals().
| static void getMaxActivity |
( |
SCIP * |
scip, |
|
|
SCIP_CONSDATA * |
consdata, |
|
|
int |
posinf, |
|
|
int |
neginf, |
|
|
int |
poshuge, |
|
|
int |
neghuge, |
|
|
SCIP_Real |
delta, |
|
|
SCIP_Bool |
global, |
|
|
SCIP_Bool |
goodrelax, |
|
|
SCIP_Real * |
maxactivity, |
|
|
SCIP_Bool * |
isrelax, |
|
|
SCIP_Bool * |
issettoinfinity |
|
) |
| |
|
static |
gets maximal activity for constraint and given values of counters for infinite and huge contributions and (if needed) delta to subtract from stored finite part of activity in case of a residual activity
- Parameters
-
| scip | SCIP data structure |
| consdata | linear constraint |
| posinf | number of coefficients contributing pos. infinite value |
| neginf | number of coefficients contributing neg. infinite value |
| poshuge | number of coefficients contributing huge pos. value |
| neghuge | number of coefficients contributing huge neg. value |
| delta | value to subtract from stored maxactivity (contribution of the variable set to zero when getting residual activity) |
| global | should the global or local maximal activity be returned? |
| goodrelax | should a good relaxation be computed or are relaxed acticities ignored, anyway? |
| maxactivity | pointer to store the maximal activity |
| isrelax | pointer to store whether the activity is a relaxation, i.e. is >= the exact maxactivity (in case of huge contributing values) |
| issettoinfinity | pointer to store whether maxactivity was set to infinity or calculated |
Definition at line 2202 of file cons_linear.c.
References consdataRecomputeGlbMaxactivity(), consdataRecomputeMaxactivity(), FALSE, NULL, SCIP_Real, SCIPgetHugeValue(), SCIPinfinity(), and TRUE.
Referenced by consdataGetActivityBounds(), consdataGetActivityResiduals(), consdataGetGlbActivityBounds(), and consdataGetGlbActivityResiduals().
gets activity bounds for constraint
- Parameters
-
| scip | SCIP data structure |
| consdata | linear constraint |
| goodrelax | if we have huge contributions, do we need a good relaxation or are relaxed acticities ignored, anyway? |
| minactivity | pointer to store the minimal activity |
| maxactivity | pointer to store the maximal activity |
| minisrelax | pointer to store whether the returned minactivity is just a relaxation, i.e. <= the exact minactivity (in case of huge contributions), or equal to the exact minimal activity |
| maxisrelax | pointer to store whether the returned maxactivity is just a relaxation, i.e. >= the exact maxactivity (in case of huge contributions), or equal to the exact maximal activity |
Definition at line 2301 of file cons_linear.c.
References consdataCalcActivities(), FALSE, getMaxActivity(), getMinActivity(), NULL, SCIP_Bool, and SCIP_INVALID.
calculates activity bounds for constraint after setting variable to zero
- Parameters
-
| scip | SCIP data structure |
| consdata | linear constraint |
| cancelvar | variable to calculate activity residual for |
| resactivity | pointer to store the residual activity |
| isminresact | should minimal or maximal residual activity be calculated? |
| useglobalbounds | should global or local bounds be used? |
Definition at line 2347 of file cons_linear.c.
| static void consdataGetActivityResiduals |
( |
SCIP * |
scip, |
|
|
SCIP_CONSDATA * |
consdata, |
|
|
SCIP_VAR * |
var, |
|
|
SCIP_Real |
val, |
|
|
SCIP_Bool |
goodrelax, |
|
|
SCIP_Real * |
minresactivity, |
|
|
SCIP_Real * |
maxresactivity, |
|
|
SCIP_Bool * |
minisrelax, |
|
|
SCIP_Bool * |
maxisrelax, |
|
|
SCIP_Bool * |
isminsettoinfinity, |
|
|
SCIP_Bool * |
ismaxsettoinfinity |
|
) |
| |
|
static |
gets activity bounds for constraint after setting variable to zero
- Parameters
-
| scip | SCIP data structure |
| consdata | linear constraint |
| var | variable to calculate activity residual for |
| val | coefficient value of variable in linear constraint |
| goodrelax | if we have huge contributions, do we need a good relaxation or are relaxed acticities ignored, anyway? |
| minresactivity | pointer to store the minimal residual activity |
| maxresactivity | pointer to store the maximal residual activity |
| minisrelax | pointer to store whether the returned residual minactivity is just a relaxation, i.e. <= the exact residual minactivity (in case of huge contributions), or equal to the exact residual minactivity |
| maxisrelax | pointer to store whether the returned residual maxactivity is just a relaxation, i.e. <= the exact residual maxactivity (in case of huge contributions), or equal to the exact residual minactivity |
| isminsettoinfinity | pointer to store whether minresactivity was set to infinity or calculated |
| ismaxsettoinfinity | pointer to store whether maxresactivity was set to infinity or calculated |
Definition at line 2428 of file cons_linear.c.
References consdataCalcActivities(), FALSE, getMaxActivity(), getMinActivity(), NULL, SCIP_INVALID, SCIP_Real, SCIPisHugeValue(), SCIPisInfinity(), SCIPvarGetLbLocal(), and SCIPvarGetUbLocal().
gets global activity bounds for constraint
- Parameters
-
| scip | SCIP data structure |
| consdata | linear constraint |
| goodrelax | if we have huge contributions, do we need a good relaxation or are relaxed acticities ignored, anyway? |
| glbminactivity | pointer to store the minimal activity, or NULL, if not needed |
| glbmaxactivity | pointer to store the maximal activity, or NULL, if not needed |
| minisrelax | pointer to store whether the returned minactivity is just a relaxation, i.e. <= the exact minactivity (in case of huge contributions), or equal to the exact minimal activity |
| maxisrelax | pointer to store whether the returned maxactivity is just a relaxation, i.e. >= the exact maxactivity (in case of huge contributions), or equal to the exact maximal activity |
| isminsettoinfinity | pointer to store whether minresactivity was set to infinity or calculated |
| ismaxsettoinfinity | pointer to store whether maxresactivity was set to infinity or calculated |
Definition at line 2579 of file cons_linear.c.
References consdataCalcActivities(), getMaxActivity(), getMinActivity(), NULL, SCIP_INVALID, and TRUE.
| static void consdataGetGlbActivityResiduals |
( |
SCIP * |
scip, |
|
|
SCIP_CONSDATA * |
consdata, |
|
|
SCIP_VAR * |
var, |
|
|
SCIP_Real |
val, |
|
|
SCIP_Bool |
goodrelax, |
|
|
SCIP_Real * |
minresactivity, |
|
|
SCIP_Real * |
maxresactivity, |
|
|
SCIP_Bool * |
minisrelax, |
|
|
SCIP_Bool * |
maxisrelax, |
|
|
SCIP_Bool * |
isminsettoinfinity, |
|
|
SCIP_Bool * |
ismaxsettoinfinity |
|
) |
| |
|
static |
gets global activity bounds for constraint after setting variable to zero
- Parameters
-
| scip | SCIP data structure |
| consdata | linear constraint |
| var | variable to calculate activity residual for |
| val | coefficient value of variable in linear constraint |
| goodrelax | if we have huge contributions, do we need a good relaxation or are relaxed acticities ignored, anyway? |
| minresactivity | pointer to store the minimal residual activity, or NULL, if not needed |
| maxresactivity | pointer to store the maximal residual activity, or NULL, if not needed |
| minisrelax | pointer to store whether the returned residual minactivity is just a relaxation, i.e. <= the exact residual minactivity (in case of huge contributions), or equal to the exact residual minactivity |
| maxisrelax | pointer to store whether the returned residual maxactivity is just a relaxation, i.e. <= the exact residual maxactivity (in case of huge contributions), or equal to the exact residual minactivity |
| isminsettoinfinity | pointer to store whether minresactivity was set to infinity or calculated |
| ismaxsettoinfinity | pointer to store whether maxresactivity was set to infinity or calculated |
Definition at line 2641 of file cons_linear.c.
References consdataCalcActivities(), getMaxActivity(), getMinActivity(), NULL, SCIP_INVALID, SCIP_Real, SCIPisHugeValue(), SCIPisInfinity(), SCIPvarGetLbGlobal(), SCIPvarGetUbGlobal(), and TRUE.
calculates the feasibility of the linear constraint for given solution
- Parameters
-
| scip | SCIP data structure |
| consdata | linear constraint data |
| sol | solution to get feasibility for, NULL to current solution |
Definition at line 2862 of file cons_linear.c.
| static void consdataUpdateSignatures |
( |
SCIP_CONSDATA * |
consdata, |
|
|
int |
pos |
|
) |
| |
|
static |
updates bit signatures after adding a single coefficient
- Parameters
-
| consdata | linear constraint data |
| pos | position of coefficient to update signatures for |
Definition at line 2897 of file cons_linear.c.
calculates the bit signatures of the given constraint data
- Parameters
-
| consdata | linear constraint data |
Definition at line 2922 of file cons_linear.c.
| static SCIP_DECL_SORTINDCOMP |
( |
consdataCompVar |
| ) |
|
|
static |
index comparison method of linear constraints: compares two indices of the variable set in the linear constraint
Definition at line 2942 of file cons_linear.c.
References NULL, and SCIP_Real.
| static void permSortConsdata |
( |
SCIP_CONSDATA * |
consdata, |
|
|
int * |
perm, |
|
|
int |
nvars |
|
) |
| |
|
static |
permutes the constraint's variables according to a given permutation.
- Parameters
-
| consdata | the constraint data |
| perm | the target permutation |
| nvars | the number of variables |
Definition at line 2955 of file cons_linear.c.
Referenced by consdataSort().
sorts linear constraint's variables depending on the stage of the solving process:
- during PRESOLVING sorts variables by binaries, integers, implicit integers, and continuous variables, and the variables of the same type by non-decreasing variable index
- during SOLVING sorts binary variables of the remaining problem w.r.t the absolute of their coefficient. This fastens the propagation time of the constraint handler.
- Parameters
-
| scip | SCIP data structure |
| consdata | linear constraint data |
Definition at line 3028 of file cons_linear.c.
References FALSE, permSortConsdata(), SCIP_CALL, SCIPallocBufferArray, SCIPfreeBufferArray, SCIPsort(), and TRUE.
sets left hand side of linear constraint
- Parameters
-
| scip | SCIP data structure |
| cons | linear constraint |
| lhs | new left hand side |
Definition at line 3176 of file cons_linear.c.
sets right hand side of linear constraint
- Parameters
-
| scip | SCIP data structure |
| cons | linear constraint |
| rhs | new right hand side |
Definition at line 3290 of file cons_linear.c.
adds coefficient in linear constraint
- Parameters
-
| scip | SCIP data structure |
| cons | linear constraint |
| var | variable of constraint entry |
| val | coefficient of constraint entry |
Definition at line 3406 of file cons_linear.c.
deletes coefficient at given position from linear constraint data
- Parameters
-
| scip | SCIP data structure |
| cons | linear constraint |
| pos | position of coefficient to delete |
Definition at line 3553 of file cons_linear.c.
changes coefficient value at given position of linear constraint data
- Parameters
-
| scip | SCIP data structure |
| cons | linear constraint |
| pos | position of coefficient to delete |
| newval | new value of coefficient |
Definition at line 3668 of file cons_linear.c.
scales a linear constraint with a constant scalar
- Parameters
-
| scip | SCIP data structure |
| cons | linear constraint to scale |
| scalar | value to scale constraint with |
Definition at line 3729 of file cons_linear.c.
- Parameters
-
| scip | SCIP data structure |
| conshdlr | constraint handler |
| conss | array of constraints |
| nconss | number of constraints |
Definition at line 3813 of file cons_linear.c.
normalizes a linear constraint with the following rules:
- if all coefficients have them same absolute value, change them to (-)1.0
- multiplication with +1 or -1: Apply the following rules in the given order, until the sign of the factor is determined. Later rules only apply, if the current rule doesn't determine the sign):
- the right hand side must not be negative
- the right hand side must not be infinite
- the absolute value of the right hand side must be greater than that of the left hand side
- the number of positive coefficients must not be smaller than the number of negative coefficients
- multiply with +1
- rationals to integrals Try to identify a rational representation of the fractional coefficients, and multiply all coefficients by the smallest common multiple of all denominators to get integral coefficients. Forbid large denominators due to numerical stability.
- division by greatest common divisor If all coefficients are integral, divide them by the greatest common divisor.
- Parameters
-
| scip | SCIP data structure |
| cons | linear constraint to normalize |
Definition at line 3872 of file cons_linear.c.
Referenced by aggregateConstraints().
replaces multiple occurrences of a variable by a single coefficient
- Parameters
-
| scip | SCIP data structure |
| cons | linear constraint |
Definition at line 4195 of file cons_linear.c.
replaces all fixed and aggregated variables by their non-fixed counterparts
- Parameters
-
| scip | SCIP data structure |
| cons | linear constraint |
| infeasible | pointer to store if infeasibility is detected; or NULL if this information is not needed; in this case, we apply all fixings instead of stopping after the first infeasible one |
Definition at line 4266 of file cons_linear.c.
for each variable in the linear constraint, except the inferred variable, adds one bound to the conflict analysis' candidate store (bound depends on sign of coefficient and whether the left or right hand side was the reason for the inference variable's bound change); the conflict analysis can be initialized with the linear constraint being the conflict detecting constraint by using NULL as inferred variable
- Parameters
-
| scip | SCIP data structure |
| cons | constraint that inferred the bound change |
| infervar | variable that was deduced, or NULL |
| bdchgidx | bound change index (time stamp of bound change), or NULL for current time |
| inferpos | position of the inferred variable in the vars array |
| reasonisrhs | is the right hand side responsible for the bound change? |
Definition at line 4507 of file cons_linear.c.
resolves a propagation on the given variable by supplying the variables needed for applying the corresponding propagation rule (see propagateCons()): (1) activity residuals of all other variables tighten bounds of single variable
- Parameters
-
| scip | SCIP data structure |
| cons | constraint that inferred the bound change |
| infervar | variable that was deduced |
| inferinfo | inference information |
| 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 |
| result | pointer to store the result of the propagation conflict resolving call |
Definition at line 4686 of file cons_linear.c.
analyzes conflicting bounds on given constraint, and adds conflict constraint to problem
- Parameters
-
| scip | SCIP data structure |
| cons | conflict detecting constraint |
| reasonisrhs | is the right hand side responsible for the conflict? |
Definition at line 4768 of file cons_linear.c.
check if there is any hope of tightening some bounds
- Parameters
-
| scip | SCIP data structure |
| cons | linear constraint |
Definition at line 4792 of file cons_linear.c.
tighten upper bound
- Parameters
-
| scip | SCIP data structure |
| cons | linear constraint |
| pos | variable position |
| proprule | propagation rule that deduced the value |
| newub | new upper bound |
| oldub | old upper bound |
| cutoff | pointer to store whether the node can be cut off |
| nchgbds | pointer to count the total number of tightened bounds |
| force | should a possible bound change be forced even if below bound strengthening tolerance |
Definition at line 4821 of file cons_linear.c.
tighten lower bound
- Parameters
-
| scip | SCIP data structure |
| cons | linear constraint |
| pos | variable position |
| proprule | propagation rule that deduced the value |
| newlb | new lower bound |
| oldlb | old lower bound |
| cutoff | pointer to store whether the node can be cut off |
| nchgbds | pointer to count the total number of tightened bounds |
| force | should a possible bound change be forced even if below bound strengthening tolerance |
Definition at line 4890 of file cons_linear.c.
tightens bounds of a single variable due to activity bounds (easy case)
- Parameters
-
| scip | SCIP data structure |
| cons | linear constraint |
| pos | position of the variable in the vars array |
| cutoff | pointer to store whether the node can be cut off |
| nchgbds | pointer to count the total number of tightened bounds |
| force | should a possible bound change be forced even if below bound strengthening tolerance |
Definition at line 4959 of file cons_linear.c.
tightens bounds of a single variable due to activity bounds
- Parameters
-
| scip | SCIP data structure |
| cons | linear constraint |
| pos | position of the variable in the vars array |
| cutoff | pointer to store whether the node can be cut off |
| nchgbds | pointer to count the total number of tightened bounds |
| force | should a possible bound change be forced even if below bound strengthening tolerance |
Definition at line 5219 of file cons_linear.c.
tightens bounds of variables in constraint due to activity bounds
- Parameters
-
| scip | SCIP data structure |
| cons | linear constraint |
| sortvars | should variables be used in sorted order? |
| cutoff | pointer to store whether the node can be cut off |
| nchgbds | pointer to count the total number of tightened bounds |
Definition at line 5492 of file cons_linear.c.
checks linear constraint for feasibility of given solution or current solution
- Parameters
-
| scip | SCIP data structure |
| cons | linear constraint |
| sol | solution to be checked, or NULL for current solution |
| checklprows | has linear constraint to be checked, if it is already in current LP? |
| checkrelmaxabs | should the violation for a constraint with side 0.0 be checked relative to 1.0 (FALSE) or to the maximum absolute value in the activity (TRUE)? |
| violated | pointer to store whether the constraint is violated |
Definition at line 5631 of file cons_linear.c.
Referenced by SCIP_DECL_CONSCHECK().
creates an LP row in a linear constraint data
- Parameters
-
| scip | SCIP data structure |
| cons | linear constraint |
Definition at line 5848 of file cons_linear.c.
Referenced by addRelaxation().
adds linear constraint as cut to the LP
- Parameters
-
| scip | SCIP data structure |
| cons | linear constraint |
| sol | primal CIP solution, NULL for current LP solution |
| cutoff | pointer to store whether a cutoff was found |
Definition at line 5872 of file cons_linear.c.
References createRow(), and SCIP_CALL.
separates linear constraint: adds linear constraint as cut, if violated by given solution
- Parameters
-
| scip | SCIP data structure |
| cons | linear constraint |
| conshdlrdata | constraint handler data |
| sol | primal CIP solution, NULL for current LP solution |
| separatecards | should knapsack cardinality cuts be generated? |
| separateall | should all constraints be subject to cardinality cut generation instead of only the ones with non-zero dual value? |
| ncuts | pointer to add up the number of found cuts |
| cutoff | pointer to store whether a cutoff was found |
Definition at line 5919 of file cons_linear.c.
propagation method for linear constraints
- Parameters
-
| scip | SCIP data structure |
| cons | linear constraint |
| tightenbounds | should the variable's bounds be tightened? |
| sortvars | should variable sorting for faster propagation be used? |
| cutoff | pointer to store whether the node can be cut off |
| nchgbds | pointer to count the total number of tightened bounds |
Definition at line 6009 of file cons_linear.c.
converts all variables with fixed domain into FIXED variables
- Parameters
-
| scip | SCIP data structure |
| cons | linear constraint |
| cutoff | pointer to store TRUE, if a cutoff was found |
| nfixedvars | pointer to count the total number of fixed variables |
Definition at line 6113 of file cons_linear.c.
extracts cliques of the constraint and adds them to SCIP
The following clique extraction mechanism are implemeneted
collect binary variables and sort them in non increasing order, then
a) if the constraint has a finite right hand side and the negative infinity counters for the minactivity are zero then add the variables as a clique for which all successive pairs of coefficients fullfill the following condition
minactivity + vals[i] + vals[i+1] > rhs
and also add the binary to binary implication also for non-successive variables for which the same argument
holds
minactivity + vals[i] + vals[j] > rhs
e.g. 5.3 x1 + 3.6 x2 + 3.3 x3 + 2.1 x4 <= 5.5 (all x are binary) would lead to the clique (x1, x2, x3) and the
binary to binary implications x1 = 1 => x4 = 0 and x2 = 1 => x4 = 0
b) if the constraint has a finite left hand side and the positive infinity counters for the maxactivity are zero then add the variables as a clique for which all successive pairs of coefficients fullfill the follwoing condition
maxactivity + vals[i] + vals[i-1] < lhs
and also add the binary to binary implication also for non-successive variables for which the same argument
holds
maxactivity + vals[i] + vals[j] < lhs
e.g. you could multiply the above example by -1
c) the constraint has a finite right hand side and a finite minactivity then add the variables as a negated clique(clique on the negated variables) for which all successive pairs of coefficients fullfill the following condition
minactivity - vals[i] - vals[i-1] > rhs
and also add the binary to binary implication also for non-successive variables for which the
same argument holds
minactivity - vals[i] - vals[j] > rhs
e.g. -4 x1 -3 x2 - 2 x3 + 2 x4 <= -4 would lead to the (negated) clique (~x1, ~x2) and the binary to binary
implication x1 = 0 => x3 = 1
d) the constraint has a finite left hand side and a finite maxactivity then add the variables as a negated clique(clique on the negated variables) for which all successive pairs of coefficients fullfill the following condition
maxactivity - vals[i] - vals[i+1] < lhs
and also add the binary to binary implication also for non-successive variables for which the same argument
holds
maxactivity - vals[i] - vals[j] < lhs
e.g. you could multiply the above example by -1
- if the linear constraint represents a set-packing or set-partitioning constraint, the whole constraint is added as clique, (this part is done at the end of the method)
- Parameters
-
| scip | SCIP data structure |
| cons | linear constraint |
| sortvars | should variables be used in sorted order? |
| nfixedvars | pointer to count number of fixed variables |
| nchgbds | pointer to count the total number of tightened bounds |
| cutoff | pointer to store TRUE, if a cutoff was found |
Definition at line 6248 of file cons_linear.c.
tightens left and right hand side of constraint due to integrality
- Parameters
-
| scip | SCIP data structure |
| cons | linear constraint |
| nchgsides | pointer to count number of side changes |
Definition at line 7213 of file cons_linear.c.
tightens coefficients of binary, integer, and implicit integer variables due to activity bounds in presolving: given an inequality lhs <= a*x + ai*xi <= rhs, with a non-continuous variable li <= xi <= ui let minact := min{a*x + ai*xi}, maxact := max{a*x + ai*xi} (i) ai >= 0: if minact + ai >= lhs and maxact - ai <= rhs: (**)
- a deviation from the lower/upper bound of xi would make the left/right hand side redundant
- ai, lhs and rhs can be changed to have the same redundancy effect and the same results for xi fixed to its bounds, but with a reduced ai and tightened sides to tighten the LP relaxation
- change coefficients: ai' := max(lhs - minact, maxact - rhs) lhs' := lhs - (ai - ai')*li rhs' := rhs - (ai - ai')*ui (ii) ai < 0: if minact - ai >= lhs and maxact + ai <= rhs: (***)
- a deviation from the upper/lower bound of xi would make the left/right hand side redundant
- ai, lhs and rhs can be changed to have the same redundancy effect and the same results for xi fixed to its bounds, but with a reduced ai and tightened sides to tighten the LP relaxation
- change coefficients: ai' := min(rhs - maxact, minact - lhs) lhs' := lhs - (ai - ai')*ui rhs' := rhs - (ai - ai')*li
We further try to remove redundant variable from the constraint; Variables which fulfill conditions (**) or (***) are called surely non-redundant variables. A deviation of only one from their bound makes the lhs/rhs feasible (i.e., redundant), even if all other variables are set to their "worst" bound. If all variables which are not surely non-redundant cannot make the lhs/rhs redundant, even if they are set to their "best" bound, they can be removed from the constraint. E.g., for binary variables and an inequality x_1 +x_2 +10y_1 +10y_2 >= 5, setting either of the y_i to one suffices to fulfill the inequality, whereas the x_i do not contribute to feasibility and can be removed.
- Parameters
-
| scip | SCIP data structure |
| cons | linear constraint |
| nchgcoefs | pointer to count total number of changed coefficients |
| nchgsides | pointer to count number of side changes |
Definition at line 7298 of file cons_linear.c.
- Parameters
-
| scip | SCIP data structure |
| cons | linear constraint |
| cutoff | pointer to store TRUE, if a cutoff was found |
| nfixedvars | pointer to count number of fixed variables |
| ndelconss | pointer to count number of deleted constraints |
Definition at line 7724 of file cons_linear.c.
- Parameters
-
| scip | SCIP data structure |
| cons | linear constraint |
| cutoff | pointer to store TRUE, if a cutoff was found |
| naggrvars | pointer to count number of aggregated variables |
| ndelconss | pointer to count number of deleted constraints |
Definition at line 7780 of file cons_linear.c.
calculates the new lhs and rhs of the constraint after the given variable is aggregated out
- Parameters
-
| scip | SCIP data structure |
| consdata | linear constraint data |
| slackvar | variable to be aggregated out |
| slackcoef | coefficient of variable in constraint |
| newlhs | pointer to store new lhs of constraint |
| newrhs | pointer to store new rhs of constraint |
Definition at line 7838 of file cons_linear.c.
- Parameters
-
| scip | SCIP data structure |
| cons | linear constraint |
| cutoff | pointer to store TRUE, if a cutoff was found |
| naggrvars | pointer to count number of aggregated variables |
| ndelconss | pointer to count number of deleted constraints |
Definition at line 7894 of file cons_linear.c.
checks if the given variables and their coefficient are equal (w.r.t. scaling factor) to the objective function
- Parameters
-
| scip | SCIP data structure |
| consdata | linear constraint data |
| scale | pointer to store the scaling factor between the constraint and the objective function |
| offset | pointer to store the offset of the objective function resulting by this constraint |
Definition at line 8428 of file cons_linear.c.
check if the linear equality constraint is equal to a subset of the objective function; if so we can remove the objective coefficients and add an objective offset
- Parameters
-
| scip | SCIP data structure |
| cons | linear equation constraint |
| conshdlrdata | linear constraint handler data |
Definition at line 8507 of file cons_linear.c.
check if the linear constraint is parallel to objective function; if so update the cutoff bound and avoid that the constraint enters the LP by setting the initial and separated flag to FALSE
- Parameters
-
| scip | SCIP data structure |
| cons | linear constraint |
| conshdlrdata | linear constraint handler data |
Definition at line 8620 of file cons_linear.c.
converts special equalities
- Parameters
-
| scip | SCIP data structure |
| cons | linear constraint |
| conshdlrdata | linear constraint handler data |
| cutoff | pointer to store TRUE, if a cutoff was found |
| nfixedvars | pointer to count number of fixed variables |
| naggrvars | pointer to count number of aggregated variables |
| ndelconss | pointer to count number of deleted constraints |
Definition at line 8739 of file cons_linear.c.
returns whether the linear sum of all variables/coefficients except the given one divided by the given value is always integral
- Parameters
-
| scip | SCIP data structure |
| consdata | linear constraint |
| pos | position of variable to be left out |
| val | value to divide the coefficients by |
Definition at line 8794 of file cons_linear.c.
References FALSE, SCIPisIntegral(), and SCIPvarIsIntegral().
- Parameters
-
| scip | SCIP data structure |
| side | lhs or rhs |
| val | coefficient |
| minresactivity | minimal residual activity |
| maxresactivity | maximal residual activity |
| minval | pointer to store calculated minval |
| maxval | pointer to store calculated maxval |
Definition at line 8820 of file cons_linear.c.
References SCIPisInfinity().
- Parameters
-
| scip | SCIP data structure |
| cons | linear constraint |
| cutoff | pointer to store TRUE, if a cutoff was found |
| nfixedvars | pointer to count number of fixed variables |
| naggrvars | pointer to count number of aggregated variables |
| ndelconss | pointer to count number of deleted constraints |
Definition at line 8865 of file cons_linear.c.
| static int getVarWeight |
( |
SCIP_VAR * |
var | ) |
|
|
static |
tries to aggregate variables in equations a^Tx = lhs in case there are at most two binary variables with an odd coefficient and all other variables are not continuous and have an even coefficient then:
- exactly one odd binary variables this binary variables y can be fixed to 0 if the lhs is even and to 1 if the lhs is odd
- lhs is odd -> y = 1
- lhs is even -> y = 0
- exactly two odd binary variables aggregate the two binary variables with odd coefficient
- lhs is odd -> exactly one of the variable has to be 1 -> var1 + var2 = 1
- lhs is even -> both have to take the same value -> var1 - var2 = 0
- Parameters
-
| scip | SCIP data structure |
| cons | linear constraint |
| cutoff | pointer to store TRUE, if a cutoff was found |
| nfixedvars | pointer to count number of fixed variables |
| naggrvars | pointer to count number of aggregated variables |
| ndelconss | pointer to count number of deleted constraints |
Definition at line 9321 of file cons_linear.c.
Referenced by SCIP_DECL_CONSPRESOL().
| static SCIP_DECL_SORTINDCOMP |
( |
consdataCompSim |
| ) |
|
|
static |
sorting method for constraint data, compares two variables on given indices, continuous variables will be sorted to the end and for all other variables the sortation will be in non-increasing order of their absolute value of the coefficients
Definition at line 9487 of file cons_linear.c.
tries to simplify coefficients and delete variables in ranged row of the form lhs <= a^Tx <= rhs, e.g. using the greatest common divisor
- lhs <= a^Tx <= rhs, forall a_i >= lhs, a_i <= rhs, and forall pairs a_i + a_j > rhs then we can change this constraint to 1^Tx = 1
- Parameters
-
| scip | SCIP data structure |
| cons | linear constraint |
| nchgcoefs | pointer to store the amount of changed coefficients |
| nchgsides | pointer to store the amount of changed sides |
Definition at line 9527 of file cons_linear.c.
tries to simplify coefficients and delete variables in constraints of the form lhs <= a^Tx <= rhs for equations
- See Also
- rangedRowSimplify() will be called
there are several different coefficient reduction steps which will be applied
We try to determine parts of the constraint which will not change anything on (in-)feasibility of the constraint
e.g. 5x1 + 5x2 + 3z1 <= 8 => 3z1 is redundant if all x are binary and -2 < 3z1 <= 3
We try to remove redundant fractional parts in a constraint
e.g. 5.2x1 + 5.1x2 + 3x3 <= 8.3 => will be changed to 5x1 + 5x2 + 3x3 <= 8 if all x are binary
We are using the greatest common divisor for further reductions
e.g. 10x1 + 5y2 + 5x3 + 3x4 <= 15 => will be changed to 2x1 + y2 + x3 + x4 <= 3 if all xi are binary and y2 is integral
- Parameters
-
| scip | SCIP data structure |
| cons | linear constraint |
| nchgcoefs | pointer to store the amount of changed coefficients |
| nchgsides | pointer to store the amount of changed sides |
Definition at line 9639 of file cons_linear.c.
| static SCIP_RETCODE aggregateConstraints |
( |
SCIP * |
scip, |
|
|
SCIP_CONS * |
cons0, |
|
|
SCIP_CONS * |
cons1, |
|
|
int * |
commonidx0, |
|
|
int * |
commonidx1, |
|
|
int * |
diffidx0minus1, |
|
|
int * |
diffidx1minus0, |
|
|
int |
nvarscommon, |
|
|
int |
commonidxweight, |
|
|
int |
diffidx0minus1weight, |
|
|
int |
diffidx1minus0weight, |
|
|
SCIP_Real |
maxaggrnormscale, |
|
|
int * |
nchgcoefs, |
|
|
SCIP_Bool * |
aggregated |
|
) |
| |
|
static |
- Parameters
-
| scip | SCIP data structure |
| cons0 | (in)equality to modify |
| cons1 | equality to use for aggregation of cons0 |
| commonidx0 | array with indices of variables in cons0, that appear also in cons1 |
| commonidx1 | array with indices of variables in cons1, that appear also in cons0 |
| diffidx0minus1 | array with indices of variables in cons0, that don't appear in cons1 |
| diffidx1minus0 | array with indices of variables in cons1, that don't appear in cons0 |
| nvarscommon | number of variables, that appear in both constraints |
| commonidxweight | variable weight sum of common variables |
| diffidx0minus1weight | variable weight sum of variables in cons0, that don't appear in cons1 |
| diffidx1minus0weight | variable weight sum of variables in cons1, that don't appear in cons0 |
| maxaggrnormscale | maximal allowed relative gain in maximum norm for constraint aggregation |
| nchgcoefs | pointer to count the number of changed coefficients |
| aggregated | pointer to store whether an aggregation was made |
Definition at line 10829 of file cons_linear.c.
References consdataGetMaxAbsval(), FALSE, getVarWeight(), normalizeCons(), NULL, REALABS, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPaddCons(), SCIPallocBufferArray, SCIPconsGetData(), SCIPconsGetName(), SCIPconsGetNUpgradeLocks(), SCIPconsIsActive(), SCIPconsIsChecked(), SCIPconsIsDynamic(), SCIPconsIsEnforced(), SCIPconsIsInitial(), SCIPconsIsLocal(), SCIPconsIsModifiable(), SCIPconsIsPropagated(), SCIPconsIsRemovable(), SCIPconsIsSeparated(), SCIPconsIsStickingAtNode(), SCIPcreateConsLinear(), SCIPdebugMessage, SCIPdebugPrintCons, SCIPdelCons(), SCIPfreeBufferArray, SCIPinfinity(), SCIPisEQ(), SCIPisInfinity(), SCIPisIntegral(), SCIPisLE(), SCIPisPositive(), SCIPisZero(), SCIPreleaseCons(), and TRUE.
| static SCIP_DECL_HASHGETKEY |
( |
hashGetKeyLinearcons |
| ) |
|
|
static |
| static SCIP_DECL_HASHKEYEQ |
( |
hashKeyEqLinearcons |
| ) |
|
|
static |
returns TRUE iff both keys are equal; two constraints are equal if they have the same variables and the coefficients are either equal or negated
Definition at line 11152 of file cons_linear.c.
| static SCIP_DECL_HASHKEYVAL |
( |
hashKeyValLinearcons |
| ) |
|
|
static |
compares each constraint with all other constraints for possible redundancy and removes or changes constraint accordingly; in contrast to preprocessConstraintPairs(), it uses a hash table
- Parameters
-
| scip | SCIP data structure |
| blkmem | block memory |
| conss | constraint set |
| nconss | number of constraints in constraint set |
| firstchange | pointer to store first changed constraint |
| cutoff | pointer to store TRUE, if a cutoff was found |
| ndelconss | pointer to count number of deleted constraints |
| nchgsides | pointer to count number of changed left/right hand sides |
Definition at line 11258 of file cons_linear.c.
compares constraint with all prior constraints for possible redundancy or aggregation, and removes or changes constraint accordingly
- Parameters
-
| scip | SCIP data structure |
| conss | constraint set |
| firstchange | first constraint that changed since last pair preprocessing round |
| chkind | index of constraint to check against all prior indices upto startind |
| maxaggrnormscale | maximal allowed relative gain in maximum norm for constraint aggregation |
| cutoff | pointer to store TRUE, if a cutoff was found |
| ndelconss | pointer to count number of deleted constraints |
| nchgsides | pointer to count number of changed left/right hand sides |
| nchgcoefs | pointer to count number of changed coefficients |
Definition at line 11439 of file cons_linear.c.
applies full dual presolving on variables that only appear in linear constraints
- Parameters
-
| scip | SCIP data structure |
| conss | constraint set |
| nconss | number of constraints |
| cutoff | pointer to store TRUE, if a cutoff was found |
| nchgbds | pointer to count the number of bound changes |
Definition at line 12037 of file cons_linear.c.
| static SCIP_DECL_CONSHDLRCOPY |
( |
conshdlrCopyLinear |
| ) |
|
|
static |
| static SCIP_DECL_CONSFREE |
( |
consFreeLinear |
| ) |
|
|
static |
destructor of constraint handler to free constraint handler data (called when SCIP is exiting)
Definition at line 12509 of file cons_linear.c.
| static SCIP_DECL_CONSINIT |
( |
consInitLinear |
| ) |
|
|
static |
| static SCIP_DECL_CONSEXIT |
( |
consExitLinear |
| ) |
|
|
static |
| static SCIP_DECL_CONSEXITPRE |
( |
consExitpreLinear |
| ) |
|
|
static |
| static SCIP_DECL_CONSEXITSOL |
( |
consExitsolLinear |
| ) |
|
|
static |
| static SCIP_DECL_CONSDELETE |
( |
consDeleteLinear |
| ) |
|
|
static |
| static SCIP_DECL_CONSTRANS |
( |
consTransLinear |
| ) |
|
|
static |
transforms constraint data into data belonging to the transformed problem
Definition at line 13087 of file cons_linear.c.
| static SCIP_DECL_CONSINITLP |
( |
consInitlpLinear |
| ) |
|
|
static |
LP initialization method of constraint handler (called before the initial LP relaxation at a node is solved)
Definition at line 13134 of file cons_linear.c.
| static SCIP_DECL_CONSSEPALP |
( |
consSepalpLinear |
| ) |
|
|
static |
separation method of constraint handler for LP solutions
Definition at line 13155 of file cons_linear.c.
| static SCIP_DECL_CONSSEPASOL |
( |
consSepasolLinear |
| ) |
|
|
static |
separation method of constraint handler for arbitrary primal solutions
Definition at line 13226 of file cons_linear.c.
| static SCIP_DECL_CONSENFOLP |
( |
consEnfolpLinear |
| ) |
|
|
static |
constraint enforcing method of constraint handler for LP solutions
Definition at line 13284 of file cons_linear.c.
| static SCIP_DECL_CONSENFOPS |
( |
consEnfopsLinear |
| ) |
|
|
static |
constraint enforcing method of constraint handler for pseudo solutions
Definition at line 13347 of file cons_linear.c.
| static SCIP_DECL_CONSCHECK |
( |
consCheckLinear |
| ) |
|
|
static |
| static SCIP_DECL_CONSPROP |
( |
consPropLinear |
| ) |
|
|
static |
domain propagation method of constraint handler
Definition at line 13455 of file cons_linear.c.
| static SCIP_DECL_CONSPRESOL |
( |
consPresolLinear |
| ) |
|
|
static |
| static SCIP_DECL_CONSRESPROP |
( |
consRespropLinear |
| ) |
|
|
static |
| static SCIP_DECL_CONSLOCK |
( |
consLockLinear |
| ) |
|
|
static |
| static SCIP_DECL_CONSDELVARS |
( |
consDelvarsLinear |
| ) |
|
|
static |
| static SCIP_DECL_CONSPRINT |
( |
consPrintLinear |
| ) |
|
|
static |
| static SCIP_DECL_CONSCOPY |
( |
consCopyLinear |
| ) |
|
|
static |
constraint copying method of constraint handler
Definition at line 14054 of file cons_linear.c.
| static SCIP_DECL_CONSPARSE |
( |
consParseLinear |
| ) |
|
|
static |
constraint parsing method of constraint handler
Definition at line 14085 of file cons_linear.c.
| static SCIP_DECL_CONSGETVARS |
( |
consGetVarsLinear |
| ) |
|
|
static |
constraint method of constraint handler which returns the variables (if possible)
Definition at line 14243 of file cons_linear.c.
| static SCIP_DECL_CONSGETNVARS |
( |
consGetNVarsLinear |
| ) |
|
|
static |
| static SCIP_DECL_EVENTEXEC |
( |
eventExecLinear |
| ) |
|
|
static |
| static SCIP_DECL_CONFLICTEXEC |
( |
conflictExecLinear |
| ) |
|
|
static |
| static SCIP_DECL_QUADCONSUPGD |
( |
upgradeConsQuadratic |
| ) |
|
|
static |
upgrades quadratic constraints with only and at least one linear variables into a linear constraint
Definition at line 14536 of file cons_linear.c.
References SCIP_OKAY.
| static SCIP_DECL_NONLINCONSUPGD |
( |
upgradeConsNonlinear |
| ) |
|
|
static |
| SCIP_RETCODE SCIPcreateConsLinear |
( |
SCIP * |
scip, |
|
|
SCIP_CONS ** |
cons, |
|
|
const char * |
name, |
|
|
int |
nvars, |
|
|
SCIP_VAR ** |
vars, |
|
|
SCIP_Real * |
vals, |
|
|
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 |
|
) |
| |
creates and captures a linear constraint
- Note
- the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
- Parameters
-
| scip | SCIP data structure |
| cons | pointer to hold the created constraint |
| name | name of constraint |
| nvars | number of nonzeros in the constraint |
| vars | array with variables of constraint entries |
| vals | array with coefficients of constraint entries |
| lhs | left hand side of constraint |
| rhs | right hand side of constraint |
| initial | should the LP relaxation of constraint be in the initial LP? Usually set to TRUE. Set to FALSE for 'lazy constraints'. |
| separate | should the constraint be separated during LP processing? Usually set to TRUE. |
| enforce | should the constraint be enforced during node processing? TRUE for model constraints, FALSE for additional, redundant constraints. |
| check | should the constraint be checked for feasibility? TRUE for model constraints, FALSE for additional, redundant constraints. |
| propagate | should the constraint be propagated during node processing? Usually set to TRUE. |
| local | is constraint only valid locally? Usually set to FALSE. Has to be set to TRUE, e.g., for branching constraints. |
| modifiable | is constraint modifiable (subject to column generation)? Usually set to FALSE. In column generation applications, set to TRUE if pricing adds coefficients to this constraint. |
| dynamic | Is constraint subject to aging? Usually set to FALSE. Set to TRUE for own cuts which are separated as constraints. |
| removable | should the relaxation be removed from the LP due to aging or cleanup? Usually set to FALSE. Set to TRUE for 'lazy constraints' and 'user cuts'. |
| stickingatnode | should the constraint always be kept at the node where it was added, even if it may be moved to a more global node? Usually set to FALSE. Set to TRUE to for constraints that represent node data. |
Definition at line 14821 of file cons_linear.c.
References consCatchAllEvents(), consdataCreate(), CONSHDLR_NAME, needEvents(), NULL, REALABS, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIP_Real, SCIP_STAGE_EXITPRESOLVE, SCIPABORT, SCIPconshdlrGetData(), SCIPcreateCons(), SCIPduplicateBufferArray, SCIPerrorMessage, SCIPfindConshdlr(), SCIPfreeBufferArray, SCIPgetProbvarLinearSum(), SCIPgetStage(), SCIPinfinity(), SCIPisInfinity(), SCIPisTransformed(), SCIPreallocBufferArray, and TRUE.
Referenced by addExtendedAsymmetricFormulation(), addExtendedFlowFormulation(), addLocalBranchingConstraint(), aggregateConstraints(), applyFixings(), consdataLinearize(), copyCuts(), CREATE_CONSTRAINT(), createAndAddLinearCons(), createCoveringProblem(), createLinearCons(), createNAryBranch(), createRows(), createSubproblem(), createSubSCIP(), createSubscip(), dualPresolve(), fixDeleteOrUpgradeCons(), fixVariableZeroNode(), forbidCover(), getFixedVariable(), presolveCreateBenTalNemirovskiApproxDim3(), presolveCreateGlineurApproxDim3(), presolveFindDuplicates(), presolveFindDuplicatesUpgradeCons(), presolveRemoveFixedVariables(), presolveTryAddLinearReform(), propIndicator(), readCnf(), readConstraints(), readOPBFile(), readRows(), replaceByLinearConstraints(), replaceViolatedByLinearConstraints(), SCIP_DECL_CONSCOPY(), SCIP_DECL_CONSINITPRE(), SCIP_DECL_CONSPRESOL(), SCIP_DECL_NONLINCONSUPGD(), SCIP_DECL_QUADCONSUPGD(), SCIPapplyZeroobj(), SCIPcopyConsLinear(), SCIPcreateConsIndicator(), SCIPgetVarCopy(), tightenBounds(), tryUpgradingLogicor(), tryUpgradingSetppc(), and upgradeLinearSuperindicator().
creates and captures a linear constraint in its most basic version, i. e., all constraint flags are set to their basic value as explained for the method SCIPcreateConsLinear(); all flags can be set via SCIPsetConsFLAGNAME-methods in scip.h
- See Also
- SCIPcreateConsLinear() for information about the basic constraint flag configuration
- Note
- the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
- Parameters
-
| scip | SCIP data structure |
| cons | pointer to hold the created constraint |
| name | name of constraint |
| nvars | number of nonzeros in the constraint |
| vars | array with variables of constraint entries |
| vals | array with coefficients of constraint entries |
| lhs | left hand side of constraint |
| rhs | right hand side of constraint |
Definition at line 15013 of file cons_linear.c.
Referenced by SCIPapplyProximity(), and SCIPcreateFiniteSolCopy().
| SCIP_RETCODE SCIPcopyConsLinear |
( |
SCIP * |
scip, |
|
|
SCIP_CONS ** |
cons, |
|
|
SCIP * |
sourcescip, |
|
|
const char * |
name, |
|
|
int |
nvars, |
|
|
SCIP_VAR ** |
sourcevars, |
|
|
SCIP_Real * |
sourcecoefs, |
|
|
SCIP_Real |
lhs, |
|
|
SCIP_Real |
rhs, |
|
|
SCIP_HASHMAP * |
varmap, |
|
|
SCIP_HASHMAP * |
consmap, |
|
|
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_Bool |
global, |
|
|
SCIP_Bool * |
valid |
|
) |
| |
creates by copying and captures a linear constraint
- Parameters
-
| scip | target SCIP data structure |
| cons | pointer to store the created target constraint |
| sourcescip | source SCIP data structure |
| name | name of constraint |
| nvars | number of variables in source variable array |
| sourcevars | source variables of the linear constraints |
| sourcecoefs | coefficient array of the linear constraint, or NULL if all coefficients are one |
| lhs | left hand side of the linear constraint |
| rhs | right hand side of the linear constraint |
| varmap | a SCIP_HASHMAP mapping variables of the source SCIP to corresponding variables of the target SCIP |
| consmap | a hashmap to store the mapping of source constraints to the corresponding target constraints |
| initial | should the LP relaxation of constraint be in the initial LP? |
| separate | should the constraint be separated during LP processing? |
| enforce | should the constraint be enforced during node processing? |
| check | should the constraint be checked for feasibility? |
| propagate | should the constraint be propagated during node processing? |
| local | is constraint only valid locally? |
| modifiable | is constraint modifiable (subject to column generation)? |
| dynamic | is constraint subject to aging? |
| removable | should the relaxation be removed from the LP due to aging or cleanup? |
| stickingatnode | should the constraint always be kept at the node where it was added, even if it may be moved to a more global node? |
| global | create a global or a local copy? |
| valid | pointer to store if the copying was valid |
Definition at line 15033 of file cons_linear.c.
References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPcreateConsLinear(), SCIPduplicateBufferArray, SCIPfreeBufferArray, SCIPgetProbvarLinearSum(), SCIPgetVarCopy(), SCIPisGT(), SCIPisInfinity(), SCIPreallocBufferArray, SCIPvarGetOrigvarSum(), SCIPvarIsOriginal(), and TRUE.
Referenced by SCIP_DECL_CONSCOPY().
adds coefficient to linear constraint (if it is not zero)
- Parameters
-
| scip | SCIP data structure |
| cons | constraint data |
| var | variable of constraint entry |
| val | coefficient of constraint entry |
Definition at line 15158 of file cons_linear.c.
Referenced by addCoefTerm(), applyFixings(), consdataLinearize(), createAndAddLinearCons(), createSubSCIP(), readCols(), readIndicators(), readLinearCoefs(), SCIP_DECL_CONSINITPRE(), SCIP_DECL_CONSPRESOL(), SCIP_DECL_NONLINCONSUPGD(), SCIP_DECL_QUADCONSUPGD(), SCIPaddCoefPseudoboolean(), SCIPaddVarIndicator(), SCIPapplyProximity(), SCIPapplyZeroobj(), SCIPcreateConsIndicator(), SCIPcreateFiniteSolCopy(), SCIPgetVarCopy(), tryUpgradingLogicor(), and tryUpgradingSetppc().
gets left hand side of linear constraint
- Parameters
-
| scip | SCIP data structure |
| cons | constraint data |
Definition at line 15313 of file cons_linear.c.
Referenced by addAltLPConstraint(), addLinearConstraints(), checkConsnames(), getLinearConsSides(), initMatrix(), printRangeSection(), readIndicators(), readNonlinearExprs(), readQCMatrix(), readQuadraticCoefs(), readRanges(), readRhs(), SCIP_DECL_CONSLOCK(), SCIP_DECL_CONSPARSE(), SCIP_DECL_READERWRITE(), SCIPmakeIndicatorFeasible(), SCIPwriteGms(), SCIPwriteLp(), SCIPwritePip(), upgradeIndicatorSuperindicator(), upgradeLinearSuperindicator(), writeFzn(), and writeOpbConstraints().
gets right hand side of linear constraint
- Parameters
-
| scip | SCIP data structure |
| cons | constraint data |
Definition at line 15337 of file cons_linear.c.
Referenced by addAltLPConstraint(), addLinearConstraints(), getLinearConsSides(), initMatrix(), printRangeSection(), propIndicator(), readIndicators(), readNonlinearExprs(), readQCMatrix(), readQuadraticCoefs(), readRanges(), readRhs(), SCIP_DECL_CONSLOCK(), SCIP_DECL_CONSPARSE(), SCIP_DECL_READERWRITE(), SCIPapplyProximity(), SCIPmakeIndicatorFeasible(), SCIPwriteGms(), SCIPwriteLp(), SCIPwritePip(), upgradeIndicatorSuperindicator(), upgradeLinearSuperindicator(), writeFzn(), writeOpbConstraints(), and writeOpbObjective().
gets the number of variables in the linear constraint
- Parameters
-
| scip | SCIP data structure |
| cons | constraint data |
Definition at line 15400 of file cons_linear.c.
Referenced by addAltLPConstraint(), addLinearConstraints(), extractLinearValues(), getLinearConsNVars(), getLinearConsVarsData(), initMatrix(), propIndicator(), readIndicators(), readNonlinearExprs(), readQCMatrix(), readQuadraticCoefs(), SCIP_DECL_CONSLOCK(), SCIP_DECL_CONSPRESOL(), SCIP_DECL_READERWRITE(), SCIPcreateConsIndicatorLinCons(), SCIPmakeIndicatorFeasible(), SCIPsetLinearConsIndicator(), SCIPwriteCcg(), SCIPwriteGms(), SCIPwriteLp(), SCIPwritePbm(), SCIPwritePip(), SCIPwritePpm(), upgradeIndicatorSuperindicator(), upgradeLinearSuperindicator(), writeFzn(), writeOpbConstraints(), and writeOpbObjective().
gets the array of variables in the linear constraint; the user must not modify this array!
- Parameters
-
| scip | SCIP data structure |
| cons | constraint data |
Definition at line 15424 of file cons_linear.c.
Referenced by addAltLPConstraint(), addLinearConstraints(), extractLinearValues(), getLinearConsVarsData(), initMatrix(), propIndicator(), readIndicators(), readNonlinearExprs(), readQCMatrix(), readQuadraticCoefs(), SCIP_DECL_CONSLOCK(), SCIP_DECL_CONSPRESOL(), SCIP_DECL_CONSPRINT(), SCIP_DECL_READERWRITE(), SCIPcreateConsIndicatorLinCons(), SCIPmakeIndicatorFeasible(), SCIPsetLinearConsIndicator(), SCIPwriteCcg(), SCIPwriteGms(), SCIPwriteLp(), SCIPwritePbm(), SCIPwritePip(), SCIPwritePpm(), upgradeIndicatorSuperindicator(), upgradeLinearSuperindicator(), writeFzn(), writeOpbConstraints(), and writeOpbObjective().
gets the array of coefficient values in the linear constraint; the user must not modify this array!
- Parameters
-
| scip | SCIP data structure |
| cons | constraint data |
Definition at line 15448 of file cons_linear.c.
Referenced by addAltLPConstraint(), addLinearConstraints(), extractLinearValues(), getLinearConsVarsData(), initMatrix(), propIndicator(), readIndicators(), readNonlinearExprs(), readQCMatrix(), readQuadraticCoefs(), SCIP_DECL_CONSLOCK(), SCIP_DECL_CONSPRESOL(), SCIP_DECL_CONSPRINT(), SCIP_DECL_READERWRITE(), SCIPmakeIndicatorFeasible(), SCIPwriteCcg(), SCIPwriteGms(), SCIPwriteLp(), SCIPwritePbm(), SCIPwritePip(), SCIPwritePpm(), upgradeIndicatorSuperindicator(), upgradeLinearSuperindicator(), writeFzn(), and writeOpbConstraints().
gets the activity of the linear constraint in the given solution
- Note
- if the solution contains values at infinity, this method will return SCIP_INVALID in case the activity comprises positive and negative infinity contributions
- Parameters
-
| scip | SCIP data structure |
| cons | constraint data |
| sol | solution, or NULL to use current node's solution |
Definition at line 15476 of file cons_linear.c.
gets the feasibility of the linear constraint in the given solution
- Parameters
-
| scip | SCIP data structure |
| cons | constraint data |
| sol | solution, or NULL to use current node's solution |
Definition at line 15504 of file cons_linear.c.
gets the dual Farkas value of the linear constraint in the current infeasible LP
- Parameters
-
| scip | SCIP data structure |
| cons | constraint data |
Definition at line 15559 of file cons_linear.c.
returns the linear relaxation of the given linear constraint; may return NULL if no LP row was yet created; the user must not modify the row!
- Parameters
-
| scip | SCIP data structure |
| cons | constraint data |
Definition at line 15588 of file cons_linear.c.
tries to automatically convert a linear constraint into a more specific and more specialized constraint
- Parameters
-
| scip | SCIP data structure |
| cons | source constraint to try to convert |
| upgdcons | pointer to store upgraded constraint, or NULL if not successful |
Definition at line 15612 of file cons_linear.c.
|