Detailed Description
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 |
Typedefs | |
| typedef enum Proprule | PROPRULE |
| typedef struct InferInfo | INFERINFO |
Enumerations | |
| enum | Proprule { PROPRULE_INVALID = 0 , PROPRULE_1 = 1 , PROPRULE_2 = 2 , PROPRULE_3 = 3 , PROPRULE_4 = 4 , PROPRULE_0_INVALID = 0 , PROPRULE_1_CORETIMES = 1 , PROPRULE_2_EDGEFINDING = 2 , PROPRULE_3_TTEF = 3 , PROPRULE_1_RHS = 1 , PROPRULE_1_LHS = 2 , PROPRULE_1_RANGEDROW = 3 , PROPRULE_INVALID = 0 , PROPRULE_1_RHS = 1 , PROPRULE_1_LHS = 2 , PROPRULE_1_RANGEDROW = 3 , PROPRULE_INVALID = 0 , PROPRULE_1 = 0 , PROPRULE_2 = 1 , PROPRULE_3 = 2 , PROPRULE_4 = 3 , PROPRULE_INVALID = 4 , PROPRULE_1 , PROPRULE_2 , PROPRULE_3 , PROPRULE_4 , PROPRULE_0 , PROPRULE_1 , PROPRULE_INTLB , PROPRULE_INTUB , PROPRULE_INVALID } |
Macro Definition Documentation
◆ CONSHDLR_NAME
| #define CONSHDLR_NAME "exactlinear" |
Definition at line 84 of file cons_exactlinear.c.
◆ CONSHDLR_DESC
Definition at line 85 of file cons_exactlinear.c.
◆ CONSHDLR_SEPAPRIORITY
| #define CONSHDLR_SEPAPRIORITY +100000 |
priority of the constraint handler for separation
Definition at line 86 of file cons_exactlinear.c.
◆ CONSHDLR_ENFOPRIORITY
| #define CONSHDLR_ENFOPRIORITY -1000000 |
priority of the constraint handler for constraint enforcing
Definition at line 87 of file cons_exactlinear.c.
◆ CONSHDLR_CHECKPRIORITY
| #define CONSHDLR_CHECKPRIORITY -1000000 |
priority of the constraint handler for checking feasibility
Definition at line 88 of file cons_exactlinear.c.
◆ CONSHDLR_SEPAFREQ
| #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.
◆ CONSHDLR_PROPFREQ
| #define CONSHDLR_PROPFREQ 1 |
frequency for propagating domains; zero means only preprocessing propagation
Definition at line 90 of file cons_exactlinear.c.
◆ CONSHDLR_EAGERFREQ
| #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 92 of file cons_exactlinear.c.
◆ CONSHDLR_DELAYSEPA
| #define CONSHDLR_DELAYSEPA FALSE |
should separation method be delayed, if other separators found cuts?
Definition at line 93 of file cons_exactlinear.c.
◆ CONSHDLR_DELAYPROP
| #define CONSHDLR_DELAYPROP FALSE |
should propagation method be delayed, if other propagators found reductions?
Definition at line 94 of file cons_exactlinear.c.
◆ CONSHDLR_NEEDSCONS
| #define CONSHDLR_NEEDSCONS TRUE |
should the constraint handler be skipped, if no constraints are available?
Definition at line 95 of file cons_exactlinear.c.
◆ CONSHDLR_PROP_TIMING
| #define CONSHDLR_PROP_TIMING SCIP_PROPTIMING_BEFORELP |
Definition at line 97 of file cons_exactlinear.c.
◆ EVENTHDLR_NAME
| #define EVENTHDLR_NAME "exactlinear" |
Definition at line 99 of file cons_exactlinear.c.
◆ EVENTHDLR_DESC
| #define EVENTHDLR_DESC "bound change event handler for exact linear constraints" |
Definition at line 100 of file cons_exactlinear.c.
◆ DEFAULT_TIGHTENBOUNDSFREQ
| #define DEFAULT_TIGHTENBOUNDSFREQ 1 |
multiplier on propagation frequency, how often the bounds are tightened
Definition at line 102 of file cons_exactlinear.c.
◆ DEFAULT_MAXROUNDS
| #define DEFAULT_MAXROUNDS 5 |
maximal number of separation rounds per node (-1: unlimited)
Definition at line 103 of file cons_exactlinear.c.
◆ DEFAULT_MAXROUNDSROOT
| #define DEFAULT_MAXROUNDSROOT -1 |
maximal number of separation rounds in the root node (-1: unlimited)
Definition at line 104 of file cons_exactlinear.c.
◆ DEFAULT_MAXSEPACUTS
| #define DEFAULT_MAXSEPACUTS 50 |
maximal number of cuts separated per separation round
Definition at line 105 of file cons_exactlinear.c.
◆ DEFAULT_MAXSEPACUTSROOT
| #define DEFAULT_MAXSEPACUTSROOT 200 |
maximal number of cuts separated per separation round in root node
Definition at line 106 of file cons_exactlinear.c.
◆ DEFAULT_SORTVARS
| #define DEFAULT_SORTVARS TRUE |
should variables be sorted after presolve w.r.t their coefficient absolute for faster propagation?
Definition at line 108 of file cons_exactlinear.c.
◆ DEFAULT_LIMITDENOM
| #define DEFAULT_LIMITDENOM FALSE |
should denominator sizes for continuous variables be controlled?
Definition at line 109 of file cons_exactlinear.c.
◆ DEFAULT_BOUNDMAXDENOM
| #define DEFAULT_BOUNDMAXDENOM 256L |
maximal denominator for rational bounds on continuous variables after propagation
Definition at line 110 of file cons_exactlinear.c.
◆ checkMaxActivityDelta
| #define checkMaxActivityDelta | ( | scip, | |
| consdata | |||
| ) |
Definition at line 1438 of file cons_exactlinear.c.
◆ MAXTIGHTENROUNDS
| #define MAXTIGHTENROUNDS 10 |
Definition at line 4650 of file cons_exactlinear.c.
Typedef Documentation
◆ PROPRULE
Definition at line 255 of file cons_exactlinear.c.
◆ INFERINFO
| typedef struct InferInfo INFERINFO |
Definition at line 271 of file cons_exactlinear.c.
Enumeration Type Documentation
◆ Proprule
| enum Proprule |
Definition at line 245 of file cons_exactlinear.c.
Function Documentation
◆ inferInfoToInt()
|
static |
converts an inference information into an int
- Parameters
-
inferinfo inference information to convert
Definition at line 276 of file cons_exactlinear.c.
Referenced by getInferInt().
◆ getInferInfo()
constructs an inference information out of a propagation rule and a position number
- Parameters
-
proprule propagation rule that deduced the value pos variable position, the propagation rule was applied at
Definition at line 286 of file cons_exactlinear.c.
Referenced by getInferInt().
◆ getInferInt()
|
static |
constructs an inference information out of a propagation rule and a position number, returns info as int
- Parameters
-
proprule propagation rule that deduced the value pos variable position, the propagation rule was applied at
Definition at line 305 of file cons_exactlinear.c.
References getInferInfo(), and inferInfoToInt().
Referenced by tightenVarBounds().
◆ consdataEnsureVarsSize()
|
static |
ensures, that vars and vals arrays can store at least num entries
- Parameters
-
scip SCIP data structure consdata linear constraint data num minimum number of entries to store
Definition at line 315 of file cons_exactlinear.c.
References NULL, SCIP_CALL, SCIP_OKAY, SCIPblkmem(), SCIPcalcMemGrowSize(), SCIPrationalCreateBlock(), and SCIPreallocBlockMemoryArray.
Referenced by addCoef().
◆ conshdlrdataCreate()
|
static |
creates constraint handler data for linear constraint handler
- Parameters
-
scip SCIP data structure conshdlrdata pointer to store the constraint handler data eventhdlr event handler
Definition at line 356 of file cons_exactlinear.c.
References NULL, SCIP_CALL, SCIP_OKAY, SCIPallocBlockMemory, SCIPblkmem(), and SCIPrationalCreateBlock().
Referenced by SCIPincludeConshdlrExactLinear().
◆ conshdlrdataFree()
|
static |
frees constraint handler data for linear constraint handler
- Parameters
-
scip SCIP data structure conshdlrdata pointer to the constraint handler data
Definition at line 388 of file cons_exactlinear.c.
References NULL, SCIPblkmem(), SCIPfreeBlockMemory, and SCIPrationalFreeBlock().
Referenced by SCIP_DECL_CONSFREE().
◆ lockRounding()
|
static |
installs rounding locks for the given variable associated to the given coefficient in the linear constraint
- Parameters
-
scip SCIP data structure cons linear constraint var variable of constraint entry val coefficient of constraint entry
Definition at line 411 of file cons_exactlinear.c.
References NULL, SCIP_CALL, SCIP_OKAY, SCIPconsGetData(), SCIPlockVarCons(), SCIPrationalIsInfinity(), SCIPrationalIsNegInfinity(), SCIPrationalIsPositive(), and SCIPrationalIsZero().
Referenced by addCoef(), and chgCoefPos().
◆ unlockRounding()
|
static |
removes rounding locks for the given variable associated to the given coefficient in the linear constraint
- Parameters
-
scip SCIP data structure cons linear constraint var variable of constraint entry val coefficient of constraint entry
Definition at line 444 of file cons_exactlinear.c.
References NULL, SCIP_CALL, SCIP_OKAY, SCIPconsGetData(), SCIPrationalIsInfinity(), SCIPrationalIsNegInfinity(), SCIPrationalIsPositive(), SCIPrationalIsZero(), and SCIPunlockVarCons().
Referenced by chgCoefPos(), and delCoefPos().
◆ consCatchEvent()
|
static |
creates event data for variable at given position, and catches events ! [SnippetDebugAssertions]
- Parameters
-
scip SCIP data structure cons linear constraint eventhdlr event handler to call for the event processing pos array position of variable to catch bound change events for
Definition at line 478 of file cons_exactlinear.c.
References NULL, 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().
◆ consDropEvent()
|
static |
! [SnippetDebugAssertions] deletes event data for variable at given position, and drops events
- Parameters
-
scip SCIP data structure cons linear constraint eventhdlr event handler to call for the event processing pos array position of variable to catch bound change events for
Definition at line 519 of file cons_exactlinear.c.
References NULL, 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().
◆ consCatchAllEvents()
|
static |
catches bound change events for all variables in transformed linear constraint
- Parameters
-
scip SCIP data structure cons linear constraint eventhdlr event handler to call for the event processing
Definition at line 553 of file cons_exactlinear.c.
References BMSclearMemoryArray, consCatchEvent(), NULL, SCIP_CALL, SCIP_OKAY, SCIPallocBlockMemoryArray, and SCIPconsGetData().
Referenced by applyFixings(), propagateCons(), and SCIP_DECL_CONSINIT().
◆ consDropAllEvents()
|
static |
drops bound change events for all variables in transformed linear constraint
- Parameters
-
scip SCIP data structure cons linear constraint eventhdlr event handler to call for the event processing
Definition at line 585 of file cons_exactlinear.c.
References consDropEvent(), NULL, SCIP_CALL, SCIP_OKAY, SCIPconsGetData(), and SCIPfreeBlockMemoryArray.
Referenced by SCIP_DECL_CONSDEACTIVE(), SCIP_DECL_CONSDELETE(), and SCIP_DECL_CONSEXIT().
◆ consdataCreate()
|
static |
creates a linear constraint data
- Parameters
-
scip SCIP data structure consdata pointer to linear constraint data nvars number of nonzeros in the constraint vars array with variables of constraint entries vals array with coefficients of constraint entries lhs left hand side of row rhs right hand side of row
Definition at line 616 of file cons_exactlinear.c.
References FALSE, NULL, 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(), and TRUE.
Referenced by SCIP_DECL_CONSTRANS(), and SCIPcreateConsExactLinear().
◆ consdataFree()
|
static |
frees a linear constraint data
- Parameters
-
scip SCIP data structure consdata pointer to linear constraint data
Definition at line 822 of file cons_exactlinear.c.
References NULL, SCIP_CALL, SCIP_OKAY, SCIPblkmem(), SCIPfreeBlockMemory, SCIPfreeBlockMemoryArrayNull, SCIPrationalFreeBlock(), SCIPrationalFreeBlockArray(), SCIPrationalIsZero(), SCIPreleaseRow(), and SCIPreleaseVar().
Referenced by SCIP_DECL_CONSDELETE().
◆ consdataPrint()
|
static |
prints linear constraint in CIP format to file stream
- Parameters
-
scip SCIP data structure consdata linear constraint data file output file (or NULL for standard output)
Definition at line 870 of file cons_exactlinear.c.
References NULL, SCIP_CALL, SCIP_OKAY, SCIPgetMessagehdlr(), SCIPinfoMessage(), SCIPrationalIsEQ(), SCIPrationalIsInfinity(), SCIPrationalIsNegInfinity(), SCIPrationalMessage(), SCIPwriteVarsLinearsumExact(), and TRUE.
Referenced by SCIP_DECL_CONSPRINT().
◆ consPrintConsSol()
|
static |
prints linear constraint and contained solution values of variables to file stream
- Parameters
-
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 NULL, SCIP_CALL, SCIP_OKAY, SCIPbuffer(), SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconsGetName(), SCIPconshdlrGetName(), SCIPgetMessagehdlr(), SCIPgetSolVal(), SCIPgetSolValExact(), SCIPinfoMessage(), SCIPmessageFPrintInfo(), SCIPrationalCreateBuffer(), SCIPrationalFreeBuffer(), SCIPrationalIsEQ(), SCIPrationalIsEQReal(), SCIPrationalIsInfinity(), SCIPrationalIsNegInfinity(), SCIPrationalMessage(), SCIPwriteVarName(), and TRUE.
Referenced by checkCons(), and SCIP_DECL_CONSCHECK().
◆ consdataInvalidateActivities()
|
static |
invalidates activity bounds, such that they are recalculated in next get
- Parameters
-
consdata linear constraint
Definition at line 1023 of file cons_exactlinear.c.
References FALSE, NULL, SCIP_INVALID, and SCIPrationalSetInfinity().
Referenced by consdataScaleMinValue(), createRows(), and SCIP_DECL_EVENTEXEC().
◆ consdataComputePseudoActivity()
|
static |
computes the pseudo activity of a constraint
- Parameters
-
consdata linear constraint data pseudoactivity buffer to store pseudoactivity
Definition at line 1071 of file cons_exactlinear.c.
References bound, SCIPrationalAddProd(), SCIPrationalIsInfinity(), SCIPrationalIsNegative(), SCIPrationalIsNegInfinity(), SCIPrationalIsZero(), SCIPrationalSetFraction(), SCIPrationalSetInfinity(), SCIPrationalSetNegInfinity(), and SCIPvarGetBestBoundLocalExact().
Referenced by checkCons(), and consdataGetActivity().
◆ consdataRecomputeMinactivity()
|
static |
recompute the minactivity of a constraint
- Parameters
-
scip SCIP data structure consdata linear constraint data
Definition at line 1120 of file cons_exactlinear.c.
References REALABS, SCIP_Real, SCIPintervalGetRoundingMode(), SCIPintervalSetRoundingMode(), SCIPintervalSetRoundingModeDownwards(), SCIPisHugeValue(), SCIPisInfinity(), SCIPvarGetLbLocal(), SCIPvarGetUbLocal(), and TRUE.
Referenced by getMinActivity(), and printActivityConflictToCertificate().
◆ consdataRecomputeMaxactivity()
|
static |
recompute the maxactivity of a constraint
- Parameters
-
scip SCIP data structure consdata linear constraint data
Definition at line 1172 of file cons_exactlinear.c.
References REALABS, SCIP_Real, SCIPintervalGetRoundingMode(), SCIPintervalSetRoundingMode(), SCIPintervalSetRoundingModeUpwards(), SCIPisHugeValue(), SCIPisInfinity(), SCIPvarGetLbLocal(), SCIPvarGetUbLocal(), and TRUE.
Referenced by getMaxActivity(), and printActivityConflictToCertificate().
◆ consdataRecomputeGlbMinactivity()
|
static |
recompute the global minactivity of a constraint
- Parameters
-
scip SCIP data structure consdata linear constraint data
Definition at line 1225 of file cons_exactlinear.c.
References REALABS, SCIP_Real, SCIPintervalGetRoundingMode(), SCIPintervalSetRoundingMode(), SCIPintervalSetRoundingModeDownwards(), SCIPisHugeValue(), SCIPisInfinity(), SCIPvarGetLbGlobal(), SCIPvarGetUbGlobal(), and TRUE.
Referenced by getMinActivity().
◆ consdataRecomputeGlbMaxactivity()
|
static |
recompute the global maxactivity of a constraint
- Parameters
-
scip SCIP data structure consdata linear constraint data
Definition at line 1278 of file cons_exactlinear.c.
References REALABS, SCIP_Real, SCIPintervalGetRoundingMode(), SCIPintervalSetRoundingMode(), SCIPintervalSetRoundingModeUpwards(), SCIPisHugeValue(), SCIPisInfinity(), SCIPvarGetLbGlobal(), SCIPvarGetUbGlobal(), and TRUE.
Referenced by getMaxActivity().
◆ consdataCalcMinAbsvalEx()
|
static |
calculates minimum absolute value of coefficients
- Parameters
-
consdata linear constraint data
Definition at line 1330 of file cons_exactlinear.c.
References NULL, SCIPrationalAbs(), SCIPrationalIsAbsGT(), SCIPrationalIsZero(), SCIPrationalSetReal(), and TRUE.
Referenced by consdataGetMinAbsvalEx().
◆ consdataCheckNonbinvar()
|
static |
checks the type of all variables of the constraint and sets hasnonbinvar and hascontvar flags accordingly
- Parameters
-
consdata linear constraint data
Definition at line 1359 of file cons_exactlinear.c.
References FALSE, SCIP_VARTYPE_BINARY, SCIP_VARTYPE_CONTINUOUS, SCIPvarGetType(), and TRUE.
Referenced by consdataRecomputeMaxActivityDelta().
◆ consdataRecomputeMaxActivityDelta()
|
static |
recompute maximal activity contribution for a single variable
- Parameters
-
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().
◆ consdataUpdateActivities()
|
static |
updates activities for a change in a bound
- Parameters
-
scip SCIP data structure consdata linear constraint data var variable that has been changed; can be NULL for global bound changes oldbound old bound of variable newbound new bound of variable 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 SCIP_Interval::inf, NULL, REALABS, SCIP_Bool, SCIP_BOUNDTYPE_LOWER, SCIP_INVALID, SCIP_Real, SCIPintervalGetRoundingMode(), SCIPintervalNegateReal(), SCIPintervalSetRoundingMode(), SCIPintervalSetRoundingModeDownwards(), SCIPintervalSetRoundingModeUpwards(), SCIPisHugeValue(), SCIPisInfinity(), and SCIP_Interval::sup.
Referenced by consdataUpdateActivitiesGlbLb(), consdataUpdateActivitiesGlbUb(), consdataUpdateActivitiesLb(), and consdataUpdateActivitiesUb().
◆ consdataUpdateActivitiesLb()
|
static |
updates minimum and maximum activity for a change in lower bound
- Parameters
-
scip SCIP data structure consdata linear constraint data var variable that has been changed oldlb old lower bound of variable newlb new lower bound of variable val coefficient of constraint entry
Definition at line 1909 of file cons_exactlinear.c.
References consdataUpdateActivities(), FALSE, NULL, SCIP_BOUNDTYPE_LOWER, and SCIPisInfinity().
Referenced by consdataUpdateAddCoef(), consdataUpdateDelCoef(), and SCIP_DECL_EVENTEXEC().
◆ consdataUpdateActivitiesUb()
|
static |
updates minimum and maximum activity for a change in upper bound
- Parameters
-
scip SCIP data structure consdata linear constraint data var variable that has been changed oldub old upper bound of variable newub new upper bound of variable val coefficient of constraint entry
Definition at line 1933 of file cons_exactlinear.c.
References consdataUpdateActivities(), FALSE, NULL, SCIP_BOUNDTYPE_UPPER, and SCIPisInfinity().
Referenced by consdataUpdateAddCoef(), consdataUpdateDelCoef(), and SCIP_DECL_EVENTEXEC().
◆ consdataUpdateActivitiesGlbLb()
|
static |
updates minimum and maximum global activity for a change in the global lower bound
- Parameters
-
scip SCIP data structure consdata linear constraint data oldlb old lower bound of variable newlb new lower bound of variable val coefficient of constraint entry
Definition at line 1957 of file cons_exactlinear.c.
References consdataUpdateActivities(), NULL, SCIP_BOUNDTYPE_LOWER, SCIPisInfinity(), and TRUE.
Referenced by consdataUpdateAddCoef(), consdataUpdateDelCoef(), and SCIP_DECL_EVENTEXEC().
◆ consdataUpdateActivitiesGlbUb()
|
static |
updates minimum and maximum global activity for a change in global upper bound
- Parameters
-
scip SCIP data structure consdata linear constraint data oldub old upper bound of variable newub new upper bound of variable val coefficient of constraint entry
Definition at line 1979 of file cons_exactlinear.c.
References consdataUpdateActivities(), NULL, SCIP_BOUNDTYPE_UPPER, SCIPisInfinity(), and TRUE.
Referenced by consdataUpdateAddCoef(), consdataUpdateDelCoef(), and SCIP_DECL_EVENTEXEC().
◆ consdataUpdateAddCoef()
|
static |
updates minimum and maximum activity and maximum absolute value for coefficient addition
- Parameters
-
scip SCIP data structure consdata linear constraint data var variable of constraint entry valExact coefficient of constraint entry val coefficient of constraint entry
Definition at line 2001 of file cons_exactlinear.c.
References consdataUpdateActivitiesGlbLb(), consdataUpdateActivitiesGlbUb(), consdataUpdateActivitiesLb(), consdataUpdateActivitiesUb(), FALSE, SCIP_Interval::inf, MAX, MIN, NULL, REALABS, SCIP_INVALID, SCIP_Real, SCIPrationalIsAbsEQ(), SCIPrationalSetInfinity(), SCIPvarGetLbGlobal(), SCIPvarGetLbLocal(), SCIPvarGetUbGlobal(), SCIPvarGetUbLocal(), and SCIP_Interval::sup.
Referenced by addCoef(), consdataCalcActivities(), and consdataUpdateChgCoef().
◆ consdataUpdateDelCoef()
|
static |
updates minimum and maximum activity for coefficient deletion, invalidates maximum absolute value if necessary
- Parameters
-
scip SCIP data structure consdata linear constraint data var variable of constraint entry valExact exact coefficient of constraint entry val coefficient of constraint entry
Definition at line 2071 of file cons_exactlinear.c.
References consdataUpdateActivitiesGlbLb(), consdataUpdateActivitiesGlbUb(), consdataUpdateActivitiesLb(), consdataUpdateActivitiesUb(), FALSE, NULL, SCIP_INVALID, SCIP_Real, SCIPintervalAbsMax(), SCIPisEQ(), SCIPrationalIsAbsEQ(), SCIPrationalSetInfinity(), SCIPvarGetLbGlobal(), SCIPvarGetLbLocal(), SCIPvarGetUbGlobal(), and SCIPvarGetUbLocal().
Referenced by consdataUpdateChgCoef().
◆ consdataGetMinAbsvalEx()
|
static |
returns the minimum absolute value of all coefficients in the constraint
- Parameters
-
scip SCIP data structure consdata linear constraint data
Definition at line 2148 of file cons_exactlinear.c.
References consdataCalcMinAbsvalEx(), and NULL.
Referenced by consdataScaleMinValue().
◆ consdataUpdateChgCoef()
|
static |
updates minimum and maximum activity for coefficient change, invalidates maximum absolute value if necessary
- Parameters
-
scip SCIP data structure consdata linear constraint data var variable of constraint entry oldval old coefficient of constraint entry 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 consdataUpdateAddCoef(), consdataUpdateDelCoef(), FALSE, NULL, SCIP_INVALID, SCIP_Real, SCIPintervalAbsMax(), SCIPisEQ(), SCIPisInfinity(), SCIPrationalAbs(), SCIPrationalIsAbsEQ(), SCIPrationalIsAbsGT(), SCIPrationalSetInfinity(), SCIPvarGetLbLocal(), and SCIPvarGetUbLocal().
Referenced by chgCoefPos().
◆ consdataScaleMinValue()
|
static |
ensures that every nonzero is a least minval so that we don't get problem with SCIPs 0 in floating point representation
- Parameters
-
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 consdataGetMinAbsvalEx(), consdataInvalidateActivities(), NULL, SCIP_R_ROUND_DOWNWARDS, SCIP_R_ROUND_UPWARDS, SCIPbuffer(), SCIPintervalSetRational(), SCIPrationalCreateBuffer(), SCIPrationalDiv(), SCIPrationalFreeBuffer(), SCIPrationalIsLTReal(), SCIPrationalIsZero(), SCIPrationalMult(), SCIPrationalRoundReal(), and SCIPrationalSetReal().
Referenced by SCIP_DECL_CONSTRANS().
◆ consdataCalcActivities()
|
static |
calculates minimum and maximum local and global activity for constraint from scratch; additionally recalculates maximum absolute value of coefficients
- Parameters
-
scip SCIP data structure consdata linear constraint data
Definition at line 2340 of file cons_exactlinear.c.
References consdataUpdateAddCoef(), NULL, SCIP_INVALID, SCIPintervalAbsMax(), and TRUE.
Referenced by consdataGetActivityBounds(), and consdataGetActivityResiduals().
◆ consdataComputeSolActivityWithErrorbound()
|
static |
computes the activity of a row for a given solution plus a bound on the floating-point error using running error analysis
- Parameters
-
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 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(), and TRUE.
Referenced by checkCons().
◆ getMinActivity()
|
static |
gets minimal activity for constraint and given values of counters for infinite and huge contributions and (if needed) delta to subtract from stored finite part of activity in case of a residual activity
- Parameters
-
scip SCIP data structure consdata linear constraint posinf number of coefficients contributing pos. infinite value neginf number of coefficients contributing neg. infinite value poshuge number of coefficients contributing huge pos. value neghuge number of coefficients contributing huge neg. value delta value to subtract from stored minactivity (contribution of the variable set to zero when getting residual activity) global should the global or local minimal activity be returned? goodrelax should a good relaxation be computed or are relaxed acticities ignored, anyway? minactivity pointer to store the minimal activity isrelax pointer to store whether the activity is a relaxation, i.e. is <= the exact minactivity (in case of huge contributing values) issettoinfinity pointer to store whether minactivity was set to infinity or calculated
Definition at line 2465 of file cons_exactlinear.c.
References consdataRecomputeGlbMinactivity(), consdataRecomputeMinactivity(), FALSE, NULL, SCIP_Real, SCIPgetHugeValue(), SCIPinfinity(), and TRUE.
Referenced by consdataGetActivityBounds(), and consdataGetActivityResiduals().
◆ getMaxActivity()
|
static |
gets maximal activity for constraint and given values of counters for infinite and huge contributions and (if needed) delta to subtract from stored finite part of activity in case of a residual activity
- Parameters
-
scip SCIP data structure consdata linear constraint posinf number of coefficients contributing pos. infinite value neginf number of coefficients contributing neg. infinite value poshuge number of coefficients contributing huge pos. value neghuge number of coefficients contributing huge neg. value delta value to subtract from stored maxactivity (contribution of the variable set to zero when getting residual activity) global should the global or local maximal activity be returned? goodrelax should a good relaxation be computed or are relaxed acticities ignored, anyway? maxactivity pointer to store the maximal activity isrelax pointer to store whether the activity is a relaxation, i.e. is >= the exact maxactivity (in case of huge contributing values) issettoinfinity pointer to store whether maxactivity was set to infinity or calculated
Definition at line 2566 of file cons_exactlinear.c.
References consdataRecomputeGlbMaxactivity(), consdataRecomputeMaxactivity(), FALSE, NULL, SCIP_Real, SCIPgetHugeValue(), SCIPinfinity(), and TRUE.
Referenced by consdataGetActivityBounds(), and consdataGetActivityResiduals().
◆ consdataGetActivityBounds()
|
static |
gets activity bounds for constraint
- Parameters
-
scip SCIP data structure consdata linear constraint goodrelax if we have huge contributions, do we need a good relaxation or are relaxed 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 consdataCalcActivities(), FALSE, getMaxActivity(), getMinActivity(), NULL, and SCIP_INVALID.
Referenced by propagateCons(), and tightenBounds().
◆ consdataGetActivityResiduals()
|
static |
gets activity bounds for constraint after setting variable to zero
- Parameters
-
scip SCIP data structure consdata linear constraint var variable to calculate activity residual for val coefficient value of variable in linear constraint goodrelax if we have huge contributions, do we need a good relaxation or are relaxed acticities ignored, anyway? minresactivity pointer to store the minimal residual activity maxresactivity pointer to store the maximal residual activity minisrelax pointer to store whether the returned residual minactivity is just a relaxation, i.e. <= the exact residual minactivity (in case of huge contributions), or equal to the exact residual minactivity maxisrelax pointer to store whether the returned residual maxactivity is just a relaxation, i.e. <= the exact residual maxactivity (in case of huge contributions), or equal to the exact residual minactivity isminsettoinfinity pointer to store whether minresactivity was set to infinity or calculated ismaxsettoinfinity pointer to store whether maxresactivity was set to infinity or calculated
Definition at line 2714 of file cons_exactlinear.c.
References consdataCalcActivities(), FALSE, getMaxActivity(), getMinActivity(), SCIP_Interval::inf, NULL, SCIP_INVALID, SCIP_Real, SCIPintervalGetRoundingMode(), SCIPintervalSetRoundingMode(), SCIPintervalSetRoundingModeDownwards(), SCIPintervalSetRoundingModeUpwards(), SCIPisHugeValue(), SCIPisInfinity(), SCIPvarGetLbLocal(), SCIPvarGetUbLocal(), and SCIP_Interval::sup.
Referenced by tightenVarBounds().
◆ consdataGetActivity()
|
static |
calculates the activity of the linear constraint for given solution
- Parameters
-
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 consdataComputePseudoActivity(), NULL, SCIP_Bool, SCIPbuffer(), SCIPdebugMsg, SCIPgetSolVal(), SCIPgetSolValExact(), SCIPhasCurrentNodeLP(), SCIPrationalAddProd(), SCIPrationalCreateBuffer(), SCIPrationalDebugMessage, SCIPrationalFreeBuffer(), SCIPrationalGetReal(), SCIPrationalIsInfinity(), SCIPrationalIsNegative(), SCIPrationalIsNegInfinity(), SCIPrationalIsZero(), SCIPrationalSetFraction(), SCIPrationalSetInfinity(), SCIPrationalSetNegInfinity(), and SCIPrationalSetReal().
Referenced by checkCons(), consdataGetFeasibility(), SCIP_DECL_CONSCHECK(), and SCIPgetActivityExactLinear().
◆ consdataGetFeasibility()
|
static |
calculates the feasibility of the linear constraint for given solution
- Parameters
-
scip SCIP data structure consdata linear constraint data sol solution to get feasibility for, NULL to current solution ret pointer to store the result
Definition at line 2944 of file cons_exactlinear.c.
References consdataGetActivity(), FALSE, NULL, SCIPbuffer(), SCIPrationalCreateBuffer(), SCIPrationalDiff(), SCIPrationalFreeBuffer(), and SCIPrationalMin().
Referenced by SCIPgetFeasibilityExactLinear().
◆ createRows()
|
static |
creates an LP row in a linear constraint data
- Parameters
-
scip SCIP data structure cons linear constraint
Definition at line 4916 of file cons_exactlinear.c.
References consdataInvalidateActivities(), NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPaddVarsToRowExact(), SCIPcaptureRowExact(), SCIPconsGetData(), SCIPconsGetName(), SCIPconsIsLocal(), SCIPconsIsModifiable(), SCIPconsIsRemovable(), SCIPcreateEmptyRowCons(), SCIPcreateEmptyRowConsExact(), SCIPgenerateFpRowsFromRowExact(), SCIPinfinity(), and TRUE.
Referenced by addRelaxation().
◆ SCIP_DECL_SORTINDCOMP() [1/2]
|
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 NULL, and SCIPvarCompare().
◆ SCIP_DECL_SORTINDCOMP() [2/2]
|
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 NULL, SCIPrationalCreate(), SCIPrationalDiff(), SCIPrationalFree(), SCIPrationalIsAbsEQ(), SCIPrationalIsAbsGT(), SCIPrationalMult(), SCIPvarGetLbGlobalExact(), SCIPvarGetProbindex(), SCIPvarGetType(), SCIPvarGetUbGlobalExact(), SCIPvarIsBinary(), and SCIPvarIsIntegral().
◆ permSortConsdata()
|
static |
permutes the constraint's variables according to a given permutation.
- Parameters
-
consdata the constraint data perm the target permutation nvars the number of variables
Definition at line 3132 of file cons_exactlinear.c.
References NULL.
Referenced by consdataSort().
◆ consdataSort()
|
static |
sorts linear constraint's variables depending on the stage of the solving process:
- during PRESOLVING sorts variables by binary, integer, implied integral, and continuous variables, and the variables of the same type by non-decreasing variable index
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.
- Parameters
-
scip SCIP data structure consdata linear constraint data
Definition at line 3212 of file cons_exactlinear.c.
References FALSE, NULL, permSortConsdata(), SCIP_CALL, SCIP_OKAY, SCIP_STAGE_INITSOLVE, SCIPallocBufferArray, SCIPfreeBufferArray, SCIPgetStage(), SCIPsort(), SCIPvarIsBinary(), and TRUE.
Referenced by mergeMultiples(), and tightenBounds().
◆ chgLhs()
|
static |
sets left hand side of linear constraint
- Parameters
-
scip SCIP data structure cons linear constraint lhs new left hand side
Definition at line 3279 of file cons_exactlinear.c.
References FALSE, 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(), and TRUE.
Referenced by applyFixings(), SCIPaddCoefExactLinear(), and SCIPchgLhsExactLinear().
◆ chgRhs()
|
static |
sets right hand side of linear constraint
- Parameters
-
scip SCIP data structure cons linear constraint rhs new right hand side
Definition at line 3401 of file cons_exactlinear.c.
References FALSE, 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(), and TRUE.
Referenced by applyFixings(), SCIPaddCoefExactLinear(), and SCIPchgRhsExactLinear().
◆ addCoef()
|
static |
adds coefficient in linear constraint
- Parameters
-
scip SCIP data structure cons linear constraint var variable of constraint entry val coefficient of constraint entry
Definition at line 3525 of file cons_exactlinear.c.
References 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(), and TRUE.
Referenced by applyFixings(), and SCIPaddCoefExactLinear().
◆ delCoefPos()
|
static |
deletes coefficient at given position from linear constraint data
- Parameters
-
scip SCIP data structure cons linear constraint pos position of coefficient to delete
Definition at line 3657 of file cons_exactlinear.c.
References consDropEvent(), FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIP_VARTYPE_BINARY, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetData(), SCIPconsIsTransformed(), SCIPmarkConsPropagate(), SCIPrationalSetRational(), SCIPreleaseVar(), SCIPvarGetType(), TRUE, and unlockRounding().
Referenced by applyFixings(), mergeMultiples(), performVarDeletions(), and SCIPchgCoefExactLinear().
◆ chgCoefPos()
|
static |
changes coefficient value at given position of linear constraint data
- Parameters
-
scip SCIP data structure cons linear constraint pos position of coefficient to delete newval new value of coefficient
Definition at line 3748 of file cons_exactlinear.c.
References consdataUpdateChgCoef(), FALSE, lockRounding(), NLOCKTYPES, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPconsGetData(), SCIPconsIsLockedType(), SCIPconsIsTransformed(), SCIPintervalSetRational(), SCIPmarkConsPropagate(), SCIPrationalIsNegative(), SCIPrationalIsPositive(), SCIPrationalIsZero(), SCIPrationalSetRational(), SCIPvarIsTransformed(), TRUE, and unlockRounding().
Referenced by mergeMultiples(), and SCIPchgCoefExactLinear().
◆ performVarDeletions()
|
static |
- Parameters
-
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 CONSHDLR_NAME, delCoefPos(), FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPconsGetData(), SCIPconshdlrGetName(), and SCIPvarIsDeleted().
Referenced by SCIP_DECL_CONSDELVARS().
◆ mergeMultiples()
|
static |
replaces multiple occurrences of a variable by a single coefficient
- Parameters
-
scip SCIP data structure cons linear constraint
Definition at line 3866 of file cons_exactlinear.c.
References chgCoefPos(), consdataSort(), delCoefPos(), NULL, SCIP_CALL, SCIP_INVALID, SCIP_OKAY, SCIPbuffer(), SCIPconsGetData(), SCIPrationalAdd(), SCIPrationalCreateBuffer(), SCIPrationalFreeBuffer(), SCIPrationalIsZero(), SCIPrationalSetRational(), and TRUE.
Referenced by applyFixings().
◆ applyFixings()
|
static |
replaces all fixed and aggregated variables by their non-fixed counterparts
- Parameters
-
scip SCIP data structure cons linear constraint infeasible pointer to store if infeasibility is detected; or NULL if this information is not needed; in this case, we apply all fixings instead of stopping after the first infeasible one
Definition at line 3940 of file cons_exactlinear.c.
References addCoef(), chgLhs(), chgRhs(), consCatchAllEvents(), delCoefPos(), FALSE, mergeMultiples(), NULL, 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(), and TRUE.
Referenced by SCIP_DECL_CONSEXITPRE().
◆ printActivityConflictToCertificate()
|
static |
prints activity conflict to certificate file
- Parameters
-
scip SCIP data structure cons constraint consdata constraint data rhs right-hand side
Definition at line 4204 of file cons_exactlinear.c.
References consdataRecomputeMaxactivity(), consdataRecomputeMinactivity(), NULL, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPbuffer(), SCIPcertifyActivityConflict(), SCIPisCertified(), SCIPrationalCreateBuffer(), SCIPrationalDiffReal(), SCIPrationalFreeBuffer(), SCIPrationalSetReal(), SCIProwExactGetNNonz(), and SCIProwExactGetVals().
Referenced by propagateCons(), and tightenVarBounds().
◆ tightenVarBounds()
|
static |
tightens bounds of a single variable due to activity bounds
- Parameters
-
scip SCIP data structure cons linear constraint pos position of the variable in the vars array cutoff pointer to store whether the node can be cut off nchgbds pointer to count the total number of tightened bounds force should a possible bound change be forced even if below bound strengthening tolerance
Definition at line 4260 of file cons_exactlinear.c.
References consdataGetActivityResiduals(), 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, and TRUE.
Referenced by tightenBounds().
◆ tightenBounds()
|
static |
tightens bounds of variables in constraint due to activity bounds
- Parameters
-
scip SCIP data structure cons linear constraint sortvars should variables be used in sorted order? cutoff pointer to store whether the node can be cut off nchgbds pointer to count the total number of tightened bounds
Definition at line 4654 of file cons_exactlinear.c.
References checkMaxActivityDelta, consdataGetActivityBounds(), consdataRecomputeMaxActivityDelta(), consdataSort(), FALSE, MAXTIGHTENROUNDS, MIN, NULL, 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().
◆ checkCons()
|
static |
checks linear constraint for feasibility of given solution or current solution
- Parameters
-
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 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(), and TRUE.
Referenced by enforceConstraint(), SCIP_DECL_CONSCHECK(), SCIP_DECL_CONSENFOPS(), and separateCons().
◆ addRelaxation()
|
static |
adds linear constraint as cut to the LP
- Parameters
-
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 createRows(), FALSE, NULL, 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().
◆ separateCons()
|
static |
separates linear constraint: adds linear constraint as cut, if violated by given solution
- Parameters
-
scip SCIP data structure cons linear constraint conshdlrdata constraint handler data sol primal CIP solution, NULL for current LP solution 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(), checkCons(), FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, and SCIPresetConsAge().
Referenced by SCIP_DECL_CONSSEPALP(), and SCIP_DECL_CONSSEPASOL().
◆ propagateCons()
|
static |
propagation method for linear constraints
- Parameters
-
scip SCIP data structure cons linear constraint tightenbounds should the variable's bounds be tightened? sortvars should variable sorting for faster propagation be used? cutoff pointer to store whether the node can be cut off nchgbds pointer to count the total number of tightened bounds
Definition at line 5063 of file cons_exactlinear.c.
References consCatchAllEvents(), consdataGetActivityBounds(), 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().
◆ enforceConstraint()
|
static |
helper function to enforce constraints
- Parameters
-
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(), checkCons(), CONSHDLR_NAME, FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_CUTOFF, SCIP_FEASIBLE, SCIP_OKAY, SCIP_SEPARATED, SCIPconshdlrGetData(), SCIPconshdlrGetName(), SCIPdebug, SCIPdebugMsg, SCIPlpExactIsSolved(), SCIPprintSol(), and SCIPsolIsExact().
Referenced by SCIP_DECL_CONSENFOLP(), and SCIP_DECL_CONSENFORELAX().
◆ SCIP_DECL_CONSHDLRCOPY()
|
static |
copy method for constraint handler plugins (called when SCIP copies plugins)
Definition at line 5284 of file cons_exactlinear.c.
References CONSHDLR_NAME, NULL, SCIP_CALL, SCIP_OKAY, SCIPconshdlrGetName(), SCIPincludeConshdlrExactLinear(), and TRUE.
◆ SCIP_DECL_CONSFREE()
|
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 CONSHDLR_NAME, conshdlrdataFree(), NULL, SCIP_OKAY, SCIPconshdlrGetData(), SCIPconshdlrGetName(), and SCIPconshdlrSetData().
◆ SCIP_DECL_CONSINIT()
|
static |
initialization method of constraint handler (called after problem was transformed)
Definition at line 5322 of file cons_exactlinear.c.
References consCatchAllEvents(), NULL, SCIP_CALL, SCIP_OKAY, SCIPconshdlrGetData(), and SCIPisExact().
◆ SCIP_DECL_CONSEXIT()
|
static |
deinitialization method of constraint handler (called before transformed problem is freed)
Definition at line 5349 of file cons_exactlinear.c.
References consDropAllEvents(), NULL, SCIP_CALL, SCIP_OKAY, SCIPconsGetData(), SCIPconshdlrGetData(), and SCIPisExact().
◆ SCIP_DECL_CONSEXITPRE()
|
static |
presolving deinitialization method of constraint handler (called after presolving has been finished)
Definition at line 5383 of file cons_exactlinear.c.
References applyFixings(), NULL, SCIP_CALL, SCIP_OKAY, SCIPconsIsDeleted(), and SCIPisExact().
◆ SCIP_DECL_CONSEXITSOL()
|
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 NULL, SCIP_CALL, SCIP_OKAY, SCIPconsGetData(), SCIPisExact(), SCIPreleaseRow(), and SCIPreleaseRowExact().
◆ SCIP_DECL_CONSDEACTIVE()
|
static |
constraint deactivation notification method of constraint handler
Definition at line 5447 of file cons_exactlinear.c.
References consDropAllEvents(), CONSHDLR_NAME, NULL, SCIP_CALL, SCIP_OKAY, SCIPconsGetData(), SCIPconshdlrGetData(), SCIPconshdlrGetName(), SCIPconsIsDeleted(), and SCIPisExact().
◆ SCIP_DECL_CONSDELETE()
|
static |
frees specific constraint data
Definition at line 5485 of file cons_exactlinear.c.
References consdataFree(), consDropAllEvents(), CONSHDLR_NAME, NULL, SCIP_CALL, SCIP_OKAY, SCIPconshdlrGetData(), SCIPconshdlrGetName(), and SCIPisExact().
◆ SCIP_DECL_CONSTRANS()
|
static |
transforms constraint data into data belonging to the transformed problem
Definition at line 5512 of file cons_exactlinear.c.
References 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().
◆ SCIP_DECL_CONSINITLP()
|
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(), CONSHDLR_NAME, FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPconshdlrGetName(), SCIPconsIsInitial(), and SCIPisExact().
◆ SCIP_DECL_CONSSEPALP()
|
static |
separation method of constraint handler for LP solutions
Definition at line 5570 of file cons_exactlinear.c.
References CONSHDLR_NAME, FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_CUTOFF, SCIP_DIDNOTFIND, SCIP_DIDNOTRUN, SCIP_OKAY, SCIP_SEPARATED, SCIPconsGetName(), SCIPconshdlrGetData(), SCIPconshdlrGetName(), SCIPdebugMsg, SCIPgetDepth(), SCIPgetNSepaRounds(), SCIPisExact(), and separateCons().
◆ SCIP_DECL_CONSSEPASOL()
|
static |
separation method of constraint handler for arbitrary primal solutions
Definition at line 5627 of file cons_exactlinear.c.
References CONSHDLR_NAME, FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_CUTOFF, SCIP_DIDNOTFIND, SCIP_DIDNOTRUN, SCIP_OKAY, SCIP_SEPARATED, SCIPconsGetName(), SCIPconshdlrGetData(), SCIPconshdlrGetName(), SCIPdebugMsg, SCIPgetDepth(), SCIPgetNSepaRounds(), SCIPisExact(), and separateCons().
◆ SCIP_DECL_CONSENFOLP()
|
static |
constraint enforcing method of constraint handler for LP solutions
Definition at line 5684 of file cons_exactlinear.c.
References enforceConstraint(), NULL, SCIP_CALL, SCIP_OKAY, and SCIPisExact().
◆ SCIP_DECL_CONSENFORELAX()
|
static |
constraint enforcing method of constraint handler for relaxation solutions
Definition at line 5699 of file cons_exactlinear.c.
References enforceConstraint(), NULL, SCIP_CALL, SCIP_OKAY, and SCIPisExact().
◆ SCIP_DECL_CONSENFOPS()
|
static |
constraint enforcing method of constraint handler for pseudo solutions
Definition at line 5714 of file cons_exactlinear.c.
References checkCons(), CONSHDLR_NAME, FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_DIDNOTRUN, SCIP_FEASIBLE, SCIP_INFEASIBLE, SCIP_OKAY, SCIPconshdlrGetData(), SCIPconshdlrGetName(), SCIPdebugMsg, SCIPisExact(), and TRUE.
◆ SCIP_DECL_CONSCHECK()
|
static |
feasibility check method of constraint handler for integral solutions
Definition at line 5766 of file cons_exactlinear.c.
References checkCons(), consdataGetActivity(), CONSHDLR_NAME, consPrintConsSol(), FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_FEASIBLE, SCIP_INFEASIBLE, SCIP_OKAY, SCIPbuffer(), SCIPconsGetData(), SCIPconshdlrGetData(), SCIPconshdlrGetName(), SCIPgetMessagehdlr(), SCIPinfoMessage(), SCIPisExact(), SCIPrationalCreateBuffer(), SCIPrationalDiff(), SCIPrationalFreeBuffer(), SCIPrationalIsAbsInfinity(), SCIPrationalIsGT(), SCIPrationalIsLT(), SCIPrationalMessage(), and SCIPsolIsExact().
◆ SCIP_DECL_CONSPROP()
|
static |
domain propagation method of constraint handler
Definition at line 5841 of file cons_exactlinear.c.
References CONSHDLR_NAME, FALSE, NULL, propagateCons(), SCIP_Bool, SCIP_CALL, SCIP_CUTOFF, SCIP_DIDNOTFIND, SCIP_OKAY, SCIP_REDUCEDDOM, SCIPconshdlrGetData(), SCIPconshdlrGetName(), SCIPconshdlrGetPropFreq(), SCIPgetDepth(), SCIPinProbing(), SCIPisExact(), SCIPunmarkConsPropagate(), and TRUE.
◆ SCIP_DECL_CONSLOCK()
|
static |
variable rounding lock method of constraint handler
Definition at line 5903 of file cons_exactlinear.c.
References NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPaddVarLocksType(), SCIPconsGetData(), SCIPisExact(), SCIPrationalIsInfinity(), SCIPrationalIsNegInfinity(), and SCIPrationalIsPositive().
◆ SCIP_DECL_CONSDELVARS()
|
static |
variable deletion method of constraint handler
Definition at line 5952 of file cons_exactlinear.c.
References NULL, performVarDeletions(), SCIP_CALL, SCIP_OKAY, and SCIPisExact().
◆ SCIP_DECL_CONSPRINT()
|
static |
constraint display method of constraint handler
Definition at line 5969 of file cons_exactlinear.c.
References consdataPrint(), NULL, SCIP_CALL, SCIP_OKAY, and SCIPconsGetData().
◆ SCIP_DECL_CONSCOPY()
|
static |
constraint copying method of constraint handler
Definition at line 5982 of file cons_exactlinear.c.
References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPconsGetName(), SCIPcopyConsExactLinear(), SCIPgetLhsExactLinear(), SCIPgetNVarsExactLinear(), SCIPgetRhsExactLinear(), SCIPgetValsRealExactLinear(), SCIPgetVarsExactLinear(), SCIPrationalGetReal(), and separate().
◆ findOperators()
|
static |
- Parameters
-
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 FALSE, NULL, SCIP_Bool, SCIP_OKAY, SCIPerrorMessage, and TRUE.
Referenced by SCIP_DECL_CONSPARSE().
◆ SCIP_DECL_CONSPARSE()
|
static |
constraint parsing method of constraint handler
Definition at line 6116 of file cons_exactlinear.c.
References FALSE, findOperators(), NULL, 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(), and separate().
◆ SCIP_DECL_CONSGETVARS()
|
static |
constraint method of constraint handler which returns the variables (if possible)
Definition at line 6287 of file cons_exactlinear.c.
References BMScopyMemoryArray, FALSE, NULL, SCIP_OKAY, SCIPconsGetData(), and TRUE.
◆ SCIP_DECL_CONSGETNVARS()
|
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 NULL, SCIP_OKAY, SCIPconsGetData(), and TRUE.
◆ SCIP_DECL_EVENTEXEC()
|
static |
! [Callback for the number of variables]
Definition at line 6329 of file cons_exactlinear.c.
References 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, and updateActivities().