Detailed Description
public methods for SCIP variables
Definition in file scip_var.c.
#include <ctype.h>#include "blockmemshell/memory.h"#include "lpi/lpi.h"#include "scip/branch.h"#include "scip/clock.h"#include "scip/conflict.h"#include "scip/debug.h"#include "scip/rational.h"#include "scip/history.h"#include "scip/implics.h"#include "scip/lp.h"#include "scip/prob.h"#include "scip/pub_cons.h"#include "scip/pub_implics.h"#include "scip/pub_lp.h"#include "scip/pub_message.h"#include "scip/pub_misc.h"#include "scip/pub_tree.h"#include "scip/pub_var.h"#include "scip/relax.h"#include "scip/scip_certificate.h"#include "scip/scip_exact.h"#include "scip/scip_general.h"#include "scip/scip_lp.h"#include "scip/scip_mem.h"#include "scip/scip_message.h"#include "scip/scip_numerics.h"#include "scip/scip_prob.h"#include "scip/scip_probing.h"#include "scip/scip_sol.h"#include "scip/scip_solvingstats.h"#include "scip/scip_tree.h"#include "scip/scip_var.h"#include "scip/set.h"#include "scip/sol.h"#include "scip/solve.h"#include "scip/stat.h"#include "scip/struct_lp.h"#include "scip/struct_mem.h"#include "scip/struct_primal.h"#include "scip/struct_prob.h"#include "scip/struct_scip.h"#include "scip/struct_set.h"#include "scip/struct_stat.h"#include "scip/struct_tree.h"#include "scip/struct_var.h"#include "scip/tree.h"#include "scip/certificate.h"#include "scip/var.h"Go to the source code of this file.
Macros | |
| #define | MAXNUMEARCHCLIQUE 10000 |
Macro Definition Documentation
◆ MAXNUMEARCHCLIQUE
| #define MAXNUMEARCHCLIQUE 10000 |
maximal number of cliques of variable for addLargestCliquePart() to search a suitable clique
Definition at line 8909 of file scip_var.c.
Function Documentation
◆ analyzeStrongbranch()
|
static |
analyze the strong branching for the given variable; that includes conflict analysis for infeasible branches and storing of root reduced cost information
- Parameters
-
scip SCIP data structure var variable to analyze downinf pointer to store whether the downwards branch is infeasible, or NULL upinf pointer to store whether the upwards branch is infeasible, or NULL downconflict pointer to store whether a conflict constraint was created for an infeasible downwards branch, or NULL upconflict pointer to store whether a conflict constraint was created for an infeasible upwards branch, or NULL
Definition at line 3583 of file scip_var.c.
References SCIP_Col::lb, NULL, SCIP_Col::primsol, SCIP_Col::sbdown, SCIP_Col::sbdownvalid, SCIP_Col::sbup, SCIP_Col::sbupvalid, SCIP_Bool, SCIP_CALL, SCIP_LPSOLSTAT_OPTIMAL, SCIP_OKAY, SCIP_Real, SCIPconflictAnalyzeStrongbranch(), SCIPgetLPSolstat(), SCIPisExact(), SCIPlpGetObjval(), SCIPlpIsDualReliable(), SCIPsetFeasCeil(), SCIPsetFeasFloor(), SCIPsetIsGE(), SCIPtreeGetCurrentDepth(), SCIPvarGetCol(), SCIPvarGetLbGlobal(), SCIPvarGetUbGlobal(), SCIPvarIsBinary(), SCIPvarUpdateBestRootSol(), and SCIP_Col::ub.
Referenced by SCIPgetVarsStrongbranchesFrac(), SCIPgetVarsStrongbranchesInt(), SCIPgetVarStrongbranchFrac(), and SCIPgetVarStrongbranchInt().
◆ performStrongbranchWithPropagation()
|
static |
create, solve, and evaluate a single strong branching child (for strong branching with propagation)
- Parameters
-
scip SCIP data structure var variable to get strong branching values for down do we regard the down child? firstchild is this the first of the two strong branching children? propagate should domain propagation be performed? newbound new bound to apply at the strong branching child itlim iteration limit for strong branchings maxproprounds maximum number of propagation rounds (-1: no limit, -2: parameter settings) value stores dual bound for strong branching child valid stores whether the returned value is a valid dual bound, or NULL; otherwise, it can only be used as an estimate value ndomreductions pointer to store the number of domain reductions found, or NULL conflict pointer to store whether a conflict constraint was created for an infeasible strong branching child, or NULL lperror pointer to store whether an unresolved LP error occurred or the solving process should be stopped (e.g., due to a time limit) vars active problem variables nvars number of active problem variables newlbs array to store valid lower bounds for all active variables, or NULL newubs array to store valid upper bounds for all active variables, or NULL foundsol pointer to store whether a primal solution was found during strong branching cutoff pointer to store whether the strong branching child is infeasible
Definition at line 3812 of file scip_var.c.
References FALSE, MAX, MIN, NULL, SCIP_CALL, SCIP_INVALIDDATA, SCIP_Longint, SCIP_LPSOLSTAT_ERROR, SCIP_LPSOLSTAT_INFEASIBLE, SCIP_LPSOLSTAT_ITERLIMIT, SCIP_LPSOLSTAT_NOTSOLVED, SCIP_LPSOLSTAT_OBJLIMIT, SCIP_LPSOLSTAT_OPTIMAL, SCIP_LPSOLSTAT_TIMELIMIT, SCIP_LPSOLSTAT_UNBOUNDEDRAY, SCIP_MAXTREEDEPTH, SCIP_OKAY, SCIP_Real, SCIPallColsInLP(), SCIPbacktrackProbing(), SCIPchgVarLbProbing(), SCIPchgVarUbProbing(), SCIPclockStart(), SCIPclockStop(), SCIPdebugMsg, SCIPerrorMessage, SCIPgetCutoffbound(), SCIPgetLPI(), SCIPgetLPObjval(), SCIPgetLPSolstat(), SCIPinfinity(), SCIPisGE(), SCIPisGT(), SCIPisInfinity(), SCIPisLE(), SCIPisLPRelax(), SCIPisLT(), SCIPlpGetLooseObjval(), SCIPlpiGetObjval(), SCIPlpiIsDualFeasible(), SCIPlpiIsInfinity(), SCIPlpiWasSolved(), SCIPnewProbingNode(), SCIPpropagateProbing(), SCIPsolveProbingLP(), SCIPstatAdd, SCIPtreeGetProbingDepth(), SCIPtryStrongbranchLPSol(), SCIPvarGetLbLocal(), SCIPvarGetName(), SCIPvarGetUbLocal(), and TRUE.
Referenced by SCIPgetVarStrongbranchWithPropagation().
◆ tightenVarLbGlobalSafe()
|
static |
exact submethod of SCIPtightenVarLbGlobal(); it does not check for the stage
- Parameters
-
scip SCIP data structure var variable to change the bound for newbound new value for bound force force tightening even if below bound strengthening tolerance infeasible pointer to store whether the new domain is empty tightened pointer to store whether the bound was tightened, or NULL
Definition at line 7901 of file scip_var.c.
References FALSE, MIN, NULL, SCIP_BOUNDTYPE_LOWER, SCIP_CALL, SCIP_INVALIDCALL, SCIP_OKAY, SCIP_Real, SCIP_STAGE_PRESOLVING, SCIP_STAGE_PROBLEM, SCIP_STAGE_SOLVING, SCIP_STAGE_TRANSFORMING, SCIP_VARTYPE_BINARY, SCIP_VARTYPE_INTEGER, SCIPbuffer(), SCIPchgVarType(), SCIPcomputeVarLbGlobal(), SCIPerrorMessage, SCIPgetStage(), SCIPinProbing(), SCIPisInfinity(), SCIPnodeAddBoundchgExact(), SCIPrationalCreateBuffer(), SCIPrationalFreeBuffer(), SCIPrationalSetReal(), SCIPsetIsEQ(), SCIPsetIsLbBetter(), SCIPsetIsLE(), SCIPtreeGetCurrentDepth(), SCIPtreeGetCurrentNode(), SCIPvarAdjustLbExactFloat(), SCIPvarChgLbGlobalExact(), SCIPvarChgLbLocalExact(), SCIPvarChgLbOriginalExact(), SCIPvarGetLbGlobal(), SCIPvarGetLbLocal(), SCIPvarGetName(), SCIPvarGetUbGlobal(), SCIPvarIsBinary(), SCIPvarIsTransformed(), SCIPwarningMessage(), TRUE, and SCIP_Var::vartype.
Referenced by SCIPtightenVarLbGlobal().
◆ tightenVarUbGlobalSafe()
|
static |
- Parameters
-
scip SCIP data structure var variable to change the bound for newbound new value for bound force force tightening even if below bound strengthening tolerance infeasible pointer to store whether the new domain is empty tightened pointer to store whether the bound was tightened, or NULL
Definition at line 8133 of file scip_var.c.
References FALSE, MAX, NULL, SCIP_BOUNDTYPE_UPPER, SCIP_CALL, SCIP_INVALIDCALL, SCIP_OKAY, SCIP_Real, SCIP_STAGE_PRESOLVING, SCIP_STAGE_PROBLEM, SCIP_STAGE_SOLVING, SCIP_STAGE_TRANSFORMING, SCIP_VARTYPE_BINARY, SCIP_VARTYPE_INTEGER, SCIPbuffer(), SCIPchgVarType(), SCIPcomputeVarUbGlobal(), SCIPerrorMessage, SCIPgetStage(), SCIPinProbing(), SCIPisInfinity(), SCIPnodeAddBoundchgExact(), SCIPrationalCreateBuffer(), SCIPrationalFreeBuffer(), SCIPrationalSetReal(), SCIPsetIsEQ(), SCIPsetIsLE(), SCIPsetIsUbBetter(), SCIPtreeGetCurrentDepth(), SCIPtreeGetCurrentNode(), SCIPvarAdjustUbExactFloat(), SCIPvarChgUbGlobalExact(), SCIPvarChgUbLocalExact(), SCIPvarChgUbOriginalExact(), SCIPvarGetLbGlobal(), SCIPvarGetName(), SCIPvarGetUbGlobal(), SCIPvarGetUbLocal(), SCIPvarIsBinary(), SCIPvarIsTransformed(), SCIPwarningMessage(), TRUE, and SCIP_Var::vartype.
Referenced by SCIPtightenVarUbGlobal().
◆ addLargestCliquePart()
|
static |
add largest clique containing a given variable to part of clique partitioning
- Parameters
-
var variable to treat value value of variable varidx index of variable idx mapping of problem variable indices to given subset values values of variables in given subset p part index nvars number of variables in the array nbinvars total number of binary variables cliquepartition array of length nvars to store the clique partition ncliqueparts array to store the size of each part
Definition at line 8913 of file scip_var.c.
References MAXNUMEARCHCLIQUE, NULL, SCIP_Bool, SCIPcliqueGetNVars(), SCIPcliqueGetValues(), SCIPcliqueGetVars(), SCIPvarGetCliques(), SCIPvarGetNCliques(), SCIPvarGetProbindex(), and SCIPvarIsActive().
Referenced by calcCliquePartitionGreedy().
◆ calcCliquePartitionGreedy()
|
static |
calculates a partition of the given set of binary variables into cliques
The output array contains one value for each variable, such that two variables have the same value iff they were assigned to the same clique; the first variable is always assigned to clique 0, and a variable can only be assigned to clique i if at least one of the preceding variables was assigned to clique i-1; for each clique at most 1 variables can be set to TRUE in a feasible solution;
The implementation currently runs in O(n^2) time, because we have to clear the counter array nneigh. It could be turned into a linear time algorithm by using a clean buffer.
- Parameters
-
scip SCIP data structure vars binary variables in the clique from which at most one can be set to 1 values clique value (TRUE or FALSE) for each variable in the clique nvars number of variables in the array probtoidxmap cleared memory array with default values -1 probtoidxmapsize returns size of probtoidxmap cliquepartition array of length nvars to store the clique partition ncliques pointer to store the number of cliques actually contained in the partition
Definition at line 9079 of file scip_var.c.
References addLargestCliquePart(), BMSclearMemoryArray, FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPallocBufferArray, SCIPallocClearBufferArray, SCIPcliqueGetNVars(), SCIPcliqueGetValues(), SCIPcliqueGetVars(), SCIPfreeBufferArray, SCIPgetNContVars(), SCIPgetNVars(), SCIPreallocBlockMemoryArray, SCIPvarGetCliques(), SCIPvarGetNCliques(), SCIPvarGetProbindex(), SCIPvarIsActive(), and TRUE.
Referenced by SCIPcalcCliquePartition().
◆ SCIPtestCliquePartition()
|
static |
test whether a clique partition is correct
- Parameters
-
scip SCIP data structure vars binary variables in the clique from which at most one can be set to 1 nvars number of variables in the clique cliquepartition array of length nvars to store the clique partition ncliques pointer to store the number of cliques actually contained in the partition
Definition at line 9271 of file scip_var.c.
References FALSE, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPvarGetProbvarBinary(), SCIPvarsHaveCommonClique(), and TRUE.
Referenced by SCIPcalcCliquePartition().
◆ tightenBounds()
|
static |
tightens the variable bounds due to a new variable type
- Parameters
-
scip SCIP data structure var variable to change the bound for integral did the variable become integral? infeasible pointer to store whether an infeasibility was detected (, due to integrality condition of the new variable type)
Definition at line 10039 of file scip_var.c.
References FALSE, NULL, SCIP_Var::scip, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_STAGE_PRESOLVING, SCIP_STAGE_PROBLEM, SCIPfeasCeil(), SCIPfeasFloor(), SCIPgetStage(), SCIPisFeasGE(), SCIPisFeasIntegral(), SCIPisFeasLE(), SCIPisIntegral(), SCIPsetIsEQ(), SCIPtightenVarLbGlobal(), SCIPtightenVarUbGlobal(), SCIPvarGetLbGlobal(), SCIPvarGetUbGlobal(), SCIPvarIsIntegral(), SCIPvarIsTransformed(), and TRUE.
Referenced by SCIPchgVarImplType(), and SCIPchgVarType().