Scippy

SCIP

Solving Constraint Integer Programs

reader_pip.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_pip.h
17  * @ingroup FILEREADERS
18  * @brief file reader for polynomial mixed-integer programs in PIP format
19  * @author Stefan Vigerske
20  *
21  * This reader allows to parse and write PIP files with linear and polynomial constraints and objective.
22  * For writing, linear (general and specialized), quadratic, and "and" constraints are supported.
23  * Also abspower, bivariate, and nonlinear constraints may be written, if they are representable as polynomials.
24  *
25  * The PIP format is similar to the LP format and defined at http://polip.zib.de/pipformat.php .
26  */
27 
28 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
29 
30 #ifndef __SCIP_READER_PIP_H__
31 #define __SCIP_READER_PIP_H__
32 
33 #include "scip/def.h"
34 #include "scip/type_cons.h"
35 #include "scip/type_prob.h"
36 #include "scip/type_reader.h"
37 #include "scip/type_result.h"
38 #include "scip/type_retcode.h"
39 #include "scip/type_scip.h"
40 #include "scip/type_var.h"
41 
42 #ifdef __cplusplus
43 extern "C" {
44 #endif
45 
46 /** includes the pip file reader into SCIP
47  *
48  * @ingroup FileReaderIncludes
49  */
50 extern
52  SCIP* scip /**< SCIP data structure */
53  );
54 
55 /**@addtogroup FILEREADERS
56  *
57  * @{
58  */
59 
60 /** reads problem from file */
61 extern
63  SCIP* scip, /**< SCIP data structure */
64  SCIP_READER* reader, /**< the file reader itself */
65  const char* filename, /**< full path and name of file to read, or NULL if stdin should be used */
66  SCIP_RESULT* result /**< pointer to store the result of the file reading call */
67  );
68 
69 /** writes problem to file */
70 extern
72  SCIP* scip, /**< SCIP data structure */
73  FILE* file, /**< output file, or NULL if standard output should be used */
74  const char* name, /**< problem name */
75  SCIP_Bool transformed, /**< TRUE iff problem is the transformed problem */
76  SCIP_OBJSENSE objsense, /**< objective sense */
77  SCIP_Real objscale, /**< scalar applied to objective function; external objective value is
78  * extobj = objsense * objscale * (intobj + objoffset) */
79  SCIP_Real objoffset, /**< objective offset from bound shifting and fixing */
80  SCIP_VAR** vars, /**< array with active variables ordered binary, integer, implicit, continuous */
81  int nvars, /**< number of active variables in the problem */
82  int nbinvars, /**< number of binary variables */
83  int nintvars, /**< number of general integer variables */
84  int nimplvars, /**< number of implicit integer variables */
85  int ncontvars, /**< number of continuous variables */
86  SCIP_CONS** conss, /**< array with constraints of the problem */
87  int nconss, /**< number of constraints in the problem */
88  SCIP_RESULT* result /**< pointer to store the result of the file writing call */
89  );
90 
91 /* @} */
92 
93 #ifdef __cplusplus
94 }
95 #endif
96 
97 #endif
enum SCIP_Result SCIP_RESULT
Definition: type_result.h:52
SCIP_RETCODE SCIPreadPip(SCIP *scip, SCIP_READER *reader, const char *filename, SCIP_RESULT *result)
Definition: reader_pip.c:3767
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:53
type definitions for return codes for SCIP methods
type definitions for SCIP&#39;s main datastructure
type definitions for problem variables
#define SCIP_Bool
Definition: def.h:69
type definitions for input file readers
enum SCIP_Objsense SCIP_OBJSENSE
Definition: type_prob.h:41
SCIP_RETCODE SCIPincludeReaderPip(SCIP *scip)
Definition: reader_pip.c:3748
type definitions for storing and manipulating the main problem
SCIP_RETCODE SCIPwritePip(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_CONS **conss, int nconss, SCIP_RESULT *result)
Definition: reader_pip.c:2956
#define SCIP_Real
Definition: def.h:157
result codes for SCIP callback methods
common defines and data types used in all packages of SCIP
type definitions for constraints and constraint handlers