Scippy

SCIP

Solving Constraint Integer Programs

reader_lp.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-2020 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 scipopt.org. */
13 /* */
14 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
15 
16 /**@file reader_lp.h
17  * @ingroup FILEREADERS
18  * @brief LP file reader
19  * @author Tobias Achterberg
20  *
21  * This reader allows to parse and write CPLEX .lp files with linear and quadratic constraints and objective,
22  * special ordered sets of type 1 and 2, indicators on linear constraints, and semicontinuous variables.
23  * For writing, linear (general and specialized), indicator, quadratic, second order cone, and
24  * special ordered set constraints are supported.
25  *
26  * The lp format is defined within the CPLEX documentation.
27  */
28 
29 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
30 
31 #ifndef __SCIP_READER_LP_H__
32 #define __SCIP_READER_LP_H__
33 
34 #include "scip/def.h"
35 #include "scip/type_cons.h"
36 #include "scip/type_prob.h"
37 #include "scip/type_reader.h"
38 #include "scip/type_result.h"
39 #include "scip/type_retcode.h"
40 #include "scip/type_scip.h"
41 #include "scip/type_var.h"
42 
43 #ifdef __cplusplus
44 extern "C" {
45 #endif
46 
47 /** includes the lp file reader into SCIP
48  *
49  * @ingroup FileReaderIncludes
50  */
53  SCIP* scip /**< SCIP data structure */
54  );
55 
56 /**@addtogroup FILEREADERS
57  *
58  * @{
59  */
60 
61 /** reads problem from file */
64  SCIP* scip, /**< SCIP data structure */
65  SCIP_READER* reader, /**< the file reader itself */
66  const char* filename, /**< full path and name of file to read, or NULL if stdin should be used */
67  SCIP_RESULT* result /**< pointer to store the result of the file reading call */
68  );
69 
70 /** writes problem to file */
73  SCIP* scip, /**< SCIP data structure */
74  FILE* file, /**< output file, or NULL if standard output should be used */
75  const char* name, /**< problem name */
76  SCIP_Bool transformed, /**< TRUE iff problem is the transformed problem */
77  SCIP_OBJSENSE objsense, /**< objective sense */
78  SCIP_Real objscale, /**< scalar applied to objective function; external objective value is
79  * extobj = objsense * objscale * (intobj + objoffset) */
80  SCIP_Real objoffset, /**< objective offset from bound shifting and fixing */
81  SCIP_VAR** vars, /**< array with active variables ordered binary, integer, implicit, continuous */
82  int nvars, /**< number of active variables in the problem */
83  int nbinvars, /**< number of binary variables */
84  int nintvars, /**< number of general integer variables */
85  int nimplvars, /**< number of implicit integer variables */
86  int ncontvars, /**< number of continuous variables */
87  SCIP_CONS** conss, /**< array with constraints of the problem */
88  int nconss, /**< number of constraints in the problem */
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:100
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:54
type definitions for return codes for SCIP methods
type definitions for SCIP&#39;s main datastructure
SCIP_EXPORT SCIP_RETCODE SCIPwriteLp(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_lp.c:3555
type definitions for problem variables
#define SCIP_Bool
Definition: def.h:70
type definitions for input file readers
enum SCIP_Objsense SCIP_OBJSENSE
Definition: type_prob.h:41
SCIP_EXPORT SCIP_RETCODE SCIPreadLp(SCIP *scip, SCIP_READER *reader, const char *filename, SCIP_RESULT *result)
Definition: reader_lp.c:3479
type definitions for storing and manipulating the main problem
#define SCIP_Real
Definition: def.h:163
result codes for SCIP callback methods
SCIP_EXPORT SCIP_RETCODE SCIPincludeReaderLp(SCIP *scip)
Definition: reader_lp.c:3445
common defines and data types used in all packages of SCIP
type definitions for constraints and constraint handlers