Scippy

SCIP

Solving Constraint Integer Programs

Detailed Description

public methods for SCIP variables

Author
Tobias Achterberg
Timo Berthold
Gerald Gamrath
Leona Gottwald
Stefan Heinz
Gregor Hendel
Thorsten Koch
Alexander Martin
Marc Pfetsch
Michael Winkler
Kati Wolter

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
 

Functions

SCIP_RETCODE SCIPcreateVar (SCIP *scip, SCIP_VAR **var, 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)
 
SCIP_RETCODE SCIPcreateVarBasic (SCIP *scip, SCIP_VAR **var, const char *name, SCIP_Real lb, SCIP_Real ub, SCIP_Real obj, SCIP_VARTYPE vartype)
 
SCIP_RETCODE SCIPwriteVarName (SCIP *scip, FILE *file, SCIP_VAR *var, SCIP_Bool type)
 
SCIP_RETCODE SCIPwriteVarsList (SCIP *scip, FILE *file, SCIP_VAR **vars, int nvars, SCIP_Bool type, char delimiter)
 
SCIP_RETCODE SCIPwriteVarsLinearsum (SCIP *scip, FILE *file, SCIP_VAR **vars, SCIP_Real *vals, int nvars, SCIP_Bool type)
 
SCIP_RETCODE SCIPwriteVarsPolynomial (SCIP *scip, FILE *file, SCIP_VAR ***monomialvars, SCIP_Real **monomialexps, SCIP_Real *monomialcoefs, int *monomialnvars, int nmonomials, SCIP_Bool type)
 
SCIP_RETCODE SCIPparseVar (SCIP *scip, SCIP_VAR **var, 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)
 
SCIP_RETCODE SCIPparseVarName (SCIP *scip, const char *str, SCIP_VAR **var, char **endptr)
 
SCIP_RETCODE SCIPparseVarsList (SCIP *scip, const char *str, SCIP_VAR **vars, int *nvars, int varssize, int *requiredsize, char **endptr, char delimiter, SCIP_Bool *success)
 
SCIP_RETCODE SCIPparseVarsLinearsum (SCIP *scip, const char *str, SCIP_VAR **vars, SCIP_Real *vals, int *nvars, int varssize, int *requiredsize, char **endptr, SCIP_Bool *success)
 
SCIP_RETCODE SCIPparseVarsPolynomial (SCIP *scip, const char *str, SCIP_VAR ****monomialvars, SCIP_Real ***monomialexps, SCIP_Real **monomialcoefs, int **monomialnvars, int *nmonomials, char **endptr, SCIP_Bool *success)
 
void SCIPfreeParseVarsPolynomialData (SCIP *scip, SCIP_VAR ****monomialvars, SCIP_Real ***monomialexps, SCIP_Real **monomialcoefs, int **monomialnvars, int nmonomials)
 
SCIP_RETCODE SCIPcaptureVar (SCIP *scip, SCIP_VAR *var)
 
SCIP_RETCODE SCIPreleaseVar (SCIP *scip, SCIP_VAR **var)
 
SCIP_RETCODE SCIPchgVarName (SCIP *scip, SCIP_VAR *var, const char *name)
 
SCIP_RETCODE SCIPtransformVar (SCIP *scip, SCIP_VAR *var, SCIP_VAR **transvar)
 
SCIP_RETCODE SCIPtransformVars (SCIP *scip, int nvars, SCIP_VAR **vars, SCIP_VAR **transvars)
 
SCIP_RETCODE SCIPgetTransformedVar (SCIP *scip, SCIP_VAR *var, SCIP_VAR **transvar)
 
SCIP_RETCODE SCIPgetTransformedVars (SCIP *scip, int nvars, SCIP_VAR **vars, SCIP_VAR **transvars)
 
SCIP_RETCODE SCIPgetNegatedVar (SCIP *scip, SCIP_VAR *var, SCIP_VAR **negvar)
 
SCIP_RETCODE SCIPgetNegatedVars (SCIP *scip, int nvars, SCIP_VAR **vars, SCIP_VAR **negvars)
 
SCIP_RETCODE SCIPgetBinvarRepresentative (SCIP *scip, SCIP_VAR *var, SCIP_VAR **repvar, SCIP_Bool *negated)
 
SCIP_RETCODE SCIPgetBinvarRepresentatives (SCIP *scip, int nvars, SCIP_VAR **vars, SCIP_VAR **repvars, SCIP_Bool *negated)
 
SCIP_RETCODE SCIPflattenVarAggregationGraph (SCIP *scip, SCIP_VAR *var)
 
SCIP_RETCODE SCIPgetProbvarLinearSum (SCIP *scip, SCIP_VAR **vars, SCIP_Real *scalars, int *nvars, int varssize, SCIP_Real *constant, int *requiredsize, SCIP_Bool mergemultiples)
 
SCIP_RETCODE SCIPgetProbvarSum (SCIP *scip, SCIP_VAR **var, SCIP_Real *scalar, SCIP_Real *constant)
 
SCIP_RETCODE SCIPgetActiveVars (SCIP *scip, SCIP_VAR **vars, int *nvars, int varssize, int *requiredsize)
 
SCIP_Real SCIPgetVarRedcost (SCIP *scip, SCIP_VAR *var)
 
SCIP_Real SCIPgetVarImplRedcost (SCIP *scip, SCIP_VAR *var, SCIP_Bool varfixing)
 
SCIP_Real SCIPgetVarFarkasCoef (SCIP *scip, SCIP_VAR *var)
 
SCIP_Real SCIPgetVarLbAtIndex (SCIP *scip, SCIP_VAR *var, SCIP_BDCHGIDX *bdchgidx, SCIP_Bool after)
 
SCIP_Real SCIPgetVarUbAtIndex (SCIP *scip, SCIP_VAR *var, SCIP_BDCHGIDX *bdchgidx, SCIP_Bool after)
 
SCIP_Real SCIPgetVarBdAtIndex (SCIP *scip, SCIP_VAR *var, SCIP_BOUNDTYPE boundtype, SCIP_BDCHGIDX *bdchgidx, SCIP_Bool after)
 
SCIP_Bool SCIPgetVarWasFixedAtIndex (SCIP *scip, SCIP_VAR *var, SCIP_BDCHGIDX *bdchgidx, SCIP_Bool after)
 
SCIP_Real SCIPgetVarSol (SCIP *scip, SCIP_VAR *var)
 
SCIP_RETCODE SCIPgetVarSols (SCIP *scip, int nvars, SCIP_VAR **vars, SCIP_Real *vals)
 
SCIP_RETCODE SCIPclearRelaxSolVals (SCIP *scip, SCIP_RELAX *relax)
 
SCIP_RETCODE SCIPsetRelaxSolVal (SCIP *scip, SCIP_RELAX *relax, SCIP_VAR *var, SCIP_Real val)
 
SCIP_RETCODE SCIPsetRelaxSolVals (SCIP *scip, SCIP_RELAX *relax, int nvars, SCIP_VAR **vars, SCIP_Real *vals, SCIP_Bool includeslp)
 
SCIP_RETCODE SCIPsetRelaxSolValsSol (SCIP *scip, SCIP_RELAX *relax, SCIP_SOL *sol, SCIP_Bool includeslp)
 
SCIP_Bool SCIPisRelaxSolValid (SCIP *scip)
 
SCIP_RETCODE SCIPmarkRelaxSolValid (SCIP *scip, SCIP_RELAX *relax, SCIP_Bool includeslp)
 
SCIP_RETCODE SCIPmarkRelaxSolInvalid (SCIP *scip)
 
SCIP_Real SCIPgetRelaxSolVal (SCIP *scip, SCIP_VAR *var)
 
SCIP_Real SCIPgetRelaxSolObj (SCIP *scip)
 
SCIP_Bool SCIPisStrongbranchDownFirst (SCIP *scip, SCIP_VAR *var)
 
SCIP_RETCODE SCIPstartStrongbranch (SCIP *scip, SCIP_Bool enablepropagation)
 
SCIP_RETCODE SCIPendStrongbranch (SCIP *scip)
 
static SCIP_RETCODE analyzeStrongbranch (SCIP *scip, SCIP_VAR *var, SCIP_Bool *downinf, SCIP_Bool *upinf, SCIP_Bool *downconflict, SCIP_Bool *upconflict)
 
SCIP_RETCODE SCIPgetVarStrongbranchFrac (SCIP *scip, SCIP_VAR *var, int itlim, SCIP_Bool idempotent, SCIP_Real *down, SCIP_Real *up, SCIP_Bool *downvalid, SCIP_Bool *upvalid, SCIP_Bool *downinf, SCIP_Bool *upinf, SCIP_Bool *downconflict, SCIP_Bool *upconflict, SCIP_Bool *lperror)
 
static SCIP_RETCODE performStrongbranchWithPropagation (SCIP *scip, SCIP_VAR *var, SCIP_Bool down, SCIP_Bool firstchild, SCIP_Bool propagate, SCIP_Real newbound, int itlim, int maxproprounds, SCIP_Real *value, SCIP_Bool *valid, SCIP_Longint *ndomreductions, SCIP_Bool *conflict, SCIP_Bool *lperror, SCIP_VAR **vars, int nvars, SCIP_Real *newlbs, SCIP_Real *newubs, SCIP_Bool *foundsol, SCIP_Bool *cutoff)
 
SCIP_RETCODE SCIPgetVarStrongbranchWithPropagation (SCIP *scip, SCIP_VAR *var, SCIP_Real solval, SCIP_Real lpobjval, int itlim, int maxproprounds, SCIP_Real *down, SCIP_Real *up, SCIP_Bool *downvalid, SCIP_Bool *upvalid, SCIP_Longint *ndomredsdown, SCIP_Longint *ndomredsup, SCIP_Bool *downinf, SCIP_Bool *upinf, SCIP_Bool *downconflict, SCIP_Bool *upconflict, SCIP_Bool *lperror, SCIP_Real *newlbs, SCIP_Real *newubs)
 
SCIP_RETCODE SCIPgetVarStrongbranchInt (SCIP *scip, SCIP_VAR *var, int itlim, SCIP_Bool idempotent, SCIP_Real *down, SCIP_Real *up, SCIP_Bool *downvalid, SCIP_Bool *upvalid, SCIP_Bool *downinf, SCIP_Bool *upinf, SCIP_Bool *downconflict, SCIP_Bool *upconflict, SCIP_Bool *lperror)
 
SCIP_RETCODE SCIPgetVarsStrongbranchesFrac (SCIP *scip, SCIP_VAR **vars, int nvars, int itlim, SCIP_Real *down, SCIP_Real *up, SCIP_Bool *downvalid, SCIP_Bool *upvalid, SCIP_Bool *downinf, SCIP_Bool *upinf, SCIP_Bool *downconflict, SCIP_Bool *upconflict, SCIP_Bool *lperror)
 
SCIP_RETCODE SCIPgetVarsStrongbranchesInt (SCIP *scip, SCIP_VAR **vars, int nvars, int itlim, SCIP_Real *down, SCIP_Real *up, SCIP_Bool *downvalid, SCIP_Bool *upvalid, SCIP_Bool *downinf, SCIP_Bool *upinf, SCIP_Bool *downconflict, SCIP_Bool *upconflict, SCIP_Bool *lperror)
 
SCIP_LPSOLSTAT SCIPgetLastStrongbranchLPSolStat (SCIP *scip, SCIP_BRANCHDIR branchdir)
 
SCIP_RETCODE SCIPgetVarStrongbranchLast (SCIP *scip, SCIP_VAR *var, SCIP_Real *down, SCIP_Real *up, SCIP_Bool *downvalid, SCIP_Bool *upvalid, SCIP_Real *solval, SCIP_Real *lpobjval)
 
SCIP_RETCODE SCIPsetVarStrongbranchData (SCIP *scip, SCIP_VAR *var, SCIP_Real lpobjval, SCIP_Real primsol, SCIP_Real down, SCIP_Real up, SCIP_Bool downvalid, SCIP_Bool upvalid, SCIP_Longint iter, int itlim)
 
SCIP_RETCODE SCIPtryStrongbranchLPSol (SCIP *scip, SCIP_Bool *foundsol, SCIP_Bool *cutoff)
 
SCIP_Longint SCIPgetVarStrongbranchNode (SCIP *scip, SCIP_VAR *var)
 
SCIP_Longint SCIPgetVarStrongbranchLPAge (SCIP *scip, SCIP_VAR *var)
 
int SCIPgetVarNStrongbranchs (SCIP *scip, SCIP_VAR *var)
 
SCIP_RETCODE SCIPaddVarLocksType (SCIP *scip, SCIP_VAR *var, SCIP_LOCKTYPE locktype, int nlocksdown, int nlocksup)
 
SCIP_RETCODE SCIPaddVarLocks (SCIP *scip, SCIP_VAR *var, int nlocksdown, int nlocksup)
 
SCIP_RETCODE SCIPlockVarCons (SCIP *scip, SCIP_VAR *var, SCIP_CONS *cons, SCIP_Bool lockdown, SCIP_Bool lockup)
 
SCIP_RETCODE SCIPunlockVarCons (SCIP *scip, SCIP_VAR *var, SCIP_CONS *cons, SCIP_Bool lockdown, SCIP_Bool lockup)
 
SCIP_RETCODE SCIPchgVarObj (SCIP *scip, SCIP_VAR *var, SCIP_Real newobj)
 
SCIP_RETCODE SCIPaddVarObj (SCIP *scip, SCIP_VAR *var, SCIP_Real addobj)
 
SCIP_Real SCIPadjustedVarLb (SCIP *scip, SCIP_VAR *var, SCIP_Real lb)
 
SCIP_Real SCIPadjustedVarUb (SCIP *scip, SCIP_VAR *var, SCIP_Real ub)
 
SCIP_RETCODE SCIPchgVarLb (SCIP *scip, SCIP_VAR *var, SCIP_Real newbound)
 
SCIP_RETCODE SCIPchgVarUb (SCIP *scip, SCIP_VAR *var, SCIP_Real newbound)
 
SCIP_RETCODE SCIPchgVarLbNode (SCIP *scip, SCIP_NODE *node, SCIP_VAR *var, SCIP_Real newbound)
 
SCIP_RETCODE SCIPchgVarUbNode (SCIP *scip, SCIP_NODE *node, SCIP_VAR *var, SCIP_Real newbound)
 
SCIP_RETCODE SCIPchgVarLbGlobal (SCIP *scip, SCIP_VAR *var, SCIP_Real newbound)
 
SCIP_RETCODE SCIPchgVarUbGlobal (SCIP *scip, SCIP_VAR *var, SCIP_Real newbound)
 
SCIP_RETCODE SCIPchgVarLbLazy (SCIP *scip, SCIP_VAR *var, SCIP_Real lazylb)
 
SCIP_RETCODE SCIPchgVarUbLazy (SCIP *scip, SCIP_VAR *var, SCIP_Real lazyub)
 
SCIP_RETCODE SCIPtightenVarLb (SCIP *scip, SCIP_VAR *var, SCIP_Real newbound, SCIP_Bool force, SCIP_Bool *infeasible, SCIP_Bool *tightened)
 
SCIP_RETCODE SCIPtightenVarUb (SCIP *scip, SCIP_VAR *var, SCIP_Real newbound, SCIP_Bool force, SCIP_Bool *infeasible, SCIP_Bool *tightened)
 
SCIP_RETCODE SCIPinferVarFixCons (SCIP *scip, SCIP_VAR *var, SCIP_Real fixedval, SCIP_CONS *infercons, int inferinfo, SCIP_Bool force, SCIP_Bool *infeasible, SCIP_Bool *tightened)
 
SCIP_RETCODE SCIPinferVarLbCons (SCIP *scip, SCIP_VAR *var, SCIP_Real newbound, SCIP_CONS *infercons, int inferinfo, SCIP_Bool force, SCIP_Bool *infeasible, SCIP_Bool *tightened)
 
SCIP_RETCODE SCIPinferVarUbCons (SCIP *scip, SCIP_VAR *var, SCIP_Real newbound, SCIP_CONS *infercons, int inferinfo, SCIP_Bool force, SCIP_Bool *infeasible, SCIP_Bool *tightened)
 
SCIP_RETCODE SCIPinferBinvarCons (SCIP *scip, SCIP_VAR *var, SCIP_Bool fixedval, SCIP_CONS *infercons, int inferinfo, SCIP_Bool *infeasible, SCIP_Bool *tightened)
 
SCIP_RETCODE SCIPinferVarFixProp (SCIP *scip, SCIP_VAR *var, SCIP_Real fixedval, SCIP_PROP *inferprop, int inferinfo, SCIP_Bool force, SCIP_Bool *infeasible, SCIP_Bool *tightened)
 
SCIP_RETCODE SCIPinferVarLbProp (SCIP *scip, SCIP_VAR *var, SCIP_Real newbound, SCIP_PROP *inferprop, int inferinfo, SCIP_Bool force, SCIP_Bool *infeasible, SCIP_Bool *tightened)
 
SCIP_RETCODE SCIPinferVarUbProp (SCIP *scip, SCIP_VAR *var, SCIP_Real newbound, SCIP_PROP *inferprop, int inferinfo, SCIP_Bool force, SCIP_Bool *infeasible, SCIP_Bool *tightened)
 
SCIP_RETCODE SCIPinferBinvarProp (SCIP *scip, SCIP_VAR *var, SCIP_Bool fixedval, SCIP_PROP *inferprop, int inferinfo, SCIP_Bool *infeasible, SCIP_Bool *tightened)
 
SCIP_RETCODE SCIPtightenVarLbGlobal (SCIP *scip, SCIP_VAR *var, SCIP_Real newbound, SCIP_Bool force, SCIP_Bool *infeasible, SCIP_Bool *tightened)
 
SCIP_RETCODE SCIPtightenVarUbGlobal (SCIP *scip, SCIP_VAR *var, SCIP_Real newbound, SCIP_Bool force, SCIP_Bool *infeasible, SCIP_Bool *tightened)
 
SCIP_Real SCIPcomputeVarLbGlobal (SCIP *scip, SCIP_VAR *var)
 
SCIP_Real SCIPcomputeVarUbGlobal (SCIP *scip, SCIP_VAR *var)
 
SCIP_Real SCIPcomputeVarLbLocal (SCIP *scip, SCIP_VAR *var)
 
SCIP_Real SCIPcomputeVarUbLocal (SCIP *scip, SCIP_VAR *var)
 
SCIP_Real SCIPgetVarMultaggrLbGlobal (SCIP *scip, SCIP_VAR *var)
 
SCIP_Real SCIPgetVarMultaggrUbGlobal (SCIP *scip, SCIP_VAR *var)
 
SCIP_Real SCIPgetVarMultaggrLbLocal (SCIP *scip, SCIP_VAR *var)
 
SCIP_Real SCIPgetVarMultaggrUbLocal (SCIP *scip, SCIP_VAR *var)
 
SCIP_RETCODE SCIPgetVarClosestVlb (SCIP *scip, SCIP_VAR *var, SCIP_SOL *sol, SCIP_Real *closestvlb, int *closestvlbidx)
 
SCIP_RETCODE SCIPgetVarClosestVub (SCIP *scip, SCIP_VAR *var, SCIP_SOL *sol, SCIP_Real *closestvub, int *closestvubidx)
 
SCIP_RETCODE SCIPaddVarVlb (SCIP *scip, SCIP_VAR *var, SCIP_VAR *vlbvar, SCIP_Real vlbcoef, SCIP_Real vlbconstant, SCIP_Bool *infeasible, int *nbdchgs)
 
SCIP_RETCODE SCIPaddVarVub (SCIP *scip, SCIP_VAR *var, SCIP_VAR *vubvar, SCIP_Real vubcoef, SCIP_Real vubconstant, SCIP_Bool *infeasible, int *nbdchgs)
 
SCIP_RETCODE SCIPaddVarImplication (SCIP *scip, SCIP_VAR *var, SCIP_Bool varfixing, SCIP_VAR *implvar, SCIP_BOUNDTYPE impltype, SCIP_Real implbound, SCIP_Bool *infeasible, int *nbdchgs)
 
SCIP_RETCODE SCIPaddClique (SCIP *scip, SCIP_VAR **vars, SCIP_Bool *values, int nvars, SCIP_Bool isequation, SCIP_Bool *infeasible, int *nbdchgs)
 
static SCIP_RETCODE relabelOrderConsistent (SCIP *const scip, int *labels, int const nlabels, int *nclasses)
 
static SCIP_RETCODE labelSortStable (SCIP *scip, SCIP_VAR **vars, int *classlabels, SCIP_VAR **sortedvars, int *sortedindices, int *classesstartposs, int nvars, int nclasses)
 
static SCIP_RETCODE calcCliquePartitionGreedy (SCIP *const scip, SCIP_VAR **const vars, SCIP_Bool *const values, int const nvars, int *const cliquepartition, int *const ncliques)
 
SCIP_RETCODE SCIPcalcCliquePartition (SCIP *const scip, SCIP_VAR **const vars, int const nvars, int *const cliquepartition, int *const ncliques)
 
SCIP_RETCODE SCIPcalcNegatedCliquePartition (SCIP *const scip, SCIP_VAR **const vars, int const nvars, int *const cliquepartition, int *const ncliques)
 
SCIP_RETCODE SCIPcleanupCliques (SCIP *scip, SCIP_Bool *infeasible)
 
int SCIPgetNCliques (SCIP *scip)
 
int SCIPgetNCliquesCreated (SCIP *scip)
 
SCIP_CLIQUE ** SCIPgetCliques (SCIP *scip)
 
SCIP_Bool SCIPhaveVarsCommonClique (SCIP *scip, SCIP_VAR *var1, SCIP_Bool value1, SCIP_VAR *var2, SCIP_Bool value2, SCIP_Bool regardimplics)
 
SCIP_RETCODE SCIPwriteCliqueGraph (SCIP *scip, const char *fname, SCIP_Bool writenodeweights)
 
SCIP_RETCODE SCIPremoveVarFromGlobalStructures (SCIP *scip, SCIP_VAR *var)
 
SCIP_RETCODE SCIPchgVarBranchFactor (SCIP *scip, SCIP_VAR *var, SCIP_Real branchfactor)
 
SCIP_RETCODE SCIPscaleVarBranchFactor (SCIP *scip, SCIP_VAR *var, SCIP_Real scale)
 
SCIP_RETCODE SCIPaddVarBranchFactor (SCIP *scip, SCIP_VAR *var, SCIP_Real addfactor)
 
SCIP_RETCODE SCIPchgVarBranchPriority (SCIP *scip, SCIP_VAR *var, int branchpriority)
 
SCIP_RETCODE SCIPupdateVarBranchPriority (SCIP *scip, SCIP_VAR *var, int branchpriority)
 
SCIP_RETCODE SCIPaddVarBranchPriority (SCIP *scip, SCIP_VAR *var, int addpriority)
 
SCIP_RETCODE SCIPchgVarBranchDirection (SCIP *scip, SCIP_VAR *var, SCIP_BRANCHDIR branchdirection)
 
static SCIP_RETCODE tightenBounds (SCIP *scip, SCIP_VAR *var, SCIP_VARTYPE vartype, SCIP_Bool *infeasible)
 
SCIP_RETCODE SCIPchgVarType (SCIP *scip, SCIP_VAR *var, SCIP_VARTYPE vartype, SCIP_Bool *infeasible)
 
SCIP_RETCODE SCIPfixVar (SCIP *scip, SCIP_VAR *var, SCIP_Real fixedval, SCIP_Bool *infeasible, SCIP_Bool *fixed)
 
SCIP_RETCODE SCIPaggregateVars (SCIP *scip, SCIP_VAR *varx, SCIP_VAR *vary, SCIP_Real scalarx, SCIP_Real scalary, SCIP_Real rhs, SCIP_Bool *infeasible, SCIP_Bool *redundant, SCIP_Bool *aggregated)
 
SCIP_RETCODE SCIPmultiaggregateVar (SCIP *scip, SCIP_VAR *var, int naggvars, SCIP_VAR **aggvars, SCIP_Real *scalars, SCIP_Real constant, SCIP_Bool *infeasible, SCIP_Bool *aggregated)
 
SCIP_Bool SCIPdoNotAggr (SCIP *scip)
 
SCIP_Bool SCIPdoNotMultaggr (SCIP *scip)
 
SCIP_Bool SCIPdoNotMultaggrVar (SCIP *scip, SCIP_VAR *var)
 
SCIP_Bool SCIPallowDualReds (SCIP *scip)
 
SCIP_Bool SCIPallowStrongDualReds (SCIP *scip)
 
SCIP_Bool SCIPallowObjProp (SCIP *scip)
 
SCIP_Bool SCIPallowWeakDualReds (SCIP *scip)
 
SCIP_RETCODE SCIPmarkDoNotMultaggrVar (SCIP *scip, SCIP_VAR *var)
 
void SCIPenableVarHistory (SCIP *scip)
 
void SCIPdisableVarHistory (SCIP *scip)
 
SCIP_RETCODE SCIPupdateVarPseudocost (SCIP *scip, SCIP_VAR *var, SCIP_Real solvaldelta, SCIP_Real objdelta, SCIP_Real weight)
 
SCIP_Real SCIPgetVarPseudocostVal (SCIP *scip, SCIP_VAR *var, SCIP_Real solvaldelta)
 
SCIP_Real SCIPgetVarPseudocostValCurrentRun (SCIP *scip, SCIP_VAR *var, SCIP_Real solvaldelta)
 
SCIP_Real SCIPgetVarPseudocost (SCIP *scip, SCIP_VAR *var, SCIP_BRANCHDIR dir)
 
SCIP_Real SCIPgetVarPseudocostCurrentRun (SCIP *scip, SCIP_VAR *var, SCIP_BRANCHDIR dir)
 
SCIP_Real SCIPgetVarPseudocostCount (SCIP *scip, SCIP_VAR *var, SCIP_BRANCHDIR dir)
 
SCIP_Real SCIPgetVarPseudocostCountCurrentRun (SCIP *scip, SCIP_VAR *var, SCIP_BRANCHDIR dir)
 
SCIP_Real SCIPgetVarPseudocostVariance (SCIP *scip, SCIP_VAR *var, SCIP_BRANCHDIR dir, SCIP_Bool onlycurrentrun)
 
SCIP_Real SCIPcalculatePscostConfidenceBound (SCIP *scip, SCIP_VAR *var, SCIP_BRANCHDIR dir, SCIP_Bool onlycurrentrun, SCIP_CONFIDENCELEVEL clevel)
 
SCIP_Bool SCIPsignificantVarPscostDifference (SCIP *scip, SCIP_VAR *varx, SCIP_Real fracx, SCIP_VAR *vary, SCIP_Real fracy, SCIP_BRANCHDIR dir, SCIP_CONFIDENCELEVEL clevel, SCIP_Bool onesided)
 
SCIP_Bool SCIPpscostThresholdProbabilityTest (SCIP *scip, SCIP_VAR *var, SCIP_Real frac, SCIP_Real threshold, SCIP_BRANCHDIR dir, SCIP_CONFIDENCELEVEL clevel)
 
SCIP_Bool SCIPisVarPscostRelerrorReliable (SCIP *scip, SCIP_VAR *var, SCIP_Real threshold, SCIP_CONFIDENCELEVEL clevel)
 
SCIP_Real SCIPgetVarPseudocostScore (SCIP *scip, SCIP_VAR *var, SCIP_Real solval)
 
SCIP_Real SCIPgetVarPseudocostScoreCurrentRun (SCIP *scip, SCIP_VAR *var, SCIP_Real solval)
 
SCIP_Real SCIPgetVarVSIDS (SCIP *scip, SCIP_VAR *var, SCIP_BRANCHDIR dir)
 
SCIP_Real SCIPgetVarVSIDSCurrentRun (SCIP *scip, SCIP_VAR *var, SCIP_BRANCHDIR dir)
 
SCIP_Real SCIPgetVarConflictScore (SCIP *scip, SCIP_VAR *var)
 
SCIP_Real SCIPgetVarConflictScoreCurrentRun (SCIP *scip, SCIP_VAR *var)
 
SCIP_Real SCIPgetVarConflictlengthScore (SCIP *scip, SCIP_VAR *var)
 
SCIP_Real SCIPgetVarConflictlengthScoreCurrentRun (SCIP *scip, SCIP_VAR *var)
 
SCIP_Real SCIPgetVarAvgConflictlength (SCIP *scip, SCIP_VAR *var, SCIP_BRANCHDIR dir)
 
SCIP_Real SCIPgetVarAvgConflictlengthCurrentRun (SCIP *scip, SCIP_VAR *var, SCIP_BRANCHDIR dir)
 
SCIP_Real SCIPgetVarAvgInferences (SCIP *scip, SCIP_VAR *var, SCIP_BRANCHDIR dir)
 
SCIP_Real SCIPgetVarAvgInferencesCurrentRun (SCIP *scip, SCIP_VAR *var, SCIP_BRANCHDIR dir)
 
SCIP_Real SCIPgetVarAvgInferenceScore (SCIP *scip, SCIP_VAR *var)
 
SCIP_Real SCIPgetVarAvgInferenceScoreCurrentRun (SCIP *scip, SCIP_VAR *var)
 
SCIP_RETCODE SCIPinitVarBranchStats (SCIP *scip, SCIP_VAR *var, SCIP_Real downpscost, SCIP_Real uppscost, SCIP_Real downvsids, SCIP_Real upvsids, SCIP_Real downconflen, SCIP_Real upconflen, SCIP_Real downinfer, SCIP_Real upinfer, SCIP_Real downcutoff, SCIP_Real upcutoff)
 
SCIP_RETCODE SCIPinitVarValueBranchStats (SCIP *scip, SCIP_VAR *var, SCIP_Real value, SCIP_Real downvsids, SCIP_Real upvsids, SCIP_Real downconflen, SCIP_Real upconflen, SCIP_Real downinfer, SCIP_Real upinfer, SCIP_Real downcutoff, SCIP_Real upcutoff)
 
SCIP_Real SCIPgetVarAvgCutoffs (SCIP *scip, SCIP_VAR *var, SCIP_BRANCHDIR dir)
 
SCIP_Real SCIPgetVarAvgCutoffsCurrentRun (SCIP *scip, SCIP_VAR *var, SCIP_BRANCHDIR dir)
 
SCIP_Real SCIPgetVarAvgCutoffScore (SCIP *scip, SCIP_VAR *var)
 
SCIP_Real SCIPgetVarAvgCutoffScoreCurrentRun (SCIP *scip, SCIP_VAR *var)
 
SCIP_Real SCIPgetVarAvgInferenceCutoffScore (SCIP *scip, SCIP_VAR *var, SCIP_Real cutoffweight)
 
SCIP_Real SCIPgetVarAvgInferenceCutoffScoreCurrentRun (SCIP *scip, SCIP_VAR *var, SCIP_Real cutoffweight)
 
SCIP_RETCODE SCIPprintVar (SCIP *scip, SCIP_VAR *var, FILE *file)
 

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 SCIP_RETCODE analyzeStrongbranch ( SCIP scip,
SCIP_VAR var,
SCIP_Bool downinf,
SCIP_Bool upinf,
SCIP_Bool downconflict,
SCIP_Bool upconflict 
)
static

analyze the strong branching for the given variable; that includes conflict analysis for infeasible branches and storing of root reduced cost information

Parameters
scipSCIP data structure
varvariable to analyze
downinfpointer to store whether the downwards branch is infeasible, or NULL
upinfpointer to store whether the upwards branch is infeasible, or NULL
downconflictpointer to store whether a conflict constraint was created for an infeasible downwards branch, or NULL
upconflictpointer 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 SCIP_RETCODE performStrongbranchWithPropagation ( SCIP scip,
SCIP_VAR var,
SCIP_Bool  down,
SCIP_Bool  firstchild,
SCIP_Bool  propagate,
SCIP_Real  newbound,
int  itlim,
int  maxproprounds,
SCIP_Real value,
SCIP_Bool valid,
SCIP_Longint ndomreductions,
SCIP_Bool conflict,
SCIP_Bool lperror,
SCIP_VAR **  vars,
int  nvars,
SCIP_Real newlbs,
SCIP_Real newubs,
SCIP_Bool foundsol,
SCIP_Bool cutoff 
)
static

create, solve, and evaluate a single strong branching child (for strong branching with propagation)

Parameters
scipSCIP data structure
varvariable to get strong branching values for
downdo we regard the down child?
firstchildis this the first of the two strong branching children?
propagateshould domain propagation be performed?
newboundnew bound to apply at the strong branching child
itlimiteration limit for strong branchings
maxproproundsmaximum number of propagation rounds (-1: no limit, -2: parameter settings)
valuestores dual bound for strong branching child
validstores whether the returned value is a valid dual bound, or NULL; otherwise, it can only be used as an estimate value
ndomreductionspointer to store the number of domain reductions found, or NULL
conflictpointer to store whether a conflict constraint was created for an infeasible strong branching child, or NULL
lperrorpointer to store whether an unresolved LP error occurred or the solving process should be stopped (e.g., due to a time limit)
varsactive problem variables
nvarsnumber of active problem variables
newlbsarray to store valid lower bounds for all active variables, or NULL
newubsarray to store valid upper bounds for all active variables, or NULL
foundsolpointer to store whether a primal solution was found during strong branching
cutoffpointer 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 SCIP_RETCODE relabelOrderConsistent ( SCIP *const  scip,
int *  labels,
int const  nlabels,
int *  nclasses 
)
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
scipSCIP data structure
labelscurrent labels that will be overwritten
nlabelsnumber of variables in the clique
nclassespointer 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 SCIP_RETCODE labelSortStable ( SCIP scip,
SCIP_VAR **  vars,
int *  classlabels,
SCIP_VAR **  sortedvars,
int *  sortedindices,
int *  classesstartposs,
int  nvars,
int  nclasses 
)
static

sort the variables w.r.t. the given labels; thereby ensure the current order of the variables with the same label.

Parameters
scipSCIP data structure
varsvariable array
classlabelsarray that contains a class label for every variable
sortedvarsarray to store variables after stable sorting
sortedindicesarray to store indices of sorted variables in the original vars array
classesstartpossstarting position array for each label class (must have size nclasses + 1)
nvarssize of the vars arrays
nclassesnumber 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 SCIP_RETCODE calcCliquePartitionGreedy ( SCIP *const  scip,
SCIP_VAR **const  vars,
SCIP_Bool *const  values,
int const  nvars,
int *const  cliquepartition,
int *const  ncliques 
)
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
scipSCIP data structure
varsbinary variables in the clique from which at most one can be set to 1
valuesclique value (TRUE or FALSE) for each variable in the clique
nvarsnumber of variables in the array
cliquepartitionarray of length nvars to store the clique partition
ncliquespointer 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 SCIP_RETCODE tightenBounds ( SCIP scip,
SCIP_VAR var,
SCIP_VARTYPE  vartype,
SCIP_Bool infeasible 
)
static

tightens the variable bounds due to a new variable type

Parameters
scipSCIP data structure
varvariable to change the bound for
vartypenew type of variable
infeasiblepointer 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().