Constraint handler for linear constraints in their most general form, \(lhs <= a^T x <= rhs\).
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 "blockmemshell/memory.h"
#include "scip/cons_nonlinear.h"
#include "scip/cons_knapsack.h"
#include "scip/cons_linear.h"
#include "scip/debug.h"
#include "scip/pub_conflict.h"
#include "scip/pub_cons.h"
#include "scip/pub_event.h"
#include "scip/pub_expr.h"
#include "scip/pub_lp.h"
#include "scip/pub_message.h"
#include "scip/pub_misc.h"
#include "scip/pub_misc_sort.h"
#include "scip/pub_var.h"
#include "scip/scip_branch.h"
#include "scip/scip_conflict.h"
#include "scip/scip_cons.h"
#include "scip/scip_copy.h"
#include "scip/scip_cut.h"
#include "scip/scip_event.h"
#include "scip/scip_general.h"
#include "scip/scip_lp.h"
#include "scip/scip_mem.h"
#include "scip/scip_message.h"
#include "scip/scip_numerics.h"
#include "scip/scip_param.h"
#include "scip/scip_prob.h"
#include "scip/scip_probing.h"
#include "scip/scip_sol.h"
#include "scip/scip_solvingstats.h"
#include "scip/scip_tree.h"
#include "scip/scip_var.h"
#include "scip/symmetry_graph.h"
#include "symmetry/struct_symmetry.h"
#include "scip/dbldblarith.h"
Go to the source code of this file.
Data Structures | |
struct | SCIP_LinConsUpgrade |
#define CONSHDLR_NAME "linear" |
Definition at line 96 of file cons_linear.c.
Definition at line 97 of file cons_linear.c.
#define CONSHDLR_SEPAPRIORITY +100000 |
priority of the constraint handler for separation
Definition at line 98 of file cons_linear.c.
#define CONSHDLR_ENFOPRIORITY -1000000 |
priority of the constraint handler for constraint enforcing
Definition at line 99 of file cons_linear.c.
#define CONSHDLR_CHECKPRIORITY -1000000 |
priority of the constraint handler for checking feasibility
Definition at line 100 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 101 of file cons_linear.c.
#define CONSHDLR_PROPFREQ 1 |
frequency for propagating domains; zero means only preprocessing propagation
Definition at line 102 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 103 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 105 of file cons_linear.c.
#define CONSHDLR_DELAYSEPA FALSE |
should separation method be delayed, if other separators found cuts?
Definition at line 106 of file cons_linear.c.
#define CONSHDLR_DELAYPROP FALSE |
should propagation method be delayed, if other propagators found reductions?
Definition at line 107 of file cons_linear.c.
#define CONSHDLR_NEEDSCONS TRUE |
should the constraint handler be skipped, if no constraints are available?
Definition at line 108 of file cons_linear.c.
#define CONSHDLR_PRESOLTIMING (SCIP_PRESOLTIMING_FAST | SCIP_PRESOLTIMING_EXHAUSTIVE) |
presolving timing of the constraint handler (fast, medium, or exhaustive)
Definition at line 110 of file cons_linear.c.
#define CONSHDLR_PROP_TIMING SCIP_PROPTIMING_BEFORELP |
Definition at line 111 of file cons_linear.c.
#define EVENTHDLR_NAME "linear" |
Definition at line 113 of file cons_linear.c.
#define EVENTHDLR_DESC "bound change event handler for linear constraints" |
Definition at line 114 of file cons_linear.c.
#define CONFLICTHDLR_NAME "linear" |
Definition at line 116 of file cons_linear.c.
#define CONFLICTHDLR_DESC "conflict handler creating linear constraints" |
Definition at line 117 of file cons_linear.c.
#define CONFLICTHDLR_PRIORITY -1000000 |
Definition at line 118 of file cons_linear.c.
#define DEFAULT_TIGHTENBOUNDSFREQ 1 |
multiplier on propagation frequency, how often the bounds are tightened
Definition at line 120 of file cons_linear.c.
Referenced by SCIPincludeConshdlrLinear().
#define DEFAULT_MAXROUNDS 5 |
maximal number of separation rounds per node (-1: unlimited)
Definition at line 121 of file cons_linear.c.
#define DEFAULT_MAXROUNDSROOT -1 |
maximal number of separation rounds in the root node (-1: unlimited)
Definition at line 122 of file cons_linear.c.
#define DEFAULT_MAXSEPACUTS 50 |
maximal number of cuts separated per separation round
Definition at line 123 of file cons_linear.c.
#define DEFAULT_MAXSEPACUTSROOT 200 |
maximal number of cuts separated per separation round in root node
Definition at line 124 of file cons_linear.c.
#define DEFAULT_PRESOLPAIRWISE TRUE |
should pairwise constraint comparison be performed in presolving?
Definition at line 125 of file cons_linear.c.
#define DEFAULT_PRESOLUSEHASHING TRUE |
should hash table be used for detecting redundant constraints in advance
Definition at line 126 of file cons_linear.c.
#define DEFAULT_NMINCOMPARISONS 200000 |
number for minimal pairwise presolving comparisons
Definition at line 127 of file cons_linear.c.
Referenced by SCIPincludeConshdlrLinear().
#define DEFAULT_MINGAINPERNMINCOMP 1e-06 |
minimal gain per minimal pairwise presolving comparisons to repeat pairwise comparison round
Definition at line 128 of file cons_linear.c.
Referenced by SCIPincludeConshdlrLinear().
#define DEFAULT_SORTVARS TRUE |
should variables be sorted after presolve w.r.t their coefficient absolute for faster propagation?
Definition at line 130 of file cons_linear.c.
Referenced by SCIPincludeConshdlrLinear(), and SCIPincludeHeurShiftandpropagate().
#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 132 of file cons_linear.c.
Referenced by SCIPincludeConshdlrLinear().
#define DEFAULT_MAXAGGRNORMSCALE 0.0 |
maximal allowed relative gain in maximum norm for constraint aggregation (0.0: disable constraint aggregation)
Definition at line 134 of file cons_linear.c.
Referenced by SCIPincludeConshdlrLinear().
#define DEFAULT_MAXEASYACTIVITYDELTA 1e6 |
maximum activity delta to run easy propagation on linear constraint (faster, but numerically less stable)
Definition at line 136 of file cons_linear.c.
Referenced by SCIPincludeConshdlrLinear().
#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 138 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 140 of file cons_linear.c.
Referenced by SCIPincludeConshdlrLinear().
#define DEFAULT_AGGREGATEVARIABLES TRUE |
should presolving search for redundant variables in equations
Definition at line 142 of file cons_linear.c.
Referenced by SCIPincludeConshdlrLinear().
#define DEFAULT_SIMPLIFYINEQUALITIES TRUE |
should presolving try to simplify inequalities
Definition at line 143 of file cons_linear.c.
#define DEFAULT_DUALPRESOLVING TRUE |
should dual presolving steps be performed?
Definition at line 144 of file cons_linear.c.
#define DEFAULT_SINGLETONSTUFFING TRUE |
should stuffing of singleton continuous variables be performed?
Definition at line 145 of file cons_linear.c.
Referenced by SCIPincludeConshdlrLinear().
#define DEFAULT_SINGLEVARSTUFFING FALSE |
should single variable stuffing be performed, which tries to fulfill constraints using the cheapest variable?
Definition at line 146 of file cons_linear.c.
Referenced by SCIPincludeConshdlrLinear().
#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 148 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 151 of file cons_linear.c.
#define DEFAULT_DETECTPARTIALOBJECTIVE TRU |
should presolving try to detect subsets of constraints parallel to the objective function
Definition at line 154 of file cons_linear.c.
Referenced by SCIPincludeConshdlrLinear().
#define DEFAULT_RANGEDROWPROPAGATION TRUE |
should we perform ranged row propagation
Definition at line 156 of file cons_linear.c.
Referenced by SCIPincludeConshdlrLinear().
#define DEFAULT_RANGEDROWARTCONS TRUE |
should presolving and propagation extract sub-constraints from ranged rows and equations?
Definition at line 157 of file cons_linear.c.
Referenced by SCIPincludeConshdlrLinear().
#define DEFAULT_RANGEDROWMAXDEPTH INT_MAX |
maximum depth to apply ranged row propagation
Definition at line 158 of file cons_linear.c.
Referenced by SCIPincludeConshdlrLinear().
#define DEFAULT_RANGEDROWFREQ 1 |
frequency for applying ranged row propagation
Definition at line 159 of file cons_linear.c.
Referenced by SCIPincludeConshdlrLinear().
#define DEFAULT_MULTAGGRREMOVE FALSE |
should multi-aggregations only be performed if the constraint can be removed afterwards?
Definition at line 161 of file cons_linear.c.
Referenced by SCIPincludeConshdlrLinear().
#define DEFAULT_MAXMULTAGGRQUOT 1e+03 |
maximum coefficient dynamism (ie. maxabsval / minabsval) for multiaggregation
Definition at line 163 of file cons_linear.c.
Referenced by SCIPincludeConshdlrLinear().
#define DEFAULT_MAXDUALMULTAGGRQUOT 1e+20 |
maximum coefficient dynamism (ie. maxabsval / minabsval) for multiaggregation
Definition at line 164 of file cons_linear.c.
Referenced by SCIPincludeConshdlrLinear().
#define DEFAULT_EXTRACTCLIQUES TRUE |
should cliques be extracted?
Definition at line 165 of file cons_linear.c.
Referenced by SCIPincludeConshdlrLinear().
#define MAXDNOM 10000LL |
maximal denominator for simple rational fixed values
Definition at line 167 of file cons_linear.c.
Referenced by calculateScalingValue(), convertUnaryEquality(), fixVariables(), SCIP_DECL_PRESOLEXEC(), SCIPanalyzeDeductionsProbing(), transformNonIntegralRow(), and tryAggregateIntVars().
#define MAXSCALEDCOEF 0 |
maximal coefficient value after scaling
Definition at line 168 of file cons_linear.c.
Referenced by normalizeCons(), and prettifyConss().
#define MAXSCALEDCOEFINTEGER 0 |
maximal coefficient value after scaling if all variables are of integral type
Definition at line 169 of file cons_linear.c.
Referenced by normalizeCons().
#define MAXACTVAL 1e+09 |
maximal absolute value of full and partial activities such that redundancy-based simplifications are allowed to be applied
Definition at line 172 of file cons_linear.c.
Referenced by simplifyInequalities().
#define MAXVALRECOMP 1e+06 |
maximal abolsute value we trust without recomputing the activity
Definition at line 176 of file cons_linear.c.
Referenced by consdataTightenCoefs().
#define MINVALRECOMP 1e-05 |
minimal abolsute value we trust without recomputing the activity
Definition at line 177 of file cons_linear.c.
Referenced by consdataTightenCoefs().
#define NONLINCONSUPGD_PRIORITY 1000000 |
priority of the constraint handler for upgrading of expressions constraints
Definition at line 180 of file cons_linear.c.
Referenced by SCIPincludeConshdlrLinear(), SCIPincludeConshdlrPseudoboolean(), and SCIPincludeConshdlrSetppc().
#define checkMaxActivityDelta | ( | scip, | |
consdata ) |
Definition at line 1543 of file cons_linear.c.
Referenced by simplifyInequalities(), and tightenBounds().
#define MAXTIGHTENROUNDS 10 |
Definition at line 6987 of file cons_linear.c.
Referenced by tightenBounds().
#define MAX_CLIQUE_NONZEROS_PER_CONS 1000000 |
Definition at line 7858 of file cons_linear.c.
Referenced by extractCliques().
#define BINWEIGHT 1 |
Definition at line 11080 of file cons_linear.c.
Referenced by getVarWeight().
#define INTWEIGHT 4 |
Definition at line 11081 of file cons_linear.c.
Referenced by getVarWeight().
#define CONTWEIGHT 8 |
Definition at line 11082 of file cons_linear.c.
Referenced by getVarWeight().
#define MAXCONSPRESOLROUNDS 10 |
Definition at line 16295 of file cons_linear.c.
Referenced by SCIP_DECL_CONSPRESOL().
enum Proprule |
Definition at line 345 of file cons_linear.c.
|
static |
converts an integer into an inference information
i | integer to convert |
Definition at line 374 of file cons_linear.c.
References i.
Referenced by SCIP_DECL_CONSRESPROP().
|
static |
converts an inference information into an int
inferinfo | inference information to convert |
Definition at line 387 of file cons_linear.c.
Referenced by getInferInt().
|
static |
returns the propagation rule stored in the inference information
inferinfo | inference information to convert |
Definition at line 396 of file cons_linear.c.
Referenced by resolvePropagation().
|
static |
returns the position stored in the inference information
inferinfo | inference information to convert |
Definition at line 405 of file cons_linear.c.
Referenced by resolvePropagation().
constructs an inference information out of a propagation rule and a position number
proprule | propagation rule that deduced the value |
pos | variable position, the propagation rule was applied at |
Definition at line 414 of file cons_linear.c.
References assert().
Referenced by getInferInt().
|
static |
constructs an inference information out of a propagation rule and a position number, returns info as int
proprule | propagation rule that deduced the value |
pos | variable position, the propagation rule was applied at |
Definition at line 433 of file cons_linear.c.
References getInferInfo(), and inferInfoToInt().
Referenced by rangedRowPropagation(), tightenVarBounds(), tightenVarLb(), and tightenVarUb().
|
static |
ensures, that linconsupgrades array can store at least num entries
scip | SCIP data structure |
conshdlrdata | linear constraint handler data |
num | minimum number of entries to store |
Definition at line 448 of file cons_linear.c.
References assert(), NULL, SCIP_CALL, SCIP_OKAY, SCIPcalcMemGrowSize(), and SCIPreallocBlockMemoryArray.
Referenced by conshdlrdataIncludeUpgrade().
|
static |
ensures, that vars and vals arrays can store at least num entries
scip | SCIP data structure |
consdata | linear constraint data |
num | minimum number of entries to store |
Definition at line 473 of file cons_linear.c.
References assert(), NULL, SCIP_CALL, SCIP_OKAY, SCIPcalcMemGrowSize(), and SCIPreallocBlockMemoryArray.
Referenced by addCoef(), and SCIP_DECL_NONLINCONSUPGD().
|
static |
creates a linear constraint upgrade data object
scip | SCIP data structure |
linconsupgrade | pointer to store the linear constraint upgrade |
priority | priority of upgrading method |
Definition at line 508 of file cons_linear.c.
References assert(), NULL, SCIP_CALL, SCIP_OKAY, SCIPallocBlockMemory, and TRUE.
Referenced by SCIPincludeLinconsUpgrade().
|
static |
frees a linear constraint upgrade data object
scip | SCIP data structure |
linconsupgrade | pointer to the linear constraint upgrade |
Definition at line 529 of file cons_linear.c.
References assert(), NULL, and SCIPfreeBlockMemory.
Referenced by conshdlrdataFree().
|
static |
creates constraint handler data for linear constraint handler
scip | SCIP data structure |
conshdlrdata | pointer to store the constraint handler data |
eventhdlr | event handler |
Definition at line 543 of file cons_linear.c.
References assert(), NULL, SCIP_CALL, SCIP_OKAY, and SCIPallocBlockMemory.
Referenced by SCIPincludeConshdlrLinear().
|
static |
frees constraint handler data for linear constraint handler
scip | SCIP data structure |
conshdlrdata | pointer to the constraint handler data |
Definition at line 567 of file cons_linear.c.
References assert(), i, linconsupgradeFree(), NULL, SCIPfreeBlockMemory, and SCIPfreeBlockMemoryArrayNull.
Referenced by SCIP_DECL_CONSFREE().
|
static |
creates a linear constraint upgrade data object
scip | SCIP data structure |
conshdlrdata | constraint handler data |
conshdlrname | name of the constraint handler |
Definition at line 589 of file cons_linear.c.
References assert(), FALSE, i, NULL, SCIP_Bool, SCIPwarningMessage(), and TRUE.
Referenced by SCIPincludeLinconsUpgrade().
|
static |
adds a linear constraint update method to the constraint handler's data
scip | SCIP data structure |
conshdlrdata | constraint handler data |
linconsupgrade | linear constraint upgrade method |
Definition at line 619 of file cons_linear.c.
References assert(), conshdlrdataEnsureLinconsupgradesSize(), i, NULL, SCIP_LinConsUpgrade::priority, SCIP_CALL, and SCIP_OKAY.
Referenced by SCIPincludeLinconsUpgrade().
|
static |
installs rounding locks for the given variable associated to the given coefficient in the linear constraint
scip | SCIP data structure |
cons | linear constraint |
var | variable of constraint entry |
val | coefficient of constraint entry |
Definition at line 651 of file cons_linear.c.
References assert(), NULL, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPconsGetData(), SCIPisInfinity(), SCIPisZero(), SCIPlockVarCons(), and var.
Referenced by addCoef(), and chgCoefPos().
|
static |
removes rounding locks for the given variable associated to the given coefficient in the linear constraint
scip | SCIP data structure |
cons | linear constraint |
var | variable of constraint entry |
val | coefficient of constraint entry |
Definition at line 684 of file cons_linear.c.
References assert(), NULL, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPconsGetData(), SCIPisInfinity(), SCIPisZero(), SCIPunlockVarCons(), and var.
Referenced by chgCoefPos(), and delCoefPos().
|
static |
creates event data for variable at given position, and catches events ! [SnippetDebugAssertions]
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 718 of file cons_linear.c.
References assert(), NULL, nvars, SCIP_CALL, SCIP_EVENTTYPE_BOUNDCHANGED, SCIP_EVENTTYPE_GBDCHANGED, SCIP_EVENTTYPE_TYPECHANGED, SCIP_EVENTTYPE_VARDELETED, SCIP_EVENTTYPE_VARFIXED, SCIP_EVENTTYPE_VARUNLOCKED, SCIP_OKAY, SCIPallocBlockMemory, SCIPcatchVarEvent(), SCIPconsGetData(), SCIPvarIsActive(), and SCIPvarIsTransformed().
Referenced by addCoef(), and consCatchAllEvents().
|
static |
! [SnippetDebugAssertions] deletes event data for variable at given position, and drops events
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 757 of file cons_linear.c.
References assert(), NULL, nvars, SCIP_CALL, SCIP_EVENTTYPE_BOUNDCHANGED, SCIP_EVENTTYPE_GBDCHANGED, SCIP_EVENTTYPE_TYPECHANGED, SCIP_EVENTTYPE_VARDELETED, SCIP_EVENTTYPE_VARFIXED, SCIP_EVENTTYPE_VARUNLOCKED, SCIP_OKAY, SCIPconsGetData(), SCIPdropVarEvent(), and SCIPfreeBlockMemory.
Referenced by consDropAllEvents(), and delCoefPos().
|
static |
catches bound change events for all variables in transformed linear constraint
scip | SCIP data structure |
cons | linear constraint |
eventhdlr | event handler to call for the event processing |
Definition at line 791 of file cons_linear.c.
References assert(), BMSclearMemoryArray, consCatchEvent(), i, NULL, SCIP_CALL, SCIP_OKAY, SCIPallocBlockMemoryArray, and SCIPconsGetData().
Referenced by applyFixings(), propagateCons(), SCIP_DECL_CONSINIT(), and SCIP_DECL_CONSPRESOL().
|
static |
drops bound change events for all variables in transformed linear constraint
scip | SCIP data structure |
cons | linear constraint |
eventhdlr | event handler to call for the event processing |
Definition at line 823 of file cons_linear.c.
References assert(), consDropEvent(), i, NULL, SCIP_CALL, SCIP_OKAY, SCIPconsGetData(), and SCIPfreeBlockMemoryArray.
Referenced by SCIP_DECL_CONSDEACTIVE(), SCIP_DECL_CONSDELETE(), and SCIP_DECL_CONSEXIT().
|
static |
creates a linear constraint data
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 854 of file cons_linear.c.
References assert(), FALSE, NULL, nvars, QUAD_ASSIGN, REALABS, SCIP_CALL, SCIP_INVALID, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_Real, SCIP_VARTYPE_BINARY, SCIP_VARTYPE_CONTINUOUS, SCIPallocBlockMemory, SCIPallocBufferArray, SCIPcaptureVar(), SCIPduplicateBlockMemoryArray, SCIPfreeBlockMemory, SCIPfreeBlockMemoryArrayNull, SCIPfreeBufferArray, SCIPgetTransformedVars(), SCIPinfinity(), SCIPisConsCompressionEnabled(), SCIPisEQ(), SCIPisGT(), SCIPisInfinity(), SCIPisTransformed(), SCIPisZero(), SCIPvarGetLbGlobal(), SCIPvarGetType(), SCIPvarGetUbGlobal(), SCIPwarningMessage(), TRUE, var, and vars.
Referenced by SCIP_DECL_CONSTRANS(), and SCIPcreateConsLinear().
|
static |
frees a linear constraint data
scip | SCIP data structure |
consdata | pointer to linear constraint data |
Definition at line 1060 of file cons_linear.c.
References assert(), NULL, SCIP_CALL, SCIP_OKAY, SCIPfreeBlockMemory, SCIPfreeBlockMemoryArrayNull, SCIPisZero(), SCIPreleaseNlRow(), SCIPreleaseRow(), and SCIPreleaseVar().
Referenced by SCIP_DECL_CONSDELETE().
|
static |
prints linear constraint in CIP format to file stream
scip | SCIP data structure |
consdata | linear constraint data |
file | output file (or NULL for standard output) |
Definition at line 1101 of file cons_linear.c.
References assert(), NULL, SCIP_CALL, SCIP_OKAY, SCIPinfoMessage(), SCIPisEQ(), SCIPisInfinity(), SCIPwriteVarsLinearsum(), and TRUE.
Referenced by SCIP_DECL_CONSPRINT().
|
static |
prints linear constraint and contained solution values of variables to file stream
scip | SCIP data structure |
cons | linear constraint |
sol | solution to print |
file | output file (or NULL for standard output) |
Definition at line 1140 of file cons_linear.c.
References assert(), NULL, SCIP_CALL, SCIP_OKAY, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconsGetName(), SCIPconshdlrGetName(), SCIPgetMessagehdlr(), SCIPgetSolVal(), SCIPinfoMessage(), SCIPisEQ(), SCIPisInfinity(), SCIPmessageFPrintInfo(), SCIPwriteVarName(), sol, and TRUE.
Referenced by checkCons(), and SCIP_DECL_CONSCHECK().
|
static |
invalidates activity bounds, such that they are recalculated in next get
consdata | linear constraint |
Definition at line 1212 of file cons_linear.c.
References assert(), FALSE, NULL, QUAD_ASSIGN, and SCIP_INVALID.
Referenced by delCoefPos(), scaleCons(), and SCIP_DECL_EVENTEXEC().
|
static |
compute the pseudo activity of a constraint
scip | SCIP data structure |
consdata | linear constraint data |
Definition at line 1258 of file cons_linear.c.
References bound, i, SCIP_BOUNDTYPE_LOWER, SCIP_INVALID, SCIP_Real, SCIPinfinity(), SCIPisInfinity(), SCIPvarGetBestBoundType(), SCIPvarGetLbLocal(), and SCIPvarGetUbLocal().
Referenced by checkCons(), and consdataGetActivity().
|
static |
recompute the minactivity of a constraint
scip | SCIP data structure |
consdata | linear constraint data |
Definition at line 1311 of file cons_linear.c.
References bound, i, QUAD_ASSIGN, QUAD_TO_DBL, SCIP_Real, SCIPisHugeValue(), SCIPisInfinity(), SCIPquadprecSumQD, SCIPvarGetLbLocal(), SCIPvarGetUbLocal(), and TRUE.
Referenced by consdataTightenCoefs(), getMinActivity(), and tightenVarBoundsEasy().
|
static |
recompute the maxactivity of a constraint
scip | SCIP data structure |
consdata | linear constraint data |
Definition at line 1338 of file cons_linear.c.
References bound, i, QUAD_ASSIGN, QUAD_TO_DBL, SCIP_Real, SCIPisHugeValue(), SCIPisInfinity(), SCIPquadprecSumQD, SCIPvarGetLbLocal(), SCIPvarGetUbLocal(), and TRUE.
Referenced by consdataTightenCoefs(), getMaxActivity(), and tightenVarBoundsEasy().
|
static |
recompute the global minactivity of a constraint
scip | SCIP data structure |
consdata | linear constraint data |
Definition at line 1365 of file cons_linear.c.
References bound, i, QUAD_ASSIGN, QUAD_TO_DBL, SCIP_Real, SCIPisHugeValue(), SCIPisInfinity(), SCIPquadprecSumQD, SCIPvarGetLbGlobal(), SCIPvarGetUbGlobal(), and TRUE.
Referenced by extractCliques(), and getMinActivity().
|
static |
recompute the global maxactivity of a constraint
scip | SCIP data structure |
consdata | linear constraint data |
Definition at line 1392 of file cons_linear.c.
References bound, i, QUAD_ASSIGN, QUAD_TO_DBL, SCIP_Real, SCIPisHugeValue(), SCIPisInfinity(), SCIPquadprecSumQD, SCIPvarGetLbGlobal(), SCIPvarGetUbGlobal(), and TRUE.
Referenced by extractCliques(), and getMaxActivity().
|
static |
calculates maximum absolute value of coefficients
consdata | linear constraint data |
Definition at line 1419 of file cons_linear.c.
References assert(), i, NULL, REALABS, SCIP_INVALID, SCIP_Real, and TRUE.
Referenced by consdataGetMaxAbsval(), and normalizeCons().
|
static |
calculates minimum absolute value of coefficients
consdata | linear constraint data |
Definition at line 1443 of file cons_linear.c.
References assert(), i, NULL, REALABS, SCIP_INVALID, SCIP_Real, and TRUE.
Referenced by consdataGetMinAbsval(), and normalizeCons().
|
static |
checks the type of all variables of the constraint and sets hasnonbinvar and hascontvar flags accordingly
consdata | linear constraint data |
Definition at line 1472 of file cons_linear.c.
References assert(), FALSE, SCIP_VARTYPE_BINARY, SCIP_VARTYPE_CONTINUOUS, SCIPvarGetType(), and TRUE.
Referenced by consdataRecomputeMaxActivityDelta(), and normalizeCons().
|
static |
recompute maximal activity contribution for a single variable
scip | SCIP data structure |
consdata | linear constraint data |
Definition at line 1548 of file cons_linear.c.
References consdataCheckNonbinvar(), REALABS, SCIP_Real, SCIPinfinity(), SCIPisInfinity(), SCIPvarGetLbLocal(), and SCIPvarGetUbLocal().
Referenced by SCIP_DECL_CONSEXITPRE(), simplifyInequalities(), and tightenBounds().
|
static |
updates activities for a change in a bound
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 1610 of file cons_linear.c.
References assert(), FALSE, NULL, QUAD_ASSIGN, QUAD_ASSIGN_Q, QUAD_MEMBER, QUAD_TO_DBL, REALABS, SCIP_Bool, SCIP_BOUNDTYPE_LOWER, SCIP_INVALID, SCIP_Real, SCIPdebugMsg, SCIPisHugeValue(), SCIPisInfinity(), SCIPisUpdateUnreliable(), SCIPquadprecSumQD, and var.
Referenced by consdataUpdateActivitiesGlbLb(), consdataUpdateActivitiesGlbUb(), consdataUpdateActivitiesLb(), and consdataUpdateActivitiesUb().
|
static |
updates minimum and maximum activity for a change in lower bound
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 2002 of file cons_linear.c.
References assert(), consdataUpdateActivities(), FALSE, NULL, QUAD_TO_DBL, SCIP_Bool, SCIP_BOUNDTYPE_LOWER, SCIP_Real, SCIPisInfinity(), and var.
Referenced by consdataUpdateAddCoef(), consdataUpdateDelCoef(), and SCIP_DECL_EVENTEXEC().
|
static |
updates minimum and maximum activity for a change in upper bound
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 2027 of file cons_linear.c.
References assert(), consdataUpdateActivities(), FALSE, NULL, QUAD_TO_DBL, SCIP_Bool, SCIP_BOUNDTYPE_UPPER, SCIP_Real, SCIPisInfinity(), and var.
Referenced by consdataUpdateAddCoef(), consdataUpdateDelCoef(), and SCIP_DECL_EVENTEXEC().
|
static |
updates minimum and maximum global activity for a change in the global lower bound
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 2052 of file cons_linear.c.
References assert(), consdataUpdateActivities(), NULL, QUAD_TO_DBL, SCIP_Bool, SCIP_BOUNDTYPE_LOWER, SCIP_Real, SCIPisInfinity(), and TRUE.
Referenced by consdataUpdateAddCoef(), consdataUpdateDelCoef(), and SCIP_DECL_EVENTEXEC().
|
static |
updates minimum and maximum global activity for a change in global upper bound
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 2075 of file cons_linear.c.
References assert(), consdataUpdateActivities(), NULL, QUAD_TO_DBL, SCIP_Bool, SCIP_BOUNDTYPE_UPPER, SCIP_Real, SCIPisInfinity(), and TRUE.
Referenced by consdataUpdateAddCoef(), consdataUpdateDelCoef(), and SCIP_DECL_EVENTEXEC().
|
static |
updates minimum and maximum activity and maximum absolute value for coefficient addition
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 2098 of file cons_linear.c.
References assert(), consdataUpdateActivitiesGlbLb(), consdataUpdateActivitiesGlbUb(), consdataUpdateActivitiesLb(), consdataUpdateActivitiesUb(), MAX, MIN, NULL, QUAD_TO_DBL, REALABS, SCIP_Bool, SCIP_INVALID, SCIP_Real, SCIPinfinity(), SCIPisInfinity(), SCIPisZero(), SCIPvarGetLbGlobal(), SCIPvarGetLbLocal(), SCIPvarGetUbGlobal(), SCIPvarGetUbLocal(), and var.
Referenced by addCoef(), chgCoefPos(), consdataCalcActivities(), and consdataUpdateChgCoef().
|
static |
updates minimum and maximum activity for coefficient deletion, invalidates maximum absolute value if necessary
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 2174 of file cons_linear.c.
References assert(), consdataUpdateActivitiesGlbLb(), consdataUpdateActivitiesGlbUb(), consdataUpdateActivitiesLb(), consdataUpdateActivitiesUb(), FALSE, NULL, QUAD_TO_DBL, REALABS, SCIP_Bool, SCIP_INVALID, SCIP_Real, SCIPisEQ(), SCIPisZero(), SCIPvarGetLbGlobal(), SCIPvarGetLbLocal(), SCIPvarGetUbGlobal(), SCIPvarGetUbLocal(), and var.
Referenced by chgCoefPos(), consdataUpdateChgCoef(), and delCoefPos().
|
static |
updates minimum and maximum activity for coefficient change, invalidates maximum absolute value if necessary
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 2239 of file cons_linear.c.
References consdataUpdateAddCoef(), consdataUpdateDelCoef(), SCIP_Bool, SCIP_Real, and var.
Referenced by chgCoefPos().
|
static |
returns the maximum absolute value of all coefficients in the constraint
consdata | linear constraint data |
Definition at line 2255 of file cons_linear.c.
References assert(), consdataCalcMaxAbsval(), NULL, SCIP_INVALID, and SCIP_Real.
Referenced by aggregateConstraints(), normalizeCons(), and SCIP_DECL_HASHKEYEQ().
|
static |
returns the minimum absolute value of all coefficients in the constraint
consdata | linear constraint data |
Definition at line 2271 of file cons_linear.c.
References assert(), consdataCalcMinAbsval(), NULL, SCIP_INVALID, and SCIP_Real.
Referenced by normalizeCons().
|
static |
calculates minimum and maximum local and global activity for constraint from scratch; additionally recalculates maximum absolute value of coefficients
scip | SCIP data structure |
consdata | linear constraint data |
Definition at line 2289 of file cons_linear.c.
References assert(), consdataUpdateAddCoef(), FALSE, i, NULL, QUAD_ASSIGN, QUAD_TO_DBL, REALABS, SCIP_INVALID, and TRUE.
Referenced by consdataGetActivityBounds(), consdataGetActivityResiduals(), consdataGetGlbActivityBounds(), consdataGetGlbActivityResiduals(), extractCliques(), and tightenVarBoundsEasy().
|
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
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 |
istight | pointer to store whether activity bound is tight to variable bounds i.e. is the actual minactivity (otherwise a lower bound is provided) |
issettoinfinity | pointer to store whether minactivity was set to infinity or calculated |
Definition at line 2351 of file cons_linear.c.
References assert(), consdataRecomputeGlbMinactivity(), consdataRecomputeMinactivity(), FALSE, NULL, QUAD, QUAD_ASSIGN_Q, QUAD_TO_DBL, SCIP_Bool, SCIP_Real, SCIPgetHugeValue(), SCIPinfinity(), SCIPquadprecSumQD, and TRUE.
Referenced by consdataGetActivityBounds(), consdataGetActivityResiduals(), consdataGetGlbActivityBounds(), and consdataGetGlbActivityResiduals().
|
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
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 |
istight | pointer to store whether activity bound is tight to variable bounds i.e. is the actual maxactivity (otherwise an upper bound is provided) |
issettoinfinity | pointer to store whether maxactivity was set to infinity or calculated |
Definition at line 2446 of file cons_linear.c.
References assert(), consdataRecomputeGlbMaxactivity(), consdataRecomputeMaxactivity(), FALSE, NULL, QUAD, QUAD_ASSIGN_Q, QUAD_TO_DBL, SCIP_Bool, SCIP_Real, SCIPgetHugeValue(), SCIPinfinity(), SCIPquadprecSumQD, and TRUE.
Referenced by consdataGetActivityBounds(), consdataGetActivityResiduals(), consdataGetGlbActivityBounds(), and consdataGetGlbActivityResiduals().
|
static |
gets activity bounds for constraint
scip | SCIP data structure |
consdata | linear constraint |
goodrelax | if we have huge contributions, do we need a good relaxation or are relaxed activities ignored, anyway? |
minactivity | pointer to store the minimal activity |
maxactivity | pointer to store the maximal activity |
ismintight | pointer to store whether the minactivity bound is tight i.e. is the actual minactivity (otherwise a lower bound is provided) |
ismaxtight | pointer to store whether the maxactivity bound is tight i.e. is the actual maxactivity (otherwise an upper bound is provided) |
isminsettoinfinity | pointer to store whether minactivity was set to infinity or calculated |
ismaxsettoinfinity | pointer to store whether maxactivity was set to infinity or calculated |
Definition at line 2539 of file cons_linear.c.
References assert(), consdataCalcActivities(), FALSE, getMaxActivity(), getMinActivity(), NULL, QUAD_TO_DBL, SCIP_Bool, SCIP_INVALID, and SCIP_Real.
Referenced by consdataTightenCoefs(), presolStuffing(), propagateCons(), SCIP_DECL_CONSPRESOL(), and tightenBounds().
|
static |
calculates activity bounds for constraint after setting variable to zero
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 2586 of file cons_linear.c.
References assert(), NULL, REALABS, SCIP_Bool, SCIP_Real, SCIPisHugeValue(), SCIPisInfinity(), SCIPisLE(), SCIPisZero(), SCIPvarGetLbGlobal(), SCIPvarGetLbLocal(), SCIPvarGetUbGlobal(), SCIPvarGetUbLocal(), and var.
Referenced by addConflictBounds(), convertLongEquality(), dualPresolve(), fullDualPresolve(), and tightenVarBounds().
|
static |
gets activity bounds for constraint after setting variable to zero
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 |
ismintight | pointer to store whether the residual minactivity bound is tight i.e. is the actual residual minactivity (otherwise a lower bound is provided) |
ismaxtight | pointer to store whether the residual maxactivity bound is tight i.e. is the actual residual maxactivity (otherwise an upper bound is provided) |
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 2667 of file cons_linear.c.
References assert(), consdataCalcActivities(), FALSE, getMaxActivity(), getMinActivity(), NULL, QUAD_TO_DBL, SCIP_Bool, SCIP_INVALID, SCIP_Real, SCIPisHugeValue(), SCIPisInfinity(), SCIPvarGetLbLocal(), SCIPvarGetUbLocal(), and var.
Referenced by convertLongEquality(), dualPresolve(), and tightenVarBounds().
|
static |
gets global activity bounds for constraint
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 |
ismintight | pointer to store whether the minactivity bound is tight i.e. is the actual minactivity (otherwise a lower bound is provided) |
ismaxtight | pointer to store whether the maxactivity bound is tight i.e. is the actual maxactivity (otherwise an upper bound is provided) |
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 2816 of file cons_linear.c.
References assert(), consdataCalcActivities(), getMaxActivity(), getMinActivity(), NULL, QUAD_TO_DBL, SCIP_Bool, SCIP_INVALID, SCIP_Real, and TRUE.
Referenced by addConflictBounds(), and simplifyInequalities().
|
static |
gets global activity bounds for constraint after setting variable to zero
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 |
ismintight | pointer to store whether the residual minactivity bound is tight i.e. is the actual residual minactivity (otherwise a lower bound is provided) |
ismaxtight | pointer to store whether the residual maxactivity bound is tight i.e. is the actual residual maxactivity (otherwise an upper bound is provided) |
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 2876 of file cons_linear.c.
References assert(), consdataCalcActivities(), getMaxActivity(), getMinActivity(), NULL, QUAD_TO_DBL, SCIP_Bool, SCIP_INVALID, SCIP_Real, SCIPisHugeValue(), SCIPisInfinity(), SCIPvarGetLbGlobal(), SCIPvarGetUbGlobal(), TRUE, and var.
Referenced by addConflictBounds(), and fullDualPresolve().
|
static |
calculates the activity of the linear constraint for given solution
scip | SCIP data structure |
consdata | linear constraint data |
sol | solution to get activity for, NULL to current solution |
Definition at line 3026 of file cons_linear.c.
References assert(), consdataComputePseudoActivity(), FALSE, MAX, MIN, NULL, SCIP_Bool, SCIP_INVALID, SCIP_Real, SCIPdebugMsg, SCIPgetSolVal(), SCIPhasCurrentNodeLP(), SCIPinfinity(), SCIPisInfinity(), sol, and TRUE.
Referenced by checkCons(), consdataGetFeasibility(), SCIP_DECL_CONSCHECK(), and SCIPgetActivityLinear().
|
static |
calculates the feasibility of the linear constraint for given solution
scip | SCIP data structure |
consdata | linear constraint data |
sol | solution to get feasibility for, NULL to current solution |
Definition at line 3094 of file cons_linear.c.
References assert(), consdataGetActivity(), MIN, NULL, SCIP_INVALID, SCIP_Real, SCIPinfinity(), and sol.
Referenced by SCIPgetFeasibilityLinear().
|
static |
updates bit signatures after adding a single coefficient
consdata | linear constraint data |
pos | position of coefficient to update signatures for |
Definition at line 3115 of file cons_linear.c.
References assert(), NULL, SCIP_Real, SCIPhashSignature64, SCIPvarGetIndex(), SCIPvarGetLbGlobal(), and SCIPvarGetUbGlobal().
Referenced by addCoef(), and consdataCalcSignatures().
|
static |
calculates the bit signatures of the given constraint data
consdata | linear constraint data |
Definition at line 3140 of file cons_linear.c.
References assert(), consdataUpdateSignatures(), i, NULL, and TRUE.
Referenced by preprocessConstraintPairs().
|
static |
index comparison method of linear constraints: compares two indices of the variable set in the linear constraint
Definition at line 3160 of file cons_linear.c.
References assert(), NULL, nvars, SCIPvarCompare(), SCIPvarGetType(), and SCIPvarIsBinary().
|
static |
index comparison method of linear constraints: compares two indices of the variable set in the linear constraint
Definition at line 3199 of file cons_linear.c.
References assert(), EPSGT, NULL, nvars, REALABS, SCIP_Real, SCIPvarGetLbGlobal(), SCIPvarGetProbindex(), SCIPvarGetType(), SCIPvarGetUbGlobal(), SCIPvarIsBinary(), and SCIPvarIsIntegral().
|
static |
permutes the constraint's variables according to a given permutation.
consdata | the constraint data |
perm | the target permutation |
nvars | the number of variables |
Definition at line 3269 of file cons_linear.c.
References assert(), i, NULL, nvars, and SCIP_Real.
Referenced by consdataSort(), and simplifyInequalities().
|
static |
sorts linear constraint's variables depending on the stage of the solving process:
during SOLVING sorts variables of the remaining problem by binaries, integers, implicit integers, and continuous variables, and binary and integer variables by their global max activity delta (within each group), ties within a group are broken by problem index of the variable.
This fastens the propagation time of the constraint handler.
scip | SCIP data structure |
consdata | linear constraint data |
Definition at line 3345 of file cons_linear.c.
References assert(), FALSE, NULL, permSortConsdata(), SCIP_CALL, SCIP_OKAY, SCIP_STAGE_INITSOLVE, SCIPallocBufferArray, SCIPfreeBufferArray, SCIPgetStage(), SCIPsort(), SCIPvarIsBinary(), and TRUE.
Referenced by detectRedundantConstraints(), extractCliques(), mergeMultiples(), preprocessConstraintPairs(), and tightenBounds().
|
static |
sets left hand side of linear constraint
scip | SCIP data structure |
cons | linear constraint |
lhs | new left hand side |
Definition at line 3412 of file cons_linear.c.
References ABS, assert(), FALSE, i, NLOCKTYPES, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPchgRowLhs(), SCIPconsGetData(), SCIPconsIsLockedType(), SCIPconsIsTransformed(), SCIPinfinity(), SCIPisEQ(), SCIPisGT(), SCIPisInfinity(), SCIPisPositive(), SCIPisZero(), SCIPlockVarCons(), SCIPmarkConsPropagate(), SCIPunlockVarCons(), TRUE, and vars.
Referenced by applyFixings(), consdataTightenCoefs(), convertLongEquality(), detectRedundantConstraints(), preprocessConstraintPairs(), rangedRowSimplify(), SCIP_DECL_CONSPRESOL(), SCIPaddCoefLinear(), SCIPchgLhsLinear(), simplifyInequalities(), and tightenSides().
|
static |
sets right hand side of linear constraint
scip | SCIP data structure |
cons | linear constraint |
rhs | new right hand side |
Definition at line 3540 of file cons_linear.c.
References ABS, assert(), FALSE, i, NLOCKTYPES, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPchgRowRhs(), SCIPconsGetData(), SCIPconsIsLockedType(), SCIPconsIsTransformed(), SCIPinfinity(), SCIPisEQ(), SCIPisInfinity(), SCIPisLT(), SCIPisPositive(), SCIPisZero(), SCIPlockVarCons(), SCIPmarkConsPropagate(), SCIPunlockVarCons(), TRUE, and vars.
Referenced by applyFixings(), consdataTightenCoefs(), convertLongEquality(), detectRedundantConstraints(), preprocessConstraintPairs(), rangedRowSimplify(), SCIP_DECL_CONSPRESOL(), SCIPaddCoefLinear(), SCIPchgRhsLinear(), simplifyInequalities(), and tightenSides().
|
static |
adds coefficient in linear constraint
scip | SCIP data structure |
cons | linear constraint |
var | variable of constraint entry |
val | coefficient of constraint entry |
Definition at line 3670 of file cons_linear.c.
References assert(), consCatchEvent(), consdataEnsureVarsSize(), consdataUpdateAddCoef(), consdataUpdateSignatures(), FALSE, lockRounding(), NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIP_STAGE_INITSOLVE, SCIP_VARTYPE_BINARY, SCIP_VARTYPE_CONTINUOUS, SCIPaddVarToRow(), SCIPcaptureVar(), SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetData(), SCIPconsIsChecked(), SCIPconsIsEnforced(), SCIPconsIsTransformed(), SCIPgetStage(), SCIPgetTransformedVar(), SCIPisZero(), SCIPmarkConsPropagate(), SCIPvarGetType(), SCIPvarIsActive(), SCIPvarIsRelaxationOnly(), SCIPvarIsTransformed(), TRUE, and var.
Referenced by applyFixings(), and SCIPaddCoefLinear().
|
static |
deletes coefficient at given position from linear constraint data
scip | SCIP data structure |
cons | linear constraint |
pos | position of coefficient to delete |
Definition at line 3805 of file cons_linear.c.
References assert(), consdataInvalidateActivities(), consdataUpdateDelCoef(), consDropEvent(), FALSE, NULL, nvars, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIP_VARTYPE_BINARY, SCIPaddVarToRow(), SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetData(), SCIPconsIsTransformed(), SCIPisZero(), SCIPmarkConsPropagate(), SCIPreleaseVar(), SCIPvarGetType(), TRUE, unlockRounding(), and var.
Referenced by applyFixings(), consdataTightenCoefs(), convertLongEquality(), mergeMultiples(), performVarDeletions(), scaleCons(), SCIPchgCoefLinear(), and simplifyInequalities().
|
static |
changes coefficient value at given position of linear constraint data
scip | SCIP data structure |
cons | linear constraint |
pos | position of coefficient to delete |
newval | new value of coefficient |
Definition at line 3918 of file cons_linear.c.
References assert(), consdataUpdateAddCoef(), consdataUpdateChgCoef(), consdataUpdateDelCoef(), FALSE, i, lockRounding(), NLOCKTYPES, NULL, nvars, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPconsGetData(), SCIPconsIsLockedType(), SCIPconsIsTransformed(), SCIPisNegative(), SCIPisPositive(), SCIPisZero(), SCIPmarkConsPropagate(), SCIPvarIsTransformed(), TRUE, unlockRounding(), and var.
Referenced by consdataTightenCoefs(), mergeMultiples(), rangedRowSimplify(), SCIPchgCoefLinear(), and simplifyInequalities().
|
static |
scales a linear constraint with a constant scalar
scip | SCIP data structure |
cons | linear constraint to scale |
scalar | value to scale constraint with |
Definition at line 4008 of file cons_linear.c.
References assert(), consdataInvalidateActivities(), delCoefPos(), FALSE, i, NULL, REALABS, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPconsGetData(), SCIPconsGetName(), SCIPfeasCeil(), SCIPfeasFloor(), SCIPisInfinity(), SCIPisScalingIntegral(), SCIPisZero(), SCIPvarGetName(), and SCIPwarningMessage().
Referenced by normalizeCons().
|
static |
perform deletion of variables in all constraints of the constraint handler
scip | SCIP data structure |
conshdlr | constraint handler |
conss | array of constraints |
nconss | number of constraints |
Definition at line 4101 of file cons_linear.c.
References assert(), CONSHDLR_NAME, delCoefPos(), FALSE, i, NULL, SCIP_CALL, SCIP_OKAY, SCIPconsGetData(), SCIPconshdlrGetName(), and SCIPvarIsDeleted().
Referenced by SCIP_DECL_CONSDELVARS().
|
static |
normalizes a linear constraint with the following rules:
scip | SCIP data structure |
cons | linear constraint to normalize |
infeasible | pointer to store whether infeasibility was detected |
Definition at line 4160 of file cons_linear.c.
References assert(), consdataCalcMaxAbsval(), consdataCalcMinAbsval(), consdataCheckNonbinvar(), consdataGetMaxAbsval(), consdataGetMinAbsval(), FALSE, i, MAX, MAXSCALEDCOEF, MAXSCALEDCOEFINTEGER, MIN, NULL, nvars, REALABS, scaleCons(), SCIP_Bool, SCIP_CALL, SCIP_INVALID, SCIP_Longint, SCIP_LONGINT_FORMAT, SCIP_OKAY, SCIP_Real, SCIPcalcGreComDiv(), SCIPcalcSmaComMul(), SCIPconsGetData(), SCIPconsIsModifiable(), SCIPdebugMsg, SCIPdebugPrintCons, SCIPepsilon(), SCIPfeastol(), SCIPisEQ(), SCIPisFeasIntegral(), SCIPisFeasZero(), SCIPisGT(), SCIPisInfinity(), SCIPisIntegral(), SCIPisLE(), SCIPisLT(), SCIPisNegative(), SCIPisPositive(), SCIPisZero(), SCIPrealToRational(), and TRUE.
Referenced by aggregateConstraints(), aggregateVariables(), SCIP_DECL_CONSPRESOL(), SCIPupgradeConsLinear(), and simplifyInequalities().
|
static |
replaces multiple occurrences of a variable by a single non-zero coefficient
scip | SCIP data structure |
cons | linear constraint |
Definition at line 4480 of file cons_linear.c.
References assert(), chgCoefPos(), consdataSort(), delCoefPos(), NULL, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPconsGetData(), SCIPisZero(), TRUE, and var.
Referenced by applyFixings(), and SCIPclassifyConstraintTypesLinear().
|
static |
replaces all fixed and aggregated variables by their non-fixed counterparts
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 4543 of file cons_linear.c.
References ABS, addCoef(), assert(), chgLhs(), chgRhs(), consCatchAllEvents(), delCoefPos(), FALSE, i, mergeMultiples(), NULL, nvars, SCIP_Bool, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_Real, SCIP_VARSTATUS_AGGREGATED, SCIP_VARSTATUS_COLUMN, SCIP_VARSTATUS_FIXED, SCIP_VARSTATUS_LOOSE, SCIP_VARSTATUS_MULTAGGR, SCIP_VARSTATUS_NEGATED, SCIP_VARSTATUS_ORIGINAL, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetData(), SCIPconsIsModifiable(), SCIPdebugMsg, SCIPdebugPrintCons, SCIPerrorMessage, SCIPflattenVarAggregationGraph(), SCIPgetProbvarSum(), SCIPinfinity(), SCIPisEQ(), SCIPisFeasGT(), SCIPisFeasLT(), SCIPisGE(), SCIPisInfinity(), SCIProwIsInLP(), SCIProwIsModifiable(), SCIPvarGetMultaggrConstant(), SCIPvarGetMultaggrNVars(), SCIPvarGetMultaggrScalars(), SCIPvarGetMultaggrVars(), SCIPvarGetStatus(), SCIPvarIsActive(), SCIPvarIsTransformed(), TRUE, and var.
Referenced by addRelaxation(), aggregateVariables(), fixVariables(), SCIP_DECL_CONSEXITPRE(), SCIP_DECL_CONSPRESOL(), SCIPcleanupConssLinear(), and tightenBounds().
|
static |
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
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 4808 of file cons_linear.c.
References assert(), consdataGetGlbActivityBounds(), consdataGetGlbActivityResiduals(), consdataGetReliableResidualActivity(), FALSE, i, NULL, nvars, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPaddConflictLb(), SCIPaddConflictUb(), SCIPconsGetData(), SCIPgetVarLbAtIndex(), SCIPgetVarUbAtIndex(), SCIPinfinity(), SCIPisFeasNegative(), SCIPisFeasPositive(), SCIPisInfinity(), SCIPisUpdateUnreliable(), SCIPisZero(), SCIPvarGetLbGlobal(), SCIPvarGetUbGlobal(), SCIPvarIsIntegral(), TRUE, and vars.
Referenced by analyzeConflict(), and resolvePropagation().
|
static |
for each variable in the linear ranged row constraint, except the inferred variable, adds the bounds of all fixed variables to the conflict analysis' candidate store; the conflict analysis can be initialized with the linear constraint being the conflict detecting constraint by using NULL as inferred variable
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, or -1 |
Definition at line 4990 of file cons_linear.c.
References assert(), FALSE, NULL, nvars, SCIP_CALL, SCIP_OKAY, SCIPaddConflictLb(), SCIPaddConflictUb(), SCIPconsGetData(), SCIPgetVarLbAtIndex(), SCIPgetVarUbAtIndex(), SCIPisEQ(), SCIPvarGetLbGlobal(), SCIPvarGetUbGlobal(), and vars.
Referenced by analyzeConflictRangedRow(), and resolvePropagation().
|
static |
add reasoning variables to conflict candidate queue which led to the conflict
scip | SCIP data structure |
vars | variables reasoning the infeasibility |
nvars | number of variables reasoning the infeasibility |
var | variable which was tried to fix/tighten, or NULL |
bound | bound of variable which was tried to apply, or SCIP_INVALID |
Definition at line 5055 of file cons_linear.c.
References assert(), bound, NULL, nvars, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPaddConflictLb(), SCIPaddConflictUb(), SCIPisEQ(), SCIPvarGetLbGlobal(), SCIPvarGetLbLocal(), SCIPvarGetUbGlobal(), SCIPvarGetUbLocal(), var, and vars.
Referenced by analyzeConflictRangedRow().
|
static |
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
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 5106 of file cons_linear.c.
References addConflictBounds(), addConflictFixedVars(), assert(), FALSE, inferInfoGetPos(), inferInfoGetProprule(), NULL, nvars, PROPRULE_1_LHS, PROPRULE_1_RANGEDROW, PROPRULE_1_RHS, PROPRULE_INVALID, result, SCIP_BOUNDTYPE_LOWER, SCIP_BOUNDTYPE_UPPER, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_Real, SCIP_SUCCESS, SCIPconsGetData(), SCIPconsGetName(), SCIPerrorMessage, SCIPinfoMessage(), SCIPisInfinity(), SCIPisZero(), SCIPprintCons(), SCIPvarGetName(), TRUE, and vars.
Referenced by SCIP_DECL_CONSRESPROP().
|
static |
analyzes conflicting bounds on given constraint, and adds conflict constraint to problem
scip | SCIP data structure |
cons | conflict detecting constraint |
reasonisrhs | is the right hand side responsible for the conflict? |
Definition at line 5199 of file cons_linear.c.
References addConflictBounds(), FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_CONFTYPE_PROPAGATION, SCIP_OKAY, SCIP_STAGE_SOLVING, SCIPanalyzeConflictCons(), SCIPgetStage(), SCIPinitConflictAnalysis(), SCIPinProbing(), and SCIPisConflictAnalysisApplicable().
Referenced by propagateCons(), tightenVarBounds(), tightenVarLb(), and tightenVarUb().
check if there is any hope of tightening some bounds
cons | linear constraint |
Definition at line 5223 of file cons_linear.c.
References assert(), FALSE, NULL, SCIP_Bool, SCIPconsGetData(), and TRUE.
Referenced by tightenBounds().
|
static |
tighten upper bound
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 5251 of file cons_linear.c.
References analyzeConflict(), assert(), cutoff, FALSE, getInferInt(), NULL, QUAD_TO_DBL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPadjustedVarUb(), SCIPconsGetData(), SCIPconsGetName(), SCIPdebugMsg, SCIPinferVarUbCons(), SCIPisFeasLE(), SCIPisInfinity(), SCIPisUbBetter(), SCIPvarGetLbLocal(), SCIPvarGetName(), SCIPvarGetType(), SCIPvarGetUbLocal(), TRUE, and var.
Referenced by tightenVarBoundsEasy().
|
static |
tighten lower bound
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 5321 of file cons_linear.c.
References analyzeConflict(), assert(), cutoff, FALSE, getInferInt(), NULL, QUAD_TO_DBL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPadjustedVarLb(), SCIPconsGetData(), SCIPconsGetName(), SCIPdebugMsg, SCIPinferVarLbCons(), SCIPisFeasGE(), SCIPisInfinity(), SCIPisLbBetter(), SCIPvarGetLbLocal(), SCIPvarGetName(), SCIPvarGetType(), SCIPvarGetUbLocal(), TRUE, and var.
Referenced by tightenVarBoundsEasy().
|
static |
tightens bounds of a single variable due to activity bounds (easy case)
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 5391 of file cons_linear.c.
References alpha, assert(), consdataCalcActivities(), consdataRecomputeMaxactivity(), consdataRecomputeMinactivity(), cutoff, FALSE, NULL, nvars, PROPRULE_1_LHS, PROPRULE_1_RHS, QUAD_TO_DBL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIP_VARSTATUS_MULTAGGR, SCIPconsGetData(), SCIPconsGetName(), SCIPconsIsModifiable(), SCIPdebugMsg, SCIPisFeasLT(), SCIPisGT(), SCIPisInfinity(), SCIPisLE(), SCIPisNegative(), SCIPisPositive(), SCIPisSumGT(), SCIPisZero(), SCIPvarGetLbLocal(), SCIPvarGetName(), SCIPvarGetStatus(), SCIPvarGetUbLocal(), tightenVarLb(), tightenVarUb(), TRUE, and var.
Referenced by tightenBounds().
|
static |
analyzes conflicting bounds on given ranged row constraint, and adds conflict constraint to problem
scip | SCIP data structure |
cons | conflict detecting constraint |
vars | variables reasoning the infeasibility |
nvars | number of variables reasoning the infeasibility |
var | variable which was tried to fix/tighten, or NULL |
bound | bound of variable which was tried to apply, or SCIP_INVALID |
Definition at line 5668 of file cons_linear.c.
References addConflictFixedVars(), addConflictReasonVars(), assert(), bound, FALSE, NULL, nvars, SCIP_CALL, SCIP_CONFTYPE_PROPAGATION, SCIP_OKAY, SCIP_Real, SCIP_STAGE_SOLVING, SCIPanalyzeConflictCons(), SCIPconsGetData(), SCIPgetStage(), SCIPinitConflictAnalysis(), SCIPinProbing(), SCIPisConflictAnalysisApplicable(), SCIPisInfinity(), var, and vars.
Referenced by rangedRowPropagation().
|
static |
propagate ranged rows
Check ranged rows for possible solutions, possibly detect infeasibility, fix variables due to having only one possible solution, tighten bounds if having only two possible solutions or add constraints which propagate a subset of variables better.
Example: c1: 12 x1 + 9 x2 - x3 = 0 with x1, x2 free and 1 <= x3 <= 2
x3 needs to be a multiple of 3, so the instance is infeasible.
Example: c1: 12 x1 + 9 x2 - x3 = 1 with x1, x2 free and 1 <= x3 <= 2
The only possible value for x3 is 2, so the variable will be fixed.
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 |
nchgbds | pointer to count the number of bound changes |
naddconss | pointer to count number of added constraints |
Definition at line 5726 of file cons_linear.c.
References analyzeConflictRangedRow(), assert(), bound, cutoff, FALSE, getInferInt(), NULL, nvars, PROPRULE_1_RANGEDROW, REALABS, SCIP_Bool, SCIP_CALL, SCIP_INVALID, SCIP_Longint, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_Real, SCIP_REAL_MAX, SCIP_VARTYPE_CONTINUOUS, SCIPaddConsLocal(), SCIPallocBufferArray, SCIPcalcGreComDiv(), SCIPceil(), SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconsGetName(), SCIPconshdlrGetData(), SCIPconsIsModifiable(), SCIPcreateConsLinear(), SCIPdebugMsg, SCIPdebugPrintCons, SCIPfeastol(), SCIPfloor(), SCIPfreeBufferArray, SCIPgetDepth(), SCIPinferVarFixCons(), SCIPinferVarLbCons(), SCIPinferVarUbCons(), SCIPinfinity(), SCIPinProbing(), SCIPinRepropagation(), SCIPisEQ(), SCIPisGE(), SCIPisGT(), SCIPisHugeValue(), SCIPisInfinity(), SCIPisIntegral(), SCIPisLE(), SCIPisLT(), SCIPisZero(), SCIPreleaseCons(), SCIPsnprintf(), SCIPvarGetLbLocal(), SCIPvarGetName(), SCIPvarGetType(), SCIPvarGetUbLocal(), SCIPvarIsBinary(), SCIPvarIsIntegral(), TRUE, vars, and w.
Referenced by propagateCons(), and SCIP_DECL_CONSPRESOL().
|
static |
tightens bounds of a single variable due to activity bounds
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 6711 of file cons_linear.c.
References ABS, analyzeConflict(), assert(), consdataGetActivityResiduals(), consdataGetReliableResidualActivity(), cutoff, FALSE, getInferInt(), NULL, nvars, PROPRULE_1_LHS, PROPRULE_1_RHS, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIP_VARSTATUS_MULTAGGR, SCIPconsGetData(), SCIPconsGetName(), SCIPconsIsModifiable(), SCIPdebugMsg, SCIPinferVarLbCons(), SCIPinferVarUbCons(), SCIPisEQ(), SCIPisFeasGE(), SCIPisFeasGT(), SCIPisFeasLE(), SCIPisFeasLT(), SCIPisGT(), SCIPisInfinity(), SCIPisLbBetter(), SCIPisLE(), SCIPisLT(), SCIPisUbBetter(), SCIPisUpdateUnreliable(), SCIPisZero(), SCIPvarGetLbLocal(), SCIPvarGetName(), SCIPvarGetStatus(), SCIPvarGetUbLocal(), SCIPvarIsIntegral(), TRUE, and var.
Referenced by tightenBounds().
|
static |
tightens bounds of variables in constraint due to activity bounds
scip | SCIP data structure |
cons | linear constraint |
maxeasyactivitydelta | maximum activity delta to run easy propagation on 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 6991 of file cons_linear.c.
References applyFixings(), assert(), canTightenBounds(), checkMaxActivityDelta, consdataGetActivityBounds(), consdataRecomputeMaxActivityDelta(), consdataSort(), cutoff, FALSE, MAXTIGHTENROUNDS, MIN, nbinvars, NULL, nvars, SCIP_Bool, SCIP_CALL, SCIP_INVALID, SCIP_OKAY, SCIP_Real, SCIP_STAGE_INITSOLVE, SCIPconsGetData(), SCIPconsGetName(), SCIPconsIsModifiable(), SCIPdebugMessage, SCIPgetDepth(), SCIPgetStage(), SCIPinfinity(), SCIPisEQ(), SCIPisFeasEQ(), SCIPisFeasNegative(), SCIPisFeasZero(), SCIPisInfinity(), SCIPisLE(), SCIPisLT(), SCIPvarGetLbLocal(), SCIPvarGetUbLocal(), tightenVarBounds(), and tightenVarBoundsEasy().
Referenced by extractCliques(), propagateCons(), and SCIP_DECL_CONSPRESOL().
|
static |
checks linear constraint for feasibility of given solution or current solution
scip | SCIP data structure |
cons | linear constraint |
sol | solution to be checked, or NULL for current solution |
checklprows | Do constraints represented by rows in the current LP have to be checked? |
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 7169 of file cons_linear.c.
References assert(), consdataComputePseudoActivity(), consdataGetActivity(), consPrintConsSol(), FALSE, MAX, NULL, REALABS, SCIP_Bool, SCIP_CALL, SCIP_INVALID, SCIP_OKAY, SCIP_Real, SCIPconsGetData(), SCIPconsGetName(), SCIPdebug, SCIPdebugMsg, SCIPdebugPrintCons, SCIPfeastol(), SCIPgetRowSolActivity(), SCIPgetSolVal(), SCIPhasCurrentNodeLP(), SCIPincConsAge(), SCIPisFeasGT(), SCIPisFeasLT(), SCIPisGT(), SCIPisInfinity(), SCIPisZero(), SCIPrelDiff(), SCIPresetConsAge(), SCIProwIsInLP(), SCIPupdateSolLPConsViolation(), sol, and TRUE.
Referenced by enforceConstraint(), SCIP_DECL_CONSCHECK(), SCIP_DECL_CONSENFOPS(), and separateCons().
|
static |
creates an LP row in a linear constraint data
scip | SCIP data structure |
cons | linear constraint |
Definition at line 7429 of file cons_linear.c.
References assert(), NULL, SCIP_CALL, SCIP_OKAY, SCIPaddVarsToRow(), SCIPconsGetData(), SCIPconsGetName(), SCIPconsIsLocal(), SCIPconsIsModifiable(), SCIPconsIsRemovable(), and SCIPcreateEmptyRowCons().
Referenced by addRelaxation().
|
static |
adds linear constraint as cut to the LP
scip | SCIP data structure |
cons | linear constraint |
cutoff | pointer to store whether a cutoff was found |
Definition at line 7453 of file cons_linear.c.
References applyFixings(), assert(), createRow(), cutoff, FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPaddRow(), SCIPconsGetData(), SCIPconsGetName(), SCIPconsIsModifiable(), SCIPdebug, SCIPdebugMsg, SCIPgetIntParam(), SCIPisInfinity(), SCIPprintRow(), and SCIProwIsInLP().
Referenced by enforceConstraint(), SCIP_DECL_CONSINITLP(), and separateCons().
|
static |
adds linear constraint as row to the NLP, if not added yet
scip | SCIP data structure |
cons | linear constraint |
Definition at line 7516 of file cons_linear.c.
References assert(), NULL, SCIP_CALL, SCIP_EXPRCURV_LINEAR, SCIP_OKAY, SCIPaddNlRow(), SCIPconsGetData(), SCIPconsGetName(), SCIPconsIsActive(), SCIPconsIsChecked(), SCIPconsIsLocal(), SCIPcreateNlRow(), SCIPisNLPConstructed(), and SCIPnlrowIsInNLP().
Referenced by SCIP_DECL_CONSACTIVE(), and SCIP_DECL_CONSINITSOL().
|
static |
separates linear constraint: adds linear constraint as cut, if violated by given solution
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 7552 of file cons_linear.c.
References addRelaxation(), assert(), checkCons(), cutoff, FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPconsGetData(), SCIPconsIsModifiable(), SCIPisFeasNegative(), SCIPisFeasPositive(), SCIPisInfinity(), SCIPresetConsAge(), SCIProwGetDualsol(), SCIProwIsInLP(), SCIPseparateRelaxedKnapsack(), and sol.
Referenced by SCIP_DECL_CONSSEPALP(), and SCIP_DECL_CONSSEPASOL().
|
static |
propagation method for linear constraints
scip | SCIP data structure |
cons | linear constraint |
tightenbounds | should the variable's bounds be tightened? |
rangedrowpropagation | should ranged row propagation be performed? |
maxeasyactivitydelta | maximum activity delta to run easy propagation on linear constraint |
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 7642 of file cons_linear.c.
References analyzeConflict(), assert(), consCatchAllEvents(), consdataGetActivityBounds(), cutoff, FALSE, NULL, rangedRowPropagation(), SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconsGetName(), SCIPconshdlrGetData(), SCIPconsIsModifiable(), SCIPdebug, SCIPdebugMsg, SCIPdelCons(), SCIPdelConsLocal(), SCIPincConsAge(), SCIPinRepropagation(), SCIPisFeasGT(), SCIPisFeasLT(), SCIPisGE(), SCIPisLE(), SCIPresetConsAge(), tightenBounds(), and TRUE.
Referenced by SCIP_DECL_CONSPROP().
|
static |
converts all variables with fixed domain into FIXED variables
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 7790 of file cons_linear.c.
References applyFixings(), assert(), cutoff, MAXDNOM, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIP_VARSTATUS_FIXED, SCIPconsGetData(), SCIPdebugMsg, SCIPfixVar(), SCIPisEQ(), SCIPselectSimpleValue(), SCIPvarGetLbGlobal(), SCIPvarGetName(), SCIPvarGetStatus(), SCIPvarGetUbGlobal(), TRUE, and var.
Referenced by extractCliques(), and SCIP_DECL_CONSPRESOL().
|
static |
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
scip | SCIP data structure |
cons | linear constraint |
maxeasyactivitydelta | maximum activity delta to run easy propagation on 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 7925 of file cons_linear.c.
References assert(), BMSclearMemoryArray, consdataCalcActivities(), consdataRecomputeGlbMaxactivity(), consdataRecomputeGlbMinactivity(), consdataSort(), cutoff, FALSE, fixVariables(), i, MAX_CLIQUE_NONZEROS_PER_CONS, NULL, nvars, QUAD_TO_DBL, REALABS, SCIP_Bool, SCIP_BOUNDTYPE_LOWER, SCIP_BOUNDTYPE_UPPER, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIP_VARTYPE_BINARY, SCIP_VARTYPE_CONTINUOUS, SCIPaddClique(), SCIPaddVarImplication(), SCIPallocBufferArray, SCIPconsGetData(), SCIPconsGetName(), SCIPconsIsDeleted(), SCIPdebugMsg, SCIPduplicateBufferArray, SCIPfreeBufferArray, SCIPisEQ(), SCIPisFeasGE(), SCIPisFeasGT(), SCIPisFeasLE(), SCIPisFeasLT(), SCIPisInfinity(), SCIPisPositive(), SCIPisZero(), SCIPsortDownRealPtr(), SCIPvarGetLbGlobal(), SCIPvarGetType(), SCIPvarGetUbGlobal(), SCIPvarIsBinary(), tightenBounds(), TRUE, and vars.
Referenced by SCIP_DECL_CONSPRESOL().
|
static |
tightens left and right hand side of constraint due to integrality
scip | SCIP data structure |
cons | linear constraint |
nchgsides | pointer to count number of side changes |
infeasible | pointer to store whether infeasibility was detected |
Definition at line 8898 of file cons_linear.c.
References assert(), chgLhs(), chgRhs(), FALSE, i, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIP_VARTYPE_CONTINUOUS, SCIPconsGetData(), SCIPconsGetName(), SCIPdebugMsg, SCIPfeasCeil(), SCIPfeasFloor(), SCIPinfinity(), SCIPisGT(), SCIPisInfinity(), SCIPisIntegral(), SCIPvarGetType(), and TRUE.
Referenced by SCIP_DECL_CONSPRESOL(), and SCIPupgradeConsLinear().
|
static |
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: (**)
We further try to remove variables from the constraint; Variables which fulfill conditions (**) or (***) are called relevant 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 relevant 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.
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 9020 of file cons_linear.c.
References assert(), chgCoefPos(), chgLhs(), chgRhs(), consdataGetActivityBounds(), consdataRecomputeMaxactivity(), consdataRecomputeMinactivity(), delCoefPos(), i, MAX3, MAXVALRECOMP, MIN3, MINVALRECOMP, NULL, nvars, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIP_VARTYPE_CONTINUOUS, SCIPallocBufferArray, SCIPconsGetData(), SCIPconsGetName(), SCIPdebugMsg, SCIPfreeBufferArray, SCIPinfinity(), SCIPisEQ(), SCIPisFeasGT(), SCIPisFeasLT(), SCIPisGE(), SCIPisGT(), SCIPisInfinity(), SCIPisLE(), SCIPisLT(), SCIPisSumRelEQ(), SCIPisSumRelGE(), SCIPisSumRelLE(), SCIPisZero(), SCIPvarGetLbLocal(), SCIPvarGetName(), SCIPvarGetType(), SCIPvarGetUbLocal(), TRUE, and var.
Referenced by SCIP_DECL_CONSPRESOL().
|
static |
processes equality with only one variable by fixing the variable and deleting the constraint
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 9440 of file cons_linear.c.
References assert(), cutoff, MAXDNOM, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPconsGetData(), SCIPconsGetName(), SCIPdebugMsg, SCIPdelCons(), SCIPepsilon(), SCIPfixVar(), SCIPisEQ(), SCIPisZero(), SCIPselectSimpleValue(), SCIPvarGetName(), TRUE, and var.
Referenced by convertEquality().
|
static |
processes equality with exactly two variables by aggregating one of the variables and deleting the constraint
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 9496 of file cons_linear.c.
References assert(), cutoff, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPaggregateVars(), SCIPconsGetData(), SCIPconsGetName(), SCIPdebugMsg, SCIPdelCons(), SCIPisEQ(), SCIPvarGetName(), and TRUE.
Referenced by convertEquality().
|
static |
calculates the new lhs and rhs of the constraint after the given variable is aggregated out
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 9554 of file cons_linear.c.
References assert(), NULL, SCIP_Real, SCIPinfinity(), SCIPisInfinity(), SCIPisLE(), SCIPvarGetLbGlobal(), and SCIPvarGetUbGlobal().
Referenced by convertLongEquality().
|
static |
processes equality with more than two variables by multi-aggregating one of the variables and converting the equality into an inequality; if multi-aggregation is not possible, tries to identify one continuous or integer variable that is implicitly integral by this constraint
scip | SCIP data structure |
conshdlrdata | linear constraint handler data |
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 |
nchgvartypes | pointer to count number of changed variable types |
Definition at line 9608 of file cons_linear.c.
References assert(), chgLhs(), chgRhs(), consdataGetActivityResiduals(), consdataGetReliableResidualActivity(), cutoff, delCoefPos(), FALSE, getNewSidesAfterAggregation(), nintvars, NULL, nvars, REALABS, scalars, SCIP_Bool, SCIP_CALL, SCIP_LOCKTYPE_MODEL, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_Real, SCIP_VARTYPE_BINARY, SCIP_VARTYPE_CONTINUOUS, SCIP_VARTYPE_IMPLINT, SCIP_VARTYPE_INTEGER, SCIPaddVar(), SCIPaggregateVars(), SCIPallocBufferArray, SCIPchgVarType(), SCIPconsGetData(), SCIPconsGetName(), SCIPconsIsChecked(), SCIPcreateVar(), SCIPdebugAddSolVal, SCIPdebugGetSolVal, SCIPdebugMsg, SCIPdebugMsgPrint, SCIPdebugPrintCons, SCIPdelCons(), SCIPdoNotAggr(), SCIPdoNotMultaggrVar(), SCIPfreeBufferArray, SCIPinfinity(), SCIPisEQ(), SCIPisFeasIntegral(), SCIPisFeasLE(), SCIPisGE(), SCIPisGT(), SCIPisHugeValue(), SCIPisInfinity(), SCIPisIntegral(), SCIPisLE(), SCIPisNegative(), SCIPisPositive(), SCIPisUpdateUnreliable(), SCIPisZero(), SCIPmultiaggregateVar(), SCIPreleaseVar(), SCIPsnprintf(), SCIPvarGetLbGlobal(), SCIPvarGetName(), SCIPvarGetNLocksDownType(), SCIPvarGetNLocksUpType(), SCIPvarGetType(), SCIPvarGetUbGlobal(), SCIPvarIsActive(), SCIPvarIsBinary(), SCIPvarIsInitial(), SCIPvarIsRemovable(), TRUE, var, and vars.
Referenced by convertEquality().
|
static |
checks if the given variables and their coefficient are equal (w.r.t. scaling factor) to the objective function
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 10154 of file cons_linear.c.
References assert(), FALSE, NULL, nvars, objval, SCIP_Bool, SCIP_Real, SCIPisEQ(), SCIPisZero(), SCIPvarGetNegatedVar(), SCIPvarGetObj(), SCIPvarIsNegated(), TRUE, var, and vars.
Referenced by checkParallelObjective(), and checkPartialObjective().
|
static |
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
scip | SCIP data structure |
cons | linear equation constraint |
conshdlrdata | linear constraint handler data |
Definition at line 10232 of file cons_linear.c.
References assert(), checkEqualObjective(), NULL, nvars, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPaddObjoffset(), SCIPchgVarObj(), SCIPconsGetData(), SCIPconsGetName(), SCIPdebugMsg, SCIPgetNObjVars(), SCIPisEQ(), SCIPsetConsChecked(), SCIPsetConsEnforced(), TRUE, and vars.
Referenced by convertEquality().
|
static |
updates the cutoff if the given primal bound (which is implied by the given constraint) is better
scip | SCIP data structure |
cons | constraint |
primalbound | feasible primal bound |
Definition at line 10303 of file cons_linear.c.
References assert(), FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPconsGetData(), SCIPcutoffbounddelta(), SCIPdebugMsg, SCIPgetCutoffbound(), SCIPisInfinity(), SCIPsetConsEnforced(), SCIPsetConsPropagated(), and SCIPupdateCutoffbound().
Referenced by checkParallelObjective().
|
static |
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
scip | SCIP data structure |
cons | linear constraint |
conshdlrdata | linear constraint handler data |
Definition at line 10349 of file cons_linear.c.
References assert(), checkEqualObjective(), FALSE, NULL, nvars, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPconsGetData(), SCIPconsGetName(), SCIPconsIsInitial(), SCIPconsIsSeparated(), SCIPdebugMsg, SCIPgetNObjVars(), SCIPisEQ(), SCIPisInfinity(), SCIPsetConsInitial(), SCIPsetConsSeparated(), SCIPupdateLocalLowerbound(), and updateCutoffbound().
Referenced by SCIP_DECL_CONSPRESOL().
|
static |
converts special equalities
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 |
nchgvartypes | pointer to count number of changed variable types |
Definition at line 10476 of file cons_linear.c.
References assert(), checkPartialObjective(), convertBinaryEquality(), convertLongEquality(), convertUnaryEquality(), cutoff, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPconsGetData(), and SCIPisEQ().
Referenced by SCIP_DECL_CONSPRESOL().
|
static |
returns whether the linear sum of all variables/coefficients except the given one divided by the given value is always integral
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 10532 of file cons_linear.c.
References assert(), FALSE, NULL, nvars, SCIP_Bool, SCIP_Real, SCIPisIntegral(), SCIPvarIsIntegral(), and TRUE.
Referenced by dualPresolve().
|
static |
check if \(lhs/a_i - \sum_{j \neq i} a_j/a_i x_j\) is always inside the bounds of \(x_i\), check if \(rhs/a_i - \sum_{j \neq i} a_j/a_i x_j\) is always inside the bounds of \(x_i\)
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 10558 of file cons_linear.c.
References ABS, assert(), NULL, SCIP_Real, and SCIPisInfinity().
Referenced by dualPresolve().
|
static |
applies dual presolving for variables that are locked only once in a direction, and this locking is due to a linear inequality
scip | SCIP data structure |
conshdlrdata | linear constraint handler data |
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 |
nchgvartypes | pointer to count number of changed variable types |
Definition at line 10603 of file cons_linear.c.
References assert(), calculateMinvalAndMaxval(), consdataGetActivityResiduals(), consdataGetReliableResidualActivity(), consdataIsResidualIntegral(), cutoff, FALSE, i, NULL, obj, REALABS, SCIP_Bool, SCIP_CALL, SCIP_LOCKTYPE_MODEL, SCIP_OKAY, SCIP_Real, SCIP_VARTYPE_BINARY, SCIP_VARTYPE_IMPLINT, SCIP_VARTYPE_INTEGER, SCIPallocBufferArray, SCIPchgVarType(), SCIPconsGetData(), SCIPconsGetName(), SCIPconsIsChecked(), SCIPdebugMsg, SCIPdebugMsgPrint, SCIPdebugPrintCons, SCIPdelCons(), SCIPdoNotMultaggrVar(), SCIPepsilon(), SCIPfloor(), SCIPfreeBufferArray, SCIPinfinity(), SCIPisEQ(), SCIPisFeasGE(), SCIPisFeasLE(), SCIPisInfinity(), SCIPisIntegral(), SCIPisLE(), SCIPisNegative(), SCIPisPositive(), SCIPisUpdateUnreliable(), SCIPmultiaggregateVar(), SCIPvarGetLbGlobal(), SCIPvarGetName(), SCIPvarGetNLocksDownType(), SCIPvarGetNLocksUpType(), SCIPvarGetObj(), SCIPvarGetType(), SCIPvarGetUbGlobal(), SCIPvarIsBinary(), TRUE, and var.
Referenced by SCIP_DECL_CONSPRESOL().
|
static |
gets weight for variable in a "weighted number of variables" sum
var | variable to get weight for |
Definition at line 11086 of file cons_linear.c.
References BINWEIGHT, CONTWEIGHT, INTWEIGHT, SCIP_VARTYPE_BINARY, SCIP_VARTYPE_CONTINUOUS, SCIP_VARTYPE_IMPLINT, SCIP_VARTYPE_INTEGER, SCIPABORT, SCIPerrorMessage, SCIPvarGetType(), and var.
Referenced by aggregateConstraints(), and preprocessConstraintPairs().
|
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:
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 |
Definition at line 11119 of file cons_linear.c.
References ABS, applyFixings(), assert(), cutoff, FALSE, normalizeCons(), NULL, nvars, SCIP_Bool, SCIP_CALL, SCIP_Longint, SCIP_OKAY, SCIP_Real, SCIP_VARTYPE_CONTINUOUS, SCIPaggregateVars(), SCIPconsGetData(), SCIPconsGetName(), SCIPdebugMsg, SCIPfeasFloor(), SCIPfixVar(), SCIPisEQ(), SCIPisInfinity(), SCIPisIntegral(), SCIPvarGetName(), SCIPvarGetType(), SCIPvarIsBinary(), TRUE, and vars.
Referenced by SCIP_DECL_CONSPRESOL(), and SCIP_DECL_CONSPRESOL().
|
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 11290 of file cons_linear.c.
References assert(), NULL, nvars, REALABS, SCIP_Real, SCIP_VARTYPE_CONTINUOUS, and SCIPvarGetType().
|
static |
tries to simplify coefficients in ranged row of the form lhs <= a^Tx <= rhs
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 11329 of file cons_linear.c.
References assert(), chgCoefPos(), chgLhs(), chgRhs(), NULL, nvars, SCIP_CALL, SCIP_INVALID, SCIP_OKAY, SCIP_Real, SCIPconsGetData(), SCIPconsIsDeleted(), SCIPconsIsModifiable(), SCIPisGE(), SCIPisGT(), SCIPisInfinity(), SCIPisLE(), SCIPisLT(), SCIPisNegative(), SCIPisPositive(), SCIPvarIsBinary(), and vars.
Referenced by simplifyInequalities().
|
static |
tries to simplify coefficients and delete variables in constraints of the form lhs <= a^Tx <= rhs
for both-sided constraints only
for one-sided constraints 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
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 |
infeasible | pointer to store whether infeasibility was detected |
Definition at line 11441 of file cons_linear.c.
References assert(), checkMaxActivityDelta, chgCoefPos(), chgLhs(), chgRhs(), consdataGetGlbActivityBounds(), consdataRecomputeMaxActivityDelta(), delCoefPos(), FALSE, frac, MAXACTVAL, normalizeCons(), NULL, nvars, permSortConsdata(), rangedRowSimplify(), REALABS, SCIP_Bool, SCIP_CALL, SCIP_INVALID, SCIP_Longint, SCIP_LONGINT_FORMAT, SCIP_OKAY, SCIP_Real, SCIP_VARTYPE_CONTINUOUS, SCIPallocBufferArray, SCIPcalcGreComDiv(), SCIPceil(), SCIPconsGetData(), SCIPconsGetName(), SCIPconsIsDeleted(), SCIPconsIsModifiable(), SCIPdebug, SCIPdebugMsg, SCIPdebugPrintCons, SCIPfeasCeil(), SCIPfeasFloor(), SCIPfeastol(), SCIPfloor(), SCIPfreeBufferArray, SCIPisEQ(), SCIPisFeasEQ(), SCIPisFeasGE(), SCIPisFeasGT(), SCIPisFeasIntegral(), SCIPisFeasLE(), SCIPisFeasLT(), SCIPisFeasNegative(), SCIPisFeasZero(), SCIPisGE(), SCIPisGT(), SCIPisInfinity(), SCIPisIntegral(), SCIPisLT(), SCIPisNegative(), SCIPisZero(), SCIPsort(), SCIPvarGetLbGlobal(), SCIPvarGetName(), SCIPvarGetType(), SCIPvarGetUbGlobal(), SCIPvarIsBinary(), TRUE, vars, and w.
Referenced by SCIP_DECL_CONSPRESOL().
|
static |
tries to aggregate an (in)equality and an equality in order to decrease the number of variables in the (in)equality: cons0 := a * cons0 + b * cons1, where a = val1[v] and b = -val0[v] for common variable v which removes most variable weight; for numerical stability, we will only accept integral a and b; the variable weight is a weighted sum over all included variables, where each binary variable weighs BINWEIGHT, each integer or implicit integer variable weighs INTWEIGHT and each continuous variable weighs CONTWEIGHT
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 |
infeasible | pointer to store whether infeasibility was detected |
Definition at line 12677 of file cons_linear.c.
References a, assert(), b, consdataGetMaxAbsval(), FALSE, getVarWeight(), i, normalizeCons(), NULL, nvars, 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(), SCIPdebug, SCIPdebugMsg, SCIPdebugPrintCons, SCIPdelCons(), SCIPfreeBufferArray, SCIPinfinity(), SCIPisEQ(), SCIPisInfinity(), SCIPisIntegral(), SCIPisLE(), SCIPisPositive(), SCIPisZero(), SCIPreleaseCons(), and TRUE.
Referenced by preprocessConstraintPairs().
|
static |
gets the key of the given element
Definition at line 12996 of file cons_linear.c.
|
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 13006 of file cons_linear.c.
References assert(), consdataGetMaxAbsval(), FALSE, i, NULL, SCIP_Real, SCIPconsGetData(), SCIPinfinity(), SCIPisLT(), SCIPswapPointers(), SCIPvarCompare(), and TRUE.
|
static |
returns the hash value of the key
Definition at line 13080 of file cons_linear.c.
References assert(), NULL, SCIPconsGetData(), SCIPhashFour, and SCIPvarGetIndex().
|
static |
returns the key for deciding which of two parallel constraints should be kept (smaller key should be kept); prefers non-upgraded constraints and as second criterion the constraint with the smallest position
cons | linear constraint |
Definition at line 13112 of file cons_linear.c.
References assert(), NULL, SCIPconsGetData(), and SCIPconsGetPos().
Referenced by retrieveParallelConstraints().
|
static |
updates the hashtable such that out of all constraints in the hashtable that are detected to be parallel to *querycons, only one is kept in the hashtable and stored into *querycons, and all others are removed from the hashtable and stored in the given array
hashtable | hashtable containing linear constraints |
querycons | pointer to linear constraint used to look for duplicates in the hash table; upon return will contain the constraint that should be kept |
parallelconss | array to return constraints that are parallel to the given; these constraints where removed from the hashtable |
nparallelconss | pointer to return number of parallel constraints |
Definition at line 13131 of file cons_linear.c.
References getParallelConsKey(), NULL, SCIP_CALL, SCIP_CALL_ABORT, SCIP_OKAY, SCIPhashtableInsert(), SCIPhashtableRemove(), SCIPhashtableRetrieve(), and SCIPhashtableSafeInsert().
Referenced by detectRedundantConstraints().
|
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
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 13192 of file cons_linear.c.
References assert(), c, chgLhs(), chgRhs(), consdataSort(), COPYSIGN, cutoff, i, MAX, MIN, NULL, retrieveParallelConstraints(), SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPconsGetData(), SCIPconsGetName(), SCIPconsGetNUpgradeLocks(), SCIPconsGetPos(), SCIPconsIsActive(), SCIPconsIsModifiable(), SCIPdebugMsg, SCIPdebugPrintCons, SCIPdelCons(), SCIPfreeBufferArray, SCIPgetMessagehdlr(), SCIPhashtableCreate(), SCIPhashtableFree(), SCIPhashtablePrintStatistics(), SCIPinfoMessage(), SCIPisEQ(), SCIPisFeasLT(), SCIPisInfinity(), SCIPisStopped(), SCIPupdateConsFlags(), and TRUE.
Referenced by SCIP_DECL_CONSPRESOL().
|
static |
compares constraint with all prior constraints for possible redundancy or aggregation, and removes or changes constraint accordingly
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 13396 of file cons_linear.c.
References aggregateConstraints(), assert(), c, chgLhs(), chgRhs(), consdataCalcSignatures(), consdataSort(), cutoff, FALSE, getVarWeight(), MAX, MIN, NULL, nvars, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPABORT, SCIPallocBufferArray, SCIPconsGetData(), SCIPconsGetName(), SCIPconsIsActive(), SCIPconsIsModifiable(), SCIPdebugMsg, SCIPdebugPrintCons, SCIPdelCons(), SCIPerrorMessage, SCIPfreeBufferArray, SCIPinfinity(), SCIPisEQ(), SCIPisFeasGT(), SCIPisFeasLT(), SCIPisGE(), SCIPisGT(), SCIPisInfinity(), SCIPisLE(), SCIPisLT(), SCIPisNegative(), SCIPisPositive(), SCIPreallocBufferArray, SCIPupdateConsFlags(), SCIPvarCompare(), SCIPvarGetLbGlobal(), SCIPvarGetUbGlobal(), TRUE, and var.
Referenced by SCIP_DECL_CONSPRESOL().
|
static |
do stuffing presolving on a single constraint
scip | SCIP data structure |
cons | linear constraint |
singletonstuffing | should stuffing of singleton continuous variables be performed? |
singlevarstuffing | should single variable stuffing be performed, which tries to fulfill constraints using the cheapest variable? |
cutoff | pointer to store TRUE, if a cutoff was found |
nfixedvars | pointer to count the total number of fixed variables |
nchgbds | pointer to count the total number of tightened bounds |
Definition at line 14000 of file cons_linear.c.
References assert(), consdataGetActivityBounds(), cutoff, FALSE, NULL, nvars, obj, REALABS, SCIP_Bool, SCIP_CALL, SCIP_INVALID, SCIP_LOCKTYPE_MODEL, SCIP_OKAY, SCIP_Real, SCIP_VARTYPE_CONTINUOUS, SCIPallocBufferArray, SCIPceil(), SCIPconsGetData(), SCIPconsGetName(), SCIPdebug, SCIPdebugMsg, SCIPfixVar(), SCIPfloor(), SCIPfreeBufferArray, SCIPinfinity(), SCIPisEQ(), SCIPisGT(), SCIPisInfinity(), SCIPisIntegral(), SCIPisLE(), SCIPisNegative(), SCIPisPositive(), SCIPisZero(), SCIPsortRealInt(), SCIPtightenVarLb(), SCIPtightenVarUb(), SCIPvarGetLbGlobal(), SCIPvarGetName(), SCIPvarGetNLocksDownType(), SCIPvarGetNLocksUpType(), SCIPvarGetObj(), SCIPvarGetType(), SCIPvarGetUbGlobal(), TRUE, var, and vars.
Referenced by SCIP_DECL_CONSPRESOL().
|
static |
applies full dual presolving on variables that only appear in linear constraints
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 |
nchgvartypes | pointer to count the number of variable type changes |
Definition at line 14591 of file cons_linear.c.
References assert(), BMSclearMemoryArray, c, consdataGetGlbActivityResiduals(), consdataGetReliableResidualActivity(), cutoff, FALSE, i, MAX, MIN, nbinvars, nintvars, NULL, nvars, obj, REALABS, SCIP_Bool, SCIP_CALL, SCIP_LOCKTYPE_MODEL, SCIP_OKAY, SCIP_Real, SCIP_VARTYPE_BINARY, SCIP_VARTYPE_CONTINUOUS, SCIP_VARTYPE_IMPLINT, SCIPallocBufferArray, SCIPceil(), SCIPchgVarType(), SCIPconsGetData(), SCIPconsGetNLocksNeg(), SCIPconsGetNLocksPos(), SCIPconsIsLocked(), SCIPconsIsModifiable(), SCIPdebugMsg, SCIPduplicateBufferArray, SCIPfloor(), SCIPfreeBufferArray, SCIPgetNBinVars(), SCIPgetNContVars(), SCIPgetNVars(), SCIPgetVars(), SCIPinfinity(), SCIPinProbing(), SCIPisEQ(), SCIPisHugeValue(), SCIPisInfinity(), SCIPisIntegral(), SCIPisNegative(), SCIPisPositive(), SCIPisUpdateUnreliable(), SCIPisZero(), SCIPtightenVarLb(), SCIPtightenVarUb(), SCIPvarGetLbGlobal(), SCIPvarGetName(), SCIPvarGetNLocksDownType(), SCIPvarGetNLocksUpType(), SCIPvarGetObj(), SCIPvarGetProbindex(), SCIPvarGetType(), SCIPvarGetUbGlobal(), SCIPvarIsBinary(), SCIPvarIsIntegral(), TRUE, var, and vars.
Referenced by SCIP_DECL_CONSPRESOL().
|
static |
helper function to enforce constraints
scip | SCIP data structure |
conshdlr | constraint handler |
conss | constraints to process |
nconss | number of constraints |
nusefulconss | number of useful (non-obsolete) constraints to process |
sol | solution to enforce (NULL for the LP solution) |
result | pointer to store the result of the enforcing call |
Definition at line 15061 of file cons_linear.c.
References addRelaxation(), assert(), c, checkCons(), CONSHDLR_NAME, cutoff, FALSE, NULL, result, SCIP_Bool, SCIP_CALL, SCIP_CUTOFF, SCIP_FEASIBLE, SCIP_OKAY, SCIP_SEPARATED, SCIPconshdlrGetData(), SCIPconshdlrGetName(), SCIPdebugMsg, and sol.
Referenced by SCIP_DECL_CONSENFOLP(), and SCIP_DECL_CONSENFORELAX().
|
static |
adds symmetry information of constraint to a symmetry detection graph
scip | SCIP pointer |
symtype | type of symmetries that need to be added |
cons | constraint |
graph | symmetry detection graph |
success | pointer to store whether symmetry information could be added |
Definition at line 15133 of file cons_linear.c.
References assert(), i, NULL, nvars, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPconsGetData(), SCIPextendPermsymDetectionGraphLinear(), SCIPfreeBufferArray, SCIPgetNVars(), SCIPgetSymActiveVariables(), SCIPisInfinity(), SCIPisTransformed(), and vars.
Referenced by SCIP_DECL_CONSGETPERMSYMGRAPH(), and SCIP_DECL_CONSGETSIGNEDPERMSYMGRAPH().
|
static |
copy method for constraint handler plugins (called when SCIP copies plugins)
Definition at line 15206 of file cons_linear.c.
References assert(), CONSHDLR_NAME, NULL, SCIP_CALL, SCIP_OKAY, SCIPconshdlrGetName(), SCIPincludeConshdlrLinear(), TRUE, and valid.
|
static |
destructor of constraint handler to free constraint handler data (called when SCIP is exiting)
Definition at line 15222 of file cons_linear.c.
References assert(), CONSHDLR_NAME, conshdlrdataFree(), NULL, SCIP_OKAY, SCIPconshdlrGetData(), SCIPconshdlrGetName(), and SCIPconshdlrSetData().
|
static |
initialization method of constraint handler (called after problem was transformed)
Definition at line 15244 of file cons_linear.c.
References assert(), c, consCatchAllEvents(), NULL, SCIP_CALL, SCIP_OKAY, and SCIPconshdlrGetData().
|
static |
deinitialization method of constraint handler (called before transformed problem is freed)
Definition at line 15272 of file cons_linear.c.
References assert(), c, consDropAllEvents(), NULL, SCIP_CALL, SCIP_OKAY, SCIPconsGetData(), and SCIPconshdlrGetData().
is constraint ranged row, i.e., -inf < lhs < rhs < inf?
scip | SCIP data structure |
lhs | left hand side |
rhs | right hand side |
Definition at line 15305 of file cons_linear.c.
References assert(), NULL, SCIP_Bool, SCIP_Real, SCIPisEQ(), and SCIPisInfinity().
Referenced by SCIPclassifyConstraintTypesLinear().
is constraint ranged row, i.e., -inf < lhs < rhs < inf?
scip | SCIP data structure |
x | value |
Definition at line 15318 of file cons_linear.c.
References assert(), NULL, SCIP_Bool, SCIP_Real, SCIPisInfinity(), SCIPisIntegral(), SCIPisNegative(), and x.
Referenced by SCIPclassifyConstraintTypesLinear().
|
static |
presolving deinitialization method of constraint handler (called after presolving has been finished)
Definition at line 15676 of file cons_linear.c.
References applyFixings(), assert(), c, consdataRecomputeMaxActivityDelta(), NULL, SCIP_CALL, SCIP_OKAY, SCIPconsGetData(), SCIPconshdlrGetData(), SCIPconsIsDeleted(), SCIPdelCons(), SCIPisLT(), and SCIPstatisticMessage.
|
static |
solving process initialization method of constraint handler
Definition at line 15753 of file cons_linear.c.
References addNlrow(), c, SCIP_CALL, SCIP_OKAY, and SCIPisNLPConstructed().
|
static |
solving process deinitialization method of constraint handler (called before branch and bound process data is freed)
Definition at line 15770 of file cons_linear.c.
References assert(), c, NULL, SCIP_CALL, SCIP_OKAY, SCIP_VERBLEVEL_HIGH, SCIPconsGetData(), SCIPconvertCutsToConss(), SCIPreleaseNlRow(), SCIPreleaseRow(), SCIPverbMessage(), and TRUE.
|
static |
constraint activation notification method of constraint handler
Definition at line 15822 of file cons_linear.c.
References addNlrow(), assert(), NULL, SCIP_CALL, SCIP_OKAY, SCIP_STAGE_SOLVING, SCIPgetStage(), and SCIPisNLPConstructed().
|
static |
constraint deactivation notification method of constraint handler
Definition at line 15836 of file cons_linear.c.
References assert(), consDropAllEvents(), CONSHDLR_NAME, NULL, SCIP_CALL, SCIP_OKAY, SCIP_STAGE_SOLVING, SCIPconsGetData(), SCIPconshdlrGetData(), SCIPconshdlrGetName(), SCIPconsIsDeleted(), SCIPdelNlRow(), and SCIPgetStage().
|
static |
frees specific constraint data
Definition at line 15881 of file cons_linear.c.
References assert(), consdataFree(), consDropAllEvents(), CONSHDLR_NAME, NULL, SCIP_CALL, SCIP_OKAY, SCIPconshdlrGetData(), and SCIPconshdlrGetName().
|
static |
transforms constraint data into data belonging to the transformed problem
Definition at line 15908 of file cons_linear.c.
References assert(), consdataCreate(), CONSHDLR_NAME, NULL, SCIP_CALL, SCIP_OKAY, SCIP_STAGE_TRANSFORMING, SCIPconsGetData(), SCIPconsGetName(), SCIPconshdlrGetName(), SCIPconsIsChecked(), SCIPconsIsDynamic(), SCIPconsIsEnforced(), SCIPconsIsInitial(), SCIPconsIsLocal(), SCIPconsIsModifiable(), SCIPconsIsPropagated(), SCIPconsIsRemovable(), SCIPconsIsSeparated(), SCIPconsIsStickingAtNode(), SCIPcreateCons(), SCIPgetStage(), and SCIPvarIsRelaxationOnly().
|
static |
LP initialization method of constraint handler (called before the initial LP relaxation at a node is solved)
Definition at line 15952 of file cons_linear.c.
References addRelaxation(), assert(), c, CONSHDLR_NAME, FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPconshdlrGetName(), and SCIPconsIsInitial().
|
static |
separation method of constraint handler for LP solutions
Definition at line 15973 of file cons_linear.c.
References assert(), c, CONSHDLR_NAME, cutoff, depth, FALSE, NULL, result, SCIP_Bool, SCIP_CALL, SCIP_CUTOFF, SCIP_DIDNOTFIND, SCIP_DIDNOTRUN, SCIP_OKAY, SCIP_Real, SCIP_SEPARATED, SCIPconshdlrGetData(), SCIPconshdlrGetName(), SCIPgetCutoffbound(), SCIPgetDepth(), SCIPgetLocalLowerbound(), SCIPgetLowerbound(), SCIPgetNLPBranchCands(), SCIPgetNSepaRounds(), SCIPisLE(), and separateCons().
|
static |
separation method of constraint handler for arbitrary primal solutions
Definition at line 16044 of file cons_linear.c.
References assert(), c, CONSHDLR_NAME, cutoff, depth, FALSE, NULL, result, SCIP_Bool, SCIP_CALL, SCIP_CUTOFF, SCIP_DIDNOTFIND, SCIP_DIDNOTRUN, SCIP_OKAY, SCIP_SEPARATED, SCIPconshdlrGetData(), SCIPconshdlrGetName(), SCIPgetDepth(), SCIPgetNSepaRounds(), separateCons(), sol, and TRUE.
|
static |
constraint enforcing method of constraint handler for LP solutions
Definition at line 16102 of file cons_linear.c.
References enforceConstraint(), NULL, result, SCIP_CALL, and SCIP_OKAY.
|
static |
constraint enforcing method of constraint handler for relaxation solutions
Definition at line 16111 of file cons_linear.c.
References enforceConstraint(), result, SCIP_CALL, SCIP_OKAY, and sol.
|
static |
constraint enforcing method of constraint handler for pseudo solutions
Definition at line 16120 of file cons_linear.c.
References assert(), c, checkCons(), CONSHDLR_NAME, FALSE, NULL, result, SCIP_Bool, SCIP_CALL, SCIP_DIDNOTRUN, SCIP_FEASIBLE, SCIP_INFEASIBLE, SCIP_OKAY, SCIPconshdlrGetData(), SCIPconshdlrGetName(), SCIPdebugMsg, and TRUE.
|
static |
feasibility check method of constraint handler for integral solutions
Definition at line 16168 of file cons_linear.c.
References assert(), c, checkCons(), consdataGetActivity(), CONSHDLR_NAME, consPrintConsSol(), FALSE, NULL, result, SCIP_Bool, SCIP_CALL, SCIP_FEASIBLE, SCIP_INFEASIBLE, SCIP_INVALID, SCIP_OKAY, SCIP_Real, SCIPconsGetData(), SCIPconshdlrGetData(), SCIPconshdlrGetName(), SCIPinfoMessage(), SCIPisFeasGT(), SCIPisFeasLT(), and sol.
|
static |
domain propagation method of constraint handler
Definition at line 16227 of file cons_linear.c.
References assert(), CONSHDLR_NAME, cutoff, depth, FALSE, i, NULL, propagateCons(), result, SCIP_Bool, SCIP_CALL, SCIP_CUTOFF, SCIP_DIDNOTFIND, SCIP_OKAY, SCIP_REDUCEDDOM, SCIPconshdlrGetData(), SCIPconshdlrGetName(), SCIPconshdlrGetPropFreq(), SCIPgetDepth(), SCIPinProbing(), SCIPinRepropagation(), SCIPunmarkConsPropagate(), and TRUE.
|
static |
presolving method of constraint handler
Definition at line 16298 of file cons_linear.c.
References aggregateVariables(), applyFixings(), assert(), c, checkParallelObjective(), chgLhs(), chgRhs(), consCatchAllEvents(), consdataGetActivityBounds(), consdataTightenCoefs(), CONSHDLR_NAME, convertEquality(), cutoff, detectRedundantConstraints(), dualPresolve(), extractCliques(), FALSE, fixVariables(), fullDualPresolve(), MAXCONSPRESOLROUNDS, normalizeCons(), NULL, preprocessConstraintPairs(), presolStuffing(), rangedRowPropagation(), result, SCIP_Bool, SCIP_CALL, SCIP_CUTOFF, SCIP_DIDNOTFIND, SCIP_Longint, SCIP_OKAY, SCIP_PRESOLTIMING_EXHAUSTIVE, SCIP_Real, SCIP_SUCCESS, SCIPaddCons(), SCIPallocBufferArray, SCIPallowStrongDualReds(), SCIPblkmem(), SCIPconsGetData(), SCIPconsGetName(), SCIPconshdlrGetData(), SCIPconshdlrGetName(), SCIPconsIsActive(), SCIPconsIsChecked(), SCIPconsIsMarkedPropagate(), SCIPconsIsModifiable(), SCIPdebugMsg, SCIPdebugPrintCons, SCIPdelCons(), SCIPfreeBufferArray, SCIPgetNRuns(), SCIPinfinity(), SCIPisEQ(), SCIPisFeasGT(), SCIPisFeasLT(), SCIPisGE(), SCIPisInfinity(), SCIPisLE(), SCIPisLT(), SCIPisPresolveFinished(), SCIPisStopped(), SCIPreleaseCons(), SCIPunmarkConsPropagate(), SCIPupgradeConsLinear(), simplifyInequalities(), tightenBounds(), tightenSides(), and TRUE.
|
static |
propagation conflict resolving method of constraint handler
Definition at line 16808 of file cons_linear.c.
References assert(), intToInferInfo(), NULL, resolvePropagation(), result, SCIP_CALL, and SCIP_OKAY.
|
static |
variable rounding lock method of constraint handler
Definition at line 16822 of file cons_linear.c.
References assert(), i, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPaddVarLocksType(), SCIPconsGetData(), SCIPisInfinity(), and SCIPisPositive().
|
static |
variable deletion method of constraint handler
Definition at line 16870 of file cons_linear.c.
References assert(), NULL, performVarDeletions(), SCIP_CALL, and SCIP_OKAY.
|
static |
constraint display method of constraint handler
Definition at line 16886 of file cons_linear.c.
References assert(), consdataPrint(), NULL, SCIP_CALL, SCIP_OKAY, and SCIPconsGetData().
|
static |
constraint copying method of constraint handler
Definition at line 16899 of file cons_linear.c.
References assert(), FALSE, NULL, nvars, propagate, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPconsGetName(), SCIPcopyConsLinear(), SCIPgetLhsLinear(), SCIPgetNVarsLinear(), SCIPgetRhsLinear(), SCIPgetValsLinear(), SCIPgetVarsLinear(), and valid.
|
static |
find operators '<=', '==', '>=', [free] in input string and return those places
There should only be one operator, except for ranged rows for which exactly two operators '<=' must be present.
str | null terminated input string |
firstoperator | pointer to store the string starting at the first operator |
secondoperator | pointer to store the string starting at the second operator |
success | pointer to store if the line contains a valid operator order |
Definition at line 16935 of file cons_linear.c.
References assert(), FALSE, NULL, SCIP_Bool, SCIPerrorMessage, and TRUE.
Referenced by SCIP_DECL_CONSPARSE().
|
static |
constraint parsing method of constraint handler
Definition at line 17034 of file cons_linear.c.
References assert(), FALSE, findOperators(), NULL, nvars, propagate, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_READERROR, SCIP_Real, SCIPallocBufferArray, SCIPcreateConsLinear(), SCIPerrorMessage, SCIPfreeBufferArray, SCIPinfinity(), SCIPparseReal(), SCIPparseVarsLinearsum(), SCIPreallocBufferArray, SCIPskipSpace(), and vars.
|
static |
constraint method of constraint handler which returns the variables (if possible)
Definition at line 17192 of file cons_linear.c.
References assert(), BMScopyMemoryArray, FALSE, NULL, nvars, SCIP_OKAY, SCIPconsGetData(), TRUE, and vars.
|
static |
! [Callback for the number of variables] constraint method of constraint handler which returns the number of variables (if possible)
Definition at line 17215 of file cons_linear.c.
References assert(), NULL, SCIP_OKAY, SCIPconsGetData(), and TRUE.
|
static |
! [Callback for the number of variables] constraint handler method which returns the permutation symmetry detection graph of a constraint
Definition at line 17231 of file cons_linear.c.
References addSymmetryInformation(), SCIP_CALL, SCIP_OKAY, and SYM_SYMTYPE_PERM.
|
static |
constraint handler method which returns the signed permutation symmetry detection graph of a constraint
Definition at line 17240 of file cons_linear.c.
References addSymmetryInformation(), SCIP_CALL, SCIP_OKAY, and SYM_SYMTYPE_SIGNPERM.
|
static |
execution method of event handler
Definition at line 17253 of file cons_linear.c.
References assert(), consdataInvalidateActivities(), consdataUpdateActivitiesGlbLb(), consdataUpdateActivitiesGlbUb(), consdataUpdateActivitiesLb(), consdataUpdateActivitiesUb(), EVENTHDLR_NAME, FALSE, NULL, nvars, REALABS, SCIP_CALL, SCIP_EVENTTYPE_BOUNDCHANGED, SCIP_EVENTTYPE_BOUNDRELAXED, SCIP_EVENTTYPE_BOUNDTIGHTENED, SCIP_EVENTTYPE_FORMAT, SCIP_EVENTTYPE_GBDCHANGED, SCIP_EVENTTYPE_GLBCHANGED, SCIP_EVENTTYPE_GUBCHANGED, SCIP_EVENTTYPE_LBCHANGED, SCIP_EVENTTYPE_LBTIGHTENED, SCIP_EVENTTYPE_TYPECHANGED, SCIP_EVENTTYPE_UBCHANGED, SCIP_EVENTTYPE_UBTIGHTENED, SCIP_EVENTTYPE_VARDELETED, SCIP_EVENTTYPE_VARFIXED, SCIP_EVENTTYPE_VARUNLOCKED, SCIP_INVALID, SCIP_INVALIDDATA, SCIP_LOCKTYPE_MODEL, SCIP_OKAY, SCIP_Real, SCIP_STAGE_INITSOLVE, SCIP_STAGE_PRESOLVED, SCIP_VARTYPE_BINARY, SCIP_VARTYPE_CONTINUOUS, SCIPconsGetData(), SCIPconsIsActive(), SCIPconsIsDeleted(), SCIPerrorMessage, SCIPeventGetNewbound(), SCIPeventGetNewtype(), SCIPeventGetOldbound(), SCIPeventGetOldtype(), SCIPeventGetType(), SCIPeventGetVar(), SCIPeventhdlrGetName(), SCIPgetStage(), SCIPisGT(), SCIPisInfinity(), SCIPmarkConsPropagate(), SCIPvarGetLbGlobal(), SCIPvarGetLbLocal(), SCIPvarGetNLocksDownType(), SCIPvarGetNLocksUpType(), SCIPvarGetUbGlobal(), SCIPvarGetUbLocal(), SCIPvarIsBinary(), TRUE, and var.
|
static |
conflict processing method of conflict handler (called when conflict was found)
Definition at line 17449 of file cons_linear.c.
References assert(), CONFLICTHDLR_NAME, FALSE, i, NULL, result, SCIP_CALL, SCIP_CONSADDED, SCIP_DIDNOTFIND, SCIP_DIDNOTRUN, SCIP_LONGINT_FORMAT, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_Real, SCIPaddConflict(), SCIPallocBufferArray, SCIPbdchginfoGetNewbound(), SCIPbdchginfoGetVar(), SCIPconflicthdlrGetName(), SCIPcreateConsLinear(), SCIPfreeBufferArray, SCIPgetNConflictConssApplied(), SCIPinfinity(), SCIPreleaseCons(), SCIPsnprintf(), SCIPupgradeConsLinear(), SCIPvarIsBinary(), TRUE, and vars.
|
static |
tries to upgrade a nonlinear constraint into a linear constraint
Definition at line 17535 of file cons_linear.c.
References assert(), consdataEnsureVarsSize(), i, NULL, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPaddCoefLinear(), SCIPconsGetData(), SCIPconsGetName(), SCIPconsIsChecked(), SCIPconsIsDynamic(), SCIPconsIsEnforced(), SCIPconsIsInitial(), SCIPconsIsLocal(), SCIPconsIsModifiable(), SCIPconsIsPropagated(), SCIPconsIsRemovable(), SCIPconsIsSeparated(), SCIPconsIsStickingAtNode(), SCIPcreateConsLinear(), SCIPdebugMsg, SCIPdebugPrintCons, SCIPexprGetChildren(), SCIPexprGetNChildren(), SCIPgetCoefsExprSum(), SCIPgetConstantExprSum(), SCIPgetExprNonlinear(), SCIPgetLhsNonlinear(), SCIPgetRhsNonlinear(), SCIPgetVarExprVar(), SCIPinfinity(), SCIPisExprSum(), SCIPisExprVar(), SCIPisInfinity(), and TRUE.