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-2024 Zuse Institute Berlin (ZIB) */
7/* */
8/* Licensed under the Apache License, Version 2.0 (the "License"); */
9/* you may not use this file except in compliance with the License. */
10/* You may obtain a copy of the License at */
11/* */
12/* http://www.apache.org/licenses/LICENSE-2.0 */
13/* */
14/* Unless required by applicable law or agreed to in writing, software */
15/* distributed under the License is distributed on an "AS IS" BASIS, */
16/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */
17/* See the License for the specific language governing permissions and */
18/* limitations under the License. */
19/* */
20/* You should have received a copy of the Apache-2.0 license */
21/* along with SCIP; see the file LICENSE. If not visit scipopt.org. */
22/* */
23/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
24
25/**@file probdata_binpacking.h
26 * @brief Problem data for binpacking problem
27 * @author Timo Berthold
28 * @author Stefan Heinz
29 *
30 * This file handles the main problem data used in that project. For more details see \ref BINPACKING_PROBLEMDATA page.
31 */
32
33/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
34
35#ifndef __SCIP_PROBDATA_BINPACKING__
36#define __SCIP_PROBDATA_BINPACKING__
37
38#include "scip/scip.h"
39
40/** sets up the problem data */
42 SCIP* scip, /**< SCIP data structure */
43 const char* probname, /**< problem name */
44 int* ids, /**< array of item ids */
45 SCIP_Longint* weights, /**< array containing the item weights */
46 int nitems, /**< number of items */
47 SCIP_Longint capacity /**< bin capacity */
48 );
49
50/** returns array of item ids */
52 SCIP_PROBDATA* probdata /**< problem data */
53 );
54
55/** returns array of item weights */
57 SCIP_PROBDATA* probdata /**< problem data */
58 );
59
60/** returns number of items */
62 SCIP_PROBDATA* probdata /**< problem data */
63 );
64
65/** returns bin capacity */
67 SCIP_PROBDATA* probdata /**< problem data */
68 );
69
70/** returns array of all variables ordered in the way they got generated */
72 SCIP_PROBDATA* probdata /**< problem data */
73 );
74
75/** returns number of variables */
77 SCIP_PROBDATA* probdata /**< problem data */
78 );
79
80/** returns array of set partitioning constrains */
82 SCIP_PROBDATA* probdata /**< problem data */
83 );
84
85/** adds given variable to the problem data */
87 SCIP* scip, /**< SCIP data structure */
88 SCIP_PROBDATA* probdata, /**< problem data */
89 SCIP_VAR* var /**< variables to add */
90 );
91
92#endif
#define SCIP_Longint
Definition: def.h:158
SCIP_Longint SCIPprobdataGetCapacity(SCIP_PROBDATA *probdata)
SCIP_Longint * SCIPprobdataGetWeights(SCIP_PROBDATA *probdata)
SCIP_CONS ** SCIPprobdataGetConss(SCIP_PROBDATA *probdata)
SCIP_RETCODE SCIPprobdataAddVar(SCIP *scip, SCIP_PROBDATA *probdata, SCIP_VAR *var)
int * SCIPprobdataGetIds(SCIP_PROBDATA *probdata)
SCIP_RETCODE SCIPprobdataCreate(SCIP *scip, const char *probname, int *ids, SCIP_Longint *weights, int nitems, SCIP_Longint capacity)
int SCIPprobdataGetNVars(SCIP_PROBDATA *probdata)
SCIP_VAR ** SCIPprobdataGetVars(SCIP_PROBDATA *probdata)
int SCIPprobdataGetNItems(SCIP_PROBDATA *probdata)
SCIP callable library.
struct SCIP_ProbData SCIP_PROBDATA
Definition: type_prob.h:53
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:63