Scippy

SCIP

Solving Constraint Integer Programs

reader_opb.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 reader_opb.h
17  * @ingroup FILEREADERS
18  * @brief pseudo-Boolean file reader (opb format)
19  * @author Stefan Heinz
20  * @author Michael Winkler
21  *
22  * This file reader parses the @a opb format and is also used by the @a wbo reader for the @a wbo format. For a
23  * detailed description of this format see http://www.cril.univ-artois.fr/PB10/format.pdf .
24  */
25 
26 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
27 
28 #ifndef __SCIP_READER_OPB_H__
29 #define __SCIP_READER_OPB_H__
30 
31 #include "scip/def.h"
32 #include "scip/type_cons.h"
33 #include "scip/type_prob.h"
34 #include "scip/type_reader.h"
35 #include "scip/type_result.h"
36 #include "scip/type_retcode.h"
37 #include "scip/type_scip.h"
38 #include "scip/type_var.h"
39 
40 #ifdef __cplusplus
41 extern "C" {
42 #endif
43 
44 /** includes the opb file reader into SCIP
45  *
46  * @ingroup FileReaderIncludes
47  */
50  SCIP* scip /**< SCIP data structure */
51  );
52 
53 /**@addtogroup FILEREADERS
54  *
55  * @{
56  */
57 
58 /** reads problem from file */
61  SCIP* scip, /**< SCIP data structure */
62  SCIP_READER* reader, /**< the file reader itself */
63  const char* filename, /**< full path and name of file to read, or NULL if stdin should be used */
64  SCIP_RESULT* result /**< pointer to store the result of the file reading call */
65  );
66 
67 /** writes problem to file */
70  SCIP* scip, /**< SCIP data structure */
71  FILE* file, /**< output file, or NULL if standard output should be used */
72  const char* name, /**< problem name */
73  SCIP_Bool transformed, /**< TRUE iff problem is the transformed problem */
74  SCIP_OBJSENSE objsense, /**< objective sense */
75  SCIP_Real objscale, /**< scalar applied to objective function; external objective value is
76  extobj = objsense * objscale * (intobj + objoffset) */
77  SCIP_Real objoffset, /**< objective offset from bound shifting and fixing */
78  SCIP_VAR** vars, /**< array with active variables ordered binary, integer, implicit, continuous */
79  int nvars, /**< number of active variables in the problem */
80  int nbinvars, /**< number of binary variables */
81  int nintvars, /**< number of general integer variables */
82  int nimplvars, /**< number of implicit integer variables */
83  int ncontvars, /**< number of continuous variables */
84  SCIP_VAR** fixedvars, /**< array with fixed variables */
85  int nfixedvars, /**< number of fixed and aggregated variables in the problem */
86  SCIP_CONS** conss, /**< array with constraints of the problem */
87  int nconss, /**< number of constraints in the problem */
88  SCIP_Bool genericnames, /**< should generic variable and constraint names be used */
89  SCIP_RESULT* result /**< pointer to store the result of the file writing call */
90  );
91 
92 /* @} */
93 
94 #ifdef __cplusplus
95 }
96 #endif
97 
98 #endif
enum SCIP_Result SCIP_RESULT
Definition: type_result.h:52
#define SCIP_EXPORT
Definition: def.h:98
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:53
SCIP_EXPORT SCIP_RETCODE SCIPincludeReaderOpb(SCIP *scip)
Definition: reader_opb.c:4476
type definitions for return codes for SCIP methods
SCIP_EXPORT SCIP_RETCODE SCIPreadOpb(SCIP *scip, SCIP_READER *reader, const char *filename, SCIP_RESULT *result)
Definition: reader_opb.c:4181
type definitions for SCIP&#39;s main datastructure
type definitions for problem variables
SCIP_EXPORT SCIP_RETCODE SCIPwriteOpb(SCIP *scip, FILE *file, const char *name, SCIP_Bool transformed, SCIP_OBJSENSE objsense, SCIP_Real objscale, SCIP_Real objoffset, SCIP_VAR **vars, int nvars, int nbinvars, int nintvars, int nimplvars, int ncontvars, SCIP_VAR **fixedvars, int nfixedvars, SCIP_CONS **conss, int nconss, SCIP_Bool genericnames, SCIP_RESULT *result)
Definition: reader_opb.c:4256
#define SCIP_Bool
Definition: def.h:70
type definitions for input file readers
enum SCIP_Objsense SCIP_OBJSENSE
Definition: type_prob.h:41
type definitions for storing and manipulating the main problem
#define SCIP_Real
Definition: def.h:164
result codes for SCIP callback methods
common defines and data types used in all packages of SCIP
type definitions for constraints and constraint handlers