branch_ryanfoster.c
Go to the documentation of this file.
27 * standard variable branching has the disadvantage that the zero branch is more or less useless because 28 * we only forbid one packing out of exponential many. On the other hand, the branch fixing a packing reduces the problem since 33 * In Computer scheduling of public transport: Urban passenger vehicle and crew scheduling, A. Wren editor, North-Holland 1981, 269-280. 45 * To select a pair of items, we have to know for each packing the items which are contained. Since every packing is a 46 * variable and each item is a set covering constraint, we have to know for each variable in which set covering 47 * constraints it appears (this means, has a coefficient of 1.0). Since \SCIP is constraint based, it is in general 48 * not possible to get this information directly. To overcome this issue, we use the functionality to add 50 * variable. This variable data contains the constraints in which this variable appears (see vardata_binpacking.c for more details). 52 * information which items belong to which packing. Therefore, we can use the Ryan/Foster idea to select a pair of 57 * After having selected a pair of items to branch on, the question now is how to realize such a branching with \SCIP. 59 * constraint based, it is really easy to do that. We implement a constraint handler which handles the 61 * decisions. Furthermore, it also ensures that all packing which are not feasible at a particular node are 62 * locally fixed to zero. For more details, we refer to the \ref cons_samediff.c "source code of the constraint handler". 66 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/ 130 SCIPdebugMessage("start branching at node %"SCIP_LONGINT_FORMAT", depth %d\n", SCIPgetNNodes(scip), SCIPgetDepth(scip)); 158 /* get variable data which contains the information to which constraints/items the variable belongs */ 222 SCIP_CALL( SCIPcreateConsSamediff(scip, &consdiffer, "differ", id1, id2, DIFFER, childdiffer, TRUE) ); 256 SCIP_CALL( SCIPincludeBranchruleBasic(scip, &branchrule, BRANCHRULE_NAME, BRANCHRULE_DESC, BRANCHRULE_PRIORITY, BRANCHRULE_MAXDEPTH, Ryan/Foster branching rule. SCIP_RETCODE SCIPincludeBranchruleRyanFoster(SCIP *scip) Definition: branch_ryanfoster.c:245 Constraint handler stores the local branching decision data. SCIP_RETCODE SCIPcreateConsSamediff(SCIP *scip, SCIP_CONS **cons, const char *name, int itemid1, int itemid2, CONSTYPE type, SCIP_NODE *node, SCIP_Bool local) Definition: cons_samediff.c:552 Variable data containing the ids of constraints in which the variable appears. int * SCIPvardataGetConsids(SCIP_VARDATA *vardata) Definition: vardata_binpacking.c:124 int * SCIPprobdataGetIds(SCIP_PROBDATA *probdata) Definition: probdata_binpacking.c:431 Definition: cons_samediff.h:37 Problem data for binpacking problem. int SCIPprobdataGetNItems(SCIP_PROBDATA *probdata) Definition: probdata_binpacking.c:447 Definition: cons_samediff.h:38 int SCIPvardataGetNConsids(SCIP_VARDATA *vardata) Definition: vardata_binpacking.c:116 static SCIP_DECL_BRANCHEXECLP(branchExeclpRyanFoster) Definition: branch_ryanfoster.c:96 |