Scippy

SCIP

Solving Constraint Integer Programs

cons_varbound.c File Reference

Detailed Description

Constraint handler for variable bound constraints $lhs \le x + c y \le rhs$.

Author
Tobias Achterberg
Timo Berthold
Michael Winkler
Gerald Gamrath
Stefan Heinz

This constraint handler handles a special type of linear constraints, namely variable bound constraints. A variable bound constraint has the form

\[ lhs \leq x + c y \leq rhs \]

with coefficient $c \in Q$, $lhs\in Q \cup \{-\infty\}$, $rhs\in Q \cup \{\infty\}$, and decision variables $x$ (non-binary) and $y$ (binary or integer).

Note
Although x must be non-binary when the constraint is created, it can happen that x is upgraded to a binary variable, e.g. due to aggregations or bound changes in presolving.

Definition in file cons_varbound.c.

#include <assert.h>
#include <string.h>
#include <limits.h>
#include <ctype.h>
#include "scip/cons_varbound.h"
#include "scip/cons_linear.h"
#include "scip/cons_setppc.h"

Go to the source code of this file.

Macros

Constraint handler properties
#define CONSHDLR_NAME   "varbound"
 
#define CONSHDLR_DESC   "variable bounds lhs <= x + c*y <= rhs, x non-binary, y non-continuous"
 
#define CONSHDLR_SEPAPRIORITY   +900000
 
#define CONSHDLR_ENFOPRIORITY   -500000
 
#define CONSHDLR_CHECKPRIORITY   -500000
 
#define CONSHDLR_SEPAFREQ   0
 
#define CONSHDLR_PROPFREQ   1
 
#define CONSHDLR_EAGERFREQ   100
 
#define CONSHDLR_MAXPREROUNDS   -1
 
#define CONSHDLR_DELAYSEPA   FALSE
 
#define CONSHDLR_DELAYPROP   FALSE
 
#define CONSHDLR_DELAYPRESOL   FALSE
 
#define CONSHDLR_NEEDSCONS   TRUE
 
#define CONSHDLR_PROP_TIMING   SCIP_PROPTIMING_BEFORELP
 
#define EVENTHDLR_NAME   "varbound"
 
#define EVENTHDLR_DESC   "bound change event handler for variable bound constraints"
 
#define LINCONSUPGD_PRIORITY   +50000
 
Default parameter values
#define DEFAULT_PRESOLPAIRWISE   TRUE
 
#define DEFAULT_MAXLPCOEF   1e+09
 
#define DEFAULT_USEBDWIDENING   TRUE
 
#define MAXSCALEDCOEF   1000LL
 

Typedefs

typedef enum Proprule PROPRULE
 

Enumerations

enum  Proprule {
  PROPRULE_1,
  PROPRULE_2,
  PROPRULE_3,
  PROPRULE_4,
  PROPRULE_INVALID,
  PROPRULE_INVALID = 0,
  PROPRULE_1 = 1,
  PROPRULE_2 = 2,
  PROPRULE_3 = 3,
  PROPRULE_4 = 4,
  PROPRULE_1_CORETIMES = 1,
  PROPRULE_2_EDGEFINDING = 2,
  PROPRULE_3_TTEF = 3,
  PROPRULE_1_RHS = 1,
  PROPRULE_1_LHS = 2,
  PROPRULE_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
}
 

Functions

Local methods
static SCIP_DECL_SORTPTRCOMP (consVarboundComp)
 
static SCIP_RETCODE conshdlrdataCreate (SCIP *scip, SCIP_CONSHDLRDATA **conshdlrdata, SCIP_EVENTHDLR *eventhdlr)
 
static void conshdlrdataFree (SCIP *scip, SCIP_CONSHDLRDATA **conshdlrdata)
 
static SCIP_RETCODE catchEvents (SCIP *scip, SCIP_CONS *cons, SCIP_EVENTHDLR *eventhdlr)
 
static SCIP_RETCODE dropEvents (SCIP *scip, SCIP_CONS *cons, SCIP_EVENTHDLR *eventhdlr)
 
static SCIP_RETCODE consdataCreate (SCIP *scip, SCIP_CONSDATA **consdata, SCIP_VAR *var, SCIP_VAR *vbdvar, SCIP_Real vbdcoef, SCIP_Real lhs, SCIP_Real rhs)
 
static SCIP_RETCODE consdataFree (SCIP *scip, SCIP_CONSDATA **consdata)
 
static SCIP_RETCODE createRelaxation (SCIP *scip, SCIP_CONS *cons)
 
static SCIP_RETCODE addRelaxation (SCIP *scip, SCIP_CONS *cons)
 
static SCIP_Bool checkCons (SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol, SCIP_Bool checklprows)
 
static SCIP_RETCODE resolvePropagation (SCIP *scip, SCIP_CONS *cons, SCIP_VAR *infervar, PROPRULE proprule, SCIP_BOUNDTYPE boundtype, SCIP_BDCHGIDX *bdchgidx, SCIP_Real inferbd, SCIP_Bool usebdwidening)
 
static SCIP_RETCODE analyzeConflict (SCIP *scip, SCIP_CONS *cons, SCIP_VAR *infervar, SCIP_Real inferbd, PROPRULE proprule, SCIP_BOUNDTYPE boundtype, SCIP_Bool usebdwidening)
 
static SCIP_RETCODE separateCons (SCIP *scip, SCIP_CONS *cons, SCIP_Bool usebdwidening, SCIP_SOL *sol, SCIP_RESULT *result)
 
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 propagateCons (SCIP *scip, SCIP_CONS *cons, SCIP_Bool usebdwidening, SCIP_Bool *cutoff, int *nchgbds, int *nchgsides, int *ndelconss)
 
static void checkRedundancySide (SCIP *scip, SCIP_VAR *var, SCIP_VAR *vbdvar, SCIP_Real coef0, SCIP_Real coef1, SCIP_Real side0, SCIP_Real side1, SCIP_Bool *sideequal, SCIP_Bool *cons0sidered, SCIP_Bool *cons1sidered, SCIP_Bool islhs)
 
static SCIP_RETCODE preprocessConstraintPairs (SCIP *scip, SCIP_CONS **conss, int nconss, SCIP_Bool *cutoff, int *nchgbds, int *ndelconss, int *nchgcoefs, int *nchgsides)
 
static SCIP_RETCODE prettifyConss (SCIP *scip, SCIP_CONS **conss, int nconss, int *nchgcoefs, int *nchgsides)
 
static SCIP_RETCODE applyFixings (SCIP *scip, SCIP_CONS *cons, SCIP_EVENTHDLR *eventhdlr, SCIP_Bool *cutoff, int *nchgbds, int *ndelconss, int *naddconss)
 
static SCIP_RETCODE tightenCoefs (SCIP *scip, SCIP_CONS *cons, int *nchgcoefs, int *nchgsides, int *ndelconss)
 
static SCIP_RETCODE upgradeConss (SCIP *scip, SCIP_CONSHDLRDATA *conshdlrdata, SCIP_CONS **conss, int nconss, SCIP_Bool *cutoff, int *naggrvars, int *nchgbds, int *nchgcoefs, int *nchgsides, int *ndelconss, int *naddconss)
 
Linear constraint upgrading
static SCIP_DECL_LINCONSUPGD (linconsUpgdVarbound)
 
Callback methods
static SCIP_DECL_CONSHDLRCOPY (conshdlrCopyVarbound)
 
static SCIP_DECL_CONSFREE (consFreeVarbound)
 
static SCIP_DECL_CONSEXITSOL (consExitsolVarbound)
 
static SCIP_DECL_CONSDELETE (consDeleteVarbound)
 
static SCIP_DECL_CONSTRANS (consTransVarbound)
 
static SCIP_DECL_CONSINITLP (consInitlpVarbound)
 
static SCIP_DECL_CONSSEPALP (consSepalpVarbound)
 
static SCIP_DECL_CONSSEPASOL (consSepasolVarbound)
 
static SCIP_DECL_CONSENFOLP (consEnfolpVarbound)
 
static SCIP_DECL_CONSENFOPS (consEnfopsVarbound)
 
static SCIP_DECL_CONSCHECK (consCheckVarbound)
 
static SCIP_DECL_CONSPROP (consPropVarbound)
 
static SCIP_DECL_CONSPRESOL (consPresolVarbound)
 
static SCIP_DECL_CONSRESPROP (consRespropVarbound)
 
static SCIP_DECL_CONSLOCK (consLockVarbound)
 
static SCIP_DECL_CONSPRINT (consPrintVarbound)
 
static SCIP_DECL_CONSCOPY (consCopyVarbound)
 
static SCIP_DECL_CONSPARSE (consParseVarbound)
 
static SCIP_DECL_CONSGETVARS (consGetVarsVarbound)
 
static SCIP_DECL_CONSGETNVARS (consGetNVarsVarbound)
 
static SCIP_DECL_EVENTEXEC (eventExecVarbound)
 
Interface methods
SCIP_RETCODE SCIPincludeConshdlrVarbound (SCIP *scip)
 
SCIP_RETCODE SCIPcreateConsVarbound (SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_VAR *var, SCIP_VAR *vbdvar, SCIP_Real vbdcoef, 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 SCIPcreateConsBasicVarbound (SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_VAR *var, SCIP_VAR *vbdvar, SCIP_Real vbdcoef, SCIP_Real lhs, SCIP_Real rhs)
 
SCIP_Real SCIPgetLhsVarbound (SCIP *scip, SCIP_CONS *cons)
 
SCIP_Real SCIPgetRhsVarbound (SCIP *scip, SCIP_CONS *cons)
 
SCIP_VARSCIPgetVarVarbound (SCIP *scip, SCIP_CONS *cons)
 
SCIP_VARSCIPgetVbdvarVarbound (SCIP *scip, SCIP_CONS *cons)
 
SCIP_Real SCIPgetVbdcoefVarbound (SCIP *scip, SCIP_CONS *cons)
 
SCIP_Real SCIPgetDualsolVarbound (SCIP *scip, SCIP_CONS *cons)
 
SCIP_Real SCIPgetDualfarkasVarbound (SCIP *scip, SCIP_CONS *cons)
 
SCIP_ROWSCIPgetRowVarbound (SCIP *scip, SCIP_CONS *cons)
 

Macro Definition Documentation

#define CONSHDLR_DESC   "variable bounds lhs <= x + c*y <= rhs, x non-binary, y non-continuous"

Definition at line 54 of file cons_varbound.c.

Referenced by SCIPincludeConshdlrVarbound().

#define CONSHDLR_SEPAPRIORITY   +900000

priority of the constraint handler for separation

Definition at line 55 of file cons_varbound.c.

Referenced by SCIPincludeConshdlrVarbound().

#define CONSHDLR_ENFOPRIORITY   -500000

priority of the constraint handler for constraint enforcing

Definition at line 56 of file cons_varbound.c.

Referenced by SCIPincludeConshdlrVarbound().

#define CONSHDLR_CHECKPRIORITY   -500000

priority of the constraint handler for checking feasibility

Definition at line 57 of file cons_varbound.c.

Referenced by SCIPincludeConshdlrVarbound().

#define CONSHDLR_SEPAFREQ   0

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

Definition at line 58 of file cons_varbound.c.

Referenced by SCIPincludeConshdlrVarbound().

#define CONSHDLR_PROPFREQ   1

frequency for propagating domains; zero means only preprocessing propagation

Definition at line 59 of file cons_varbound.c.

Referenced by SCIPincludeConshdlrVarbound().

#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 60 of file cons_varbound.c.

Referenced by SCIPincludeConshdlrVarbound().

#define CONSHDLR_MAXPREROUNDS   -1

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

Definition at line 62 of file cons_varbound.c.

Referenced by SCIPincludeConshdlrVarbound().

#define CONSHDLR_DELAYSEPA   FALSE

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

Definition at line 63 of file cons_varbound.c.

Referenced by SCIPincludeConshdlrVarbound().

#define CONSHDLR_DELAYPROP   FALSE

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

Definition at line 64 of file cons_varbound.c.

Referenced by SCIPincludeConshdlrVarbound().

#define CONSHDLR_DELAYPRESOL   FALSE

should presolving method be delayed, if other presolvers found reductions?

Definition at line 65 of file cons_varbound.c.

Referenced by SCIPincludeConshdlrVarbound().

#define CONSHDLR_NEEDSCONS   TRUE

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

Definition at line 66 of file cons_varbound.c.

Referenced by SCIPincludeConshdlrVarbound().

#define CONSHDLR_PROP_TIMING   SCIP_PROPTIMING_BEFORELP

Definition at line 68 of file cons_varbound.c.

Referenced by SCIPincludeConshdlrVarbound().

#define EVENTHDLR_NAME   "varbound"

Definition at line 70 of file cons_varbound.c.

Referenced by SCIPincludeConshdlrVarbound().

#define EVENTHDLR_DESC   "bound change event handler for variable bound constraints"

Definition at line 71 of file cons_varbound.c.

Referenced by SCIPincludeConshdlrVarbound().

#define LINCONSUPGD_PRIORITY   +50000

priority of the constraint handler for upgrading of linear constraints

Definition at line 73 of file cons_varbound.c.

Referenced by SCIPincludeConshdlrVarbound().

#define DEFAULT_PRESOLPAIRWISE   TRUE

should pairwise constraint comparison be performed in presolving?

Definition at line 82 of file cons_varbound.c.

Referenced by SCIPincludeConshdlrVarbound().

#define DEFAULT_MAXLPCOEF   1e+09

maximum coefficient in varbound constraint to be added as a row into LP

Definition at line 83 of file cons_varbound.c.

Referenced by SCIPincludeConshdlrVarbound().

#define DEFAULT_USEBDWIDENING   TRUE

should bound widening be used to initialize conflict analysis?

Definition at line 84 of file cons_varbound.c.

Referenced by SCIPincludeConshdlrVarbound().

#define MAXSCALEDCOEF   1000LL

maximal coefficient value after scaling

Definition at line 87 of file cons_varbound.c.

Referenced by prettifyConss().

Typedef Documentation

typedef enum Proprule PROPRULE

Definition at line 124 of file cons_varbound.c.

Enumeration Type Documentation

enum Proprule

Propagation rules

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 117 of file cons_varbound.c.

Function Documentation

static SCIP_DECL_SORTPTRCOMP ( consVarboundComp  )
static

compares two varbound constraints cons1: $ lhs1 \le x1 + c1 y1 \le rhs1 $ and cons2: $ lhs2 \le x2 + c2 y2 \le rhs2 $ w.r.t. the indices of the contained variables

returns -1 if:

  • the index of x1 is smaller than the index of x2 or
  • x1 = x2 and the index of y1 is smaller than the index of y2 or
  • x1 = x2 and y1 = y2 and cons2 was recently changed, but cons1 not

returns 0 if x1 = x2, y1 = y2, and the changed status of both constraints is the same

and returns +1 otherwise

Definition at line 144 of file cons_varbound.c.

References NULL, SCIPconsGetData(), and SCIPvarGetIndex().

static SCIP_RETCODE conshdlrdataCreate ( SCIP scip,
SCIP_CONSHDLRDATA **  conshdlrdata,
SCIP_EVENTHDLR eventhdlr 
)
static

creates constraint handler data for varbound constraint handler

Parameters
scipSCIP data structure
conshdlrdatapointer to store the constraint handler data
eventhdlrevent handler

Definition at line 180 of file cons_varbound.c.

References NULL, SCIP_CALL, SCIP_OKAY, and SCIPallocMemory.

Referenced by SCIPincludeConshdlrVarbound().

static void conshdlrdataFree ( SCIP scip,
SCIP_CONSHDLRDATA **  conshdlrdata 
)
static

frees constraint handler data for varbound constraint handler

Parameters
scipSCIP data structure
conshdlrdatapointer to the constraint handler data

Definition at line 199 of file cons_varbound.c.

References NULL, and SCIPfreeMemory.

Referenced by SCIP_DECL_CONSFREE().

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

catches events for variables

Parameters
scipSCIP data structure
consvariable bound constraint
eventhdlrevent handler

Definition at line 216 of file cons_varbound.c.

References NULL, SCIP_CALL, SCIP_EVENTTYPE_BOUNDTIGHTENED, SCIP_EVENTTYPE_VARFIXED, SCIP_OKAY, SCIPcatchVarEvent(), and SCIPconsGetData().

Referenced by applyFixings(), SCIP_DECL_CONSTRANS(), and SCIPcreateConsVarbound().

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

drops events for variables

Parameters
scipSCIP data structure
consvariable bound constraint
eventhdlrevent handler

Definition at line 236 of file cons_varbound.c.

References NULL, SCIP_CALL, SCIP_EVENTTYPE_BOUNDTIGHTENED, SCIP_EVENTTYPE_VARFIXED, SCIP_OKAY, SCIPconsGetData(), and SCIPdropVarEvent().

Referenced by applyFixings(), and SCIP_DECL_CONSDELETE().

static SCIP_RETCODE consdataCreate ( SCIP scip,
SCIP_CONSDATA **  consdata,
SCIP_VAR var,
SCIP_VAR vbdvar,
SCIP_Real  vbdcoef,
SCIP_Real  lhs,
SCIP_Real  rhs 
)
static

creates a variable bound constraint data object

Parameters
scipSCIP data structure
consdatapointer to store the variable bound constraint data
varvariable x that has variable bound
vbdvarbinary, integer or implicit integer bounding variable y
vbdcoefcoefficient c of bounding variable y
lhsleft hand side of variable bound inequality
rhsright hand side of variable bound inequality

Definition at line 256 of file cons_varbound.c.

References FALSE, NULL, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_VARSTATUS_MULTAGGR, SCIP_VARTYPE_CONTINUOUS, SCIPallocBlockMemory, SCIPcaptureVar(), SCIPerrorMessage, SCIPgetTransformedVar(), SCIPinfinity(), SCIPisGT(), SCIPisInfinity(), SCIPisTransformed(), SCIPvarGetProbvar(), SCIPvarGetStatus(), SCIPvarGetType(), and TRUE.

Referenced by SCIP_DECL_CONSTRANS(), and SCIPcreateConsVarbound().

static SCIP_RETCODE consdataFree ( SCIP scip,
SCIP_CONSDATA **  consdata 
)
static

frees a variable bound constraint data

Parameters
scipSCIP data structure
consdatapointer to the variable bound constraint

Definition at line 326 of file cons_varbound.c.

References NULL, SCIP_CALL, SCIP_OKAY, SCIPfreeBlockMemory, SCIPreleaseRow(), and SCIPreleaseVar().

Referenced by SCIP_DECL_CONSDELETE().

static SCIP_RETCODE createRelaxation ( SCIP scip,
SCIP_CONS cons 
)
static

creates LP row corresponding to variable bound constraint

Parameters
scipSCIP data structure
consvariable bound constraint

Definition at line 351 of file cons_varbound.c.

References NULL, SCIP_CALL, SCIP_OKAY, SCIPaddVarToRow(), SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconsGetName(), SCIPconsIsLocal(), SCIPconsIsModifiable(), SCIPconsIsRemovable(), and SCIPcreateEmptyRowCons().

Referenced by addRelaxation(), and separateCons().

static SCIP_RETCODE addRelaxation ( SCIP scip,
SCIP_CONS cons 
)
static

adds linear relaxation of variable bound constraint to the LP

Parameters
scipSCIP data structure
consvariable bound constraint

Definition at line 372 of file cons_varbound.c.

References CONSHDLR_NAME, createRelaxation(), FALSE, NULL, REALABS, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIP_VARTYPE_CONTINUOUS, SCIPaddCut(), SCIPconsGetData(), SCIPconsGetName(), SCIPconshdlrGetData(), SCIPdebug, SCIPdebugMessage, SCIPerrorMessage, SCIPfindConshdlr(), SCIPisGT(), SCIPprintRow(), SCIProwIsInLP(), and SCIPvarGetType().

Referenced by SCIP_DECL_CONSINITLP().

static SCIP_Bool checkCons ( SCIP scip,
SCIP_CONS cons,
SCIP_SOL sol,
SCIP_Bool  checklprows 
)
static

returns whether the given solution is feasible for the given variable bound constraint

Parameters
scipSCIP data structure
consvariable bound constraint
solsolution to check, NULL for current solution
checklprowsshould LP rows be checked?

Definition at line 422 of file cons_varbound.c.

References FALSE, NULL, SCIP_Real, SCIPconsGetData(), SCIPconsGetName(), SCIPdebugMessage, SCIPgetSolVal(), SCIPisFeasGE(), SCIPisFeasLE(), SCIPisFeasZero(), SCIPisInfinity(), SCIProwIsInLP(), and TRUE.

Referenced by SCIP_DECL_CONSCHECK(), SCIP_DECL_CONSENFOLP(), SCIP_DECL_CONSENFOPS(), and separateCons().

static SCIP_RETCODE resolvePropagation ( SCIP scip,
SCIP_CONS cons,
SCIP_VAR infervar,
PROPRULE  proprule,
SCIP_BOUNDTYPE  boundtype,
SCIP_BDCHGIDX bdchgidx,
SCIP_Real  inferbd,
SCIP_Bool  usebdwidening 
)
static

resolves a propagation on the given variable by supplying the variables needed for applying the corresponding propagation rule (see propagateCons()): (1) left hand side and bounds on y -> lower bound on x (2) left hand side and upper bound on x -> bound on y (3) right hand side and bounds on y -> upper bound on x (4) right hand side and lower bound on x -> bound on y

Parameters
scipSCIP data structure
consconstraint that inferred the bound change
infervarvariable that was deduced
proprulepropagation rule that deduced the bound change
boundtypethe type of the changed bound (lower or upper bound)
bdchgidxbound change index (time stamp of bound change), or NULL for current time
inferbdinference bound which needs to be explained
usebdwideningshould bound widening be used to in conflict analysis?

Definition at line 466 of file cons_varbound.c.

References NULL, PROPRULE_1, PROPRULE_2, PROPRULE_3, PROPRULE_4, SCIP_BOUNDTYPE_LOWER, SCIP_BOUNDTYPE_UPPER, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_Real, SCIP_VARTYPE_CONTINUOUS, SCIPaddConflictLb(), SCIPaddConflictRelaxedLb(), SCIPaddConflictRelaxedUb(), SCIPaddConflictUb(), SCIPadjustedVarLb(), SCIPadjustedVarUb(), SCIPconsGetData(), SCIPconsGetName(), SCIPerrorMessage, SCIPfeastol(), SCIPisEQ(), SCIPisInfinity(), SCIPisZero(), SCIPvarGetType(), and SCIPvarIsIntegral().

Referenced by analyzeConflict(), and SCIP_DECL_CONSRESPROP().

static SCIP_RETCODE analyzeConflict ( SCIP scip,
SCIP_CONS cons,
SCIP_VAR infervar,
SCIP_Real  inferbd,
PROPRULE  proprule,
SCIP_BOUNDTYPE  boundtype,
SCIP_Bool  usebdwidening 
)
static

analyze infeasibility

Parameters
scipSCIP data structure
consvariable bound constraint
infervarvariable that was deduced
inferbdbound which led to infeasibility
proprulepropagation rule that deduced the bound change
boundtypethe type of the changed bound (lower or upper bound)
usebdwideningshould bound widening be used to in conflict analysis?

Definition at line 673 of file cons_varbound.c.

References MAX, NULL, REALABS, resolvePropagation(), SCIP_BOUNDTYPE_LOWER, SCIP_BOUNDTYPE_UPPER, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIP_STAGE_SOLVING, SCIPaddConflictLb(), SCIPaddConflictRelaxedLb(), SCIPaddConflictRelaxedUb(), SCIPaddConflictUb(), SCIPadjustedVarLb(), SCIPadjustedVarUb(), SCIPanalyzeConflictCons(), SCIPconsGetData(), SCIPfeastol(), SCIPgetConflictVarLb(), SCIPgetConflictVarUb(), SCIPgetStage(), SCIPinitConflictAnalysis(), SCIPinProbing(), SCIPisConflictAnalysisApplicable(), and SCIPvarIsIntegral().

Referenced by propagateCons(), and separateCons().

static SCIP_RETCODE separateCons ( SCIP scip,
SCIP_CONS cons,
SCIP_Bool  usebdwidening,
SCIP_SOL sol,
SCIP_RESULT result 
)
static

separates the given variable bound constraint

Parameters
scipSCIP data structure
consvariable bound constraint
usebdwideningshould bound widening be used to in conflict analysis?
solprimal CIP solution, NULL for current LP solution
resultpointer to store the result of the separation call

Definition at line 839 of file cons_varbound.c.

References analyzeConflict(), checkCons(), CONSHDLR_NAME, createRelaxation(), FALSE, NULL, PROPRULE_1, PROPRULE_3, SCIP_Bool, SCIP_BOUNDTYPE_LOWER, SCIP_BOUNDTYPE_UPPER, SCIP_CALL, SCIP_CUTOFF, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIP_Real, SCIP_REDUCEDDOM, SCIP_SEPARATED, SCIP_VARTYPE_CONTINUOUS, SCIPaddCut(), SCIPconsGetData(), SCIPconsGetName(), SCIPdebugMessage, SCIPerrorMessage, SCIPfindConshdlr(), SCIPgetRowSolFeasibility(), SCIPinferVarLbCons(), SCIPinferVarUbCons(), SCIPisFeasEQ(), SCIPisFeasNegative(), SCIPisGT(), SCIPisInfinity(), SCIPisLT(), SCIProwIsInLP(), SCIPvarGetLbLocal(), SCIPvarGetType(), SCIPvarGetUbLocal(), and TRUE.

Referenced by SCIP_DECL_CONSENFOLP(), SCIP_DECL_CONSSEPALP(), and SCIP_DECL_CONSSEPASOL().

static SCIP_RETCODE chgLhs ( SCIP scip,
SCIP_CONS cons,
SCIP_Real  lhs 
)
static

sets left hand side of varbound constraint

Parameters
scipSCIP data structure
conslinear constraint
lhsnew left hand side

Definition at line 970 of file cons_varbound.c.

References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPconsGetData(), SCIPconsIsLocked(), SCIPconsIsTransformed(), SCIPinfinity(), SCIPisEQ(), SCIPisInfinity(), SCIPisLT(), SCIPisPositive(), SCIPlockVarCons(), SCIPunlockVarCons(), and TRUE.

Referenced by preprocessConstraintPairs(), and propagateCons().

static SCIP_RETCODE chgRhs ( SCIP scip,
SCIP_CONS cons,
SCIP_Real  rhs 
)
static

sets right hand side of varbound constraint

Parameters
scipSCIP data structure
conslinear constraint
rhsnew right hand side

Definition at line 1052 of file cons_varbound.c.

References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPconsGetData(), SCIPconsIsLocked(), SCIPconsIsTransformed(), SCIPinfinity(), SCIPisEQ(), SCIPisGT(), SCIPisInfinity(), SCIPisPositive(), SCIPlockVarCons(), SCIPunlockVarCons(), and TRUE.

Referenced by preprocessConstraintPairs(), and propagateCons().

static SCIP_RETCODE propagateCons ( SCIP scip,
SCIP_CONS cons,
SCIP_Bool  usebdwidening,
SCIP_Bool cutoff,
int *  nchgbds,
int *  nchgsides,
int *  ndelconss 
)
static

propagation method for variable bound constraint

Parameters
scipSCIP data structure
consvariable bound constraint
usebdwideningshould bound widening be used to in conflict analysis?
cutoffpointer to store whether the node can be cut off
nchgbdspointer to count number of bound changes
nchgsidespointer to count number of side changes
ndelconsspointer to count number of deleted constraints, or NULL

Definition at line 1134 of file cons_varbound.c.

References analyzeConflict(), chgLhs(), chgRhs(), FALSE, NULL, PROPRULE_1, PROPRULE_2, PROPRULE_3, PROPRULE_4, SCIP_Bool, SCIP_BOUNDTYPE_LOWER, SCIP_BOUNDTYPE_UPPER, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIP_STAGE_PRESOLVING, SCIP_VARSTATUS_MULTAGGR, SCIPadjustedVarLb(), SCIPadjustedVarUb(), SCIPconsGetData(), SCIPconsGetName(), SCIPdebugMessage, SCIPdelConsLocal(), SCIPgetStage(), SCIPincConsAge(), SCIPinferVarLbCons(), SCIPinferVarUbCons(), SCIPinfinity(), SCIPinProbing(), SCIPinRepropagation(), SCIPisFeasGE(), SCIPisFeasLE(), SCIPisGT(), SCIPisInfinity(), SCIPisLT(), SCIPresetConsAge(), SCIPvarGetLbLocal(), SCIPvarGetName(), SCIPvarGetStatus(), SCIPvarGetUbLocal(), and TRUE.

Referenced by SCIP_DECL_CONSPRESOL(), SCIP_DECL_CONSPROP(), and upgradeConss().

static void checkRedundancySide ( SCIP scip,
SCIP_VAR var,
SCIP_VAR vbdvar,
SCIP_Real  coef0,
SCIP_Real  coef1,
SCIP_Real  side0,
SCIP_Real  side1,
SCIP_Bool sideequal,
SCIP_Bool cons0sidered,
SCIP_Bool cons1sidered,
SCIP_Bool  islhs 
)
static
Parameters
scipSCIP data structure
varvariable x that has variable bound
vbdvarbinary, integer or implicit integer bounding variable y
coef0coefficient c0 of bounding variable y for constraint 0
coef1coefficient c1 of bounding variable y for constraint 1
side0one side of variable bound inequality for constraint 0
side1one side of variable bound inequality for constraint 1
sideequalpointer to store if both constraints have the same redundancy on the given side
cons0sideredpointer to store if side of constraint 0 is redundant
cons1sideredpointer to store if side of constraint 1 is redundant
islhsdo we check the left or the right hand side

Definition at line 1475 of file cons_varbound.c.

References FALSE, MAX, MIN, NULL, REALABS, SCIP_Bool, SCIP_Real, SCIP_VARTYPE_CONTINUOUS, SCIPepsilon(), SCIPfeasCeil(), SCIPfeasFloor(), SCIPisFeasIntegral(), SCIPisInfinity(), SCIPisPositive(), SCIPvarGetLbGlobal(), SCIPvarGetType(), SCIPvarGetUbGlobal(), and TRUE.

Referenced by preprocessConstraintPairs().

static SCIP_RETCODE preprocessConstraintPairs ( SCIP scip,
SCIP_CONS **  conss,
int  nconss,
SCIP_Bool cutoff,
int *  nchgbds,
int *  ndelconss,
int *  nchgcoefs,
int *  nchgsides 
)
static

compares each constraint with all other constraints for possible redundancy and removes or changes constraint

we will order all constraint to have constraints with same variables next to each other to speed up presolving

consider two constraints like lhs1 <= x + b1*y <= rhs1 and lhs2 <= x + b2*y <= rhs2 we are doing the following presolving steps:

if( b1 == b2 ) newlhs = MAX(lhs1, lhs2) newrhs = MIN(rhs1, rhs2) updateSides delete one constraint else if( ((b1 > 0) == (b2 > 0)) && (lhs1 != -inf && lhs2 != -inf) || (rhs1 != inf && rhs2 != inf) )

 (i.e. both constraint have either a valid lhs or a valid rhs and infinity is on the same side and the
       coeffcients have the same size )

if( y is binary )
    if( lhs1 != -inf )
        newlhs = MAX(lhs1, lhs2)
        newb = newlhs - MAX(lhs1 - b1, lhs2 - b2)
    else
        newrhs = MIN(lhs1, lhs2)
        newb = newrhs - MIN(rhs1 - b1, rhs2 - b2)
    updateSidesAndCoef
    delete one constraint
else
    we calculate possible values for both variables and check which constraint is tighter

else nothing possible

We also try to tighten bounds in the case of two constraints lhs1 <= x + b1*y <= rhs1 and lhs2 <= y + b2*x <= rhs2. Eliminiating one variable and inserting into the second yields the following bounds: If b2 > 0: (1 - b1 * b2) * y >= lhs2 - b2 * rhs1 (1 - b1 * b2) * y <= rhs2 - b2 * lhs1 If b2 < 0: (1 - b1 * b2) * y >= lhs2 - b2 * lhs1 (1 - b1 * b2) * y <= rhs2 - b2 * rhs1 The case of x is similar.

Parameters
scipSCIP data structure
conssconstraint set
nconssnumber of constraints in constraint set
cutoffpointer to store TRUE, if a cutoff was found
nchgbdspointer to count number of bound changes
ndelconsspointer to count number of deleted constraints
nchgcoefspointer to count the number of changed coefficients
nchgsidespointer to count number of changed left/right hand sides

Definition at line 1823 of file cons_varbound.c.

References checkRedundancySide(), chgLhs(), chgRhs(), FALSE, MAX, MIN, NULL, REALABS, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIP_UNKNOWN, SCIPadjustedVarLb(), SCIPadjustedVarUb(), SCIPconsGetData(), SCIPconsGetName(), SCIPconsIsActive(), SCIPconsIsLocked(), SCIPconsIsModifiable(), SCIPconsIsTransformed(), SCIPdebugMessage, SCIPdebugPrintCons, SCIPdelCons(), SCIPduplicateBufferArray, SCIPfreeBufferArray, SCIPinfinity(), SCIPisEQ(), SCIPisFeasLT(), SCIPisFeasNegative(), SCIPisFeasPositive(), SCIPisFeasZero(), SCIPisInfinity(), SCIPisNegative(), SCIPisPositive(), SCIPisZero(), SCIPlockVarCons(), SCIPsortPtr(), SCIPtightenVarLb(), SCIPtightenVarUb(), SCIPunlockVarCons(), SCIPupdateConsFlags(), SCIPvarGetLbGlobal(), SCIPvarGetName(), SCIPvarGetUbGlobal(), SCIPvarIsBinary(), and TRUE.

Referenced by SCIP_DECL_CONSPRESOL().

static SCIP_RETCODE prettifyConss ( SCIP scip,
SCIP_CONS **  conss,
int  nconss,
int *  nchgcoefs,
int *  nchgsides 
)
static

for all varbound constraints with two integer variables make the coefficients integral

Parameters
scipSCIP data structure
conssconstraint set
nconssnumber of constraints in constraint set
nchgcoefspointer to count the number of changed coefficients
nchgsidespointer to count number of changed left/right hand sides

Definition at line 2400 of file cons_varbound.c.

References FALSE, MAXSCALEDCOEF, MIN, NULL, REALABS, SCIP_Bool, SCIP_Longint, SCIP_OKAY, SCIP_Real, SCIP_VARTYPE_BINARY, SCIP_VARTYPE_IMPLINT, SCIP_VARTYPE_INTEGER, SCIPconsGetData(), SCIPconsIsDeleted(), SCIPdebugMessage, SCIPdebugPrintCons, SCIPepsilon(), SCIPfeastol(), SCIPgetNImplVars(), SCIPgetNIntVars(), SCIPinfinity(), SCIPisEQ(), SCIPisGE(), SCIPisInfinity(), SCIPisIntegral(), SCIPisLT(), SCIPrealToRational(), and SCIPvarGetType().

Referenced by SCIP_DECL_CONSPRESOL().

static SCIP_RETCODE applyFixings ( SCIP scip,
SCIP_CONS cons,
SCIP_EVENTHDLR eventhdlr,
SCIP_Bool cutoff,
int *  nchgbds,
int *  ndelconss,
int *  naddconss 
)
static

replaces fixed and aggregated variables in variable bound constraint by active problem variables

Parameters
scipSCIP data structure
consvariable bound constraint
eventhdlrevent handler
cutoffpointer to store whether an infeasibility was detected
nchgbdspointer to count number of bound changes
ndelconsspointer to count number of deleted constraints
naddconsspointer to count number of added constraints

Definition at line 2560 of file cons_varbound.c.

References catchEvents(), dropEvents(), FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIP_VARSTATUS_MULTAGGR, SCIPaddCoefLinear(), SCIPaddCons(), SCIPcaptureVar(), SCIPchgLhsLinear(), SCIPchgRhsLinear(), SCIPconsGetData(), SCIPconsGetName(), SCIPconsIsChecked(), SCIPconsIsDynamic(), SCIPconsIsEnforced(), SCIPconsIsInitial(), SCIPconsIsLocal(), SCIPconsIsModifiable(), SCIPconsIsPropagated(), SCIPconsIsRemovable(), SCIPconsIsSeparated(), SCIPconsIsStickingAtNode(), SCIPcreateConsLinear(), SCIPdebugMessage, SCIPdebugPrintCons, SCIPdelCons(), SCIPgetProbvarSum(), SCIPisFeasGT(), SCIPisFeasLT(), SCIPisInfinity(), SCIPisZero(), SCIPreleaseCons(), SCIPreleaseVar(), SCIPtightenVarLb(), SCIPtightenVarUb(), SCIPvarGetLbGlobal(), SCIPvarGetName(), SCIPvarGetStatus(), SCIPvarGetUbGlobal(), and TRUE.

Referenced by SCIP_DECL_CONSPRESOL(), and upgradeConss().

static SCIP_RETCODE tightenCoefs ( SCIP scip,
SCIP_CONS cons,
int *  nchgcoefs,
int *  nchgsides,
int *  ndelconss 
)
static

tightens variable bound coefficient by inspecting the global bounds of the involved variables; note: this is also performed by the linear constraint handler - only necessary if the user directly creates variable bound constraints

Parameters
scipSCIP data structure
consvariable bound constraint
nchgcoefspointer to count the number of changed coefficients
nchgsidespointer to count the number of left and right hand sides
ndelconsspointer to count number of deleted constraints

Definition at line 2974 of file cons_varbound.c.

References FALSE, MAX, MIN, NULL, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIP_VARTYPE_BINARY, SCIP_VARTYPE_IMPLINT, SCIP_VARTYPE_INTEGER, SCIPconsGetData(), SCIPconsGetName(), SCIPdebugMessage, SCIPdelCons(), SCIPfeasCeil(), SCIPfeasFloor(), SCIPisEQ(), SCIPisFeasGE(), SCIPisFeasGT(), SCIPisFeasIntegral(), SCIPisFeasLE(), SCIPisFeasLT(), SCIPisGE(), SCIPisInfinity(), SCIPisIntegral(), SCIPisLE(), SCIPisZero(), SCIPvarGetLbGlobal(), SCIPvarGetName(), SCIPvarGetType(), SCIPvarGetUbGlobal(), SCIPvarIsBinary(), and TRUE.

Referenced by SCIP_DECL_CONSPRESOL(), and upgradeConss().

static SCIP_RETCODE upgradeConss ( SCIP scip,
SCIP_CONSHDLRDATA conshdlrdata,
SCIP_CONS **  conss,
int  nconss,
SCIP_Bool cutoff,
int *  naggrvars,
int *  nchgbds,
int *  nchgcoefs,
int *  nchgsides,
int *  ndelconss,
int *  naddconss 
)
static

check if we can upgrade to a set-packing constraint

Parameters
scipSCIP data structure
conshdlrdataconstraint handler data
conssconstraint set
nconssnumber of constraints in constraint set
cutoffpointer to store whether the node can be cut off
naggrvarspointer to count the number of aggregated variables
nchgbdspointer to count number of bound changes
nchgcoefspointer to count the number of changed coefficients
nchgsidespointer to count the number of left and right hand sides
ndelconsspointer to count the number of deleted constraints
naddconsspointer to count the number of added constraints

Definition at line 3344 of file cons_varbound.c.

References applyFixings(), NULL, propagateCons(), REALABS, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPaddCons(), SCIPaggregateVars(), SCIPconsGetData(), SCIPconsGetName(), SCIPconsIsActive(), SCIPconsIsChecked(), SCIPconsIsDynamic(), SCIPconsIsEnforced(), SCIPconsIsInitial(), SCIPconsIsLocal(), SCIPconsIsModifiable(), SCIPconsIsPropagated(), SCIPconsIsRemovable(), SCIPconsIsSeparated(), SCIPconsIsStickingAtNode(), SCIPcreateConsSetpack(), SCIPdebugMessage, SCIPdebugPrintCons, SCIPdelCons(), SCIPgetNBinVars(), SCIPgetNegatedVar(), SCIPgetNImplVars(), SCIPisEQ(), SCIPisInfinity(), SCIPisLE(), SCIPisZero(), SCIPreleaseCons(), SCIPvarGetName(), SCIPvarIsBinary(), and tightenCoefs().

Referenced by SCIP_DECL_CONSPRESOL().

static SCIP_DECL_CONSHDLRCOPY ( conshdlrCopyVarbound  )
static

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

Definition at line 3624 of file cons_varbound.c.

References CONSHDLR_NAME, NULL, SCIP_CALL, SCIP_OKAY, SCIPconshdlrGetName(), SCIPincludeConshdlrVarbound(), and TRUE.

static SCIP_DECL_CONSFREE ( consFreeVarbound  )
static

destructor of constraint handler to free constraint handler data (called when SCIP is exiting)

Definition at line 3640 of file cons_varbound.c.

References CONSHDLR_NAME, conshdlrdataFree(), NULL, SCIP_OKAY, SCIPconshdlrGetData(), SCIPconshdlrGetName(), and SCIPconshdlrSetData().

static SCIP_DECL_CONSEXITSOL ( consExitsolVarbound  )
static

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

Definition at line 3661 of file cons_varbound.c.

References NULL, SCIP_CALL, SCIP_OKAY, SCIPconsGetData(), and SCIPreleaseRow().

static SCIP_DECL_CONSDELETE ( consDeleteVarbound  )
static

frees specific constraint data

Definition at line 3684 of file cons_varbound.c.

References consdataFree(), dropEvents(), NULL, SCIP_CALL, SCIP_OKAY, SCIPconshdlrGetData(), and SCIPisTransformed().

static SCIP_DECL_CONSINITLP ( consInitlpVarbound  )
static

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

Definition at line 3739 of file cons_varbound.c.

References addRelaxation(), SCIP_CALL, SCIP_OKAY, and SCIPconsIsInitial().

static SCIP_DECL_CONSSEPALP ( consSepalpVarbound  )
static

separation method of constraint handler for LP solutions

Definition at line 3755 of file cons_varbound.c.

References NULL, SCIP_CALL, SCIP_DIDNOTFIND, SCIP_OKAY, SCIPconshdlrGetData(), and separateCons().

static SCIP_DECL_CONSSEPASOL ( consSepasolVarbound  )
static

separation method of constraint handler for arbitrary primal solutions

Definition at line 3785 of file cons_varbound.c.

References NULL, SCIP_CALL, SCIP_DIDNOTFIND, SCIP_OKAY, SCIPconshdlrGetData(), and separateCons().

static SCIP_DECL_CONSENFOLP ( consEnfolpVarbound  )
static

constraint enforcing method of constraint handler for LP solutions

Definition at line 3815 of file cons_varbound.c.

References checkCons(), FALSE, NULL, SCIP_CALL, SCIP_FEASIBLE, SCIP_INFEASIBLE, SCIP_OKAY, SCIPconshdlrGetData(), SCIPincConsAge(), SCIPresetConsAge(), and separateCons().

static SCIP_DECL_CONSENFOPS ( consEnfopsVarbound  )
static

constraint enforcing method of constraint handler for pseudo solutions

Definition at line 3855 of file cons_varbound.c.

References checkCons(), NULL, SCIP_CALL, SCIP_FEASIBLE, SCIP_INFEASIBLE, SCIP_OKAY, SCIPincConsAge(), SCIPresetConsAge(), and TRUE.

static SCIP_DECL_CONSCHECK ( consCheckVarbound  )
static

feasibility check method of constraint handler for integral solutions

Definition at line 3882 of file cons_varbound.c.

References checkCons(), NULL, SCIP_CALL, SCIP_FEASIBLE, SCIP_INFEASIBLE, SCIP_OKAY, SCIP_Real, SCIPconsGetData(), SCIPgetSolVal(), SCIPinfoMessage(), SCIPisFeasGE(), SCIPisFeasLE(), and SCIPprintCons().

static SCIP_DECL_CONSPROP ( consPropVarbound  )
static

domain propagation method of constraint handler

Definition at line 3925 of file cons_varbound.c.

References FALSE, NULL, propagateCons(), SCIP_Bool, SCIP_CALL, SCIP_CUTOFF, SCIP_DIDNOTFIND, SCIP_OKAY, SCIP_REDUCEDDOM, SCIPconshdlrGetData(), and SCIPunmarkConsPropagate().

static SCIP_DECL_CONSRESPROP ( consRespropVarbound  )
static

propagation conflict resolving method of constraint handler

Definition at line 4112 of file cons_varbound.c.

References NULL, resolvePropagation(), SCIP_CALL, SCIP_OKAY, SCIP_SUCCESS, and SCIPconshdlrGetData().

static SCIP_DECL_CONSLOCK ( consLockVarbound  )
static

variable rounding lock method of constraint handler

Definition at line 4131 of file cons_varbound.c.

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

static SCIP_DECL_CONSCOPY ( consCopyVarbound  )
static
static SCIP_DECL_CONSPARSE ( consParseVarbound  )
static
static SCIP_DECL_CONSGETVARS ( consGetVarsVarbound  )
static

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

Definition at line 4367 of file cons_varbound.c.

References FALSE, NULL, SCIP_OKAY, SCIPconsGetData(), and TRUE.

static SCIP_DECL_CONSGETNVARS ( consGetNVarsVarbound  )
static

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

Definition at line 4391 of file cons_varbound.c.

References SCIP_OKAY, and TRUE.

static SCIP_DECL_EVENTEXEC ( eventExecVarbound  )
static

execution method of bound change event handler

Definition at line 4405 of file cons_varbound.c.

References FALSE, NULL, SCIP_CALL, SCIP_EVENTTYPE_BOUNDTIGHTENED, SCIP_EVENTTYPE_VARFIXED, SCIP_OKAY, SCIPconsGetData(), SCIPeventGetType(), and SCIPmarkConsPropagate().

SCIP_RETCODE SCIPcreateConsVarbound ( SCIP scip,
SCIP_CONS **  cons,
const char *  name,
SCIP_VAR var,
SCIP_VAR vbdvar,
SCIP_Real  vbdcoef,
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 variable bound constraint: lhs <= x + c*y <= rhs

Note
the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
Parameters
scipSCIP data structure
conspointer to hold the created constraint
namename of constraint
varvariable x that has variable bound
vbdvarbinary, integer or implicit integer bounding variable y
vbdcoefcoefficient c of bounding variable y
lhsleft hand side of variable bound inequality
rhsright hand side of variable bound inequality
initialshould the LP relaxation of constraint be in the initial LP? Usually set to TRUE. Set to FALSE for 'lazy constraints'.
separateshould the constraint be separated during LP processing? Usually set to TRUE.
enforceshould the constraint be enforced during node processing? TRUE for model constraints, FALSE for additional, redundant constraints.
checkshould the constraint be checked for feasibility? TRUE for model constraints, FALSE for additional, redundant constraints.
propagateshould the constraint be propagated during node processing? Usually set to TRUE.
localis constraint only valid locally? Usually set to FALSE. Has to be set to TRUE, e.g., for branching constraints.
modifiableis constraint modifiable (subject to column generation)? Usually set to FALSE. In column generation applications, set to TRUE if pricing adds coefficients to this constraint.
dynamicis constraint subject to aging? Usually set to FALSE. Set to TRUE for own cuts which are separated as constraints.
removableshould the relaxation be removed from the LP due to aging or cleanup? Usually set to FALSE. Set to TRUE for 'lazy constraints' and 'user cuts'.
stickingatnodeshould 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 4509 of file cons_varbound.c.

References catchEvents(), consdataCreate(), CONSHDLR_NAME, NULL, SCIP_CALL, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIPconshdlrGetData(), SCIPcreateCons(), SCIPerrorMessage, SCIPfindConshdlr(), and SCIPisTransformed().

Referenced by addVarbound(), createPrecedenceCons(), createVarUbs(), presolveTryAddLinearReform(), SCIP_DECL_CONSINITLP(), SCIP_DECL_CONSPARSE(), SCIP_DECL_CONSPRESOL(), SCIP_DECL_LINCONSUPGD(), and SCIPcreateConsBasicVarbound().

SCIP_RETCODE SCIPcreateConsBasicVarbound ( SCIP scip,
SCIP_CONS **  cons,
const char *  name,
SCIP_VAR var,
SCIP_VAR vbdvar,
SCIP_Real  vbdcoef,
SCIP_Real  lhs,
SCIP_Real  rhs 
)

creates and captures a variable bound constraint: lhs <= x + c*y <= rhs with all constraint flags set to their default values

Note
the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
Parameters
scipSCIP data structure
conspointer to hold the created constraint
namename of constraint
varvariable x that has variable bound
vbdvarbinary, integer or implicit integer bounding variable y
vbdcoefcoefficient c of bounding variable y
lhsleft hand side of variable bound inequality
rhsright hand side of variable bound inequality

Definition at line 4579 of file cons_varbound.c.

References FALSE, SCIP_CALL, SCIP_OKAY, SCIPcreateConsVarbound(), and TRUE.

SCIP_Real SCIPgetLhsVarbound ( SCIP scip,
SCIP_CONS cons 
)

gets left hand side of variable bound constraint lhs <= x + c*y <= rhs

Parameters
scipSCIP data structure
consconstraint data

Definition at line 4597 of file cons_varbound.c.

References CONSHDLR_NAME, NULL, SCIP_INVALID, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPerrorMessage.

Referenced by addVarboundConstraints(), checkVarbound(), initMatrix(), printRangeSection(), SCIP_DECL_CONSCOPY(), SCIP_DECL_READERWRITE(), SCIPwriteGms(), SCIPwriteLp(), SCIPwritePip(), writeFzn(), and writeOpbConstraints().

SCIP_Real SCIPgetRhsVarbound ( SCIP scip,
SCIP_CONS cons 
)

gets right hand side of variable bound constraint lhs <= x + c*y <= rhs

Parameters
scipSCIP data structure
consconstraint data

Definition at line 4618 of file cons_varbound.c.

References CONSHDLR_NAME, NULL, SCIP_INVALID, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPerrorMessage.

Referenced by addVarboundConstraints(), checkVarbound(), initMatrix(), printRangeSection(), SCIP_DECL_CONSCOPY(), SCIP_DECL_READERWRITE(), SCIPwriteGms(), SCIPwriteLp(), SCIPwritePip(), writeFzn(), and writeOpbConstraints().

SCIP_VAR* SCIPgetVarVarbound ( SCIP scip,
SCIP_CONS cons 
)

gets bounded variable x of variable bound constraint lhs <= x + c*y <= rhs

Parameters
scipSCIP data structure
consconstraint data

Definition at line 4639 of file cons_varbound.c.

References CONSHDLR_NAME, NULL, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPerrorMessage.

Referenced by addVarboundConstraints(), checkVarbound(), initMatrix(), SCIP_DECL_CONSCOPY(), SCIP_DECL_READERWRITE(), SCIPwriteCcg(), SCIPwriteGms(), SCIPwriteLp(), SCIPwritePbm(), SCIPwritePip(), SCIPwritePpm(), writeFzn(), and writeOpbConstraints().

SCIP_VAR* SCIPgetVbdvarVarbound ( SCIP scip,
SCIP_CONS cons 
)

gets bounding variable y of variable bound constraint lhs <= x + c*y <= rhs

Parameters
scipSCIP data structure
consconstraint data

Definition at line 4660 of file cons_varbound.c.

References CONSHDLR_NAME, NULL, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPerrorMessage.

Referenced by addVarboundConstraints(), checkVarbound(), initMatrix(), SCIP_DECL_CONSCOPY(), SCIP_DECL_READERWRITE(), SCIPwriteCcg(), SCIPwriteGms(), SCIPwriteLp(), SCIPwritePbm(), SCIPwritePip(), SCIPwritePpm(), writeFzn(), and writeOpbConstraints().

SCIP_Real SCIPgetVbdcoefVarbound ( SCIP scip,
SCIP_CONS cons 
)

gets bound coefficient c of variable bound constraint lhs <= x + c*y <= rhs

Parameters
scipSCIP data structure
consconstraint data

Definition at line 4681 of file cons_varbound.c.

References CONSHDLR_NAME, NULL, SCIP_INVALID, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPerrorMessage.

Referenced by addVarboundConstraints(), checkVarbound(), initMatrix(), SCIP_DECL_CONSCOPY(), SCIP_DECL_READERWRITE(), SCIPwriteCcg(), SCIPwriteGms(), SCIPwriteLp(), SCIPwritePbm(), SCIPwritePip(), SCIPwritePpm(), writeFzn(), and writeOpbConstraints().

SCIP_Real SCIPgetDualsolVarbound ( SCIP scip,
SCIP_CONS cons 
)

gets the dual solution of the variable bound constraint in the current LP

Parameters
scipSCIP data structure
consconstraint data

Definition at line 4702 of file cons_varbound.c.

References CONSHDLR_NAME, NULL, SCIP_INVALID, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIProwGetDualsol().

SCIP_Real SCIPgetDualfarkasVarbound ( SCIP scip,
SCIP_CONS cons 
)

gets the dual Farkas value of the variable bound constraint in the current infeasible LP

Parameters
scipSCIP data structure
consconstraint data

Definition at line 4726 of file cons_varbound.c.

References CONSHDLR_NAME, NULL, SCIP_INVALID, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIProwGetDualfarkas().

SCIP_ROW* SCIPgetRowVarbound ( SCIP scip,
SCIP_CONS cons 
)

returns the linear relaxation of the given variable bound constraint; may return NULL if no LP row was yet created; the user must not modify the row!

Parameters
scipSCIP data structure
consconstraint data

Definition at line 4752 of file cons_varbound.c.

References CONSHDLR_NAME, NULL, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPerrorMessage.