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-2019 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 scip.zib.de. */
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 */
32 extern
34  SCIP* scip, /**< SCIP data structure */
35  SCIP_VARDATA** vardata, /**< pointer to vardata */
36  int* consids, /**< array of constraints ids */
37  int nconss /**< number of constraints */
38  );
39 
40 /** get number of constraints */
41 extern
43  SCIP_VARDATA* vardata /**< variable data */
44  );
45 
46 /** returns sorted constraint id array */
47 extern
49  SCIP_VARDATA* vardata /**< variable data */
50  );
51 
52 /** creates variable */
53 extern
55  SCIP* scip, /**< SCIP data structure */
56  SCIP_VAR** var, /**< pointer to variable object */
57  const char* name, /**< name of variable, or NULL for automatic name creation */
58  SCIP_Real obj, /**< objective function value */
59  SCIP_Bool initial, /**< should var's column be present in the initial root LP? */
60  SCIP_Bool removable, /**< is var's column removable from the LP (due to aging or cleanup)? */
61  SCIP_VARDATA* vardata /**< user data for this specific variable */
62  );
63 
64 /** prints vardata to file stream */
65 extern
66 void SCIPvardataPrint(
67  SCIP* scip, /**< SCIP data structure */
68  SCIP_VARDATA* vardata, /**< variable data */
69  FILE* file /**< the text file to store the information into */
70  );
71 
72 #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:53
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:69
int SCIPvardataGetNConsids(SCIP_VARDATA *vardata)
#define SCIP_Real
Definition: def.h:157
SCIP callable library.