Scippy

SCIP

Solving Constraint Integer Programs

reader_gms.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 2002-2022 Zuse Institute Berlin */
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_gms.h
26  * @ingroup FILEREADERS
27  * @brief GAMS file reader and writer
28  * @author Ambros Gleixner
29  *
30  * This reader writes a CIP in GAMS format.
31  * It can write all kinds of linear and nonlinear constraints (as occurring in MINLPs) and indicator constraints.
32  *
33  * If SCIP has been compiled with GAMS=true, it can also read GAMS model instances.
34  * This requires a working GAMS system.
35  */
36 
37 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
38 
39 #ifndef __SCIP_READER_GMS_H__
40 #define __SCIP_READER_GMS_H__
41 
42 #include "scip/def.h"
43 #include "scip/type_cons.h"
44 #include "scip/type_prob.h"
45 #include "scip/type_result.h"
46 #include "scip/type_retcode.h"
47 #include "scip/type_scip.h"
48 #include "scip/type_var.h"
49 
50 #ifdef __cplusplus
51 extern "C" {
52 #endif
53 
54 /** includes the gms file reader into SCIP
55  *
56  * @ingroup FileReaderIncludes
57  */
58 SCIP_EXPORT
60  SCIP* scip /**< SCIP data structure */
61  );
62 
63 /**@addtogroup FILEREADERS
64  *
65  * @{
66  */
67 
68 /** writes problem to file */
69 SCIP_EXPORT
71  SCIP* scip, /**< SCIP data structure */
72  FILE* file, /**< output file, or NULL if standard output should be used */
73  const char* name, /**< problem name */
74  SCIP_Bool transformed, /**< TRUE iff problem is the transformed problem */
75  SCIP_OBJSENSE objsense, /**< objective sense */
76  SCIP_Real objscale, /**< scalar applied to objective function; external objective value is
77  * extobj = objsense * objscale * (intobj + objoffset) */
78  SCIP_Real objoffset, /**< objective offset from bound shifting and fixing */
79  SCIP_VAR** vars, /**< array with active variables ordered binary, integer, implicit, continuous */
80  int nvars, /**< number of active variables in the problem */
81  int nbinvars, /**< number of binary variables */
82  int nintvars, /**< number of general integer variables */
83  int nimplvars, /**< number of implicit integer variables */
84  int ncontvars, /**< number of continuous variables */
85  SCIP_CONS** conss, /**< array with constraints of the problem */
86  int nconss, /**< number of constraints in the problem */
87  SCIP_RESULT* result /**< pointer to store the result of the file writing call */
88  );
89 
90 /** @} */
91 
92 #ifdef __cplusplus
93 }
94 #endif
95 
96 #endif
enum SCIP_Result SCIP_RESULT
Definition: type_result.h:61
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:63
type definitions for return codes for SCIP methods
SCIP_RETCODE SCIPwriteGms(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_gms.c:1329
SCIP_RETCODE SCIPincludeReaderGms(SCIP *scip)
Definition: reader_gms.c:1290
type definitions for SCIP&#39;s main datastructure
type definitions for problem variables
#define SCIP_Bool
Definition: def.h:93
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:186
result codes for SCIP callback methods
common defines and data types used in all packages of SCIP
type definitions for constraints and constraint handlers