Scippy

SCIP

Solving Constraint Integer Programs

branch.c File Reference

Detailed Description

methods for branching rules and branching candidate storage

Author
Tobias Achterberg
Timo Berthold
Gerald Gamrath
Stefan Heinz
Michael Winkler
Stefan Vigerske

Definition in file branch.c.

#include <assert.h>
#include <string.h>
#include "scip/def.h"
#include "blockmemshell/memory.h"
#include "scip/set.h"
#include "scip/stat.h"
#include "scip/clock.h"
#include "scip/paramset.h"
#include "scip/event.h"
#include "scip/lp.h"
#include "scip/var.h"
#include "scip/prob.h"
#include "scip/tree.h"
#include "scip/sepastore.h"
#include "scip/scip.h"
#include "scip/branch.h"
#include "scip/struct_branch.h"

Go to the source code of this file.

Functions

static SCIP_RETCODE ensureLpcandsSize (SCIP_BRANCHCAND *branchcand, SCIP_SET *set, int num)
 
static SCIP_RETCODE ensurePseudocandsSize (SCIP_BRANCHCAND *branchcand, SCIP_SET *set, int num)
 
static SCIP_RETCODE ensureExterncandsSize (SCIP_BRANCHCAND *branchcand, SCIP_SET *set, int num)
 
SCIP_RETCODE SCIPbranchcandCreate (SCIP_BRANCHCAND **branchcand)
 
SCIP_RETCODE SCIPbranchcandFree (SCIP_BRANCHCAND **branchcand)
 
static SCIP_RETCODE branchcandCalcLPCands (SCIP_BRANCHCAND *branchcand, SCIP_SET *set, SCIP_STAT *stat, SCIP_LP *lp)
 
SCIP_RETCODE SCIPbranchcandGetLPCands (SCIP_BRANCHCAND *branchcand, SCIP_SET *set, SCIP_STAT *stat, SCIP_LP *lp, SCIP_VAR ***lpcands, SCIP_Real **lpcandssol, SCIP_Real **lpcandsfrac, int *nlpcands, int *npriolpcands, int *nfracimplvars)
 
SCIP_RETCODE SCIPbranchcandGetExternCands (SCIP_BRANCHCAND *branchcand, SCIP_VAR ***externcands, SCIP_Real **externcandssol, SCIP_Real **externcandsscore, int *nexterncands, int *nprioexterncands, int *nprioexternbins, int *nprioexternints, int *nprioexternimpls)
 
int SCIPbranchcandGetNExternCands (SCIP_BRANCHCAND *branchcand)
 
int SCIPbranchcandGetNPrioExternCands (SCIP_BRANCHCAND *branchcand)
 
int SCIPbranchcandGetNPrioExternBins (SCIP_BRANCHCAND *branchcand)
 
int SCIPbranchcandGetNPrioExternInts (SCIP_BRANCHCAND *branchcand)
 
int SCIPbranchcandGetNPrioExternImpls (SCIP_BRANCHCAND *branchcand)
 
int SCIPbranchcandGetNPrioExternConts (SCIP_BRANCHCAND *branchcand)
 
SCIP_RETCODE SCIPbranchcandAddExternCand (SCIP_BRANCHCAND *branchcand, SCIP_SET *set, SCIP_VAR *var, SCIP_Real score, SCIP_Real solval)
 
void SCIPbranchcandClearExternCands (SCIP_BRANCHCAND *branchcand)
 
SCIP_Bool SCIPbranchcandContainsExternCand (SCIP_BRANCHCAND *branchcand, SCIP_VAR *var)
 
SCIP_RETCODE SCIPbranchcandGetPseudoCands (SCIP_BRANCHCAND *branchcand, SCIP_SET *set, SCIP_PROB *prob, SCIP_VAR ***pseudocands, int *npseudocands, int *npriopseudocands)
 
int SCIPbranchcandGetNPseudoCands (SCIP_BRANCHCAND *branchcand)
 
int SCIPbranchcandGetNPrioPseudoCands (SCIP_BRANCHCAND *branchcand)
 
int SCIPbranchcandGetNPrioPseudoBins (SCIP_BRANCHCAND *branchcand)
 
int SCIPbranchcandGetNPrioPseudoInts (SCIP_BRANCHCAND *branchcand)
 
int SCIPbranchcandGetNPrioPseudoImpls (SCIP_BRANCHCAND *branchcand)
 
static void branchcandInsertPseudoCand (SCIP_BRANCHCAND *branchcand, SCIP_VAR *var, int insertpos)
 
static void branchcandSortPseudoCands (SCIP_BRANCHCAND *branchcand)
 
static void branchcandRemovePseudoCand (SCIP_BRANCHCAND *branchcand, SCIP_VAR *var)
 
SCIP_RETCODE SCIPbranchcandRemoveVar (SCIP_BRANCHCAND *branchcand, SCIP_VAR *var)
 
SCIP_RETCODE SCIPbranchcandUpdateVar (SCIP_BRANCHCAND *branchcand, SCIP_SET *set, SCIP_VAR *var)
 
SCIP_RETCODE SCIPbranchcandUpdateVarBranchPriority (SCIP_BRANCHCAND *branchcand, SCIP_SET *set, SCIP_VAR *var, int branchpriority)
 
 SCIP_DECL_SORTPTRCOMP (SCIPbranchruleComp)
 
 SCIP_DECL_SORTPTRCOMP (SCIPbranchruleCompName)
 
static SCIP_DECL_PARAMCHGD (paramChgdBranchrulePriority)
 
SCIP_RETCODE SCIPbranchruleCopyInclude (SCIP_BRANCHRULE *branchrule, SCIP_SET *set)
 
SCIP_RETCODE SCIPbranchruleCreate (SCIP_BRANCHRULE **branchrule, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, BMS_BLKMEM *blkmem, const char *name, const char *desc, int priority, int maxdepth, SCIP_Real maxbounddist, SCIP_DECL_BRANCHCOPY((*branchcopy)), SCIP_DECL_BRANCHFREE((*branchfree)), SCIP_DECL_BRANCHINIT((*branchinit)), SCIP_DECL_BRANCHEXIT((*branchexit)), SCIP_DECL_BRANCHINITSOL((*branchinitsol)), SCIP_DECL_BRANCHEXITSOL((*branchexitsol)), SCIP_DECL_BRANCHEXECLP((*branchexeclp)), SCIP_DECL_BRANCHEXECEXT((*branchexecext)), SCIP_DECL_BRANCHEXECPS((*branchexecps)), SCIP_BRANCHRULEDATA *branchruledata)
 
SCIP_RETCODE SCIPbranchruleFree (SCIP_BRANCHRULE **branchrule, SCIP_SET *set)
 
SCIP_RETCODE SCIPbranchruleInit (SCIP_BRANCHRULE *branchrule, SCIP_SET *set)
 
SCIP_RETCODE SCIPbranchruleExit (SCIP_BRANCHRULE *branchrule, SCIP_SET *set)
 
SCIP_RETCODE SCIPbranchruleInitsol (SCIP_BRANCHRULE *branchrule, SCIP_SET *set)
 
SCIP_RETCODE SCIPbranchruleExitsol (SCIP_BRANCHRULE *branchrule, SCIP_SET *set)
 
SCIP_RETCODE SCIPbranchruleExecLPSol (SCIP_BRANCHRULE *branchrule, SCIP_SET *set, SCIP_STAT *stat, SCIP_TREE *tree, SCIP_SEPASTORE *sepastore, SCIP_Real cutoffbound, SCIP_Bool allowaddcons, SCIP_RESULT *result)
 
SCIP_RETCODE SCIPbranchruleExecExternSol (SCIP_BRANCHRULE *branchrule, SCIP_SET *set, SCIP_STAT *stat, SCIP_TREE *tree, SCIP_SEPASTORE *sepastore, SCIP_Real cutoffbound, SCIP_Bool allowaddcons, SCIP_RESULT *result)
 
SCIP_RETCODE SCIPbranchruleExecPseudoSol (SCIP_BRANCHRULE *branchrule, SCIP_SET *set, SCIP_STAT *stat, SCIP_TREE *tree, SCIP_Real cutoffbound, SCIP_Bool allowaddcons, SCIP_RESULT *result)
 
SCIP_BRANCHRULEDATASCIPbranchruleGetData (SCIP_BRANCHRULE *branchrule)
 
void SCIPbranchruleSetData (SCIP_BRANCHRULE *branchrule, SCIP_BRANCHRULEDATA *branchruledata)
 
void SCIPbranchruleSetCopy (SCIP_BRANCHRULE *branchrule, SCIP_DECL_BRANCHCOPY((*branchcopy)))
 
void SCIPbranchruleSetFree (SCIP_BRANCHRULE *branchrule, SCIP_DECL_BRANCHFREE((*branchfree)))
 
void SCIPbranchruleSetInit (SCIP_BRANCHRULE *branchrule, SCIP_DECL_BRANCHINIT((*branchinit)))
 
void SCIPbranchruleSetExit (SCIP_BRANCHRULE *branchrule, SCIP_DECL_BRANCHEXIT((*branchexit)))
 
void SCIPbranchruleSetInitsol (SCIP_BRANCHRULE *branchrule, SCIP_DECL_BRANCHINITSOL((*branchinitsol)))
 
void SCIPbranchruleSetExitsol (SCIP_BRANCHRULE *branchrule, SCIP_DECL_BRANCHEXITSOL((*branchexitsol)))
 
void SCIPbranchruleSetExecLp (SCIP_BRANCHRULE *branchrule, SCIP_DECL_BRANCHEXECLP((*branchexeclp)))
 
void SCIPbranchruleSetExecExt (SCIP_BRANCHRULE *branchrule, SCIP_DECL_BRANCHEXECEXT((*branchexecext)))
 
void SCIPbranchruleSetExecPs (SCIP_BRANCHRULE *branchrule, SCIP_DECL_BRANCHEXECPS((*branchexecps)))
 
const char * SCIPbranchruleGetName (SCIP_BRANCHRULE *branchrule)
 
const char * SCIPbranchruleGetDesc (SCIP_BRANCHRULE *branchrule)
 
int SCIPbranchruleGetPriority (SCIP_BRANCHRULE *branchrule)
 
void SCIPbranchruleSetPriority (SCIP_BRANCHRULE *branchrule, SCIP_SET *set, int priority)
 
int SCIPbranchruleGetMaxdepth (SCIP_BRANCHRULE *branchrule)
 
void SCIPbranchruleSetMaxdepth (SCIP_BRANCHRULE *branchrule, int maxdepth)
 
SCIP_Real SCIPbranchruleGetMaxbounddist (SCIP_BRANCHRULE *branchrule)
 
void SCIPbranchruleSetMaxbounddist (SCIP_BRANCHRULE *branchrule, SCIP_Real maxbounddist)
 
void SCIPbranchruleEnableOrDisableClocks (SCIP_BRANCHRULE *branchrule, SCIP_Bool enable)
 
SCIP_Real SCIPbranchruleGetSetupTime (SCIP_BRANCHRULE *branchrule)
 
SCIP_Real SCIPbranchruleGetTime (SCIP_BRANCHRULE *branchrule)
 
SCIP_Longint SCIPbranchruleGetNLPCalls (SCIP_BRANCHRULE *branchrule)
 
SCIP_Longint SCIPbranchruleGetNExternCalls (SCIP_BRANCHRULE *branchrule)
 
SCIP_Longint SCIPbranchruleGetNPseudoCalls (SCIP_BRANCHRULE *branchrule)
 
SCIP_Longint SCIPbranchruleGetNCutoffs (SCIP_BRANCHRULE *branchrule)
 
SCIP_Longint SCIPbranchruleGetNCutsFound (SCIP_BRANCHRULE *branchrule)
 
SCIP_Longint SCIPbranchruleGetNConssFound (SCIP_BRANCHRULE *branchrule)
 
SCIP_Longint SCIPbranchruleGetNDomredsFound (SCIP_BRANCHRULE *branchrule)
 
SCIP_Longint SCIPbranchruleGetNChildren (SCIP_BRANCHRULE *branchrule)
 
SCIP_Bool SCIPbranchruleIsInitialized (SCIP_BRANCHRULE *branchrule)
 
SCIP_Real SCIPbranchGetScore (SCIP_SET *set, SCIP_VAR *var, SCIP_Real downgain, SCIP_Real upgain)
 
SCIP_Real SCIPbranchGetScoreMultiple (SCIP_SET *set, SCIP_VAR *var, int nchildren, SCIP_Real *gains)
 
SCIP_Real SCIPbranchGetBranchingPoint (SCIP_SET *set, SCIP_TREE *tree, SCIP_VAR *var, SCIP_Real suggestion)
 
SCIP_RETCODE SCIPbranchExecLP (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_SEPASTORE *sepastore, SCIP_BRANCHCAND *branchcand, SCIP_EVENTQUEUE *eventqueue, SCIP_Real cutoffbound, SCIP_Bool allowaddcons, SCIP_RESULT *result)
 
SCIP_RETCODE SCIPbranchExecExtern (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_SEPASTORE *sepastore, SCIP_BRANCHCAND *branchcand, SCIP_EVENTQUEUE *eventqueue, SCIP_Real cutoffbound, SCIP_Bool allowaddcons, SCIP_RESULT *result)
 
SCIP_RETCODE SCIPbranchExecPseudo (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_Real cutoffbound, SCIP_Bool allowaddcons, SCIP_RESULT *result)
 

Function Documentation

static SCIP_RETCODE ensureLpcandsSize ( SCIP_BRANCHCAND branchcand,
SCIP_SET set,
int  num 
)
static

ensures, that lpcands array can store at least num entries

Parameters
branchcandbranching candidate storage
setglobal SCIP settings
numminimum number of entries to store

Definition at line 54 of file branch.c.

References BMSreallocMemoryArray, SCIP_BranchCand::lpcands, SCIP_BranchCand::lpcandsfrac, SCIP_BranchCand::lpcandssize, SCIP_BranchCand::lpcandssol, SCIP_BranchCand::nlpcands, SCIP_ALLOC, SCIP_OKAY, and SCIPsetCalcMemGrowSize().

Referenced by branchcandCalcLPCands().

static SCIP_RETCODE ensurePseudocandsSize ( SCIP_BRANCHCAND branchcand,
SCIP_SET set,
int  num 
)
static

ensures, that pseudocands array can store at least num entries

Parameters
branchcandbranching candidate storage
setglobal SCIP settings
numminimum number of entries to store

Definition at line 79 of file branch.c.

References BMSreallocMemoryArray, SCIP_BranchCand::npseudocands, SCIP_BranchCand::pseudocands, SCIP_BranchCand::pseudocandssize, SCIP_ALLOC, SCIP_OKAY, and SCIPsetCalcMemGrowSize().

Referenced by SCIPbranchcandUpdateVar().

static SCIP_RETCODE ensureExterncandsSize ( SCIP_BRANCHCAND branchcand,
SCIP_SET set,
int  num 
)
static

ensures, that externcands array can store at least num entries

Parameters
branchcandbranching candidate storage
setglobal SCIP settings
numminimum number of entries to store

Definition at line 102 of file branch.c.

References BMSreallocMemoryArray, SCIP_BranchCand::externcands, SCIP_BranchCand::externcandsscore, SCIP_BranchCand::externcandssize, SCIP_BranchCand::externcandssol, SCIP_BranchCand::nexterncands, SCIP_ALLOC, SCIP_OKAY, and SCIPsetCalcMemGrowSize().

Referenced by SCIPbranchcandAddExternCand().

SCIP_RETCODE SCIPbranchcandCreate ( SCIP_BRANCHCAND **  branchcand)

creates a branching candidate storage

Parameters
branchcandpointer to store branching candidate storage

Definition at line 132 of file branch.c.

References BMSallocMemory, NULL, SCIP_ALLOC, and SCIP_OKAY.

Referenced by SCIPtransformProb().

SCIP_RETCODE SCIPbranchcandFree ( SCIP_BRANCHCAND **  branchcand)

frees branching candidate storage

Parameters
branchcandpointer to store branching candidate storage

Definition at line 171 of file branch.c.

References BMSfreeMemory, BMSfreeMemoryArrayNull, NULL, and SCIP_OKAY.

Referenced by freeTransform().

SCIP_RETCODE SCIPbranchcandGetLPCands ( SCIP_BRANCHCAND branchcand,
SCIP_SET set,
SCIP_STAT stat,
SCIP_LP lp,
SCIP_VAR ***  lpcands,
SCIP_Real **  lpcandssol,
SCIP_Real **  lpcandsfrac,
int *  nlpcands,
int *  npriolpcands,
int *  nfracimplvars 
)

gets branching candidates for LP solution branching (fractional variables)

Parameters
branchcandbranching candidate storage
setglobal SCIP settings
statproblem statistics
lpcurrent LP data
lpcandspointer to store the array of LP branching candidates, or NULL
lpcandssolpointer to store the array of LP candidate solution values, or NULL
lpcandsfracpointer to store the array of LP candidate fractionalities, or NULL
nlpcandspointer to store the number of LP branching candidates, or NULL
npriolpcandspointer to store the number of candidates with maximal priority, or NULL
nfracimplvarspointer to store the number of implicit fractional variables, or NULL

Definition at line 384 of file branch.c.

References branchcandCalcLPCands(), SCIP_BranchCand::lpcands, SCIP_BranchCand::lpcandsfrac, SCIP_BranchCand::lpcandssol, SCIP_BranchCand::nimpllpfracs, SCIP_BranchCand::nlpcands, SCIP_BranchCand::npriolpbins, SCIP_BranchCand::npriolpcands, NULL, SCIP_CALL, and SCIP_OKAY.

Referenced by priceAndCutLoop(), SCIPgetLPBranchCands(), SCIPgetNLPBranchCands(), SCIPgetNPrioLPBranchCands(), solveNode(), and updateEstimate().

SCIP_RETCODE SCIPbranchcandGetExternCands ( SCIP_BRANCHCAND branchcand,
SCIP_VAR ***  externcands,
SCIP_Real **  externcandssol,
SCIP_Real **  externcandsscore,
int *  nexterncands,
int *  nprioexterncands,
int *  nprioexternbins,
int *  nprioexternints,
int *  nprioexternimpls 
)

gets external branching candidates

Parameters
branchcandbranching candidate storage
externcandspointer to store the array of external branching candidates, or NULL
externcandssolpointer to store the array of external candidate solution values, or NULL
externcandsscorepointer to store the array of external candidate scores, or NULL
nexterncandspointer to store the number of external branching candidates, or NULL
nprioexterncandspointer to store the number of candidates with maximal priority, or NULL
nprioexternbinspointer to store the number of binary candidates with maximal priority, or NULL
nprioexternintspointer to store the number of integer candidates with maximal priority, or NULL
nprioexternimplspointer to store the number of implicit integer candidates with maximal priority, or NULL

Definition at line 419 of file branch.c.

References SCIP_BranchCand::externcands, SCIP_BranchCand::externcandsscore, SCIP_BranchCand::externcandssol, SCIP_BranchCand::nexterncands, SCIP_BranchCand::nprioexternbins, SCIP_BranchCand::nprioexterncands, SCIP_BranchCand::nprioexternimpls, SCIP_BranchCand::nprioexternints, NULL, and SCIP_OKAY.

Referenced by SCIPgetExternBranchCands().

int SCIPbranchcandGetNExternCands ( SCIP_BRANCHCAND branchcand)

gets number of external branching candidates

Parameters
branchcandbranching candidate storage

Definition at line 457 of file branch.c.

References SCIP_BranchCand::nexterncands, and NULL.

Referenced by SCIPgetNExternBranchCands(), and solveNode().

int SCIPbranchcandGetNPrioExternCands ( SCIP_BRANCHCAND branchcand)

gets number of external branching candidates with maximal branch priority

Parameters
branchcandbranching candidate storage

Definition at line 467 of file branch.c.

References SCIP_BranchCand::nprioexterncands, and NULL.

Referenced by SCIPgetNPrioExternBranchCands().

int SCIPbranchcandGetNPrioExternBins ( SCIP_BRANCHCAND branchcand)

gets number of binary external branching candidates with maximal branch priority

Parameters
branchcandbranching candidate storage

Definition at line 477 of file branch.c.

References SCIP_BranchCand::nprioexternbins, and NULL.

Referenced by SCIPgetNPrioExternBranchBins().

int SCIPbranchcandGetNPrioExternInts ( SCIP_BRANCHCAND branchcand)

gets number of integer external branching candidates with maximal branch priority

Parameters
branchcandbranching candidate storage

Definition at line 487 of file branch.c.

References SCIP_BranchCand::nprioexternints, and NULL.

Referenced by SCIPgetNPrioExternBranchInts().

int SCIPbranchcandGetNPrioExternImpls ( SCIP_BRANCHCAND branchcand)

gets number of implicit integer external branching candidates with maximal branch priority

Parameters
branchcandbranching candidate storage

Definition at line 497 of file branch.c.

References SCIP_BranchCand::nprioexternimpls, and NULL.

Referenced by SCIPgetNPrioExternBranchImpls().

int SCIPbranchcandGetNPrioExternConts ( SCIP_BRANCHCAND branchcand)

gets number of continuous external branching candidates with maximal branch priority

Parameters
branchcandbranching candidate storage

Definition at line 507 of file branch.c.

References SCIP_BranchCand::nprioexternbins, SCIP_BranchCand::nprioexterncands, SCIP_BranchCand::nprioexternimpls, SCIP_BranchCand::nprioexternints, and NULL.

Referenced by SCIPgetNPrioExternBranchConts().

SCIP_RETCODE SCIPbranchcandAddExternCand ( SCIP_BRANCHCAND branchcand,
SCIP_SET set,
SCIP_VAR var,
SCIP_Real  score,
SCIP_Real  solval 
)

insert variable, its score and its solution value into the external branching candidate storage the absolute difference of the current lower and upper bounds of the variable must be at least epsilon

Parameters
branchcandbranching candidate storage
setglobal SCIP settings
varvariable to insert
scorescore of external candidate, e.g. infeasibility
solvalvalue of the variable in the current solution

Definition at line 519 of file branch.c.

References ensureExterncandsSize(), SCIP_BranchCand::externcands, SCIP_BranchCand::externcandsscore, SCIP_BranchCand::externcandssize, SCIP_BranchCand::externcandssol, SCIP_BranchCand::externmaxpriority, SCIP_BranchCand::nexterncands, SCIP_BranchCand::nprioexternbins, SCIP_BranchCand::nprioexterncands, SCIP_BranchCand::nprioexternimpls, SCIP_BranchCand::nprioexternints, NULL, SCIP_CALL, SCIP_OKAY, SCIP_VARSTATUS_MULTAGGR, SCIP_VARTYPE_BINARY, SCIP_VARTYPE_CONTINUOUS, SCIP_VARTYPE_IMPLINT, SCIP_VARTYPE_INTEGER, SCIPdebugMessage, SCIPsetCeil(), SCIPsetFloor(), SCIPsetIsEQ(), SCIPvarGetBranchPriority(), SCIPvarGetLbLocal(), SCIPvarGetMultaggrLbLocal(), SCIPvarGetMultaggrUbLocal(), SCIPvarGetName(), SCIPvarGetStatus(), SCIPvarGetType(), and SCIPvarGetUbLocal().

Referenced by SCIPaddExternBranchCand().

void SCIPbranchcandClearExternCands ( SCIP_BRANCHCAND branchcand)

removes all external candidates from the storage for external branching

Parameters
branchcandbranching candidate storage

Definition at line 649 of file branch.c.

References SCIP_BranchCand::externmaxpriority, SCIP_BranchCand::nexterncands, SCIP_BranchCand::nprioexternbins, SCIP_BranchCand::nprioexterncands, SCIP_BranchCand::nprioexternimpls, SCIP_BranchCand::nprioexternints, and NULL.

Referenced by propAndSolve(), SCIPclearExternBranchCands(), and solveNode().

SCIP_Bool SCIPbranchcandContainsExternCand ( SCIP_BRANCHCAND branchcand,
SCIP_VAR var 
)
SCIP_RETCODE SCIPbranchcandGetPseudoCands ( SCIP_BRANCHCAND branchcand,
SCIP_SET set,
SCIP_PROB prob,
SCIP_VAR ***  pseudocands,
int *  npseudocands,
int *  npriopseudocands 
)

gets branching candidates for pseudo solution branching (non-fixed variables)

Parameters
branchcandbranching candidate storage
setglobal SCIP settings
probproblem data
pseudocandspointer to store the array of pseudo branching candidates, or NULL
npseudocandspointer to store the number of pseudo branching candidates, or NULL
npriopseudocandspointer to store the number of candidates with maximal priority, or NULL

Definition at line 740 of file branch.c.

References SCIP_Prob::nbinvars, SCIP_Prob::nimplvars, SCIP_Prob::nintvars, SCIP_BranchCand::npriopseudobins, SCIP_BranchCand::npriopseudocands, SCIP_BranchCand::npseudocands, NULL, SCIP_Var::pseudocandindex, SCIP_BranchCand::pseudocands, SCIP_OKAY, SCIP_VARSTATUS_COLUMN, SCIP_VARSTATUS_LOOSE, SCIP_VARTYPE_BINARY, SCIP_VARTYPE_IMPLINT, SCIP_VARTYPE_INTEGER, SCIPsetIsFeasIntegral(), SCIPsetIsLE(), SCIPsetIsLT(), SCIPvarGetLbLocal(), SCIPvarGetStatus(), SCIPvarGetType(), SCIPvarGetUbLocal(), and SCIP_Prob::vars.

Referenced by SCIPgetPseudoBranchCands().

int SCIPbranchcandGetNPseudoCands ( SCIP_BRANCHCAND branchcand)

gets number of branching candidates for pseudo solution branching (non-fixed variables)

Parameters
branchcandbranching candidate storage

Definition at line 802 of file branch.c.

References SCIP_BranchCand::npseudocands, and NULL.

Referenced by propAndSolve(), SCIPconshdlrEnforcePseudoSol(), SCIPgetNPseudoBranchCands(), SCIPsolveCIP(), and solveNode().

int SCIPbranchcandGetNPrioPseudoCands ( SCIP_BRANCHCAND branchcand)

gets number of branching candidates with maximal branch priority for pseudo solution branching

Parameters
branchcandbranching candidate storage

Definition at line 812 of file branch.c.

References SCIP_BranchCand::npriopseudocands, and NULL.

Referenced by SCIPgetNPrioPseudoBranchCands().

int SCIPbranchcandGetNPrioPseudoBins ( SCIP_BRANCHCAND branchcand)

gets number of binary branching candidates with maximal branch priority for pseudo solution branching

Parameters
branchcandbranching candidate storage

Definition at line 822 of file branch.c.

References SCIP_BranchCand::npriopseudobins, and NULL.

Referenced by SCIPgetNPrioPseudoBranchBins().

int SCIPbranchcandGetNPrioPseudoInts ( SCIP_BRANCHCAND branchcand)

gets number of integer branching candidates with maximal branch priority for pseudo solution branching

Parameters
branchcandbranching candidate storage

Definition at line 832 of file branch.c.

References SCIP_BranchCand::npriopseudoints, and NULL.

Referenced by SCIPgetNPrioPseudoBranchInts().

int SCIPbranchcandGetNPrioPseudoImpls ( SCIP_BRANCHCAND branchcand)

gets number of implicit integer branching candidates with maximal branch priority for pseudo solution branching

Parameters
branchcandbranching candidate storage

Definition at line 842 of file branch.c.

References SCIP_BranchCand::npriopseudobins, SCIP_BranchCand::npriopseudocands, SCIP_BranchCand::npriopseudoints, and NULL.

Referenced by SCIPgetNPrioPseudoBranchImpls().

static void branchcandInsertPseudoCand ( SCIP_BRANCHCAND branchcand,
SCIP_VAR var,
int  insertpos 
)
static

insert pseudocand at given position, or to the first positions of the maximal priority candidates, using the given position as free slot for the other candidates

Parameters
branchcandbranching candidate storage
varvariable to insert
insertposfree position to insert the variable

Definition at line 855 of file branch.c.

References SCIP_BranchCand::npriopseudobins, SCIP_BranchCand::npriopseudocands, SCIP_BranchCand::npriopseudoints, SCIP_BranchCand::npseudocands, NULL, SCIP_Var::pseudocandindex, SCIP_BranchCand::pseudocands, SCIP_BranchCand::pseudocandssize, SCIP_BranchCand::pseudomaxpriority, SCIP_VARTYPE_BINARY, SCIP_VARTYPE_INTEGER, SCIPdebugMessage, SCIPvarGetBranchPriority(), SCIPvarGetName(), and SCIPvarGetType().

Referenced by branchcandSortPseudoCands(), and SCIPbranchcandUpdateVar().

static void branchcandSortPseudoCands ( SCIP_BRANCHCAND branchcand)
static

sorts the pseudo branching candidates, such that the candidates of maximal priority are at the front, ordered by binaries, integers, implicit integers

Parameters
branchcandbranching candidate storage

Definition at line 945 of file branch.c.

References branchcandInsertPseudoCand(), SCIP_BranchCand::npriopseudobins, SCIP_BranchCand::npriopseudocands, SCIP_BranchCand::npriopseudoints, SCIP_BranchCand::npseudocands, NULL, SCIP_Var::pseudocandindex, SCIP_BranchCand::pseudocands, SCIP_BranchCand::pseudomaxpriority, SCIPdebugMessage, and SCIPvarGetBranchPriority().

Referenced by branchcandRemovePseudoCand().

static void branchcandRemovePseudoCand ( SCIP_BRANCHCAND branchcand,
SCIP_VAR var 
)
static
SCIP_RETCODE SCIPbranchcandRemoveVar ( SCIP_BRANCHCAND branchcand,
SCIP_VAR var 
)

removes variable from branching candidate list

Parameters
branchcandbranching candidate storage
varvariable that changed its bounds

Definition at line 1063 of file branch.c.

References branchcandRemovePseudoCand(), NULL, SCIP_Var::pseudocandindex, and SCIP_OKAY.

Referenced by SCIPbranchcandUpdateVar(), SCIPbranchcandUpdateVarBranchPriority(), SCIPprobChgVarType(), and SCIPprobPerformVarDeletions().

SCIP_RETCODE SCIPbranchcandUpdateVarBranchPriority ( SCIP_BRANCHCAND branchcand,
SCIP_SET set,
SCIP_VAR var,
int  branchpriority 
)

updates branching priority of the given variable and update the pseude candidate array if needed

Parameters
branchcandbranching candidate storage
setglobal SCIP settings
varvariable that changed its bounds
branchprioritybranch priority of the variable

Definition at line 1120 of file branch.c.

References NULL, SCIP_Var::pseudocandindex, SCIP_BranchCand::pseudomaxpriority, SCIP_CALL, SCIP_OKAY, SCIPbranchcandRemoveVar(), SCIPbranchcandUpdateVar(), SCIPvarChgBranchPriority(), and SCIPvarGetBranchPriority().

Referenced by SCIPchgVarBranchPriority().

SCIP_DECL_SORTPTRCOMP ( SCIPbranchruleComp  )

compares two branching rules w. r. to their priority

Definition at line 1166 of file branch.c.

SCIP_DECL_SORTPTRCOMP ( SCIPbranchruleCompName  )

comparison method for sorting branching rules w.r.t. to their name

Definition at line 1172 of file branch.c.

References SCIPbranchruleGetName().

static SCIP_DECL_PARAMCHGD ( paramChgdBranchrulePriority  )
static

method to call, when the priority of a branching rule was changed

Definition at line 1179 of file branch.c.

References NULL, SCIP_CALL, SCIP_OKAY, SCIPparamGetData(), SCIPparamGetInt(), and SCIPsetBranchrulePriority().

SCIP_RETCODE SCIPbranchruleCopyInclude ( SCIP_BRANCHRULE branchrule,
SCIP_SET set 
)

copies the given branchrule to a new scip

Parameters
branchrulebranchrule
setSCIP_SET of SCIP to copy to

Definition at line 1193 of file branch.c.

References NULL, SCIP_CALL, SCIP_OKAY, SCIPbranchruleGetName(), and SCIPdebugMessage.

Referenced by SCIPsetCopyPlugins().

SCIP_RETCODE SCIPbranchruleCreate ( SCIP_BRANCHRULE **  branchrule,
SCIP_SET set,
SCIP_MESSAGEHDLR messagehdlr,
BMS_BLKMEM blkmem,
const char *  name,
const char *  desc,
int  priority,
int  maxdepth,
SCIP_Real  maxbounddist,
SCIP_DECL_BRANCHCOPY((*branchcopy))  ,
SCIP_DECL_BRANCHFREE((*branchfree))  ,
SCIP_DECL_BRANCHINIT((*branchinit))  ,
SCIP_DECL_BRANCHEXIT((*branchexit))  ,
SCIP_DECL_BRANCHINITSOL((*branchinitsol))  ,
SCIP_DECL_BRANCHEXITSOL((*branchexitsol))  ,
SCIP_DECL_BRANCHEXECLP((*branchexeclp))  ,
SCIP_DECL_BRANCHEXECEXT((*branchexecext))  ,
SCIP_DECL_BRANCHEXECPS((*branchexecps))  ,
SCIP_BRANCHRULEDATA branchruledata 
)

creates a branching rule

Parameters
branchrulepointer to store branching rule
setglobal SCIP settings
messagehdlrmessage handler
blkmemblock memory for parameter settings
namename of branching rule
descdescription of branching rule
prioritypriority of the branching rule
maxdepthmaximal depth level, up to which this branching rule should be used (or -1)
maxbounddistmaximal relative distance from current node's dual bound to primal bound compared to best node's dual bound for applying branching rule (0.0: only on current best node, 1.0: on all nodes)
branchruledatabranching rule data

Definition at line 1212 of file branch.c.

References BMSallocMemory, BMSduplicateMemoryArray, FALSE, NULL, paramname, SCIP_ALLOC, SCIP_CALL, SCIP_CLOCKTYPE_DEFAULT, SCIP_MAXSTRLEN, SCIP_OKAY, SCIPclockCreate(), SCIPsetAddIntParam(), SCIPsetAddRealParam(), and SCIPsnprintf().

Referenced by SCIPincludeBranchrule(), and SCIPincludeBranchruleBasic().

SCIP_RETCODE SCIPbranchruleFree ( SCIP_BRANCHRULE **  branchrule,
SCIP_SET set 
)

frees memory of branching rule

Parameters
branchrulepointer to branching rule data structure
setglobal SCIP settings

Definition at line 1292 of file branch.c.

References BMSfreeMemory, BMSfreeMemoryArray, NULL, SCIP_CALL, SCIP_OKAY, and SCIPclockFree().

SCIP_RETCODE SCIPbranchruleExit ( SCIP_BRANCHRULE branchrule,
SCIP_SET set 
)

deinitializes branching rule

Parameters
branchrulebranching rule
setglobal SCIP settings

Definition at line 1362 of file branch.c.

References FALSE, SCIP_Branchrule::initialized, SCIP_Branchrule::name, NULL, SCIP_CALL, SCIP_INVALIDCALL, SCIP_OKAY, SCIPclockStart(), SCIPclockStop(), SCIPerrorMessage, and SCIP_Branchrule::setuptime.

Referenced by SCIPsetExitPlugins().

SCIP_RETCODE SCIPbranchruleInitsol ( SCIP_BRANCHRULE branchrule,
SCIP_SET set 
)

informs branching rule that the branch and bound process is being started

Parameters
branchrulebranching rule
setglobal SCIP settings

Definition at line 1392 of file branch.c.

References NULL, SCIP_CALL, SCIP_OKAY, SCIPclockStart(), SCIPclockStop(), and SCIP_Branchrule::setuptime.

Referenced by SCIPsetInitsolPlugins().

SCIP_RETCODE SCIPbranchruleExitsol ( SCIP_BRANCHRULE branchrule,
SCIP_SET set 
)

informs branching rule that the branch and bound process data is being freed

Parameters
branchrulebranching rule
setglobal SCIP settings

Definition at line 1416 of file branch.c.

References NULL, SCIP_CALL, SCIP_OKAY, SCIPclockStart(), SCIPclockStop(), and SCIP_Branchrule::setuptime.

Referenced by SCIPsetExitsolPlugins().

SCIP_RETCODE SCIPbranchruleExecLPSol ( SCIP_BRANCHRULE branchrule,
SCIP_SET set,
SCIP_STAT stat,
SCIP_TREE tree,
SCIP_SEPASTORE sepastore,
SCIP_Real  cutoffbound,
SCIP_Bool  allowaddcons,
SCIP_RESULT result 
)
SCIP_RETCODE SCIPbranchruleExecExternSol ( SCIP_BRANCHRULE branchrule,
SCIP_SET set,
SCIP_STAT stat,
SCIP_TREE tree,
SCIP_SEPASTORE sepastore,
SCIP_Real  cutoffbound,
SCIP_Bool  allowaddcons,
SCIP_RESULT result 
)
SCIP_RETCODE SCIPbranchruleExecPseudoSol ( SCIP_BRANCHRULE branchrule,
SCIP_SET set,
SCIP_STAT stat,
SCIP_TREE tree,
SCIP_Real  cutoffbound,
SCIP_Bool  allowaddcons,
SCIP_RESULT result 
)
void SCIPbranchruleSetData ( SCIP_BRANCHRULE branchrule,
SCIP_BRANCHRULEDATA branchruledata 
)

sets user data of branching rule; user has to free old data in advance!

Parameters
branchrulebranching rule
branchruledatanew branching rule user data

Definition at line 1765 of file branch.c.

References SCIP_Branchrule::branchruledata, and NULL.

Referenced by SCIP_DECL_BRANCHFREE().

void SCIPbranchruleSetCopy ( SCIP_BRANCHRULE branchrule,
SCIP_DECL_BRANCHCOPY((*branchcopy))   
)

sets copy method of branching rule

Parameters
branchrulebranching rule

Definition at line 1776 of file branch.c.

References NULL.

Referenced by SCIPsetBranchruleCopy().

void SCIPbranchruleSetFree ( SCIP_BRANCHRULE branchrule,
SCIP_DECL_BRANCHFREE((*branchfree))   
)

sets destructor method of branching rule

Parameters
branchrulebranching rule

Definition at line 1787 of file branch.c.

References NULL.

Referenced by SCIPsetBranchruleFree().

void SCIPbranchruleSetInit ( SCIP_BRANCHRULE branchrule,
SCIP_DECL_BRANCHINIT((*branchinit))   
)

sets initialization method of branching rule

Parameters
branchrulebranching rule

Definition at line 1798 of file branch.c.

References NULL.

Referenced by SCIPsetBranchruleInit().

void SCIPbranchruleSetExit ( SCIP_BRANCHRULE branchrule,
SCIP_DECL_BRANCHEXIT((*branchexit))   
)

sets deinitialization method of branching rule

Parameters
branchrulebranching rule

Definition at line 1809 of file branch.c.

References NULL.

Referenced by SCIPsetBranchruleExit().

void SCIPbranchruleSetInitsol ( SCIP_BRANCHRULE branchrule,
SCIP_DECL_BRANCHINITSOL((*branchinitsol))   
)

sets solving process initialization method of branching rule

Parameters
branchrulebranching rule

Definition at line 1820 of file branch.c.

References NULL.

Referenced by SCIPsetBranchruleInitsol().

void SCIPbranchruleSetExitsol ( SCIP_BRANCHRULE branchrule,
SCIP_DECL_BRANCHEXITSOL((*branchexitsol))   
)

sets solving process deinitialization method of branching rule

Parameters
branchrulebranching rule

Definition at line 1831 of file branch.c.

References NULL.

Referenced by SCIPsetBranchruleExitsol().

void SCIPbranchruleSetExecLp ( SCIP_BRANCHRULE branchrule,
SCIP_DECL_BRANCHEXECLP((*branchexeclp))   
)

sets branching execution method for fractional LP solutions

Parameters
branchrulebranching rule

Definition at line 1844 of file branch.c.

References NULL.

Referenced by SCIPsetBranchruleExecLp().

void SCIPbranchruleSetExecExt ( SCIP_BRANCHRULE branchrule,
SCIP_DECL_BRANCHEXECEXT((*branchexecext))   
)

sets branching execution method for external candidates

Parameters
branchrulebranching rule

Definition at line 1855 of file branch.c.

References NULL.

Referenced by SCIPsetBranchruleExecExt().

void SCIPbranchruleSetExecPs ( SCIP_BRANCHRULE branchrule,
SCIP_DECL_BRANCHEXECPS((*branchexecps))   
)

sets branching execution method for not completely fixed pseudo solutions

Parameters
branchrulebranching rule

Definition at line 1866 of file branch.c.

References NULL.

Referenced by SCIPsetBranchruleExecPs().

const char* SCIPbranchruleGetDesc ( SCIP_BRANCHRULE branchrule)

gets description of branching rule

Parameters
branchrulebranching rule

Definition at line 1887 of file branch.c.

References SCIP_Branchrule::desc, and NULL.

Referenced by SCIP_DECL_DIALOGEXEC(), SCIPincludeDialogDefaultFix(), and SCIPincludeDialogDefaultSet().

int SCIPbranchruleGetPriority ( SCIP_BRANCHRULE branchrule)

gets priority of branching rule

Parameters
branchrulebranching rule

Definition at line 1897 of file branch.c.

References NULL, and SCIP_Branchrule::priority.

Referenced by SCIP_DECL_DIALOGEXEC().

void SCIPbranchruleSetPriority ( SCIP_BRANCHRULE branchrule,
SCIP_SET set,
int  priority 
)

sets priority of branching rule

Parameters
branchrulebranching rule
setglobal SCIP settings
prioritynew priority of the branching rule

Definition at line 1907 of file branch.c.

References FALSE, NULL, and SCIP_Branchrule::priority.

Referenced by SCIPsetBranchrulePriority().

int SCIPbranchruleGetMaxdepth ( SCIP_BRANCHRULE branchrule)

gets maximal depth level, up to which this branching rule should be used (-1 for no limit)

Parameters
branchrulebranching rule

Definition at line 1921 of file branch.c.

References SCIP_Branchrule::maxdepth, and NULL.

Referenced by SCIP_DECL_DIALOGEXEC().

void SCIPbranchruleSetMaxdepth ( SCIP_BRANCHRULE branchrule,
int  maxdepth 
)

sets maximal depth level, up to which this branching rule should be used (-1 for no limit)

Parameters
branchrulebranching rule
maxdepthnew maxdepth of the branching rule

Definition at line 1931 of file branch.c.

References SCIP_Branchrule::maxdepth, and NULL.

Referenced by SCIPsetBranchruleMaxdepth().

SCIP_Real SCIPbranchruleGetMaxbounddist ( SCIP_BRANCHRULE branchrule)

gets maximal relative distance from current node's dual bound to primal bound for applying branching rule

Parameters
branchrulebranching rule

Definition at line 1943 of file branch.c.

References SCIP_Branchrule::maxbounddist, and NULL.

Referenced by SCIP_DECL_DIALOGEXEC().

void SCIPbranchruleSetMaxbounddist ( SCIP_BRANCHRULE branchrule,
SCIP_Real  maxbounddist 
)

sets maximal relative distance from current node's dual bound to primal bound for applying branching rule

Parameters
branchrulebranching rule
maxbounddistnew maxbounddist of the branching rule

Definition at line 1953 of file branch.c.

References SCIP_Branchrule::maxbounddist, and NULL.

Referenced by SCIPsetBranchruleMaxbounddist().

void SCIPbranchruleEnableOrDisableClocks ( SCIP_BRANCHRULE branchrule,
SCIP_Bool  enable 
)

enables or disables all clocks of branchrule, depending on the value of the flag

Parameters
branchrulethe branching rule for which all clocks should be enabled or disabled
enableshould the clocks of the branching rule be enabled?

Definition at line 1965 of file branch.c.

References SCIP_Branchrule::branchclock, NULL, SCIPclockEnableOrDisable(), and SCIP_Branchrule::setuptime.

Referenced by SCIPsetSetReoptimizationParams().

SCIP_Real SCIPbranchruleGetSetupTime ( SCIP_BRANCHRULE branchrule)

gets time in seconds used in this branching rule for setting up for next stages

Parameters
branchrulebranching rule

Definition at line 1977 of file branch.c.

References NULL, SCIPclockGetTime(), and SCIP_Branchrule::setuptime.

Referenced by printBranchruleStatistics().

SCIP_Real SCIPbranchruleGetTime ( SCIP_BRANCHRULE branchrule)

gets time in seconds used in this branching rule

Parameters
branchrulebranching rule

Definition at line 1987 of file branch.c.

References SCIP_Branchrule::branchclock, NULL, and SCIPclockGetTime().

Referenced by printBranchruleStatistics().

SCIP_Longint SCIPbranchruleGetNLPCalls ( SCIP_BRANCHRULE branchrule)

gets the total number of times, the branching rule was called on an LP solution

Parameters
branchrulebranching rule

Definition at line 1997 of file branch.c.

References SCIP_Branchrule::nlpcalls, and NULL.

Referenced by printBranchruleStatistics().

SCIP_Longint SCIPbranchruleGetNExternCalls ( SCIP_BRANCHRULE branchrule)

gets the total number of times, the branching rule was called on an external solution

Parameters
branchrulebranching rule

Definition at line 2007 of file branch.c.

References SCIP_Branchrule::nexterncalls, and NULL.

Referenced by printBranchruleStatistics().

SCIP_Longint SCIPbranchruleGetNPseudoCalls ( SCIP_BRANCHRULE branchrule)

gets the total number of times, the branching rule was called on a pseudo solution

Parameters
branchrulebranching rule

Definition at line 2017 of file branch.c.

References SCIP_Branchrule::npseudocalls, and NULL.

Referenced by printBranchruleStatistics().

SCIP_Longint SCIPbranchruleGetNCutoffs ( SCIP_BRANCHRULE branchrule)

gets the total number of times, the branching rule detected a cutoff

Parameters
branchrulebranching rule

Definition at line 2027 of file branch.c.

References SCIP_Branchrule::ncutoffs, and NULL.

Referenced by printBranchruleStatistics().

SCIP_Longint SCIPbranchruleGetNCutsFound ( SCIP_BRANCHRULE branchrule)

gets the total number of cuts, the branching rule separated

Parameters
branchrulebranching rule

Definition at line 2037 of file branch.c.

References SCIP_Branchrule::ncutsfound, and NULL.

Referenced by printBranchruleStatistics().

SCIP_Longint SCIPbranchruleGetNConssFound ( SCIP_BRANCHRULE branchrule)

gets the total number of constraints, the branching rule added to the respective local nodes (not counting constraints that were added to the child nodes as branching decisions)

Parameters
branchrulebranching rule

Definition at line 2049 of file branch.c.

References SCIP_Branchrule::nconssfound, and NULL.

Referenced by printBranchruleStatistics().

SCIP_Longint SCIPbranchruleGetNDomredsFound ( SCIP_BRANCHRULE branchrule)

gets the total number of domain reductions, the branching rule found

Parameters
branchrulebranching rule

Definition at line 2059 of file branch.c.

References SCIP_Branchrule::ndomredsfound, and NULL.

Referenced by printBranchruleStatistics().

SCIP_Longint SCIPbranchruleGetNChildren ( SCIP_BRANCHRULE branchrule)

gets the total number of children, the branching rule created

Parameters
branchrulebranching rule

Definition at line 2069 of file branch.c.

References SCIP_Branchrule::nchildren, and NULL.

Referenced by displayRelevantStats(), and printBranchruleStatistics().

SCIP_Bool SCIPbranchruleIsInitialized ( SCIP_BRANCHRULE branchrule)

is branching rule initialized?

Parameters
branchrulebranching rule

Definition at line 2079 of file branch.c.

References SCIP_Branchrule::initialized, and NULL.

Referenced by SCIPsetFindNodesel().

SCIP_Real SCIPbranchGetScoreMultiple ( SCIP_SET set,
SCIP_VAR var,
int  nchildren,
SCIP_Real gains 
)

calculates the branching score out of the gain predictions for a branching with arbitrary many children

Parameters
setglobal SCIP settings
varvariable, of which the branching factor should be applied, or NULL
nchildrennumber of children that the branching will create
gainsprediction of objective gain for each child

Definition at line 2146 of file branch.c.

References NULL, SCIP_Real, SCIPbranchGetScore(), and SCIPsetInfinity().

Referenced by SCIPgetBranchScoreMultiple().

SCIP_Real SCIPbranchGetBranchingPoint ( SCIP_SET set,
SCIP_TREE tree,
SCIP_VAR var,
SCIP_Real  suggestion 
)

computes a branching point for a (not necessarily discrete) variable a suggested branching point is first projected onto the box if no point is suggested, then the value in the current LP or pseudo solution is used if this value is at infinity, then 0.0 projected onto the bounds and then moved inside the interval is used for a discrete variable, it is ensured that the returned value is fractional for a continuous variable, the parameter branching/clamp defines how far a branching point need to be from the bounds of a variable the latter is only applied if no point has been suggested, or the suggested point is not inside the variable's interval

Parameters
setglobal SCIP settings
treebranch and bound tree
varvariable, of which the branching point should be computed
suggestionsuggestion for branching point, or SCIP_INVALID if no suggestion

Definition at line 2184 of file branch.c.

References MAX, MIN, NULL, REALABS, SCIP_INVALID, SCIP_Real, SCIP_VARTYPE_CONTINUOUS, SCIP_VARTYPE_IMPLINT, SCIPABORT, SCIPerrorMessage, SCIPrelDiff(), SCIPsetEpsilon(), SCIPsetFloor(), SCIPsetInfinity(), SCIPsetIsEQ(), SCIPsetIsFeasNegative(), SCIPsetIsFeasPositive(), SCIPsetIsFeasZero(), SCIPsetIsGE(), SCIPsetIsInfinity(), SCIPsetIsIntegral(), SCIPsetIsLE(), SCIPsetIsNegative(), SCIPsetIsPositive(), SCIPsetIsRelGT(), SCIPsetIsRelLT(), SCIPsetRound(), SCIPtreeHasCurrentNodeLP(), SCIPvarGetLbLocal(), SCIPvarGetSol(), SCIPvarGetType(), and SCIPvarGetUbLocal().

Referenced by SCIPbranchExecExtern(), and SCIPgetBranchingPoint().

SCIP_RETCODE SCIPbranchExecLP ( 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_SEPASTORE sepastore,
SCIP_BRANCHCAND branchcand,
SCIP_EVENTQUEUE eventqueue,
SCIP_Real  cutoffbound,
SCIP_Bool  allowaddcons,
SCIP_RESULT result 
)

calls branching rules to branch on an LP solution; if no fractional variables exist, the result is SCIP_DIDNOTRUN; if the branch priority of an unfixed variable is larger than the maximal branch priority of the fractional variables, pseudo solution branching is applied on the unfixed variables with maximal branch priority

Parameters
blkmemblock memory for parameter settings
setglobal SCIP settings
statproblem statistics
transprobtransformed problem after presolve
origproboriginal problem
treebranch and bound tree
reoptreoptimization data structure
lpcurrent LP data
sepastoreseparation storage
branchcandbranching candidate storage
eventqueueevent queue
cutoffboundglobal upper cutoff bound
allowaddconsshould adding constraints be allowed to avoid a branching?
resultpointer to store the result of the branching (s. branch.h)

Definition at line 2384 of file branch.c.

References branchcandCalcLPCands(), SCIP_BranchCand::lpcands, SCIP_BranchCand::lpmaxpriority, SCIP_BranchCand::nimpllpfracs, SCIP_BranchCand::nlpcands, SCIP_BranchCand::npriolpcands, NULL, SCIP_BranchCand::pseudomaxpriority, SCIP_BRANCHED, SCIP_CALL, SCIP_DIDNOTFIND, SCIP_DIDNOTRUN, SCIP_INVALID, SCIP_OKAY, SCIP_Real, SCIP_REAL_MIN, SCIP_VARTYPE_CONTINUOUS, SCIP_VARTYPE_IMPLINT, SCIPbranchExecPseudo(), SCIPbranchruleExecLPSol(), SCIPdebugMessage, SCIPsetIsEQ(), SCIPsetSortBranchrules(), SCIPtreeBranchVar(), SCIPvarGetBranchFactor(), SCIPvarGetBranchPriority(), SCIPvarGetLbLocal(), SCIPvarGetType(), and SCIPvarGetUbLocal().

Referenced by SCIPbranchLP(), and solveNode().

SCIP_RETCODE SCIPbranchExecExtern ( 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_SEPASTORE sepastore,
SCIP_BRANCHCAND branchcand,
SCIP_EVENTQUEUE eventqueue,
SCIP_Real  cutoffbound,
SCIP_Bool  allowaddcons,
SCIP_RESULT result 
)

calls branching rules to branch on an external solution; if no external branching candidates exist, the result is SCIP_DIDNOTRUN

Parameters
blkmemblock memory for parameter settings
setglobal SCIP settings
statproblem statistics
transprobtransformed problem after presolve
origproboriginal problem
treebranch and bound tree
reoptreoptimization data structure
lpcurrent LP data
sepastoreseparation storage
branchcandbranching candidate storage
eventqueueevent queue
cutoffboundglobal upper cutoff bound
allowaddconsshould adding constraints be allowed to avoid a branching?
resultpointer to store the result of the branching (s. branch.h)

Definition at line 2486 of file branch.c.

References SCIP_BranchCand::externcands, SCIP_BranchCand::externcandssol, SCIP_BranchCand::externmaxpriority, SCIP_BranchCand::nexterncands, SCIP_BranchCand::nprioexterncands, NULL, SCIP_BranchCand::pseudomaxpriority, SCIP_BRANCHED, SCIP_CALL, SCIP_DIDNOTFIND, SCIP_DIDNOTRUN, SCIP_OKAY, SCIP_Real, SCIP_REAL_MIN, SCIPbranchExecPseudo(), SCIPbranchGetBranchingPoint(), SCIPbranchruleExecExternSol(), SCIPdebugMessage, SCIPsetInfinity(), SCIPsetIsEQ(), SCIPsetIsInfinity(), SCIPsetIsLT(), SCIPsetSortBranchrules(), SCIPtreeBranchVar(), SCIPvarGetBranchFactor(), SCIPvarGetBranchPriority(), SCIPvarGetLbLocal(), SCIPvarGetName(), and SCIPvarGetUbLocal().

Referenced by SCIPbranchExtern(), and solveNode().

SCIP_RETCODE SCIPbranchExecPseudo ( 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_Real  cutoffbound,
SCIP_Bool  allowaddcons,
SCIP_RESULT result 
)

calls branching rules to branch on a pseudo solution; if no unfixed variables exist, the result is SCIP_DIDNOTRUN

Parameters
blkmemblock memory for parameter settings
setglobal SCIP settings
statproblem statistics
transprobtransformed problem after presolve
origproboriginal problem
treebranch and bound tree
reoptreoptimization data structure
lpcurrent LP data
branchcandbranching candidate storage
eventqueueevent queue
cutoffboundglobal upper cutoff bound
allowaddconsshould adding constraints be allowed to avoid a branching?
resultpointer to store the result of the branching (s. branch.h)

Definition at line 2608 of file branch.c.

References SCIP_BranchCand::npseudocands, NULL, SCIP_BranchCand::pseudocands, SCIP_BRANCHED, SCIP_CALL, SCIP_DIDNOTFIND, SCIP_DIDNOTRUN, SCIP_INVALID, SCIP_OKAY, SCIP_Real, SCIP_REAL_MIN, SCIP_VARTYPE_CONTINUOUS, SCIPbranchruleExecPseudoSol(), SCIPdebugMessage, SCIPsetIsEQ(), SCIPsetSortBranchrules(), SCIPtreeBranchVar(), SCIPvarGetBranchFactor(), SCIPvarGetBranchPriority(), SCIPvarGetLbLocal(), SCIPvarGetType(), and SCIPvarGetUbLocal().

Referenced by SCIPbranchExecExtern(), SCIPbranchExecLP(), SCIPbranchPseudo(), SCIPsolveCIP(), and solveNode().