Scippy

SCIP

Solving Constraint Integer Programs

vardata_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-2022 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 visit scipopt.org. */
13 /* */
14 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
15 
16 /**@file vardata_binpacking.h
17  * @brief Variable data containing the ids of constraints in which the variable appears
18  * @author Timo Berthold
19  * @author Stefan Heinz
20  *
21  * This file implements the handling of the variable data which is attached to each file. See SCIP_VarData and \ref BINPACKING_PRICER.
22  */
23 
24 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
25 
26 #ifndef __SCIP_VARDATA_BINPACKING__
27 #define __SCIP_VARDATA_BINPACKING__
28 
29 #include "scip/scip.h"
30 
31 /** create variable data */
33  SCIP* scip, /**< SCIP data structure */
34  SCIP_VARDATA** vardata, /**< pointer to vardata */
35  int* consids, /**< array of constraints ids */
36  int nconss /**< number of constraints */
37  );
38 
39 /** get number of constraints */
41  SCIP_VARDATA* vardata /**< variable data */
42  );
43 
44 /** returns sorted constraint id array */
46  SCIP_VARDATA* vardata /**< variable data */
47  );
48 
49 /** creates variable */
51  SCIP* scip, /**< SCIP data structure */
52  SCIP_VAR** var, /**< pointer to variable object */
53  const char* name, /**< name of variable, or NULL for automatic name creation */
54  SCIP_Real obj, /**< objective function value */
55  SCIP_Bool initial, /**< should var's column be present in the initial root LP? */
56  SCIP_Bool removable, /**< is var's column removable from the LP (due to aging or cleanup)? */
57  SCIP_VARDATA* vardata /**< user data for this specific variable */
58  );
59 
60 /** prints vardata to file stream */
61 void SCIPvardataPrint(
62  SCIP* scip, /**< SCIP data structure */
63  SCIP_VARDATA* vardata, /**< variable data */
64  FILE* file /**< the text file to store the information into */
65  );
66 
67 #endif
void SCIPvardataPrint(SCIP *scip, SCIP_VARDATA *vardata, FILE *file)
struct SCIP_VarData SCIP_VARDATA
Definition: type_var.h:107
int * SCIPvardataGetConsids(SCIP_VARDATA *vardata)
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:54
SCIP_RETCODE SCIPvardataCreateBinpacking(SCIP *scip, SCIP_VARDATA **vardata, int *consids, int nconss)
SCIP_RETCODE SCIPcreateVarBinpacking(SCIP *scip, SCIP_VAR **var, const char *name, SCIP_Real obj, SCIP_Bool initial, SCIP_Bool removable, SCIP_VARDATA *vardata)
#define SCIP_Bool
Definition: def.h:84
int SCIPvardataGetNConsids(SCIP_VARDATA *vardata)
#define SCIP_Real
Definition: def.h:177
SCIP callable library.