Scippy

SCIP

Solving Constraint Integer Programs

probdata_binpacking.h
Go to the documentation of this file.
1 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2 /* */
3 /* This file is part of the program and library */
4 /* SCIP --- Solving Constraint Integer Programs */
5 /* */
6 /* Copyright (C) 2002-2016 Konrad-Zuse-Zentrum */
7 /* fuer Informationstechnik Berlin */
8 /* */
9 /* SCIP is distributed under the terms of the ZIB Academic License. */
10 /* */
11 /* You should have received a copy of the ZIB Academic License */
12 /* along with SCIP; see the file COPYING. If not email to scip@zib.de. */
13 /* */
14 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
15 
16 /**@file probdata_binpacking.h
17  * @brief Problem data for binpacking problem
18  * @author Timo Berthold
19  * @author Stefan Heinz
20  *
21  * This file handles the main problem data used in that project. For more details see \ref PROBLEMDATA page.
22  */
23 
24 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
25 
26 #ifndef __SCIP_PROBDATA_BINPACKING__
27 #define __SCIP_PROBDATA_BINPACKING__
28 
29 #include "scip/scip.h"
30 
31 /** sets up the problem data */
32 extern
33 SCIP_RETCODE SCIPprobdataCreate(
34  SCIP* scip, /**< SCIP data structure */
35  const char* probname, /**< problem name */
36  int* ids, /**< array of item ids */
37  SCIP_Longint* weights, /**< array containing the item weights */
38  int nitems, /**< number of items */
39  SCIP_Longint capacity /**< bin capacity */
40  );
41 
42 /** returns array of item ids */
43 extern
45  SCIP_PROBDATA* probdata /**< problem data */
46  );
47 
48 /** returns array of item weights */
49 extern
50 SCIP_Longint* SCIPprobdataGetWeights(
51  SCIP_PROBDATA* probdata /**< problem data */
52  );
53 
54 /** returns number of items */
55 extern
57  SCIP_PROBDATA* probdata /**< problem data */
58  );
59 
60 /** returns bin capacity */
61 extern
62 SCIP_Longint SCIPprobdataGetCapacity(
63  SCIP_PROBDATA* probdata /**< problem data */
64  );
65 
66 /** returns array of all variables ordered in the way they got generated */
67 extern
68 SCIP_VAR** SCIPprobdataGetVars(
69  SCIP_PROBDATA* probdata /**< problem data */
70  );
71 
72 /** returns number of variables */
73 extern
75  SCIP_PROBDATA* probdata /**< problem data */
76  );
77 
78 /** returns array of set partitioning constrains */
79 extern
80 SCIP_CONS** SCIPprobdataGetConss(
81  SCIP_PROBDATA* probdata /**< problem data */
82  );
83 
84 /** adds given variable to the problem data */
85 extern
86 SCIP_RETCODE SCIPprobdataAddVar(
87  SCIP* scip, /**< SCIP data structure */
88  SCIP_PROBDATA* probdata, /**< problem data */
89  SCIP_VAR* var /**< variables to add */
90  );
91 
92 #endif
SCIP_RETCODE SCIPprobdataCreate(SCIP *scip, const char *probname, int *ids, SCIP_Longint *weights, int nitems, SCIP_Longint capacity)
SCIP_Longint * SCIPprobdataGetWeights(SCIP_PROBDATA *probdata)
SCIP_VAR ** SCIPprobdataGetVars(SCIP_PROBDATA *probdata)
SCIP_Longint SCIPprobdataGetCapacity(SCIP_PROBDATA *probdata)
SCIP_CONS ** SCIPprobdataGetConss(SCIP_PROBDATA *probdata)
int * SCIPprobdataGetIds(SCIP_PROBDATA *probdata)
SCIP_RETCODE SCIPprobdataAddVar(SCIP *scip, SCIP_PROBDATA *probdata, SCIP_VAR *var)
int SCIPprobdataGetNItems(SCIP_PROBDATA *probdata)
int SCIPprobdataGetNVars(SCIP_PROBDATA *probdata)