Constraint handler for exact linear constraints in their most general form, \(lhs <= a^T x <= rhs\).
Definition in file cons_exactlinear.c.
#include "scip/clock.h"#include "scip/def.h"#include "scip/struct_stat.h"#include "scip/type_retcode.h"#include "blockmemshell/memory.h"#include "scip/cons_knapsack.h"#include "scip/cons_exactlinear.h"#include "scip/cons_linear.h"#include "scip/cons_nonlinear.h"#include "scip/debug.h"#include "scip/intervalarith.h"#include "scip/pub_conflict.h"#include "scip/pub_cons.h"#include "scip/pub_event.h"#include "scip/pub_lp.h"#include "scip/pub_lpexact.h"#include "scip/pub_message.h"#include "scip/pub_misc.h"#include "scip/pub_misc_sort.h"#include "scip/pub_var.h"#include "scip/rational.h"#include "scip/scip_branch.h"#include "scip/scip_certificate.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_exact.h"#include "scip/scip_general.h"#include "scip/scip_lp.h"#include "scip/scip_lpexact.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_solvingstats.h"#include "scip/scip_tree.h"#include "scip/scip_var.h"#include "scip/var.h"#include "scip/sepastoreexact.h"#include <ctype.h>#include <string.h>#include <strings.h>Go to the source code of this file.
Macros | |
| #define | CONSHDLR_NAME "exactlinear" |
| #define | CONSHDLR_DESC "exact linear constraints of the form lhs <= a^T x <= rhs" |
| #define | CONSHDLR_SEPAPRIORITY +100000 |
| #define | CONSHDLR_ENFOPRIORITY -1000000 |
| #define | CONSHDLR_CHECKPRIORITY -1000000 |
| #define | CONSHDLR_SEPAFREQ 0 |
| #define | CONSHDLR_PROPFREQ 1 |
| #define | CONSHDLR_EAGERFREQ 100 |
| #define | CONSHDLR_DELAYSEPA FALSE |
| #define | CONSHDLR_DELAYPROP FALSE |
| #define | CONSHDLR_NEEDSCONS TRUE |
| #define | CONSHDLR_PROP_TIMING SCIP_PROPTIMING_BEFORELP |
| #define | EVENTHDLR_NAME "exactlinear" |
| #define | EVENTHDLR_DESC "bound change event handler for exact linear constraints" |
| #define | DEFAULT_TIGHTENBOUNDSFREQ 1 |
| #define | DEFAULT_MAXROUNDS 5 |
| #define | DEFAULT_MAXROUNDSROOT -1 |
| #define | DEFAULT_MAXSEPACUTS 50 |
| #define | DEFAULT_MAXSEPACUTSROOT 200 |
| #define | DEFAULT_SORTVARS TRUE |
| #define | DEFAULT_LIMITDENOM FALSE |
| #define | DEFAULT_BOUNDMAXDENOM 256L |
| #define | checkMaxActivityDelta(scip, consdata) |
| #define | MAXTIGHTENROUNDS 10 |
| #define CONSHDLR_NAME "exactlinear" |
Definition at line 84 of file cons_exactlinear.c.
Definition at line 85 of file cons_exactlinear.c.
| #define CONSHDLR_SEPAPRIORITY +100000 |
priority of the constraint handler for separation
Definition at line 86 of file cons_exactlinear.c.
| #define CONSHDLR_ENFOPRIORITY -1000000 |
priority of the constraint handler for constraint enforcing
Definition at line 87 of file cons_exactlinear.c.
| #define CONSHDLR_CHECKPRIORITY -1000000 |
priority of the constraint handler for checking feasibility
Definition at line 88 of file cons_exactlinear.c.
| #define CONSHDLR_SEPAFREQ 0 |
frequency for separating cuts; zero means to separate only in the root node
Definition at line 89 of file cons_exactlinear.c.
| #define CONSHDLR_PROPFREQ 1 |
frequency for propagating domains; zero means only preprocessing propagation
Definition at line 90 of file cons_exactlinear.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 91 of file cons_exactlinear.c.
| #define CONSHDLR_DELAYSEPA FALSE |
should separation method be delayed, if other separators found cuts?
Definition at line 93 of file cons_exactlinear.c.
| #define CONSHDLR_DELAYPROP FALSE |
should propagation method be delayed, if other propagators found reductions?
Definition at line 94 of file cons_exactlinear.c.
| #define CONSHDLR_NEEDSCONS TRUE |
should the constraint handler be skipped, if no constraints are available?
Definition at line 95 of file cons_exactlinear.c.
| #define CONSHDLR_PROP_TIMING SCIP_PROPTIMING_BEFORELP |
Definition at line 97 of file cons_exactlinear.c.
| #define EVENTHDLR_NAME "exactlinear" |
Definition at line 99 of file cons_exactlinear.c.
| #define EVENTHDLR_DESC "bound change event handler for exact linear constraints" |
Definition at line 100 of file cons_exactlinear.c.
| #define DEFAULT_TIGHTENBOUNDSFREQ 1 |
multiplier on propagation frequency, how often the bounds are tightened
Definition at line 102 of file cons_exactlinear.c.
Referenced by SCIPincludeConshdlrExactLinear(), and SCIPincludeConshdlrLinear().
| #define DEFAULT_MAXROUNDS 5 |
maximal number of separation rounds per node (-1: unlimited)
Definition at line 103 of file cons_exactlinear.c.
Referenced by SCIPincludeConshdlrExactLinear(), SCIPincludeConshdlrKnapsack(), SCIPincludeConshdlrLinear(), SCIPincludeSepaAggregation(), SCIPincludeSepaCGMIP(), SCIPincludeSepaDisjunctive(), SCIPincludeSepaEccuts(), SCIPincludeSepaGMI(), SCIPincludeSepaGomory(), SCIPincludeSepaInterminor(), SCIPincludeSepaLagromory(), SCIPincludeSepaMinor(), SCIPincludeSepaMixing(), SCIPincludeSepaOddcycle(), SCIPincludeSepaRlt(), and SCIPincludeSepaZerohalf().
| #define DEFAULT_MAXROUNDSROOT -1 |
maximal number of separation rounds in the root node (-1: unlimited)
Definition at line 104 of file cons_exactlinear.c.
Referenced by SCIPincludeConshdlrExactLinear(), SCIPincludeConshdlrKnapsack(), SCIPincludeConshdlrLinear(), SCIPincludePricerColoring(), SCIPincludeSepaAggregation(), SCIPincludeSepaCGMIP(), SCIPincludeSepaDisjunctive(), SCIPincludeSepaEccuts(), SCIPincludeSepaGMI(), SCIPincludeSepaGomory(), SCIPincludeSepaInterminor(), SCIPincludeSepaLagromory(), SCIPincludeSepaMinor(), SCIPincludeSepaMixing(), SCIPincludeSepaOddcycle(), SCIPincludeSepaRlt(), and SCIPincludeSepaZerohalf().
| #define DEFAULT_MAXSEPACUTS 50 |
maximal number of cuts separated per separation round
Definition at line 105 of file cons_exactlinear.c.
Referenced by SCIPincludeConshdlrExactLinear(), SCIPincludeConshdlrIndicator(), SCIPincludeConshdlrKnapsack(), SCIPincludeConshdlrLinear(), SCIPincludeSepaAggregation(), SCIPincludeSepaClique(), SCIPincludeSepaEccuts(), SCIPincludeSepaGMI(), SCIPincludeSepaGomory(), SCIPincludeSepaMcf(), SCIPincludeSepaOddcycle(), and SCIPincludeSepaZerohalf().
| #define DEFAULT_MAXSEPACUTSROOT 200 |
maximal number of cuts separated per separation round in root node
Definition at line 106 of file cons_exactlinear.c.
Referenced by SCIPincludeConshdlrExactLinear(), SCIPincludeConshdlrIndicator(), SCIPincludeConshdlrKnapsack(), SCIPincludeConshdlrLinear(), SCIPincludeSepaAggregation(), SCIPincludeSepaEccuts(), SCIPincludeSepaGMI(), SCIPincludeSepaGomory(), SCIPincludeSepaMcf(), SCIPincludeSepaOddcycle(), and SCIPincludeSepaZerohalf().
| #define DEFAULT_SORTVARS TRUE |
should variables be sorted after presolve w.r.t their coefficient absolute for faster propagation?
Definition at line 107 of file cons_exactlinear.c.
Referenced by SCIPincludeConshdlrExactLinear(), SCIPincludeConshdlrLinear(), and SCIPincludeHeurShiftandpropagate().
| #define DEFAULT_LIMITDENOM FALSE |
should denominator sizes for continuous variables be controlled?
Definition at line 109 of file cons_exactlinear.c.
Referenced by SCIPincludeConshdlrExactLinear().
| #define DEFAULT_BOUNDMAXDENOM 256L |
maximal denominator for rational bounds on continuous variables after propagation
Definition at line 110 of file cons_exactlinear.c.
Referenced by SCIPincludeConshdlrExactLinear().
| #define checkMaxActivityDelta | ( | scip, | |
| consdata ) |
Definition at line 1438 of file cons_exactlinear.c.
Referenced by tightenBounds().
| #define MAXTIGHTENROUNDS 10 |
Definition at line 4650 of file cons_exactlinear.c.
Referenced by tightenBounds(), and tightenBounds().
| enum Proprule |
Definition at line 245 of file cons_exactlinear.c.
|
static |
converts an inference information into an int
| inferinfo | inference information to convert |
Definition at line 276 of file cons_exactlinear.c.
Referenced by getInferInt().
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 286 of file cons_exactlinear.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 305 of file cons_exactlinear.c.
References getInferInfo(), and inferInfoToInt().
Referenced by rangedRowPropagation(), and tightenVarBounds().
|
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 315 of file cons_exactlinear.c.
References assert(), NULL, SCIP_CALL, SCIP_OKAY, SCIPblkmem(), SCIPcalcMemGrowSize(), SCIPrationalCreateBlock(), and SCIPreallocBlockMemoryArray.
Referenced by addCoef().
|
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 356 of file cons_exactlinear.c.
References assert(), NULL, SCIP_CALL, SCIP_OKAY, SCIPallocBlockMemory, SCIPblkmem(), and SCIPrationalCreateBlock().
Referenced by SCIPincludeConshdlrExactLinear().
|
static |
frees constraint handler data for linear constraint handler
| scip | SCIP data structure |
| conshdlrdata | pointer to the constraint handler data |
Definition at line 388 of file cons_exactlinear.c.
References assert(), NULL, SCIPblkmem(), SCIPfreeBlockMemory, and SCIPrationalFreeBlock().
Referenced by SCIP_DECL_CONSFREE().
|
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 411 of file cons_exactlinear.c.
References assert(), NULL, SCIP_CALL, SCIP_OKAY, SCIPconsGetData(), SCIPlockVarCons(), SCIPrationalIsInfinity(), SCIPrationalIsNegInfinity(), SCIPrationalIsPositive(), SCIPrationalIsZero(), 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 444 of file cons_exactlinear.c.
References assert(), NULL, SCIP_CALL, SCIP_OKAY, SCIPconsGetData(), SCIPrationalIsInfinity(), SCIPrationalIsNegInfinity(), SCIPrationalIsPositive(), SCIPrationalIsZero(), 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 478 of file cons_exactlinear.c.
References assert(), NULL, nvars, SCIP_CALL, SCIP_EVENTTYPE_BOUNDCHANGED, SCIP_EVENTTYPE_GBDCHANGED, 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 519 of file cons_exactlinear.c.
References assert(), NULL, nvars, SCIP_CALL, SCIP_EVENTTYPE_BOUNDCHANGED, SCIP_EVENTTYPE_GBDCHANGED, 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 553 of file cons_exactlinear.c.
References assert(), BMSclearMemoryArray, consCatchEvent(), i, NULL, SCIP_CALL, SCIP_OKAY, SCIPallocBlockMemoryArray, and SCIPconsGetData().
Referenced by applyFixings(), propagateCons(), and SCIP_DECL_CONSINIT().
|
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 585 of file cons_exactlinear.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 616 of file cons_exactlinear.c.
References assert(), FALSE, NULL, nvars, SCIP_CALL, SCIP_INVALID, SCIP_OKAY, SCIP_R_ROUND_DOWNWARDS, SCIP_R_ROUND_UPWARDS, SCIP_Real, SCIP_VARTYPE_BINARY, SCIP_VARTYPE_CONTINUOUS, SCIPallocBlockMemory, SCIPallocBufferArray, SCIPblkmem(), SCIPbuffer(), SCIPcaptureVar(), SCIPduplicateBlockMemoryArray, SCIPfreeBufferArray, SCIPgetTransformedVars(), SCIPintervalSetRational(), SCIPisConsCompressionEnabled(), SCIPisTransformed(), SCIPrationalAddProd(), SCIPrationalCopyBlock(), SCIPrationalCopyBlockArray(), SCIPrationalCreateBlock(), SCIPrationalCreateBuffer(), SCIPrationalCreateBufferArray(), SCIPrationalCreateString(), SCIPrationalDiff(), SCIPrationalFreeBuffer(), SCIPrationalFreeBufferArray(), SCIPrationalGetReal(), SCIPrationalIsAbsInfinity(), SCIPrationalIsEQ(), SCIPrationalIsGT(), SCIPrationalIsZero(), SCIPrationalRoundReal(), SCIPrationalSetRational(), SCIPvarGetLbGlobalExact(), SCIPvarGetType(), SCIPvarGetUbGlobalExact(), SCIPwarningMessage(), TRUE, var, and vars.
Referenced by SCIP_DECL_CONSTRANS(), and SCIPcreateConsExactLinear().
|
static |
frees a linear constraint data
| scip | SCIP data structure |
| consdata | pointer to linear constraint data |
Definition at line 822 of file cons_exactlinear.c.
References assert(), NULL, SCIP_CALL, SCIP_OKAY, SCIPblkmem(), SCIPfreeBlockMemory, SCIPfreeBlockMemoryArrayNull, SCIPrationalFreeBlock(), SCIPrationalFreeBlockArray(), SCIPrationalIsZero(), 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 870 of file cons_exactlinear.c.
References assert(), NULL, SCIP_CALL, SCIP_OKAY, SCIPgetMessagehdlr(), SCIPinfoMessage(), SCIPrationalIsEQ(), SCIPrationalIsInfinity(), SCIPrationalIsNegInfinity(), SCIPrationalMessage(), SCIPwriteVarsLinearsumExact(), 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 |
| useexactsol | should the exact sol be used |
| file | output file (or NULL for standard output) |
Definition at line 921 of file cons_exactlinear.c.
References assert(), NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPbuffer(), SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconsGetName(), SCIPconshdlrGetName(), SCIPgetMessagehdlr(), SCIPgetSolVal(), SCIPgetSolValExact(), SCIPinfoMessage(), SCIPmessageFPrintInfo(), SCIPrationalCreateBuffer(), SCIPrationalFreeBuffer(), SCIPrationalIsEQ(), SCIPrationalIsEQReal(), SCIPrationalIsInfinity(), SCIPrationalIsNegInfinity(), SCIPrationalMessage(), 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 1023 of file cons_exactlinear.c.
References assert(), FALSE, NULL, SCIP_INVALID, and SCIPrationalSetInfinity().
Referenced by consdataScaleMinValue(), createRows(), and SCIP_DECL_EVENTEXEC().
|
static |
computes the pseudo activity of a constraint
| consdata | linear constraint data |
| pseudoactivity | buffer to store pseudoactivity |
Definition at line 1071 of file cons_exactlinear.c.
References assert(), bound, i, SCIPrationalAddProd(), SCIPrationalIsInfinity(), SCIPrationalIsNegative(), SCIPrationalIsNegInfinity(), SCIPrationalIsZero(), SCIPrationalSetFraction(), SCIPrationalSetInfinity(), SCIPrationalSetNegInfinity(), and SCIPvarGetBestBoundLocalExact().
Referenced by checkCons(), and consdataGetActivity().
|
static |
recompute the minactivity of a constraint
| scip | SCIP data structure |
| consdata | linear constraint data |
Definition at line 1120 of file cons_exactlinear.c.
References assert(), i, REALABS, SCIP_Real, SCIPintervalGetRoundingMode(), SCIPintervalSetRoundingMode(), SCIPintervalSetRoundingModeDownwards(), SCIPisHugeValue(), SCIPisInfinity(), SCIPvarGetLbLocal(), SCIPvarGetUbLocal(), and TRUE.
Referenced by getMinActivity(), and printActivityConflictToCertificate().
|
static |
recompute the maxactivity of a constraint
| scip | SCIP data structure |
| consdata | linear constraint data |
Definition at line 1172 of file cons_exactlinear.c.
References assert(), i, REALABS, SCIP_Real, SCIPintervalGetRoundingMode(), SCIPintervalSetRoundingMode(), SCIPintervalSetRoundingModeUpwards(), SCIPisHugeValue(), SCIPisInfinity(), SCIPvarGetLbLocal(), SCIPvarGetUbLocal(), and TRUE.
Referenced by getMaxActivity(), and printActivityConflictToCertificate().
|
static |
recompute the global minactivity of a constraint
| scip | SCIP data structure |
| consdata | linear constraint data |
Definition at line 1225 of file cons_exactlinear.c.
References assert(), i, REALABS, SCIP_Real, SCIPintervalGetRoundingMode(), SCIPintervalSetRoundingMode(), SCIPintervalSetRoundingModeDownwards(), SCIPisHugeValue(), SCIPisInfinity(), SCIPvarGetLbGlobal(), SCIPvarGetUbGlobal(), and TRUE.
Referenced by getMinActivity().
|
static |
recompute the global maxactivity of a constraint
| scip | SCIP data structure |
| consdata | linear constraint data |
Definition at line 1278 of file cons_exactlinear.c.
References assert(), i, REALABS, SCIP_Real, SCIPintervalGetRoundingMode(), SCIPintervalSetRoundingMode(), SCIPintervalSetRoundingModeUpwards(), SCIPisHugeValue(), SCIPisInfinity(), SCIPvarGetLbGlobal(), SCIPvarGetUbGlobal(), and TRUE.
Referenced by getMaxActivity().
|
static |
calculates minimum absolute value of coefficients
| consdata | linear constraint data |
Definition at line 1330 of file cons_exactlinear.c.
References assert(), i, NULL, SCIPrationalAbs(), SCIPrationalIsAbsGT(), SCIPrationalIsZero(), SCIPrationalSetReal(), and TRUE.
Referenced by consdataGetMinAbsvalEx().
|
static |
checks the type of all variables of the constraint and sets hasnonbinvar and hascontvar flags accordingly
| consdata | linear constraint data |
Definition at line 1359 of file cons_exactlinear.c.
References assert(), FALSE, SCIP_VARTYPE_BINARY, SCIP_VARTYPE_CONTINUOUS, SCIPvarGetType(), and TRUE.
Referenced by consdataRecomputeMaxActivityDelta().
|
static |
recompute maximal activity contribution for a single variable
| scip | SCIP data structure |
| consdata | linear constraint data |
Definition at line 1443 of file cons_exactlinear.c.
References consdataCheckNonbinvar(), SCIP_Real, SCIPinfinity(), SCIPintervalAbsMax(), SCIPisInfinity(), SCIPvarGetLbLocal(), and SCIPvarGetUbLocal().
Referenced by 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 |
| valrange | coefficient of constraint entry |
| boundtype | type of the bound change |
| global | is it a global or a local bound change? |
Definition at line 1503 of file cons_exactlinear.c.
References assert(), SCIP_Interval::inf, NULL, REALABS, SCIP_Bool, SCIP_BOUNDTYPE_LOWER, SCIP_INVALID, SCIP_Real, SCIPintervalGetRoundingMode(), SCIPintervalNegateReal(), SCIPintervalSetRoundingMode(), SCIPintervalSetRoundingModeDownwards(), SCIPintervalSetRoundingModeUpwards(), SCIPisHugeValue(), SCIPisInfinity(), SCIP_Interval::sup, 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 |
Definition at line 1909 of file cons_exactlinear.c.
References assert(), consdataUpdateActivities(), FALSE, NULL, 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 |
Definition at line 1933 of file cons_exactlinear.c.
References assert(), consdataUpdateActivities(), FALSE, NULL, 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 |
Definition at line 1957 of file cons_exactlinear.c.
References assert(), consdataUpdateActivities(), NULL, 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 |
Definition at line 1979 of file cons_exactlinear.c.
References assert(), consdataUpdateActivities(), NULL, 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 |
| valExact | coefficient of constraint entry |
| val | coefficient of constraint entry |
Definition at line 2001 of file cons_exactlinear.c.
References assert(), consdataUpdateActivitiesGlbLb(), consdataUpdateActivitiesGlbUb(), consdataUpdateActivitiesLb(), consdataUpdateActivitiesUb(), FALSE, SCIP_Interval::inf, MAX, MIN, NULL, REALABS, SCIP_INVALID, SCIP_Real, SCIPrationalIsAbsEQ(), SCIPrationalSetInfinity(), SCIPvarGetLbGlobal(), SCIPvarGetLbLocal(), SCIPvarGetUbGlobal(), SCIPvarGetUbLocal(), SCIP_Interval::sup, and var.
Referenced by addCoef(), 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 |
| valExact | exact coefficient of constraint entry |
| val | coefficient of constraint entry |
Definition at line 2071 of file cons_exactlinear.c.
References assert(), consdataUpdateActivitiesGlbLb(), consdataUpdateActivitiesGlbUb(), consdataUpdateActivitiesLb(), consdataUpdateActivitiesUb(), FALSE, NULL, SCIP_INVALID, SCIP_Real, SCIPintervalAbsMax(), SCIPisEQ(), SCIPrationalIsAbsEQ(), SCIPrationalSetInfinity(), SCIPvarGetLbGlobal(), SCIPvarGetLbLocal(), SCIPvarGetUbGlobal(), SCIPvarGetUbLocal(), and var.
Referenced by consdataUpdateChgCoef().
|
static |
returns the minimum absolute value of all coefficients in the constraint
| scip | SCIP data structure |
| consdata | linear constraint data |
Definition at line 2148 of file cons_exactlinear.c.
References assert(), consdataCalcMinAbsvalEx(), and NULL.
Referenced by consdataScaleMinValue().
|
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 |
| oldvalExact | old exact coefficient of constraint entry |
| newval | new coefficient of constraint entry |
| newvalExact | new coefficient of constraint entry |
Definition at line 2166 of file cons_exactlinear.c.
References assert(), consdataUpdateAddCoef(), consdataUpdateDelCoef(), FALSE, NULL, SCIP_INVALID, SCIP_Real, SCIPintervalAbsMax(), SCIPisEQ(), SCIPisInfinity(), SCIPrationalAbs(), SCIPrationalIsAbsEQ(), SCIPrationalIsAbsGT(), SCIPrationalSetInfinity(), SCIPvarGetLbLocal(), SCIPvarGetUbLocal(), and var.
Referenced by chgCoefPos().
|
static |
ensures that every nonzero is a least minval so that we don't get problem with SCIPs 0 in floating point representation
| scip | SCIP data structure |
| consdata | linear constraint data |
| minval | minmimal value for coefficients in constraint |
Definition at line 2294 of file cons_exactlinear.c.
References assert(), consdataGetMinAbsvalEx(), consdataInvalidateActivities(), i, NULL, SCIP_R_ROUND_DOWNWARDS, SCIP_R_ROUND_UPWARDS, SCIP_Real, SCIPbuffer(), SCIPintervalSetRational(), SCIPrationalCreateBuffer(), SCIPrationalDiv(), SCIPrationalFreeBuffer(), SCIPrationalIsLTReal(), SCIPrationalIsZero(), SCIPrationalMult(), SCIPrationalRoundReal(), and SCIPrationalSetReal().
Referenced by SCIP_DECL_CONSTRANS().
|
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 2340 of file cons_exactlinear.c.
References assert(), consdataUpdateAddCoef(), i, NULL, SCIP_INVALID, SCIPintervalAbsMax(), and TRUE.
Referenced by consdataGetActivityBounds(), and consdataGetActivityResiduals().
|
static |
computes the activity of a row for a given solution plus a bound on the floating-point error using running error analysis
| scip | SCIP data structure |
| consdata | linear constraint data |
| sol | primal CIP solution |
| activity | buffer to return floating-point activity |
| errorbound | buffer to return bound on absolute floating-point error |
Definition at line 2398 of file cons_exactlinear.c.
References assert(), FALSE, MAX, MIN, NULL, REALABS, SCIP_Bool, SCIP_Real, SCIP_REAL_UNITROUNDOFF, SCIP_UNKNOWN, SCIP_VARSTATUS_COLUMN, SCIP_VARSTATUS_LOOSE, SCIPgetRowSolActivityWithErrorboundExact(), SCIPgetSolVal(), SCIPinfinity(), SCIPisInfinity(), SCIPvarGetStatus(), sol, and TRUE.
Referenced by checkCons().
|
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 |
| isrelax | pointer to store whether the activity is a relaxation, i.e. is <= the exact minactivity (in case of huge contributing values) |
| issettoinfinity | pointer to store whether minactivity was set to infinity or calculated |
Definition at line 2465 of file cons_exactlinear.c.
References assert(), consdataRecomputeGlbMinactivity(), consdataRecomputeMinactivity(), FALSE, NULL, SCIP_Bool, SCIP_Real, SCIPgetHugeValue(), SCIPinfinity(), and TRUE.
Referenced by consdataGetActivityBounds(), and consdataGetActivityResiduals().
|
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 |
| isrelax | pointer to store whether the activity is a relaxation, i.e. is >= the exact maxactivity (in case of huge contributing values) |
| issettoinfinity | pointer to store whether maxactivity was set to infinity or calculated |
Definition at line 2566 of file cons_exactlinear.c.
References assert(), consdataRecomputeGlbMaxactivity(), consdataRecomputeMaxactivity(), FALSE, NULL, SCIP_Bool, SCIP_Real, SCIPgetHugeValue(), SCIPinfinity(), and TRUE.
Referenced by consdataGetActivityBounds(), and consdataGetActivityResiduals().
|
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 |
| minisrelax | pointer to store whether the returned minactivity is just a relaxation, i.e. <= the exact minactivity (in case of huge contributions), or equal to the exact minimal activity |
| maxisrelax | pointer to store whether the returned maxactivity is just a relaxation, i.e. >= the exact maxactivity (in case of huge contributions), or equal to the exact maximal activity |
| isminsettoinfinity | pointer to store whether minactivity was set to infinity or calculated |
| ismaxsettoinfinity | pointer to store whether maxactivity was set to infinity or calculated |
Definition at line 2665 of file cons_exactlinear.c.
References assert(), consdataCalcActivities(), FALSE, getMaxActivity(), getMinActivity(), NULL, SCIP_Bool, SCIP_INVALID, and SCIP_Real.
Referenced by propagateCons(), and tightenBounds().
|
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 |
| minisrelax | pointer to store whether the returned residual minactivity is just a relaxation, i.e. <= the exact residual minactivity (in case of huge contributions), or equal to the exact residual minactivity |
| maxisrelax | pointer to store whether the returned residual maxactivity is just a relaxation, i.e. <= the exact residual maxactivity (in case of huge contributions), or equal to the exact residual minactivity |
| isminsettoinfinity | pointer to store whether minresactivity was set to infinity or calculated |
| ismaxsettoinfinity | pointer to store whether maxresactivity was set to infinity or calculated |
Definition at line 2714 of file cons_exactlinear.c.
References assert(), consdataCalcActivities(), FALSE, getMaxActivity(), getMinActivity(), SCIP_Interval::inf, NULL, SCIP_Bool, SCIP_INVALID, SCIP_Real, SCIPintervalGetRoundingMode(), SCIPintervalSetRoundingMode(), SCIPintervalSetRoundingModeDownwards(), SCIPintervalSetRoundingModeUpwards(), SCIPisHugeValue(), SCIPisInfinity(), SCIPvarGetLbLocal(), SCIPvarGetUbLocal(), SCIP_Interval::sup, and var.
Referenced by tightenVarBounds().
|
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 |
| useexact | should the exact solution be used |
| activity | pointer to store the activity |
Definition at line 2880 of file cons_exactlinear.c.
References assert(), consdataComputePseudoActivity(), NULL, SCIP_Bool, SCIPbuffer(), SCIPdebugMsg, SCIPgetSolVal(), SCIPgetSolValExact(), SCIPhasCurrentNodeLP(), SCIPrationalAddProd(), SCIPrationalCreateBuffer(), SCIPrationalDebugMessage, SCIPrationalFreeBuffer(), SCIPrationalGetReal(), SCIPrationalIsInfinity(), SCIPrationalIsNegative(), SCIPrationalIsNegInfinity(), SCIPrationalIsZero(), SCIPrationalSetFraction(), SCIPrationalSetInfinity(), SCIPrationalSetNegInfinity(), SCIPrationalSetReal(), and sol.
Referenced by checkCons(), consdataGetFeasibility(), SCIP_DECL_CONSCHECK(), and SCIPgetActivityExactLinear().
|
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 |
| ret | pointer to store the result |
Definition at line 2944 of file cons_exactlinear.c.
References assert(), consdataGetActivity(), FALSE, NULL, SCIPbuffer(), SCIPrationalCreateBuffer(), SCIPrationalDiff(), SCIPrationalFreeBuffer(), SCIPrationalMin(), and sol.
Referenced by SCIPgetFeasibilityExactLinear().
|
static |
creates an LP row in a linear constraint data
| scip | SCIP data structure |
| cons | linear constraint |
Definition at line 4916 of file cons_exactlinear.c.
References assert(), consdataInvalidateActivities(), NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPaddVarsToRowExact(), SCIPcaptureRowExact(), SCIPconsGetData(), SCIPconsGetName(), SCIPconsIsLocal(), SCIPconsIsModifiable(), SCIPconsIsRemovable(), SCIPcreateEmptyRowCons(), SCIPcreateEmptyRowConsExact(), SCIPgenerateFpRowsFromRowExact(), SCIPinfinity(), and TRUE.
Referenced by addRelaxation().
|
static |
index comparison method of linear constraints: compares two indices of the variable set in the linear constraint
Definition at line 3031 of file cons_exactlinear.c.
References assert(), NULL, nvars, and SCIPvarCompare().
|
static |
index comparison method of linear constraints: compares two indices of the variable set in the linear constraint
Definition at line 3044 of file cons_exactlinear.c.
References assert(), NULL, nvars, SCIPrationalCreate(), SCIPrationalDiff(), SCIPrationalFree(), SCIPrationalIsAbsEQ(), SCIPrationalIsAbsGT(), SCIPrationalMult(), SCIPvarGetLbGlobalExact(), SCIPvarGetProbindex(), SCIPvarGetType(), SCIPvarGetUbGlobalExact(), 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 3132 of file cons_exactlinear.c.
References assert(), i, NULL, and nvars.
Referenced by consdataSort().
|
static |
sorts linear constraint's variables depending on the stage of the solving process:
during SOLVING sorts variables of the remaining problem by binary, integer, implied integral, 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 3212 of file cons_exactlinear.c.
References assert(), FALSE, NULL, permSortConsdata(), SCIP_CALL, SCIP_OKAY, SCIP_STAGE_INITSOLVE, SCIPallocBufferArray, SCIPfreeBufferArray, SCIPgetStage(), SCIPsort(), SCIPvarIsBinary(), and TRUE.
Referenced by mergeMultiples(), 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 3279 of file cons_exactlinear.c.
References assert(), FALSE, i, NLOCKTYPES, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_R_ROUND_DOWNWARDS, SCIPchgRowExactLhs(), SCIPconsGetData(), SCIPconsIsLockedType(), SCIPconsIsTransformed(), SCIPlockVarCons(), SCIPmarkConsPropagate(), SCIPrationalIsEQ(), SCIPrationalIsGT(), SCIPrationalIsInfinity(), SCIPrationalIsNegInfinity(), SCIPrationalIsPositive(), SCIPrationalIsZero(), SCIPrationalRoundReal(), SCIPrationalSetRational(), SCIPunlockVarCons(), TRUE, and vars.
Referenced by applyFixings(), SCIPaddCoefExactLinear(), and SCIPchgLhsExactLinear().
|
static |
sets right hand side of linear constraint
| scip | SCIP data structure |
| cons | linear constraint |
| rhs | new right hand side |
Definition at line 3401 of file cons_exactlinear.c.
References assert(), FALSE, i, NLOCKTYPES, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_R_ROUND_UPWARDS, SCIPchgRowExactRhs(), SCIPconsGetData(), SCIPconsIsLockedType(), SCIPconsIsTransformed(), SCIPlockVarCons(), SCIPmarkConsPropagate(), SCIPrationalIsEQ(), SCIPrationalIsInfinity(), SCIPrationalIsLT(), SCIPrationalIsNegInfinity(), SCIPrationalIsPositive(), SCIPrationalIsZero(), SCIPrationalRoundReal(), SCIPrationalSetRational(), SCIPunlockVarCons(), TRUE, and vars.
Referenced by applyFixings(), SCIPaddCoefExactLinear(), and SCIPchgRhsExactLinear().
|
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 3525 of file cons_exactlinear.c.
References assert(), consCatchEvent(), consdataEnsureVarsSize(), consdataUpdateAddCoef(), FALSE, lockRounding(), NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_STAGE_INITSOLVE, SCIP_VARTYPE_BINARY, SCIP_VARTYPE_CONTINUOUS, SCIPaddVarsToRowExact(), SCIPcaptureVar(), SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetData(), SCIPconsIsTransformed(), SCIPgetStage(), SCIPgetTransformedVar(), SCIPintervalSetRational(), SCIPmarkConsPropagate(), SCIPrationalIsZero(), SCIPrationalSetRational(), SCIPvarGetType(), SCIPvarIsActive(), SCIPvarIsTransformed(), TRUE, and var.
Referenced by applyFixings(), and SCIPaddCoefExactLinear().
|
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 3657 of file cons_exactlinear.c.
References assert(), consDropEvent(), FALSE, NULL, nvars, SCIP_CALL, SCIP_OKAY, SCIP_VARTYPE_BINARY, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetData(), SCIPconsIsTransformed(), SCIPmarkConsPropagate(), SCIPrationalSetRational(), SCIPreleaseVar(), SCIPvarGetType(), TRUE, unlockRounding(), and var.
Referenced by applyFixings(), mergeMultiples(), performVarDeletions(), and SCIPchgCoefExactLinear().
|
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 3748 of file cons_exactlinear.c.
References assert(), consdataUpdateChgCoef(), FALSE, i, lockRounding(), NLOCKTYPES, NULL, nvars, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPconsGetData(), SCIPconsIsLockedType(), SCIPconsIsTransformed(), SCIPintervalSetRational(), SCIPmarkConsPropagate(), SCIPrationalIsNegative(), SCIPrationalIsPositive(), SCIPrationalIsZero(), SCIPrationalSetRational(), SCIPvarIsTransformed(), TRUE, unlockRounding(), and var.
Referenced by mergeMultiples(), and SCIPchgCoefExactLinear().
|
static |
| scip | SCIP data structure |
| conshdlr | constraint handler |
| conss | array of constraints |
| nconss | number of constraints |
Definition at line 3824 of file cons_exactlinear.c.
References assert(), CONSHDLR_NAME, delCoefPos(), FALSE, i, NULL, SCIP_CALL, SCIP_OKAY, SCIPconsGetData(), SCIPconshdlrGetName(), and SCIPvarIsDeleted().
Referenced by SCIP_DECL_CONSDELVARS().
|
static |
replaces multiple occurrences of a variable by a single coefficient
| scip | SCIP data structure |
| cons | linear constraint |
Definition at line 3866 of file cons_exactlinear.c.
References assert(), chgCoefPos(), consdataSort(), delCoefPos(), NULL, SCIP_CALL, SCIP_INVALID, SCIP_OKAY, SCIPbuffer(), SCIPconsGetData(), SCIPrationalAdd(), SCIPrationalCreateBuffer(), SCIPrationalFreeBuffer(), SCIPrationalIsZero(), SCIPrationalSetRational(), TRUE, and var.
Referenced by applyFixings().
|
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 3940 of file cons_exactlinear.c.
References 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, SCIPbuffer(), SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetData(), SCIPdebugMsg, SCIPdebugPrintCons, SCIPerrorMessage, SCIPflattenVarAggregationGraph(), SCIPgetProbvarSumExact(), SCIPisFeasEQ(), SCIPrationalAdd(), SCIPrationalAddProd(), SCIPrationalCreateBuffer(), SCIPrationalDiff(), SCIPrationalFreeBuffer(), SCIPrationalGetSign(), SCIPrationalIsAbsInfinity(), SCIPrationalIsInfinity(), SCIPrationalIsNegInfinity(), SCIPrationalIsZero(), SCIPrationalMult(), SCIPrationalMultReal(), SCIPrationalNegate(), SCIPrationalSetInfinity(), SCIPrationalSetNegInfinity(), SCIPvarGetAggrConstantExact(), SCIPvarGetAggrScalarExact(), SCIPvarGetAggrVar(), SCIPvarGetLbGlobal(), SCIPvarGetLbGlobalExact(), SCIPvarGetMultaggrConstantExact(), SCIPvarGetMultaggrNVars(), SCIPvarGetMultaggrScalarsExact(), SCIPvarGetMultaggrVars(), SCIPvarGetNegationConstant(), SCIPvarGetNegationVar(), SCIPvarGetStatus(), SCIPvarGetUbGlobal(), SCIPvarIsActive(), SCIPvarIsTransformed(), TRUE, and var.
Referenced by SCIP_DECL_CONSEXITPRE().
|
static |
prints activity conflict to certificate file
| scip | SCIP data structure |
| cons | constraint |
| consdata | constraint data |
| rhs | right-hand side |
Definition at line 4204 of file cons_exactlinear.c.
References assert(), consdataRecomputeMaxactivity(), consdataRecomputeMinactivity(), NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPbuffer(), SCIPcertifyActivityConflict(), SCIPisCertified(), SCIPrationalCreateBuffer(), SCIPrationalDiffReal(), SCIPrationalFreeBuffer(), SCIPrationalSetReal(), SCIProwExactGetNNonz(), and SCIProwExactGetVals().
Referenced by propagateCons(), and tightenVarBounds().
|
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 4260 of file cons_exactlinear.c.
References assert(), consdataGetActivityResiduals(), cutoff, FALSE, getInferInt(), SCIP_Interval::inf, NULL, printActivityConflictToCertificate(), PROPRULE_1_LHS, PROPRULE_1_RHS, SCIP_Bool, SCIP_BOUNDTYPE_LOWER, SCIP_BOUNDTYPE_UPPER, SCIP_CALL, SCIP_Longint, SCIP_OKAY, SCIP_Real, SCIP_VARSTATUS_FIXED, SCIP_VARSTATUS_MULTAGGR, SCIP_VARTYPE_CONTINUOUS, SCIPadjustedVarLbExactFloat(), SCIPadjustedVarUbExactFloat(), SCIPbuffer(), SCIPcertifyActivityVarBound(), SCIPcertifyActivityVarBoundExact(), SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconsGetName(), SCIPconshdlrGetData(), SCIPconsIsModifiable(), SCIPdebug, SCIPdebugMsg, SCIPinferVarLbCons(), SCIPinferVarLbConsExact(), SCIPinferVarUbCons(), SCIPinferVarUbConsExact(), SCIPinfinity(), SCIPintervalDiv(), SCIPintervalGetRoundingMode(), SCIPintervalSet(), SCIPintervalSetRoundingMode(), SCIPintervalSetRoundingModeDownwards(), SCIPintervalSetRoundingModeUpwards(), SCIPintervalSubScalar(), SCIPisFeasGT(), SCIPisFeasLT(), SCIPisGT(), SCIPisInfinity(), SCIPisLbBetter(), SCIPisLE(), SCIPisLT(), SCIPisUbBetter(), SCIPrationalComputeApproximation(), SCIPrationalCreateBuffer(), SCIPrationalFreeBuffer(), SCIPrationalSetReal(), SCIPshouldCertificateTrackBounds(), SCIPvarGetLbLocal(), SCIPvarGetName(), SCIPvarGetProbvarBound(), SCIPvarGetStatus(), SCIPvarGetType(), SCIPvarGetUbLocal(), SCIPvarIsIntegral(), SCIP_Interval::sup, TRUE, and var.
Referenced by tightenBounds().
|
static |
tightens bounds of variables in constraint due to activity bounds
| scip | SCIP data structure |
| cons | linear constraint |
| sortvars | should variables be used in sorted order? |
| cutoff | pointer to store whether the node can be cut off |
| nchgbds | pointer to count the total number of tightened bounds |
Definition at line 4654 of file cons_exactlinear.c.
References assert(), checkMaxActivityDelta, consdataGetActivityBounds(), consdataRecomputeMaxActivityDelta(), consdataSort(), cutoff, FALSE, MAXTIGHTENROUNDS, MIN, NULL, nvars, SCIP_Bool, SCIP_CALL, SCIP_INVALID, SCIP_OKAY, SCIP_Real, SCIP_STAGE_INITSOLVE, SCIPconsGetData(), SCIPconsGetName(), SCIPconsIsModifiable(), SCIPdebugMsg, SCIPgetDepth(), SCIPgetStage(), SCIPinfinity(), SCIPisFeasEQ(), SCIPisFeasNegative(), SCIPisFeasZero(), SCIPisInfinity(), SCIPvarGetLbLocal(), SCIPvarGetUbLocal(), and tightenVarBounds().
Referenced by propagateCons().
|
static |
checks linear constraint for feasibility of given solution or current solution
| scip | SCIP data structure |
| cons | linear constraint |
| conshdlrdata | constraint handler data |
| sol | solution to be checked, or NULL for current solution |
| useexactsol | should the sol or solex be checked? |
| checklprows | Do constraints represented by rows in the current LP have to be checked? |
| violated | pointer to store whether the constraint is violated |
Definition at line 4803 of file cons_exactlinear.c.
References assert(), consdataComputePseudoActivity(), consdataComputeSolActivityWithErrorbound(), consdataGetActivity(), consPrintConsSol(), FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPconsGetData(), SCIPconsGetName(), SCIPdebug, SCIPdebugMsg, SCIPgetRowSolActivityExact(), SCIPhasCurrentNodeLP(), SCIPincConsAge(), SCIPlpExactIsSolved(), SCIPrationalDebugMessage, SCIPrationalIsEQ(), SCIPrationalIsGT(), SCIPrationalIsInfinity(), SCIPrationalIsLT(), SCIPrationalIsNegInfinity(), SCIPresetConsAge(), SCIProwExactIsInLP(), sol, and TRUE.
Referenced by enforceConstraint(), SCIP_DECL_CONSCHECK(), SCIP_DECL_CONSENFOPS(), and separateCons().
|
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 4965 of file cons_exactlinear.c.
References assert(), createRows(), cutoff, FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPaddRow(), SCIPaddRowExact(), SCIPconsGetData(), SCIPconsGetName(), SCIPdebug, SCIPdebugMsg, SCIPgetIntParam(), SCIPprintRow(), SCIPprintRowExact(), SCIPrationalIsInfinity(), SCIPrationalIsNegInfinity(), and SCIProwIsInLP().
Referenced by enforceConstraint(), SCIP_DECL_CONSINITLP(), and separateCons().
|
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 |
| ncuts | pointer to add up the number of found cuts |
| cutoff | pointer to store whether a cutoff was found |
Definition at line 5022 of file cons_exactlinear.c.
References addRelaxation(), assert(), checkCons(), cutoff, FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPresetConsAge(), 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? |
| 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 5063 of file cons_exactlinear.c.
References assert(), consCatchAllEvents(), consdataGetActivityBounds(), cutoff, FALSE, NULL, printActivityConflictToCertificate(), SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconsGetName(), SCIPconshdlrGetData(), SCIPconsIsInitial(), SCIPconsIsModifiable(), SCIPdelCons(), SCIPdelConsLocal(), SCIPincConsAge(), SCIPinRepropagation(), SCIPrationalDebugMessage, SCIPrationalIsGEReal(), SCIPrationalIsGTReal(), SCIPrationalIsLEReal(), SCIPrationalIsLTReal(), SCIPresetConsAge(), tightenBounds(), and TRUE.
Referenced by SCIP_DECL_CONSPROP().
|
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 5204 of file cons_exactlinear.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(), SCIPdebug, SCIPdebugMsg, SCIPlpExactIsSolved(), SCIPprintSol(), SCIPsolIsExact(), and sol.
Referenced by SCIP_DECL_CONSENFOLP(), and SCIP_DECL_CONSENFORELAX().
|
static |
copy method for constraint handler plugins (called when SCIP copies plugins)
Definition at line 5284 of file cons_exactlinear.c.
References assert(), CONSHDLR_NAME, NULL, SCIP_CALL, SCIP_OKAY, SCIPconshdlrGetName(), SCIPincludeConshdlrExactLinear(), TRUE, and valid.
|
static |
destructor of constraint handler to free constraint handler data (called when SCIP is exiting)
Definition at line 5300 of file cons_exactlinear.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 5322 of file cons_exactlinear.c.
References assert(), c, consCatchAllEvents(), NULL, SCIP_CALL, SCIP_OKAY, SCIPconshdlrGetData(), and SCIPisExact().
|
static |
deinitialization method of constraint handler (called before transformed problem is freed)
Definition at line 5349 of file cons_exactlinear.c.
References assert(), c, consDropAllEvents(), NULL, SCIP_CALL, SCIP_OKAY, SCIPconsGetData(), SCIPconshdlrGetData(), and SCIPisExact().
|
static |
presolving deinitialization method of constraint handler (called after presolving has been finished)
Definition at line 5383 of file cons_exactlinear.c.
References applyFixings(), assert(), c, NULL, SCIP_CALL, SCIP_OKAY, SCIPconsIsDeleted(), and SCIPisExact().
|
static |
solving process deinitialization method of constraint handler (called before branch and bound process data is freed)
Definition at line 5406 of file cons_exactlinear.c.
References assert(), c, NULL, SCIP_CALL, SCIP_OKAY, SCIPconsGetData(), SCIPisExact(), SCIPreleaseRow(), and SCIPreleaseRowExact().
|
static |
constraint deactivation notification method of constraint handler
Definition at line 5447 of file cons_exactlinear.c.
References assert(), consDropAllEvents(), CONSHDLR_NAME, NULL, SCIP_CALL, SCIP_OKAY, SCIPconsGetData(), SCIPconshdlrGetData(), SCIPconshdlrGetName(), SCIPconsIsDeleted(), and SCIPisExact().
|
static |
frees specific constraint data
Definition at line 5485 of file cons_exactlinear.c.
References assert(), consdataFree(), consDropAllEvents(), CONSHDLR_NAME, NULL, SCIP_CALL, SCIP_OKAY, SCIPconshdlrGetData(), SCIPconshdlrGetName(), and SCIPisExact().
|
static |
transforms constraint data into data belonging to the transformed problem
Definition at line 5512 of file cons_exactlinear.c.
References assert(), consdataCreate(), consdataScaleMinValue(), CONSHDLR_NAME, NULL, SCIP_CALL, SCIP_OKAY, SCIP_STAGE_TRANSFORMING, SCIPconsGetData(), SCIPconsGetName(), SCIPconshdlrGetName(), SCIPconsIsChecked(), SCIPconsIsDynamic(), SCIPconsIsEnforced(), SCIPconsIsInitial(), SCIPconsIsLocal(), SCIPconsIsModifiable(), SCIPconsIsPropagated(), SCIPconsIsRemovable(), SCIPconsIsSeparated(), SCIPconsIsStickingAtNode(), SCIPcreateCons(), SCIPepsilon(), SCIPgetStage(), and SCIPisExact().
|
static |
LP initialization method of constraint handler (called before the initial LP relaxation at a node is solved)
Definition at line 5548 of file cons_exactlinear.c.
References addRelaxation(), assert(), c, CONSHDLR_NAME, FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPconshdlrGetName(), SCIPconsIsInitial(), and SCIPisExact().
|
static |
separation method of constraint handler for LP solutions
Definition at line 5570 of file cons_exactlinear.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, SCIPconsGetName(), SCIPconshdlrGetData(), SCIPconshdlrGetName(), SCIPdebugMsg, SCIPgetDepth(), SCIPgetNSepaRounds(), SCIPisExact(), and separateCons().
|
static |
separation method of constraint handler for arbitrary primal solutions
Definition at line 5627 of file cons_exactlinear.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, SCIPconsGetName(), SCIPconshdlrGetData(), SCIPconshdlrGetName(), SCIPdebugMsg, SCIPgetDepth(), SCIPgetNSepaRounds(), SCIPisExact(), separateCons(), and sol.
|
static |
constraint enforcing method of constraint handler for LP solutions
Definition at line 5684 of file cons_exactlinear.c.
References assert(), enforceConstraint(), NULL, result, SCIP_CALL, SCIP_OKAY, and SCIPisExact().
|
static |
constraint enforcing method of constraint handler for relaxation solutions
Definition at line 5699 of file cons_exactlinear.c.
References assert(), enforceConstraint(), NULL, result, SCIP_CALL, SCIP_OKAY, SCIPisExact(), and sol.
|
static |
constraint enforcing method of constraint handler for pseudo solutions
Definition at line 5714 of file cons_exactlinear.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, SCIPisExact(), and TRUE.
|
static |
feasibility check method of constraint handler for integral solutions
Definition at line 5766 of file cons_exactlinear.c.
References assert(), c, checkCons(), consdataGetActivity(), CONSHDLR_NAME, consPrintConsSol(), FALSE, NULL, result, SCIP_Bool, SCIP_CALL, SCIP_FEASIBLE, SCIP_INFEASIBLE, SCIP_OKAY, SCIPbuffer(), SCIPconsGetData(), SCIPconshdlrGetData(), SCIPconshdlrGetName(), SCIPgetMessagehdlr(), SCIPinfoMessage(), SCIPisExact(), SCIPrationalCreateBuffer(), SCIPrationalDiff(), SCIPrationalFreeBuffer(), SCIPrationalIsAbsInfinity(), SCIPrationalIsGT(), SCIPrationalIsLT(), SCIPrationalMessage(), SCIPsolIsExact(), and sol.
|
static |
domain propagation method of constraint handler
Definition at line 5841 of file cons_exactlinear.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(), SCIPisExact(), SCIPunmarkConsPropagate(), and TRUE.
|
static |
variable rounding lock method of constraint handler
Definition at line 5903 of file cons_exactlinear.c.
References assert(), i, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPaddVarLocksType(), SCIPconsGetData(), SCIPisExact(), SCIPrationalIsInfinity(), SCIPrationalIsNegInfinity(), and SCIPrationalIsPositive().
|
static |
variable deletion method of constraint handler
Definition at line 5952 of file cons_exactlinear.c.
References assert(), NULL, performVarDeletions(), SCIP_CALL, SCIP_OKAY, and SCIPisExact().
|
static |
constraint display method of constraint handler
Definition at line 5969 of file cons_exactlinear.c.
References assert(), consdataPrint(), NULL, SCIP_CALL, SCIP_OKAY, and SCIPconsGetData().
|
static |
constraint copying method of constraint handler
Definition at line 5982 of file cons_exactlinear.c.
References assert(), FALSE, NULL, nvars, propagate, SCIP_CALL, SCIP_OKAY, SCIPconsGetName(), SCIPcopyConsExactLinear(), SCIPgetLhsExactLinear(), SCIPgetNVarsExactLinear(), SCIPgetRhsExactLinear(), SCIPgetValsRealExactLinear(), SCIPgetVarsExactLinear(), SCIPrationalGetReal(), separate(), and valid.
|
static |
| 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 6015 of file cons_exactlinear.c.
References assert(), FALSE, NULL, SCIP_Bool, SCIP_OKAY, SCIPerrorMessage, and TRUE.
Referenced by SCIP_DECL_CONSPARSE().
|
static |
constraint parsing method of constraint handler
Definition at line 6116 of file cons_exactlinear.c.
References assert(), FALSE, findOperators(), NULL, nvars, propagate, SCIP_Bool, SCIP_CALL, SCIP_CALL_TERMINATE, SCIP_OKAY, SCIP_READERROR, SCIPallocBufferArray, SCIPbuffer(), SCIPcreateConsExactLinear(), SCIPerrorMessage, SCIPfreeBufferArrayNull, SCIPparseRational(), SCIPparseVarsLinearsumExact(), SCIPrationalCreateBuffer(), SCIPrationalCreateBufferArray(), SCIPrationalFreeBuffer(), SCIPrationalFreeBufferArray(), SCIPrationalReallocBufferArray(), SCIPrationalSetInfinity(), SCIPrationalSetNegInfinity(), SCIPrationalSetRational(), SCIPreallocBufferArray, SCIPskipSpace(), separate(), and vars.
|
static |
constraint method of constraint handler which returns the variables (if possible)
Definition at line 6287 of file cons_exactlinear.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 6310 of file cons_exactlinear.c.
References assert(), NULL, SCIP_OKAY, SCIPconsGetData(), and TRUE.
|
static |
! [Callback for the number of variables]
Definition at line 6329 of file cons_exactlinear.c.
References assert(), consdataInvalidateActivities(), consdataUpdateActivitiesGlbLb(), consdataUpdateActivitiesGlbUb(), consdataUpdateActivitiesLb(), consdataUpdateActivitiesUb(), EVENTHDLR_NAME, FALSE, NULL, SCIP_Bool, 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(), SCIPintervalAbsMax(), SCIPisExact(), SCIPisGT(), SCIPisInfinity(), SCIPmarkConsPropagate(), SCIPvarGetLbGlobal(), SCIPvarGetLbLocal(), SCIPvarGetNLocksDownType(), SCIPvarGetNLocksUpType(), SCIPvarGetUbGlobal(), SCIPvarGetUbLocal(), SCIPvarIsBinary(), SCIP_Interval::sup, TRUE, updateActivities(), and var.