Scippy

SCIP

Solving Constraint Integer Programs

Detailed Description

methods for branching rule plugins

Functions

 SCIP_DECL_SORTPTRCOMP (SCIPbranchruleComp)
 
 SCIP_DECL_SORTPTRCOMP (SCIPbranchruleCompName)
 
SCIP_BRANCHRULEDATASCIPbranchruleGetData (SCIP_BRANCHRULE *branchrule)
 
void SCIPbranchruleSetData (SCIP_BRANCHRULE *branchrule, SCIP_BRANCHRULEDATA *branchruledata)
 
const char * SCIPbranchruleGetName (SCIP_BRANCHRULE *branchrule)
 
const char * SCIPbranchruleGetDesc (SCIP_BRANCHRULE *branchrule)
 
int SCIPbranchruleGetPriority (SCIP_BRANCHRULE *branchrule)
 
int SCIPbranchruleGetMaxdepth (SCIP_BRANCHRULE *branchrule)
 
SCIP_Real SCIPbranchruleGetMaxbounddist (SCIP_BRANCHRULE *branchrule)
 
SCIP_Real SCIPbranchruleGetSetupTime (SCIP_BRANCHRULE *branchrule)
 
SCIP_Real SCIPbranchruleGetTime (SCIP_BRANCHRULE *branchrule)
 
SCIP_Longint SCIPbranchruleGetNLPCalls (SCIP_BRANCHRULE *branchrule)
 
SCIP_Longint SCIPbranchruleGetNExternCalls (SCIP_BRANCHRULE *branchrule)
 
SCIP_Longint SCIPbranchruleGetNPseudoCalls (SCIP_BRANCHRULE *branchrule)
 
SCIP_Longint SCIPbranchruleGetNCutoffs (SCIP_BRANCHRULE *branchrule)
 
SCIP_Longint SCIPbranchruleGetNCutsFound (SCIP_BRANCHRULE *branchrule)
 
SCIP_Longint SCIPbranchruleGetNConssFound (SCIP_BRANCHRULE *branchrule)
 
SCIP_Longint SCIPbranchruleGetNDomredsFound (SCIP_BRANCHRULE *branchrule)
 
SCIP_Longint SCIPbranchruleGetNChildren (SCIP_BRANCHRULE *branchrule)
 
SCIP_Bool SCIPbranchruleIsInitialized (SCIP_BRANCHRULE *branchrule)
 
SCIP_RETCODE SCIPincludeBranchrule (SCIP *scip, const char *name, const char *desc, int priority, int maxdepth, SCIP_Real maxbounddist, SCIP_DECL_BRANCHCOPY((*branchcopy)), SCIP_DECL_BRANCHFREE((*branchfree)), SCIP_DECL_BRANCHINIT((*branchinit)), SCIP_DECL_BRANCHEXIT((*branchexit)), SCIP_DECL_BRANCHINITSOL((*branchinitsol)), SCIP_DECL_BRANCHEXITSOL((*branchexitsol)), SCIP_DECL_BRANCHEXECLP((*branchexeclp)), SCIP_DECL_BRANCHEXECEXT((*branchexecext)), SCIP_DECL_BRANCHEXECPS((*branchexecps)), SCIP_BRANCHRULEDATA *branchruledata)
 
SCIP_RETCODE SCIPincludeBranchruleBasic (SCIP *scip, SCIP_BRANCHRULE **branchruleptr, const char *name, const char *desc, int priority, int maxdepth, SCIP_Real maxbounddist, SCIP_BRANCHRULEDATA *branchruledata)
 
SCIP_RETCODE SCIPsetBranchruleCopy (SCIP *scip, SCIP_BRANCHRULE *branchrule, SCIP_DECL_BRANCHCOPY((*branchcopy)))
 
SCIP_RETCODE SCIPsetBranchruleFree (SCIP *scip, SCIP_BRANCHRULE *branchrule, SCIP_DECL_BRANCHFREE((*branchfree)))
 
SCIP_RETCODE SCIPsetBranchruleInit (SCIP *scip, SCIP_BRANCHRULE *branchrule, SCIP_DECL_BRANCHINIT((*branchinit)))
 
SCIP_RETCODE SCIPsetBranchruleExit (SCIP *scip, SCIP_BRANCHRULE *branchrule, SCIP_DECL_BRANCHEXIT((*branchexit)))
 
SCIP_RETCODE SCIPsetBranchruleInitsol (SCIP *scip, SCIP_BRANCHRULE *branchrule, SCIP_DECL_BRANCHINITSOL((*branchinitsol)))
 
SCIP_RETCODE SCIPsetBranchruleExitsol (SCIP *scip, SCIP_BRANCHRULE *branchrule, SCIP_DECL_BRANCHEXITSOL((*branchexitsol)))
 
SCIP_RETCODE SCIPsetBranchruleExecLp (SCIP *scip, SCIP_BRANCHRULE *branchrule, SCIP_DECL_BRANCHEXECLP((*branchexeclp)))
 
SCIP_RETCODE SCIPsetBranchruleExecExt (SCIP *scip, SCIP_BRANCHRULE *branchrule, SCIP_DECL_BRANCHEXECEXT((*branchexecext)))
 
SCIP_RETCODE SCIPsetBranchruleExecPs (SCIP *scip, SCIP_BRANCHRULE *branchrule, SCIP_DECL_BRANCHEXECPS((*branchexecps)))
 
SCIP_BRANCHRULESCIPfindBranchrule (SCIP *scip, const char *name)
 
SCIP_BRANCHRULE ** SCIPgetBranchrules (SCIP *scip)
 
int SCIPgetNBranchrules (SCIP *scip)
 
SCIP_RETCODE SCIPsetBranchrulePriority (SCIP *scip, SCIP_BRANCHRULE *branchrule, int priority)
 
SCIP_RETCODE SCIPsetBranchruleMaxdepth (SCIP *scip, SCIP_BRANCHRULE *branchrule, int maxdepth)
 
SCIP_RETCODE SCIPsetBranchruleMaxbounddist (SCIP *scip, SCIP_BRANCHRULE *branchrule, SCIP_Real maxbounddist)
 

Function Documentation

◆ SCIP_DECL_SORTPTRCOMP() [1/2]

SCIP_DECL_SORTPTRCOMP ( SCIPbranchruleComp  )

compares two branching rules w. r. to their priority

Definition at line 1185 of file branch.c.

◆ SCIP_DECL_SORTPTRCOMP() [2/2]

SCIP_DECL_SORTPTRCOMP ( SCIPbranchruleCompName  )

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

Definition at line 1191 of file branch.c.

References SCIPbranchruleGetName().

◆ SCIPbranchruleGetData()

◆ SCIPbranchruleSetData()

void SCIPbranchruleSetData ( SCIP_BRANCHRULE branchrule,
SCIP_BRANCHRULEDATA branchruledata 
)

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

Parameters
branchrulebranching rule
branchruledatanew branching rule user data

Definition at line 1784 of file branch.c.

References SCIP_Branchrule::branchruledata, and NULL.

Referenced by SCIP_DECL_BRANCHFREE().

◆ SCIPbranchruleGetName()

◆ SCIPbranchruleGetDesc()

const char* SCIPbranchruleGetDesc ( SCIP_BRANCHRULE branchrule)

gets description of branching rule

Parameters
branchrulebranching rule

Definition at line 1906 of file branch.c.

References SCIP_Branchrule::desc, and NULL.

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

◆ SCIPbranchruleGetPriority()

int SCIPbranchruleGetPriority ( SCIP_BRANCHRULE branchrule)

gets priority of branching rule

Parameters
branchrulebranching rule

Definition at line 1916 of file branch.c.

References NULL, and SCIP_Branchrule::priority.

Referenced by SCIP_DECL_DIALOGEXEC().

◆ SCIPbranchruleGetMaxdepth()

int SCIPbranchruleGetMaxdepth ( SCIP_BRANCHRULE branchrule)

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

Parameters
branchrulebranching rule

Definition at line 1940 of file branch.c.

References SCIP_Branchrule::maxdepth, and NULL.

Referenced by SCIP_DECL_DIALOGEXEC().

◆ SCIPbranchruleGetMaxbounddist()

SCIP_Real SCIPbranchruleGetMaxbounddist ( SCIP_BRANCHRULE branchrule)

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

Parameters
branchrulebranching rule

Definition at line 1962 of file branch.c.

References SCIP_Branchrule::maxbounddist, and NULL.

Referenced by SCIP_DECL_DIALOGEXEC().

◆ SCIPbranchruleGetSetupTime()

SCIP_Real SCIPbranchruleGetSetupTime ( SCIP_BRANCHRULE branchrule)

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

Parameters
branchrulebranching rule

Definition at line 1996 of file branch.c.

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

Referenced by printBranchruleStatistics().

◆ SCIPbranchruleGetTime()

SCIP_Real SCIPbranchruleGetTime ( SCIP_BRANCHRULE branchrule)

gets time in seconds used in this branching rule

Parameters
branchrulebranching rule

Definition at line 2006 of file branch.c.

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

Referenced by printBranchruleStatistics().

◆ SCIPbranchruleGetNLPCalls()

SCIP_Longint SCIPbranchruleGetNLPCalls ( SCIP_BRANCHRULE branchrule)

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

Parameters
branchrulebranching rule

Definition at line 2016 of file branch.c.

References SCIP_Branchrule::nlpcalls, and NULL.

Referenced by printBranchruleStatistics().

◆ SCIPbranchruleGetNExternCalls()

SCIP_Longint SCIPbranchruleGetNExternCalls ( SCIP_BRANCHRULE branchrule)

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

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

Parameters
branchrulebranching rule

Definition at line 2026 of file branch.c.

References SCIP_Branchrule::nexterncalls, and NULL.

Referenced by printBranchruleStatistics().

◆ SCIPbranchruleGetNPseudoCalls()

SCIP_Longint SCIPbranchruleGetNPseudoCalls ( SCIP_BRANCHRULE branchrule)

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

Parameters
branchrulebranching rule

Definition at line 2036 of file branch.c.

References SCIP_Branchrule::npseudocalls, and NULL.

Referenced by printBranchruleStatistics().

◆ SCIPbranchruleGetNCutoffs()

SCIP_Longint SCIPbranchruleGetNCutoffs ( SCIP_BRANCHRULE branchrule)

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

Parameters
branchrulebranching rule

Definition at line 2046 of file branch.c.

References SCIP_Branchrule::ncutoffs, and NULL.

Referenced by printBranchruleStatistics().

◆ SCIPbranchruleGetNCutsFound()

SCIP_Longint SCIPbranchruleGetNCutsFound ( SCIP_BRANCHRULE branchrule)

gets the total number of cuts, the branching rule separated

Parameters
branchrulebranching rule

Definition at line 2056 of file branch.c.

References SCIP_Branchrule::ncutsfound, and NULL.

Referenced by printBranchruleStatistics().

◆ SCIPbranchruleGetNConssFound()

SCIP_Longint SCIPbranchruleGetNConssFound ( SCIP_BRANCHRULE branchrule)

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

Parameters
branchrulebranching rule

Definition at line 2068 of file branch.c.

References SCIP_Branchrule::nconssfound, and NULL.

Referenced by printBranchruleStatistics().

◆ SCIPbranchruleGetNDomredsFound()

SCIP_Longint SCIPbranchruleGetNDomredsFound ( SCIP_BRANCHRULE branchrule)

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

Parameters
branchrulebranching rule

Definition at line 2078 of file branch.c.

References SCIP_Branchrule::ndomredsfound, and NULL.

Referenced by printBranchruleStatistics().

◆ SCIPbranchruleGetNChildren()

SCIP_Longint SCIPbranchruleGetNChildren ( SCIP_BRANCHRULE branchrule)

gets the total number of children, the branching rule created

Parameters
branchrulebranching rule

Definition at line 2088 of file branch.c.

References SCIP_Branchrule::nchildren, and NULL.

Referenced by displayRelevantStats(), and printBranchruleStatistics().

◆ SCIPbranchruleIsInitialized()

SCIP_Bool SCIPbranchruleIsInitialized ( SCIP_BRANCHRULE branchrule)

is branching rule initialized?

Parameters
branchrulebranching rule

Definition at line 2098 of file branch.c.

References SCIP_Branchrule::initialized, and NULL.

Referenced by SCIPsetIncludeNodesel().

◆ SCIPincludeBranchrule()

SCIP_RETCODE SCIPincludeBranchrule ( SCIP scip,
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 and includes it in SCIP

Note
method has all branching rule callbacks as arguments and is thus changed every time a new callback is added in future releases; consider using SCIPincludeBranchruleBasic() and setter functions if you seek for a method which is less likely to change in future releases
Parameters
scipSCIP data structure
namename of branching rule
descdescription of branching rule
prioritypriority of the branching rule
maxdepthmaximal depth level, up to which this branching rule should be used (or -1)
maxbounddistmaximal relative distance from current node's dual bound to primal bound compared to best node's dual bound for applying branching rule (0.0: only on current best node, 1.0: on all nodes)
branchruledatabranching rule data

Definition at line 8953 of file scip.c.

References checkStage(), FALSE, Scip::mem, Scip::messagehdlr, NULL, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIPbranchruleCreate(), SCIPerrorMessage, SCIPfindBranchrule(), SCIPsetIncludeBranchrule(), Scip::set, SCIP_Mem::setmem, and TRUE.

Referenced by SCIPincludeObjBranchrule().

◆ SCIPincludeBranchruleBasic()

SCIP_RETCODE SCIPincludeBranchruleBasic ( SCIP scip,
SCIP_BRANCHRULE **  branchruleptr,
const char *  name,
const char *  desc,
int  priority,
int  maxdepth,
SCIP_Real  maxbounddist,
SCIP_BRANCHRULEDATA branchruledata 
)

creates a branching rule and includes it in SCIP. All non-fundamental (or optional) callbacks will be set to NULL. Optional callbacks can be set via specific setter functions, see SCIPsetBranchruleInit(), SCIPsetBranchruleExit(), SCIPsetBranchruleCopy(), SCIPsetBranchruleFree(), SCIPsetBranchruleInitsol(), SCIPsetBranchruleExitsol(), SCIPsetBranchruleExecLp(), SCIPsetBranchruleExecExt(), and SCIPsetBranchruleExecPs().

Note
if you want to set all callbacks with a single method call, consider using SCIPincludeBranchrule() instead
Parameters
scipSCIP data structure
branchruleptrpointer to branching rule, or NULL
namename of branching rule
descdescription of branching rule
prioritypriority of the branching rule
maxdepthmaximal depth level, up to which this branching rule should be used (or -1)
maxbounddistmaximal relative distance from current node's dual bound to primal bound compared to best node's dual bound for applying branching rule (0.0: only on current best node, 1.0: on all nodes)
branchruledatabranching rule data

Definition at line 9001 of file scip.c.

References checkStage(), FALSE, Scip::mem, Scip::messagehdlr, NULL, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIPbranchruleCreate(), SCIPerrorMessage, SCIPfindBranchrule(), SCIPsetIncludeBranchrule(), Scip::set, SCIP_Mem::setmem, and TRUE.

Referenced by SCIPincludeBranchruleAllfullstrong(), SCIPincludeBranchruleCloud(), SCIPincludeBranchruleDistribution(), SCIPincludeBranchruleFullstrong(), SCIPincludeBranchruleInference(), SCIPincludeBranchruleLeastinf(), SCIPincludeBranchruleMostinf(), SCIPincludeBranchruleMultAggr(), SCIPincludeBranchruleNodereopt(), SCIPincludeBranchrulePscost(), SCIPincludeBranchruleRandom(), SCIPincludeBranchruleRelpscost(), and SCIPincludeBranchruleRyanFoster().

◆ SCIPsetBranchruleCopy()

◆ SCIPsetBranchruleFree()

◆ SCIPsetBranchruleInit()

SCIP_RETCODE SCIPsetBranchruleInit ( SCIP scip,
SCIP_BRANCHRULE branchrule,
SCIP_DECL_BRANCHINIT((*branchinit))   
)

sets initialization method of branching rule

Parameters
scipSCIP data structure
branchrulebranching rule

Definition at line 9070 of file scip.c.

References checkStage(), FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPbranchruleSetInit(), and TRUE.

Referenced by SCIPincludeBranchruleAllfullstrong(), SCIPincludeBranchruleCloud(), SCIPincludeBranchruleFullstrong(), SCIPincludeBranchruleMultAggr(), SCIPincludeBranchrulePscost(), and SCIPincludeBranchruleRandom().

◆ SCIPsetBranchruleExit()

SCIP_RETCODE SCIPsetBranchruleExit ( SCIP scip,
SCIP_BRANCHRULE branchrule,
SCIP_DECL_BRANCHEXIT((*branchexit))   
)

sets deinitialization method of branching rule

Parameters
scipSCIP data structure
branchrulebranching rule

Definition at line 9086 of file scip.c.

References checkStage(), FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPbranchruleSetExit(), and TRUE.

Referenced by SCIPincludeBranchruleFullstrong(), SCIPincludeBranchruleMultAggr(), SCIPincludeBranchrulePscost(), and SCIPincludeBranchruleRandom().

◆ SCIPsetBranchruleInitsol()

SCIP_RETCODE SCIPsetBranchruleInitsol ( SCIP scip,
SCIP_BRANCHRULE branchrule,
SCIP_DECL_BRANCHINITSOL((*branchinitsol))   
)

sets solving process initialization method of branching rule

Parameters
scipSCIP data structure
branchrulebranching rule

Definition at line 9102 of file scip.c.

References checkStage(), FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPbranchruleSetInitsol(), and TRUE.

Referenced by SCIPincludeBranchruleRelpscost().

◆ SCIPsetBranchruleExitsol()

SCIP_RETCODE SCIPsetBranchruleExitsol ( SCIP scip,
SCIP_BRANCHRULE branchrule,
SCIP_DECL_BRANCHEXITSOL((*branchexitsol))   
)

sets solving process deinitialization method of branching rule

Parameters
scipSCIP data structure
branchrulebranching rule

Definition at line 9118 of file scip.c.

References checkStage(), FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPbranchruleSetExitsol(), and TRUE.

Referenced by SCIPincludeBranchruleDistribution(), and SCIPincludeBranchruleRelpscost().

◆ SCIPsetBranchruleExecLp()

◆ SCIPsetBranchruleExecExt()

SCIP_RETCODE SCIPsetBranchruleExecExt ( SCIP scip,
SCIP_BRANCHRULE branchrule,
SCIP_DECL_BRANCHEXECEXT((*branchexecext))   
)

sets branching execution method for external candidates

Parameters
scipSCIP data structure
branchrulebranching rule

Definition at line 9152 of file scip.c.

References checkStage(), FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPbranchruleSetExecExt(), and TRUE.

Referenced by SCIPincludeBranchruleInference(), SCIPincludeBranchruleLeastinf(), SCIPincludeBranchruleMostinf(), SCIPincludeBranchruleNodereopt(), SCIPincludeBranchrulePscost(), and SCIPincludeBranchruleRandom().

◆ SCIPsetBranchruleExecPs()

SCIP_RETCODE SCIPsetBranchruleExecPs ( SCIP scip,
SCIP_BRANCHRULE branchrule,
SCIP_DECL_BRANCHEXECPS((*branchexecps))   
)

sets branching execution method for not completely fixed pseudo solutions

Parameters
scipSCIP data structure
branchrulebranching rule

Definition at line 9168 of file scip.c.

References checkStage(), FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPbranchruleSetExecPs(), and TRUE.

Referenced by SCIPincludeBranchruleAllfullstrong(), SCIPincludeBranchruleInference(), SCIPincludeBranchruleNodereopt(), and SCIPincludeBranchruleRandom().

◆ SCIPfindBranchrule()

◆ SCIPgetBranchrules()

SCIP_BRANCHRULE** SCIPgetBranchrules ( SCIP scip)

returns the array of currently available branching rules

Parameters
scipSCIP data structure

Definition at line 9199 of file scip.c.

References SCIP_Set::branchrules, NULL, and Scip::set.

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

◆ SCIPgetNBranchrules()

int SCIPgetNBranchrules ( SCIP scip)

returns the number of currently available branching rules

Parameters
scipSCIP data structure

Definition at line 9210 of file scip.c.

References SCIP_Set::nbranchrules, NULL, and Scip::set.

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

◆ SCIPsetBranchrulePriority()

SCIP_RETCODE SCIPsetBranchrulePriority ( SCIP scip,
SCIP_BRANCHRULE branchrule,
int  priority 
)

sets the priority of a branching rule

Parameters
scipSCIP data structure
branchrulebranching rule
prioritynew priority of the branching rule

Definition at line 9221 of file scip.c.

References NULL, SCIP_OKAY, SCIPbranchruleSetPriority(), and Scip::set.

Referenced by SCIP_DECL_PARAMCHGD().

◆ SCIPsetBranchruleMaxdepth()

SCIP_RETCODE SCIPsetBranchruleMaxdepth ( SCIP scip,
SCIP_BRANCHRULE branchrule,
int  maxdepth 
)

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

Parameters
scipSCIP data structure
branchrulebranching rule
maxdepthnew maxdepth of the branching rule

Definition at line 9236 of file scip.c.

References NULL, SCIP_OKAY, SCIPbranchruleSetMaxdepth(), and Scip::set.

◆ SCIPsetBranchruleMaxbounddist()

SCIP_RETCODE SCIPsetBranchruleMaxbounddist ( SCIP scip,
SCIP_BRANCHRULE branchrule,
SCIP_Real  maxbounddist 
)

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

Parameters
scipSCIP data structure
branchrulebranching rule
maxbounddistnew maxbounddist of the branching rule

Definition at line 9251 of file scip.c.

References NULL, SCIP_OKAY, SCIPbranchruleSetMaxbounddist(), and Scip::set.