Detailed Description
Problem data for binpacking problem.
This file handles the main problem data used in that project. For more details see Main problem data page.
Definition in file probdata_binpacking.h.
#include "scip/scip.h"
Go to the source code of this file.
Functions | |
SCIP_RETCODE | SCIPprobdataCreate (SCIP *scip, const char *probname, int *ids, SCIP_Longint *weights, int nitems, SCIP_Longint capacity) |
int * | SCIPprobdataGetIds (SCIP_PROBDATA *probdata) |
SCIP_Longint * | SCIPprobdataGetWeights (SCIP_PROBDATA *probdata) |
int | SCIPprobdataGetNItems (SCIP_PROBDATA *probdata) |
SCIP_Longint | SCIPprobdataGetCapacity (SCIP_PROBDATA *probdata) |
SCIP_VAR ** | SCIPprobdataGetVars (SCIP_PROBDATA *probdata) |
int | SCIPprobdataGetNVars (SCIP_PROBDATA *probdata) |
SCIP_CONS ** | SCIPprobdataGetConss (SCIP_PROBDATA *probdata) |
SCIP_RETCODE | SCIPprobdataAddVar (SCIP *scip, SCIP_PROBDATA *probdata, SCIP_VAR *var) |
Function Documentation
◆ SCIPprobdataCreate()
SCIP_RETCODE SCIPprobdataCreate | ( | SCIP * | scip, |
const char * | probname, | ||
int * | ids, | ||
SCIP_Longint * | weights, | ||
int | nitems, | ||
SCIP_Longint | capacity | ||
) |
sets up the problem data
- Parameters
-
scip SCIP data structure probname problem name ids array of item ids weights array containing the item weights nitems number of items capacity bin capacity
Definition at line 371 of file probdata_binpacking.c.
References createInitialColumns(), EVENTHDLR_DESC, EVENTHDLR_NAME, NULL, probdataCreate(), SCIP_CALL, SCIP_MAXSTRLEN, SCIP_OBJSENSE_MINIMIZE, SCIP_OKAY, SCIPaddCons(), SCIPallocBufferArray, SCIPcreateConsBasicSetcover(), SCIPcreateProbBasic(), SCIPfindEventhdlr(), SCIPfreeBufferArray, SCIPincludeEventhdlrBasic(), SCIPpricerBinpackingActivate(), SCIPsetConsModifiable(), SCIPsetObjIntegral(), SCIPsetObjsense(), SCIPsetProbData(), SCIPsetProbDelorig(), SCIPsetProbDeltrans(), SCIPsetProbExitsol(), SCIPsetProbInitsol(), SCIPsetProbTrans(), SCIPsnprintf(), and TRUE.
◆ SCIPprobdataGetIds()
int* SCIPprobdataGetIds | ( | SCIP_PROBDATA * | probdata | ) |
returns array of item ids
- Parameters
-
probdata problem data
Definition at line 439 of file probdata_binpacking.c.
Referenced by addBranchingDecisionConss(), consdataPrint(), SCIP_DECL_BRANCHEXECLP(), and SCIPvardataPrint().
◆ SCIPprobdataGetWeights()
SCIP_Longint* SCIPprobdataGetWeights | ( | SCIP_PROBDATA * | probdata | ) |
returns array of item weights
- Parameters
-
probdata problem data
Definition at line 447 of file probdata_binpacking.c.
◆ SCIPprobdataGetNItems()
int SCIPprobdataGetNItems | ( | SCIP_PROBDATA * | probdata | ) |
returns number of items
- Parameters
-
probdata problem data
Definition at line 455 of file probdata_binpacking.c.
Referenced by SCIP_DECL_BRANCHEXECLP().
◆ SCIPprobdataGetCapacity()
SCIP_Longint SCIPprobdataGetCapacity | ( | SCIP_PROBDATA * | probdata | ) |
returns bin capacity
- Parameters
-
probdata problem data
Definition at line 463 of file probdata_binpacking.c.
◆ SCIPprobdataGetVars()
SCIP_VAR** SCIPprobdataGetVars | ( | SCIP_PROBDATA * | probdata | ) |
returns array of all variables ordered in the way they got generated
returns array of all variables itemed in the way they got generated
- Parameters
-
probdata problem data
Definition at line 471 of file probdata_binpacking.c.
Referenced by consdataCheck(), and SCIP_DECL_CONSPROP().
◆ SCIPprobdataGetNVars()
int SCIPprobdataGetNVars | ( | SCIP_PROBDATA * | probdata | ) |
returns number of variables
- Parameters
-
probdata problem data
Definition at line 479 of file probdata_binpacking.c.
Referenced by consdataCheck(), SCIP_DECL_CONSACTIVE(), SCIP_DECL_CONSDEACTIVE(), and SCIP_DECL_CONSPROP().
◆ SCIPprobdataGetConss()
SCIP_CONS** SCIPprobdataGetConss | ( | SCIP_PROBDATA * | probdata | ) |
returns array of set partitioning constrains
- Parameters
-
probdata problem data
Definition at line 487 of file probdata_binpacking.c.
◆ SCIPprobdataAddVar()
SCIP_RETCODE SCIPprobdataAddVar | ( | SCIP * | scip, |
SCIP_PROBDATA * | probdata, | ||
SCIP_VAR * | var | ||
) |
adds given variable to the problem data
- Parameters
-
scip SCIP data structure probdata problem data var variables to add
Definition at line 495 of file probdata_binpacking.c.
References MAX, SCIP_CALL, SCIP_OKAY, SCIPcaptureVar(), SCIPdebugMsg, and SCIPreallocBlockMemoryArray.
Referenced by createInitialColumns(), and SCIP_DECL_EVENTEXEC().