Scippy

SCIP

Solving Constraint Integer Programs

branch_multinode.c File Reference

Detailed Description

mutlinode branching rule for the set-partitioning part in cycle clustering application.

Author
Leon Eifler

Definition in file branch_multinode.c.

#include <assert.h>
#include "branch_multinode.h"
#include "probdata_cyc.h"
#include "scip/branch_relpscost.h"

Go to the source code of this file.

Macros

#define BRANCHRULE_NAME   "multinode"
 
#define BRANCHRULE_DESC   "multinode branching creates a child for every variable of a setpartitioning constraint"
 
#define BRANCHRULE_PRIORITY   10000000
 
#define BRANCHRULE_MAXDEPTH   -1
 
#define BRANCHRULE_MAXBOUNDDIST   1.0
 

Functions

static SCIP_RETCODE getBranchCands (SCIP *scip, SCIP_VAR **branchcands, SCIP_Real *branchcandssol, SCIP_Real *branchcandsfrac, int *ncands)
 
static SCIP_RETCODE branchOnBin (SCIP *scip, int row, SCIP_RESULT *result)
 
static SCIP_DECL_BRANCHEXECLP (branchExeclpMultinode)
 
SCIP_RETCODE SCIPincludeBranchruleMultinode (SCIP *scip)
 

Macro Definition Documentation

◆ BRANCHRULE_NAME

#define BRANCHRULE_NAME   "multinode"

Definition at line 40 of file branch_multinode.c.

Referenced by SCIPincludeBranchruleMultinode().

◆ BRANCHRULE_DESC

#define BRANCHRULE_DESC   "multinode branching creates a child for every variable of a setpartitioning constraint"

Definition at line 41 of file branch_multinode.c.

Referenced by SCIPincludeBranchruleMultinode().

◆ BRANCHRULE_PRIORITY

#define BRANCHRULE_PRIORITY   10000000

Definition at line 42 of file branch_multinode.c.

Referenced by SCIPincludeBranchruleMultinode().

◆ BRANCHRULE_MAXDEPTH

#define BRANCHRULE_MAXDEPTH   -1

Definition at line 43 of file branch_multinode.c.

Referenced by SCIPincludeBranchruleMultinode().

◆ BRANCHRULE_MAXBOUNDDIST

#define BRANCHRULE_MAXBOUNDDIST   1.0

Definition at line 44 of file branch_multinode.c.

Referenced by SCIPincludeBranchruleMultinode().

Function Documentation

◆ getBranchCands()

static SCIP_RETCODE getBranchCands ( SCIP scip,
SCIP_VAR **  branchcands,
SCIP_Real branchcandssol,
SCIP_Real branchcandsfrac,
int *  ncands 
)
static

get the branching candidates viable for multinode branching

Parameters
scipSCIP data structure
branchcandsthe address of the branching candidates
branchcandssolpointer to solution values of the candidates
branchcandsfracpointer to fractionalities of the candidates
ncandsnumber of branching candidates

Definition at line 54 of file branch_multinode.c.

References MAX, SCIP_OKAY, SCIP_VARSTATUS_COLUMN, SCIPcycGetBinvars(), SCIPcycGetNBins(), SCIPcycGetNCluster(), SCIPisFeasIntegral(), SCIPvarGetLPSol(), and SCIPvarGetStatus().

Referenced by SCIP_DECL_BRANCHEXECLP().

◆ branchOnBin()

static SCIP_RETCODE branchOnBin ( SCIP scip,
int  row,
SCIP_RESULT result 
)
static

branch on a selected bin -> Create at most |Cluster| children

Parameters
scipSCIP data structure
rowthe row in the binvar-matrix (not lp-row) to be branched on
resultpointer to store result of branching

Definition at line 93 of file branch_multinode.c.

References MIN, NULL, SCIP_Bool, SCIP_BRANCHDIR_UPWARDS, SCIP_BRANCHED, SCIP_CALL, SCIP_INVALID, SCIP_OKAY, SCIP_Real, SCIP_VARSTATUS_COLUMN, SCIP_VARSTATUS_LOOSE, SCIPallocClearBufferArray, SCIPcalcChildEstimate(), SCIPcalcNodeselPriority(), SCIPchgVarLbNode(), SCIPchgVarUbNode(), SCIPcreateChild(), SCIPcycGetBinvars(), SCIPcycGetNCluster(), SCIPfreeBufferArray, SCIPisEQ(), SCIPisZero(), SCIPvarGetLPSol(), SCIPvarGetStatus(), and TRUE.

Referenced by SCIP_DECL_BRANCHEXECLP().

◆ SCIP_DECL_BRANCHEXECLP()

◆ SCIPincludeBranchruleMultinode()

SCIP_RETCODE SCIPincludeBranchruleMultinode ( SCIP scip)

creates the mutlinode branching rule and includes it in SCIP

Parameters
scipSCIP data structure

Definition at line 261 of file branch_multinode.c.

References BRANCHRULE_DESC, BRANCHRULE_MAXBOUNDDIST, BRANCHRULE_MAXDEPTH, BRANCHRULE_NAME, BRANCHRULE_PRIORITY, NULL, SCIP_CALL, SCIP_OKAY, SCIPincludeBranchruleBasic(), and SCIPsetBranchruleExecLp().

Referenced by SCIPincludeCycPlugins().