Scippy

SCIP

Solving Constraint Integer Programs

prop_vbounds.c File Reference

Detailed Description

variable upper and lower bound propagator

Author
Stefan Heinz
Jens Schulz
Gerald Gamrath

This propagator uses global bound information provided by SCIP to deduce global and local bound changes. It can take into account

  • implications (bound change following from specific value of a binary variable)
  • cliques (set of binary variables, each with a corresponding value, of which at most one variable can get the value)
  • variable lower/upper bounds (bounds of arbitrary variables that depend linearly on the value of another variable)

The propagator does not look at a variable in whole, but at one point in time only handles one specific bound (lower or upper) of a variable and deduces changes for lower or upper bounds of other variables. The concept is as follows:

1) Extract variable bound data

Implications and cliques are stored in a way such that given a variable and its new value, we can access all bound changes that can be deduced from setting the variable to that value. However, for variable bounds, this currently does not hold, they are only stored in the other direction, i.e. for a bound of a given variable, we have a list of all other bounds of variables that directly influence the bound of the given variable and a linear function describing how they do this. For the propagation, we need the other direction, thus we store it in the propagator data when the branch-and-bound solving process is about to begin.

2) Topological sorting of bounds of variable

We compute a topological order of the bounds of variables. This is needed to define an order in which we will regard bounds of variables in the propagation process in order to avoid unneccessarily regarding the same variable bound multiple times because it was changed in the meantime when propagating another bound of a variable. Therefore, we implictly regard a directed graph, in which each node corresponds to a bound of a variable and there exists a directed edge from one node to another, if the bound corresponding to the former node influences the bound corresponding to the latter node. This is done by iteratively running a DFS until all nodes were visited. Note that there might be cycles in the graph, which are randomly broken, so the order is only almost topological.

3) Collecting bound changes

For each bound of a variable, which can trigger bound changes of other variables, the propagator catches all events informing about a global change of the bound or a local toghtening of the bound. The event handler then adds the bound of the variable to a priority queue, with the key in the priority queue corresponding to the position of the bound in the topological sort.

4) Propagating Bounds

As long as there are bounds contained in the priority queue, the propagator pops one bound from the queue, which is the one most at the beginning of the topological sort, so it should not be influenced by propagating other bounds currently contained in the queue. Starting at this bound, all implication, clique, and variable bound information is used to deduce tigther bounds for other variables and change the bounds, if a tighter one is found. These bound changes trigger an event that will lead to adding the corresponding bound to the priority queue, if it is not contained, yet. The process is iterated until the priority queue contains no more bounds.

Definition in file prop_vbounds.c.

#include <assert.h>
#include <string.h>
#include "scip/prop_vbounds.h"

Go to the source code of this file.

Macros

#define INITMEMSIZE   5
 
Propagator properties
#define PROP_NAME   "vbounds"
 
#define PROP_DESC   "propagates variable upper and lower bounds"
 
#define PROP_TIMING   SCIP_PROPTIMING_BEFORELP | SCIP_PROPTIMING_AFTERLPLOOP
 
#define PROP_PRIORITY   3000000
 
#define PROP_FREQ   1
 
#define PROP_DELAY   FALSE
 
Event handler properties
#define EVENTHDLR_NAME   "vbounds"
 
#define EVENTHDLR_DESC   "bound change event handler for for vbounds propagator"
 
Default parameter values
#define DEFAULT_USEBDWIDENING   TRUE
 
#define DEFAULT_USEIMPLICS   FALSE
 
#define DEFAULT_USECLIQUES   FALSE
 
#define DEFAULT_USEVBOUNDS   TRUE
 
#define DEFAULT_DOTOPOSORT   TRUE
 
#define DEFAULT_SORTCLIQUES   FALSE
 
Propagator defines

The propagator works on indices representing a bound of a variable. This index will be called bound index in the following. For a given active variable with problem index i (note that active variables have problem indices between 0 and nactivevariable - 1), the bound index of its lower bound is 2*i, the bound index of its upper bound is 2*i + 1. The other way around, a given bound index i corresponds to the variable with problem index i/2 (rounded down), and to the lower bound, if i is even, to the upper bound if i is odd. The following macros can be used to convert bound index into variable problem index and boundtype and vice versa.

#define getLbIndex(idx)   (2*(idx))
 
#define getUbIndex(idx)   (2*(idx)+1)
 
#define getVarIndex(idx)   ((idx)/2)
 
#define getBoundtype(idx)   (((idx) % 2 == 0) ? SCIP_BOUNDTYPE_LOWER : SCIP_BOUNDTYPE_UPPER)
 
#define isIndexLowerbound(idx)   ((idx) % 2 == 0)
 
#define getBoundString(lower)   ((lower) ? "lb" : "ub")
 
#define getBoundtypeString(type)   ((type) == SCIP_BOUNDTYPE_LOWER ? "lower" : "upper")
 
#define indexGetBoundString(idx)   (getBoundString(isIndexLowerbound(idx)))
 

Typedefs

typedef struct InferInfo INFERINFO
 

Functions

static INFERINFO intToInferInfo (int i)
 
static int inferInfoToInt (INFERINFO inferinfo)
 
static SCIP_BOUNDTYPE inferInfoGetBoundtype (INFERINFO inferinfo)
 
static int inferInfoGetPos (INFERINFO inferinfo)
 
static INFERINFO getInferInfo (int pos, SCIP_BOUNDTYPE boundtype)
 
static int varGetLbIndex (SCIP_PROPDATA *propdata, SCIP_VAR *var)
 
static int varGetUbIndex (SCIP_PROPDATA *propdata, SCIP_VAR *var)
 
static void resetPropdata (SCIP_PROPDATA *propdata)
 
static SCIP_RETCODE catchEvents (SCIP *scip, SCIP_PROPDATA *propdata)
 
static SCIP_RETCODE dropEvents (SCIP *scip, SCIP_PROPDATA *propdata)
 
static SCIP_RETCODE addVbound (SCIP *scip, SCIP_PROPDATA *propdata, int startidx, int endidx, SCIP_Real coef, SCIP_Real constant)
 
static SCIP_DECL_SORTPTRCOMP (compVarboundIndices)
 
static SCIP_RETCODE dfs (SCIP *scip, SCIP_PROPDATA *propdata, int startnode, SCIP_Bool *visited, int *dfsstack, int *stacknextedge, int *dfsnodes, int *ndfsnodes)
 
static SCIP_RETCODE topologicalSort (SCIP *scip, SCIP_PROPDATA *propdata)
 
static SCIP_RETCODE initData (SCIP *scip, SCIP_PROP *prop)
 
static SCIP_RETCODE resolvePropagation (SCIP *scip, SCIP_PROPDATA *propdata, SCIP_VAR *var, SCIP_BOUNDTYPE boundtype, SCIP_BDCHGIDX *bdchgidx)
 
static SCIP_RETCODE relaxVbdvar (SCIP *scip, SCIP_VAR *var, SCIP_BOUNDTYPE boundtype, SCIP_BDCHGIDX *bdchgidx, SCIP_Real relaxedbd)
 
static SCIP_Real computeRelaxedLowerbound (SCIP *scip, SCIP_VAR *var, SCIP_Real inferlb, SCIP_Real coef, SCIP_Real constant)
 
static SCIP_RETCODE analyzeConflictLowerbound (SCIP *scip, SCIP_PROPDATA *propdata, SCIP_VAR *infervar, SCIP_Real inferlb, SCIP_VAR *vbdvar, SCIP_BOUNDTYPE boundtype, SCIP_Real coef, SCIP_Real constant, SCIP_Bool canwide)
 
static SCIP_Real computeRelaxedUpperbound (SCIP *scip, SCIP_VAR *var, SCIP_Real inferub, SCIP_Real coef, SCIP_Real constant)
 
static SCIP_RETCODE analyzeConflictUpperbound (SCIP *scip, SCIP_PROPDATA *propdata, SCIP_VAR *infervar, SCIP_Real inferub, SCIP_VAR *vbdvar, SCIP_BOUNDTYPE boundtype, SCIP_Real coef, SCIP_Real constant, SCIP_Bool canwide)
 
static SCIP_RETCODE tightenVarLb (SCIP *scip, SCIP_PROP *prop, SCIP_PROPDATA *propdata, SCIP_VAR *var, SCIP_Real newlb, SCIP_Bool global, SCIP_VAR *vbdvar, SCIP_BOUNDTYPE boundtype, SCIP_Bool force, SCIP_Real coef, SCIP_Real constant, SCIP_Bool canwide, int *nchgbds, SCIP_RESULT *result)
 
static SCIP_RETCODE tightenVarUb (SCIP *scip, SCIP_PROP *prop, SCIP_PROPDATA *propdata, SCIP_VAR *var, SCIP_Real newub, SCIP_Bool global, SCIP_VAR *vbdvar, SCIP_BOUNDTYPE boundtype, SCIP_Bool force, SCIP_Real coef, SCIP_Real constant, SCIP_Bool canwide, int *nchgbds, SCIP_RESULT *result)
 
static SCIP_RETCODE propagateVbounds (SCIP *scip, SCIP_PROP *prop, SCIP_Bool force, SCIP_RESULT *result)
 
Callback methods of propagator
static SCIP_DECL_PROPCOPY (propCopyVbounds)
 
static SCIP_DECL_PROPFREE (propFreeVbounds)
 
static SCIP_DECL_PROPEXITSOL (propExitsolVbounds)
 
static SCIP_DECL_PROPEXEC (propExecVbounds)
 
static SCIP_DECL_PROPRESPROP (propRespropVbounds)
 
Callback methods of event handler
static SCIP_DECL_EVENTEXEC (eventExecVbound)
 
Interface methods
SCIP_RETCODE SCIPincludePropVbounds (SCIP *scip)
 
SCIP_Bool SCIPisPropagatedVbounds (SCIP *scip)
 
SCIP_RETCODE SCIPexecPropVbounds (SCIP *scip, SCIP_Bool force, SCIP_RESULT *result)
 

Macro Definition Documentation

#define PROP_NAME   "vbounds"
#define PROP_DESC   "propagates variable upper and lower bounds"

Definition at line 81 of file prop_vbounds.c.

Referenced by SCIPincludePropVbounds().

Definition at line 82 of file prop_vbounds.c.

Referenced by SCIPincludePropVbounds().

#define PROP_PRIORITY   3000000

propagator priority

Definition at line 83 of file prop_vbounds.c.

Referenced by SCIPincludePropVbounds().

#define PROP_FREQ   1

propagator frequency

Definition at line 84 of file prop_vbounds.c.

Referenced by SCIPincludePropVbounds().

#define PROP_DELAY   FALSE

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

Definition at line 85 of file prop_vbounds.c.

Referenced by SCIPincludePropVbounds().

#define EVENTHDLR_NAME   "vbounds"

Definition at line 94 of file prop_vbounds.c.

Referenced by SCIPincludePropVbounds().

#define EVENTHDLR_DESC   "bound change event handler for for vbounds propagator"

Definition at line 95 of file prop_vbounds.c.

Referenced by SCIPincludePropVbounds().

#define DEFAULT_USEBDWIDENING   TRUE

should bound widening be used to initialize conflict analysis?

Definition at line 104 of file prop_vbounds.c.

Referenced by SCIPincludePropVbounds().

#define DEFAULT_USEIMPLICS   FALSE

should implications be propagated?

Definition at line 105 of file prop_vbounds.c.

Referenced by SCIPincludePropVbounds().

#define DEFAULT_USECLIQUES   FALSE

should cliques be propagated?

Definition at line 106 of file prop_vbounds.c.

Referenced by SCIPincludePropVbounds().

#define DEFAULT_USEVBOUNDS   TRUE

should variable bounds be propagated?

Definition at line 107 of file prop_vbounds.c.

Referenced by SCIPincludePropVbounds().

#define DEFAULT_DOTOPOSORT   TRUE

should the bounds be topologically sorted in advance?

Definition at line 108 of file prop_vbounds.c.

Referenced by SCIPincludePropVbounds().

#define DEFAULT_SORTCLIQUES   FALSE

should cliques be regarded for the topological sort?

Definition at line 109 of file prop_vbounds.c.

Referenced by SCIPincludePropVbounds().

#define getLbIndex (   idx)    (2*(idx))

Definition at line 124 of file prop_vbounds.c.

Referenced by varGetLbIndex().

#define getUbIndex (   idx)    (2*(idx)+1)

Definition at line 125 of file prop_vbounds.c.

Referenced by varGetUbIndex().

#define getVarIndex (   idx)    ((idx)/2)
#define getBoundtype (   idx)    (((idx) % 2 == 0) ? SCIP_BOUNDTYPE_LOWER : SCIP_BOUNDTYPE_UPPER)

Definition at line 127 of file prop_vbounds.c.

Referenced by initData(), and propagateVbounds().

#define isIndexLowerbound (   idx)    ((idx) % 2 == 0)
#define getBoundString (   lower)    ((lower) ? "lb" : "ub")

Definition at line 129 of file prop_vbounds.c.

Referenced by dfs().

#define getBoundtypeString (   type)    ((type) == SCIP_BOUNDTYPE_LOWER ? "lower" : "upper")
#define indexGetBoundString (   idx)    (getBoundString(isIndexLowerbound(idx)))

Definition at line 131 of file prop_vbounds.c.

Referenced by dfs(), and SCIP_DECL_EVENTEXEC().

#define INITMEMSIZE   5

Definition at line 404 of file prop_vbounds.c.

Referenced by addVbound().

Typedef Documentation

typedef struct InferInfo INFERINFO

Definition at line 187 of file prop_vbounds.c.

Function Documentation

static INFERINFO intToInferInfo ( int  i)
static

converts an integer into an inference information

Parameters
iinteger to convert

Definition at line 191 of file prop_vbounds.c.

Referenced by SCIP_DECL_PROPRESPROP().

static int inferInfoToInt ( INFERINFO  inferinfo)
static

converts an inference information into an int

Parameters
inferinfoinference information to convert

Definition at line 204 of file prop_vbounds.c.

Referenced by tightenVarLb(), and tightenVarUb().

static SCIP_BOUNDTYPE inferInfoGetBoundtype ( INFERINFO  inferinfo)
static

returns the propagation rule stored in the inference information

Parameters
inferinfoinference information to convert

Definition at line 213 of file prop_vbounds.c.

References SCIP_BOUNDTYPE_LOWER, and SCIP_BOUNDTYPE_UPPER.

Referenced by SCIP_DECL_PROPRESPROP().

static int inferInfoGetPos ( INFERINFO  inferinfo)
static

returns the position stored in the inference information

Parameters
inferinfoinference information to convert

Definition at line 224 of file prop_vbounds.c.

Referenced by SCIP_DECL_PROPRESPROP().

static INFERINFO getInferInfo ( int  pos,
SCIP_BOUNDTYPE  boundtype 
)
static

constructs an inference information out of a position of a variable and a boundtype

Parameters
posposition of the variable which forced that propagation
boundtypepropagation rule that deduced the value

Definition at line 233 of file prop_vbounds.c.

References SCIP_BOUNDTYPE_LOWER, and SCIP_BOUNDTYPE_UPPER.

Referenced by tightenVarLb(), and tightenVarUb().

static int varGetLbIndex ( SCIP_PROPDATA propdata,
SCIP_VAR var 
)
static
Parameters
propdatapropagator data
varvariable to get the index for

Definition at line 256 of file prop_vbounds.c.

References getLbIndex, SCIPhashmapExists(), and SCIPhashmapGetImage().

Referenced by dfs(), initData(), SCIP_DECL_PROPRESPROP(), tightenVarLb(), and tightenVarUb().

static int varGetUbIndex ( SCIP_PROPDATA propdata,
SCIP_VAR var 
)
static
Parameters
propdatapropagator data
varvariable to get the index for

Definition at line 268 of file prop_vbounds.c.

References getUbIndex, SCIPhashmapExists(), and SCIPhashmapGetImage().

Referenced by dfs(), initData(), SCIP_DECL_PROPRESPROP(), tightenVarLb(), and tightenVarUb().

static void resetPropdata ( SCIP_PROPDATA propdata)
static

reset propagation data

Parameters
propdatapropagator data

Definition at line 280 of file prop_vbounds.c.

References FALSE, and NULL.

Referenced by SCIP_DECL_PROPEXITSOL(), and SCIPincludePropVbounds().

static SCIP_RETCODE catchEvents ( SCIP scip,
SCIP_PROPDATA propdata 
)
static

catches events for variables

Parameters
scipSCIP data structure
propdatapropagator data

Definition at line 298 of file prop_vbounds.c.

References getVarIndex, isIndexLowerbound, NULL, SCIP_Bool, SCIP_CALL, SCIP_EVENTTYPE_GLBCHANGED, SCIP_EVENTTYPE_GUBCHANGED, SCIP_EVENTTYPE_LBTIGHTENED, SCIP_EVENTTYPE_UBTIGHTENED, SCIP_OKAY, SCIPcatchVarEvent(), SCIPvarGetNCliques(), and SCIPvarGetNImpls().

Referenced by initData().

static SCIP_RETCODE dropEvents ( SCIP scip,
SCIP_PROPDATA propdata 
)
static

drops events for variables

Parameters
scipSCIP data structure
propdatapropagator data

Definition at line 358 of file prop_vbounds.c.

References getVarIndex, isIndexLowerbound, NULL, SCIP_Bool, SCIP_CALL, SCIP_EVENTTYPE_GLBCHANGED, SCIP_EVENTTYPE_GUBCHANGED, SCIP_EVENTTYPE_LBTIGHTENED, SCIP_EVENTTYPE_UBTIGHTENED, SCIP_OKAY, and SCIPdropVarEvent().

Referenced by SCIP_DECL_PROPEXITSOL().

static SCIP_RETCODE addVbound ( SCIP scip,
SCIP_PROPDATA propdata,
int  startidx,
int  endidx,
SCIP_Real  coef,
SCIP_Real  constant 
)
static
Parameters
scipSCIP data structure
propdatapropagator data
startidxindex of bound of variable influencing the other variable
endidxindex of bound of variable which is influenced
coefcoefficient in the variable bound
constantconstant in the variable bound

Definition at line 408 of file prop_vbounds.c.

References INITMEMSIZE, NULL, SCIP_CALL, SCIP_OKAY, SCIPcalcMemGrowSize(), and SCIPreallocMemoryArray.

Referenced by initData().

static SCIP_DECL_SORTPTRCOMP ( compVarboundIndices  )
static

comparison method for two indices in the topoorder array, preferring higher indices because the order is reverse topological

Definition at line 456 of file prop_vbounds.c.

static SCIP_RETCODE dfs ( SCIP scip,
SCIP_PROPDATA propdata,
int  startnode,
SCIP_Bool visited,
int *  dfsstack,
int *  stacknextedge,
int *  dfsnodes,
int *  ndfsnodes 
)
static

performs depth-first-search in the implicitly given directed graph from the given start index

Parameters
scipSCIP data structure
propdatapropagator data
startnodenode to start the depth-first-search
visitedarray to store for each node, whether it was already visited
dfsstackarray of size number of nodes to store the stack; only needed for performance reasons
stacknextedgearray of size number of nodes to store the number of adjacent nodes already visited for each node on the stack; only needed for performance reasons
dfsnodesarray of nodes that can be reached starting at startnode, in reverse dfs order
ndfsnodespointer to store number of nodes that can be reached starting at startnode

Definition at line 466 of file prop_vbounds.c.

References FALSE, getBoundString, getVarIndex, indexGetBoundString, isIndexLowerbound, NULL, SCIP_Bool, SCIP_BOUNDTYPE_LOWER, SCIP_OKAY, SCIPcliqueGetNVars(), SCIPcliqueGetValues(), SCIPcliqueGetVars(), SCIPdebugMessage, SCIPvarGetCliques(), SCIPvarGetImplIds(), SCIPvarGetImplTypes(), SCIPvarGetImplVars(), SCIPvarGetName(), SCIPvarGetNCliques(), SCIPvarGetNImpls(), SCIPvarIsActive(), TRUE, varGetLbIndex(), and varGetUbIndex().

Referenced by topologicalSort().

static SCIP_RETCODE topologicalSort ( SCIP scip,
SCIP_PROPDATA propdata 
)
static

sort the bounds of variables topologically

Parameters
scipSCIP data structure
propdatapropagator data

Definition at line 723 of file prop_vbounds.c.

References BMSclearMemoryArray, dfs(), NULL, SCIP_CALL, SCIP_OKAY, SCIPallocBufferArray, and SCIPfreeBufferArray.

Referenced by initData().

static SCIP_RETCODE resolvePropagation ( SCIP scip,
SCIP_PROPDATA propdata,
SCIP_VAR var,
SCIP_BOUNDTYPE  boundtype,
SCIP_BDCHGIDX bdchgidx 
)
static

resolves a propagation by adding the variable which implied that bound change

Parameters
scipSCIP data structure
propdatapropagator data
varvariable to be reported
boundtypebound to be reported
bdchgidxthe index of the bound change, representing the point of time where the change took place, or NULL for the current local bounds

Definition at line 941 of file prop_vbounds.c.

References getBoundtypeString, NULL, SCIP_BOUNDTYPE_LOWER, SCIP_BOUNDTYPE_UPPER, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIPABORT, SCIPaddConflictLb(), SCIPaddConflictUb(), SCIPdebugMessage, SCIPerrorMessage, and SCIPvarGetName().

Referenced by analyzeConflictLowerbound(), analyzeConflictUpperbound(), and SCIP_DECL_PROPRESPROP().

static SCIP_RETCODE relaxVbdvar ( SCIP scip,
SCIP_VAR var,
SCIP_BOUNDTYPE  boundtype,
SCIP_BDCHGIDX bdchgidx,
SCIP_Real  relaxedbd 
)
static

relaxes bound of give variable as long as the given inference bound still leads to a cutoff and add that bound change to the conflict set

Parameters
scipSCIP data structure
varvariable for which the upper bound should be relaxed
boundtypeboundtype used for the variable bound variable
bdchgidxthe index of the bound change, representing the point of time where the change took place, or NULL for the current local bounds
relaxedbdrelaxed bound

Definition at line 976 of file prop_vbounds.c.

References SCIP_BOUNDTYPE_LOWER, SCIP_BOUNDTYPE_UPPER, SCIP_CALL, SCIP_OKAY, SCIPaddConflictRelaxedLb(), and SCIPaddConflictRelaxedUb().

Referenced by analyzeConflictLowerbound(), analyzeConflictUpperbound(), and SCIP_DECL_PROPRESPROP().

static SCIP_Real computeRelaxedLowerbound ( SCIP scip,
SCIP_VAR var,
SCIP_Real  inferlb,
SCIP_Real  coef,
SCIP_Real  constant 
)
static

compute the relaxed bound which is sufficient to propagate the inference lower bound of given variable

Parameters
scipSCIP data structure
varvariable which was propagated
inferlbinference lower bound
coefinference variable bound coefficient used
constantinference variable bound constant used

Definition at line 999 of file prop_vbounds.c.

References SCIP_Real, SCIPadjustedVarLb(), SCIPfeastol(), SCIPisEQ(), and SCIPvarIsIntegral().

Referenced by analyzeConflictLowerbound(), and SCIP_DECL_PROPRESPROP().

static SCIP_RETCODE analyzeConflictLowerbound ( SCIP scip,
SCIP_PROPDATA propdata,
SCIP_VAR infervar,
SCIP_Real  inferlb,
SCIP_VAR vbdvar,
SCIP_BOUNDTYPE  boundtype,
SCIP_Real  coef,
SCIP_Real  constant,
SCIP_Bool  canwide 
)
static

analyzes an infeasibility which was reached by updating the lower bound of the inference variable above its upper bound

Parameters
scipSCIP data structure
propdatapropagator data
infervarvariable which led to a cutoff
inferlblower bound which led to infeasibility
vbdvarvariable which is the reason for the lower bound change
boundtypebound which is the reason for the lower bound change
coefinference variable bound coefficient used
constantinference variable bound constant used
canwidecan bound widening be used (for vbounds) or not (for inplications or cliques)

Definition at line 1025 of file prop_vbounds.c.

References computeRelaxedLowerbound(), FALSE, NULL, relaxVbdvar(), resolvePropagation(), SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIP_STAGE_SOLVING, SCIPaddConflictRelaxedUb(), SCIPaddConflictUb(), SCIPadjustedVarLb(), SCIPanalyzeConflict(), SCIPdebugMessage, SCIPfeastol(), SCIPgetConflictVarUb(), SCIPgetStage(), SCIPinitConflictAnalysis(), SCIPisConflictAnalysisApplicable(), SCIPisEQ(), SCIPisGT(), SCIPvarGetUbAtIndex(), SCIPvarGetUbLocal(), SCIPvarIsIntegral(), and TRUE.

Referenced by tightenVarLb().

static SCIP_Real computeRelaxedUpperbound ( SCIP scip,
SCIP_VAR var,
SCIP_Real  inferub,
SCIP_Real  coef,
SCIP_Real  constant 
)
static

compute the relaxed bound which is sufficient to propagate the inference upper bound of given variable

Parameters
scipSCIP data structure
varvariable which was propagated
inferubinference upper bound
coefinference variable bound coefficient used
constantinference variable bound constant used

Definition at line 1109 of file prop_vbounds.c.

References SCIP_Real, SCIPadjustedVarUb(), SCIPfeastol(), SCIPisEQ(), and SCIPvarIsIntegral().

Referenced by analyzeConflictUpperbound(), and SCIP_DECL_PROPRESPROP().

static SCIP_RETCODE analyzeConflictUpperbound ( SCIP scip,
SCIP_PROPDATA propdata,
SCIP_VAR infervar,
SCIP_Real  inferub,
SCIP_VAR vbdvar,
SCIP_BOUNDTYPE  boundtype,
SCIP_Real  coef,
SCIP_Real  constant,
SCIP_Bool  canwide 
)
static

analyzes an infeasibility which was reached by updating the upper bound of the inference variable below its lower bound

Parameters
scipSCIP data structure
propdatapropagator data
infervarvariable which led to a cutoff
inferubupper bound which led to infeasibility
vbdvarvariable which is the reason for the upper bound change
boundtypebound which is the reason for the upper bound change
coefinference variable bound coefficient used
constantinference variable bound constant used
canwidecan bound widening be used (for vbounds) or not (for inplications or cliques)

Definition at line 1134 of file prop_vbounds.c.

References computeRelaxedUpperbound(), FALSE, NULL, relaxVbdvar(), resolvePropagation(), SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIP_STAGE_SOLVING, SCIPaddConflictLb(), SCIPaddConflictRelaxedLb(), SCIPadjustedVarUb(), SCIPanalyzeConflict(), SCIPdebugMessage, SCIPfeastol(), SCIPgetConflictVarLb(), SCIPgetStage(), SCIPinitConflictAnalysis(), SCIPisConflictAnalysisApplicable(), SCIPisEQ(), SCIPisLT(), SCIPvarGetLbAtIndex(), SCIPvarGetLbLocal(), SCIPvarIsIntegral(), and TRUE.

Referenced by tightenVarUb().

static SCIP_RETCODE tightenVarLb ( SCIP scip,
SCIP_PROP prop,
SCIP_PROPDATA propdata,
SCIP_VAR var,
SCIP_Real  newlb,
SCIP_Bool  global,
SCIP_VAR vbdvar,
SCIP_BOUNDTYPE  boundtype,
SCIP_Bool  force,
SCIP_Real  coef,
SCIP_Real  constant,
SCIP_Bool  canwide,
int *  nchgbds,
SCIP_RESULT result 
)
static
Parameters
scipSCIP data structure
propvbounds propagator
propdatapropagator data
varvariable whose lower bound should be tightened
newlbnew lower bound for the variable
globalis the bound globally valid?
vbdvarvariable which is the reason for the lower bound change
boundtypebound which is the reason for the lower bound change
forceshould domain changes for continuous variables be forced
coefcoefficient in vbound constraint causing the propagation; or 0.0 if propagation is caused by clique or implication
constantconstant in vbound constraint causing the propagation; or 0.0 if propagation is caused by clique or implication
canwidecan bound widening be used (for vbounds) or not (for inplications or cliques)
nchgbdspointer to increase, if a bound was changed
resultpointer to store the result of the propagation

Definition at line 1219 of file prop_vbounds.c.

References analyzeConflictLowerbound(), FALSE, getBoundtypeString, getInferInfo(), inferInfoToInt(), NULL, SCIP_Bool, SCIP_BOUNDTYPE_LOWER, SCIP_CALL, SCIP_CUTOFF, SCIP_OKAY, SCIP_Real, SCIPcutoffNode(), SCIPdebugMessage, SCIPgetRootNode(), SCIPinferVarLbProp(), SCIPisGT(), SCIPtightenVarLbGlobal(), SCIPvarGetLbLocal(), SCIPvarGetName(), SCIPvarGetUbGlobal(), SCIPvarGetUbLocal(), SCIPvarIsIntegral(), TRUE, varGetLbIndex(), and varGetUbIndex().

Referenced by propagateVbounds().

static SCIP_RETCODE tightenVarUb ( SCIP scip,
SCIP_PROP prop,
SCIP_PROPDATA propdata,
SCIP_VAR var,
SCIP_Real  newub,
SCIP_Bool  global,
SCIP_VAR vbdvar,
SCIP_BOUNDTYPE  boundtype,
SCIP_Bool  force,
SCIP_Real  coef,
SCIP_Real  constant,
SCIP_Bool  canwide,
int *  nchgbds,
SCIP_RESULT result 
)
static
Parameters
scipSCIP data structure
propvbounds propagator
propdatapropagator data
varvariable whose upper bound should be tightened
newubnew upper bound of the variable
globalis the bound globally valid?
vbdvarvariable which is the reason for the upper bound change
boundtypebound which is the reason for the upper bound change
forceshould domain changes for continuous variables be forced
coefcoefficient in vbound constraint causing the propagation; or 0.0 if propagation is caused by clique or implication
constantconstant in vbound constraint causing the propagation; or 0.0 if propagation is caused by clique or implication
canwidecan bound widening be used (for vbounds) or not (for inplications or cliques)
nchgbdspointer to increase, if a bound was changed
resultpointer to store the result of the propagation

Definition at line 1303 of file prop_vbounds.c.

References analyzeConflictUpperbound(), FALSE, getBoundtypeString, getInferInfo(), inferInfoToInt(), NULL, SCIP_Bool, SCIP_BOUNDTYPE_LOWER, SCIP_CALL, SCIP_CUTOFF, SCIP_OKAY, SCIP_Real, SCIPcutoffNode(), SCIPdebugMessage, SCIPgetRootNode(), SCIPinferVarUbProp(), SCIPisLT(), SCIPtightenVarUbGlobal(), SCIPvarGetLbGlobal(), SCIPvarGetLbLocal(), SCIPvarGetName(), SCIPvarGetUbLocal(), SCIPvarIsIntegral(), TRUE, varGetLbIndex(), and varGetUbIndex().

Referenced by propagateVbounds().

static SCIP_DECL_PROPCOPY ( propCopyVbounds  )
static

copy method for propagator plugins (called when SCIP copies plugins)

Definition at line 1663 of file prop_vbounds.c.

References NULL, PROP_NAME, SCIP_CALL, SCIP_OKAY, SCIPincludePropVbounds(), and SCIPpropGetName().

static SCIP_DECL_PROPFREE ( propFreeVbounds  )
static

destructor of propagator to free user data (called when SCIP is exiting)

Definition at line 1677 of file prop_vbounds.c.

References NULL, SCIP_OKAY, SCIPfreeMemory, SCIPpropGetData(), and SCIPpropSetData().

static SCIP_DECL_PROPEXITSOL ( propExitsolVbounds  )
static

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

Definition at line 1692 of file prop_vbounds.c.

References dropEvents(), NULL, resetPropdata(), SCIP_CALL, SCIP_OKAY, SCIPfreeBlockMemoryArray, SCIPfreeMemoryArray, SCIPhashmapFree(), SCIPpqueueFree(), and SCIPpropGetData().

static SCIP_DECL_PROPEXEC ( propExecVbounds  )
static

execution method of propagator

Definition at line 1743 of file prop_vbounds.c.

References FALSE, propagateVbounds(), SCIP_CALL, SCIP_CUTOFF, SCIP_DIDNOTFIND, SCIP_DIDNOTRUN, SCIP_OKAY, and SCIP_REDUCEDDOM.

SCIP_Bool SCIPisPropagatedVbounds ( SCIP scip)

returns TRUE if the propagator has the status that all variable lower and upper bounds are propgated

Parameters
scipSCIP data structure

Definition at line 1938 of file prop_vbounds.c.

References NULL, PROP_NAME, SCIPfindProp(), SCIPpqueueNElems(), and SCIPpropGetData().

SCIP_RETCODE SCIPexecPropVbounds ( SCIP scip,
SCIP_Bool  force,
SCIP_RESULT result 
)

performs propagation of variables lower and upper bounds

Parameters
scipSCIP data structure
forceshould domain changes for continuous variables be forced
resultpointer to store result

Definition at line 1955 of file prop_vbounds.c.

References NULL, PROP_NAME, propagateVbounds(), SCIP_CALL, SCIP_CUTOFF, SCIP_DIDNOTFIND, SCIP_DIDNOTRUN, SCIP_OKAY, SCIP_REDUCEDDOM, and SCIPfindProp().