Detailed Description
methods for problem variables
Definition in file var.c.
#include "scip/cons.h"
#include "scip/event.h"
#include "scip/history.h"
#include "scip/implics.h"
#include "scip/lp.h"
#include "scip/primal.h"
#include "scip/prob.h"
#include "scip/pub_cons.h"
#include "scip/pub_history.h"
#include "scip/pub_implics.h"
#include "scip/pub_lp.h"
#include "scip/pub_message.h"
#include "scip/pub_misc.h"
#include "scip/pub_misc_sort.h"
#include "scip/pub_prop.h"
#include "scip/pub_var.h"
#include "scip/relax.h"
#include "scip/set.h"
#include "scip/sol.h"
#include "scip/stat.h"
#include "scip/struct_event.h"
#include "scip/struct_lp.h"
#include "scip/struct_prob.h"
#include "scip/struct_set.h"
#include "scip/struct_stat.h"
#include "scip/struct_var.h"
#include "scip/tree.h"
#include "scip/var.h"
#include <string.h>
Go to the source code of this file.
Macros | |
#define | MAXIMPLSCLOSURE 100 |
#define | MAXABSVBCOEF 1e+5 |
#define | MAXDNOM 1000000LL |
#define | MAX_CLIQUELENGTH 50 |
Variables | |
static SCIP_BDCHGIDX | initbdchgidx = {-2, 0} |
static SCIP_BDCHGIDX | presolvebdchgidx = {-1, 0} |
Macro Definition Documentation
◆ MAXIMPLSCLOSURE
#define MAXIMPLSCLOSURE 100 |
maximal number of descendants of implied variable for building closure in implication graph
Definition at line 77 of file var.c.
Referenced by varAddTransitiveBinaryClosureImplic().
◆ MAXABSVBCOEF
#define MAXABSVBCOEF 1e+5 |
maximal absolute coefficient in variable bounds added due to implications
Definition at line 80 of file var.c.
Referenced by varAddImplic().
◆ MAXDNOM
#define MAXDNOM 1000000LL |
Referenced by tryAggregateIntVars().
◆ MAX_CLIQUELENGTH
#define MAX_CLIQUELENGTH 50 |
Definition at line 13465 of file var.c.
Referenced by SCIPvarGetImplRedcost().
Function Documentation
◆ holelistCreate()
|
static |
creates a new holelist element
- Parameters
-
holelist pointer to holelist to create blkmem block memory for target holelist set global SCIP settings left left bound of open interval in new hole right right bound of open interval in new hole
Definition at line 153 of file var.c.
References BMSallocBlockMemory, holelistFree(), NULL, SCIP_ALLOC, SCIP_OKAY, SCIPsetDebugMsg, and SCIPsetIsLT().
Referenced by domAddHole(), and holelistDuplicate().
◆ holelistFree()
|
static |
frees all elements in the holelist
- Parameters
-
holelist pointer to holelist to free blkmem block memory for target holelist
Definition at line 177 of file var.c.
References BMSfreeBlockMemory, holelistDuplicate(), SCIP_Holelist::next, NULL, and SCIPdebugMessage.
Referenced by domMerge(), holelistCreate(), SCIPvarFix(), SCIPvarResetBounds(), and varFree().
◆ holelistDuplicate()
|
static |
duplicates a list of holes
- Parameters
-
target pointer to target holelist blkmem block memory for target holelist set global SCIP settings source holelist to duplicate
Definition at line 203 of file var.c.
References domAddHole(), SCIP_Holelist::hole, holelistCreate(), SCIP_Hole::left, SCIP_Holelist::next, NULL, SCIP_Hole::right, SCIP_CALL, SCIP_OKAY, and SCIPsetIsGE().
Referenced by holelistFree(), SCIPvarResetBounds(), and SCIPvarTransform().
◆ domAddHole()
|
static |
adds a hole to the domain
- Parameters
-
dom domain to add hole to blkmem block memory set global SCIP settings left left bound of open interval in new hole right right bound of open interval in new hole added pointer to store whether the hole was added (variable didn't had that hole before), or NULL
Definition at line 225 of file var.c.
References domMerge(), FALSE, SCIP_Dom::holelist, holelistCreate(), SCIP_Holelist::next, NULL, SCIP_CALL, SCIP_OKAY, SCIPsetDebugMsg, and TRUE.
Referenced by holelistDuplicate(), SCIPvarAddHoleOriginal(), varProcessAddHoleGlobal(), and varProcessAddHoleLocal().
◆ domMerge()
|
static |
merges overlapping holes into single holes, computes and moves lower and upper bound, respectively
- Parameters
-
dom domain to merge blkmem block memory set global SCIP settings newlb pointer to store new lower bound newub pointer to store new upper bound
Definition at line 269 of file var.c.
References SCIP_Holelist::hole, SCIP_Dom::holelist, holelistFree(), SCIP_Dom::lb, MAX, SCIP_Holelist::next, NULL, SCIP_Hole::right, SCIP_Real, SCIPsetDebugMsg, SCIPsetInfinity(), SCIPsetIsEQ(), SCIPsetIsGE(), SCIPsetIsGT(), SCIPsetIsLE(), SCIPsetIsLT(), SCIP_Dom::ub, and varEnsureLbchginfosSize().
Referenced by domAddHole(), SCIPvarAddHoleOriginal(), varProcessAddHoleGlobal(), varProcessAddHoleLocal(), varProcessChgLbGlobal(), varProcessChgLbLocal(), varProcessChgUbGlobal(), and varProcessChgUbLocal().
◆ varEnsureLbchginfosSize()
|
static |
ensures, that bound change info array for lower bound changes can store at least num entries
- Parameters
-
var problem variable blkmem block memory set global SCIP settings num minimum number of entries to store
Definition at line 428 of file var.c.
References BMSreallocBlockMemoryArray, SCIP_Var::lbchginfos, SCIP_Var::lbchginfossize, SCIP_Var::nlbchginfos, NULL, SCIP_ALLOC, SCIP_OKAY, SCIPsetCalcMemGrowSize(), SCIPvarIsTransformed(), and varEnsureUbchginfosSize().
Referenced by domMerge(), and varAddLbchginfo().
◆ varEnsureUbchginfosSize()
|
static |
ensures, that bound change info array for upper bound changes can store at least num entries
- Parameters
-
var problem variable blkmem block memory set global SCIP settings num minimum number of entries to store
Definition at line 454 of file var.c.
References BMSreallocBlockMemoryArray, SCIP_Var::nubchginfos, NULL, SCIP_ALLOC, SCIP_OKAY, SCIPsetCalcMemGrowSize(), SCIPvarIsTransformed(), SCIP_Var::ubchginfos, SCIP_Var::ubchginfossize, and varAddLbchginfo().
Referenced by varAddUbchginfo(), and varEnsureLbchginfosSize().
◆ varAddLbchginfo()
|
static |
adds domain change info to the variable's lower bound change info array
- Note
- The "pos" data member of the bound change info has a size of 27 bits
- Parameters
-
var problem variable blkmem block memory set global SCIP settings oldbound old value for bound newbound new value for bound depth depth in the tree, where the bound change takes place pos position of the bound change in its bound change array infervar variable that was changed (parent of var, or var itself) infercons constraint that inferred this bound change, or NULL inferprop propagator that deduced the bound change, or NULL inferinfo user information for inference to help resolving the conflict inferboundtype type of bound for inference var: lower or upper bound boundchgtype bound change type: branching decision or inferred bound change
Definition at line 480 of file var.c.
References SCIP_BdChgInfo::bdchgidx, SCIP_BdChgInfo::boundchgtype, SCIP_BdChgInfo::boundtype, SCIP_BdChgIdx::depth, FALSE, SCIP_BdChgInfo::inferboundtype, SCIP_BdChgInfo::inferencedata, SCIP_Dom::lb, SCIP_Var::lbchginfos, SCIP_Var::locdom, SCIP_BdChgInfo::newbound, SCIP_Var::nlbchginfos, NULL, SCIP_BdChgInfo::oldbound, SCIP_BdChgIdx::pos, SCIP_BdChgInfo::pos, SCIP_BdChgInfo::redundant, SCIP_BOUNDCHGTYPE_BRANCHING, SCIP_BOUNDCHGTYPE_CONSINFER, SCIP_BOUNDCHGTYPE_PROPINFER, SCIP_BOUNDTYPE_LOWER, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_VARTYPE_CONTINUOUS, SCIPbdchgidxIsEarlier(), SCIPconsGetName(), SCIPerrorMessage, SCIPpropGetName(), SCIPsetDebugMsg, SCIPsetIsEQ(), SCIPsetIsFeasIntegral(), SCIPsetIsLT(), SCIPvarGetName(), SCIPvarGetType(), SCIPvarIsBinary(), SCIP_Dom::ub, SCIP_BdChgInfo::var, varAddUbchginfo(), and varEnsureLbchginfosSize().
Referenced by SCIPboundchgApply(), and varEnsureUbchginfosSize().
◆ varAddUbchginfo()
|
static |
adds domain change info to the variable's upper bound change info array
- Note
- The "pos" data member of the bound change info has a size of 27 bits
- Parameters
-
var problem variable blkmem block memory set global SCIP settings oldbound old value for bound newbound new value for bound depth depth in the tree, where the bound change takes place pos position of the bound change in its bound change array infervar variable that was changed (parent of var, or var itself) infercons constraint that inferred this bound change, or NULL inferprop propagator that deduced the bound change, or NULL inferinfo user information for inference to help resolving the conflict inferboundtype type of bound for inference var: lower or upper bound boundchgtype bound change type: branching decision or inferred bound change
Definition at line 555 of file var.c.
References SCIP_BdChgInfo::bdchgidx, SCIP_BdChgInfo::boundchgtype, SCIP_BdChgInfo::boundtype, SCIP_BdChgIdx::depth, FALSE, SCIP_BdChgInfo::inferboundtype, SCIP_BdChgInfo::inferencedata, SCIP_Dom::lb, SCIP_Var::locdom, SCIP_BdChgInfo::newbound, SCIP_Var::nubchginfos, NULL, SCIP_BdChgInfo::oldbound, SCIP_BdChgIdx::pos, SCIP_BdChgInfo::pos, SCIP_BdChgInfo::redundant, SCIP_BOUNDCHGTYPE_BRANCHING, SCIP_BOUNDCHGTYPE_CONSINFER, SCIP_BOUNDCHGTYPE_PROPINFER, SCIP_BOUNDTYPE_UPPER, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_VARTYPE_CONTINUOUS, SCIPbdchgidxIsEarlier(), SCIPboundchgApply(), SCIPconsGetName(), SCIPerrorMessage, SCIPpropGetName(), SCIPsetDebugMsg, SCIPsetIsEQ(), SCIPsetIsFeasIntegral(), SCIPsetIsGT(), SCIPvarGetName(), SCIPvarGetType(), SCIPvarIsBinary(), SCIP_Dom::ub, SCIP_Var::ubchginfos, SCIP_BdChgInfo::var, and varEnsureUbchginfosSize().
Referenced by SCIPboundchgApply(), and varAddLbchginfo().
◆ SCIPboundchgApply()
SCIP_RETCODE SCIPboundchgApply | ( | SCIP_BOUNDCHG * | boundchg, |
BMS_BLKMEM * | blkmem, | ||
SCIP_SET * | set, | ||
SCIP_STAT * | stat, | ||
SCIP_LP * | lp, | ||
SCIP_BRANCHCAND * | branchcand, | ||
SCIP_EVENTQUEUE * | eventqueue, | ||
int | depth, | ||
int | pos, | ||
SCIP_Bool * | cutoff | ||
) |
applies single bound change
- Parameters
-
boundchg bound change to apply blkmem block memory set global SCIP settings stat problem statistics lp current LP data branchcand branching candidate storage eventqueue event queue depth depth in the tree, where the bound change takes place pos position of the bound change in its bound change array cutoff pointer to store whether an infeasible bound change was detected
Definition at line 629 of file var.c.
References SCIP_BoundChg::applied, SCIP_BoundChg::boundchgtype, SCIP_BoundChg::boundtype, SCIP_BoundChg::data, FALSE, SCIP_BoundChg::inferboundtype, SCIP_BoundChg::inferencedata, SCIP_Stat::lastbranchdir, SCIP_Stat::lastbranchvalue, SCIP_Stat::lastbranchvar, SCIP_Dom::lb, SCIP_Var::locdom, SCIP_BoundChg::newbound, NULL, SCIP_BoundChg::redundant, SCIP_BOUNDCHGTYPE_BRANCHING, SCIP_BOUNDCHGTYPE_CONSINFER, SCIP_BOUNDCHGTYPE_PROPINFER, SCIP_BOUNDTYPE_LOWER, SCIP_BOUNDTYPE_UPPER, SCIP_BRANCHDIR_DOWNWARDS, SCIP_BRANCHDIR_UPWARDS, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_VARSTATUS_COLUMN, SCIP_VARSTATUS_LOOSE, SCIPboundchgUndo(), SCIPconsGetName(), SCIPerrorMessage, SCIPpropGetName(), SCIPsetDebugMsg, SCIPsetIsFeasIntegral(), SCIPsetIsGE(), SCIPsetIsGT(), SCIPsetIsLE(), SCIPsetIsLT(), SCIPvarChgLbLocal(), SCIPvarChgUbLocal(), SCIPvarGetName(), SCIPvarGetStatus(), SCIPvarIncInferenceSum(), SCIPvarIncNBranchings(), SCIPvarIsIntegral(), TRUE, SCIP_Dom::ub, SCIP_BoundChg::var, varAddLbchginfo(), and varAddUbchginfo().
Referenced by SCIPdomchgApply(), SCIPnodeAddBoundinfer(), and varAddUbchginfo().
◆ SCIPboundchgUndo()
SCIP_RETCODE SCIPboundchgUndo | ( | SCIP_BOUNDCHG * | boundchg, |
BMS_BLKMEM * | blkmem, | ||
SCIP_SET * | set, | ||
SCIP_STAT * | stat, | ||
SCIP_LP * | lp, | ||
SCIP_BRANCHCAND * | branchcand, | ||
SCIP_EVENTQUEUE * | eventqueue | ||
) |
undoes single bound change
- Parameters
-
boundchg bound change to remove blkmem block memory set global SCIP settings stat problem statistics lp current LP data branchcand branching candidate storage eventqueue event queue
Definition at line 826 of file var.c.
References SCIP_BdChgInfo::bdchgidx, boundchgApplyGlobal(), SCIP_BoundChg::boundchgtype, SCIP_BoundChg::boundtype, SCIP_BdChgIdx::depth, SCIP_Var::glbdom, SCIP_Stat::lastbranchvalue, SCIP_Stat::lastbranchvar, SCIP_Dom::lb, SCIP_Var::lbchginfos, SCIP_Var::locdom, SCIP_BoundChg::newbound, SCIP_BdChgInfo::newbound, SCIP_Var::nlbchginfos, SCIP_Var::nubchginfos, NULL, SCIP_BdChgInfo::oldbound, SCIP_BdChgIdx::pos, SCIP_BoundChg::redundant, SCIP_BOUNDCHGTYPE_BRANCHING, SCIP_BOUNDTYPE_LOWER, SCIP_BOUNDTYPE_UPPER, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_UNKNOWN, SCIP_VARSTATUS_COLUMN, SCIP_VARSTATUS_LOOSE, SCIPerrorMessage, SCIPsetDebugMsg, SCIPsetIsFeasEQ(), SCIPsetIsFeasGE(), SCIPsetIsFeasLE(), SCIPvarChgLbLocal(), SCIPvarChgUbLocal(), SCIPvarGetName(), SCIPvarGetStatus(), SCIP_Dom::ub, SCIP_Var::ubchginfos, and SCIP_BoundChg::var.
Referenced by SCIPboundchgApply(), and SCIPdomchgUndo().
◆ boundchgApplyGlobal()
|
static |
applies single bound change to the global problem by changing the global bound of the corresponding variable
- Parameters
-
boundchg bound change to apply blkmem block memory set global SCIP settings stat problem statistics lp current LP data branchcand branching candidate storage eventqueue event queue cliquetable clique table data structure cutoff pointer to store whether an infeasible bound change was detected
Definition at line 911 of file var.c.
References boundchgCaptureData(), FALSE, NULL, SCIP_BoundChg::redundant, SCIP_BOUNDTYPE_LOWER, SCIP_BOUNDTYPE_UPPER, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPboundchgGetBoundtype(), SCIPboundchgGetNewbound(), SCIPboundchgGetVar(), SCIPsetDebugMsg, SCIPsetIsFeasGE(), SCIPsetIsFeasGT(), SCIPsetIsFeasLE(), SCIPsetIsFeasLT(), SCIPvarChgBdGlobal(), SCIPvarGetLbGlobal(), SCIPvarGetName(), SCIPvarGetUbGlobal(), and TRUE.
Referenced by SCIPboundchgUndo(), and SCIPdomchgApplyGlobal().
◆ boundchgCaptureData()
|
static |
captures branching and inference data of bound change
- Parameters
-
boundchg bound change to remove
Definition at line 971 of file var.c.
References boundchgReleaseData(), SCIP_BoundChg::boundchgtype, SCIP_BoundChg::data, SCIP_BoundChg::inferencedata, NULL, SCIP_BOUNDCHGTYPE_BRANCHING, SCIP_BOUNDCHGTYPE_CONSINFER, SCIP_BOUNDCHGTYPE_PROPINFER, SCIP_INVALIDDATA, SCIP_OKAY, SCIPconsCapture(), SCIPerrorMessage, SCIPvarCapture(), and SCIP_BoundChg::var.
Referenced by boundchgApplyGlobal(), and SCIPdomchgAddBoundchg().
◆ boundchgReleaseData()
|
static |
releases branching and inference data of bound change
- Parameters
-
boundchg bound change to remove blkmem block memory set global SCIP settings eventqueue event queue lp current LP data
Definition at line 1003 of file var.c.
References SCIP_BoundChg::boundchgtype, SCIP_BoundChg::data, domchgCreate(), SCIP_BoundChg::inferencedata, NULL, SCIP_BOUNDCHGTYPE_BRANCHING, SCIP_BOUNDCHGTYPE_CONSINFER, SCIP_BOUNDCHGTYPE_PROPINFER, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIPconsRelease(), SCIPerrorMessage, SCIPvarRelease(), and SCIP_BoundChg::var.
Referenced by boundchgCaptureData(), and SCIPdomchgFree().
◆ domchgCreate()
|
static |
creates empty domain change data with dynamic arrays
- Parameters
-
domchg pointer to domain change data blkmem block memory
Definition at line 1040 of file var.c.
References BMSallocBlockMemorySize, NULL, SCIP_ALLOC, SCIP_DOMCHGTYPE_DYNAMIC, SCIP_OKAY, and SCIPdomchgFree().
Referenced by boundchgReleaseData(), domchgMakeDynamic(), SCIPdomchgAddBoundchg(), and SCIPdomchgAddHolechg().
◆ SCIPdomchgFree()
SCIP_RETCODE SCIPdomchgFree | ( | SCIP_DOMCHG ** | domchg, |
BMS_BLKMEM * | blkmem, | ||
SCIP_SET * | set, | ||
SCIP_EVENTQUEUE * | eventqueue, | ||
SCIP_LP * | lp | ||
) |
frees domain change data
- Parameters
-
domchg pointer to domain change blkmem block memory set global SCIP settings eventqueue event queue lp current LP data
Definition at line 1061 of file var.c.
References BMSfreeBlockMemoryArrayNull, BMSfreeBlockMemorySize, boundchgReleaseData(), domchgMakeDynamic(), NULL, SCIP_CALL, SCIP_DOMCHGTYPE_BOTH, SCIP_DOMCHGTYPE_BOUND, SCIP_DOMCHGTYPE_DYNAMIC, SCIP_INVALIDDATA, SCIP_OKAY, and SCIPerrorMessage.
Referenced by domchgCreate(), SCIPdomchgMakeStatic(), and SCIPnodeFree().
◆ domchgMakeDynamic()
|
static |
converts a static domain change data into a dynamic one
- Parameters
-
domchg pointer to domain change data blkmem block memory
Definition at line 1110 of file var.c.
References BMSreallocBlockMemorySize, domchgCreate(), EPSISINT, NULL, SCIP_ALLOC, SCIP_CALL, SCIP_DOMCHGTYPE_BOTH, SCIP_DOMCHGTYPE_BOUND, SCIP_DOMCHGTYPE_DYNAMIC, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_VARTYPE_CONTINUOUS, SCIPdebugMessage, SCIPdomchgMakeStatic(), SCIPerrorMessage, and SCIPvarGetType().
Referenced by SCIPdomchgAddBoundchg(), SCIPdomchgAddHolechg(), and SCIPdomchgFree().
◆ SCIPdomchgMakeStatic()
SCIP_RETCODE SCIPdomchgMakeStatic | ( | SCIP_DOMCHG ** | domchg, |
BMS_BLKMEM * | blkmem, | ||
SCIP_SET * | set, | ||
SCIP_EVENTQUEUE * | eventqueue, | ||
SCIP_LP * | lp | ||
) |
converts a dynamic domain change data into a static one, using less memory than for a dynamic one
- Parameters
-
domchg pointer to domain change data blkmem block memory set global SCIP settings eventqueue event queue lp current LP data
Definition at line 1162 of file var.c.
References BMSfreeBlockMemoryArrayNull, BMSreallocBlockMemoryArray, BMSreallocBlockMemorySize, domchgEnsureBoundchgsSize(), NULL, SCIP_ALLOC, SCIP_CALL, SCIP_DOMCHGTYPE_BOTH, SCIP_DOMCHGTYPE_BOUND, SCIP_DOMCHGTYPE_DYNAMIC, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_VARTYPE_CONTINUOUS, SCIPdomchgFree(), SCIPerrorMessage, SCIPsetDebugMsg, SCIPsetIsFeasIntegral(), and SCIPvarGetType().
Referenced by domchgMakeDynamic(), focusnodeToFork(), focusnodeToJunction(), focusnodeToPseudofork(), nodeRepropagate(), and nodeToLeaf().
◆ domchgEnsureBoundchgsSize()
|
static |
ensures, that boundchgs array can store at least num entries
- Parameters
-
domchg domain change data structure blkmem block memory set global SCIP settings num minimum number of entries to store
Definition at line 1251 of file var.c.
References BMSreallocBlockMemoryArray, SCIP_DomChgDyn::boundchgs, SCIP_DomChgDyn::boundchgssize, SCIP_DomChg::domchgdyn, domchgEnsureHolechgsSize(), SCIP_DomChgDyn::domchgtype, NULL, SCIP_ALLOC, SCIP_DOMCHGTYPE_DYNAMIC, SCIP_OKAY, and SCIPsetCalcMemGrowSize().
Referenced by SCIPdomchgAddBoundchg(), and SCIPdomchgMakeStatic().
◆ domchgEnsureHolechgsSize()
|
static |
ensures, that holechgs array can store at least num additional entries
- Parameters
-
domchg domain change data structure blkmem block memory set global SCIP settings num minimum number of additional entries to store
Definition at line 1276 of file var.c.
References BMSreallocBlockMemoryArray, SCIP_DomChg::domchgdyn, SCIP_DomChgDyn::domchgtype, SCIP_DomChgDyn::holechgs, SCIP_DomChgDyn::holechgssize, NULL, SCIP_ALLOC, SCIP_DOMCHGTYPE_DYNAMIC, SCIP_OKAY, SCIPdomchgApply(), and SCIPsetCalcMemGrowSize().
Referenced by domchgEnsureBoundchgsSize(), and SCIPdomchgAddHolechg().
◆ SCIPdomchgApply()
SCIP_RETCODE SCIPdomchgApply | ( | SCIP_DOMCHG * | domchg, |
BMS_BLKMEM * | blkmem, | ||
SCIP_SET * | set, | ||
SCIP_STAT * | stat, | ||
SCIP_LP * | lp, | ||
SCIP_BRANCHCAND * | branchcand, | ||
SCIP_EVENTQUEUE * | eventqueue, | ||
int | depth, | ||
SCIP_Bool * | cutoff | ||
) |
applies domain change
- Parameters
-
domchg domain change to apply blkmem block memory set global SCIP settings stat problem statistics lp current LP data branchcand branching candidate storage eventqueue event queue depth depth in the tree, where the domain change takes place cutoff pointer to store whether an infeasible domain change was detected
Definition at line 1300 of file var.c.
References SCIP_DomChgBound::boundchgs, SCIP_DomChg::domchgboth, SCIP_DomChg::domchgbound, SCIP_DomChg::domchgdyn, SCIP_DomChgDyn::domchgtype, FALSE, SCIP_DomChgBoth::holechgs, SCIP_DomChgBound::nboundchgs, SCIP_HoleChg::newlist, SCIP_DomChgBoth::nholechgs, NULL, SCIP_HoleChg::ptr, SCIP_BoundChg::redundant, SCIP_CALL, SCIP_DOMCHGTYPE_BOUND, SCIP_OKAY, SCIPboundchgApply(), SCIPdomchgUndo(), SCIPsetDebugMsg, and TRUE.
Referenced by domchgEnsureHolechgsSize(), and nodeActivate().
◆ SCIPdomchgUndo()
SCIP_RETCODE SCIPdomchgUndo | ( | SCIP_DOMCHG * | domchg, |
BMS_BLKMEM * | blkmem, | ||
SCIP_SET * | set, | ||
SCIP_STAT * | stat, | ||
SCIP_LP * | lp, | ||
SCIP_BRANCHCAND * | branchcand, | ||
SCIP_EVENTQUEUE * | eventqueue | ||
) |
undoes domain change
- Parameters
-
domchg domain change to remove blkmem block memory set global SCIP settings stat problem statistics lp current LP data branchcand branching candidate storage eventqueue event queue
Definition at line 1349 of file var.c.
References SCIP_DomChgBound::boundchgs, SCIP_DomChg::domchgboth, SCIP_DomChg::domchgbound, SCIP_DomChg::domchgdyn, SCIP_DomChgDyn::domchgtype, SCIP_DomChgBoth::holechgs, SCIP_DomChgBound::nboundchgs, SCIP_DomChgBoth::nholechgs, NULL, SCIP_HoleChg::oldlist, SCIP_HoleChg::ptr, SCIP_CALL, SCIP_DOMCHGTYPE_BOUND, SCIP_OKAY, SCIPboundchgUndo(), SCIPdomchgApplyGlobal(), and SCIPsetDebugMsg.
Referenced by nodeDeactivate(), and SCIPdomchgApply().
◆ SCIPdomchgApplyGlobal()
SCIP_RETCODE SCIPdomchgApplyGlobal | ( | SCIP_DOMCHG * | domchg, |
BMS_BLKMEM * | blkmem, | ||
SCIP_SET * | set, | ||
SCIP_STAT * | stat, | ||
SCIP_LP * | lp, | ||
SCIP_BRANCHCAND * | branchcand, | ||
SCIP_EVENTQUEUE * | eventqueue, | ||
SCIP_CLIQUETABLE * | cliquetable, | ||
SCIP_Bool * | cutoff | ||
) |
applies domain change to the global problem
- Parameters
-
domchg domain change to apply blkmem block memory set global SCIP settings stat problem statistics lp current LP data branchcand branching candidate storage eventqueue event queue cliquetable clique table data structure cutoff pointer to store whether an infeasible domain change was detected
Definition at line 1384 of file var.c.
References boundchgApplyGlobal(), SCIP_DomChgBound::boundchgs, SCIP_DomChg::domchgbound, FALSE, SCIP_DomChgBound::nboundchgs, NULL, SCIP_CALL, SCIP_OKAY, SCIPdomchgAddBoundchg(), and SCIPsetDebugMsg.
Referenced by SCIPdomchgUndo(), and treeSwitchPath().
◆ SCIPdomchgAddBoundchg()
SCIP_RETCODE SCIPdomchgAddBoundchg | ( | SCIP_DOMCHG ** | domchg, |
BMS_BLKMEM * | blkmem, | ||
SCIP_SET * | set, | ||
SCIP_VAR * | var, | ||
SCIP_Real | newbound, | ||
SCIP_BOUNDTYPE | boundtype, | ||
SCIP_BOUNDCHGTYPE | boundchgtype, | ||
SCIP_Real | lpsolval, | ||
SCIP_VAR * | infervar, | ||
SCIP_CONS * | infercons, | ||
SCIP_PROP * | inferprop, | ||
int | inferinfo, | ||
SCIP_BOUNDTYPE | inferboundtype | ||
) |
adds bound change to domain changes
- Parameters
-
domchg pointer to domain change data structure blkmem block memory set global SCIP settings var variable to change the bounds for newbound new value for bound boundtype type of bound for var: lower or upper bound boundchgtype type of bound change: branching decision or inference lpsolval solval of variable in last LP on path to node, or SCIP_INVALID if unknown infervar variable that was changed (parent of var, or var itself), or NULL infercons constraint that deduced the bound change, or NULL inferprop propagator that deduced the bound change, or NULL inferinfo user information for inference to help resolving the conflict inferboundtype type of bound for inference var: lower or upper bound
Definition at line 1423 of file var.c.
References SCIP_BoundChg::applied, boundchgCaptureData(), SCIP_BoundChg::boundchgtype, SCIP_BoundChg::boundtype, SCIP_BoundChg::branchingdata, SCIP_BoundChg::data, domchgCreate(), SCIP_DomChg::domchgdyn, domchgEnsureBoundchgsSize(), domchgMakeDynamic(), FALSE, SCIP_BoundChg::inferboundtype, SCIP_BoundChg::inferencedata, SCIP_Var::name, SCIP_DomChgDyn::nboundchgs, SCIP_BoundChg::newbound, NULL, SCIP_BoundChg::redundant, SCIP_BOUNDCHGTYPE_BRANCHING, SCIP_BOUNDCHGTYPE_CONSINFER, SCIP_BOUNDCHGTYPE_PROPINFER, SCIP_BOUNDTYPE_LOWER, SCIP_CALL, SCIP_DOMCHGTYPE_DYNAMIC, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_VARSTATUS_COLUMN, SCIP_VARSTATUS_LOOSE, SCIP_VARTYPE_CONTINUOUS, SCIPdomchgAddHolechg(), SCIPerrorMessage, SCIPsetDebugMsg, SCIPsetIsEQ(), SCIPsetIsFeasIntegral(), SCIPvarGetStatus(), SCIPvarGetType(), SCIPvarIsBinary(), and SCIP_BoundChg::var.
Referenced by SCIPdomchgApplyGlobal(), and SCIPnodeAddBoundinfer().
◆ SCIPdomchgAddHolechg()
SCIP_RETCODE SCIPdomchgAddHolechg | ( | SCIP_DOMCHG ** | domchg, |
BMS_BLKMEM * | blkmem, | ||
SCIP_SET * | set, | ||
SCIP_HOLELIST ** | ptr, | ||
SCIP_HOLELIST * | newlist, | ||
SCIP_HOLELIST * | oldlist | ||
) |
adds hole change to domain changes
- Parameters
-
domchg pointer to domain change data structure blkmem block memory set global SCIP settings ptr changed list pointer newlist new value of list pointer oldlist old value of list pointer
Definition at line 1520 of file var.c.
References adjustedLb(), domchgCreate(), SCIP_DomChg::domchgdyn, domchgEnsureHolechgsSize(), domchgMakeDynamic(), SCIP_HoleChg::newlist, SCIP_DomChgDyn::nholechgs, NULL, SCIP_HoleChg::oldlist, SCIP_HoleChg::ptr, SCIP_CALL, SCIP_DOMCHGTYPE_DYNAMIC, SCIP_OKAY, and SCIP_Real.
Referenced by SCIPdomchgAddBoundchg().
◆ adjustedLb()
|
static |
returns adjusted lower bound value, which is rounded for integral variable types
- Parameters
-
set global SCIP settings vartype type of variable lb lower bound to adjust
Definition at line 1569 of file var.c.
References adjustedUb(), SCIP_Real, SCIP_VARTYPE_CONTINUOUS, SCIPsetEpsilon(), SCIPsetFeasCeil(), SCIPsetInfinity(), and SCIPsetIsInfinity().
Referenced by SCIPdomchgAddHolechg(), SCIPvarAddHoleGlobal(), SCIPvarAddHoleLocal(), SCIPvarAddHoleOriginal(), SCIPvarAddVlb(), SCIPvarAddVub(), SCIPvarAdjustLb(), SCIPvarChgLbGlobal(), SCIPvarChgLbLocal(), SCIPvarChgLbOriginal(), varAddTransitiveImplic(), varCreate(), varProcessAddHoleGlobal(), varProcessAddHoleLocal(), varProcessChgLbGlobal(), and varProcessChgLbLocal().
◆ adjustedUb()
|
static |
returns adjusted upper bound value, which is rounded for integral variable types
- Parameters
-
set global SCIP settings vartype type of variable ub upper bound to adjust
Definition at line 1589 of file var.c.
References SCIP_VARTYPE_CONTINUOUS, SCIPsetEpsilon(), SCIPsetFeasFloor(), SCIPsetInfinity(), SCIPsetIsInfinity(), and SCIPvarRemoveCliquesImplicsVbs().
Referenced by adjustedLb(), SCIPvarAddHoleGlobal(), SCIPvarAddHoleLocal(), SCIPvarAddHoleOriginal(), SCIPvarAddVlb(), SCIPvarAddVub(), SCIPvarAdjustUb(), SCIPvarChgUbGlobal(), SCIPvarChgUbLocal(), SCIPvarChgUbOriginal(), varAddTransitiveImplic(), varCreate(), varProcessAddHoleGlobal(), varProcessAddHoleLocal(), varProcessChgUbGlobal(), and varProcessChgUbLocal().
◆ SCIPvarRemoveCliquesImplicsVbs()
SCIP_RETCODE SCIPvarRemoveCliquesImplicsVbs | ( | SCIP_VAR * | var, |
BMS_BLKMEM * | blkmem, | ||
SCIP_CLIQUETABLE * | cliquetable, | ||
SCIP_SET * | set, | ||
SCIP_Bool | irrelevantvar, | ||
SCIP_Bool | onlyredundant, | ||
SCIP_Bool | removefromvar | ||
) |
removes (redundant) cliques, implications and variable bounds of variable from all other variables' implications and variable bounds arrays, and optionally removes them also from the variable itself
- Parameters
-
var problem variable blkmem block memory cliquetable clique table data structure set global SCIP settings irrelevantvar has the variable become irrelevant? onlyredundant should only the redundant implications and variable bounds be removed? removefromvar should the implications and variable bounds be removed from the var itself?
Definition at line 1610 of file var.c.
References SCIP_Var::cliquelist, SCIP_Var::closestvblpcount, FALSE, SCIP_Var::implics, MAX, MIN, NULL, SCIP_Bool, SCIP_BOUNDTYPE_LOWER, SCIP_BOUNDTYPE_UPPER, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIP_VARSTATUS_COLUMN, SCIP_VARSTATUS_LOOSE, SCIP_VARTYPE_BINARY, SCIPcliquelistRemoveFromCliques(), SCIPimplicsDel(), SCIPimplicsFree(), SCIPimplicsGetBounds(), SCIPimplicsGetNImpls(), SCIPimplicsGetTypes(), SCIPimplicsGetVars(), SCIPsetDebugMsg, SCIPsetIsFeasGT(), SCIPsetIsFeasLT(), SCIPsetIsZero(), SCIPvarGetLbGlobal(), SCIPvarGetName(), SCIPvarGetStatus(), SCIPvarGetType(), SCIPvarGetUbGlobal(), SCIPvarIsActive(), SCIPvarIsBinary(), SCIPvboundsDel(), SCIPvboundsGetCoefs(), SCIPvboundsGetConstants(), SCIPvboundsGetNVbds(), SCIPvboundsGetVars(), SCIPvboundsShrink(), TRUE, varSetName(), SCIP_Var::vlbs, and SCIP_Var::vubs.
Referenced by adjustedUb(), SCIPremoveVarFromGlobalStructures(), SCIPvarAggregate(), SCIPvarFix(), SCIPvarMultiaggregate(), SCIPvarRemove(), varProcessChgLbGlobal(), and varProcessChgUbGlobal().
◆ varSetName()
|
static |
sets the variable name
- Parameters
-
var problem variable blkmem block memory stat problem statistics, or NULL name name of variable, or NULL for automatic name creation
Definition at line 1898 of file var.c.
References BMSduplicateBlockMemoryArray, SCIP_Var::name, NULL, SCIP_Stat::nvaridx, SCIP_ALLOC, SCIP_MAXSTRLEN, SCIP_OKAY, SCIPsnprintf(), and varCreate().
Referenced by SCIPvarChgName(), SCIPvarRemoveCliquesImplicsVbs(), and varCreate().
◆ varCreate()
|
static |
creates variable; if variable is of integral type, fractional bounds are automatically rounded; an integer variable with bounds zero and one is automatically converted into a binary variable
- Parameters
-
var pointer to variable data blkmem block memory set global SCIP settings stat problem statistics name name of variable, or NULL for automatic name creation lb lower bound of variable ub upper bound of variable obj objective function value vartype type of variable initial should var's column be present in the initial root LP? removable is var's column removable from the LP (due to aging or cleanup)? vardata user data for this specific variable
Definition at line 1930 of file var.c.
References adjustedLb(), adjustedUb(), BMSallocBlockMemory, FALSE, NLOCKTYPES, NULL, SCIP_Stat::nvaridx, SCIP_ALLOC, SCIP_BRANCHDIR_AUTO, SCIP_CALL, SCIP_INVALID, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_REAL_MAX, SCIP_REAL_MIN, SCIP_VARTYPE_BINARY, SCIP_VARTYPE_INTEGER, SCIPerrorMessage, SCIPhistoryCreate(), SCIPsetInfinity(), SCIPsetIsEQ(), SCIPvarCreateOriginal(), and varSetName().
Referenced by SCIPvarCreateOriginal(), SCIPvarCreateTransformed(), SCIPvarNegate(), SCIPvarParseOriginal(), SCIPvarParseTransformed(), and varSetName().
◆ SCIPvarCreateOriginal()
SCIP_RETCODE SCIPvarCreateOriginal | ( | SCIP_VAR ** | var, |
BMS_BLKMEM * | blkmem, | ||
SCIP_SET * | set, | ||
SCIP_STAT * | stat, | ||
const char * | name, | ||
SCIP_Real | lb, | ||
SCIP_Real | ub, | ||
SCIP_Real | obj, | ||
SCIP_VARTYPE | vartype, | ||
SCIP_Bool | initial, | ||
SCIP_Bool | removable, | ||
SCIP_DECL_VARDELORIG((*vardelorig)) | , | ||
SCIP_DECL_VARTRANS((*vartrans)) | , | ||
SCIP_DECL_VARDELTRANS((*vardeltrans)) | , | ||
SCIP_DECL_VARCOPY((*varcopy)) | , | ||
SCIP_VARDATA * | vardata | ||
) |
creates and captures an original problem variable; an integer variable with bounds zero and one is automatically converted into a binary variable
- Parameters
-
var pointer to variable data blkmem block memory set global SCIP settings stat problem statistics name name of variable, or NULL for automatic name creation lb lower bound of variable ub upper bound of variable obj objective function value vartype type of variable initial should var's column be present in the initial root LP? removable is var's column removable from the LP (due to aging or cleanup)? vardata user data for this specific variable
Definition at line 2075 of file var.c.
References NULL, SCIP_CALL, SCIP_OKAY, SCIP_VARSTATUS_ORIGINAL, SCIPvarCapture(), SCIPvarCreateTransformed(), and varCreate().
Referenced by SCIPcreateVar(), SCIPvarCopy(), and varCreate().
◆ SCIPvarCreateTransformed()
SCIP_RETCODE SCIPvarCreateTransformed | ( | SCIP_VAR ** | var, |
BMS_BLKMEM * | blkmem, | ||
SCIP_SET * | set, | ||
SCIP_STAT * | stat, | ||
const char * | name, | ||
SCIP_Real | lb, | ||
SCIP_Real | ub, | ||
SCIP_Real | obj, | ||
SCIP_VARTYPE | vartype, | ||
SCIP_Bool | initial, | ||
SCIP_Bool | removable, | ||
SCIP_DECL_VARDELORIG((*vardelorig)) | , | ||
SCIP_DECL_VARTRANS((*vartrans)) | , | ||
SCIP_DECL_VARDELTRANS((*vardeltrans)) | , | ||
SCIP_DECL_VARCOPY((*varcopy)) | , | ||
SCIP_VARDATA * | vardata | ||
) |
creates and captures a loose variable belonging to the transformed problem; an integer variable with bounds zero and one is automatically converted into a binary variable
- Parameters
-
var pointer to variable data blkmem block memory set global SCIP settings stat problem statistics name name of variable, or NULL for automatic name creation lb lower bound of variable ub upper bound of variable obj objective function value vartype type of variable initial should var's column be present in the initial root LP? removable is var's column removable from the LP (due to aging or cleanup)? vardata user data for this specific variable
Definition at line 2118 of file var.c.
References NULL, SCIP_CALL, SCIP_OKAY, SCIP_VARSTATUS_LOOSE, SCIPeventfilterCreate(), SCIPvarCapture(), SCIPvarCopy(), and varCreate().
Referenced by SCIPcreateVar(), SCIPvarCreateOriginal(), SCIPvarTransform(), and tryAggregateIntVars().
◆ SCIPvarCopy()
SCIP_RETCODE SCIPvarCopy | ( | SCIP_VAR ** | var, |
BMS_BLKMEM * | blkmem, | ||
SCIP_SET * | set, | ||
SCIP_STAT * | stat, | ||
SCIP * | sourcescip, | ||
SCIP_VAR * | sourcevar, | ||
SCIP_HASHMAP * | varmap, | ||
SCIP_HASHMAP * | consmap, | ||
SCIP_Bool | global | ||
) |
copies and captures a variable from source to target SCIP; an integer variable with bounds zero and one is automatically converted into a binary variable; in case the variable data cannot be copied the variable is not copied at all
- Parameters
-
var pointer to store the target variable blkmem block memory set global SCIP settings stat problem statistics sourcescip source SCIP data structure sourcevar source variable varmap a hashmap to store the mapping of source variables corresponding target variables consmap a hashmap to store the mapping of source constraints to the corresponding target constraints global should global or local bounds be used?
Definition at line 2160 of file var.c.
References SCIP_Var::donotaggr, SCIP_Var::donotmultaggr, NULL, parseValue(), SCIP_CALL, SCIP_DIDNOTRUN, SCIP_INVALIDRESULT, SCIP_OKAY, SCIP_Real, SCIP_STAGE_PROBLEM, SCIP_SUCCESS, SCIP_VARSTATUS_ORIGINAL, SCIPerrorMessage, SCIPhashmapExists(), SCIPhashmapInsert(), SCIPsetDebugMsg, SCIPvarCreateOriginal(), SCIPvarGetHolelistGlobal(), SCIPvarGetHolelistLocal(), SCIPvarGetLbGlobal(), SCIPvarGetLbLocal(), SCIPvarGetLbOriginal(), SCIPvarGetName(), SCIPvarGetObj(), SCIPvarGetStatus(), SCIPvarGetType(), SCIPvarGetUbGlobal(), SCIPvarGetUbLocal(), SCIPvarGetUbOriginal(), SCIPvarIsInitial(), SCIPvarIsRemovable(), SCIPvarMergeHistories(), and SCIP_Var::vardata.
Referenced by SCIPgetVarCopy(), and SCIPvarCreateTransformed().
◆ parseValue()
|
static |
parse given string for a SCIP_Real bound
- Parameters
-
set global SCIP settings str string to parse value pointer to store the parsed value endptr pointer to store the final string position if successfully parsed
Definition at line 2273 of file var.c.
References parseBounds(), SCIP_OKAY, SCIP_READERROR, SCIPerrorMessage, SCIPsetInfinity(), and SCIPstrToRealValue().
Referenced by parseBounds(), and SCIPvarCopy().
◆ parseBounds()
|
static |
parse the characters as bounds
- Parameters
-
set global SCIP settings str string to parse type bound type (global, local, or lazy) lb pointer to store the lower bound ub pointer to store the upper bound endptr pointer to store the final string position if successfully parsed (or NULL if an error occured)
Definition at line 2305 of file var.c.
References NULL, parseValue(), SCIP_CALL, SCIP_MAXSTRLEN, SCIP_OKAY, SCIPsetDebugMsg, SCIPstrCopySection(), and varParse().
Referenced by parseValue(), and varParse().
◆ varParse()
|
static |
parses a given string for a variable informations
- Parameters
-
set global SCIP settings messagehdlr message handler str string to parse name pointer to store the variable name lb pointer to store the lower bound ub pointer to store the upper bound obj pointer to store the objective coefficient vartype pointer to store the variable type lazylb pointer to store if the lower bound is lazy lazyub pointer to store if the upper bound is lazy local should the local bound be applied endptr pointer to store the final string position if successfully success pointer store if the paring process was successful
Definition at line 2350 of file var.c.
References FALSE, NULL, parseBounds(), SCIP_CALL, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_READERROR, SCIP_Real, SCIP_VARTYPE_BINARY, SCIP_VARTYPE_CONTINUOUS, SCIP_VARTYPE_IMPLINT, SCIP_VARTYPE_INTEGER, SCIPerrorMessage, SCIPmessagePrintWarning(), SCIPsetDebugMsg, SCIPsetInfinity(), SCIPsetIsGT(), SCIPsetIsInfinity(), SCIPsetIsLT(), SCIPstrCopySection(), SCIPstrToRealValue(), SCIPvarParseOriginal(), and TRUE.
Referenced by parseBounds(), SCIPvarParseOriginal(), and SCIPvarParseTransformed().
◆ SCIPvarParseOriginal()
SCIP_RETCODE SCIPvarParseOriginal | ( | SCIP_VAR ** | var, |
BMS_BLKMEM * | blkmem, | ||
SCIP_SET * | set, | ||
SCIP_MESSAGEHDLR * | messagehdlr, | ||
SCIP_STAT * | stat, | ||
const char * | str, | ||
SCIP_Bool | initial, | ||
SCIP_Bool | removable, | ||
SCIP_DECL_VARCOPY((*varcopy)) | , | ||
SCIP_DECL_VARDELORIG((*vardelorig)) | , | ||
SCIP_DECL_VARTRANS((*vartrans)) | , | ||
SCIP_DECL_VARDELTRANS((*vardeltrans)) | , | ||
SCIP_VARDATA * | vardata, | ||
char ** | endptr, | ||
SCIP_Bool * | success | ||
) |
parses variable information (in cip format) out of a string; if the parsing process was successful an original variable is created and captured; if variable is of integral type, fractional bounds are automatically rounded; an integer variable with bounds zero and one is automatically converted into a binary variable
- Parameters
-
var pointer to variable data blkmem block memory set global SCIP settings messagehdlr message handler stat problem statistics str string to parse initial should var's column be present in the initial root LP? removable is var's column removable from the LP (due to aging or cleanup)? vardata user data for this specific variable endptr pointer to store the final string position if successfully success pointer store if the paring process was successful
Definition at line 2497 of file var.c.
References FALSE, NULL, SCIP_CALL, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_Real, SCIP_VARSTATUS_ORIGINAL, SCIPvarCapture(), SCIPvarParseTransformed(), varCreate(), and varParse().
Referenced by SCIPparseVar(), and varParse().
◆ SCIPvarParseTransformed()
SCIP_RETCODE SCIPvarParseTransformed | ( | SCIP_VAR ** | var, |
BMS_BLKMEM * | blkmem, | ||
SCIP_SET * | set, | ||
SCIP_MESSAGEHDLR * | messagehdlr, | ||
SCIP_STAT * | stat, | ||
const char * | str, | ||
SCIP_Bool | initial, | ||
SCIP_Bool | removable, | ||
SCIP_DECL_VARCOPY((*varcopy)) | , | ||
SCIP_DECL_VARDELORIG((*vardelorig)) | , | ||
SCIP_DECL_VARTRANS((*vartrans)) | , | ||
SCIP_DECL_VARDELTRANS((*vardeltrans)) | , | ||
SCIP_VARDATA * | vardata, | ||
char ** | endptr, | ||
SCIP_Bool * | success | ||
) |
parses variable information (in cip format) out of a string; if the parsing process was successful a loose variable belonging to the transformed problem is created and captured; if variable is of integral type, fractional bounds are automatically rounded; an integer variable with bounds zero and one is automatically converted into a binary variable
- Parameters
-
var pointer to variable data blkmem block memory set global SCIP settings messagehdlr message handler stat problem statistics str string to parse initial should var's column be present in the initial root LP? removable is var's column removable from the LP (due to aging or cleanup)? vardata user data for this specific variable endptr pointer to store the final string position if successfully success pointer store if the paring process was successful
Definition at line 2561 of file var.c.
References NULL, SCIP_CALL, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_Real, SCIP_VARSTATUS_LOOSE, SCIPeventfilterCreate(), SCIPvarCapture(), TRUE, varCreate(), varEnsureParentvarsSize(), and varParse().
Referenced by SCIPparseVar(), and SCIPvarParseOriginal().
◆ varEnsureParentvarsSize()
|
static |
ensures, that parentvars array of var can store at least num entries
- Parameters
-
var problem variable blkmem block memory set global SCIP settings num minimum number of entries to store
Definition at line 2620 of file var.c.
References BMSreallocBlockMemoryArray, SCIP_Var::nparentvars, SCIP_Var::parentvars, SCIP_Var::parentvarssize, SCIP_ALLOC, SCIP_OKAY, SCIPsetCalcMemGrowSize(), and varAddParent().
Referenced by SCIPvarParseTransformed(), and varAddParent().
◆ varAddParent()
|
static |
adds variable to parent list of a variable and captures parent variable
- Parameters
-
var variable to add parent to blkmem block memory of transformed problem set global SCIP settings parentvar parent variable to add
Definition at line 2644 of file var.c.
References SCIP_Var::name, SCIP_Var::nparentvars, NULL, SCIP_CALL, SCIP_OKAY, SCIP_VARSTATUS_ORIGINAL, SCIPsetDebugMsg, SCIPvarCapture(), SCIPvarGetStatus(), varEnsureParentvarsSize(), and varFreeParents().
Referenced by SCIPvarAggregate(), SCIPvarNegate(), SCIPvarTransform(), and varEnsureParentvarsSize().
◆ varFreeParents()
|
static |
deletes and releases all variables from the parent list of a variable, frees the memory of parents array
- Parameters
-
var pointer to variable blkmem block memory set global SCIP settings eventqueue event queue (or NULL, if it's an original variable) lp current LP data (or NULL, if it's an original variable)
Definition at line 2672 of file var.c.
References SCIP_Var::aggregate, BMSfreeBlockMemoryArrayNull, SCIP_Var::data, SCIP_Var::multaggr, SCIP_Var::negatedvar, NULL, SCIP_Multaggr::nvars, SCIP_Var::original, SCIP_Var::parentvars, SCIP_Multaggr::scalars, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_VARSTATUS_AGGREGATED, SCIP_VARSTATUS_MULTAGGR, SCIP_VARSTATUS_NEGATED, SCIP_VARSTATUS_ORIGINAL, SCIPerrorMessage, SCIPsetDebugMsg, SCIPvarGetStatus(), SCIPvarRelease(), SCIP_Original::transvar, SCIP_Aggregate::var, varFree(), and SCIP_Multaggr::vars.
Referenced by varAddParent(), and varFree().
◆ varFree()
|
static |
frees a variable
- Parameters
-
var pointer to variable blkmem block memory set global SCIP settings eventqueue event queue (may be NULL, if it's not a column variable) lp current LP data (may be NULL, if it's not a column variable)
Definition at line 2745 of file var.c.
References BMSfreeBlockMemory, BMSfreeBlockMemoryArray, BMSfreeBlockMemoryArrayNull, holelistFree(), NULL, SCIP_CALL, SCIP_INVALIDDATA, SCIP_LOCKTYPE_MODEL, SCIP_OKAY, SCIP_VARSTATUS_AGGREGATED, SCIP_VARSTATUS_COLUMN, SCIP_VARSTATUS_FIXED, SCIP_VARSTATUS_LOOSE, SCIP_VARSTATUS_MULTAGGR, SCIP_VARSTATUS_NEGATED, SCIP_VARSTATUS_ORIGINAL, SCIPcliquelistFree(), SCIPcolFree(), SCIPerrorMessage, SCIPeventfilterFree(), SCIPhistoryFree(), SCIPimplicsFree(), SCIPsetDebugMsg, SCIPvaluehistoryFree(), SCIPvarCapture(), SCIPvarGetStatus(), SCIPvboundsFree(), SCIP_Var::vardata, and varFreeParents().
Referenced by SCIPvarRelease(), and varFreeParents().
◆ SCIPvarCapture()
void SCIPvarCapture | ( | SCIP_VAR * | var | ) |
increases usage counter of variable
- Parameters
-
var variable
Definition at line 2848 of file var.c.
References SCIP_Var::name, NULL, SCIP_Var::nuses, Scip::origprob, SCIP_Var::scip, SCIPdebugMessage, SCIPprobGetName(), SCIPvarRelease(), and Scip::transprob.
Referenced by boundchgCaptureData(), nlpAddVars(), SCIPcaptureVar(), SCIPpricestoreAddBdviolvar(), SCIPpricestoreAddVar(), SCIPprobAddVar(), SCIPtransformVar(), SCIPtransformVars(), SCIPvarCreateOriginal(), SCIPvarCreateTransformed(), SCIPvarParseOriginal(), SCIPvarParseTransformed(), SCIPvarTransform(), treeAddPendingBdchg(), varAddParent(), and varFree().
◆ SCIPvarRelease()
SCIP_RETCODE SCIPvarRelease | ( | SCIP_VAR ** | var, |
BMS_BLKMEM * | blkmem, | ||
SCIP_SET * | set, | ||
SCIP_EVENTQUEUE * | eventqueue, | ||
SCIP_LP * | lp | ||
) |
decreases usage counter of variable, and frees memory if necessary
- Parameters
-
var pointer to variable blkmem block memory set global SCIP settings eventqueue event queue lp current LP data (or NULL, if it's an original variable)
Definition at line 2873 of file var.c.
References NULL, SCIP_CALL, SCIP_OKAY, SCIPprobGetName(), SCIPsetDebugMsg, SCIPvarChgName(), and varFree().
Referenced by boundchgReleaseData(), nlpDelVarPos(), SCIPpricestoreAddVar(), SCIPpricestoreApplyVars(), SCIPpricestoreResetBounds(), SCIPprobFree(), SCIPprobPerformVarDeletions(), SCIPprobTransform(), SCIPreleaseVar(), SCIPtreeClear(), SCIPvarCapture(), treeApplyPendingBdchgs(), tryAggregateIntVars(), and varFreeParents().
◆ SCIPvarChgName()
SCIP_RETCODE SCIPvarChgName | ( | SCIP_VAR * | var, |
BMS_BLKMEM * | blkmem, | ||
const char * | name | ||
) |
change variable name
- Parameters
-
var problem variable blkmem block memory name name of variable
Definition at line 2914 of file var.c.
References BMSfreeBlockMemoryArray, SCIP_Var::name, NULL, SCIP_CALL, SCIP_OKAY, SCIPvarInitSolve(), and varSetName().
Referenced by SCIPchgVarName(), and SCIPvarRelease().
◆ SCIPvarInitSolve()
void SCIPvarInitSolve | ( | SCIP_VAR * | var | ) |
initializes variable data structure for solving
- Parameters
-
var problem variable
Definition at line 2932 of file var.c.
References SCIP_Var::conflictlbcount, SCIP_Var::conflictubcount, SCIP_Var::historycrun, NULL, printBounds(), and SCIPhistoryReset().
Referenced by SCIPprobInitSolve(), and SCIPvarChgName().
◆ printBounds()
|
static |
outputs the given bounds into the file stream
- Parameters
-
set global SCIP settings messagehdlr message handler file output file (or NULL for standard output) lb lower bound ub upper bound name bound type name
Definition at line 2945 of file var.c.
References NULL, printHolelist(), SCIPmessageFPrintInfo(), and SCIPsetIsInfinity().
Referenced by SCIPvarInitSolve(), and SCIPvarPrint().
◆ printHolelist()
|
static |
prints hole list to file stream
- Parameters
-
messagehdlr message handler file output file (or NULL for standard output) holelist hole list pointer to hole of interest name hole type name
Definition at line 2973 of file var.c.
References NULL, SCIP_Real, SCIPholelistGetLeft(), SCIPholelistGetNext(), SCIPholelistGetRight(), SCIPmessageFPrintInfo(), and SCIPvarPrint().
Referenced by printBounds(), and SCIPvarPrint().
◆ SCIPvarPrint()
SCIP_RETCODE SCIPvarPrint | ( | SCIP_VAR * | var, |
SCIP_SET * | set, | ||
SCIP_MESSAGEHDLR * | messagehdlr, | ||
FILE * | file | ||
) |
outputs variable information into file stream
- Parameters
-
var problem variable set global SCIP settings messagehdlr message handler file output file (or NULL for standard output)
Definition at line 3007 of file var.c.
References SCIP_Var::aggregate, SCIP_Aggregate::constant, SCIP_Multaggr::constant, SCIP_Negate::constant, SCIP_Var::data, SCIP_Var::glbdom, SCIP_Dom::lb, SCIP_Var::multaggr, SCIP_Var::name, SCIP_Var::negate, SCIP_Var::negatedvar, NULL, SCIP_Multaggr::nvars, SCIP_Var::obj, printBounds(), printHolelist(), SCIP_Aggregate::scalar, SCIP_Multaggr::scalars, SCIP_Var::scip, SCIP_ERROR, 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, SCIP_VARTYPE_BINARY, SCIP_VARTYPE_CONTINUOUS, SCIP_VARTYPE_IMPLINT, SCIP_VARTYPE_INTEGER, SCIPABORT, SCIPerrorMessage, SCIPmessageFPrintInfo(), SCIPsetIsInfinity(), SCIPsetIsZero(), SCIPvarGetHolelistGlobal(), SCIPvarGetHolelistLocal(), SCIPvarGetHolelistOriginal(), SCIPvarGetLbGlobal(), SCIPvarGetLbLazy(), SCIPvarGetLbLocal(), SCIPvarGetLbOriginal(), SCIPvarGetName(), SCIPvarGetStatus(), SCIPvarGetType(), SCIPvarGetUbGlobal(), SCIPvarGetUbLazy(), SCIPvarGetUbLocal(), SCIPvarGetUbOriginal(), SCIPvarIsTransformed(), SCIP_Aggregate::var, varEventVarUnlocked(), and SCIP_Multaggr::vars.
Referenced by printHolelist(), SCIPnlpWrite(), and SCIPprintVar().
◆ varEventVarUnlocked()
|
static |
issues a VARUNLOCKED event on the given variable
- Parameters
-
var problem variable to change blkmem block memory set global SCIP settings eventqueue event queue
Definition at line 3147 of file var.c.
References SCIP_Var::nlocksdown, SCIP_Var::nlocksup, NULL, SCIP_Var::scip, SCIP_CALL, SCIP_LOCKTYPE_MODEL, SCIP_OKAY, SCIPeventCreateVarUnlocked(), SCIPeventqueueAdd(), and SCIPvarAddLocks().
Referenced by SCIPvarAddLocks(), and SCIPvarPrint().
◆ SCIPvarAddLocks()
SCIP_RETCODE SCIPvarAddLocks | ( | SCIP_VAR * | var, |
BMS_BLKMEM * | blkmem, | ||
SCIP_SET * | set, | ||
SCIP_EVENTQUEUE * | eventqueue, | ||
SCIP_LOCKTYPE | locktype, | ||
int | addnlocksdown, | ||
int | addnlocksup | ||
) |
modifies lock numbers for rounding
- Parameters
-
var problem variable blkmem block memory set global SCIP settings eventqueue event queue locktype type of the variable locks addnlocksdown increase in number of rounding down locks addnlocksup increase in number of rounding up locks
Definition at line 3168 of file var.c.
References SCIP_Var::aggregate, SCIP_Var::data, SCIP_Var::donotaggr, SCIP_Var::donotmultaggr, SCIP_Var::multaggr, SCIP_Var::name, SCIP_Var::negatedvar, SCIP_Var::nlocksdown, SCIP_Var::nlocksup, NLOCKTYPES, NULL, SCIP_Multaggr::nvars, SCIP_Var::original, SCIP_Aggregate::scalar, SCIP_Multaggr::scalars, SCIP_Var::scip, SCIP_CALL, SCIP_INVALIDDATA, SCIP_LOCKTYPE_MODEL, SCIP_OKAY, SCIP_VARSTATUS_AGGREGATED, SCIP_VARSTATUS_COLUMN, SCIP_VARSTATUS_FIXED, SCIP_VARSTATUS_LOOSE, SCIP_VARSTATUS_MULTAGGR, SCIP_VARSTATUS_NEGATED, SCIP_VARSTATUS_ORIGINAL, SCIPerrorMessage, SCIPsetDebugMsg, SCIPvarAddLocks(), SCIPvarGetNLocksDownType(), SCIPvarGetStatus(), SCIP_Original::transvar, TRUE, SCIP_Aggregate::var, varEventVarUnlocked(), and SCIP_Multaggr::vars.
Referenced by SCIPaddVarLocksType(), SCIPlockVarCons(), SCIPunlockVarCons(), SCIPvarAddLocks(), SCIPvarAggregate(), SCIPvarFlattenAggregationGraph(), SCIPvarMultiaggregate(), and varEventVarUnlocked().
◆ SCIPvarTransform()
SCIP_RETCODE SCIPvarTransform | ( | SCIP_VAR * | origvar, |
BMS_BLKMEM * | blkmem, | ||
SCIP_SET * | set, | ||
SCIP_STAT * | stat, | ||
SCIP_OBJSENSE | objsense, | ||
SCIP_VAR ** | transvar | ||
) |
gets and captures transformed variable of a given variable; if the variable is not yet transformed, a new transformed variable for this variable is created
- Parameters
-
origvar original problem variable blkmem block memory of transformed problem set global SCIP settings stat problem statistics objsense objective sense of original problem; transformed is always MINIMIZE transvar pointer to store the transformed variable
Definition at line 3462 of file var.c.
References SCIP_Var::branchdirection, SCIP_Var::branchfactor, SCIP_Var::branchpriority, SCIP_Var::data, SCIP_Var::donotaggr, SCIP_Var::donotmultaggr, FALSE, SCIP_Var::glbdom, SCIP_Var::history, SCIP_Dom::holelist, holelistDuplicate(), SCIP_Var::initial, SCIP_Var::lazylb, SCIP_Var::lazyub, SCIP_Dom::lb, SCIP_Var::locdom, SCIP_Var::name, SCIP_Var::nlocksdown, SCIP_Var::nlocksup, NLOCKTYPES, NULL, SCIP_Var::obj, SCIP_Var::original, SCIP_Var::removable, SCIP_Var::scip, SCIP_CALL, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_Real, SCIP_VARSTATUS_ORIGINAL, SCIPhistoryUnite(), SCIPsetDebugMsg, SCIPsetIsEQ(), SCIPsnprintf(), SCIPvarCapture(), SCIPvarCreateTransformed(), SCIPvarGetStatus(), SCIPvarGetTransformed(), SCIPvarGetType(), SCIP_Original::transvar, SCIP_Dom::ub, varAddParent(), SCIP_Var::vardata, SCIP_Var::vlbs, and SCIP_Var::vubs.
Referenced by SCIPprobTransform(), SCIPtransformVar(), SCIPtransformVars(), and SCIPvarMayRoundUp().
◆ SCIPvarGetTransformed()
SCIP_RETCODE SCIPvarGetTransformed | ( | SCIP_VAR * | origvar, |
BMS_BLKMEM * | blkmem, | ||
SCIP_SET * | set, | ||
SCIP_STAT * | stat, | ||
SCIP_VAR ** | transvar | ||
) |
gets corresponding transformed variable of an original or negated original variable
- Parameters
-
origvar original problem variable blkmem block memory of transformed problem set global SCIP settings stat problem statistics transvar pointer to store the transformed variable, or NULL if not existing yet
Definition at line 3549 of file var.c.
References SCIP_Var::data, SCIP_Var::negatedvar, NULL, SCIP_Var::original, SCIP_Var::scip, SCIP_CALL, SCIP_OKAY, SCIP_VARSTATUS_NEGATED, SCIP_VARSTATUS_ORIGINAL, SCIPvarColumn(), SCIPvarGetStatus(), SCIPvarNegate(), and SCIP_Original::transvar.
Referenced by SCIPgetTransformedVar(), SCIPgetTransformedVars(), and SCIPvarTransform().
◆ SCIPvarColumn()
SCIP_RETCODE SCIPvarColumn | ( | SCIP_VAR * | var, |
BMS_BLKMEM * | blkmem, | ||
SCIP_SET * | set, | ||
SCIP_STAT * | stat, | ||
SCIP_PROB * | prob, | ||
SCIP_LP * | lp | ||
) |
converts loose transformed variable into column variable, creates LP column
- Parameters
-
var problem variable blkmem block memory set global SCIP settings stat problem statistics prob problem data lp current LP data
Definition at line 3580 of file var.c.
References SCIP_Var::col, SCIP_Var::data, SCIP_Var::name, NULL, SCIP_Var::probindex, SCIP_Var::removable, SCIP_Var::scip, SCIP_CALL, SCIP_OKAY, SCIP_VARSTATUS_COLUMN, SCIP_VARSTATUS_LOOSE, SCIPcolCreate(), SCIPlpUpdateVarColumn(), SCIPprobVarChangedStatus(), SCIPsetDebugMsg, SCIPvarGetStatus(), SCIPvarLoose(), and SCIP_Var::varstatus.
Referenced by SCIPpricestoreApplyVars(), SCIPvarAddToRow(), and SCIPvarGetTransformed().
◆ SCIPvarLoose()
SCIP_RETCODE SCIPvarLoose | ( | SCIP_VAR * | var, |
BMS_BLKMEM * | blkmem, | ||
SCIP_SET * | set, | ||
SCIP_EVENTQUEUE * | eventqueue, | ||
SCIP_PROB * | prob, | ||
SCIP_LP * | lp | ||
) |
converts column transformed variable back into loose variable, frees LP column
- Parameters
-
var problem variable blkmem block memory set global SCIP settings eventqueue event queue prob problem data lp current LP data
Definition at line 3614 of file var.c.
References SCIP_Var::col, SCIP_Var::data, SCIP_Col::lpipos, SCIP_Col::lppos, SCIP_Var::name, NULL, SCIP_Var::probindex, SCIP_Var::scip, SCIP_CALL, SCIP_OKAY, SCIP_VARSTATUS_COLUMN, SCIP_VARSTATUS_LOOSE, SCIPcolFree(), SCIPlpUpdateVarLoose(), SCIPprobVarChangedStatus(), SCIPsetDebugMsg, SCIPvarGetStatus(), varEventVarFixed(), and SCIP_Var::varstatus.
Referenced by SCIPprobExitSolve(), SCIPprobPerformVarDeletions(), and SCIPvarColumn().
◆ varEventVarFixed()
|
static |
issues a VARFIXED event on the given variable and all its parents (except ORIGINAL parents); the event issuing on the parents is necessary, because unlike with bound changes, the parent variables are not informed about a fixing of an active variable they are pointing to
- Parameters
-
var problem variable to change blkmem block memory set global SCIP settings eventqueue event queue fixeventtype is this event a fixation(0), an aggregation(1), or a multi-aggregation(2)
Definition at line 3655 of file var.c.
References SCIP_Var::nparentvars, NULL, SCIP_Var::parentvars, SCIP_Var::scip, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_VARSTATUS_AGGREGATED, SCIP_VARSTATUS_FIXED, SCIP_VARSTATUS_MULTAGGR, SCIP_VARSTATUS_ORIGINAL, SCIPerrorMessage, SCIPeventCreateVarFixed(), SCIPeventqueueAdd(), SCIPvarFix(), and SCIPvarGetStatus().
Referenced by SCIPvarAggregate(), SCIPvarFix(), SCIPvarLoose(), and SCIPvarMultiaggregate().
◆ SCIPvarFix()
SCIP_RETCODE SCIPvarFix | ( | SCIP_VAR * | var, |
BMS_BLKMEM * | blkmem, | ||
SCIP_SET * | set, | ||
SCIP_STAT * | stat, | ||
SCIP_PROB * | transprob, | ||
SCIP_PROB * | origprob, | ||
SCIP_PRIMAL * | primal, | ||
SCIP_TREE * | tree, | ||
SCIP_REOPT * | reopt, | ||
SCIP_LP * | lp, | ||
SCIP_BRANCHCAND * | branchcand, | ||
SCIP_EVENTFILTER * | eventfilter, | ||
SCIP_EVENTQUEUE * | eventqueue, | ||
SCIP_CLIQUETABLE * | cliquetable, | ||
SCIP_Real | fixedval, | ||
SCIP_Bool * | infeasible, | ||
SCIP_Bool * | fixed | ||
) |
converts variable into fixed variable
- Parameters
-
var problem variable blkmem block memory set global SCIP settings stat problem statistics transprob tranformed problem data origprob original problem data primal primal data tree branch and bound tree reopt reoptimization data structure lp current LP data branchcand branching candidate storage eventfilter event filter for global (not variable dependent) events eventqueue event queue cliquetable clique table data structure fixedval value to fix variable at infeasible pointer to store whether the fixing is infeasible fixed pointer to store whether the fixing was performed (variable was unfixed)
Definition at line 3750 of file var.c.
References SCIP_Var::aggregate, SCIP_Aggregate::constant, SCIP_Negate::constant, SCIP_Var::data, FALSE, SCIP_Var::glbdom, SCIP_Var::history, SCIP_Var::historycrun, SCIP_Dom::holelist, holelistFree(), SCIP_Var::implics, SCIP_Dom::lb, SCIP_Var::locdom, SCIP_Var::name, SCIP_Var::negate, SCIP_Var::negatedvar, NULL, SCIP_Var::obj, SCIP_Var::original, SCIP_Var::probindex, SCIP_Aggregate::scalar, SCIP_Var::scip, 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, SCIP_VARTYPE_CONTINUOUS, SCIPABORT, SCIPerrorMessage, SCIPeventqueueIsDelayed(), SCIPhistoryReset(), SCIPlpDecNLoosevars(), SCIPprobVarChangedStatus(), SCIPsetDebugMsg, SCIPsetIsEQ(), SCIPsetIsFeasEQ(), SCIPsetIsFeasGT(), SCIPsetIsFeasIntegral(), SCIPsetIsFeasLT(), SCIPsetIsInfinity(), SCIPsetIsIntegral(), SCIPsetIsZero(), SCIPsetRound(), SCIPvarAddObj(), SCIPvarChgLbGlobal(), SCIPvarChgObj(), SCIPvarChgUbGlobal(), SCIPvarFix(), SCIPvarGetActiveRepresentatives(), SCIPvarGetStatus(), SCIPvarGetType(), SCIPvarRemoveCliquesImplicsVbs(), SCIP_Original::transvar, TRUE, SCIP_Dom::ub, SCIP_Aggregate::var, varEventVarFixed(), SCIP_Var::varstatus, SCIP_Var::vlbs, and SCIP_Var::vubs.
Referenced by SCIPaggregateVars(), SCIPfixVar(), SCIPinferBinvarCons(), SCIPinferBinvarProp(), SCIPinferVarFixCons(), SCIPinferVarFixProp(), SCIPvarAggregate(), SCIPvarFix(), SCIPvarMultiaggregate(), varEventVarFixed(), and varUpdateAggregationBounds().
◆ SCIPvarGetActiveRepresentatives()
SCIP_RETCODE SCIPvarGetActiveRepresentatives | ( | SCIP_SET * | set, |
SCIP_VAR ** | vars, | ||
SCIP_Real * | scalars, | ||
int * | nvars, | ||
int | varssize, | ||
SCIP_Real * | constant, | ||
int * | requiredsize, | ||
SCIP_Bool | mergemultiples | ||
) |
transforms given variables, scalars and constant to the corresponding active variables, scalars and constant
If the number of needed active variables is greater than the available slots in the variable array, nothing happens except that the required size is stored in the corresponding variable; hence, if afterwards the required size is greater than the available slots (varssize), nothing happens; otherwise, the active variable representation is stored in the arrays.
The reason for this approach is that we cannot reallocate memory, since we do not know how the memory has been allocated (e.g., by a C++ 'new' or SCIP functions).
- Parameters
-
set global SCIP settings vars variable array to get active variables scalars scalars a_1, ..., a_n in linear sum a_1*x_1 + ... + a_n*x_n + c nvars pointer to number of variables and values in vars and scalars array varssize available slots in vars and scalars array constant pointer to constant c in linear sum a_1*x_1 + ... + a_n*x_n + c requiredsize pointer to store the required array size for the active variables mergemultiples should multiple occurrences of a var be replaced by a single coeff?
Definition at line 3930 of file var.c.
References SCIP_Var::data, FALSE, SCIP_Var::glbdom, SCIP_Dom::lb, SCIP_Var::multaggr, NULL, SCIP_Multaggr::nvars, SCIP_Multaggr::scalars, SCIP_Bool, SCIP_CALL, 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, SCIPsetAllocBufferArray, SCIPsetDuplicateBufferArray, SCIPsetFreeBufferArray, SCIPsetInfinity(), SCIPsetIsEQ(), SCIPsetIsInfinity(), SCIPsetIsZero(), SCIPsetReallocBufferArray, SCIPsortedvecFindPtr(), SCIPsortPtrReal(), SCIPvarCompare(), SCIPvarFlattenAggregationGraph(), SCIPvarGetMultaggrConstant(), SCIPvarGetProbvarSum(), SCIPvarGetStatus(), TRUE, SCIP_Dom::ub, and SCIP_Multaggr::vars.
Referenced by SCIPgetProbvarLinearSum(), SCIPsolRetransform(), SCIPvarFix(), SCIPvarFlattenAggregationGraph(), and SCIPvarMultiaggregate().
◆ SCIPvarFlattenAggregationGraph()
SCIP_RETCODE SCIPvarFlattenAggregationGraph | ( | SCIP_VAR * | var, |
BMS_BLKMEM * | blkmem, | ||
SCIP_SET * | set, | ||
SCIP_EVENTQUEUE * | eventqueue | ||
) |
flattens aggregation graph of multi-aggregated variable in order to avoid exponential recursion later on
- Note
- After the flattening the multi aggregation might resolve to be in fact an aggregation (or even a fixing?). This issue is not resolved right now, since var->data.multaggr.nvars < 2 should not cause troubles. However, one may loose performance hereby, since aggregated variables are easier to handle.
Note, that there are two cases where SCIPvarFlattenAggregationGraph() is called: The easier one is that it is called while installing the multi-aggregation. in principle, the described issue could be handled straightforward in this case by aggregating or fixing the variable instead. The more complicated case is the one, when the multi-aggregation is used, e.g., in linear presolving (and the variable is already declared to be multi-aggregated).
By now, it is not allowed to fix or aggregate multi-aggregated variables which would be necessary in this case.
The same issue appears in the SCIPvarGetProbvar...() methods.
- Parameters
-
var problem variable blkmem block memory set global SCIP settings eventqueue event queue
Definition at line 4425 of file var.c.
References BMSreallocBlockMemoryArray, SCIP_Multaggr::constant, SCIP_Var::data, SCIP_Var::multaggr, SCIP_Var::nlocksdown, SCIP_Var::nlocksup, NLOCKTYPES, NULL, SCIP_Multaggr::nvars, SCIP_Multaggr::scalars, SCIP_Var::scip, SCIP_ALLOC, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIP_VARSTATUS_MULTAGGR, SCIPvarAddLocks(), SCIPvarGetActiveRepresentatives(), SCIPvarGetStatus(), SCIPvarMergeHistories(), TRUE, SCIP_Multaggr::vars, and SCIP_Multaggr::varssize.
Referenced by exitPresolve(), SCIPflattenVarAggregationGraph(), and SCIPvarGetActiveRepresentatives().
◆ SCIPvarMergeHistories()
merge two variable histories together; a typical use case is that othervar
is an image of the target variable in a SCIP copy. Method should be applied with care, especially because no internal checks are performed whether the history merge is reasonable
- Note
- Do not use this method if the two variables originate from two SCIP's with different objective functions, since this corrupts the variable pseudo costs
- Apply with care; no internal checks are performed if the two variables should be merged
- Parameters
-
targetvar the variable that should contain both histories afterwards othervar the variable whose history is to be merged with that of the target variable stat problem statistics
Definition at line 4520 of file var.c.
References FALSE, SCIP_Stat::glbhistory, SCIP_Var::history, SCIP_Var::historycrun, SCIPhistoryUnite(), and SCIPvarSetHistory().
Referenced by SCIPmergeVariableStatistics(), SCIPvarCopy(), and SCIPvarFlattenAggregationGraph().
◆ SCIPvarSetHistory()
void SCIPvarSetHistory | ( | SCIP_VAR * | var, |
SCIP_HISTORY * | history, | ||
SCIP_STAT * | stat | ||
) |
sets the history of a variable; this method is typically used within reoptimization to keep and update the variable history over several iterations
- Parameters
-
var variable history the history which is to set stat problem statistics
Definition at line 4536 of file var.c.
References FALSE, SCIP_Stat::glbhistory, SCIP_Var::history, SCIPhistoryUnite(), and varUpdateAggregationBounds().
Referenced by SCIPvarMergeHistories().
◆ varUpdateAggregationBounds()
|
static |
tightens the bounds of both variables in aggregation x = a*y + c
- Parameters
-
var problem variable blkmem block memory set global SCIP settings stat problem statistics transprob tranformed problem data origprob original problem data primal primal data tree branch and bound tree reopt reoptimization data structure lp current LP data branchcand branching candidate storage eventfilter event filter for global (not variable dependent) events eventqueue event queue cliquetable clique table data structure aggvar variable y in aggregation x = a*y + c scalar multiplier a in aggregation x = a*y + c constant constant shift c in aggregation x = a*y + c infeasible pointer to store whether the aggregation is infeasible fixed pointer to store whether the variables were fixed
Definition at line 4551 of file var.c.
References FALSE, SCIP_Var::glbdom, SCIP_Dom::lb, MAX, MIN, SCIP_Var::name, NULL, SCIP_Var::scip, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPsetDebugMsg, SCIPsetInfinity(), SCIPsetIsEQ(), SCIPsetIsGT(), SCIPsetIsInfinity(), SCIPsetIsLT(), SCIPsetIsZero(), SCIPvarAdjustLb(), SCIPvarAdjustUb(), SCIPvarAggregate(), SCIPvarChgLbGlobal(), SCIPvarChgUbGlobal(), SCIPvarFix(), TRUE, and SCIP_Dom::ub.
Referenced by SCIPvarAggregate(), and SCIPvarSetHistory().
◆ SCIPvarAggregate()
SCIP_RETCODE SCIPvarAggregate | ( | SCIP_VAR * | var, |
BMS_BLKMEM * | blkmem, | ||
SCIP_SET * | set, | ||
SCIP_STAT * | stat, | ||
SCIP_PROB * | transprob, | ||
SCIP_PROB * | origprob, | ||
SCIP_PRIMAL * | primal, | ||
SCIP_TREE * | tree, | ||
SCIP_REOPT * | reopt, | ||
SCIP_LP * | lp, | ||
SCIP_CLIQUETABLE * | cliquetable, | ||
SCIP_BRANCHCAND * | branchcand, | ||
SCIP_EVENTFILTER * | eventfilter, | ||
SCIP_EVENTQUEUE * | eventqueue, | ||
SCIP_VAR * | aggvar, | ||
SCIP_Real | scalar, | ||
SCIP_Real | constant, | ||
SCIP_Bool * | infeasible, | ||
SCIP_Bool * | aggregated | ||
) |
converts loose variable into aggregated variable
- Parameters
-
var loose problem variable blkmem block memory set global SCIP settings stat problem statistics transprob tranformed problem data origprob original problem data primal primal data tree branch and bound tree reopt reoptimization data structure lp current LP data cliquetable clique table data structure branchcand branching candidate storage eventfilter event filter for global (not variable dependent) events eventqueue event queue aggvar loose variable y in aggregation x = a*y + c scalar multiplier a in aggregation x = a*y + c constant constant shift c in aggregation x = a*y + c infeasible pointer to store whether the aggregation is infeasible aggregated pointer to store whether the aggregation was successful
Definition at line 4742 of file var.c.
References SCIP_Var::aggregate, SCIP_Var::branchdirection, SCIP_Var::branchfactor, SCIP_Var::branchpriority, SCIP_Aggregate::constant, SCIP_Negate::constant, SCIP_Var::data, SCIP_Var::donotaggr, SCIP_Var::donotmultaggr, FALSE, SCIP_Var::glbdom, SCIP_Var::history, SCIP_Var::historycrun, SCIP_Var::implics, SCIP_Dom::lb, SCIP_Var::locdom, MAX, SCIP_Var::name, SCIP_Var::negate, SCIP_Var::negatedvar, SCIP_Var::nlocksdown, SCIP_Var::nlocksup, NLOCKTYPES, NULL, SCIP_Var::obj, SCIP_Var::probindex, SCIP_Var::removable, SCIP_Aggregate::scalar, SCIP_Var::scip, SCIP_Bool, SCIP_BRANCHDIR_AUTO, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIP_VARSTATUS_AGGREGATED, SCIP_VARSTATUS_LOOSE, SCIP_VARSTATUS_MULTAGGR, SCIP_VARSTATUS_NEGATED, SCIP_VARTYPE_BINARY, SCIPbranchdirOpposite(), SCIPdebugCheckAggregation, SCIPeventqueueIsDelayed(), SCIPhistoryReset(), SCIPhistoryUnite(), SCIPimplicsFree(), SCIPimplicsGetBounds(), SCIPimplicsGetNImpls(), SCIPimplicsGetTypes(), SCIPimplicsGetVars(), SCIPprobVarChangedStatus(), SCIPsetDebugMsg, SCIPsetIsEQ(), SCIPsetIsZero(), SCIPvarAddImplic(), SCIPvarAddLocks(), SCIPvarAddObj(), SCIPvarAddVlb(), SCIPvarAddVub(), SCIPvarChgBranchDirection(), SCIPvarChgBranchFactor(), SCIPvarChgBranchPriority(), SCIPvarChgObj(), SCIPvarDoNotAggr(), SCIPvarFix(), SCIPvarGetHolelistGlobal(), SCIPvarGetProbvarSum(), SCIPvarGetStatus(), SCIPvarGetType(), SCIPvarIsBinary(), SCIPvarMarkNotDeletable(), SCIPvarRemoveCliquesImplicsVbs(), SCIPvboundsFree(), SCIPvboundsGetCoefs(), SCIPvboundsGetConstants(), SCIPvboundsGetNVbds(), SCIPvboundsGetVars(), TRUE, tryAggregateIntVars(), SCIP_Dom::ub, SCIP_Aggregate::var, varAddParent(), varEventVarFixed(), SCIP_Var::varstatus, varUpdateAggregationBounds(), SCIP_Var::vlbs, and SCIP_Var::vubs.
Referenced by SCIPvarTryAggregateVars(), tryAggregateIntVars(), and varUpdateAggregationBounds().
◆ tryAggregateIntVars()
|
static |
Tries to aggregate an equality a*x + b*y == c consisting of two (implicit) integral active problem variables x and y. An integer aggregation (i.e. integral coefficients a' and b', such that a'*x + b'*y == c') is searched.
This can lead to the detection of infeasibility (e.g. if c' is fractional), or to a rejection of the aggregation (denoted by aggregated == FALSE), if the resulting integer coefficients are too large and thus numerically instable.
- Parameters
-
set global SCIP settings blkmem block memory stat problem statistics transprob tranformed problem data origprob original problem data primal primal data tree branch and bound tree reopt reoptimization data structure lp current LP data cliquetable clique table data structure branchcand branching candidate storage eventfilter event filter for global (not variable dependent) events eventqueue event queue varx integral variable x in equality a*x + b*y == c vary integral variable y in equality a*x + b*y == c scalarx multiplier a in equality a*x + b*y == c scalary multiplier b in equality a*x + b*y == c rhs right hand side c in equality a*x + b*y == c infeasible pointer to store whether the aggregation is infeasible aggregated pointer to store whether the aggregation was successful
Definition at line 5055 of file var.c.
References a, ABS, b, FALSE, MAXDNOM, NULL, SCIP_Stat::nvaridx, REALABS, SCIP_Bool, SCIP_CALL, SCIP_Longint, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_Real, SCIP_STAGE_PRESOLVING, SCIP_VARSTATUS_LOOSE, SCIP_VARTYPE_IMPLINT, SCIP_VARTYPE_INTEGER, SCIPcalcGreComDiv(), SCIPcalcSmaComMul(), SCIPprobAddVar(), SCIPrealToRational(), SCIPsetDebugMsg, SCIPsetEpsilon(), SCIPsetFeasFloor(), SCIPsetFeastol(), SCIPsetGetHugeValue(), SCIPsetGetStage(), SCIPsetInfinity(), SCIPsetIsFeasIntegral(), SCIPsetIsZero(), SCIPsnprintf(), SCIPvarAggregate(), SCIPvarCreateTransformed(), SCIPvarDoNotAggr(), SCIPvarGetStatus(), SCIPvarGetType(), SCIPvarIsInitial(), SCIPvarIsRemovable(), SCIPvarRelease(), SCIPvarTryAggregateVars(), and TRUE.
Referenced by SCIPvarAggregate(), and SCIPvarTryAggregateVars().
◆ SCIPvarTryAggregateVars()
SCIP_RETCODE SCIPvarTryAggregateVars | ( | SCIP_SET * | set, |
BMS_BLKMEM * | blkmem, | ||
SCIP_STAT * | stat, | ||
SCIP_PROB * | transprob, | ||
SCIP_PROB * | origprob, | ||
SCIP_PRIMAL * | primal, | ||
SCIP_TREE * | tree, | ||
SCIP_REOPT * | reopt, | ||
SCIP_LP * | lp, | ||
SCIP_CLIQUETABLE * | cliquetable, | ||
SCIP_BRANCHCAND * | branchcand, | ||
SCIP_EVENTFILTER * | eventfilter, | ||
SCIP_EVENTQUEUE * | eventqueue, | ||
SCIP_VAR * | varx, | ||
SCIP_VAR * | vary, | ||
SCIP_Real | scalarx, | ||
SCIP_Real | scalary, | ||
SCIP_Real | rhs, | ||
SCIP_Bool * | infeasible, | ||
SCIP_Bool * | aggregated | ||
) |
performs second step of SCIPaggregateVars(): the variable to be aggregated is chosen among active problem variables x' and y', preferring a less strict variable type as aggregation variable (i.e. continuous variables are preferred over implicit integers, implicit integers or integers over binaries). If none of the variables is continuous, it is tried to find an integer aggregation (i.e. integral coefficients a'' and b'', such that a''*x' + b''*y' == c''). This can lead to the detection of infeasibility (e.g. if c'' is fractional), or to a rejection of the aggregation (denoted by aggregated == FALSE), if the resulting integer coefficients are too large and thus numerically instable.
- Parameters
-
set global SCIP settings blkmem block memory stat problem statistics transprob tranformed problem data origprob original problem data primal primal data tree branch and bound tree reopt reoptimization data structure lp current LP data cliquetable clique table data structure branchcand branching candidate storage eventfilter event filter for global (not variable dependent) events eventqueue event queue varx variable x in equality a*x + b*y == c vary variable y in equality a*x + b*y == c scalarx multiplier a in equality a*x + b*y == c scalary multiplier b in equality a*x + b*y == c rhs right hand side c in equality a*x + b*y == c infeasible pointer to store whether the aggregation is infeasible aggregated pointer to store whether the aggregation was successful
Definition at line 5293 of file var.c.
References FALSE, NULL, REALABS, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIP_STAGE_PRESOLVING, SCIP_VARSTATUS_LOOSE, SCIP_VARTYPE_CONTINUOUS, SCIP_VARTYPE_IMPLINT, SCIP_VARTYPE_INTEGER, SCIPsetFeastol(), SCIPsetGetHugeValue(), SCIPsetGetStage(), SCIPsetIsFeasIntegral(), SCIPsetIsZero(), SCIPvarAggregate(), SCIPvarDoNotAggr(), SCIPvarGetStatus(), SCIPvarGetType(), SCIPvarIsBinary(), SCIPvarMultiaggregate(), TRUE, and tryAggregateIntVars().
Referenced by SCIPaggregateVars(), SCIPcliquetableCleanup(), SCIPvarMultiaggregate(), and tryAggregateIntVars().
◆ SCIPvarMultiaggregate()
SCIP_RETCODE SCIPvarMultiaggregate | ( | SCIP_VAR * | var, |
BMS_BLKMEM * | blkmem, | ||
SCIP_SET * | set, | ||
SCIP_STAT * | stat, | ||
SCIP_PROB * | transprob, | ||
SCIP_PROB * | origprob, | ||
SCIP_PRIMAL * | primal, | ||
SCIP_TREE * | tree, | ||
SCIP_REOPT * | reopt, | ||
SCIP_LP * | lp, | ||
SCIP_CLIQUETABLE * | cliquetable, | ||
SCIP_BRANCHCAND * | branchcand, | ||
SCIP_EVENTFILTER * | eventfilter, | ||
SCIP_EVENTQUEUE * | eventqueue, | ||
int | naggvars, | ||
SCIP_VAR ** | aggvars, | ||
SCIP_Real * | scalars, | ||
SCIP_Real | constant, | ||
SCIP_Bool * | infeasible, | ||
SCIP_Bool * | aggregated | ||
) |
converts variable into multi-aggregated variable
- Parameters
-
var problem variable blkmem block memory set global SCIP settings stat problem statistics transprob tranformed problem data origprob original problem data primal primal data tree branch and bound tree reopt reoptimization data structure lp current LP data cliquetable clique table data structure branchcand branching candidate storage eventfilter event filter for global (not variable dependent) events eventqueue event queue naggvars number n of variables in aggregation x = a_1*y_1 + ... + a_n*y_n + c aggvars variables y_i in aggregation x = a_1*y_1 + ... + a_n*y_n + c scalars multipliers a_i in aggregation x = a_1*y_1 + ... + a_n*y_n + c constant constant shift c in aggregation x = a_1*y_1 + ... + a_n*y_n + c infeasible pointer to store whether the aggregation is infeasible aggregated pointer to store whether the aggregation was successful
Definition at line 5447 of file var.c.
References BMSduplicateBlockMemoryArray, BMSfreeBlockMemoryArray, BMSreallocBlockMemoryArray, SCIP_Var::branchdirection, SCIP_Var::branchfactor, SCIP_Var::branchpriority, SCIP_Multaggr::constant, SCIP_Negate::constant, SCIP_Var::data, FALSE, SCIP_Var::glbdom, SCIP_Var::implics, SCIP_Var::index, SCIP_Dom::lb, SCIP_Var::locdom, MAX, SCIP_Var::multaggr, SCIP_Var::name, SCIP_Var::negate, SCIP_Var::negatedvar, SCIP_Var::nlocksdown, SCIP_Var::nlocksup, NLOCKTYPES, NULL, SCIP_Multaggr::nvars, SCIP_Var::obj, SCIP_Var::original, SCIP_Var::probindex, SCIP_Var::removable, SCIP_Multaggr::scalars, scalars, SCIP_Var::scip, SCIP_ALLOC, SCIP_BRANCHDIR_AUTO, 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, SCIPbranchdirOpposite(), SCIPdebugCheckAggregation, SCIPerrorMessage, SCIPeventqueueIsDelayed(), SCIPlpDecNLoosevars(), SCIPprobVarChangedStatus(), SCIPsetDebugMsg, SCIPsetIsEQ(), SCIPsetIsZero(), SCIPvarAddLocks(), SCIPvarAddObj(), SCIPvarChgBranchDirection(), SCIPvarChgBranchFactor(), SCIPvarChgBranchPriority(), SCIPvarChgObj(), SCIPvarDoNotMultaggr(), SCIPvarFix(), SCIPvarGetActiveRepresentatives(), SCIPvarGetHolelistGlobal(), SCIPvarGetName(), SCIPvarGetStatus(), SCIPvarMarkNotDeletable(), SCIPvarMultiaggregate(), SCIPvarRemoveCliquesImplicsVbs(), SCIPvarTryAggregateVars(), SCIP_Original::transvar, TRUE, SCIP_Dom::ub, varEventVarFixed(), varGetActiveVar(), SCIP_Multaggr::vars, SCIP_Multaggr::varssize, SCIP_Var::varstatus, SCIP_Var::vlbs, and SCIP_Var::vubs.
Referenced by SCIPmultiaggregateVar(), SCIPvarMultiaggregate(), and SCIPvarTryAggregateVars().
◆ varGetActiveVar()
transformed variables are resolved to their active, fixed, or multi-aggregated problem variable of a variable, or for original variables the same variable is returned
- Parameters
-
var problem variable
Definition at line 5800 of file var.c.
References SCIP_Var::aggregate, SCIP_Var::data, SCIP_Var::multaggr, SCIP_Var::name, SCIP_Var::negatedvar, NULL, SCIP_Multaggr::nvars, SCIP_Bool, SCIP_VARSTATUS_AGGREGATED, SCIP_VARSTATUS_COLUMN, SCIP_VARSTATUS_FIXED, SCIP_VARSTATUS_LOOSE, SCIP_VARSTATUS_MULTAGGR, SCIP_VARSTATUS_NEGATED, SCIP_VARSTATUS_ORIGINAL, SCIPABORT, SCIPdebugMessage, SCIPerrorMessage, SCIPvarDoNotAggr(), SCIPvarGetStatus(), TRUE, SCIP_Aggregate::var, and SCIP_Multaggr::vars.
Referenced by SCIPvarDoNotAggr(), SCIPvarDoNotMultaggr(), SCIPvarMarkDoNotAggr(), SCIPvarMarkDoNotMultaggr(), and SCIPvarMultiaggregate().
◆ SCIPvarDoNotAggr()
returns whether variable is not allowed to be aggregated
- Parameters
-
var problem variable
Definition at line 5849 of file var.c.
References SCIP_Var::donotaggr, FALSE, NULL, SCIP_Bool, SCIP_VARSTATUS_AGGREGATED, SCIP_VARSTATUS_COLUMN, SCIP_VARSTATUS_FIXED, SCIP_VARSTATUS_LOOSE, SCIP_VARSTATUS_MULTAGGR, SCIP_VARSTATUS_NEGATED, SCIP_VARSTATUS_ORIGINAL, SCIPABORT, SCIPerrorMessage, SCIPvarDoNotMultaggr(), SCIPvarGetStatus(), and varGetActiveVar().
Referenced by SCIPdoNotAggrVar(), SCIPvarAggregate(), SCIPvarTryAggregateVars(), tryAggregateIntVars(), and varGetActiveVar().
◆ SCIPvarDoNotMultaggr()
returns whether variable is not allowed to be multi-aggregated
- Parameters
-
var problem variable
Definition at line 5882 of file var.c.
References SCIP_Var::donotmultaggr, FALSE, NULL, SCIP_VARSTATUS_AGGREGATED, SCIP_VARSTATUS_COLUMN, SCIP_VARSTATUS_FIXED, SCIP_VARSTATUS_LOOSE, SCIP_VARSTATUS_MULTAGGR, SCIP_VARSTATUS_NEGATED, SCIP_VARSTATUS_ORIGINAL, SCIPABORT, SCIPerrorMessage, SCIPvarGetStatus(), SCIPvarNegate(), and varGetActiveVar().
Referenced by SCIPdoNotMultaggrVar(), SCIPvarDoNotAggr(), and SCIPvarMultiaggregate().
◆ SCIPvarNegate()
SCIP_RETCODE SCIPvarNegate | ( | SCIP_VAR * | var, |
BMS_BLKMEM * | blkmem, | ||
SCIP_SET * | set, | ||
SCIP_STAT * | stat, | ||
SCIP_VAR ** | negvar | ||
) |
gets negated variable x' = offset - x of problem variable x; the negated variable is created if not yet existing; the negation offset of binary variables is always 1, the offset of other variables is fixed to lb + ub when the negated variable is created
- Parameters
-
var problem variable to negate blkmem block memory of transformed problem set global SCIP settings stat problem statistics negvar pointer to store the negated variable
Definition at line 5918 of file var.c.
References SCIP_Var::branchdirection, SCIP_Var::branchfactor, SCIP_Var::branchpriority, SCIP_Var::donotaggr, SCIP_Var::donotmultaggr, SCIP_Var::glbdom, SCIP_Var::initial, SCIP_Var::lazylb, SCIP_Var::lazyub, SCIP_Dom::lb, SCIP_Var::locdom, SCIP_Var::name, SCIP_Var::negatedvar, NULL, SCIP_Var::removable, SCIP_Var::scip, SCIP_CALL, SCIP_INVALIDDATA, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_VARSTATUS_NEGATED, SCIPbranchdirOpposite(), SCIPerrorMessage, SCIPeventfilterCreate(), SCIPsetDebugMsg, SCIPsetIsInfinity(), SCIPsnprintf(), SCIPvarGetStatus(), SCIPvarGetType(), SCIPvarIsBinary(), SCIPvarIsTransformed(), SCIPvarMarkNotDeletable(), SCIP_Dom::ub, varAddParent(), varCreate(), and varSetProbindex().
Referenced by addSplitcons(), SCIPgetNegatedVar(), SCIPgetNegatedVars(), SCIPreoptApplyGlbConss(), SCIPvarDoNotMultaggr(), and SCIPvarGetTransformed().
◆ varSetProbindex()
|
static |
informs variable that its position in problem's vars array changed
- Parameters
-
var problem variable probindex new problem index of variable (-1 for removal)
Definition at line 6008 of file var.c.
References SCIP_Var::col, SCIP_Var::data, SCIP_Var::implics, NULL, SCIP_Var::probindex, SCIP_VARSTATUS_COLUMN, SCIPvarGetStatus(), SCIPvarSetProbindex(), SCIP_Col::var_probindex, SCIP_Var::vlbs, and SCIP_Var::vubs.
Referenced by SCIPvarNegate(), SCIPvarRemove(), and SCIPvarSetProbindex().
◆ SCIPvarSetProbindex()
void SCIPvarSetProbindex | ( | SCIP_VAR * | var, |
int | probindex | ||
) |
informs variable that its position in problem's vars array changed
- Parameters
-
var problem variable probindex new problem index of variable
Definition at line 6027 of file var.c.
References NULL, SCIPvarSetNamePointer(), and varSetProbindex().
Referenced by probInsertVar(), probRemoveVar(), and varSetProbindex().
◆ SCIPvarSetNamePointer()
void SCIPvarSetNamePointer | ( | SCIP_VAR * | var, |
const char * | name | ||
) |
gives the variable a new name
- Note
- the old pointer is overwritten, which might result in a memory leakage
- Parameters
-
var problem variable name new name of variable
Definition at line 6042 of file var.c.
References SCIP_Var::name, NULL, and SCIPvarRemove().
Referenced by resetVarname(), SCIPreaderWrite(), and SCIPvarSetProbindex().
◆ SCIPvarRemove()
SCIP_RETCODE SCIPvarRemove | ( | SCIP_VAR * | var, |
BMS_BLKMEM * | blkmem, | ||
SCIP_CLIQUETABLE * | cliquetable, | ||
SCIP_SET * | set, | ||
SCIP_Bool | final | ||
) |
informs variable that it will be removed from the problem; adjusts probindex and removes variable from the implication graph; If 'final' is TRUE, the thorough implication graph removal is not performed. Instead, only the variable bounds and implication data structures of the variable are freed. Since in the final removal of all variables from the transformed problem, this deletes the implication graph completely and is faster than removing the variables one by one, each time updating all lists of the other variables.
- Parameters
-
var problem variable blkmem block memory buffer cliquetable clique table data structure set global SCIP settings final is this the final removal of all problem variables?
Definition at line 6060 of file var.c.
References FALSE, SCIP_Var::implics, SCIP_Var::scip, SCIP_CALL, SCIP_OKAY, SCIP_VARSTATUS_COLUMN, SCIP_VARSTATUS_LOOSE, SCIPimplicsFree(), SCIPvarGetProbindex(), SCIPvarGetStatus(), SCIPvarIsTransformed(), SCIPvarMarkDeleted(), SCIPvarRemoveCliquesImplicsVbs(), SCIPvboundsFree(), TRUE, varSetProbindex(), SCIP_Var::vlbs, and SCIP_Var::vubs.
Referenced by probRemoveVar(), SCIPprobFree(), and SCIPvarSetNamePointer().
◆ SCIPvarMarkDeleted()
void SCIPvarMarkDeleted | ( | SCIP_VAR * | var | ) |
marks the variable to be deleted from the problem
- Parameters
-
var problem variable
Definition at line 6096 of file var.c.
References SCIP_Var::deleted, NULL, SCIP_Var::probindex, SCIPvarMarkDoNotAggr(), and TRUE.
Referenced by SCIPprobDelVar(), and SCIPvarRemove().
◆ SCIPvarMarkDoNotAggr()
SCIP_RETCODE SCIPvarMarkDoNotAggr | ( | SCIP_VAR * | var | ) |
marks the variable to not to be aggregated
- Parameters
-
var problem variable
Definition at line 6107 of file var.c.
References SCIP_Var::donotaggr, NULL, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_VARSTATUS_AGGREGATED, SCIP_VARSTATUS_COLUMN, SCIP_VARSTATUS_FIXED, SCIP_VARSTATUS_LOOSE, SCIP_VARSTATUS_MULTAGGR, SCIP_VARSTATUS_NEGATED, SCIP_VARSTATUS_ORIGINAL, SCIPerrorMessage, SCIPvarGetStatus(), SCIPvarMarkDoNotMultaggr(), TRUE, and varGetActiveVar().
Referenced by SCIPmarkDoNotAggrVar(), and SCIPvarMarkDeleted().
◆ SCIPvarMarkDoNotMultaggr()
SCIP_RETCODE SCIPvarMarkDoNotMultaggr | ( | SCIP_VAR * | var | ) |
marks the variable to not to be multi-aggregated
- Parameters
-
var problem variable
Definition at line 6143 of file var.c.
References SCIP_Var::donotmultaggr, NULL, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_VARSTATUS_AGGREGATED, SCIP_VARSTATUS_COLUMN, SCIP_VARSTATUS_FIXED, SCIP_VARSTATUS_LOOSE, SCIP_VARSTATUS_MULTAGGR, SCIP_VARSTATUS_NEGATED, SCIP_VARSTATUS_ORIGINAL, SCIPerrorMessage, SCIPvarChgType(), SCIPvarGetStatus(), TRUE, and varGetActiveVar().
Referenced by SCIPmarkDoNotMultaggrVar(), and SCIPvarMarkDoNotAggr().
◆ SCIPvarChgType()
SCIP_RETCODE SCIPvarChgType | ( | SCIP_VAR * | var, |
BMS_BLKMEM * | blkmem, | ||
SCIP_SET * | set, | ||
SCIP_PRIMAL * | primal, | ||
SCIP_LP * | lp, | ||
SCIP_EVENTQUEUE * | eventqueue, | ||
SCIP_VARTYPE | vartype | ||
) |
changes type of variable; cannot be called, if var belongs to a problem
- Parameters
-
var problem variable to change blkmem block memory set global SCIP settings primal primal data lp current LP data eventqueue event queue vartype new type of variable
Definition at line 6179 of file var.c.
References SCIP_Var::name, SCIP_Var::negatedvar, NULL, SCIP_Var::probindex, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_STAGE_TRANSFORMING, SCIPdebugMessage, SCIPerrorMessage, SCIPeventCreateTypeChanged(), SCIPeventqueueAdd(), SCIPsetGetStage(), SCIPvarGetType(), SCIPvarIsBinary(), varEventObjChanged(), and SCIP_Var::vartype.
Referenced by SCIPchgVarType(), SCIPprobChgVarType(), and SCIPvarMarkDoNotMultaggr().
◆ varEventObjChanged()
|
static |
appends OBJCHANGED event to the event queue
- Parameters
-
var problem variable to change blkmem block memory set global SCIP settings primal primal data lp current LP data eventqueue event queue oldobj old objective value for variable newobj new objective value for variable
Definition at line 6230 of file var.c.
References SCIP_Var::eventfilter, NULL, REALABS, SCIP_Var::scip, SCIP_CALL, SCIP_OKAY, SCIP_VARSTATUS_COLUMN, SCIP_VARSTATUS_LOOSE, SCIPeventCreateObjChanged(), SCIPeventqueueAdd(), SCIPsetEpsilon(), SCIPsetIsEQ(), SCIPvarChgObj(), SCIPvarGetStatus(), and SCIPvarIsTransformed().
Referenced by SCIPvarAddObj(), SCIPvarChgObj(), and SCIPvarChgType().
◆ SCIPvarChgObj()
SCIP_RETCODE SCIPvarChgObj | ( | SCIP_VAR * | var, |
BMS_BLKMEM * | blkmem, | ||
SCIP_SET * | set, | ||
SCIP_PROB * | prob, | ||
SCIP_PRIMAL * | primal, | ||
SCIP_LP * | lp, | ||
SCIP_EVENTQUEUE * | eventqueue, | ||
SCIP_Real | newobj | ||
) |
changes objective value of variable
- Parameters
-
var variable to change blkmem block memory set global SCIP settings prob problem data primal primal data lp current LP data eventqueue event queue newobj new objective value for variable
Definition at line 6265 of file var.c.
References SCIP_Var::data, SCIP_Lp::divingobjchg, SCIP_Var::name, NULL, SCIP_Var::obj, SCIP_Prob::objscale, SCIP_Prob::objsense, SCIP_Var::original, SCIP_Var::scip, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_Real, SCIP_STAGE_PROBLEM, SCIP_VARSTATUS_AGGREGATED, SCIP_VARSTATUS_COLUMN, SCIP_VARSTATUS_FIXED, SCIP_VARSTATUS_LOOSE, SCIP_VARSTATUS_MULTAGGR, SCIP_VARSTATUS_NEGATED, SCIP_VARSTATUS_ORIGINAL, SCIPerrorMessage, SCIPprobIsTransformed(), SCIPprobUpdateNObjVars(), SCIPsetDebugMsg, SCIPsetIsEQ(), SCIPvarAddObj(), SCIPvarChgObj(), SCIPvarGetStatus(), SCIPvarIsActive(), SCIP_Original::transvar, SCIP_Var::unchangedobj, and varEventObjChanged().
Referenced by SCIPchgVarObj(), SCIPchgVarObjProbing(), SCIPprobScaleObj(), SCIPpropagateProbing(), SCIPvarAggregate(), SCIPvarChgObj(), SCIPvarFix(), SCIPvarMultiaggregate(), treeBacktrackProbing(), and varEventObjChanged().
◆ SCIPvarAddObj()
SCIP_RETCODE SCIPvarAddObj | ( | SCIP_VAR * | var, |
BMS_BLKMEM * | blkmem, | ||
SCIP_SET * | set, | ||
SCIP_STAT * | stat, | ||
SCIP_PROB * | transprob, | ||
SCIP_PROB * | origprob, | ||
SCIP_PRIMAL * | primal, | ||
SCIP_TREE * | tree, | ||
SCIP_REOPT * | reopt, | ||
SCIP_LP * | lp, | ||
SCIP_EVENTFILTER * | eventfilter, | ||
SCIP_EVENTQUEUE * | eventqueue, | ||
SCIP_Real | addobj | ||
) |
adds value to objective value of variable
- Parameters
-
var variable to change blkmem block memory set global SCIP settings stat problem statistics transprob transformed problem data origprob original problem data primal primal data tree branch and bound tree reopt reoptimization data structure lp current LP data eventfilter event filter for global (not variable dependent) events eventqueue event queue addobj additional objective value for variable
Definition at line 6340 of file var.c.
References SCIP_Var::aggregate, SCIP_Aggregate::constant, SCIP_Multaggr::constant, SCIP_Negate::constant, SCIP_Var::data, SCIP_Lp::divingobjchg, SCIP_Var::donotaggr, SCIP_Var::donotmultaggr, SCIP_Dom::lb, SCIP_Var::locdom, SCIP_Var::multaggr, SCIP_Var::name, SCIP_Var::negate, SCIP_Var::negatedvar, NULL, SCIP_Multaggr::nvars, SCIP_Var::obj, SCIP_Prob::objscale, SCIP_Prob::objsense, SCIP_Var::original, SCIP_Aggregate::scalar, SCIP_Multaggr::scalars, SCIP_Var::scip, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_Real, SCIP_STAGE_INITSOLVE, SCIP_STAGE_PROBLEM, SCIP_VARSTATUS_AGGREGATED, SCIP_VARSTATUS_COLUMN, SCIP_VARSTATUS_FIXED, SCIP_VARSTATUS_LOOSE, SCIP_VARSTATUS_MULTAGGR, SCIP_VARSTATUS_NEGATED, SCIP_VARSTATUS_ORIGINAL, SCIPerrorMessage, SCIPprimalUpdateObjoffset(), SCIPprobAddObjoffset(), SCIPprobUpdateNObjVars(), SCIPsetDebugMsg, SCIPsetIsEQ(), SCIPsetIsZero(), SCIPvarAddObj(), SCIPvarChgObjDive(), SCIPvarGetStatus(), SCIPvarIsActive(), SCIP_Original::transvar, SCIP_Dom::ub, SCIP_Var::unchangedobj, SCIP_Aggregate::var, varEventObjChanged(), and SCIP_Multaggr::vars.
Referenced by SCIPaddVarObj(), SCIPvarAddObj(), SCIPvarAggregate(), SCIPvarChgObj(), SCIPvarFix(), and SCIPvarMultiaggregate().
◆ SCIPvarChgObjDive()
SCIP_RETCODE SCIPvarChgObjDive | ( | SCIP_VAR * | var, |
SCIP_SET * | set, | ||
SCIP_LP * | lp, | ||
SCIP_Real | newobj | ||
) |
changes objective value of variable in current dive
- Parameters
-
var problem variable to change set global SCIP settings lp current LP data newobj new objective value for variable
Definition at line 6455 of file var.c.
References SCIP_Var::aggregate, SCIP_Var::col, SCIP_Var::data, SCIP_Var::name, SCIP_Var::negatedvar, NULL, SCIP_Var::original, SCIP_Aggregate::scalar, SCIP_Var::scip, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_VARSTATUS_AGGREGATED, SCIP_VARSTATUS_COLUMN, SCIP_VARSTATUS_FIXED, SCIP_VARSTATUS_LOOSE, SCIP_VARSTATUS_MULTAGGR, SCIP_VARSTATUS_NEGATED, SCIP_VARSTATUS_ORIGINAL, SCIPcolChgObj(), SCIPerrorMessage, SCIPsetDebugMsg, SCIPsetIsZero(), SCIPvarAdjustLb(), SCIPvarChgObjDive(), SCIPvarGetStatus(), SCIP_Original::transvar, and SCIP_Aggregate::var.
Referenced by SCIPchgVarObjDive(), SCIPvarAddObj(), and SCIPvarChgObjDive().
◆ SCIPvarAdjustLb()
adjust lower bound to integral value, if variable is integral
- Parameters
-
var problem variable set global SCIP settings lb pointer to lower bound to adjust
Definition at line 6518 of file var.c.
References adjustedLb(), SCIP_Var::name, NULL, SCIP_Var::scip, SCIPsetDebugMsg, SCIPvarAdjustUb(), and SCIPvarGetType().
Referenced by addSplitcons(), changeAncestorBranchings(), fixBounds(), fixInterdiction(), SCIPadjustedVarLb(), SCIPchgVarLb(), SCIPchgVarLbGlobal(), SCIPchgVarLbNode(), SCIPchgVarLbProbing(), SCIPconflictAddRelaxedBound(), SCIPfixVarProbing(), SCIPinferVarLbCons(), SCIPinferVarLbProp(), SCIPnodeAddBoundinfer(), SCIPnodeAddHoleinfer(), SCIPtightenVarLb(), SCIPtightenVarLbGlobal(), SCIPtreeBranchVarNary(), SCIPvarAdjustBd(), SCIPvarChgLbDive(), SCIPvarChgObjDive(), sepastoreApplyLb(), sepastoreIsBdchgApplicable(), and varUpdateAggregationBounds().
◆ SCIPvarAdjustUb()
adjust upper bound to integral value, if variable is integral
- Parameters
-
var problem variable set global SCIP settings ub pointer to upper bound to adjust
Definition at line 6535 of file var.c.
References adjustedUb(), SCIP_Var::name, NULL, SCIP_Var::scip, SCIPsetDebugMsg, SCIPvarAdjustBd(), and SCIPvarGetType().
Referenced by addSplitcons(), changeAncestorBranchings(), fixBounds(), fixInterdiction(), SCIPadjustedVarUb(), SCIPchgVarUb(), SCIPchgVarUbGlobal(), SCIPchgVarUbNode(), SCIPchgVarUbProbing(), SCIPconflictAddRelaxedBound(), SCIPfixVarProbing(), SCIPinferVarUbCons(), SCIPinferVarUbProp(), SCIPnodeAddBoundinfer(), SCIPnodeAddHoleinfer(), SCIPtightenVarUb(), SCIPtightenVarUbGlobal(), SCIPtreeBranchVarNary(), SCIPvarAdjustBd(), SCIPvarAdjustLb(), SCIPvarChgUbDive(), sepastoreApplyUb(), sepastoreIsBdchgApplicable(), and varUpdateAggregationBounds().
◆ SCIPvarAdjustBd()
void SCIPvarAdjustBd | ( | SCIP_VAR * | var, |
SCIP_SET * | set, | ||
SCIP_BOUNDTYPE | boundtype, | ||
SCIP_Real * | bd | ||
) |
adjust lower or upper bound to integral value, if variable is integral
- Parameters
-
var problem variable set global SCIP settings boundtype type of bound to adjust bd pointer to bound to adjust
Definition at line 6552 of file var.c.
References SCIP_BOUNDTYPE_LOWER, SCIP_BOUNDTYPE_UPPER, SCIPvarAdjustLb(), SCIPvarAdjustUb(), and SCIPvarChgLbOriginal().
Referenced by SCIPvarAddImplic(), SCIPvarAdjustUb(), tightenSingleVar(), and treeAddPendingBdchg().
◆ SCIPvarChgLbOriginal()
SCIP_RETCODE SCIPvarChgLbOriginal | ( | SCIP_VAR * | var, |
SCIP_SET * | set, | ||
SCIP_Real | newbound | ||
) |
changes lower bound of original variable in original problem
- Parameters
-
var problem variable to change set global SCIP settings newbound new bound for variable
Definition at line 6568 of file var.c.
References adjustedLb(), SCIP_Negate::constant, SCIP_Var::data, SCIP_Dom::lb, SCIP_Var::name, SCIP_Var::negate, SCIP_Var::negatedvar, SCIP_Var::nparentvars, NULL, SCIP_Original::origdom, SCIP_Var::original, SCIP_Var::parentvars, SCIP_Var::scip, SCIP_CALL, SCIP_OKAY, SCIP_STAGE_PROBLEM, SCIP_VARSTATUS_NEGATED, SCIP_VARSTATUS_ORIGINAL, SCIPsetDebugMsg, SCIPsetGetStage(), SCIPsetIsEQ(), SCIPsetIsLE(), SCIPsetIsZero(), SCIPvarChgUbOriginal(), SCIPvarGetStatus(), SCIPvarGetType(), SCIPvarGetUbOriginal(), and SCIPvarIsTransformed().
Referenced by SCIPchgVarLb(), SCIPchgVarLbGlobal(), SCIPinferVarLbCons(), SCIPinferVarLbProp(), SCIPtightenVarLb(), SCIPtightenVarLbGlobal(), SCIPvarAdjustBd(), and SCIPvarChgUbOriginal().
◆ SCIPvarChgUbOriginal()
SCIP_RETCODE SCIPvarChgUbOriginal | ( | SCIP_VAR * | var, |
SCIP_SET * | set, | ||
SCIP_Real | newbound | ||
) |
changes upper bound of original variable in original problem
- Parameters
-
var problem variable to change set global SCIP settings newbound new bound for variable
Definition at line 6627 of file var.c.
References adjustedUb(), SCIP_Negate::constant, SCIP_Var::data, SCIP_Var::name, SCIP_Var::negate, SCIP_Var::negatedvar, SCIP_Var::nparentvars, NULL, SCIP_Original::origdom, SCIP_Var::original, SCIP_Var::parentvars, SCIP_Var::scip, SCIP_CALL, SCIP_OKAY, SCIP_STAGE_PROBLEM, SCIP_VARSTATUS_NEGATED, SCIP_VARSTATUS_ORIGINAL, SCIPsetDebugMsg, SCIPsetGetStage(), SCIPsetIsEQ(), SCIPsetIsGE(), SCIPsetIsZero(), SCIPvarChgLbOriginal(), SCIPvarGetLbOriginal(), SCIPvarGetStatus(), SCIPvarGetType(), SCIPvarIsTransformed(), SCIP_Dom::ub, and varEventGlbChanged().
Referenced by SCIPchgVarUb(), SCIPchgVarUbGlobal(), SCIPinferVarUbCons(), SCIPinferVarUbProp(), SCIPtightenVarUb(), SCIPtightenVarUbGlobal(), and SCIPvarChgLbOriginal().
◆ varEventGlbChanged()
|
static |
appends GLBCHANGED event to the event queue
- Parameters
-
var problem variable to change blkmem block memory set global SCIP settings lp current LP data branchcand branching candidate storage eventqueue event queue oldbound old lower bound for variable newbound new lower bound for variable
Definition at line 6687 of file var.c.
References SCIP_Var::eventfilter, SCIP_EventFilter::eventmask, SCIP_EventFilter::len, SCIP_Var::name, NULL, SCIP_Var::scip, SCIP_CALL, SCIP_EVENTTYPE_GLBCHANGED, SCIP_OKAY, SCIP_VARSTATUS_COLUMN, SCIP_VARSTATUS_LOOSE, SCIPeventCreateGlbChanged(), SCIPeventqueueAdd(), SCIPsetDebugMsg, SCIPsetIsEQ(), SCIPvarGetStatus(), SCIPvarIsTransformed(), and varEventGubChanged().
Referenced by SCIPvarChgUbOriginal(), and varProcessChgLbGlobal().
◆ varEventGubChanged()
|
static |
appends GUBCHANGED event to the event queue
- Parameters
-
var problem variable to change blkmem block memory set global SCIP settings lp current LP data branchcand branching candidate storage eventqueue event queue oldbound old lower bound for variable newbound new lower bound for variable
Definition at line 6725 of file var.c.
References SCIP_Var::eventfilter, SCIP_EventFilter::eventmask, SCIP_EventFilter::len, SCIP_Var::name, NULL, SCIP_Var::scip, SCIP_CALL, SCIP_EVENTTYPE_GUBCHANGED, SCIP_OKAY, SCIP_VARSTATUS_COLUMN, SCIP_VARSTATUS_LOOSE, SCIPeventCreateGubChanged(), SCIPeventqueueAdd(), SCIPsetDebugMsg, SCIPsetIsEQ(), SCIPvarGetStatus(), SCIPvarIsTransformed(), and varEventGholeAdded().
Referenced by varEventGlbChanged(), and varProcessChgUbGlobal().
◆ varEventGholeAdded()
|
static |
appends GHOLEADDED event to the event queue
- Parameters
-
var problem variable to change blkmem block memory set global SCIP settings eventqueue event queue left left bound of open interval in new hole right right bound of open interval in new hole
Definition at line 6763 of file var.c.
References SCIP_Var::eventfilter, SCIP_EventFilter::eventmask, SCIP_EventFilter::len, SCIP_Var::name, NULL, SCIP_Var::scip, SCIP_CALL, SCIP_EVENTTYPE_GHOLEADDED, SCIP_OKAY, SCIPeventCreateGholeAdded(), SCIPeventqueueAdd(), SCIPsetDebugMsg, SCIPsetIsLT(), SCIPvarIsTransformed(), and varIncRootboundchgs().
Referenced by varEventGubChanged(), and varProcessAddHoleGlobal().
◆ varIncRootboundchgs()
increases root bound change statistics after a global bound change
- Parameters
-
var problem variable to change set global SCIP settings stat problem statistics
Definition at line 6795 of file var.c.
References SCIP_Stat::nrootboundchgs, SCIP_Stat::nrootboundchgsrun, SCIP_Stat::nrootintfixings, SCIP_Stat::nrootintfixingsrun, NULL, SCIP_Var::scip, SCIP_Real, SCIP_STAGE_SOLVING, SCIPvarGetLbGlobal(), SCIPvarGetUbGlobal(), SCIPvarIsActive(), SCIPvarIsIntegral(), SCIPvarIsTransformed(), varProcessChgLbGlobal(), and varProcessChgUbGlobal().
Referenced by varEventGholeAdded(), varProcessChgLbGlobal(), and varProcessChgUbGlobal().
◆ varProcessChgUbGlobal()
|
static |
performs the current change in upper bound, changes all parents accordingly
- Parameters
-
var problem variable to change blkmem block memory set global SCIP settings stat problem statistics lp current LP data, may be NULL for original variables branchcand branching candidate storage, may be NULL for original variables eventqueue event queue, may be NULL for original variables cliquetable clique table data structure newbound new bound for variable
Definition at line 7012 of file var.c.
References adjustedUb(), SCIP_Var::aggregate, SCIP_BdChgInfo::boundchgtype, SCIP_Aggregate::constant, SCIP_Negate::constant, SCIP_Var::data, domMerge(), SCIP_Var::eventfilter, FALSE, SCIP_Var::glbdom, SCIP_Dom::lb, SCIP_Var::locdom, SCIP_Var::name, SCIP_Var::negate, SCIP_Var::negatedvar, SCIP_BdChgInfo::newbound, SCIP_Var::nparentvars, SCIP_Var::nubchginfos, NULL, SCIP_BdChgInfo::oldbound, SCIP_Var::parentvars, SCIP_BdChgInfo::redundant, SCIP_Aggregate::scalar, SCIP_Var::scip, SCIP_BOUNDCHGTYPE_BRANCHING, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_Real, SCIP_STAGE_PRESOLVING, SCIP_STAGE_PROBLEM, SCIP_VARSTATUS_AGGREGATED, SCIP_VARSTATUS_COLUMN, SCIP_VARSTATUS_FIXED, SCIP_VARSTATUS_LOOSE, SCIP_VARSTATUS_MULTAGGR, SCIP_VARSTATUS_NEGATED, SCIP_VARSTATUS_ORIGINAL, SCIP_VARTYPE_BINARY, SCIP_VARTYPE_CONTINUOUS, SCIPdebugCheckUbGlobal, SCIPerrorMessage, SCIPsetDebugMsg, SCIPsetGetStage(), SCIPsetIsEQ(), SCIPsetIsFeasEQ(), SCIPsetIsFeasGE(), SCIPsetIsFeasIntegral(), SCIPsetIsFeasLE(), SCIPsetIsGE(), SCIPsetIsInfinity(), SCIPsetIsNegative(), SCIPsetIsPositive(), SCIPvarChgLbGlobal(), SCIPvarGetName(), SCIPvarGetStatus(), SCIPvarGetType(), SCIPvarIsTransformed(), SCIPvarRemoveCliquesImplicsVbs(), TRUE, SCIP_Dom::ub, SCIP_Var::ubchginfos, SCIP_BdChgInfo::var, SCIP_Aggregate::var, varEventGubChanged(), varIncRootboundchgs(), varProcessChgLbGlobal(), and SCIP_Var::vartype.
Referenced by SCIPvarChgUbGlobal(), varIncRootboundchgs(), and varProcessChgLbGlobal().
◆ varProcessChgLbGlobal()
|
static |
performs the current change in lower bound, changes all parents accordingly
- Parameters
-
var problem variable to change blkmem block memory set global SCIP settings stat problem statistics lp current LP data, may be NULL for original variables branchcand branching candidate storage, may be NULL for original variables eventqueue event queue, may be NULL for original variables cliquetable clique table data structure newbound new bound for variable
Definition at line 6836 of file var.c.
References adjustedLb(), SCIP_Var::aggregate, SCIP_BdChgInfo::boundchgtype, SCIP_Aggregate::constant, SCIP_Negate::constant, SCIP_Var::data, domMerge(), SCIP_Var::eventfilter, FALSE, SCIP_Var::glbdom, SCIP_Dom::lb, SCIP_Var::lbchginfos, SCIP_Var::locdom, SCIP_Var::name, SCIP_Var::negate, SCIP_Var::negatedvar, SCIP_BdChgInfo::newbound, SCIP_Var::nlbchginfos, SCIP_Var::nparentvars, NULL, SCIP_BdChgInfo::oldbound, SCIP_Var::parentvars, SCIP_BdChgInfo::redundant, SCIP_Aggregate::scalar, SCIP_Var::scip, SCIP_BOUNDCHGTYPE_BRANCHING, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_Real, SCIP_STAGE_PRESOLVING, SCIP_STAGE_PROBLEM, SCIP_VARSTATUS_AGGREGATED, SCIP_VARSTATUS_COLUMN, SCIP_VARSTATUS_FIXED, SCIP_VARSTATUS_LOOSE, SCIP_VARSTATUS_MULTAGGR, SCIP_VARSTATUS_NEGATED, SCIP_VARSTATUS_ORIGINAL, SCIP_VARTYPE_BINARY, SCIP_VARTYPE_CONTINUOUS, SCIPdebugCheckLbGlobal, SCIPerrorMessage, SCIPsetDebugMsg, SCIPsetGetStage(), SCIPsetIsEQ(), SCIPsetIsFeasEQ(), SCIPsetIsFeasIntegral(), SCIPsetIsFeasLE(), SCIPsetIsInfinity(), SCIPsetIsLE(), SCIPsetIsNegative(), SCIPsetIsPositive(), SCIPsetIsZero(), SCIPvarGetName(), SCIPvarGetStatus(), SCIPvarGetType(), SCIPvarIsTransformed(), SCIPvarRemoveCliquesImplicsVbs(), TRUE, SCIP_Dom::ub, SCIP_BdChgInfo::var, SCIP_Aggregate::var, varEventGlbChanged(), varIncRootboundchgs(), varProcessChgUbGlobal(), and SCIP_Var::vartype.
Referenced by SCIPvarChgLbGlobal(), varIncRootboundchgs(), and varProcessChgUbGlobal().
◆ SCIPvarChgLbGlobal()
SCIP_RETCODE SCIPvarChgLbGlobal | ( | SCIP_VAR * | var, |
BMS_BLKMEM * | blkmem, | ||
SCIP_SET * | set, | ||
SCIP_STAT * | stat, | ||
SCIP_LP * | lp, | ||
SCIP_BRANCHCAND * | branchcand, | ||
SCIP_EVENTQUEUE * | eventqueue, | ||
SCIP_CLIQUETABLE * | cliquetable, | ||
SCIP_Real | newbound | ||
) |
changes global lower bound of variable; if possible, adjusts bound to integral value; updates local lower bound if the global bound is tighter
- Parameters
-
var problem variable to change blkmem block memory set global SCIP settings stat problem statistics lp current LP data, may be NULL for original variables branchcand branching candidate storage, may be NULL for original variables eventqueue event queue, may be NULL for original variables cliquetable clique table data structure newbound new bound for variable
Definition at line 7186 of file var.c.
References adjustedLb(), SCIP_Var::aggregate, SCIP_Aggregate::constant, SCIP_Negate::constant, SCIP_Var::data, SCIP_Var::glbdom, SCIP_Dom::lb, MIN, SCIP_Var::name, SCIP_Var::negate, SCIP_Var::negatedvar, NULL, SCIP_Var::original, SCIP_Aggregate::scalar, SCIP_Var::scip, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_Real, SCIP_STAGE_PRESOLVED, SCIP_STAGE_PROBLEM, SCIP_VARSTATUS_AGGREGATED, SCIP_VARSTATUS_COLUMN, SCIP_VARSTATUS_FIXED, SCIP_VARSTATUS_LOOSE, SCIP_VARSTATUS_MULTAGGR, SCIP_VARSTATUS_NEGATED, SCIP_VARSTATUS_ORIGINAL, SCIP_VARTYPE_CONTINUOUS, SCIPerrorMessage, SCIPsetDebugMsg, SCIPsetGetStage(), SCIPsetIsEQ(), SCIPsetIsFeasEQ(), SCIPsetIsFeasGT(), SCIPsetIsFeasIntegral(), SCIPsetIsFeasLE(), SCIPsetIsInfinity(), SCIPsetIsNegative(), SCIPsetIsPositive(), SCIPvarChgLbGlobal(), SCIPvarChgLbLocal(), SCIPvarChgUbGlobal(), SCIPvarGetLbLocal(), SCIPvarGetStatus(), SCIPvarGetType(), SCIP_Original::transvar, SCIP_Dom::ub, SCIP_Aggregate::var, and varProcessChgLbGlobal().
Referenced by applyImplic(), SCIPchgVarLb(), SCIPchgVarLbGlobal(), SCIPinferVarLbCons(), SCIPinferVarLbProp(), SCIPreoptInstallBounds(), SCIPtightenVarLb(), SCIPtightenVarLbGlobal(), SCIPvarAddVlb(), SCIPvarAddVub(), SCIPvarChgBdGlobal(), SCIPvarChgLbGlobal(), SCIPvarChgUbGlobal(), SCIPvarFix(), SCIPvarFixBinary(), SCIPvarResetBounds(), varAddImplic(), varProcessChgUbGlobal(), and varUpdateAggregationBounds().
◆ SCIPvarChgUbGlobal()
SCIP_RETCODE SCIPvarChgUbGlobal | ( | SCIP_VAR * | var, |
BMS_BLKMEM * | blkmem, | ||
SCIP_SET * | set, | ||
SCIP_STAT * | stat, | ||
SCIP_LP * | lp, | ||
SCIP_BRANCHCAND * | branchcand, | ||
SCIP_EVENTQUEUE * | eventqueue, | ||
SCIP_CLIQUETABLE * | cliquetable, | ||
SCIP_Real | newbound | ||
) |
changes global upper bound of variable; if possible, adjusts bound to integral value; updates local upper bound if the global bound is tighter
- Parameters
-
var problem variable to change blkmem block memory set global SCIP settings stat problem statistics lp current LP data, may be NULL for original variables branchcand branching candidate storage, may be NULL for original variables eventqueue event queue, may be NULL for original variables cliquetable clique table data structure newbound new bound for variable
Definition at line 7329 of file var.c.
References adjustedUb(), SCIP_Var::aggregate, SCIP_Aggregate::constant, SCIP_Negate::constant, SCIP_Var::data, SCIP_Var::glbdom, SCIP_Dom::lb, MAX, SCIP_Var::name, SCIP_Var::negate, SCIP_Var::negatedvar, NULL, SCIP_Var::original, SCIP_Aggregate::scalar, SCIP_Var::scip, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_Real, SCIP_STAGE_PRESOLVED, SCIP_STAGE_PROBLEM, SCIP_VARSTATUS_AGGREGATED, SCIP_VARSTATUS_COLUMN, SCIP_VARSTATUS_FIXED, SCIP_VARSTATUS_LOOSE, SCIP_VARSTATUS_MULTAGGR, SCIP_VARSTATUS_NEGATED, SCIP_VARSTATUS_ORIGINAL, SCIP_VARTYPE_CONTINUOUS, SCIPerrorMessage, SCIPsetDebugMsg, SCIPsetGetStage(), SCIPsetIsEQ(), SCIPsetIsFeasEQ(), SCIPsetIsFeasGE(), SCIPsetIsFeasIntegral(), SCIPsetIsFeasLT(), SCIPsetIsInfinity(), SCIPsetIsNegative(), SCIPsetIsPositive(), SCIPvarChgLbGlobal(), SCIPvarChgLbLazy(), SCIPvarChgUbGlobal(), SCIPvarChgUbLocal(), SCIPvarGetStatus(), SCIPvarGetType(), SCIPvarGetUbLocal(), SCIP_Original::transvar, SCIP_Dom::ub, SCIP_Aggregate::var, and varProcessChgUbGlobal().
Referenced by applyImplic(), SCIPchgVarUb(), SCIPchgVarUbGlobal(), SCIPinferVarUbCons(), SCIPinferVarUbProp(), SCIPreoptInstallBounds(), SCIPtightenVarUb(), SCIPtightenVarUbGlobal(), SCIPvarAddVlb(), SCIPvarAddVub(), SCIPvarChgBdGlobal(), SCIPvarChgLbGlobal(), SCIPvarChgUbGlobal(), SCIPvarFix(), SCIPvarFixBinary(), SCIPvarResetBounds(), varAddImplic(), and varUpdateAggregationBounds().
◆ SCIPvarChgLbLazy()
SCIP_RETCODE SCIPvarChgLbLazy | ( | SCIP_VAR * | var, |
SCIP_SET * | set, | ||
SCIP_Real | lazylb | ||
) |
changes lazy lower bound of the variable, this is only possible if the variable is not in the LP yet
- Parameters
-
var problem variable set global SCIP settings lazylb the lazy lower bound to be set
Definition at line 7470 of file var.c.
References SCIP_Var::glbdom, SCIP_Var::lazylb, SCIP_Var::lazyub, NULL, SCIP_Var::probindex, SCIP_Var::scip, SCIP_INVALIDCALL, SCIP_OKAY, SCIP_VARSTATUS_COLUMN, SCIPsetIsFeasGE(), SCIPvarChgUbLazy(), SCIPvarGetStatus(), and SCIP_Dom::ub.
Referenced by SCIPchgVarLbLazy(), and SCIPvarChgUbGlobal().
◆ SCIPvarChgUbLazy()
SCIP_RETCODE SCIPvarChgUbLazy | ( | SCIP_VAR * | var, |
SCIP_SET * | set, | ||
SCIP_Real | lazyub | ||
) |
changes lazy upper bound of the variable, this is only possible if the variable is not in the LP yet
- Parameters
-
var problem variable set global SCIP settings lazyub the lazy lower bound to be set
Definition at line 7493 of file var.c.
References SCIP_Var::glbdom, SCIP_Var::lazylb, SCIP_Var::lazyub, SCIP_Dom::lb, NULL, SCIP_Var::probindex, SCIP_Var::scip, SCIP_INVALIDCALL, SCIP_OKAY, SCIP_VARSTATUS_COLUMN, SCIPsetIsFeasGE(), SCIPvarChgBdGlobal(), and SCIPvarGetStatus().
Referenced by SCIPchgVarUbLazy(), and SCIPvarChgLbLazy().
◆ SCIPvarChgBdGlobal()
SCIP_RETCODE SCIPvarChgBdGlobal | ( | SCIP_VAR * | var, |
BMS_BLKMEM * | blkmem, | ||
SCIP_SET * | set, | ||
SCIP_STAT * | stat, | ||
SCIP_LP * | lp, | ||
SCIP_BRANCHCAND * | branchcand, | ||
SCIP_EVENTQUEUE * | eventqueue, | ||
SCIP_CLIQUETABLE * | cliquetable, | ||
SCIP_Real | newbound, | ||
SCIP_BOUNDTYPE | boundtype | ||
) |
changes global bound of variable; if possible, adjusts bound to integral value; updates local bound if the global bound is tighter
- Parameters
-
var problem variable to change blkmem block memory set global SCIP settings stat problem statistics lp current LP data, may be NULL for original variables branchcand branching candidate storage, may be NULL for original variables eventqueue event queue, may be NULL for original variables cliquetable clique table data structure newbound new bound for variable boundtype type of bound: lower or upper bound
Definition at line 7519 of file var.c.
References SCIP_BOUNDTYPE_LOWER, SCIP_BOUNDTYPE_UPPER, SCIP_INVALIDDATA, SCIPerrorMessage, SCIPvarChgLbGlobal(), SCIPvarChgUbGlobal(), and varEventLbChanged().
Referenced by boundchgApplyGlobal(), SCIPnodeAddBoundinfer(), and SCIPvarChgUbLazy().
◆ varEventLbChanged()
|
static |
appends LBTIGHTENED or LBRELAXED event to the event queue
- Parameters
-
var problem variable to change blkmem block memory set global SCIP settings lp current LP data branchcand branching candidate storage eventqueue event queue oldbound old lower bound for variable newbound new lower bound for variable
Definition at line 7547 of file var.c.
References SCIP_Var::eventfilter, SCIP_EventFilter::eventmask, SCIP_Var::glbdom, SCIP_Dom::lb, SCIP_EventFilter::len, SCIP_Var::name, NULL, SCIP_Var::scip, SCIP_CALL, SCIP_EVENTTYPE_LBCHANGED, SCIP_OKAY, SCIP_VARSTATUS_COLUMN, SCIP_VARSTATUS_LOOSE, SCIPeventCreateLbChanged(), SCIPeventqueueAdd(), SCIPsetDebugMsg, SCIPsetIsEQ(), SCIPvarGetStatus(), SCIPvarIsTransformed(), and varEventUbChanged().
Referenced by SCIPvarChgBdGlobal(), and varProcessChgLbLocal().
◆ varEventUbChanged()
|
static |
appends UBTIGHTENED or UBRELAXED event to the event queue
- Parameters
-
var problem variable to change blkmem block memory set global SCIP settings lp current LP data branchcand branching candidate storage eventqueue event queue oldbound old upper bound for variable newbound new upper bound for variable
Definition at line 7585 of file var.c.
References SCIP_Var::eventfilter, SCIP_EventFilter::eventmask, SCIP_Var::glbdom, SCIP_EventFilter::len, SCIP_Var::name, NULL, SCIP_Var::scip, SCIP_CALL, SCIP_EVENTTYPE_UBCHANGED, SCIP_OKAY, SCIP_Real, SCIP_VARSTATUS_COLUMN, SCIP_VARSTATUS_LOOSE, SCIPeventCreateUbChanged(), SCIPeventqueueAdd(), SCIPsetDebugMsg, SCIPsetIsEQ(), SCIPvarGetStatus(), SCIPvarIsTransformed(), SCIP_Dom::ub, varProcessChgLbLocal(), and varProcessChgUbLocal().
Referenced by varEventLbChanged(), and varProcessChgUbLocal().
◆ varProcessChgUbLocal()
|
static |
performs the current change in upper bound, changes all parents accordingly
- Parameters
-
var problem variable to change blkmem block memory set global SCIP settings stat problem statistics, or NULL if the bound change belongs to updating the parent variables lp current LP data, may be NULL for original variables branchcand branching candidate storage, may be NULL for original variables eventqueue event queue, may be NULL for original variables newbound new bound for variable
Definition at line 7805 of file var.c.
References adjustedUb(), SCIP_Var::aggregate, SCIP_Aggregate::constant, SCIP_Negate::constant, SCIP_Var::data, domMerge(), SCIP_Var::eventfilter, SCIP_Var::glbdom, SCIP_Dom::lb, SCIP_Var::locdom, MAX, MIN, SCIP_Var::name, SCIP_Var::negate, SCIP_Var::negatedvar, SCIP_Var::nparentvars, NULL, SCIP_Var::parentvars, SCIP_Aggregate::scalar, SCIP_Var::scip, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_Real, SCIP_STAGE_PROBLEM, SCIP_VARSTATUS_AGGREGATED, SCIP_VARSTATUS_COLUMN, SCIP_VARSTATUS_FIXED, SCIP_VARSTATUS_LOOSE, SCIP_VARSTATUS_MULTAGGR, SCIP_VARSTATUS_NEGATED, SCIP_VARSTATUS_ORIGINAL, SCIP_VARTYPE_BINARY, SCIP_VARTYPE_CONTINUOUS, SCIPerrorMessage, SCIPsetDebugMsg, SCIPsetGetStage(), SCIPsetIsEQ(), SCIPsetIsFeasEQ(), SCIPsetIsFeasGE(), SCIPsetIsFeasIntegral(), SCIPsetIsFeasLE(), SCIPsetIsGE(), SCIPsetIsInfinity(), SCIPsetIsIntegral(), SCIPsetIsNegative(), SCIPsetIsPositive(), SCIPsetIsZero(), SCIPstatIncrement, SCIPvarChgLbLocal(), SCIPvarGetStatus(), SCIPvarGetType(), SCIPvarIsTransformed(), SCIP_Dom::ub, SCIP_Aggregate::var, varEventUbChanged(), and varProcessChgLbLocal().
Referenced by SCIPvarChgUbLocal(), varEventUbChanged(), and varProcessChgLbLocal().
◆ varProcessChgLbLocal()
|
static |
performs the current change in lower bound, changes all parents accordingly
- Parameters
-
var problem variable to change blkmem block memory set global SCIP settings stat problem statistics, or NULL if the bound change belongs to updating the parent variables lp current LP data, may be NULL for original variables branchcand branching candidate storage, may be NULL for original variables eventqueue event queue, may be NULL for original variables newbound new bound for variable
Definition at line 7638 of file var.c.
References adjustedLb(), SCIP_Var::aggregate, SCIP_Aggregate::constant, SCIP_Negate::constant, SCIP_Var::data, domMerge(), SCIP_Var::eventfilter, SCIP_Var::glbdom, SCIP_Dom::lb, SCIP_Var::locdom, MAX, MIN, SCIP_Var::name, SCIP_Var::negate, SCIP_Var::negatedvar, SCIP_Var::nparentvars, NULL, SCIP_Var::parentvars, SCIP_Aggregate::scalar, SCIP_Var::scip, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_Real, SCIP_STAGE_PROBLEM, SCIP_VARSTATUS_AGGREGATED, SCIP_VARSTATUS_COLUMN, SCIP_VARSTATUS_FIXED, SCIP_VARSTATUS_LOOSE, SCIP_VARSTATUS_MULTAGGR, SCIP_VARSTATUS_NEGATED, SCIP_VARSTATUS_ORIGINAL, SCIP_VARTYPE_BINARY, SCIP_VARTYPE_CONTINUOUS, SCIPerrorMessage, SCIPsetDebugMsg, SCIPsetGetStage(), SCIPsetIsEQ(), SCIPsetIsFeasEQ(), SCIPsetIsFeasGE(), SCIPsetIsFeasIntegral(), SCIPsetIsFeasLE(), SCIPsetIsInfinity(), SCIPsetIsIntegral(), SCIPsetIsLE(), SCIPsetIsNegative(), SCIPsetIsPositive(), SCIPsetIsZero(), SCIPstatIncrement, SCIPvarGetStatus(), SCIPvarGetType(), SCIPvarIsTransformed(), SCIP_Dom::ub, SCIP_Aggregate::var, varEventLbChanged(), and varProcessChgUbLocal().
Referenced by SCIPvarChgLbLocal(), varEventUbChanged(), and varProcessChgUbLocal().
◆ SCIPvarChgLbLocal()
SCIP_RETCODE SCIPvarChgLbLocal | ( | SCIP_VAR * | var, |
BMS_BLKMEM * | blkmem, | ||
SCIP_SET * | set, | ||
SCIP_STAT * | stat, | ||
SCIP_LP * | lp, | ||
SCIP_BRANCHCAND * | branchcand, | ||
SCIP_EVENTQUEUE * | eventqueue, | ||
SCIP_Real | newbound | ||
) |
changes current local lower bound of variable; if possible, adjusts bound to integral value; stores inference information in variable
- Parameters
-
var problem variable to change blkmem block memory set global SCIP settings stat problem statistics lp current LP data, may be NULL for original variables branchcand branching candidate storage, may be NULL for original variables eventqueue event queue, may be NULL for original variables newbound new bound for variable
Definition at line 7971 of file var.c.
References adjustedLb(), SCIP_Var::aggregate, SCIP_Aggregate::constant, SCIP_Negate::constant, SCIP_Var::data, SCIP_Var::glbdom, SCIP_Dom::lb, SCIP_Var::locdom, MIN, SCIP_Var::name, SCIP_Var::negate, SCIP_Var::negatedvar, NULL, SCIP_Var::original, SCIP_Aggregate::scalar, SCIP_Var::scip, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_Real, SCIP_STAGE_PROBLEM, SCIP_VARSTATUS_AGGREGATED, SCIP_VARSTATUS_COLUMN, SCIP_VARSTATUS_FIXED, SCIP_VARSTATUS_LOOSE, SCIP_VARSTATUS_MULTAGGR, SCIP_VARSTATUS_NEGATED, SCIP_VARSTATUS_ORIGINAL, SCIP_VARTYPE_CONTINUOUS, SCIPerrorMessage, SCIPsetDebugMsg, SCIPsetGetStage(), SCIPsetIsEQ(), SCIPsetIsFeasEQ(), SCIPsetIsFeasGT(), SCIPsetIsFeasIntegral(), SCIPsetIsInfinity(), SCIPsetIsNegative(), SCIPsetIsPositive(), SCIPvarChgLbLocal(), SCIPvarChgUbLocal(), SCIPvarGetStatus(), SCIPvarGetType(), SCIP_Original::transvar, SCIP_Dom::ub, SCIP_Aggregate::var, and varProcessChgLbLocal().
Referenced by SCIPboundchgApply(), SCIPboundchgUndo(), SCIPchgVarLb(), SCIPchgVarLbGlobal(), SCIPinferVarLbCons(), SCIPinferVarLbProp(), SCIPpricestoreAddBdviolvar(), SCIPpricestoreResetBounds(), SCIPreoptInstallBounds(), SCIPtightenVarLb(), SCIPtightenVarLbGlobal(), SCIPvarChgBdLocal(), SCIPvarChgLbGlobal(), SCIPvarChgLbLocal(), SCIPvarChgUbLocal(), SCIPvarResetBounds(), and varProcessChgUbLocal().
◆ SCIPvarChgUbLocal()
SCIP_RETCODE SCIPvarChgUbLocal | ( | SCIP_VAR * | var, |
BMS_BLKMEM * | blkmem, | ||
SCIP_SET * | set, | ||
SCIP_STAT * | stat, | ||
SCIP_LP * | lp, | ||
SCIP_BRANCHCAND * | branchcand, | ||
SCIP_EVENTQUEUE * | eventqueue, | ||
SCIP_Real | newbound | ||
) |
changes current local upper bound of variable; if possible, adjusts bound to integral value; stores inference information in variable
- Parameters
-
var problem variable to change blkmem block memory set global SCIP settings stat problem statistics lp current LP data, may be NULL for original variables branchcand branching candidate storage, may be NULL for original variables eventqueue event queue, may be NULL for original variables newbound new bound for variable
Definition at line 8098 of file var.c.
References adjustedUb(), SCIP_Var::aggregate, SCIP_Aggregate::constant, SCIP_Negate::constant, SCIP_Var::data, SCIP_Var::glbdom, SCIP_Dom::lb, SCIP_Var::locdom, MAX, SCIP_Var::name, SCIP_Var::negate, SCIP_Var::negatedvar, NULL, SCIP_Var::original, SCIP_Aggregate::scalar, SCIP_Var::scip, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_Real, SCIP_STAGE_PROBLEM, SCIP_VARSTATUS_AGGREGATED, SCIP_VARSTATUS_COLUMN, SCIP_VARSTATUS_FIXED, SCIP_VARSTATUS_LOOSE, SCIP_VARSTATUS_MULTAGGR, SCIP_VARSTATUS_NEGATED, SCIP_VARSTATUS_ORIGINAL, SCIP_VARTYPE_CONTINUOUS, SCIPerrorMessage, SCIPsetDebugMsg, SCIPsetGetStage(), SCIPsetIsEQ(), SCIPsetIsFeasEQ(), SCIPsetIsFeasIntegral(), SCIPsetIsFeasLT(), SCIPsetIsInfinity(), SCIPsetIsNegative(), SCIPsetIsPositive(), SCIPvarChgBdLocal(), SCIPvarChgLbLocal(), SCIPvarChgUbLocal(), SCIPvarGetStatus(), SCIPvarGetType(), SCIP_Original::transvar, SCIP_Dom::ub, SCIP_Aggregate::var, and varProcessChgUbLocal().
Referenced by SCIPboundchgApply(), SCIPboundchgUndo(), SCIPchgVarUb(), SCIPchgVarUbGlobal(), SCIPinferVarUbCons(), SCIPinferVarUbProp(), SCIPpricestoreAddBdviolvar(), SCIPpricestoreResetBounds(), SCIPreoptInstallBounds(), SCIPtightenVarUb(), SCIPtightenVarUbGlobal(), SCIPvarChgBdLocal(), SCIPvarChgLbLocal(), SCIPvarChgUbGlobal(), SCIPvarChgUbLocal(), and SCIPvarResetBounds().
◆ SCIPvarChgBdLocal()
SCIP_RETCODE SCIPvarChgBdLocal | ( | SCIP_VAR * | var, |
BMS_BLKMEM * | blkmem, | ||
SCIP_SET * | set, | ||
SCIP_STAT * | stat, | ||
SCIP_LP * | lp, | ||
SCIP_BRANCHCAND * | branchcand, | ||
SCIP_EVENTQUEUE * | eventqueue, | ||
SCIP_Real | newbound, | ||
SCIP_BOUNDTYPE | boundtype | ||
) |
changes current local bound of variable; if possible, adjusts bound to integral value; stores inference information in variable
- Parameters
-
var problem variable to change blkmem block memory set global SCIP settings stat problem statistics lp current LP data, may be NULL for original variables branchcand branching candidate storage, may be NULL for original variables eventqueue event queue, may be NULL for original variables newbound new bound for variable boundtype type of bound: lower or upper bound
Definition at line 8224 of file var.c.
References SCIP_BOUNDTYPE_LOWER, SCIP_BOUNDTYPE_UPPER, SCIP_INVALIDDATA, SCIPerrorMessage, SCIPvarChgLbDive(), SCIPvarChgLbLocal(), and SCIPvarChgUbLocal().
Referenced by SCIPvarChgUbLocal().
◆ SCIPvarChgLbDive()
SCIP_RETCODE SCIPvarChgLbDive | ( | SCIP_VAR * | var, |
SCIP_SET * | set, | ||
SCIP_LP * | lp, | ||
SCIP_Real | newbound | ||
) |
changes lower bound of variable in current dive; if possible, adjusts bound to integral value
- Parameters
-
var problem variable to change set global SCIP settings lp current LP data newbound new bound for variable
Definition at line 8250 of file var.c.
References SCIP_Var::aggregate, SCIP_Var::col, SCIP_Aggregate::constant, SCIP_Negate::constant, SCIP_Var::data, SCIP_Var::name, SCIP_Var::negate, SCIP_Var::negatedvar, NULL, SCIP_Var::original, SCIP_Aggregate::scalar, SCIP_Var::scip, 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, SCIPcolChgLb(), SCIPerrorMessage, SCIPlpDiving(), SCIPsetDebugMsg, SCIPsetIsInfinity(), SCIPsetIsNegative(), SCIPsetIsPositive(), SCIPvarAdjustLb(), SCIPvarChgLbDive(), SCIPvarChgUbDive(), SCIPvarGetStatus(), SCIP_Original::transvar, and SCIP_Aggregate::var.
Referenced by SCIPchgVarLbDive(), SCIPvarChgBdLocal(), SCIPvarChgLbDive(), and SCIPvarChgUbDive().
◆ SCIPvarChgUbDive()
SCIP_RETCODE SCIPvarChgUbDive | ( | SCIP_VAR * | var, |
SCIP_SET * | set, | ||
SCIP_LP * | lp, | ||
SCIP_Real | newbound | ||
) |
changes upper bound of variable in current dive; if possible, adjusts bound to integral value
- Parameters
-
var problem variable to change set global SCIP settings lp current LP data newbound new bound for variable
Definition at line 8340 of file var.c.
References SCIP_Var::aggregate, SCIP_Var::col, SCIP_Aggregate::constant, SCIP_Negate::constant, SCIP_Var::data, SCIP_Var::name, SCIP_Var::negate, SCIP_Var::negatedvar, NULL, SCIP_Var::original, SCIP_Aggregate::scalar, SCIP_Var::scip, 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, SCIPcolChgUb(), SCIPerrorMessage, SCIPlpDiving(), SCIPsetDebugMsg, SCIPsetIsInfinity(), SCIPsetIsNegative(), SCIPsetIsPositive(), SCIPvarAdjustUb(), SCIPvarChgLbDive(), SCIPvarChgUbDive(), SCIPvarGetMultaggrLbLocal(), SCIPvarGetStatus(), SCIP_Original::transvar, and SCIP_Aggregate::var.
Referenced by SCIPchgVarUbDive(), SCIPvarChgLbDive(), and SCIPvarChgUbDive().
◆ SCIPvarGetMultaggrLbLocal()
for a multi-aggregated variable, gives the local lower bound computed by adding the local bounds from all aggregation variables, this lower bound may be tighter than the one given by SCIPvarGetLbLocal, since the latter is not updated if bounds of aggregation variables are changing
calling this function for a non-multi-aggregated variable is not allowed
- Parameters
-
var problem variable set global SCIP settings
Definition at line 8435 of file var.c.
References SCIP_Multaggr::constant, SCIP_Var::data, FALSE, MAX, SCIP_Var::multaggr, NULL, SCIP_Multaggr::nvars, SCIP_Multaggr::scalars, SCIP_Var::scip, SCIP_Bool, SCIP_Real, SCIP_VARSTATUS_MULTAGGR, SCIPsetInfinity(), SCIPsetIsInfinity(), SCIPvarGetLbLocal(), SCIPvarGetMultaggrLbLocal(), SCIPvarGetMultaggrUbLocal(), SCIPvarGetStatus(), SCIPvarGetUbLocal(), TRUE, SCIP_Multaggr::vars, and SCIP_Var::varstatus.
Referenced by SCIPbranchcandAddExternCand(), SCIPcomputeVarLbLocal(), SCIPgetVarMultaggrLbLocal(), SCIPvarChgUbDive(), SCIPvarGetMultaggrLbLocal(), and SCIPvarGetMultaggrUbLocal().
◆ SCIPvarGetMultaggrUbLocal()
for a multi-aggregated variable, gives the local upper bound computed by adding the local bounds from all aggregation variables, this upper bound may be tighter than the one given by SCIPvarGetUbLocal, since the latter is not updated if bounds of aggregation variables are changing
calling this function for a non-multi-aggregated variable is not allowed
- Parameters
-
var problem variable set global SCIP settings
Definition at line 8501 of file var.c.
References SCIP_Multaggr::constant, SCIP_Var::data, FALSE, MIN, SCIP_Var::multaggr, NULL, SCIP_Multaggr::nvars, SCIP_Multaggr::scalars, SCIP_Var::scip, SCIP_Bool, SCIP_Real, SCIP_VARSTATUS_MULTAGGR, SCIPsetInfinity(), SCIPsetIsInfinity(), SCIPvarGetLbLocal(), SCIPvarGetMultaggrLbGlobal(), SCIPvarGetMultaggrLbLocal(), SCIPvarGetMultaggrUbLocal(), SCIPvarGetStatus(), SCIPvarGetUbLocal(), TRUE, SCIP_Multaggr::vars, and SCIP_Var::varstatus.
Referenced by SCIPbranchcandAddExternCand(), SCIPcomputeVarUbLocal(), SCIPgetVarMultaggrUbLocal(), SCIPvarGetMultaggrLbLocal(), and SCIPvarGetMultaggrUbLocal().
◆ SCIPvarGetMultaggrLbGlobal()
for a multi-aggregated variable, gives the global lower bound computed by adding the global bounds from all aggregation variables, this global bound may be tighter than the one given by SCIPvarGetLbGlobal, since the latter is not updated if bounds of aggregation variables are changing
calling this function for a non-multi-aggregated variable is not allowed
- Parameters
-
var problem variable set global SCIP settings
Definition at line 8567 of file var.c.
References SCIP_Multaggr::constant, SCIP_Var::data, FALSE, MAX, SCIP_Var::multaggr, NULL, SCIP_Multaggr::nvars, SCIP_Multaggr::scalars, SCIP_Var::scip, SCIP_Bool, SCIP_Real, SCIP_VARSTATUS_MULTAGGR, SCIPsetInfinity(), SCIPsetIsInfinity(), SCIPvarGetLbGlobal(), SCIPvarGetMultaggrLbGlobal(), SCIPvarGetMultaggrUbGlobal(), SCIPvarGetStatus(), SCIPvarGetUbGlobal(), TRUE, SCIP_Multaggr::vars, and SCIP_Var::varstatus.
Referenced by SCIPcomputeVarLbGlobal(), SCIPgetVarMultaggrLbGlobal(), SCIPvarGetMultaggrLbGlobal(), SCIPvarGetMultaggrUbGlobal(), and SCIPvarGetMultaggrUbLocal().
◆ SCIPvarGetMultaggrUbGlobal()
for a multi-aggregated variable, gives the global upper bound computed by adding the global bounds from all aggregation variables, this upper bound may be tighter than the one given by SCIPvarGetUbGlobal, since the latter is not updated if bounds of aggregation variables are changing
calling this function for a non-multi-aggregated variable is not allowed
- Parameters
-
var problem variable set global SCIP settings
Definition at line 8633 of file var.c.
References SCIP_Multaggr::constant, SCIP_Var::data, FALSE, MIN, SCIP_Var::multaggr, NULL, SCIP_Multaggr::nvars, SCIP_Multaggr::scalars, SCIP_Var::scip, SCIP_Bool, SCIP_Real, SCIP_VARSTATUS_MULTAGGR, SCIPsetInfinity(), SCIPsetIsInfinity(), SCIPvarAddHoleOriginal(), SCIPvarGetLbGlobal(), SCIPvarGetMultaggrLbGlobal(), SCIPvarGetMultaggrUbGlobal(), SCIPvarGetStatus(), SCIPvarGetUbGlobal(), TRUE, SCIP_Multaggr::vars, and SCIP_Var::varstatus.
Referenced by SCIPcomputeVarUbGlobal(), SCIPgetVarMultaggrUbGlobal(), SCIPvarGetMultaggrLbGlobal(), and SCIPvarGetMultaggrUbGlobal().
◆ SCIPvarAddHoleOriginal()
SCIP_RETCODE SCIPvarAddHoleOriginal | ( | SCIP_VAR * | var, |
BMS_BLKMEM * | blkmem, | ||
SCIP_SET * | set, | ||
SCIP_Real | left, | ||
SCIP_Real | right | ||
) |
adds a hole to the original domain of the variable
- Parameters
-
var problem variable blkmem block memory set global SCIP settings left left bound of open interval in new hole right right bound of open interval in new hole
Definition at line 8694 of file var.c.
References adjustedLb(), adjustedUb(), SCIP_Var::data, domAddHole(), domMerge(), SCIP_Var::name, NULL, SCIP_Original::origdom, SCIP_Var::original, SCIP_Var::scip, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_STAGE_PROBLEM, SCIP_VARSTATUS_NEGATED, SCIP_VARSTATUS_ORIGINAL, SCIP_VARTYPE_CONTINUOUS, SCIPsetDebugMsg, SCIPsetIsEQ(), SCIPsetIsGE(), SCIPsetIsLE(), SCIPsetIsLT(), SCIPvarGetLbOriginal(), SCIPvarGetStatus(), SCIPvarGetType(), SCIPvarGetUbOriginal(), SCIPvarIsTransformed(), and varProcessAddHoleGlobal().
Referenced by SCIPvarGetMultaggrUbGlobal().
◆ varProcessAddHoleGlobal()
|
static |
performs the current add of domain, changes all parents accordingly
- Parameters
-
var problem variable blkmem block memory set global SCIP settings stat problem statistics eventqueue event queue, may be NULL for original variables left left bound of open interval in new hole right right bound of open interval in new hole added pointer to store whether the hole was added
Definition at line 8746 of file var.c.
References adjustedLb(), adjustedUb(), SCIP_Var::aggregate, SCIP_Aggregate::constant, SCIP_Negate::constant, SCIP_Var::data, domAddHole(), domMerge(), SCIP_Var::eventfilter, SCIP_Var::glbdom, SCIP_Dom::lb, SCIP_Var::negate, SCIP_Var::negatedvar, SCIP_Var::nparentvars, NULL, SCIP_Var::parentvars, SCIP_Aggregate::scalar, 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, SCIPerrorMessage, SCIPsetDebugMsg, SCIPsetIsEQ(), SCIPsetIsGE(), SCIPsetIsLE(), SCIPsetIsLT(), SCIPsetIsNegative(), SCIPsetIsPositive(), SCIPvarAddHoleGlobal(), SCIPvarGetLbGlobal(), SCIPvarGetName(), SCIPvarGetStatus(), SCIPvarGetType(), SCIPvarGetUbGlobal(), SCIPvarIsTransformed(), SCIP_Dom::ub, SCIP_Aggregate::var, and varEventGholeAdded().
Referenced by SCIPvarAddHoleGlobal(), and SCIPvarAddHoleOriginal().
◆ SCIPvarAddHoleGlobal()
SCIP_RETCODE SCIPvarAddHoleGlobal | ( | SCIP_VAR * | var, |
BMS_BLKMEM * | blkmem, | ||
SCIP_SET * | set, | ||
SCIP_STAT * | stat, | ||
SCIP_EVENTQUEUE * | eventqueue, | ||
SCIP_Real | left, | ||
SCIP_Real | right, | ||
SCIP_Bool * | added | ||
) |
adds a hole to the variable's global and local domain
- Parameters
-
var problem variable blkmem block memory set global SCIP settings stat problem statistics eventqueue event queue, may be NULL for original variables left left bound of open interval in new hole right right bound of open interval in new hole added pointer to store whether the hole was added
Definition at line 8875 of file var.c.
References adjustedLb(), adjustedUb(), SCIP_Var::aggregate, SCIP_Aggregate::constant, SCIP_Negate::constant, SCIP_Var::data, SCIP_Var::name, SCIP_Var::negate, SCIP_Var::negatedvar, NULL, SCIP_Var::original, SCIP_Aggregate::scalar, SCIP_Bool, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_Real, SCIP_STAGE_PROBLEM, SCIP_VARSTATUS_AGGREGATED, SCIP_VARSTATUS_COLUMN, SCIP_VARSTATUS_FIXED, SCIP_VARSTATUS_LOOSE, SCIP_VARSTATUS_MULTAGGR, SCIP_VARSTATUS_NEGATED, SCIP_VARSTATUS_ORIGINAL, SCIP_VARTYPE_CONTINUOUS, SCIPerrorMessage, SCIPsetDebugMsg, SCIPsetIsEQ(), SCIPsetIsGE(), SCIPsetIsLE(), SCIPsetIsLT(), SCIPsetIsNegative(), SCIPsetIsPositive(), SCIPvarAddHoleGlobal(), SCIPvarAddHoleLocal(), SCIPvarGetLbGlobal(), SCIPvarGetStatus(), SCIPvarGetType(), SCIPvarGetUbGlobal(), SCIP_Original::transvar, SCIP_Aggregate::var, varProcessAddHoleGlobal(), and varProcessAddHoleLocal().
Referenced by SCIPnodeAddHoleinfer(), SCIPvarAddHoleGlobal(), and varProcessAddHoleGlobal().
◆ varProcessAddHoleLocal()
|
static |
performs the current add of domain, changes all parents accordingly
- Parameters
-
var problem variable blkmem block memory set global SCIP settings stat problem statistics eventqueue event queue, may be NULL for original variables left left bound of open interval in new hole right right bound of open interval in new hole added pointer to store whether the hole was added, or NULL
Definition at line 8994 of file var.c.
References adjustedLb(), adjustedUb(), SCIP_Var::aggregate, SCIP_Aggregate::constant, SCIP_Negate::constant, SCIP_Var::data, domAddHole(), domMerge(), SCIP_Var::eventfilter, SCIP_Dom::lb, SCIP_Var::locdom, SCIP_Var::negate, SCIP_Var::negatedvar, SCIP_Var::nparentvars, NULL, SCIP_Var::parentvars, SCIP_Aggregate::scalar, 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, SCIPerrorMessage, SCIPsetDebugMsg, SCIPsetIsEQ(), SCIPsetIsGE(), SCIPsetIsLE(), SCIPsetIsLT(), SCIPsetIsNegative(), SCIPsetIsPositive(), SCIPvarAddHoleLocal(), SCIPvarGetLbLocal(), SCIPvarGetName(), SCIPvarGetStatus(), SCIPvarGetType(), SCIPvarGetUbLocal(), SCIPvarIsTransformed(), SCIP_Dom::ub, and SCIP_Aggregate::var.
Referenced by SCIPvarAddHoleGlobal(), and SCIPvarAddHoleLocal().
◆ SCIPvarAddHoleLocal()
SCIP_RETCODE SCIPvarAddHoleLocal | ( | SCIP_VAR * | var, |
BMS_BLKMEM * | blkmem, | ||
SCIP_SET * | set, | ||
SCIP_STAT * | stat, | ||
SCIP_EVENTQUEUE * | eventqueue, | ||
SCIP_Real | left, | ||
SCIP_Real | right, | ||
SCIP_Bool * | added | ||
) |
adds a hole to the variable's current local domain
- Parameters
-
var problem variable blkmem block memory set global SCIP settings stat problem statistics eventqueue event queue, may be NULL for original variables left left bound of open interval in new hole right right bound of open interval in new hole added pointer to store whether the hole was added
Definition at line 9123 of file var.c.
References adjustedLb(), adjustedUb(), SCIP_Var::aggregate, SCIP_Aggregate::constant, SCIP_Negate::constant, SCIP_Var::data, SCIP_Var::name, SCIP_Var::negate, SCIP_Var::negatedvar, NULL, SCIP_Var::original, SCIP_Aggregate::scalar, SCIP_Var::scip, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_Real, SCIP_STAGE_PROBLEM, SCIP_VARSTATUS_AGGREGATED, SCIP_VARSTATUS_COLUMN, SCIP_VARSTATUS_FIXED, SCIP_VARSTATUS_LOOSE, SCIP_VARSTATUS_MULTAGGR, SCIP_VARSTATUS_NEGATED, SCIP_VARSTATUS_ORIGINAL, SCIP_VARTYPE_CONTINUOUS, SCIPerrorMessage, SCIPsetDebugMsg, SCIPsetIsEQ(), SCIPsetIsGE(), SCIPsetIsLE(), SCIPsetIsLT(), SCIPsetIsNegative(), SCIPsetIsPositive(), SCIPstatIncrement, SCIPvarAddHoleLocal(), SCIPvarGetLbLocal(), SCIPvarGetStatus(), SCIPvarGetType(), SCIPvarGetUbLocal(), SCIPvarResetBounds(), SCIP_Original::transvar, SCIP_Aggregate::var, and varProcessAddHoleLocal().
Referenced by SCIPvarAddHoleGlobal(), SCIPvarAddHoleLocal(), and varProcessAddHoleLocal().
◆ SCIPvarResetBounds()
SCIP_RETCODE SCIPvarResetBounds | ( | SCIP_VAR * | var, |
BMS_BLKMEM * | blkmem, | ||
SCIP_SET * | set, | ||
SCIP_STAT * | stat | ||
) |
resets the global and local bounds of original variable to their original values
- Parameters
-
var problem variable blkmem block memory set global SCIP settings stat problem statistics
Definition at line 9232 of file var.c.
References SCIP_Var::data, SCIP_Var::glbdom, SCIP_Dom::holelist, holelistDuplicate(), holelistFree(), SCIP_Dom::lb, SCIP_Var::locdom, NULL, SCIP_Original::origdom, SCIP_Var::original, SCIP_Var::scip, SCIP_CALL, SCIP_OKAY, SCIPvarChgLbGlobal(), SCIPvarChgLbLocal(), SCIPvarChgUbGlobal(), SCIPvarChgUbLocal(), SCIPvarGetTransVar(), SCIPvarIsOriginal(), SCIP_Dom::ub, and varEventImplAdded().
Referenced by SCIPprobResetBounds(), and SCIPvarAddHoleLocal().
◆ varEventImplAdded()
|
static |
issues a IMPLADDED event on the given variable
- Parameters
-
var problem variable to change blkmem block memory set global SCIP settings eventqueue event queue
Definition at line 9265 of file var.c.
References NULL, SCIP_CALL, SCIP_OKAY, SCIPeventCreateImplAdded(), SCIPeventqueueAdd(), and varAddVbound().
Referenced by SCIPvarResetBounds(), varAddImplic(), and varAddVbound().
◆ varAddVbound()
|
static |
actually performs the addition of a variable bound to the variable's vbound arrays
- Parameters
-
var problem variable x in x <= b*z + d or x >= b*z + d blkmem block memory set global SCIP settings eventqueue event queue vbtype type of variable bound (LOWER or UPPER) vbvar variable z in x <= b*z + d or x >= b*z + d vbcoef coefficient b in x <= b*z + d or x >= b*z + d vbconstant constant d in x <= b*z + d or x >= b*z + d
Definition at line 9285 of file var.c.
References checkImplic(), SCIP_Var::closestvblpcount, SCIP_Bool, SCIP_BOUNDTYPE_LOWER, SCIP_BOUNDTYPE_UPPER, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPdebugCheckVbound, SCIPsetDebugMsg, SCIPsetIsGE(), SCIPsetIsLE(), SCIPvarGetLbGlobal(), SCIPvarGetName(), SCIPvarGetUbGlobal(), SCIPvboundsAdd(), varEventImplAdded(), SCIP_Var::vlbs, and SCIP_Var::vubs.
Referenced by SCIPvarAddVlb(), SCIPvarAddVub(), varAddImplic(), and varEventImplAdded().
◆ checkImplic()
|
static |
checks whether the given implication is redundant or infeasible w.r.t. the implied variables global bounds
- Parameters
-
set global SCIP settings implvar variable y in implication y <= b or y >= b impltype type of implication y <= b (SCIP_BOUNDTYPE_UPPER) or y >= b (SCIP_BOUNDTYPE_LOWER) implbound bound b in implication y <= b or y >= b redundant pointer to store whether the implication is redundant infeasible pointer to store whether the implication is infeasible
Definition at line 9383 of file var.c.
References applyImplic(), NULL, SCIP_BOUNDTYPE_LOWER, SCIP_Real, SCIPsetIsFeasGE(), SCIPsetIsFeasGT(), SCIPsetIsFeasLE(), SCIPsetIsFeasLT(), SCIPvarGetLbGlobal(), and SCIPvarGetUbGlobal().
Referenced by varAddImplic(), and varAddVbound().
◆ applyImplic()
|
static |
applies the given implication, if it is not redundant
- Parameters
-
blkmem block memory set global SCIP settings stat problem statistics transprob transformed problem origprob original problem tree branch and bound tree if in solving stage reopt reoptimization data structure lp current LP data branchcand branching candidate storage eventqueue event queue cliquetable clique table data structure implvar variable y in implication y <= b or y >= b impltype type of implication y <= b (SCIP_BOUNDTYPE_UPPER) or y >= b (SCIP_BOUNDTYPE_LOWER) implbound bound b in implication y <= b or y >= b infeasible pointer to store whether an infeasibility was detected nbdchgs pointer to count the number of performed bound changes, or NULL
Definition at line 9414 of file var.c.
References FALSE, NULL, SCIP_BOUNDTYPE_LOWER, SCIP_BOUNDTYPE_UPPER, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIP_STAGE_SOLVING, SCIPnodeAddBoundchg(), SCIPprobIsTransformed(), SCIPsetGetStage(), SCIPsetIsFeasGT(), SCIPsetIsFeasLT(), SCIPtreeGetRootNode(), SCIPvarChgLbGlobal(), SCIPvarChgUbGlobal(), SCIPvarGetLbGlobal(), SCIPvarGetUbGlobal(), TRUE, and varAddImplic().
Referenced by checkImplic(), SCIPvarAddImplic(), and varAddImplic().
◆ varAddImplic()
|
static |
actually performs the addition of an implication to the variable's implication arrays, and adds the corresponding implication or variable bound to the implied variable; if the implication is conflicting, the variable is fixed to the opposite value; if the variable is already fixed to the given value, the implication is performed immediately; if the implication is redundant with respect to the variables' global bounds, it is ignored
- Parameters
-
var problem variable blkmem block memory set global SCIP settings stat problem statistics transprob transformed problem origprob original problem tree branch and bound tree if in solving stage reopt reoptimization data structure lp current LP data cliquetable clique table data structure branchcand branching candidate storage eventqueue event queue varfixing FALSE if y should be added in implications for x == 0, TRUE for x == 1 implvar variable y in implication y <= b or y >= b impltype type of implication y <= b (SCIP_BOUNDTYPE_UPPER) or y >= b (SCIP_BOUNDTYPE_LOWER) implbound bound b in implication y <= b or y >= b isshortcut is the implication a shortcut, i.e., added as part of the transitive closure of another implication? infeasible pointer to store whether an infeasibility was detected nbdchgs pointer to count the number of performed bound changes, or NULL added pointer to store whether an implication was added
Definition at line 9513 of file var.c.
References applyImplic(), checkImplic(), FALSE, SCIP_Var::implics, MAXABSVBCOEF, NULL, REALABS, SCIP_Bool, SCIP_BOUNDTYPE_LOWER, SCIP_BOUNDTYPE_UPPER, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIP_STAGE_SOLVING, SCIP_VARSTATUS_COLUMN, SCIP_VARSTATUS_FIXED, SCIP_VARSTATUS_LOOSE, SCIP_VARTYPE_BINARY, SCIPcliquetableAdd(), SCIPdebugCheckImplic, SCIPimplicsAdd(), SCIPnodeAddBoundchg(), SCIPprobIsTransformed(), SCIPsetDebugMsg, SCIPsetGetStage(), SCIPsetIsEQ(), SCIPsetIsFeasEQ(), SCIPsetIsFeasZero(), SCIPsetIsGT(), SCIPsetIsLT(), SCIPsetIsZero(), SCIPtreeGetRootNode(), SCIPvarChgLbGlobal(), SCIPvarChgUbGlobal(), SCIPvarGetLbGlobal(), SCIPvarGetName(), SCIPvarGetStatus(), SCIPvarGetType(), SCIPvarGetUbGlobal(), SCIPvarIsActive(), SCIPvarIsBinary(), TRUE, varAddTransitiveBinaryClosureImplic(), varAddVbound(), and varEventImplAdded().
Referenced by applyImplic(), varAddTransitiveBinaryClosureImplic(), and varAddTransitiveImplic().
◆ varAddTransitiveBinaryClosureImplic()
|
static |
adds transitive closure for binary implication x = a -> y = b
- Parameters
-
var problem variable blkmem block memory set global SCIP settings stat problem statistics transprob transformed problem origprob original problem tree branch and bound tree if in solving stage reopt reoptimization data structure lp current LP data cliquetable clique table data structure branchcand branching candidate storage eventqueue event queue varfixing FALSE if y should be added in implications for x == 0, TRUE for x == 1 implvar variable y in implication y <= b or y >= b implvarfixing fixing b in implication infeasible pointer to store whether an infeasibility was detected nbdchgs pointer to count the number of performed bound changes, or NULL
Definition at line 9721 of file var.c.
References FALSE, SCIP_Var::implics, MAXIMPLSCLOSURE, MIN, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPimplicsGetBounds(), SCIPimplicsGetNImpls(), SCIPimplicsGetTypes(), SCIPimplicsGetVars(), SCIPvarIsActive(), TRUE, varAddImplic(), and varAddTransitiveImplic().
Referenced by varAddImplic(), and varAddTransitiveImplic().
◆ varAddTransitiveImplic()
|
static |
adds given implication to the variable's implication list, and adds all implications directly implied by this implication to the variable's implication list; if the implication is conflicting, the variable is fixed to the opposite value; if the variable is already fixed to the given value, the implication is performed immediately; if the implication is redundant with respect to the variables' global bounds, it is ignored
- Parameters
-
var problem variable blkmem block memory set global SCIP settings stat problem statistics transprob transformed problem origprob original problem tree branch and bound tree if in solving stage reopt reoptimization data structure lp current LP data cliquetable clique table data structure branchcand branching candidate storage eventqueue event queue varfixing FALSE if y should be added in implications for x == 0, TRUE for x == 1 implvar variable y in implication y <= b or y >= b impltype type of implication y <= b (SCIP_BOUNDTYPE_UPPER) or y >= b (SCIP_BOUNDTYPE_LOWER) implbound bound b in implication y <= b or y >= b transitive should transitive closure of implication also be added? infeasible pointer to store whether an infeasibility was detected nbdchgs pointer to count the number of performed bound changes, or NULL
Definition at line 9794 of file var.c.
References adjustedLb(), adjustedUb(), FALSE, MIN, NULL, SCIP_Bool, SCIP_BOUNDTYPE_LOWER, SCIP_BOUNDTYPE_UPPER, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIP_VARSTATUS_AGGREGATED, SCIP_VARSTATUS_FIXED, SCIP_VARSTATUS_NEGATED, SCIP_VARTYPE_BINARY, SCIPsetIsZero(), SCIPvarAddVlb(), SCIPvarGetStatus(), SCIPvarGetType(), SCIPvarIsActive(), SCIPvboundsGetCoefs(), SCIPvboundsGetConstants(), SCIPvboundsGetNVbds(), SCIPvboundsGetVars(), TRUE, varAddImplic(), varAddTransitiveBinaryClosureImplic(), SCIP_Var::vlbs, and SCIP_Var::vubs.
Referenced by SCIPvarAddImplic(), SCIPvarAddVlb(), SCIPvarAddVub(), and varAddTransitiveBinaryClosureImplic().
◆ SCIPvarAddVlb()
SCIP_RETCODE SCIPvarAddVlb | ( | SCIP_VAR * | var, |
BMS_BLKMEM * | blkmem, | ||
SCIP_SET * | set, | ||
SCIP_STAT * | stat, | ||
SCIP_PROB * | transprob, | ||
SCIP_PROB * | origprob, | ||
SCIP_TREE * | tree, | ||
SCIP_REOPT * | reopt, | ||
SCIP_LP * | lp, | ||
SCIP_CLIQUETABLE * | cliquetable, | ||
SCIP_BRANCHCAND * | branchcand, | ||
SCIP_EVENTQUEUE * | eventqueue, | ||
SCIP_VAR * | vlbvar, | ||
SCIP_Real | vlbcoef, | ||
SCIP_Real | vlbconstant, | ||
SCIP_Bool | transitive, | ||
SCIP_Bool * | infeasible, | ||
int * | nbdchgs | ||
) |
informs variable x about a globally valid variable lower bound x >= b*z + d with integer variable z; if z is binary, the corresponding valid implication for z is also added; improves the global bounds of the variable and the vlb variable if possible
- Parameters
-
var problem variable blkmem block memory set global SCIP settings stat problem statistics transprob transformed problem origprob original problem tree branch and bound tree if in solving stage reopt reoptimization data structure lp current LP data cliquetable clique table data structure branchcand branching candidate storage eventqueue event queue vlbvar variable z in x >= b*z + d vlbcoef coefficient b in x >= b*z + d vlbconstant constant d in x >= b*z + d transitive should transitive closure of implication also be added? infeasible pointer to store whether an infeasibility was detected nbdchgs pointer to store the number of performed bound changes, or NULL
Definition at line 10002 of file var.c.
References adjustedLb(), adjustedUb(), SCIP_Var::aggregate, SCIP_Aggregate::constant, SCIP_Negate::constant, SCIP_Var::data, FALSE, SCIP_Var::negate, SCIP_Var::negatedvar, NULL, SCIP_Var::original, REALABS, SCIP_Aggregate::scalar, SCIP_Var::scip, SCIP_BOUNDTYPE_LOWER, SCIP_BOUNDTYPE_UPPER, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_Real, SCIP_STAGE_SOLVING, SCIP_VARSTATUS_AGGREGATED, SCIP_VARSTATUS_COLUMN, SCIP_VARSTATUS_FIXED, SCIP_VARSTATUS_LOOSE, SCIP_VARSTATUS_MULTAGGR, SCIP_VARSTATUS_NEGATED, SCIP_VARSTATUS_ORIGINAL, SCIP_VARTYPE_BINARY, SCIP_VARTYPE_CONTINUOUS, SCIPerrorMessage, SCIPnodeAddBoundchg(), SCIPprobIsTransformed(), SCIPsetCeil(), SCIPsetDebugMsg, SCIPsetFloor(), SCIPsetGetStage(), SCIPsetInfinity(), SCIPsetIsEQ(), SCIPsetIsFeasGT(), SCIPsetIsFeasLT(), SCIPsetIsFeasPositive(), SCIPsetIsGT(), SCIPsetIsInfinity(), SCIPsetIsLT(), SCIPsetIsNegative(), SCIPsetIsPositive(), SCIPsetIsZero(), SCIPtreeGetRootNode(), SCIPvarAddVlb(), SCIPvarAddVub(), SCIPvarChgLbGlobal(), SCIPvarChgUbGlobal(), SCIPvarGetLbGlobal(), SCIPvarGetName(), SCIPvarGetProbvarSum(), SCIPvarGetStatus(), SCIPvarGetType(), SCIPvarGetUbGlobal(), SCIPvarIsActive(), SCIPvarIsIntegral(), SCIP_Original::transvar, TRUE, SCIP_Aggregate::var, varAddTransitiveImplic(), and varAddVbound().
Referenced by SCIPaddVarImplication(), SCIPaddVarVlb(), SCIPaddVarVub(), SCIPvarAddImplic(), SCIPvarAddVlb(), SCIPvarAddVub(), SCIPvarAggregate(), and varAddTransitiveImplic().
◆ SCIPvarAddVub()
SCIP_RETCODE SCIPvarAddVub | ( | SCIP_VAR * | var, |
BMS_BLKMEM * | blkmem, | ||
SCIP_SET * | set, | ||
SCIP_STAT * | stat, | ||
SCIP_PROB * | transprob, | ||
SCIP_PROB * | origprob, | ||
SCIP_TREE * | tree, | ||
SCIP_REOPT * | reopt, | ||
SCIP_LP * | lp, | ||
SCIP_CLIQUETABLE * | cliquetable, | ||
SCIP_BRANCHCAND * | branchcand, | ||
SCIP_EVENTQUEUE * | eventqueue, | ||
SCIP_VAR * | vubvar, | ||
SCIP_Real | vubcoef, | ||
SCIP_Real | vubconstant, | ||
SCIP_Bool | transitive, | ||
SCIP_Bool * | infeasible, | ||
int * | nbdchgs | ||
) |
informs variable x about a globally valid variable upper bound x <= b*z + d with integer variable z; if z is binary, the corresponding valid implication for z is also added; updates the global bounds of the variable and the vub variable correspondingly
- Parameters
-
var problem variable blkmem block memory set global SCIP settings stat problem statistics transprob transformed problem origprob original problem tree branch and bound tree if in solving stage reopt reoptimization data structure lp current LP data cliquetable clique table data structure branchcand branching candidate storage eventqueue event queue vubvar variable z in x <= b*z + d vubcoef coefficient b in x <= b*z + d vubconstant constant d in x <= b*z + d transitive should transitive closure of implication also be added? infeasible pointer to store whether an infeasibility was detected nbdchgs pointer to store the number of performed bound changes, or NULL
Definition at line 10466 of file var.c.
References adjustedLb(), adjustedUb(), SCIP_Var::aggregate, SCIP_Aggregate::constant, SCIP_Negate::constant, SCIP_Var::data, FALSE, SCIP_Var::negate, SCIP_Var::negatedvar, NULL, SCIP_Var::original, SCIP_Aggregate::scalar, SCIP_Var::scip, SCIP_BOUNDTYPE_LOWER, SCIP_BOUNDTYPE_UPPER, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_Real, SCIP_STAGE_SOLVING, SCIP_VARSTATUS_AGGREGATED, SCIP_VARSTATUS_COLUMN, SCIP_VARSTATUS_FIXED, SCIP_VARSTATUS_LOOSE, SCIP_VARSTATUS_MULTAGGR, SCIP_VARSTATUS_NEGATED, SCIP_VARSTATUS_ORIGINAL, SCIP_VARTYPE_BINARY, SCIP_VARTYPE_CONTINUOUS, SCIPerrorMessage, SCIPnodeAddBoundchg(), SCIPprobIsTransformed(), SCIPsetDebugMsg, SCIPsetGetStage(), SCIPsetInfinity(), SCIPsetIsEQ(), SCIPsetIsFeasGT(), SCIPsetIsFeasLT(), SCIPsetIsFeasNegative(), SCIPsetIsGT(), SCIPsetIsInfinity(), SCIPsetIsLT(), SCIPsetIsNegative(), SCIPsetIsPositive(), SCIPsetIsZero(), SCIPtreeGetRootNode(), SCIPvarAddImplic(), SCIPvarAddVlb(), SCIPvarAddVub(), SCIPvarChgLbGlobal(), SCIPvarChgUbGlobal(), SCIPvarGetLbGlobal(), SCIPvarGetName(), SCIPvarGetProbvarSum(), SCIPvarGetStatus(), SCIPvarGetType(), SCIPvarGetUbGlobal(), SCIPvarIsActive(), SCIPvarIsBinary(), SCIP_Original::transvar, TRUE, SCIP_Aggregate::var, varAddTransitiveImplic(), and varAddVbound().
Referenced by SCIPaddVarImplication(), SCIPaddVarVlb(), SCIPaddVarVub(), SCIPvarAddImplic(), SCIPvarAddVlb(), SCIPvarAddVub(), and SCIPvarAggregate().
◆ SCIPvarAddImplic()
SCIP_RETCODE SCIPvarAddImplic | ( | SCIP_VAR * | var, |
BMS_BLKMEM * | blkmem, | ||
SCIP_SET * | set, | ||
SCIP_STAT * | stat, | ||
SCIP_PROB * | transprob, | ||
SCIP_PROB * | origprob, | ||
SCIP_TREE * | tree, | ||
SCIP_REOPT * | reopt, | ||
SCIP_LP * | lp, | ||
SCIP_CLIQUETABLE * | cliquetable, | ||
SCIP_BRANCHCAND * | branchcand, | ||
SCIP_EVENTQUEUE * | eventqueue, | ||
SCIP_Bool | varfixing, | ||
SCIP_VAR * | implvar, | ||
SCIP_BOUNDTYPE | impltype, | ||
SCIP_Real | implbound, | ||
SCIP_Bool | transitive, | ||
SCIP_Bool * | infeasible, | ||
int * | nbdchgs | ||
) |
informs binary variable x about a globally valid implication: x == 0 or x == 1 ==> y <= b or y >= b; also adds the corresponding implication or variable bound to the implied variable; if the implication is conflicting, the variable is fixed to the opposite value; if the variable is already fixed to the given value, the implication is performed immediately; if the implication is redundant with respect to the variables' global bounds, it is ignored
- Parameters
-
var problem variable blkmem block memory set global SCIP settings stat problem statistics transprob transformed problem origprob original problem tree branch and bound tree if in solving stage reopt reoptimization data structure lp current LP data cliquetable clique table data structure branchcand branching candidate storage eventqueue event queue varfixing FALSE if y should be added in implications for x == 0, TRUE for x == 1 implvar variable y in implication y <= b or y >= b impltype type of implication y <= b (SCIP_BOUNDTYPE_UPPER) or y >= b (SCIP_BOUNDTYPE_LOWER) implbound bound b in implication y <= b or y >= b transitive should transitive closure of implication also be added? infeasible pointer to store whether an infeasibility was detected nbdchgs pointer to store the number of performed bound changes, or NULL
Definition at line 10913 of file var.c.
References SCIP_Var::aggregate, applyImplic(), SCIP_Aggregate::constant, SCIP_Var::data, FALSE, SCIP_Var::negatedvar, NULL, SCIP_Var::original, SCIP_Aggregate::scalar, SCIP_Var::scip, SCIP_Bool, SCIP_BOUNDTYPE_LOWER, SCIP_BOUNDTYPE_UPPER, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_VARSTATUS_AGGREGATED, SCIP_VARSTATUS_COLUMN, SCIP_VARSTATUS_FIXED, SCIP_VARSTATUS_LOOSE, SCIP_VARSTATUS_MULTAGGR, SCIP_VARSTATUS_NEGATED, SCIP_VARSTATUS_ORIGINAL, SCIP_VARTYPE_BINARY, SCIPerrorMessage, SCIPsetIsEQ(), SCIPsetIsZero(), SCIPvarAddImplic(), SCIPvarAddVlb(), SCIPvarAddVub(), SCIPvarAdjustBd(), SCIPvarGetLbGlobal(), SCIPvarGetProbvarBound(), SCIPvarGetStatus(), SCIPvarGetType(), SCIPvarGetUbGlobal(), SCIPvarHasImplic(), SCIPvarIsActive(), SCIPvarIsBinary(), SCIP_Original::transvar, TRUE, SCIP_Aggregate::var, and varAddTransitiveImplic().
Referenced by SCIPaddVarImplication(), SCIPvarAddImplic(), SCIPvarAddVub(), and SCIPvarAggregate().
◆ SCIPvarFixBinary()
SCIP_RETCODE SCIPvarFixBinary | ( | SCIP_VAR * | var, |
BMS_BLKMEM * | blkmem, | ||
SCIP_SET * | set, | ||
SCIP_STAT * | stat, | ||
SCIP_PROB * | transprob, | ||
SCIP_PROB * | origprob, | ||
SCIP_TREE * | tree, | ||
SCIP_REOPT * | reopt, | ||
SCIP_LP * | lp, | ||
SCIP_BRANCHCAND * | branchcand, | ||
SCIP_EVENTQUEUE * | eventqueue, | ||
SCIP_CLIQUETABLE * | cliquetable, | ||
SCIP_Bool | value, | ||
SCIP_Bool * | infeasible, | ||
int * | nbdchgs | ||
) |
fixes the bounds of a binary variable to the given value, counting bound changes and detecting infeasibility
- Parameters
-
var problem variable blkmem block memory set global SCIP settings stat problem statistics transprob transformed problem origprob original problem tree branch and bound tree if in solving stage reopt reoptimization data structure lp current LP data branchcand branching candidate storage eventqueue event queue cliquetable clique table data structure value value to fix variable to infeasible pointer to store whether an infeasibility was detected nbdchgs pointer to count the number of performed bound changes, or NULL
Definition at line 11183 of file var.c.
References FALSE, SCIP_Var::glbdom, SCIP_Dom::lb, NULL, SCIP_Var::scip, SCIP_BOUNDTYPE_LOWER, SCIP_BOUNDTYPE_UPPER, SCIP_CALL, SCIP_OKAY, SCIP_STAGE_SOLVING, SCIPnodeAddBoundchg(), SCIPprobIsTransformed(), SCIPsetGetStage(), SCIPtreeGetRootNode(), SCIPvarAddClique(), SCIPvarChgLbGlobal(), SCIPvarChgUbGlobal(), TRUE, and SCIP_Dom::ub.