Detailed Description
public methods for SCIP variables
Definition in file scip_var.c.
#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/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_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/var.h"
#include <ctype.h>
Go to the source code of this file.
Macros | |
#define | MAXNCLIQUEVARSCOMP 1000000 |
Macro Definition Documentation
◆ MAXNCLIQUEVARSCOMP
#define MAXNCLIQUEVARSCOMP 1000000 |
Definition at line 7094 of file scip_var.c.
Referenced by calcCliquePartitionGreedy(), and SCIPcalcCliquePartition().
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 2836 of file scip_var.c.
References Scip::branchcand, Scip::cliquetable, SCIP_Set::conf_enable, SCIP_Set::conf_usesb, Scip::conflict, Scip::conflictstore, SCIP_Lp::cutoffbound, Scip::eventqueue, SCIP_Col::lb, Scip::lp, Scip::mem, SCIP_Set::nconflicthdlrs, NULL, Scip::origprob, SCIP_Col::primsol, SCIP_Mem::probmem, Scip::reopt, 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(), SCIPlpGetObjval(), SCIPlpIsDualReliable(), SCIPsetFeasCeil(), SCIPsetFeasFloor(), SCIPsetIsGE(), SCIPtreeGetCurrentDepth(), SCIPvarGetCol(), SCIPvarGetLbGlobal(), SCIPvarGetUbGlobal(), SCIPvarIsBinary(), SCIPvarUpdateBestRootSol(), Scip::set, Scip::stat, Scip::transprob, Scip::tree, 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 3023 of file scip_var.c.
References FALSE, SCIP_Stat::lastsblpsolstats, Scip::lp, MAX, SCIP_Stat::nsbtimesiterlimhit, 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(), Scip::set, Scip::stat, SCIP_Stat::strongpropclock, Scip::transprob, Scip::tree, and TRUE.
Referenced by SCIPgetVarStrongbranchWithPropagation().
◆ relabelOrderConsistent()
|
static |
relabels the given labels in-place in an increasing fashion: the first seen label is 0, the next label 1, etc...
- Note
- every label equal to -1 is treated as a previously unseen, unique label and gets a new ordered label.
- Parameters
-
scip SCIP data structure labels current labels that will be overwritten nlabels number of variables in the clique nclasses pointer to store the total number of distinct labels
Definition at line 6927 of file scip_var.c.
References SCIP_CALL, SCIP_OKAY, SCIPblkmem(), SCIPhashmapCreate(), SCIPhashmapExists(), SCIPhashmapFree(), SCIPhashmapGetImageInt(), and SCIPhashmapInsertInt().
Referenced by SCIPcalcCliquePartition().
◆ labelSortStable()
|
static |
sort the variables w.r.t. the given labels; thereby ensure the current order of the variables with the same label.
- Parameters
-
scip SCIP data structure vars variable array classlabels array that contains a class label for every variable sortedvars array to store variables after stable sorting sortedindices array to store indices of sorted variables in the original vars array classesstartposs starting position array for each label class (must have size nclasses + 1) nvars size of the vars arrays nclasses number of label classes
Definition at line 6988 of file scip_var.c.
References BMSclearMemoryArray, NULL, SCIP_CALL, SCIP_OKAY, SCIPallocBufferArray, and SCIPfreeBufferArray.
Referenced by SCIPcalcCliquePartition().
◆ calcCliquePartitionGreedy()
|
static |
calculates a partition of the given set of binary variables into cliques; afterwards the output array contains one value for each variable, such that two variables got 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;
- Returns
- SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
- Precondition
- This method can be called if
scip
is in one of the following stages:
- 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 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 7114 of file scip_var.c.
References FALSE, MAXNCLIQUEVARSCOMP, SCIP_Bool, SCIP_CALL, SCIP_Longint, SCIP_OKAY, SCIPsetAllocBufferArray, SCIPsetFreeBufferArray, SCIPvarGetNCliques(), SCIPvarIsActive(), SCIPvarsHaveCommonClique(), and Scip::set.
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 vartype new type of variable infeasible pointer to store whether an infeasibility was detected (, due to integrality condition of the new variable type)
Definition at line 8076 of file scip_var.c.
References FALSE, NULL, SCIP_Var::scip, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_STAGE_PRESOLVING, SCIP_STAGE_PROBLEM, SCIP_VARTYPE_CONTINUOUS, SCIPfeasCeil(), SCIPfeasFloor(), SCIPgetStage(), SCIPisFeasGE(), SCIPisFeasIntegral(), SCIPisFeasLE(), SCIPisIntegral(), SCIPsetIsEQ(), SCIPtightenVarLbGlobal(), SCIPtightenVarUbGlobal(), SCIPvarGetLbGlobal(), SCIPvarGetType(), SCIPvarGetUbGlobal(), SCIPvarIsTransformed(), Scip::set, SCIP_Set::stage, and TRUE.
Referenced by SCIPchgVarType().