SCIP Doxygen Documentation
Loading...
Searching...
No Matches

Detailed Description

reliable pseudo costs branching rule

Author
Tobias Achterberg
Timo Berthold
Gerald Gamrath
Gioni Mexi
Marc Pfetsch
Krunal Patel

Definition in file branch_relpscost.c.

#include "blockmemshell/memory.h"
#include "scip/branch_relpscost.h"
#include "scip/treemodel.h"
#include "scip/cons_and.h"
#include "scip/pub_branch.h"
#include "scip/pub_cons.h"
#include "scip/scip_exact.h"
#include "scip/pub_message.h"
#include "scip/pub_misc.h"
#include "scip/pub_sol.h"
#include "scip/pub_tree.h"
#include "scip/pub_var.h"
#include "scip/scip_branch.h"
#include "scip/scip_cons.h"
#include "scip/scip_general.h"
#include "scip/scip_lp.h"
#include "scip/scip_mem.h"
#include "scip/scip_message.h"
#include "scip/scip_nlp.h"
#include "scip/scip_numerics.h"
#include "scip/scip_param.h"
#include "scip/scip_prob.h"
#include "scip/scip_randnumgen.h"
#include "scip/scip_sol.h"
#include "scip/scip_solvingstats.h"
#include "scip/scip_tree.h"
#include "scip/scip_var.h"
#include "scip/prop_symmetry.h"
#include "scip/symmetry.h"
#include <string.h>

Go to the source code of this file.

Macros

#define BRANCHRULE_NAME   "relpscost"
#define BRANCHRULE_DESC   "reliability branching on pseudo cost values"
#define BRANCHRULE_PRIORITY   10000
#define BRANCHRULE_MAXDEPTH   -1
#define BRANCHRULE_MAXBOUNDDIST   1.0
#define DEFAULT_CONFLICTWEIGHT   0.01
#define DEFAULT_CONFLENGTHWEIGHT   0.0
#define DEFAULT_INFERENCEWEIGHT   0.0001
#define DEFAULT_CUTOFFWEIGHT   0.0001
#define DEFAULT_GMIAVGEFFWEIGHT   0.0
#define DEFAULT_GMILASTEFFWEIGHT   0.00001
#define DEFAULT_PSCOSTWEIGHT   1.0
#define DEFAULT_NLSCOREWEIGHT   0.1
#define DEFAULT_MINRELIABLE   1.0
#define DEFAULT_MAXRELIABLE   5.0
#define DEFAULT_SBITERQUOT   0.5
#define DEFAULT_DYNAMICLOOKAHEADQUOT   0.6
#define DEFAULT_SBITEROFS   100000
#define DEFAULT_MAXLOOKAHEAD   9
#define DEFAULT_INITCAND   100
#define DEFAULT_INITITER   0
#define DEFAULT_MAXBDCHGS   5
#define DEFAULT_MAXPROPROUNDS   -2
#define DEFAULT_PROBINGBOUNDS   TRUE
#define DEFAULT_USERELERRORFORRELIABILITY   FALSE
#define DEFAULT_LOWERRORTOL   0.05
#define DEFAULT_HIGHERRORTOL   1.0
#define DEFAULT_USEHYPTESTFORRELIABILITY   FALSE
#define DEFAULT_USEDYNAMICCONFIDENCE   FALSE
#define DEFAULT_STORESEMIINITCOSTS   FALSE
#define DEFAULT_USESBLOCALINFO   FALSE
#define DEFAULT_CONFIDENCELEVEL   2
#define DEFAULT_SKIPBADINITCANDS   TRUE
#define DEFAULT_STARTRANDSEED   5
#define DEFAULT_DYNAMICLOOKAHEAD   FALSE
#define DEFAULT_MINSAMPLESIZE   10
#define DEFAULT_DYNAMICLOOKDISTRIBUTION   1
#define DEFAULT_RANDINITORDER   FALSE
#define DEFAULT_USESMALLWEIGHTSITLIM   FALSE
#define DEFAULT_DYNAMICWEIGHTS   TRUE
#define DEFAULT_DEGENERACYAWARE   1
#define DEFAULT_FILTERCANDSSYM   FALSE
#define DEFAULT_TRANSSYMPSCOST   FALSE
#define EXPONENTIALDISTRIBUTION   0
#define PARETODISTRIBUTION   1
#define LOGNORMALDISTRIBUTION   2
#define GEOMMEANSHIFT   0.01
#define MAXGAINTHRESHOLD   1e15
#define MINGAINTHRESHOLD   1e-5
#define BRANCHRULE_DISCOUNTFACTOR   0.2

Functions

static SCIP_RETCODE initOrbits (SCIP *scip, SCIP_BRANCHRULEDATA *branchruledata)
static SCIP_RETCODE filterSymmetricVariables (SCIP *scip, SCIP_BRANCHRULEDATA *branchruledata, SCIP_VAR **origbranchcands, SCIP_Real *origbranchcandssol, SCIP_Real *origbranchcandsfrac, int norigbranchcands, SCIP_VAR **branchcands, SCIP_Real *branchcandssol, SCIP_Real *branchcandsfrac, int *branchorbitidx, int *nbranchcands)
static SCIP_RETCODE SCIPupdateVarPseudocostSymmetric (SCIP *scip, SCIP_BRANCHRULEDATA *branchruledata, SCIP_VAR *branchvar, int *branchorbitidx, int branchvaridx, SCIP_Real solvaldelta, SCIP_Real objdelta, SCIP_Real weight)
static SCIP_RETCODE countNonlinearities (SCIP *scip, int *nlcount, int nlcountsize, int *nlcountmax)
static SCIP_RETCODE branchruledataEnsureNlcount (SCIP *scip, SCIP_BRANCHRULEDATA *branchruledata)
static SCIP_Real calcNlscore (SCIP *scip, int *nlcount, int nlcountmax, int probindex)
static SCIP_Real calcScore (SCIP *scip, SCIP_BRANCHRULEDATA *branchruledata, SCIP_Real conflictscore, SCIP_Real avgconflictscore, SCIP_Real conflengthscore, SCIP_Real avgconflengthscore, SCIP_Real inferencescore, SCIP_Real avginferencescore, SCIP_Real cutoffscore, SCIP_Real avgcutoffscore, SCIP_Real gmieffscore, SCIP_Real lastgmieffscore, SCIP_Real pscostscore, SCIP_Real avgpscostscore, SCIP_Real nlscore, SCIP_Real frac, SCIP_Real degeneracyfactor)
static SCIP_RETCODE addBdchg (SCIP *scip, int **bdchginds, SCIP_BOUNDTYPE **bdchgtypes, SCIP_Real **bdchgbounds, int *nbdchgs, int ind, SCIP_BOUNDTYPE type, SCIP_Real bound)
static void freeBdchgs (SCIP *scip, int **bdchginds, SCIP_BOUNDTYPE **bdchgtypes, SCIP_Real **bdchgbounds, int *nbdchgs)
static SCIP_RETCODE applyBdchgs (SCIP *scip, SCIP_VAR **vars, int *bdchginds, SCIP_BOUNDTYPE *bdchgtypes, SCIP_Real *bdchgbounds, int nbdchgs, SCIP_RESULT *result)
static SCIP_RETCODE updateMinMaxMeanGain (SCIP *scip, SCIP_BRANCHRULE *branchrule, SCIP_Real downgain, SCIP_Real upgain)
static SCIP_Real strongBranchingDepth (SCIP_Real gap, SCIP_Real maxmeangain)
static SCIP_Real strongBranchingTreeSize (SCIP_Real estimatedepth)
static SCIP_Real cdfProbability (SCIP_Real rate, SCIP_Real zeroprob, SCIP_Real proposedgain, SCIP_Real mingain, SCIP_Real logmeangain, SCIP_Real logstdevgain, int distributioncdf)
static SCIP_Real expectedTreeSize (SCIP *scip, SCIP_Real gap, SCIP_Real zeroprob, SCIP_Real currentdepth, SCIP_Real lambda, SCIP_Real mingain, SCIP_Real logmeangain, SCIP_Real logstdevgain, int distributioncdf)
static SCIP_Bool continueStrongBranchingLookahead (SCIP *scip, int candidx, int ninitcands, SCIP_Real lookahead, SCIP_Real maxlookahead, int nbdchgs, int nbdconflicts, int maxbdchgs, SCIP_Longint maxnsblpiterations)
static SCIP_Bool continueStrongBranchingTreeSizeEstimation (SCIP *scip, SCIP_BRANCHRULEDATA *branchruledata, SCIP_Real lookahead, SCIP_Real maxlookahead)
static SCIP_Bool needsStrongBranching (SCIP *scip, SCIP_BRANCHRULE *branchrule, SCIP_VAR *branchcand, SCIP_Real branchcandfrac, SCIP_VAR *bestpscand, SCIP_Real bestpscandfrac, SCIP_Real reliable, SCIP_Real relerrorthreshold, SCIP_CONFIDENCELEVEL clevel, SCIP_Bool useancpscost)
static SCIP_RETCODE execRelpscost (SCIP *scip, SCIP_BRANCHRULE *branchrule, SCIP_VAR **branchcands, SCIP_Real *branchcandssol, SCIP_Real *branchcandsfrac, int *branchorbitidx, int nbranchcands, SCIP_Bool executebranch, SCIP_RESULT *result)
static SCIP_DECL_BRANCHCOPY (branchCopyRelpscost)
static SCIP_DECL_BRANCHFREE (branchFreeRelpscost)
static SCIP_DECL_BRANCHINITSOL (branchInitsolRelpscost)
static SCIP_DECL_BRANCHEXITSOL (branchExitsolRelpscost)
static SCIP_DECL_BRANCHEXECLP (branchExeclpRelpscost)
SCIP_RETCODE SCIPincludeBranchruleRelpscost (SCIP *scip)
SCIP_RETCODE SCIPexecRelpscostBranching (SCIP *scip, SCIP_VAR **branchcands, SCIP_Real *branchcandssol, SCIP_Real *branchcandsfrac, int nbranchcands, SCIP_Bool executebranching, SCIP_RESULT *result)

Macro Definition Documentation

◆ BRANCHRULE_NAME

#define BRANCHRULE_NAME   "relpscost"

Definition at line 69 of file branch_relpscost.c.

◆ BRANCHRULE_DESC

#define BRANCHRULE_DESC   "reliability branching on pseudo cost values"

Definition at line 70 of file branch_relpscost.c.

◆ BRANCHRULE_PRIORITY

#define BRANCHRULE_PRIORITY   10000

Definition at line 71 of file branch_relpscost.c.

◆ BRANCHRULE_MAXDEPTH

#define BRANCHRULE_MAXDEPTH   -1

Definition at line 72 of file branch_relpscost.c.

◆ BRANCHRULE_MAXBOUNDDIST

#define BRANCHRULE_MAXBOUNDDIST   1.0

Definition at line 73 of file branch_relpscost.c.

◆ DEFAULT_CONFLICTWEIGHT

#define DEFAULT_CONFLICTWEIGHT   0.01

weight in score calculations for conflict score

Definition at line 75 of file branch_relpscost.c.

◆ DEFAULT_CONFLENGTHWEIGHT

#define DEFAULT_CONFLENGTHWEIGHT   0.0

weight in score calculations for conflict length score

Definition at line 76 of file branch_relpscost.c.

Referenced by SCIPincludeBranchruleRelpscost().

◆ DEFAULT_INFERENCEWEIGHT

#define DEFAULT_INFERENCEWEIGHT   0.0001

weight in score calculations for inference score

Definition at line 77 of file branch_relpscost.c.

◆ DEFAULT_CUTOFFWEIGHT

#define DEFAULT_CUTOFFWEIGHT   0.0001

weight in score calculations for cutoff score

Definition at line 78 of file branch_relpscost.c.

◆ DEFAULT_GMIAVGEFFWEIGHT

#define DEFAULT_GMIAVGEFFWEIGHT   0.0

weight in score calculations of average GMI cut normed efficacies

Definition at line 79 of file branch_relpscost.c.

Referenced by SCIPincludeBranchruleRelpscost().

◆ DEFAULT_GMILASTEFFWEIGHT

#define DEFAULT_GMILASTEFFWEIGHT   0.00001

weight in score calculations of last GMI cut normed efficacy

Definition at line 80 of file branch_relpscost.c.

Referenced by SCIPincludeBranchruleRelpscost().

◆ DEFAULT_PSCOSTWEIGHT

#define DEFAULT_PSCOSTWEIGHT   1.0

weight in score calculations for pseudo cost score

Definition at line 81 of file branch_relpscost.c.

Referenced by SCIPincludeBranchruleRelpscost(), and SCIPincludeCutselEnsemble().

◆ DEFAULT_NLSCOREWEIGHT

#define DEFAULT_NLSCOREWEIGHT   0.1

weight in score calculations for nlcount score

Definition at line 82 of file branch_relpscost.c.

Referenced by SCIPincludeBranchruleRelpscost().

◆ DEFAULT_MINRELIABLE

#define DEFAULT_MINRELIABLE   1.0

minimal value for minimum pseudo cost size to regard pseudo cost value as reliable

Definition at line 83 of file branch_relpscost.c.

Referenced by SCIPincludeBranchruleRelpscost().

◆ DEFAULT_MAXRELIABLE

#define DEFAULT_MAXRELIABLE   5.0

maximal value for minimum pseudo cost size to regard pseudo cost value as reliable

Definition at line 84 of file branch_relpscost.c.

Referenced by SCIPincludeBranchruleRelpscost().

◆ DEFAULT_SBITERQUOT

#define DEFAULT_SBITERQUOT   0.5

maximal fraction of strong branching LP iterations compared to normal iterations

Definition at line 85 of file branch_relpscost.c.

Referenced by SCIPincludeBranchruleRelpscost().

◆ DEFAULT_DYNAMICLOOKAHEADQUOT

#define DEFAULT_DYNAMICLOOKAHEADQUOT   0.6

apply dynamic lookahead after this fraction maxlookahead is reached

Definition at line 86 of file branch_relpscost.c.

Referenced by SCIPincludeBranchruleRelpscost().

◆ DEFAULT_SBITEROFS

#define DEFAULT_SBITEROFS   100000

additional number of allowed strong branching LP iterations

Definition at line 87 of file branch_relpscost.c.

Referenced by SCIPincludeBranchruleRelpscost().

◆ DEFAULT_MAXLOOKAHEAD

#define DEFAULT_MAXLOOKAHEAD   9

maximal number of further variables evaluated without better score

Definition at line 88 of file branch_relpscost.c.

Referenced by SCIPincludeBranchruleRelpscost().

◆ DEFAULT_INITCAND

#define DEFAULT_INITCAND   100

maximal number of candidates initialized with strong branching per node

Definition at line 89 of file branch_relpscost.c.

Referenced by SCIPincludeBranchruleRelpscost().

◆ DEFAULT_INITITER

#define DEFAULT_INITITER   0

iteration limit for strong branching initialization of pseudo cost entries (0: auto)

Definition at line 90 of file branch_relpscost.c.

Referenced by SCIPincludeBranchruleRelpscost().

◆ DEFAULT_MAXBDCHGS

#define DEFAULT_MAXBDCHGS   5

maximal number of bound tightenings before the node is reevaluated (-1: unlimited)

Definition at line 91 of file branch_relpscost.c.

Referenced by SCIPincludeBranchruleRelpscost().

◆ DEFAULT_MAXPROPROUNDS

#define DEFAULT_MAXPROPROUNDS   -2

maximum number of propagation rounds to be performed during strong branching before solving the LP (-1: no limit, -2: parameter settings)

Definition at line 92 of file branch_relpscost.c.

◆ DEFAULT_PROBINGBOUNDS

#define DEFAULT_PROBINGBOUNDS   TRUE

should valid bounds be identified in a probing-like fashion during strong branching (only with propagation)?

Definition at line 94 of file branch_relpscost.c.

◆ DEFAULT_USERELERRORFORRELIABILITY

#define DEFAULT_USERELERRORFORRELIABILITY   FALSE

should reliability be based on relative errors?

Definition at line 96 of file branch_relpscost.c.

Referenced by SCIPincludeBranchruleRelpscost().

◆ DEFAULT_LOWERRORTOL

#define DEFAULT_LOWERRORTOL   0.05

lowest tolerance beneath which relative errors are reliable

Definition at line 97 of file branch_relpscost.c.

Referenced by SCIPincludeBranchruleRelpscost().

◆ DEFAULT_HIGHERRORTOL

#define DEFAULT_HIGHERRORTOL   1.0

highest tolerance beneath which relative errors are reliable

Definition at line 98 of file branch_relpscost.c.

Referenced by SCIPincludeBranchruleRelpscost().

◆ DEFAULT_USEHYPTESTFORRELIABILITY

#define DEFAULT_USEHYPTESTFORRELIABILITY   FALSE

should the strong branching decision be based on a hypothesis test?

Definition at line 99 of file branch_relpscost.c.

Referenced by SCIPincludeBranchruleRelpscost().

◆ DEFAULT_USEDYNAMICCONFIDENCE

#define DEFAULT_USEDYNAMICCONFIDENCE   FALSE

should the confidence level be adjusted dynamically?

Definition at line 100 of file branch_relpscost.c.

Referenced by SCIPincludeBranchruleRelpscost().

◆ DEFAULT_STORESEMIINITCOSTS

#define DEFAULT_STORESEMIINITCOSTS   FALSE

should strong branching result be considered for pseudo costs if the other direction was infeasible?

Definition at line 101 of file branch_relpscost.c.

Referenced by SCIPincludeBranchruleRelpscost().

◆ DEFAULT_USESBLOCALINFO

#define DEFAULT_USESBLOCALINFO   FALSE

should the scoring function use only local cutoff and inference information obtained for strong branching candidates?

Definition at line 102 of file branch_relpscost.c.

Referenced by SCIPincludeBranchruleRelpscost().

◆ DEFAULT_CONFIDENCELEVEL

#define DEFAULT_CONFIDENCELEVEL   2

The confidence level for statistical methods, between 0 (Min) and 4 (Max).

Definition at line 103 of file branch_relpscost.c.

Referenced by SCIPincludeBranchruleRelpscost().

◆ DEFAULT_SKIPBADINITCANDS

#define DEFAULT_SKIPBADINITCANDS   TRUE

should branching rule skip candidates that have a low probability to be better than the best strong-branching or pseudo-candidate?

Definition at line 104 of file branch_relpscost.c.

Referenced by SCIPincludeBranchruleRelpscost().

◆ DEFAULT_STARTRANDSEED

#define DEFAULT_STARTRANDSEED   5

start random seed for random number generation

Definition at line 106 of file branch_relpscost.c.

Referenced by SCIPincludeBranchruleRelpscost().

◆ DEFAULT_DYNAMICLOOKAHEAD

#define DEFAULT_DYNAMICLOOKAHEAD   FALSE

should we use a dynamic lookahead based on a tree size estimation of further strong branchings?

Definition at line 107 of file branch_relpscost.c.

Referenced by SCIPincludeBranchruleRelpscost().

◆ DEFAULT_MINSAMPLESIZE

#define DEFAULT_MINSAMPLESIZE   10

minimum sample size to estimate the tree size for dynamic lookahead

Definition at line 108 of file branch_relpscost.c.

Referenced by SCIPincludeBranchruleRelpscost().

◆ DEFAULT_DYNAMICLOOKDISTRIBUTION

#define DEFAULT_DYNAMICLOOKDISTRIBUTION   1

which distribution should be used for dynamic lookahead? 0=exponential, 1=Pareto, 2=log-normal

Definition at line 109 of file branch_relpscost.c.

Referenced by SCIPincludeBranchruleRelpscost().

◆ DEFAULT_RANDINITORDER

#define DEFAULT_RANDINITORDER   FALSE

should slight perturbation of scores be used to break ties in the prior scores?

Definition at line 110 of file branch_relpscost.c.

Referenced by SCIPincludeBranchruleRelpscost().

◆ DEFAULT_USESMALLWEIGHTSITLIM

#define DEFAULT_USESMALLWEIGHTSITLIM   FALSE

should smaller weights be used for pseudo cost updates after hitting the LP iteration limit?

Definition at line 111 of file branch_relpscost.c.

Referenced by SCIPincludeBranchruleRelpscost().

◆ DEFAULT_DYNAMICWEIGHTS

#define DEFAULT_DYNAMICWEIGHTS   TRUE

should the weights of the branching rule be adjusted dynamically during solving based infeasible and objective leaf counters?

Definition at line 112 of file branch_relpscost.c.

Referenced by SCIPincludeBranchruleRelpscost().

◆ DEFAULT_DEGENERACYAWARE

#define DEFAULT_DEGENERACYAWARE   1

should degeneracy be taken into account to update weights and skip strong branching? (0: off, 1: after root, 2: always)

Definition at line 114 of file branch_relpscost.c.

Referenced by SCIPincludeBranchruleRelpscost().

◆ DEFAULT_FILTERCANDSSYM

#define DEFAULT_FILTERCANDSSYM   FALSE

Use symmetry to filter branching candidates?

Definition at line 117 of file branch_relpscost.c.

Referenced by SCIPincludeBranchruleRelpscost().

◆ DEFAULT_TRANSSYMPSCOST

#define DEFAULT_TRANSSYMPSCOST   FALSE

Transfer pscost information to symmetric variables if filtering is performed?

Definition at line 118 of file branch_relpscost.c.

Referenced by SCIPincludeBranchruleRelpscost().

◆ EXPONENTIALDISTRIBUTION

#define EXPONENTIALDISTRIBUTION   0

◆ PARETODISTRIBUTION

#define PARETODISTRIBUTION   1

◆ LOGNORMALDISTRIBUTION

#define LOGNORMALDISTRIBUTION   2

◆ GEOMMEANSHIFT

#define GEOMMEANSHIFT   0.01

Definition at line 126 of file branch_relpscost.c.

Referenced by updateMinMaxMeanGain().

◆ MAXGAINTHRESHOLD

#define MAXGAINTHRESHOLD   1e15

Definition at line 128 of file branch_relpscost.c.

Referenced by updateMinMaxMeanGain().

◆ MINGAINTHRESHOLD

#define MINGAINTHRESHOLD   1e-5

◆ BRANCHRULE_DISCOUNTFACTOR

#define BRANCHRULE_DISCOUNTFACTOR   0.2

default discount factor for discounted pseudo costs.

Definition at line 133 of file branch_relpscost.c.

Function Documentation

◆ initOrbits()

SCIP_RETCODE initOrbits ( SCIP * scip,
SCIP_BRANCHRULEDATA * branchruledata )
static

initialize orbits

Parameters
scipSCIP data structure
branchruledatabranching rule data

Definition at line 217 of file branch_relpscost.c.

References assert(), NULL, SCIP_CALL, SCIP_OKAY, SCIPallocBlockMemoryArray, SCIPcomputeOrbitsComponentsSym(), SCIPgetNVars(), SCIPgetSymmetry(), and TRUE.

Referenced by SCIP_DECL_BRANCHEXECLP().

◆ filterSymmetricVariables()

SCIP_RETCODE filterSymmetricVariables ( SCIP * scip,
SCIP_BRANCHRULEDATA * branchruledata,
SCIP_VAR ** origbranchcands,
SCIP_Real * origbranchcandssol,
SCIP_Real * origbranchcandsfrac,
int norigbranchcands,
SCIP_VAR ** branchcands,
SCIP_Real * branchcandssol,
SCIP_Real * branchcandsfrac,
int * branchorbitidx,
int * nbranchcands )
static

filter out symmetric variables from branching variables

Parameters
scipSCIP data structure
branchruledatabranching rule data
origbranchcandsoriginal branching candidates
origbranchcandssoloriginal solution value for the branching candidates
origbranchcandsfracoriginal fractional part of the branching candidates
norigbranchcandsoriginal number of branching candidates
branchcandsbranching candidates
branchcandssolsolution value for the branching candidates
branchcandsfracfractional part of the branching candidates
branchorbitidxarray of indices of orbit of branching candidates
nbranchcandspointer to store number of branching candidates

Definition at line 276 of file branch_relpscost.c.

References assert(), i, NULL, SCIP_OKAY, SCIP_Real, SCIPdebugMsg, SCIPhashmapGetImageInt(), and varidx.

Referenced by SCIP_DECL_BRANCHEXECLP().

◆ SCIPupdateVarPseudocostSymmetric()

SCIP_RETCODE SCIPupdateVarPseudocostSymmetric ( SCIP * scip,
SCIP_BRANCHRULEDATA * branchruledata,
SCIP_VAR * branchvar,
int * branchorbitidx,
int branchvaridx,
SCIP_Real solvaldelta,
SCIP_Real objdelta,
SCIP_Real weight )
static

updates the pseudo costs of the given variable and all its symmetric variables

Parameters
scipSCIP data structure
branchruledatabranching rule data
branchvarbranching variable candidate
branchorbitidxarray of orbit indices
branchvaridxindex of variable in branchorbitidx
solvaldeltadifference of variable's new LP value - old LP value
objdeltadifference of new LP's objective value - old LP's objective value
weightweight in (0,1] of this update in pseudo cost sum

Definition at line 359 of file branch_relpscost.c.

References assert(), i, NULL, SCIP_Bool, SCIP_BOUNDCHGTYPE_BRANCHING, SCIP_CALL, SCIP_INVALID, SCIP_OKAY, SCIP_Real, SCIPboundchgGetBoundchgtype(), SCIPboundchgGetLPSolVal(), SCIPboundchgGetNewbound(), SCIPboundchgGetVar(), SCIPdomchgGetBoundchg(), SCIPdomchgGetNBoundchgs(), SCIPgetBoolParam(), SCIPgetFocusNode(), SCIPnodeGetDepth(), SCIPnodeGetDomchg(), SCIPupdateVarAncPseudocost(), SCIPupdateVarPseudocost(), SCIPvarIsActive(), SCIPvarIsIntegral(), and var.

Referenced by execRelpscost().

◆ countNonlinearities()

SCIP_RETCODE countNonlinearities ( SCIP * scip,
int * nlcount,
int nlcountsize,
int * nlcountmax )
static

! [SnippetCodeStyleDeclaration] counts number of nonlinear constraints in which each variable appears

! [SnippetCodeStyleDeclaration]

! [SnippetCodeStyleIfFor]

! [SnippetCodeStyleIfFor]

Parameters
scipSCIP data structure
nlcountpointer to array for storing count values
nlcountsizebuffer for storing length of nlcount array
nlcountmaxbuffer for storing maximum value in nlcount array

Definition at line 459 of file branch_relpscost.c.

References assert(), BMSclearMemoryArray, c, i, NULL, nvars, SCIP_CALL, SCIP_OKAY, SCIPconshdlrGetConss(), SCIPconshdlrGetNActiveConss(), SCIPfindConshdlr(), SCIPgetNLPVarsNonlinearity(), SCIPgetNNLPVars(), SCIPgetNVarsAnd(), SCIPgetResultantAnd(), SCIPgetVarsAnd(), SCIPgetVarsData(), SCIPisNLPConstructed(), SCIPvarGetProbindex(), SCIPvarGetProbvar(), and vars.

Referenced by branchruledataEnsureNlcount().

◆ branchruledataEnsureNlcount()

SCIP_RETCODE branchruledataEnsureNlcount ( SCIP * scip,
SCIP_BRANCHRULEDATA * branchruledata )
static
Parameters
scipSCIP data structure
branchruledatabranching rule data

Definition at line 545 of file branch_relpscost.c.

References assert(), BMSclearMemoryArray, countNonlinearities(), NULL, nvars, SCIP_CALL, SCIP_OKAY, SCIPallocBlockMemoryArray, SCIPfreeBlockMemoryArrayNull, SCIPgetNVars(), and SCIPreallocBlockMemoryArray.

Referenced by execRelpscost().

◆ calcNlscore()

SCIP_Real calcNlscore ( SCIP * scip,
int * nlcount,
int nlcountmax,
int probindex )
static

calculates nlscore value between 0 and 1

Parameters
scipSCIP data structure
nlcountarray to store count values
nlcountmaxmaximum value in nlcount array
probindexindex of branching candidate

Definition at line 592 of file branch_relpscost.c.

References assert(), NULL, SCIP_Real, and SCIPgetNVars().

Referenced by execRelpscost().

◆ calcScore()

SCIP_Real calcScore ( SCIP * scip,
SCIP_BRANCHRULEDATA * branchruledata,
SCIP_Real conflictscore,
SCIP_Real avgconflictscore,
SCIP_Real conflengthscore,
SCIP_Real avgconflengthscore,
SCIP_Real inferencescore,
SCIP_Real avginferencescore,
SCIP_Real cutoffscore,
SCIP_Real avgcutoffscore,
SCIP_Real gmieffscore,
SCIP_Real lastgmieffscore,
SCIP_Real pscostscore,
SCIP_Real avgpscostscore,
SCIP_Real nlscore,
SCIP_Real frac,
SCIP_Real degeneracyfactor )
static

calculates an overall score value for the given individual score values

Parameters
scipSCIP data structure
branchruledatabranching rule data
conflictscoreconflict score of current variable
avgconflictscoreaverage conflict score
conflengthscoreconflict length score of current variable
avgconflengthscoreaverage conflict length score
inferencescoreinference score of current variable
avginferencescoreaverage inference score
cutoffscorecutoff score of current variable
avgcutoffscoreaverage cutoff score
gmieffscorenormalized-eff of avg GMI cuts from row when var was frac and basic
lastgmieffscorelast normalized gmieffscore when var was frac and basic
pscostscorepscost score of current variable
avgpscostscoreaverage pscost score
nlscorenonlinear score of current variable between 0 and 1
fracfractional value of variable in current solution
degeneracyfactorfactor to apply because of degeneracy

Definition at line 619 of file branch_relpscost.c.

References assert(), frac, MIN, NULL, SCIP_Real, SCIPfeastol(), SCIPgetNInfeasibleLeaves(), and SCIPgetNObjlimLeaves().

Referenced by execRelpscost().

◆ addBdchg()

SCIP_RETCODE addBdchg ( SCIP * scip,
int ** bdchginds,
SCIP_BOUNDTYPE ** bdchgtypes,
SCIP_Real ** bdchgbounds,
int * nbdchgs,
int ind,
SCIP_BOUNDTYPE type,
SCIP_Real bound )
static

adds given index and direction to bound change arrays

Parameters
scipSCIP data structure
bdchgindspointer to bound change index array
bdchgtypespointer to bound change types array
bdchgboundspointer to bound change new bounds array
nbdchgspointer to number of bound changes
indindex to store in bound change index array
typetype of the bound change to store in bound change type array
boundnew bound to store in bound change new bounds array

Definition at line 671 of file branch_relpscost.c.

References assert(), bound, NULL, SCIP_CALL, SCIP_OKAY, SCIP_Real, and SCIPreallocBufferArray.

Referenced by execRelpscost().

◆ freeBdchgs()

void freeBdchgs ( SCIP * scip,
int ** bdchginds,
SCIP_BOUNDTYPE ** bdchgtypes,
SCIP_Real ** bdchgbounds,
int * nbdchgs )
static

! [SnippetCodeStyleStaticAsserts] frees bound change arrays

! [SnippetCodeStyleStaticAsserts]

Parameters
scipSCIP data structure
bdchgindspointer to bound change index array
bdchgtypespointer to bound change types array
bdchgboundspointer to bound change new bounds array
nbdchgspointer to number of bound changes

Definition at line 705 of file branch_relpscost.c.

References assert(), NULL, SCIP_Real, and SCIPfreeBufferArrayNull.

Referenced by execRelpscost().

◆ applyBdchgs()

SCIP_RETCODE applyBdchgs ( SCIP * scip,
SCIP_VAR ** vars,
int * bdchginds,
SCIP_BOUNDTYPE * bdchgtypes,
SCIP_Real * bdchgbounds,
int nbdchgs,
SCIP_RESULT * result )
static

applies bound changes stored in bound change arrays

Parameters
scipSCIP data structure
varsproblem variables
bdchgindsbound change index array
bdchgtypesbound change types array
bdchgboundsbound change new bound array
nbdchgsnumber of bound changes
resultresult pointer

Definition at line 728 of file branch_relpscost.c.

References assert(), BRANCHRULE_NAME, i, NULL, result, SCIP_Bool, SCIP_BOUNDTYPE_LOWER, SCIP_BOUNDTYPE_UPPER, SCIP_CALL, SCIP_CUTOFF, SCIP_OKAY, SCIP_Real, SCIPbranchruleGetData(), SCIPdebugMsg, SCIPfindBranchrule(), SCIPtightenVarLb(), SCIPtightenVarUb(), SCIPvarGetLbLocal(), SCIPvarGetName(), SCIPvarGetUbLocal(), TRUE, and vars.

Referenced by execRelpscost().

◆ updateMinMaxMeanGain()

SCIP_RETCODE updateMinMaxMeanGain ( SCIP * scip,
SCIP_BRANCHRULE * branchrule,
SCIP_Real downgain,
SCIP_Real upgain )
static

Update the min/max gain, and the mean of all gains computed so far.

This mean is used in the definition of the exponential distribution.

Parameters
scipSCIP data structure
branchrulebranching rule
downgaingain for branching downwards
upgaingain for branching upwards

Definition at line 808 of file branch_relpscost.c.

References assert(), GEOMMEANSHIFT, MAX, MAXGAINTHRESHOLD, MIN, MINGAINTHRESHOLD, NULL, SCIP_OKAY, SCIP_Real, SCIPbranchruleGetData(), SCIPdebugMsg, SCIPisGE(), and SCIPisRelGE().

Referenced by execRelpscost().

◆ strongBranchingDepth()

SCIP_Real strongBranchingDepth ( SCIP_Real gap,
SCIP_Real maxmeangain )
static

compute the depth of the tree with the assumption that left and right dual gains are equal

Parameters
gapgap to be closed
maxmeangainmaximum mean gain of the branching candidates

Definition at line 866 of file branch_relpscost.c.

References assert(), depth, MAX, MINGAINTHRESHOLD, and SCIP_Real.

Referenced by continueStrongBranchingTreeSizeEstimation().

◆ strongBranchingTreeSize()

SCIP_Real strongBranchingTreeSize ( SCIP_Real estimatedepth)
static

compute the size of the tree with the assumption that left and right dual gains are equal

Parameters
estimatedepthestimated depth of the tree

Definition at line 880 of file branch_relpscost.c.

References SCIP_Real.

Referenced by continueStrongBranchingTreeSizeEstimation(), and expectedTreeSize().

◆ cdfProbability()

SCIP_Real cdfProbability ( SCIP_Real rate,
SCIP_Real zeroprob,
SCIP_Real proposedgain,
SCIP_Real mingain,
SCIP_Real logmeangain,
SCIP_Real logstdevgain,
int distributioncdf )
static

calculate the cumulative distribution function (CDF) value for a mixture of a Dirac at zero and a continuous distribution (depending on distributioncdf)

Parameters
raterate of the distribution
zeroprobprobability of zero gain
proposedgainproposed gain
mingainminimum gain
logmeangainlogarithm og mean gain
logstdevgainlogarithm of standard deviation of gain
distributioncdfdistribution type (PARETODISTRIBUTION, EXPONENTIALDISTRIBUTION, LOGNORMALDISTRIBUTION)

Definition at line 889 of file branch_relpscost.c.

References assert(), EXPONENTIALDISTRIBUTION, LOGNORMALDISTRIBUTION, PARETODISTRIBUTION, and SCIP_Real.

Referenced by expectedTreeSize().

◆ expectedTreeSize()

SCIP_Real expectedTreeSize ( SCIP * scip,
SCIP_Real gap,
SCIP_Real zeroprob,
SCIP_Real currentdepth,
SCIP_Real lambda,
SCIP_Real mingain,
SCIP_Real logmeangain,
SCIP_Real logstdevgain,
int distributioncdf )
static

calculate the expected size of a tree with one more iteration of strong branching

Parameters
scipSCIP data structure
gapgap to be closed
zeroprobprobability of zero gain
currentdepthcurrent depth of the tree
lambdarate of the distribution
mingainminimum gain
logmeangainlogarithm of mean gain
logstdevgainlogarithm of standard deviation of gain
distributioncdfdistribution type (PARETODISTRIBUTION, EXPONENTIALDISTRIBUTION, LOGNORMALDISTRIBUTION)

Definition at line 920 of file branch_relpscost.c.

References cdfProbability(), depth, MINGAINTHRESHOLD, SCIP_Real, SCIPdebugMsg, SCIPinfinity(), and strongBranchingTreeSize().

Referenced by continueStrongBranchingTreeSizeEstimation().

◆ continueStrongBranchingLookahead()

SCIP_Bool continueStrongBranchingLookahead ( SCIP * scip,
int candidx,
int ninitcands,
SCIP_Real lookahead,
SCIP_Real maxlookahead,
int nbdchgs,
int nbdconflicts,
int maxbdchgs,
SCIP_Longint maxnsblpiterations )
static

decide if we continue strong branching based based on lookahead

Parameters
scipSCIP data structure
candidxindex of the branching candidate
ninitcandsnumber of initial candidates
lookaheadlookahead value
maxlookaheadmaximum lookahead value
nbdchgsnumber of bound changes found
nbdconflictsnumber of bound conflicts found
maxbdchgsmaximal number of bound tightenings before the node is reevaluated
maxnsblpiterationsmaximal number of strong branching LP iterations

Definition at line 1001 of file branch_relpscost.c.

References SCIP_Bool, SCIP_Longint, SCIP_Real, and SCIPgetNStrongbranchLPIterations().

Referenced by execRelpscost().

◆ continueStrongBranchingTreeSizeEstimation()

SCIP_Bool continueStrongBranchingTreeSizeEstimation ( SCIP * scip,
SCIP_BRANCHRULEDATA * branchruledata,
SCIP_Real lookahead,
SCIP_Real maxlookahead )
static

Decide if we continue strong branching based on the estimation of the tree size given the current gains.

Parameters
scipSCIP data structure
branchruledatabranching rule data
lookaheadlookahead value
maxlookaheadmaximum lookahead value

Definition at line 1019 of file branch_relpscost.c.

References assert(), expectedTreeSize(), EXPONENTIALDISTRIBUTION, FALSE, LOGNORMALDISTRIBUTION, PARETODISTRIBUTION, SCIP_Bool, SCIP_Real, SCIPdebugMsg, SCIPgetCurrentNode(), SCIPgetNodeLowerbound(), SCIPgetUpperbound(), SCIPinfinity(), SCIPisGT(), SCIPisInfinity(), SCIPisLE(), SCIPisZero(), strongBranchingDepth(), strongBranchingTreeSize(), and TRUE.

Referenced by execRelpscost().

◆ needsStrongBranching()

SCIP_Bool needsStrongBranching ( SCIP * scip,
SCIP_BRANCHRULE * branchrule,
SCIP_VAR * branchcand,
SCIP_Real branchcandfrac,
SCIP_VAR * bestpscand,
SCIP_Real bestpscandfrac,
SCIP_Real reliable,
SCIP_Real relerrorthreshold,
SCIP_CONFIDENCELEVEL clevel,
SCIP_Bool useancpscost )
static

determine if strong branching is needed on the given candidate variable

Parameters
scipSCIP data structure
branchrulebranching rule
branchcandbranching candidate
branchcandfracfractional part of the branching candidate
bestpscandbest candidate as per pscost score, must be present if usehyptestforreliability is used
bestpscandfracfractional part of the best candidate as per pscost score, must be present if usehyptestforreliability is used
reliablesize threshold for reliability
relerrorthresholdrelative error threshold for reliability
clevelconfidence level
useancpscostcheck reliability for ancpscost as well

Definition at line 1111 of file branch_relpscost.c.

References assert(), FALSE, MIN, NULL, SCIP_Bool, SCIP_BRANCHDIR_DOWNWARDS, SCIP_BRANCHDIR_UPWARDS, SCIP_Real, SCIPbranchruleGetData(), SCIPgetVarAncPseudocostCountCurrentRun(), SCIPgetVarPseudocostCountCurrentRun(), SCIPisVarPscostRelerrorReliable(), SCIPsignificantVarPscostDifference(), and TRUE.

Referenced by execRelpscost().

◆ execRelpscost()

SCIP_RETCODE execRelpscost ( SCIP * scip,
SCIP_BRANCHRULE * branchrule,
SCIP_VAR ** branchcands,
SCIP_Real * branchcandssol,
SCIP_Real * branchcandsfrac,
int * branchorbitidx,
int nbranchcands,
SCIP_Bool executebranch,
SCIP_RESULT * result )
static

execute reliability pseudo cost branching

Parameters
scipSCIP data structure
branchrulebranching rule
branchcandsbranching candidates
branchcandssolsolution value for the branching candidates
branchcandsfracfractional part of the branching candidates
branchorbitidxindices of orbit (or NULL)
nbranchcandsnumber of branching candidates
executebranchexecute a branching step or run probing only
resultpointer to the result of the execution

Definition at line 1174 of file branch_relpscost.c.

References addBdchg(), applyBdchgs(), assert(), bestcand, branchruledataEnsureNlcount(), c, calcNlscore(), calcScore(), continueStrongBranchingLookahead(), continueStrongBranchingTreeSizeEstimation(), FALSE, freeBdchgs(), i, lperror, MAX, MIN, needsStrongBranching(), nlpiterations, nlps, NULL, nvars, propagate, result, SCIP_Bool, SCIP_BOUNDTYPE_LOWER, SCIP_BOUNDTYPE_UPPER, SCIP_BRANCHDIR_DOWNWARDS, SCIP_BRANCHDIR_UPWARDS, SCIP_BRANCHED, SCIP_CALL, SCIP_CONFIDENCELEVEL_HIGH, SCIP_CONFIDENCELEVEL_LOW, SCIP_CONFIDENCELEVEL_MAX, SCIP_CONFIDENCELEVEL_MEDIUM, SCIP_CONFIDENCELEVEL_MIN, SCIP_CONSADDED, SCIP_CUTOFF, SCIP_DIDNOTRUN, SCIP_INVALID, SCIP_Longint, SCIP_LONGINT_FORMAT, SCIP_LPSOLSTAT_INFEASIBLE, SCIP_LPSOLSTAT_ITERLIMIT, SCIP_LPSOLSTAT_OBJLIMIT, SCIP_LPSOLSTAT_OPTIMAL, SCIP_OKAY, SCIP_Real, SCIP_REDUCEDDOM, SCIP_UNUSED, SCIP_VERBLEVEL_HIGH, SCIPallColsInLP(), SCIPallocBlockMemoryArray, SCIPallocBufferArray, SCIPbranchruleGetData(), SCIPbranchVarVal(), SCIPdebug, SCIPdebugMsg, SCIPendStrongbranch(), SCIPfeasCeil(), SCIPfeasFloor(), SCIPfeasFrac(), SCIPfreeBlockMemoryArray, SCIPfreeBufferArray, SCIPgetAvgConflictlengthScore(), SCIPgetAvgConflictScore(), SCIPgetAvgCutoffScore(), SCIPgetAvgDPseudocostScore(), SCIPgetAvgInferenceScore(), SCIPgetAvgPseudocostScore(), SCIPgetBestSol(), SCIPgetBoolParam(), SCIPgetBranchScore(), SCIPgetCutoffbound(), SCIPgetDepth(), SCIPgetLastStrongbranchLPSolStat(), SCIPgetLocalLowerbound(), SCIPgetLPDualDegeneracy(), SCIPgetLPObjval(), SCIPgetLPSolstat(), SCIPgetNDualResolveLPIterations(), SCIPgetNDualResolveLPs(), SCIPgetNNodeInitLPIterations(), SCIPgetNNodeInitLPs(), SCIPgetNNodeLPIterations(), SCIPgetNNodes(), SCIPgetNodeLowerbound(), SCIPgetNRootStrongbranchLPIterations(), SCIPgetNStrongbranchLPIterations(), SCIPgetNVars(), SCIPgetRealParam(), SCIPgetVarAncPseudocostVal(), SCIPgetVarAvgCutoffScore(), SCIPgetVarAvgGMIScore(), SCIPgetVarAvgInferenceScore(), SCIPgetVarConflictlengthScore(), SCIPgetVarConflictScore(), SCIPgetVarDPseudocostScore(), SCIPgetVarLastGMIScore(), SCIPgetVarPseudocostCountCurrentRun(), SCIPgetVarPseudocostCurrentRun(), SCIPgetVarPseudocostScore(), SCIPgetVarPseudocostScoreCurrentRun(), SCIPgetVarPseudocostVal(), SCIPgetVars(), SCIPgetVarStrongbranchFrac(), SCIPgetVarStrongbranchLast(), SCIPgetVarStrongbranchNode(), SCIPgetVarStrongbranchWithPropagation(), SCIPhasCurrentNodeLP(), SCIPinfinity(), SCIPisExact(), SCIPisFeasIntegral(), SCIPisGE(), SCIPisGT(), SCIPisLPSolBasic(), SCIPisLT(), SCIPisStopped(), SCIPisSumGE(), SCIPisSumGT(), SCIPisZero(), SCIPnodeGetLowerbound(), SCIPpscostThresholdProbabilityTest(), SCIPrandomGetReal(), SCIPsignificantVarPscostDifference(), SCIPsolGetIndex(), SCIPstartStrongbranch(), SCIPtreemodelIsEnabled(), SCIPtreemodelSelectCandidate(), SCIPupdateLocalLowerbound(), SCIPupdateNodeLowerbound(), SCIPupdateVarPseudocostSymmetric(), SCIPvarGetLbLocal(), SCIPvarGetLPSol(), SCIPvarGetName(), SCIPvarGetProbindex(), SCIPvarGetUbLocal(), SCIPverbMessage(), TRUE, updateMinMaxMeanGain(), var, and vars.

Referenced by SCIP_DECL_BRANCHEXECLP(), and SCIPexecRelpscostBranching().

◆ SCIP_DECL_BRANCHCOPY()

SCIP_DECL_BRANCHCOPY ( branchCopyRelpscost )
static

copy method for branchrule plugins (called when SCIP copies plugins)

Definition at line 2343 of file branch_relpscost.c.

References assert(), BRANCHRULE_NAME, NULL, SCIP_CALL, SCIP_OKAY, SCIPbranchruleGetName(), and SCIPincludeBranchruleRelpscost().

◆ SCIP_DECL_BRANCHFREE()

SCIP_DECL_BRANCHFREE ( branchFreeRelpscost )
static

destructor of branching rule to free user data (called when SCIP is exiting)

Definition at line 2357 of file branch_relpscost.c.

References NULL, SCIP_CALL, SCIP_OKAY, SCIPbranchruleGetData(), SCIPbranchruleSetData(), SCIPfreeBlockMemory, and SCIPtreemodelFree().

◆ SCIP_DECL_BRANCHINITSOL()

SCIP_DECL_BRANCHINITSOL ( branchInitsolRelpscost )
static

solving process initialization method of branching rule (called when branch and bound process is about to begin)

Definition at line 2375 of file branch_relpscost.c.

References assert(), NULL, SCIP_CALL, SCIP_OKAY, SCIPbranchruleGetData(), SCIPcreateRandom(), and TRUE.

◆ SCIP_DECL_BRANCHEXITSOL()

SCIP_DECL_BRANCHEXITSOL ( branchExitsolRelpscost )
static

solving process deinitialization method of branching rule (called before branch and bound process data is freed)

Definition at line 2396 of file branch_relpscost.c.

References FALSE, NULL, SCIP_OKAY, SCIPbranchruleGetData(), SCIPfreeBlockMemoryArrayNull, and SCIPfreeRandom().

◆ SCIP_DECL_BRANCHEXECLP()