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