probdata_binpacking.c
Go to the documentation of this file.
21 * This file handles the main problem data used in that project. For more details see \ref PROBLEMDATA page. 25 * The problem data is accessible in all plugins. The function SCIPgetProbData() returns the pointer to that 26 * structure. We use this data structure to store all the information of the binpacking problem. Since this structure is 27 * not visible in the other plugins, we implemented setter and getter functions to access this data. The problem data 33 * * This problem data is used to store the input of the binpacking instance, all variables which are created, and all 49 * The function SCIPprobdataCreate(), which is called in the \ref reader_bpa.c "reader plugin" after the input file was 50 * parsed, initializes the problem data structure and creates the problem in the SCIP environment. For this, it creates 51 * for each item of the binpacking problem one set covering constraint and creates an initial set of variables for the 52 * packings. Note that the set covering constraints have to have the <code>modifiable</code>-flag set to TRUE. This is 53 * necessary to tell the solver that these constraints are not completed yet. This means, during the search new 54 * variables/packings might be added. The solver needs this information because certain reductions are not allowed. 60 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/ 73 * This problem data is used to store the input of the binpacking, all variables which are created, and all 236 SCIPdebugMessage("create variable for item %d with weight = %"SCIP_LONGINT_FORMAT"\n", ids[i], weights[i]); 250 /* create the variable data for the variable; the variable data contains the information in which constraints the 258 /* change the upper bound of the binary variable to lazy since the upper bound is already enforced 260 * The reason for doing is that, is to avoid the bound of x <= 1 in the LP relaxation since this bound 296 SCIP_CALL( probdataCreate(scip, targetdata, sourcedata->vars, sourcedata->conss, sourcedata->weights, sourcedata->ids, 300 SCIP_CALL( SCIPtransformConss(scip, (*targetdata)->nitems, (*targetdata)->conss, (*targetdata)->conss) ); 303 SCIP_CALL( SCIPtransformVars(scip, (*targetdata)->nvars, (*targetdata)->vars, (*targetdata)->vars) ); 319 /** solving process initialization method of transformed data (called before the branch and bound process begins) */ 336 /** solving process deinitialization method of transformed data (called before the branch and bound data is freed) */ 382 SCIP_CALL( SCIPincludeEventhdlrBasic(scip, NULL, EVENTHDLR_NAME, EVENTHDLR_DESC, eventExecAddedVar, NULL) );
SCIP_RETCODE SCIPpricerBinpackingActivate(SCIP *scip, SCIP_CONS **conss, SCIP_Longint *weights, int *ids, int nitems, SCIP_Longint capacity) Definition: pricer_binpacking.c:752 static SCIP_DECL_PROBDELTRANS(probdeltransBinpacking) Definition: probdata_binpacking.c:310 Binpacking variable pricer. SCIP_RETCODE SCIPprobdataCreate(SCIP *scip, const char *probname, int *ids, SCIP_Longint *weights, int nitems, SCIP_Longint capacity) Definition: probdata_binpacking.c:363 static SCIP_DECL_PROBEXITSOL(probexitsolBinpacking) Definition: probdata_binpacking.c:338 Variable data containing the ids of constraints in which the variable appears. SCIP_VAR ** SCIPprobdataGetVars(SCIP_PROBDATA *probdata) Definition: probdata_binpacking.c:463 static SCIP_RETCODE probdataCreate(SCIP *scip, SCIP_PROBDATA **probdata, SCIP_VAR **vars, SCIP_CONS **conss, SCIP_Longint *weights, int *ids, int nvars, int nitems, SCIP_Longint capacity) Definition: probdata_binpacking.c:131 static SCIP_DECL_PROBTRANS(probtransBinpacking) Definition: probdata_binpacking.c:293 SCIP_RETCODE SCIPcreateVarBinpacking(SCIP *scip, SCIP_VAR **var, const char *name, SCIP_Real obj, SCIP_Bool initial, SCIP_Bool removable, SCIP_VARDATA *vardata) Definition: vardata_binpacking.c:142 SCIP_Longint * SCIPprobdataGetWeights(SCIP_PROBDATA *probdata) Definition: probdata_binpacking.c:439 static SCIP_DECL_EVENTEXEC(eventExecAddedVar) Definition: probdata_binpacking.c:106 SCIP_Longint SCIPprobdataGetCapacity(SCIP_PROBDATA *probdata) Definition: probdata_binpacking.c:455 static SCIP_DECL_PROBINITSOL(probinitsolBinpacking) Definition: probdata_binpacking.c:321 SCIP_RETCODE SCIPvardataCreateBinpacking(SCIP *scip, SCIP_VARDATA **vardata, int *consids, int nconsids) Definition: vardata_binpacking.c:103 int * SCIPprobdataGetIds(SCIP_PROBDATA *probdata) Definition: probdata_binpacking.c:431 Problem data for binpacking problem. int SCIPprobdataGetNItems(SCIP_PROBDATA *probdata) Definition: probdata_binpacking.c:447 SCIP_CONS ** SCIPprobdataGetConss(SCIP_PROBDATA *probdata) Definition: probdata_binpacking.c:479 SCIP_RETCODE SCIPprobdataAddVar(SCIP *scip, SCIP_PROBDATA *probdata, SCIP_VAR *var) Definition: probdata_binpacking.c:487 int SCIPprobdataGetNVars(SCIP_PROBDATA *probdata) Definition: probdata_binpacking.c:471 static SCIP_RETCODE probdataFree(SCIP *scip, SCIP_PROBDATA **probdata) Definition: probdata_binpacking.c:172 static SCIP_DECL_PROBDELORIG(probdelorigBinpacking) Definition: probdata_binpacking.c:281 static SCIP_RETCODE createInitialColumns(SCIP *scip, SCIP_PROBDATA *probdata) Definition: probdata_binpacking.c:208 |