SCIP_BranchruleData
113 return0.2 *
MAX( val1, val2 ) + 0.8 *
MIN( val1, val2 );
124 if( branchruledata->fixingsscoremode == 1 )
126 return3*samevalue+differvalue;
128 if( branchruledata->fixingsscoremode == 2 )
130 return2*samevalue+differvalue;
132 if( branchruledata->fixingsscoremode == 3 )
134 returnsamevalue+10*differvalue;
136 if( branchruledata->fixingsscoremode == 4 )
138 if( samevalue == -1 && differvalue == -1 )
140 returnsamevalue*differvalue;
142 returnsamevalue*differvalue;
158assert(node1 >= 0 && node2 >= 0);
170 for( i = 0; i < node1; i++ )
172ind += ( node2-node1-1);
189assert(node2 !=
NULL&& node1 !=
NULL);
194 while( value +
nnodes- 1 - *node1 <= ind )
196value += (
nnodes- 1 - *node1);
199*node2 = *node1 + 1 + (ind - value);
227assert(branchruledata !=
NULL);
233assert(graph !=
NULL);
237 for( i = 0; i < branchruledata->length; i++ )
241 if( tcliqueIsEdge(graph, node1, node2) )
243branchruledata->samevalue[i] = -1;
244branchruledata->differvalue[i] = -1;
247branchruledata->samevalue[i] = 0;
248branchruledata->differvalue[i] = 0;
253 for( i = 0; i < nlpcands; i++ )
259 for( j = 0; j < setlength; j++ )
268 for( node2 =
nnodes-1; node2 >= 0; node2-- )
276 if( node2 == node1 )
286 if( branchruledata->differvalue[
nodes2index(
scip, node1, node2)] == -1 )
291 if( k < setlength && node2 ==
set[k] )
293branchruledata->differvalue[
nodes2index(
scip, node1, node2)] += lpcandsfrac[i];
300branchruledata->samevalue[
nodes2index(
scip, node1, node2)] += lpcandsfrac[i];
304assert(k == setlength);
332assert(newlb !=
NULL);
370assert(values !=
NULL);
372 if( values[ind1] > values[ind2] )
376 if( values[ind1] < values[ind2] )
393assert(branchrule !=
NULL);
442assert(branchrule !=
NULL);
444assert(result !=
NULL);
453 if( branchruledata->branchingmode == 2 )
457 for( i = 0; i < branchruledata->length; i++ )
459branchruledata->combinedvalue[i] =
computeFixingsScore(branchruledata->samevalue[i], branchruledata->differvalue[i], branchruledata);
463 SCIPsort(branchruledata->permutation, consdataCompValues, branchruledata->combinedvalue, branchruledata->length);
471 for( i = 0; i < branchruledata->lookahead && i < branchruledata->length; i++ )
478 if( sameLb-currLb > 1000 )
480sameLb = currLb + 1000;
485 if( differLb-currLb > 1000 )
487differLb = currLb + 1000;
490score =
computeScore( sameLb - currLb, differLb-currLb );
494 if( score > bestscore )
499bestdiffer = differLb-currLb;
500bestsame = sameLb-currLb;
502 if( bestdiffer > 999 || bestsame > 999 )
511assert(branchruledata->branchingmode == 0 || branchruledata->branchingmode == 1);
535 if( wasnode1[node1] ==
TRUE)
541wasnode1[node1] =
TRUE;
545 for( j = i+1; j <
nnodes; j++ )
548 if( node2 == node1 || tcliqueIsEdge(graph, node1, node2) || node2 < i )
555 if( wasnode2[node2] ==
TRUE)
continue;
556 elsewasnode2[node2] =
TRUE;
567 if( sameLb-currLb > 1000 )
569sameLb = currLb + 1000;
574 if( differLb-currLb > 1000 )
576differLb = currLb + 1000;
579score =
computeScore( sameLb-currLb, differLb-currLb );
580 if( score > bestscore )
585bestdiffer = differLb-currLb;
586bestsame = sameLb-currLb;
588 if( (branchruledata->branchingmode == 1) && (bestdiffer > 999 || bestsame > 999) )
595 if( (branchruledata->branchingmode == 1) && (bestdiffer > 999 || bestsame > 999) )
616 if( branchruledata->branchingmode >= 1 && branchruledata->usetclique ==
TRUE)
621 if( bestdiffer <= 999 )
638 if( bestsame <= 999 )
707assert(branchruledata !=
NULL);
727assert(branchruledata !=
NULL);
759assert(branchrule !=
NULL);
769 "branching/strongcoloring/lookahead",
770 "number of candidates to be considered in branchingmode 2",
774 "branching/strongcoloring/usetclique",
775 "should the exact pricing with the tclique-algorithm be used for the strongbranchings?",
779 "branching/strongcoloring/maxpricingrounds",
780 "maximal number of pricing rounds used for each probing node in the strongbranching",
784 "branching/strongcoloring/branchingmode",
785 "determines the branchingmode, 0: fullstrong branching, 1: strong branching, take first possible branching with only one child-node, 2: strong branching with prior sorting of candidates w.r.t. the fractional value of concerned sets */",
789 "branching/strongcoloring/fixingsscoremode",
790 "determines the weightings of the two factors for prior sorting by fractional LP value",
static SCIP_DECL_SORTINDCOMP(consdataCompValues)
#define BRANCHRULE_PRIORITY
static double computeScore(SCIP_Real val1, SCIP_Real val2)
static SCIP_RETCODE executeStrongBranching(SCIP *scip, COLOR_CONSTYPE constype, int node1, int node2, SCIP_BRANCHRULEDATA *branchruledata, SCIP_Real *newlb)
SCIP_RETCODE SCIPincludeBranchruleStrongcoloring(SCIP *scip)
static SCIP_DECL_BRANCHEXIT(branchExitStrongcoloring)
static int nodes2index(SCIP *scip, int node1, int node2)
static SCIP_DECL_BRANCHCOPY(branchCopyStrongcoloring)
static void index2nodes(SCIP *scip, int ind, int *node1, int *node2)
#define DEFAULT_MAXPRICINGROUNDS
#define DEFAULT_USETCLIQUE
static SCIP_DECL_BRANCHINIT(branchInitStrongcoloring)
static SCIP_DECL_BRANCHFREE(branchFreeStrongcoloring)
#define DEFAULT_BRANCHINGMODE
#define DEFAULT_LOOKAHEAD
static SCIP_DECL_BRANCHEXECLP(branchExeclpStrongcoloring)
static SCIP_Real computeFixingsScore(SCIP_Real samevalue, SCIP_Real differvalue, SCIP_BRANCHRULEDATA *branchruledata)
#define BRANCHRULE_MAXDEPTH
static SCIP_RETCODE computeBranchingPriorities(SCIP *scip, SCIP_BRANCHRULEDATA *branchruledata)
#define DEFAULT_FIXINGSSCOREMODE
#define BRANCHRULE_MAXBOUNDDIST
branching rule performing strong branching for the vertex coloring problem
TCLIQUE_GRAPH * COLORconsGetCurrentGraph(SCIP *scip)
SCIP_RETCODE COLORcreateConsStoreGraph(SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_CONS *fatherconstraint, COLOR_CONSTYPE type, int node1, int node2, SCIP_NODE *stickingnode)
int COLORconsGetRepresentative(SCIP *scip, int node)
SCIP_CONS * COLORconsGetActiveStoreGraphCons(SCIP *scip)
enum COLOR_ConsType COLOR_CONSTYPE
SCIP_RETCODE SCIPdelCons(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPaddConsNode(SCIP *scip, SCIP_NODE *node, SCIP_CONS *cons, SCIP_NODE *validnode)
SCIP_Real SCIPgetLocalTransEstimate(SCIP *scip)
SCIP_RETCODE SCIPaddIntParam(SCIP *scip, const char *name, const char *desc, int *valueptr, SCIP_Bool isadvanced, int defaultvalue, int minvalue, int maxvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
SCIP_RETCODE SCIPaddBoolParam(SCIP *scip, const char *name, const char *desc, SCIP_Bool *valueptr, SCIP_Bool isadvanced, SCIP_Bool defaultvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
SCIP_RETCODE SCIPsetBoolParam(SCIP *scip, const char *name, SCIP_Bool value)
SCIP_RETCODE SCIPsetBranchruleExit(SCIP *scip, SCIP_BRANCHRULE *branchrule, SCIP_DECL_BRANCHEXIT((*branchexit)))
SCIP_RETCODE SCIPsetBranchruleExecLp(SCIP *scip, SCIP_BRANCHRULE *branchrule, SCIP_DECL_BRANCHEXECLP((*branchexeclp)))
SCIP_RETCODE SCIPsetBranchruleCopy(SCIP *scip, SCIP_BRANCHRULE *branchrule, SCIP_DECL_BRANCHCOPY((*branchcopy)))
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_BRANCHRULEDATA * SCIPbranchruleGetData(SCIP_BRANCHRULE *branchrule)
SCIP_RETCODE SCIPsetBranchruleFree(SCIP *scip, SCIP_BRANCHRULE *branchrule, SCIP_DECL_BRANCHFREE((*branchfree)))
SCIP_RETCODE SCIPsetBranchruleInit(SCIP *scip, SCIP_BRANCHRULE *branchrule, SCIP_DECL_BRANCHINIT((*branchinit)))
void SCIPbranchruleSetData(SCIP_BRANCHRULE *branchrule, SCIP_BRANCHRULEDATA *branchruledata)
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_Bool SCIPconsIsEnabled(SCIP_CONS *cons)
SCIP_RETCODE SCIPreleaseCons(SCIP *scip, SCIP_CONS **cons)
SCIP_Real SCIPgetLPObjval(SCIP *scip)
#define SCIPfreeBlockMemoryArray(scip, ptr, num)
#define SCIPallocBufferArray(scip, ptr, num)
#define SCIPfreeBufferArray(scip, ptr)
#define SCIPallocBlockMemoryArray(scip, ptr, num)
#define SCIPfreeBlockMemory(scip, ptr)
#define SCIPallocBlockMemory(scip, ptr)
SCIP_RETCODE SCIPpropagateProbing(SCIP *scip, int maxproprounds, SCIP_Bool *cutoff, SCIP_Longint *ndomredsfound)
SCIP_RETCODE SCIPstartProbing(SCIP *scip)
SCIP_RETCODE SCIPnewProbingNode(SCIP *scip)
SCIP_RETCODE SCIPendProbing(SCIP *scip)
SCIP_RETCODE SCIPsolveProbingLPWithPricing(SCIP *scip, SCIP_Bool pretendroot, SCIP_Bool displayinfo, int maxpricerounds, SCIP_Bool *lperror, SCIP_Bool *cutoff)
SCIP_Bool SCIPisSumNegative(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisFeasZero(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisFeasPositive(SCIP *scip, SCIP_Real val)
int SCIPgetDepth(SCIP *scip)
SCIP_NODE * SCIPgetCurrentNode(SCIP *scip)
SCIP_VARDATA * SCIPvarGetData(SCIP_VAR *var)
void SCIPsort(int *perm, SCIP_DECL_SORTINDCOMP((*indcomp)), void *dataptr, int len)
#define BMSclearMemoryArray(ptr, num)
variable pricer for the vertex coloring problem
void COLORprobGetStableSet(SCIP *scip, int setindex, int **stableset, int *nelements)
int COLORprobGetNNodes(SCIP *scip)
SCIP_CONS * COLORprobGetConstraint(SCIP *scip, int node)
SCIP_Bool COLORprobIsNodeInStableSet(SCIP *scip, int setindex, int node)
struct TCLIQUE_Graph TCLIQUE_GRAPH
struct SCIP_BranchruleData SCIP_BRANCHRULEDATA
enum SCIP_Retcode SCIP_RETCODE
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4