methods for branching rules and branching candidate storage
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/solve.h"#include "scip/struct_branch.h"Go to the source code of this file.
|
static |
ensures, that lpcands array can store at least num entries
| branchcand | branching candidate storage |
| set | global SCIP settings |
| num | minimum number of entries to store |
Definition at line 65 of file branch.c.
References assert(), BMSreallocMemoryArray, ensureLpcandsSize(), SCIP_BranchCand::lpcands, SCIP_BranchCand::lpcandsfrac, SCIP_BranchCand::lpcandssize, SCIP_BranchCand::lpcandssol, SCIP_BranchCand::nlpcands, SCIP_ALLOC, SCIP_OKAY, and SCIPsetCalcMemGrowSize().
Referenced by branchcandCalcLPCands(), branchcandCalcLPCandsExact(), and ensureLpcandsSize().
|
static |
ensures, that pseudocands array can store at least num entries
| branchcand | branching candidate storage |
| set | global SCIP settings |
| num | minimum number of entries to store |
Definition at line 90 of file branch.c.
References assert(), BMSreallocMemoryArray, ensurePseudocandsSize(), SCIP_BranchCand::npseudocands, SCIP_BranchCand::pseudocands, SCIP_BranchCand::pseudocandssize, SCIP_ALLOC, SCIP_OKAY, and SCIPsetCalcMemGrowSize().
Referenced by ensurePseudocandsSize(), and SCIPbranchcandUpdateVar().
|
static |
ensures, that externcands array can store at least num entries
| branchcand | branching candidate storage |
| set | global SCIP settings |
| num | minimum number of entries to store |
Definition at line 113 of file branch.c.
References assert(), BMSreallocMemoryArray, ensureExterncandsSize(), SCIP_BranchCand::externcands, SCIP_BranchCand::externcandsscore, SCIP_BranchCand::externcandssize, SCIP_BranchCand::externcandssol, SCIP_BranchCand::nexterncands, SCIP_ALLOC, SCIP_OKAY, and SCIPsetCalcMemGrowSize().
Referenced by ensureExterncandsSize(), and SCIPbranchcandAddExternCand().
| SCIP_RETCODE SCIPbranchcandCreate | ( | SCIP_BRANCHCAND ** | branchcand | ) |
creates a branching candidate storage
| branchcand | pointer to store branching candidate storage |
Definition at line 143 of file branch.c.
References assert(), BMSallocMemory, NULL, SCIP_ALLOC, SCIP_OKAY, SCIPbranchcandCreate(), and SCIPbranchcandInvalidate().
Referenced by SCIPbranchcandCreate(), and SCIPtransformProb().
| SCIP_RETCODE SCIPbranchcandFree | ( | SCIP_BRANCHCAND ** | branchcand | ) |
frees branching candidate storage
| branchcand | pointer to store branching candidate storage |
Definition at line 184 of file branch.c.
References assert(), BMSfreeMemory, BMSfreeMemoryArrayNull, NULL, SCIP_OKAY, and SCIPbranchcandFree().
Referenced by freeTransform(), freeTransforming(), and SCIPbranchcandFree().
| void SCIPbranchcandInvalidate | ( | SCIP_BRANCHCAND * | branchcand | ) |
resets branching candidates storage
invalidates branching candidates storage
| branchcand | pointer to store branching candidate storage |
Definition at line 203 of file branch.c.
References assert(), NULL, SCIPbranchcandInvalidate(), and SCIP_BranchCand::validlpcandslp.
Referenced by prepareReoptimization(), SCIPbranchcandCreate(), and SCIPbranchcandInvalidate().
|
static |
calculates branching candidates for LP solution branching (fractional variables)
| branchcand | branching candidate storage |
| set | global SCIP settings |
| stat | problem statistics |
| lp | current LP data |
Definition at line 214 of file branch.c.
References assert(), branchcandCalcLPCands(), c, ensureLpcandsSize(), frac, SCIP_Col::lb, SCIP_BranchCand::lpcands, SCIP_BranchCand::lpcandsfrac, SCIP_BranchCand::lpcandssol, SCIP_Stat::lpcount, SCIP_Col::lpipos, SCIP_BranchCand::lpmaxpriority, SCIP_Col::lppos, SCIP_BranchCand::nenfoimpllpfracs, SCIP_BranchCand::nimpllpfracs, SCIP_BranchCand::nlpcands, SCIP_BranchCand::npriolpbins, SCIP_BranchCand::npriolpcands, NULL, primsol, REALABS, SCIP_CALL, SCIP_IMPLINTTYPE_NONE, SCIP_INVALID, SCIP_LONGINT_FORMAT, SCIP_LPSOLSTAT_OPTIMAL, SCIP_LPSOLSTAT_UNBOUNDEDRAY, SCIP_OKAY, SCIP_Real, SCIP_VARSTATUS_COLUMN, SCIP_VARTYPE_BINARY, SCIP_VARTYPE_CONTINUOUS, SCIPcolGetPrimsol(), SCIPlpGetCols(), SCIPlpGetNCols(), SCIPlpGetSolstat(), SCIPsetDebugMsg, SCIPsetFeasFrac(), SCIPsetFeastol(), SCIPsetIsFeasFracIntegral(), SCIPsetIsFeasGE(), SCIPsetIsFeasLE(), SCIPsetIsGE(), SCIPsetIsInfinity(), SCIPvarGetBranchPriority(), SCIPvarGetCol(), SCIPvarGetImplType(), SCIPvarGetLbLocal(), SCIPvarGetName(), SCIPvarGetStatus(), SCIPvarGetType(), SCIPvarGetUbLocal(), SCIPvarIsImpliedIntegral(), SCIP_Lp::solved, SCIP_Col::ub, SCIP_BranchCand::validlpcandslp, SCIP_Col::var, and var.
Referenced by branchcandCalcLPCands(), SCIPbranchcandGetLPCands(), and SCIPbranchExecLP().
| 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)
| branchcand | branching candidate storage |
| set | global SCIP settings |
| stat | problem statistics |
| lp | current LP data |
| lpcands | pointer to store the array of LP branching candidates, or NULL |
| lpcandssol | pointer to store the array of LP candidate solution values, or NULL |
| lpcandsfrac | pointer to store the array of LP candidate fractionalities, or NULL |
| nlpcands | pointer to store the number of LP branching candidates, or NULL |
| npriolpcands | pointer to store the number of candidates with maximal priority, or NULL |
| nfracimplvars | pointer to store the number of fractional continuous implied integral variables, or NULL |
Definition at line 425 of file branch.c.
References branchcandCalcLPCands(), lpcands, SCIP_BranchCand::lpcands, lpcandsfrac, SCIP_BranchCand::lpcandsfrac, lpcandssol, SCIP_BranchCand::lpcandssol, SCIP_BranchCand::nenfoimpllpfracs, SCIP_BranchCand::nimpllpfracs, nlpcands, SCIP_BranchCand::nlpcands, SCIP_BranchCand::npriolpbins, SCIP_BranchCand::npriolpcands, NULL, SCIP_CALL, SCIP_OKAY, SCIP_Real, and SCIPbranchcandGetLPCands().
Referenced by priceAndCutLoop(), SCIPbranchcandGetLPCands(), 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
| branchcand | branching candidate storage |
| externcands | pointer to store the array of external branching candidates, or NULL |
| externcandssol | pointer to store the array of external candidate solution values, or NULL |
| externcandsscore | pointer to store the array of external candidate scores, or NULL |
| nexterncands | pointer to store the number of external branching candidates, or NULL |
| nprioexterncands | pointer to store the number of candidates with maximal priority, or NULL |
| nprioexternbins | pointer to store the number of binary candidates with maximal priority, or NULL |
| nprioexternints | pointer to store the number of integer candidates with maximal priority, or NULL |
| nprioexternimpls | pointer to store the number of implicit integer candidates with maximal priority, or NULL |
Definition at line 460 of file branch.c.
References assert(), 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, SCIP_OKAY, SCIP_Real, and SCIPbranchcandGetExternCands().
Referenced by SCIPbranchcandGetExternCands(), and SCIPgetExternBranchCands().
| int SCIPbranchcandGetLPMaxPrio | ( | SCIP_BRANCHCAND * | branchcand | ) |
gets maximal branching priority of LP branching candidates
| branchcand | branching candidate storage |
Definition at line 497 of file branch.c.
References assert(), SCIP_BranchCand::lpmaxpriority, NULL, and SCIPbranchcandGetLPMaxPrio().
Referenced by SCIPbranchcandGetLPMaxPrio(), and solveNode().
| int SCIPbranchcandGetNPrioLPCands | ( | SCIP_BRANCHCAND * | branchcand | ) |
gets number of LP branching candidates with maximal branch priority
| branchcand | branching candidate storage |
Definition at line 507 of file branch.c.
References assert(), SCIP_BranchCand::npriolpcands, NULL, and SCIPbranchcandGetNPrioLPCands().
Referenced by SCIPbranchcandGetNPrioLPCands(), and solveNode().
| int SCIPbranchcandGetExternMaxPrio | ( | SCIP_BRANCHCAND * | branchcand | ) |
gets maximal branching priority of external branching candidates
| branchcand | branching candidate storage |
Definition at line 517 of file branch.c.
References assert(), SCIP_BranchCand::externmaxpriority, NULL, and SCIPbranchcandGetExternMaxPrio().
Referenced by SCIPbranchcandGetExternMaxPrio(), and solveNode().
| int SCIPbranchcandGetNExternCands | ( | SCIP_BRANCHCAND * | branchcand | ) |
gets number of external branching candidates
| branchcand | branching candidate storage |
Definition at line 527 of file branch.c.
References assert(), SCIP_BranchCand::nexterncands, NULL, and SCIPbranchcandGetNExternCands().
Referenced by SCIPbranchcandGetNExternCands(), SCIPgetNExternBranchCands(), and solveNode().
| int SCIPbranchcandGetNPrioExternCands | ( | SCIP_BRANCHCAND * | branchcand | ) |
gets number of external branching candidates with maximal branch priority
| branchcand | branching candidate storage |
Definition at line 537 of file branch.c.
References assert(), SCIP_BranchCand::nprioexterncands, NULL, and SCIPbranchcandGetNPrioExternCands().
Referenced by SCIPbranchcandGetNPrioExternCands(), SCIPgetNPrioExternBranchCands(), and solveNode().
| int SCIPbranchcandGetNPrioExternBins | ( | SCIP_BRANCHCAND * | branchcand | ) |
gets number of binary external branching candidates with maximal branch priority
| branchcand | branching candidate storage |
Definition at line 547 of file branch.c.
References assert(), SCIP_BranchCand::nprioexternbins, NULL, and SCIPbranchcandGetNPrioExternBins().
Referenced by SCIPbranchcandGetNPrioExternBins(), and SCIPgetNPrioExternBranchBins().
| int SCIPbranchcandGetNPrioExternInts | ( | SCIP_BRANCHCAND * | branchcand | ) |
gets number of integer external branching candidates with maximal branch priority
| branchcand | branching candidate storage |
Definition at line 557 of file branch.c.
References assert(), SCIP_BranchCand::nprioexternints, NULL, and SCIPbranchcandGetNPrioExternInts().
Referenced by SCIPbranchcandGetNPrioExternInts(), and SCIPgetNPrioExternBranchInts().
| int SCIPbranchcandGetNPrioExternImpls | ( | SCIP_BRANCHCAND * | branchcand | ) |
gets number of implicit integer external branching candidates with maximal branch priority
| branchcand | branching candidate storage |
Definition at line 567 of file branch.c.
References assert(), SCIP_BranchCand::nprioexternimpls, NULL, and SCIPbranchcandGetNPrioExternImpls().
Referenced by SCIPbranchcandGetNPrioExternImpls(), and SCIPgetNPrioExternBranchImpls().
| int SCIPbranchcandGetNPrioExternConts | ( | SCIP_BRANCHCAND * | branchcand | ) |
gets number of continuous external branching candidates with maximal branch priority
| branchcand | branching candidate storage |
Definition at line 577 of file branch.c.
References assert(), SCIP_BranchCand::nprioexternbins, SCIP_BranchCand::nprioexterncands, SCIP_BranchCand::nprioexternimpls, SCIP_BranchCand::nprioexternints, NULL, and SCIPbranchcandGetNPrioExternConts().
Referenced by SCIPbranchcandGetNPrioExternConts(), and 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
| branchcand | branching candidate storage |
| set | global SCIP settings |
| var | variable to insert |
| score | score of external candidate, e.g. infeasibility |
| solval | value of the variable in the current solution |
Definition at line 589 of file branch.c.
References assert(), 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_IMPLINTTYPE_NONE, SCIP_OKAY, SCIP_Real, SCIP_VARSTATUS_MULTAGGR, SCIP_VARTYPE_BINARY, SCIP_VARTYPE_CONTINUOUS, SCIP_VARTYPE_INTEGER, SCIPbranchcandAddExternCand(), SCIPsetCeil(), SCIPsetDebugMsg, SCIPsetFloor(), SCIPsetIsEQ(), SCIPvarGetBranchPriority(), SCIPvarGetImplType(), SCIPvarGetLbLocal(), SCIPvarGetMultaggrLbLocal(), SCIPvarGetMultaggrUbLocal(), SCIPvarGetName(), SCIPvarGetStatus(), SCIPvarGetType(), SCIPvarGetUbLocal(), and var.
Referenced by SCIPaddExternBranchCand(), and SCIPbranchcandAddExternCand().
| void SCIPbranchcandClearExternCands | ( | SCIP_BRANCHCAND * | branchcand | ) |
removes all external candidates from the storage for external branching
| branchcand | branching candidate storage |
Definition at line 722 of file branch.c.
References assert(), SCIP_BranchCand::externmaxpriority, SCIP_BranchCand::nexterncands, SCIP_BranchCand::nprioexternbins, SCIP_BranchCand::nprioexterncands, SCIP_BranchCand::nprioexternimpls, SCIP_BranchCand::nprioexternints, NULL, and SCIPbranchcandClearExternCands().
Referenced by propAndSolve(), SCIPbranchcandClearExternCands(), SCIPclearExternBranchCands(), and solveNode().
| SCIP_Bool SCIPbranchcandContainsExternCand | ( | SCIP_BRANCHCAND * | branchcand, |
| SCIP_VAR * | var ) |
checks whether the given variable is contained in the candidate storage for external branching
| branchcand | branching candidate storage |
| var | variable to look for |
Definition at line 737 of file branch.c.
References assert(), SCIP_BranchCand::externcands, SCIP_BranchCand::externcandssize, SCIP_BranchCand::externmaxpriority, FALSE, i, SCIP_BranchCand::nexterncands, SCIP_BranchCand::nprioexternbins, SCIP_BranchCand::nprioexterncands, SCIP_BranchCand::nprioexternimpls, SCIP_BranchCand::nprioexternints, NULL, SCIP_Bool, SCIP_VARTYPE_BINARY, SCIP_VARTYPE_CONTINUOUS, SCIP_VARTYPE_INTEGER, SCIPbranchcandContainsExternCand(), SCIPvarGetBranchPriority(), SCIPvarGetType(), SCIPvarIsImpliedIntegral(), TRUE, and var.
Referenced by SCIPbranchcandContainsExternCand(), and SCIPcontainsExternBranchCand().
| 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)
| branchcand | branching candidate storage |
| set | global SCIP settings |
| prob | problem data |
| pseudocands | pointer to store the array of pseudo branching candidates, or NULL |
| npseudocands | pointer to store the number of pseudo branching candidates, or NULL |
| npriopseudocands | pointer to store the number of candidates with maximal priority, or NULL |
Definition at line 813 of file branch.c.
References assert(), SCIP_Var::branchpriority, SCIP_BranchCand::npriopseudobins, SCIP_BranchCand::npriopseudocands, SCIP_BranchCand::npseudocands, NULL, SCIP_Var::pseudocandindex, pseudocands, SCIP_BranchCand::pseudocands, SCIP_BranchCand::pseudomaxpriority, SCIP_OKAY, SCIP_VARSTATUS_COLUMN, SCIP_VARSTATUS_LOOSE, SCIPbranchcandGetPseudoCands(), SCIPprobGetNBinVars(), SCIPprobGetNImplVars(), SCIPprobGetNIntVars(), SCIPprobGetVars(), SCIPsetIsFeasIntegral(), SCIPsetIsLE(), SCIPsetIsLT(), SCIPvarGetLbLocal(), SCIPvarGetStatus(), SCIPvarGetUbLocal(), SCIPvarIsIntegral(), and var.
Referenced by SCIPbranchcandGetPseudoCands(), and SCIPgetPseudoBranchCands().
| int SCIPbranchcandGetNPseudoCands | ( | SCIP_BRANCHCAND * | branchcand | ) |
gets number of branching candidates for pseudo solution branching (non-fixed variables)
| branchcand | branching candidate storage |
Definition at line 875 of file branch.c.
References assert(), SCIP_BranchCand::npseudocands, NULL, and SCIPbranchcandGetNPseudoCands().
Referenced by propAndSolve(), SCIPbranchcandGetNPseudoCands(), SCIPconshdlrEnforcePseudoSol(), SCIPgetNPseudoBranchCands(), SCIPsolveCIP(), and solveNode().
| int SCIPbranchcandGetNPrioPseudoCands | ( | SCIP_BRANCHCAND * | branchcand | ) |
gets number of branching candidates with maximal branch priority for pseudo solution branching
| branchcand | branching candidate storage |
Definition at line 885 of file branch.c.
References assert(), SCIP_BranchCand::npriopseudocands, NULL, and SCIPbranchcandGetNPrioPseudoCands().
Referenced by SCIPbranchcandGetNPrioPseudoCands(), and SCIPgetNPrioPseudoBranchCands().
| int SCIPbranchcandGetNPrioPseudoBins | ( | SCIP_BRANCHCAND * | branchcand | ) |
gets number of binary branching candidates with maximal branch priority for pseudo solution branching
| branchcand | branching candidate storage |
Definition at line 895 of file branch.c.
References assert(), SCIP_BranchCand::npriopseudobins, NULL, and SCIPbranchcandGetNPrioPseudoBins().
Referenced by SCIPbranchcandGetNPrioPseudoBins(), and SCIPgetNPrioPseudoBranchBins().
| int SCIPbranchcandGetNPrioPseudoInts | ( | SCIP_BRANCHCAND * | branchcand | ) |
gets number of integer branching candidates with maximal branch priority for pseudo solution branching
| branchcand | branching candidate storage |
Definition at line 905 of file branch.c.
References assert(), SCIP_BranchCand::npriopseudoints, NULL, and SCIPbranchcandGetNPrioPseudoInts().
Referenced by SCIPbranchcandGetNPrioPseudoInts(), and SCIPgetNPrioPseudoBranchInts().
| int SCIPbranchcandGetNPrioPseudoImpls | ( | SCIP_BRANCHCAND * | branchcand | ) |
gets number of implicit integer branching candidates with maximal branch priority for pseudo solution branching
| branchcand | branching candidate storage |
Definition at line 915 of file branch.c.
References assert(), SCIP_BranchCand::npriopseudobins, SCIP_BranchCand::npriopseudocands, SCIP_BranchCand::npriopseudoints, NULL, and SCIPbranchcandGetNPrioPseudoImpls().
Referenced by SCIPbranchcandGetNPrioPseudoImpls(), and SCIPgetNPrioPseudoBranchImpls().
|
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
| branchcand | branching candidate storage |
| var | variable to insert |
| insertpos | free position to insert the variable |
Definition at line 928 of file branch.c.
References assert(), branchcandInsertPseudoCand(), 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_IMPLINTTYPE_NONE, SCIP_VARTYPE_BINARY, SCIP_VARTYPE_CONTINUOUS, SCIP_VARTYPE_INTEGER, SCIPdebugMessage, SCIPvarGetBranchPriority(), SCIPvarGetImplType(), SCIPvarGetName(), SCIPvarGetType(), and var.
Referenced by branchcandInsertPseudoCand(), branchcandSortPseudoCands(), and SCIPbranchcandUpdateVar().
|
static |
sorts the pseudo branching candidates, such that the candidates of maximal priority are at the front, ordered by binaries, integers, implicit integers
| branchcand | branching candidate storage |
Definition at line 1028 of file branch.c.
References assert(), branchcandInsertPseudoCand(), branchcandSortPseudoCands(), SCIP_Var::branchpriority, i, SCIP_BranchCand::npriopseudobins, SCIP_BranchCand::npriopseudocands, SCIP_BranchCand::npriopseudoints, SCIP_BranchCand::npseudocands, NULL, SCIP_Var::pseudocandindex, SCIP_BranchCand::pseudocands, SCIP_BranchCand::pseudomaxpriority, SCIPdebugMessage, SCIPvarGetBranchPriority(), and var.
Referenced by branchcandRemovePseudoCand(), and branchcandSortPseudoCands().
|
static |
removes pseudo candidate from pseudocands array
| branchcand | branching candidate storage |
| var | variable to remove |
Definition at line 1067 of file branch.c.
References assert(), branchcandRemovePseudoCand(), branchcandSortPseudoCands(), SCIP_BranchCand::npriopseudobins, SCIP_BranchCand::npriopseudocands, SCIP_BranchCand::npriopseudoints, SCIP_BranchCand::npseudocands, NULL, SCIP_Var::pseudocandindex, SCIP_BranchCand::pseudocands, SCIP_BranchCand::pseudomaxpriority, SCIP_VARTYPE_BINARY, SCIPdebugMessage, SCIPvarGetBranchPriority(), SCIPvarGetName(), SCIPvarGetType(), SCIPvarIsImpliedIntegral(), SCIPvarIsNonimpliedIntegral(), and var.
Referenced by branchcandRemovePseudoCand(), and SCIPbranchcandRemoveVar().
| SCIP_RETCODE SCIPbranchcandRemoveVar | ( | SCIP_BRANCHCAND * | branchcand, |
| SCIP_VAR * | var ) |
removes variable from branching candidate list
| branchcand | branching candidate storage |
| var | variable that changed its bounds |
Definition at line 1152 of file branch.c.
References assert(), branchcandRemovePseudoCand(), NULL, SCIP_Var::pseudocandindex, SCIP_OKAY, SCIPbranchcandRemoveVar(), and var.
Referenced by SCIPbranchcandRemoveVar(), SCIPbranchcandUpdateVar(), SCIPbranchcandUpdateVarBranchPriority(), SCIPprobChgVarImplType(), SCIPprobChgVarType(), and SCIPprobPerformVarDeletions().
| SCIP_RETCODE SCIPbranchcandUpdateVar | ( | SCIP_BRANCHCAND * | branchcand, |
| SCIP_SET * | set, | ||
| SCIP_VAR * | var ) |
updates branching candidate list for a given variable
| branchcand | branching candidate storage |
| set | global SCIP settings |
| var | variable that changed its bounds |
Definition at line 1169 of file branch.c.
References assert(), branchcandInsertPseudoCand(), ensurePseudocandsSize(), SCIP_BranchCand::npseudocands, NULL, SCIP_Var::pseudocandindex, SCIP_CALL, SCIP_OKAY, SCIP_VARSTATUS_AGGREGATED, SCIP_VARSTATUS_COLUMN, SCIP_VARSTATUS_FIXED, SCIP_VARSTATUS_LOOSE, SCIP_VARSTATUS_MULTAGGR, SCIP_VARSTATUS_NEGATED, SCIP_VARSTATUS_ORIGINAL, SCIPbranchcandRemoveVar(), SCIPbranchcandUpdateVar(), SCIPsetIsGE(), SCIPsetIsLT(), SCIPvarGetLbLocal(), SCIPvarGetStatus(), SCIPvarGetUbLocal(), SCIPvarIsIntegral(), and var.
Referenced by SCIPbranchcandUpdateVar(), SCIPbranchcandUpdateVarBranchPriority(), SCIPeventProcess(), SCIPprobAddVar(), SCIPprobChgVarImplType(), SCIPprobChgVarType(), and SCIPprobVarChangedStatus().
| SCIP_RETCODE SCIPbranchcandUpdateVarBranchPriority | ( | SCIP_BRANCHCAND * | branchcand, |
| SCIP_SET * | set, | ||
| SCIP_VAR * | var, | ||
| int | branchpriority ) |
updates branching priority of the given variable and update the pseudo candidate array if needed
| branchcand | branching candidate storage |
| set | global SCIP settings |
| var | variable that changed its bounds |
| branchpriority | branch priority of the variable |
Definition at line 1209 of file branch.c.
References assert(), NULL, SCIP_Var::pseudocandindex, SCIP_BranchCand::pseudomaxpriority, SCIP_CALL, SCIP_OKAY, SCIPbranchcandRemoveVar(), SCIPbranchcandUpdateVar(), SCIPbranchcandUpdateVarBranchPriority(), SCIPvarChgBranchPriority(), SCIPvarGetBranchPriority(), and var.
Referenced by SCIPbranchcandUpdateVarBranchPriority(), and SCIPchgVarBranchPriority().
|
static |
method to call, when the priority of a branching rule was changed
Definition at line 1266 of file branch.c.
References assert(), NULL, SCIP_CALL, SCIP_DECL_PARAMCHGD, SCIP_OKAY, SCIPparamGetData(), SCIPparamGetInt(), and SCIPsetBranchrulePriority().
| SCIP_RETCODE SCIPbranchruleCopyInclude | ( | SCIP_BRANCHRULE * | branchrule, |
| SCIP_SET * | set ) |
copies the given branchrule to a new scip
Definition at line 1280 of file branch.c.
References assert(), NULL, SCIP_CALL, SCIP_OKAY, SCIPbranchruleCopyInclude(), SCIPbranchruleGetName(), and SCIPsetDebugMsg.
Referenced by SCIPbranchruleCopyInclude(), and SCIPsetCopyPlugins().
|
static |
internal method for creating a branching rule
| branchrule | pointer to store branching rule |
| set | global SCIP settings |
| messagehdlr | message handler |
| blkmem | block memory for parameter settings |
| name | name of branching rule |
| desc | description of branching rule |
| priority | priority of the branching rule |
| maxdepth | maximal depth level, up to which this branching rule should be used (or -1) |
| maxbounddist | maximal 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) |
| - | copy method of branching rule |
| - | destructor of branching rule |
| - | initialize branching rule |
| - | deinitialize branching rule |
| - | solving process initialization method of branching rule |
| - | solving process deinitialization method of branching rule |
| - | branching execution method for fractional LP solutions |
| - | branching execution method for external solutions |
| - | branching execution method for not completely fixed pseudo solutions |
| branchruledata | branching rule data |
Definition at line 1300 of file branch.c.
References assert(), BMSallocMemory, BMSclearMemory, BMSduplicateMemoryArray, doBranchruleCreate(), FALSE, maxdepth, NULL, SCIP_ALLOC, SCIP_CALL, SCIP_CLOCKTYPE_DEFAULT, SCIP_DECL_BRANCHCOPY, SCIP_DECL_BRANCHEXECEXT, SCIP_DECL_BRANCHEXECLP, SCIP_DECL_BRANCHEXECPS, SCIP_DECL_BRANCHEXIT, SCIP_DECL_BRANCHEXITSOL, SCIP_DECL_BRANCHFREE, SCIP_DECL_BRANCHINIT, SCIP_DECL_BRANCHINITSOL, SCIP_MAXSTRLEN, SCIP_MAXTREEDEPTH, SCIP_OKAY, SCIP_Real, SCIPclockCreate(), SCIPsetAddIntParam(), SCIPsetAddRealParam(), and SCIPsnprintf().
Referenced by doBranchruleCreate(), and SCIPbranchruleCreate().
| 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
| branchrule | pointer to store branching rule |
| set | global SCIP settings |
| messagehdlr | message handler |
| blkmem | block memory for parameter settings |
| name | name of branching rule |
| desc | description of branching rule |
| priority | priority of the branching rule |
| maxdepth | maximal depth level, up to which this branching rule should be used (or -1) |
| maxbounddist | maximal 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) |
| - | copy method of branching rule |
| - | destructor of branching rule |
| - | initialize branching rule |
| - | deinitialize branching rule |
| - | solving process initialization method of branching rule |
| - | solving process deinitialization method of branching rule |
| - | branching execution method for fractional LP solutions |
| - | branching execution method for external solutions |
| - | branching execution method for not completely fixed pseudo solutions |
| branchruledata | branching rule data |
Definition at line 1383 of file branch.c.
References assert(), doBranchruleCreate(), maxdepth, NULL, SCIP_CALL_FINALLY, SCIP_DECL_BRANCHCOPY, SCIP_DECL_BRANCHEXECEXT, SCIP_DECL_BRANCHEXECLP, SCIP_DECL_BRANCHEXECPS, SCIP_DECL_BRANCHEXIT, SCIP_DECL_BRANCHEXITSOL, SCIP_DECL_BRANCHFREE, SCIP_DECL_BRANCHINIT, SCIP_DECL_BRANCHINITSOL, SCIP_OKAY, SCIP_Real, SCIPbranchruleCreate(), and SCIPbranchruleFree().
Referenced by SCIPbranchruleCreate(), SCIPincludeBranchrule(), and SCIPincludeBranchruleBasic().
| SCIP_RETCODE SCIPbranchruleFree | ( | SCIP_BRANCHRULE ** | branchrule, |
| SCIP_SET * | set ) |
frees memory of branching rule
| branchrule | pointer to branching rule data structure |
| set | global SCIP settings |
Definition at line 1419 of file branch.c.
References assert(), BMSfreeMemory, BMSfreeMemoryArrayNull, NULL, SCIP_CALL, SCIP_OKAY, SCIPbranchruleFree(), and SCIPclockFree().
Referenced by SCIPbranchruleCreate(), and SCIPbranchruleFree().
| SCIP_RETCODE SCIPbranchruleInit | ( | SCIP_BRANCHRULE * | branchrule, |
| SCIP_SET * | set ) |
initializes branching rule
| branchrule | branching rule |
| set | global SCIP settings |
Definition at line 1446 of file branch.c.
References assert(), SCIP_Branchrule::branchclock, SCIP_Branchrule::initialized, SCIP_Branchrule::name, SCIP_Branchrule::nchildren, SCIP_Branchrule::nconssfound, SCIP_Branchrule::ncutoffs, SCIP_Branchrule::ncutsfound, SCIP_Branchrule::ndomredsfound, SCIP_Branchrule::nexterncalls, SCIP_Branchrule::nlpcalls, SCIP_Branchrule::npseudocalls, NULL, SCIP_CALL, SCIP_INVALIDCALL, SCIP_OKAY, SCIPbranchruleInit(), SCIPclockReset(), SCIPclockStart(), SCIPclockStop(), SCIPerrorMessage, SCIP_Branchrule::setuptime, and TRUE.
Referenced by SCIPbranchruleInit().
| SCIP_RETCODE SCIPbranchruleExit | ( | SCIP_BRANCHRULE * | branchrule, |
| SCIP_SET * | set ) |
deinitializes branching rule
| branchrule | branching rule |
| set | global SCIP settings |
Definition at line 1490 of file branch.c.
References assert(), FALSE, SCIP_Branchrule::initialized, SCIP_Branchrule::name, NULL, SCIP_CALL, SCIP_INVALIDCALL, SCIP_OKAY, SCIPbranchruleExit(), SCIPclockStart(), SCIPclockStop(), SCIPerrorMessage, and SCIP_Branchrule::setuptime.
Referenced by SCIPbranchruleExit().
| SCIP_RETCODE SCIPbranchruleInitsol | ( | SCIP_BRANCHRULE * | branchrule, |
| SCIP_SET * | set ) |
informs branching rule that the branch and bound process is being started
| branchrule | branching rule |
| set | global SCIP settings |
Definition at line 1520 of file branch.c.
References assert(), NULL, SCIP_CALL, SCIP_OKAY, SCIPbranchruleInitsol(), SCIPclockStart(), SCIPclockStop(), and SCIP_Branchrule::setuptime.
Referenced by SCIPbranchruleInitsol().
| SCIP_RETCODE SCIPbranchruleExitsol | ( | SCIP_BRANCHRULE * | branchrule, |
| SCIP_SET * | set ) |
informs branching rule that the branch and bound process data is being freed
| branchrule | branching rule |
| set | global SCIP settings |
Definition at line 1544 of file branch.c.
References assert(), NULL, SCIP_CALL, SCIP_OKAY, SCIPbranchruleExitsol(), SCIPclockStart(), SCIPclockStop(), and SCIP_Branchrule::setuptime.
Referenced by SCIPbranchruleExitsol().
| 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 ) |
executes branching rule for fractional LP solution
| branchrule | branching rule |
| set | global SCIP settings |
| stat | problem statistics |
| tree | branch and bound tree |
| sepastore | separation storage |
| cutoffbound | global upper cutoff bound |
| allowaddcons | should adding constraints be allowed to avoid a branching? |
| result | pointer to store the result of the callback method |
Definition at line 1568 of file branch.c.
References assert(), SCIP_Branchrule::branchclock, SCIP_Branchrule::exact, SCIP_Tree::focusnode, SCIP_Branchrule::maxbounddist, SCIP_Branchrule::maxdepth, SCIP_Stat::nactiveconssadded, SCIP_Branchrule::name, SCIP_Stat::nboundchgs, SCIP_Branchrule::nchildren, SCIP_Tree::nchildren, SCIP_Branchrule::nconssfound, SCIP_Branchrule::ncutoffs, SCIP_Branchrule::ncutsfound, SCIP_Branchrule::ndomredsfound, SCIP_Stat::nholechgs, SCIP_Branchrule::nlpcalls, SCIP_Stat::nprobboundchgs, SCIP_Stat::nprobholechgs, NULL, result, SCIP_Bool, SCIP_BRANCHED, SCIP_CALL, SCIP_CONSADDED, SCIP_CUTOFF, SCIP_DIDNOTFIND, SCIP_DIDNOTRUN, SCIP_INVALIDRESULT, SCIP_Longint, SCIP_OKAY, SCIP_Real, SCIP_REDUCEDDOM, SCIP_SEPARATED, SCIPbranchruleExecLPSol(), SCIPclockStart(), SCIPclockStop(), SCIPerrorMessage, SCIPnodeGetLowerbound(), SCIPsepastoreGetNCuts(), SCIPsetDebugMsg, SCIPsetIsGE(), SCIPsetIsInfinity(), SCIPsetIsLE(), SCIPtreeGetCurrentDepth(), and SCIPtreeGetLowerbound().
Referenced by SCIPbranchExecLP(), and SCIPbranchruleExecLPSol().
| 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 ) |
executes branching rule for external branching candidates
| branchrule | branching rule |
| set | global SCIP settings |
| stat | problem statistics |
| tree | branch and bound tree |
| sepastore | separation storage |
| cutoffbound | global upper cutoff bound |
| allowaddcons | should adding constraints be allowed to avoid a branching? |
| result | pointer to store the result of the callback method |
Definition at line 1676 of file branch.c.
References assert(), SCIP_Branchrule::branchclock, SCIP_Branchrule::exact, SCIP_Tree::focusnode, SCIP_Branchrule::maxbounddist, SCIP_Branchrule::maxdepth, SCIP_Stat::nactiveconss, SCIP_Branchrule::name, SCIP_Stat::nboundchgs, SCIP_Branchrule::nchildren, SCIP_Tree::nchildren, SCIP_Branchrule::nconssfound, SCIP_Branchrule::ncutoffs, SCIP_Branchrule::ncutsfound, SCIP_Branchrule::ndomredsfound, SCIP_Branchrule::nexterncalls, SCIP_Stat::nholechgs, SCIP_Stat::nprobboundchgs, SCIP_Stat::nprobholechgs, NULL, result, SCIP_Bool, SCIP_BRANCHED, SCIP_CALL, SCIP_CONSADDED, SCIP_CUTOFF, SCIP_DIDNOTFIND, SCIP_DIDNOTRUN, SCIP_INVALIDRESULT, SCIP_Longint, SCIP_OKAY, SCIP_Real, SCIP_REDUCEDDOM, SCIP_SEPARATED, SCIPbranchruleExecExternSol(), SCIPclockStart(), SCIPclockStop(), SCIPerrorMessage, SCIPnodeGetLowerbound(), SCIPsepastoreGetNCuts(), SCIPsetDebugMsg, SCIPsetIsGE(), SCIPsetIsInfinity(), SCIPsetIsLE(), SCIPtreeGetCurrentDepth(), and SCIPtreeGetLowerbound().
Referenced by SCIPbranchExecExtern(), and SCIPbranchruleExecExternSol().
| SCIP_RETCODE SCIPbranchruleExecPseudoSol | ( | SCIP_BRANCHRULE * | branchrule, |
| SCIP_SET * | set, | ||
| SCIP_STAT * | stat, | ||
| SCIP_TREE * | tree, | ||
| SCIP_Real | cutoffbound, | ||
| SCIP_Bool | allowaddcons, | ||
| SCIP_RESULT * | result ) |
executes branching rule for not completely fixed pseudo solution
| branchrule | branching rule |
| set | global SCIP settings |
| stat | problem statistics |
| tree | branch and bound tree |
| cutoffbound | global upper cutoff bound |
| allowaddcons | should adding constraints be allowed to avoid a branching? |
| result | pointer to store the result of the callback method |
Definition at line 1784 of file branch.c.
References assert(), SCIP_Branchrule::branchclock, SCIP_Branchrule::exact, SCIP_Tree::focusnode, SCIP_Branchrule::maxbounddist, SCIP_Branchrule::maxdepth, SCIP_Stat::nactiveconss, SCIP_Branchrule::name, SCIP_Stat::nboundchgs, SCIP_Branchrule::nchildren, SCIP_Tree::nchildren, SCIP_Branchrule::nconssfound, SCIP_Branchrule::ncutoffs, SCIP_Branchrule::ndomredsfound, SCIP_Stat::nholechgs, SCIP_Stat::nprobboundchgs, SCIP_Stat::nprobholechgs, SCIP_Branchrule::npseudocalls, NULL, result, SCIP_Bool, SCIP_BRANCHED, SCIP_CALL, SCIP_CONSADDED, SCIP_CUTOFF, SCIP_DIDNOTFIND, SCIP_DIDNOTRUN, SCIP_INVALIDRESULT, SCIP_Longint, SCIP_OKAY, SCIP_Real, SCIP_REDUCEDDOM, SCIPbranchruleExecPseudoSol(), SCIPclockStart(), SCIPclockStop(), SCIPerrorMessage, SCIPnodeGetLowerbound(), SCIPsetDebugMsg, SCIPsetIsGE(), SCIPsetIsInfinity(), SCIPsetIsLE(), SCIPtreeGetCurrentDepth(), and SCIPtreeGetLowerbound().
Referenced by SCIPbranchExecPseudo(), and SCIPbranchruleExecPseudoSol().
| void SCIPbranchruleSetCopy | ( | SCIP_BRANCHRULE * | branchrule | ) |
sets copy method of branching rule
| branchrule | branching rule copy method of branching rule or NULL if you don't want to copy your plugin into sub-SCIPs |
Definition at line 1917 of file branch.c.
References assert(), NULL, SCIP_DECL_BRANCHCOPY, and SCIPbranchruleSetCopy().
Referenced by SCIPbranchruleSetCopy(), and SCIPsetBranchruleCopy().
| void SCIPbranchruleSetFree | ( | SCIP_BRANCHRULE * | branchrule | ) |
sets destructor method of branching rule
| branchrule | branching rule destructor of branching rule |
Definition at line 1928 of file branch.c.
References assert(), NULL, SCIP_DECL_BRANCHFREE, and SCIPbranchruleSetFree().
Referenced by SCIPbranchruleSetFree(), and SCIPsetBranchruleFree().
| void SCIPbranchruleSetInit | ( | SCIP_BRANCHRULE * | branchrule | ) |
sets initialization method of branching rule
| branchrule | branching rule initialize branching rule |
Definition at line 1939 of file branch.c.
References assert(), NULL, SCIP_DECL_BRANCHINIT, and SCIPbranchruleSetInit().
Referenced by SCIPbranchruleSetInit(), and SCIPsetBranchruleInit().
| void SCIPbranchruleSetExit | ( | SCIP_BRANCHRULE * | branchrule | ) |
sets deinitialization method of branching rule
| branchrule | branching rule deinitialize branching rule |
Definition at line 1950 of file branch.c.
References assert(), NULL, SCIP_DECL_BRANCHEXIT, and SCIPbranchruleSetExit().
Referenced by SCIPbranchruleSetExit(), and SCIPsetBranchruleExit().
| void SCIPbranchruleSetInitsol | ( | SCIP_BRANCHRULE * | branchrule | ) |
sets solving process initialization method of branching rule
| branchrule | branching rule solving process initialization method of branching rule |
Definition at line 1961 of file branch.c.
References assert(), NULL, SCIP_DECL_BRANCHINITSOL, and SCIPbranchruleSetInitsol().
Referenced by SCIPbranchruleSetInitsol(), and SCIPsetBranchruleInitsol().
| void SCIPbranchruleSetExitsol | ( | SCIP_BRANCHRULE * | branchrule | ) |
sets solving process deinitialization method of branching rule
| branchrule | branching rule solving process deinitialization method of branching rule |
Definition at line 1972 of file branch.c.
References assert(), NULL, SCIP_DECL_BRANCHEXITSOL, and SCIPbranchruleSetExitsol().
Referenced by SCIPbranchruleSetExitsol(), and SCIPsetBranchruleExitsol().
| void SCIPbranchruleSetExecLp | ( | SCIP_BRANCHRULE * | branchrule | ) |
sets branching execution method for fractional LP solutions
| branchrule | branching rule branching execution method for fractional LP solutions |
Definition at line 1985 of file branch.c.
References assert(), NULL, SCIP_DECL_BRANCHEXECLP, and SCIPbranchruleSetExecLp().
Referenced by SCIPbranchruleSetExecLp(), and SCIPsetBranchruleExecLp().
| void SCIPbranchruleSetExecExt | ( | SCIP_BRANCHRULE * | branchrule | ) |
sets branching execution method for external candidates
| branchrule | branching rule branching execution method for external candidates |
Definition at line 1996 of file branch.c.
References assert(), NULL, SCIP_DECL_BRANCHEXECEXT, and SCIPbranchruleSetExecExt().
Referenced by SCIPbranchruleSetExecExt(), and SCIPsetBranchruleExecExt().
| void SCIPbranchruleSetExecPs | ( | SCIP_BRANCHRULE * | branchrule | ) |
sets branching execution method for not completely fixed pseudo solutions
| branchrule | branching rule branching execution method for not completely fixed pseudo solutions |
Definition at line 2007 of file branch.c.
References assert(), NULL, SCIP_DECL_BRANCHEXECPS, and SCIPbranchruleSetExecPs().
Referenced by SCIPbranchruleSetExecPs(), and SCIPsetBranchruleExecPs().
| void SCIPbranchruleSetPriority | ( | SCIP_BRANCHRULE * | branchrule, |
| SCIP_SET * | set, | ||
| int | priority ) |
sets priority of branching rule
| branchrule | branching rule |
| set | global SCIP settings |
| priority | new priority of the branching rule |
Definition at line 2048 of file branch.c.
References assert(), FALSE, NULL, SCIP_Branchrule::priority, and SCIPbranchruleSetPriority().
Referenced by SCIPbranchruleSetPriority(), and SCIPsetBranchrulePriority().
| void SCIPbranchruleSetMaxdepth | ( | SCIP_BRANCHRULE * | branchrule, |
| int | maxdepth ) |
sets maximal depth level, up to which this branching rule should be used (-1 for no limit)
| branchrule | branching rule |
| maxdepth | new maxdepth of the branching rule |
Definition at line 2072 of file branch.c.
References assert(), maxdepth, SCIP_Branchrule::maxdepth, NULL, and SCIPbranchruleSetMaxdepth().
Referenced by SCIPbranchruleSetMaxdepth(), and SCIPsetBranchruleMaxdepth().
| 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
| branchrule | branching rule |
| maxbounddist | new maxbounddist of the branching rule |
Definition at line 2094 of file branch.c.
References assert(), SCIP_Branchrule::maxbounddist, NULL, SCIP_Real, and SCIPbranchruleSetMaxbounddist().
Referenced by SCIPbranchruleSetMaxbounddist(), and SCIPsetBranchruleMaxbounddist().
| void SCIPbranchruleEnableOrDisableClocks | ( | SCIP_BRANCHRULE * | branchrule, |
| SCIP_Bool | enable ) |
enables or disables all clocks of branchrule, depending on the value of the flag
| branchrule | the branching rule for which all clocks should be enabled or disabled |
| enable | should the clocks of the branching rule be enabled? |
Definition at line 2106 of file branch.c.
References assert(), SCIP_Branchrule::branchclock, NULL, SCIP_Bool, SCIPbranchruleEnableOrDisableClocks(), SCIPclockEnableOrDisable(), and SCIP_Branchrule::setuptime.
Referenced by SCIPbranchruleEnableOrDisableClocks().
| SCIP_Real SCIPbranchGetScore | ( | SCIP_SET * | set, |
| SCIP_VAR * | var, | ||
| SCIP_Real | downgain, | ||
| SCIP_Real | upgain ) |
calculates the branching score out of the gain predictions for a binary branching
| set | global SCIP settings |
| var | variable, of which the branching factor should be applied, or NULL |
| downgain | prediction of objective gain for rounding downwards |
| upgain | prediction of objective gain for rounding upwards |
Definition at line 2236 of file branch.c.
References assert(), eps, MAX, NULL, SCIP_Real, SCIPABORT, SCIPbranchGetScore(), SCIPerrorMessage, SCIPsetSumepsilon(), SCIPvarGetBranchFactor(), and var.
Referenced by SCIPbranchGetScore(), SCIPbranchGetScoreMultiple(), SCIPgetAvgConflictlengthScore(), SCIPgetAvgConflictlengthScoreCurrentRun(), SCIPgetAvgConflictScore(), SCIPgetAvgConflictScoreCurrentRun(), SCIPgetAvgCutoffScore(), SCIPgetAvgCutoffScoreCurrentRun(), SCIPgetAvgDPseudocostScore(), SCIPgetAvgInferenceScore(), SCIPgetAvgInferenceScoreCurrentRun(), SCIPgetAvgPseudocostScore(), SCIPgetAvgPseudocostScoreCurrentRun(), SCIPgetBranchScore(), SCIPgetVarAvgCutoffScore(), SCIPgetVarAvgCutoffScoreCurrentRun(), SCIPgetVarAvgInferenceCutoffScore(), SCIPgetVarAvgInferenceCutoffScoreCurrentRun(), SCIPgetVarAvgInferenceScore(), SCIPgetVarAvgInferenceScoreCurrentRun(), SCIPgetVarConflictlengthScore(), SCIPgetVarConflictlengthScoreCurrentRun(), SCIPgetVarConflictScore(), SCIPgetVarConflictScoreCurrentRun(), SCIPgetVarDPseudocostScore(), SCIPgetVarPseudocostScore(), and SCIPgetVarPseudocostScoreCurrentRun().
| 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
| set | global SCIP settings |
| var | variable, of which the branching factor should be applied, or NULL |
| nchildren | number of children that the branching will create |
| gains | prediction of objective gain for each child |
Definition at line 2296 of file branch.c.
References assert(), c, NULL, SCIP_Real, SCIPbranchGetScore(), SCIPbranchGetScoreMultiple(), SCIPsetInfinity(), and var.
Referenced by SCIPbranchGetScoreMultiple(), and 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
| set | global SCIP settings |
| tree | branch and bound tree |
| var | variable, of which the branching point should be computed |
| suggestion | suggestion for branching point, or SCIP_INVALID if no suggestion |
Definition at line 2334 of file branch.c.
References assert(), MAX, MAX3, MIN, NULL, REALABS, SCIP_Real, SCIPbranchGetBranchingPoint(), SCIPrelDiff(), SCIPsetEpsilon(), SCIPsetFloor(), SCIPsetInfinity(), SCIPsetIsEQ(), SCIPsetIsFeasNegative(), SCIPsetIsFeasPositive(), SCIPsetIsFeasZero(), SCIPsetIsGE(), SCIPsetIsInfinity(), SCIPsetIsIntegral(), SCIPsetIsLE(), SCIPsetIsNegative(), SCIPsetIsPositive(), SCIPsetIsRelGT(), SCIPsetIsRelLT(), SCIPsetRound(), SCIPtreeHasCurrentNodeLP(), SCIPvarGetLbGlobal(), SCIPvarGetLbLocal(), SCIPvarGetSol(), SCIPvarGetUbGlobal(), SCIPvarGetUbLocal(), SCIPvarIsImpliedIntegral(), SCIPvarIsIntegral(), SCIPvarIsNonimpliedIntegral(), and var.
Referenced by SCIPbranchExecExtern(), SCIPbranchGetBranchingPoint(), 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_EVENTFILTER * | eventfilter, | ||
| 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
| blkmem | block memory for parameter settings |
| set | global SCIP settings |
| stat | problem statistics |
| transprob | transformed problem after presolve |
| origprob | original problem |
| tree | branch and bound tree |
| reopt | reoptimization data structure |
| lp | current LP data |
| sepastore | separation storage |
| branchcand | branching candidate storage |
| eventqueue | event queue |
| eventfilter | global event filter |
| cutoffbound | global upper cutoff bound |
| allowaddcons | should adding constraints be allowed to avoid a branching? |
| result | pointer to store the result of the branching (s. branch.h) |
Definition at line 2582 of file branch.c.
References assert(), bestcand, branchcandCalcLPCands(), i, SCIP_BranchCand::lpcands, SCIP_BranchCand::lpmaxpriority, SCIP_BranchCand::nenfoimpllpfracs, SCIP_BranchCand::nlpcands, SCIP_BranchCand::npriolpcands, NULL, SCIP_BranchCand::pseudomaxpriority, result, SCIP_Bool, SCIP_BRANCHED, SCIP_CALL, SCIP_DIDNOTFIND, SCIP_DIDNOTRUN, SCIP_INVALID, SCIP_OKAY, SCIP_Real, SCIP_REAL_MIN, SCIPbranchExecLP(), SCIPbranchExecPseudo(), SCIPbranchruleExecLPSol(), SCIPsetDebugMsg, SCIPsetIsEQ(), SCIPsetSortBranchrules(), SCIPtreeBranchVar(), SCIPvarGetBranchFactor(), SCIPvarGetBranchPriority(), SCIPvarGetLbLocal(), SCIPvarGetUbLocal(), SCIPvarIsImpliedIntegral(), SCIPvarIsIntegral(), and var.
Referenced by SCIPbranchExecLP(), SCIPbranchLP(), and solveNode().
|
static |
calculates branching candidates for LP solution branching (fractional variables)
| branchcand | branching candidate storage |
| set | global SCIP settings |
| stat | problem statistics |
| lp | current LP data |
Definition at line 2686 of file branch.c.
References assert(), branchcandCalcLPCandsExact(), c, ensureLpcandsSize(), frac, SCIP_Col::lb, SCIP_BranchCand::lpcands, SCIP_BranchCand::lpcandsfrac, SCIP_BranchCand::lpcandssol, SCIP_Stat::lpcount, SCIP_Col::lpipos, SCIP_BranchCand::lpmaxpriority, SCIP_Col::lppos, SCIP_BranchCand::nenfoimpllpfracs, SCIP_BranchCand::nimpllpfracs, SCIP_BranchCand::nlpcands, SCIP_BranchCand::npriolpbins, SCIP_BranchCand::npriolpcands, NULL, primsol, SCIP_CALL, SCIP_IMPLINTTYPE_NONE, SCIP_INVALID, SCIP_LONGINT_FORMAT, SCIP_LPSOLSTAT_OPTIMAL, SCIP_LPSOLSTAT_UNBOUNDEDRAY, SCIP_OKAY, SCIP_Real, SCIP_VARSTATUS_COLUMN, SCIP_VARTYPE_BINARY, SCIP_VARTYPE_CONTINUOUS, SCIPcolGetPrimsol(), SCIPlpGetCols(), SCIPlpGetNCols(), SCIPlpGetSolstat(), SCIPrationalCreateBuffer(), SCIPrationalFreeBuffer(), SCIPrationalGetFrac(), SCIPrationalGetReal(), SCIPrationalIsIntegral(), SCIPrationalSetReal(), SCIPsetDebugMsg, SCIPsetIsFeasGE(), SCIPsetIsFeasLE(), SCIPsetIsInfinity(), SCIPvarGetBranchPriority(), SCIPvarGetCol(), SCIPvarGetImplType(), SCIPvarGetLbLocal(), SCIPvarGetName(), SCIPvarGetStatus(), SCIPvarGetType(), SCIPvarGetUbLocal(), SCIPvarIsImpliedIntegral(), SCIP_Lp::solved, SCIP_Col::ub, SCIP_BranchCand::validlpcandslp, SCIP_Col::var, and var.
Referenced by branchcandCalcLPCandsExact(), and SCIPbranchExecLPExact().
| SCIP_RETCODE SCIPbranchExecLPExact | ( | 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_EVENTFILTER * | eventfilter, | ||
| 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
| blkmem | block memory for parameter settings |
| set | global SCIP settings |
| stat | problem statistics |
| transprob | transformed problem after presolve |
| origprob | original problem |
| tree | branch and bound tree |
| reopt | reoptimization data structure |
| lp | current LP data |
| branchcand | branching candidate storage |
| eventqueue | event queue |
| eventfilter | global event filter |
| cutoffbound | global upper cutoff bound |
| allowaddcons | should adding constraints be allowed to avoid a branching? |
| result | pointer to store the result of the branching (s. branch.h) |
Definition at line 2913 of file branch.c.
References assert(), branchcandCalcLPCandsExact(), i, SCIP_BranchCand::lpcands, SCIP_BranchCand::lpcandssol, SCIP_BranchCand::lpmaxpriority, SCIP_BranchCand::nenfoimpllpfracs, SCIP_BranchCand::nlpcands, SCIP_BranchCand::npriolpcands, NULL, SCIP_BranchCand::pseudomaxpriority, result, SCIP_Bool, SCIP_BRANCHED, SCIP_CALL, SCIP_DIDNOTFIND, SCIP_DIDNOTRUN, SCIP_OKAY, SCIP_Real, SCIPbranchExecLPExact(), SCIPbranchExecPseudo(), SCIPrationalCreateBuffer(), SCIPrationalFreeBuffer(), SCIPrationalIsIntegral(), SCIPrationalSetReal(), SCIPsetDebugMsg, SCIPtreeBranchVarExact(), and SCIP_BranchCand::validlpcandslp.
Referenced by SCIPbranchExecLPExact(), and SCIPbranchLPExact().
| 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_EVENTFILTER * | eventfilter, | ||
| 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
| blkmem | block memory for parameter settings |
| set | global SCIP settings |
| stat | problem statistics |
| transprob | transformed problem after presolve |
| origprob | original problem |
| tree | branch and bound tree |
| reopt | reoptimization data structure |
| lp | current LP data |
| sepastore | separation storage |
| branchcand | branching candidate storage |
| eventqueue | event queue |
| eventfilter | global event filter |
| cutoffbound | global upper cutoff bound |
| allowaddcons | should adding constraints be allowed to avoid a branching? |
| result | pointer to store the result of the branching (s. branch.h) |
Definition at line 2995 of file branch.c.
References assert(), bestcand, SCIP_BranchCand::externcands, SCIP_BranchCand::externcandssol, SCIP_BranchCand::externmaxpriority, i, SCIP_Tree::nchildren, SCIP_BranchCand::nexterncands, SCIP_BranchCand::nprioexterncands, NULL, SCIP_BranchCand::pseudomaxpriority, result, SCIP_Bool, SCIP_BRANCHED, SCIP_CALL, SCIP_DIDNOTFIND, SCIP_DIDNOTRUN, SCIP_OKAY, SCIP_Real, SCIP_REAL_MIN, SCIP_REDUCEDDOM, SCIPbranchExecExtern(), SCIPbranchExecPseudo(), SCIPbranchGetBranchingPoint(), SCIPbranchruleExecExternSol(), SCIPrelDiff(), SCIPsetDebugMsg, SCIPsetEpsilon(), SCIPsetInfinity(), SCIPsetIsEQ(), SCIPsetIsInfinity(), SCIPsetIsLT(), SCIPsetSortBranchrules(), SCIPtreeBranchVar(), SCIPvarGetBranchFactor(), SCIPvarGetBranchPriority(), SCIPvarGetLbLocal(), SCIPvarGetName(), SCIPvarGetUbLocal(), and var.
Referenced by SCIPbranchExecExtern(), 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_EVENTFILTER * | eventfilter, | ||
| 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
| blkmem | block memory for parameter settings |
| set | global SCIP settings |
| stat | problem statistics |
| transprob | transformed problem after presolve |
| origprob | original problem |
| tree | branch and bound tree |
| reopt | reoptimization data structure |
| lp | current LP data |
| branchcand | branching candidate storage |
| eventqueue | event queue |
| eventfilter | global event filter |
| cutoffbound | global upper cutoff bound |
| allowaddcons | should adding constraints be allowed to avoid a branching? |
| result | pointer to store the result of the branching (s. branch.h) |
Definition at line 3127 of file branch.c.
References assert(), bestcand, i, SCIP_BranchCand::npseudocands, NULL, SCIP_BranchCand::pseudocands, result, SCIP_Bool, SCIP_BRANCHED, SCIP_CALL, SCIP_DIDNOTFIND, SCIP_DIDNOTRUN, SCIP_INVALID, SCIP_OKAY, SCIP_Real, SCIP_REAL_MIN, SCIPbranchExecPseudo(), SCIPbranchruleExecPseudoSol(), SCIPsetDebugMsg, SCIPsetIsEQ(), SCIPsetSortBranchrules(), SCIPtreeBranchVar(), SCIPvarGetBranchFactor(), SCIPvarGetBranchPriority(), SCIPvarGetLbLocal(), SCIPvarGetUbLocal(), SCIPvarIsIntegral(), and var.
Referenced by SCIPbranchExecExtern(), SCIPbranchExecLP(), SCIPbranchExecLPExact(), SCIPbranchExecPseudo(), SCIPbranchPseudo(), SCIPsolveCIP(), and solveNode().