Scippy

SCIP

Solving Constraint Integer Programs

reader_mps.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-2018 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_mps.h
17  * @ingroup FILEREADERS
18  * @brief (extended) MPS file reader
19  * @author Thorsten Koch
20  * @author Tobias Achterberg
21  *
22  * This reader allows to parse and write MPS files with linear and quadratic constraints and objective,
23  * special ordered sets of type 1 and 2, indicators on linear constraints, and semicontinuous variables.
24  * For writing, linear (general and specialized), indicator, quadratic, second order cone, and
25  * special ordered set constraints are supported.
26  *
27  * See http://en.wikipedia.org/wiki/MPS_%28format%29 for a description.
28  */
29 
30 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
31 
32 #ifndef __SCIP_READER_MPS_H__
33 #define __SCIP_READER_MPS_H__
34 
35 #include "scip/def.h"
36 #include "scip/type_cons.h"
37 #include "scip/type_prob.h"
38 #include "scip/type_reader.h"
39 #include "scip/type_result.h"
40 #include "scip/type_retcode.h"
41 #include "scip/type_scip.h"
42 #include "scip/type_var.h"
43 
44 #ifdef __cplusplus
45 extern "C" {
46 #endif
47 
48 /** includes the mps file reader into SCIP
49  *
50  * @ingroup FileReaderIncludes
51  */
52 extern
54  SCIP* scip /**< SCIP data structure */
55  );
56 
57 /**@addtogroup FILEREADERS
58  *
59  * @{
60  */
61 
62 /** reads problem from file */
63 extern
65  SCIP* scip, /**< SCIP data structure */
66  SCIP_READER* reader, /**< the file reader itself */
67  const char* filename, /**< full path and name of file to read, or NULL if stdin should be used */
68  SCIP_RESULT* result, /**< pointer to store the result of the file reading call */
69  const char*** varnames, /**< storage for the variable names, or NULL */
70  const char*** consnames, /**< storage for the constraint names, or NULL */
71  int* varnamessize, /**< the size of the variable names storage, or NULL */
72  int* consnamessize, /**< the size of the constraint names storage, or NULL */
73  int* nvarnames, /**< the number of stored variable names, or NULL */
74  int* nconsnames /**< the number of stored constraint names, or NULL */
75  );
76 
77 /** writes problem to file */
78 extern
80  SCIP* scip, /**< SCIP data structure */
81  SCIP_READER* reader, /**< the file reader itself */
82  FILE* file, /**< output file, or NULL if standard output should be used */
83  const char* name, /**< problem name */
84  SCIP_Bool transformed, /**< TRUE iff problem is the transformed problem */
85  SCIP_OBJSENSE objsense, /**< objective sense */
86  SCIP_Real objscale, /**< scalar applied to objective function; external objective value is
87  * extobj = objsense * objscale * (intobj + objoffset) */
88  SCIP_Real objoffset, /**< objective offset from bound shifting and fixing */
89  SCIP_VAR** vars, /**< array with active variables ordered binary, integer, implicit, continuous */
90  int nvars, /**< number of active variables in the problem */
91  int nbinvars, /**< number of binary variables */
92  int nintvars, /**< number of general integer variables */
93  int nimplvars, /**< number of implicit integer variables */
94  int ncontvars, /**< number of continuous variables */
95  SCIP_VAR** fixedvars, /**< array with fixed and aggregated variables */
96  int nfixedvars, /**< number of fixed and aggregated variables in the problem */
97  SCIP_CONS** conss, /**< array with constraints of the problem */
98  int nconss, /**< number of constraints in the problem */
99  SCIP_RESULT* result /**< pointer to store the result of the file writing call */
100  );
101 
102 /* @} */
103 
104 #ifdef __cplusplus
105 }
106 #endif
107 
108 #endif
enum SCIP_Result SCIP_RESULT
Definition: type_result.h:52
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:53
SCIP_RETCODE SCIPwriteMps(SCIP *scip, SCIP_READER *reader, 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_RESULT *result)
Definition: reader_mps.c:3845
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:62
type definitions for input file readers
enum SCIP_Objsense SCIP_OBJSENSE
Definition: type_prob.h:41
SCIP_RETCODE SCIPreadMps(SCIP *scip, SCIP_READER *reader, const char *filename, SCIP_RESULT *result, const char ***varnames, const char ***consnames, int *varnamessize, int *consnamessize, int *nvarnames, int *nconsnames)
Definition: reader_mps.c:3809
type definitions for storing and manipulating the main problem
#define SCIP_Real
Definition: def.h:150
result codes for SCIP callback methods
common defines and data types used in all packages of SCIP
SCIP_RETCODE SCIPincludeReaderMps(SCIP *scip)
Definition: reader_mps.c:3775
type definitions for constraints and constraint handlers