90#define BRANCHRULE_NAME "RyanFoster"
91#define BRANCHRULE_DESC "Ryan/Foster branching rule"
92#define BRANCHRULE_PRIORITY 50000
93#define BRANCHRULE_MAXDEPTH -1
94#define BRANCHRULE_MAXBOUNDDIST 1.0
148 for(
i = 0;
i < nitems; ++
i )
174 for(
i = 0;
i < nconsids; ++
i )
179 pairweights[id1][id1] += solval;
182 for( j =
i+1; j < nconsids; ++j )
187 pairweights[id2][id1] += solval;
199 for(
i = 0;
i < nitems; ++
i )
201 for( j = 0; j <
i; ++j )
203 value =
MIN(pairweights[
i][j], 1-pairweights[
i][j]);
205 if( bestvalue < value )
215 assert( id1 >= 0 && id1 < nitems);
216 assert( id2 >= 0 && id2 < nitems);
219 for(
i = 0;
i < nitems; ++
i )
265 branchruledata =
NULL;
#define BRANCHRULE_PRIORITY
#define BRANCHRULE_MAXDEPTH
#define BRANCHRULE_MAXBOUNDDIST
SCIP_RETCODE SCIPincludeBranchruleRyanFoster(SCIP *scip)
Ryan/Foster branching rule.
SCIP_RETCODE SCIPcreateConsSamediff(SCIP *scip, SCIP_CONS **cons, const char *name, int itemid1, int itemid2, CONSTYPE type, SCIP_NODE *node, SCIP_Bool local)
Constraint handler stores the local branching decision data.
#define SCIP_LONGINT_FORMAT
SCIP_PROBDATA * SCIPgetProbData(SCIP *scip)
SCIP_RETCODE SCIPaddConsNode(SCIP *scip, SCIP_NODE *node, SCIP_CONS *cons, SCIP_NODE *validnode)
SCIP_Real SCIPgetLocalTransEstimate(SCIP *scip)
SCIP_RETCODE SCIPincludeBranchruleBasic(SCIP *scip, SCIP_BRANCHRULE **branchruleptr, const char *name, const char *desc, int priority, int maxdepth, SCIP_Real maxbounddist, SCIP_BRANCHRULEDATA *branchruledata)
const char * SCIPbranchruleGetName(SCIP_BRANCHRULE *branchrule)
SCIP_RETCODE SCIPsetBranchruleExecLp(SCIP *scip, SCIP_BRANCHRULE *branchrule,)
SCIP_RETCODE SCIPgetLPBranchCands(SCIP *scip, SCIP_VAR ***lpcands, SCIP_Real **lpcandssol, SCIP_Real **lpcandsfrac, int *nlpcands, int *npriolpcands, int *nfracimplvars)
SCIP_RETCODE SCIPcreateChild(SCIP *scip, SCIP_NODE **node, SCIP_Real nodeselprio, SCIP_Real estimate)
SCIP_RETCODE SCIPreleaseCons(SCIP *scip, SCIP_CONS **cons)
#define SCIPallocClearBufferArray(scip, ptr, num)
#define SCIPallocBufferArray(scip, ptr, num)
#define SCIPfreeBufferArray(scip, ptr)
SCIP_Longint SCIPgetNNodes(SCIP *scip)
SCIP_Bool SCIPisFeasGE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisFeasPositive(SCIP *scip, SCIP_Real val)
int SCIPgetDepth(SCIP *scip)
SCIP_VARDATA * SCIPvarGetData(SCIP_VAR *var)
assert(minobj< SCIPgetCutoffbound(scip))
int * SCIPprobdataGetIds(SCIP_PROBDATA *probdata)
int SCIPprobdataGetNItems(SCIP_PROBDATA *probdata)
Problem data for binpacking problem.
#define SCIP_DECL_BRANCHEXECLP(x)
struct SCIP_Branchrule SCIP_BRANCHRULE
struct SCIP_BranchruleData SCIP_BRANCHRULEDATA
struct SCIP_Cons SCIP_CONS
struct SCIP_ProbData SCIP_PROBDATA
enum SCIP_Retcode SCIP_RETCODE
struct SCIP_Node SCIP_NODE
struct SCIP_VarData SCIP_VARDATA
int * SCIPvardataGetConsids(SCIP_VARDATA *vardata)
int SCIPvardataGetNConsids(SCIP_VARDATA *vardata)
Variable data containing the ids of constraints in which the variable appears.