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-2015 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 email to scip@zib.de. */
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 
35 #include "scip/scip.h"
36 
37 #ifdef __cplusplus
38 extern "C" {
39 #endif
40 
41 /** includes the lp file reader into SCIP */
42 extern
44  SCIP* scip /**< SCIP data structure */
45  );
46 
47 /** reads problem from file */
48 extern
50  SCIP* scip, /**< SCIP data structure */
51  SCIP_READER* reader, /**< the file reader itself */
52  const char* filename, /**< full path and name of file to read, or NULL if stdin should be used */
53  SCIP_RESULT* result /**< pointer to store the result of the file reading call */
54  );
55 
56 /** writes problem to file */
57 extern
59  SCIP* scip, /**< SCIP data structure */
60  FILE* file, /**< output file, or NULL if standard output should be used */
61  const char* name, /**< problem name */
62  SCIP_Bool transformed, /**< TRUE iff problem is the transformed problem */
63  SCIP_OBJSENSE objsense, /**< objective sense */
64  SCIP_Real objscale, /**< scalar applied to objective function; external objective value is
65  * extobj = objsense * objscale * (intobj + objoffset) */
66  SCIP_Real objoffset, /**< objective offset from bound shifting and fixing */
67  SCIP_VAR** vars, /**< array with active variables ordered binary, integer, implicit, continuous */
68  int nvars, /**< number of active variables in the problem */
69  int nbinvars, /**< number of binary variables */
70  int nintvars, /**< number of general integer variables */
71  int nimplvars, /**< number of implicit integer variables */
72  int ncontvars, /**< number of continuous variables */
73  SCIP_CONS** conss, /**< array with constraints of the problem */
74  int nconss, /**< number of constraints in the problem */
75  SCIP_RESULT* result /**< pointer to store the result of the file writing call */
76  );
77 
78 #ifdef __cplusplus
79 }
80 #endif
81 
82 #endif
enum SCIP_Result SCIP_RESULT
Definition: type_result.h:51
struct SCIP_Cons SCIP_CONS
Definition: type_cons.h:48
SCIP_RETCODE SCIPincludeReaderLp(SCIP *scip)
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:53
SCIP_RETCODE SCIPreadLp(SCIP *scip, SCIP_READER *reader, const char *filename, SCIP_RESULT *result)
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)
struct SCIP_Reader SCIP_READER
Definition: type_reader.h:36
struct Scip SCIP
Definition: type_scip.h:30
#define SCIP_Bool
Definition: def.h:50
enum SCIP_Objsense SCIP_OBJSENSE
Definition: type_prob.h:41
struct SCIP_Var SCIP_VAR
Definition: type_var.h:95
#define SCIP_Real
Definition: def.h:124
SCIP callable library.