Scippy

SCIP

Solving Constraint Integer Programs

type_reader.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 type_reader.h
17  * @ingroup TYPEDEFINITIONS
18  * @brief type definitions for input file readers
19  * @author Tobias Achterberg
20  */
21 
22 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
23 
24 #ifndef __SCIP_TYPE_READER_H__
25 #define __SCIP_TYPE_READER_H__
26 
27 #include "scip/def.h"
28 #include "scip/type_cons.h"
29 #include "scip/type_retcode.h"
30 #include "scip/type_result.h"
31 #include "scip/type_scip.h"
32 #include "scip/type_var.h"
33 
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37 
38 typedef struct SCIP_Reader SCIP_READER; /**< reader data structure */
39 typedef struct SCIP_ReaderData SCIP_READERDATA; /**< reader specific data */
40 
41 
42 /** copy method for reader plugins (called when SCIP copies plugins)
43  *
44  * input:
45  * - scip : SCIP main data structure
46  * - reader : the reader itself
47  */
48 #define SCIP_DECL_READERCOPY(x) SCIP_RETCODE x (SCIP* scip, SCIP_READER* reader)
49 
50 
51 /** destructor of reader to free user data (called when SCIP is exiting)
52  *
53  * input:
54  * - scip : SCIP main data structure
55  * - reader : the reader itself
56  */
57 #define SCIP_DECL_READERFREE(x) SCIP_RETCODE x (SCIP* scip, SCIP_READER* reader)
58 
59 /** problem reading method of reader
60  *
61  * input:
62  * - scip : SCIP main data structure
63  * - reader : the reader itself
64  * - filename : full path and name of file to read, or NULL if stdin should be used
65  * - result : pointer to store the result of the file reading call
66  *
67  * possible return values for *result:
68  * - SCIP_SUCCESS : the reader read the file correctly and created an appropriate problem
69  * - SCIP_DIDNOTRUN : the reader is not responsible for given input file
70  *
71  * If the reader detected an error in the input file, it should return with RETCODE SCIP_READERROR or SCIP_NOFILE.
72  */
73 #define SCIP_DECL_READERREAD(x) SCIP_RETCODE x (SCIP* scip, SCIP_READER* reader, const char* filename, SCIP_RESULT* result)
74 
75 /** problem writing method of reader; NOTE: if the parameter "genericnames" is TRUE, then
76  * SCIP already set all variable and constraint names to generic names; therefore, this
77  * method should always use SCIPvarGetName() and SCIPconsGetName();
78  *
79  * input:
80  * - scip : SCIP main data structure
81  * - reader : the reader itself
82  * - file : output file, or NULL if standard output should be used
83  * - name : problem name
84  * - probdata : user problem data set by the reader
85  * - transformed : TRUE iff problem is the transformed problem
86  * - objsense : objective sense
87  * - objscale : scalar applied to objective function; external objective value is
88  extobj = objsense * objscale * (intobj + objoffset)
89  * - objoffset : objective offset from bound shifting and fixing
90  * - vars : array with active variables ordered binary, integer, implicit, continuous
91  * - nvars : number of active variables in the problem
92  * - nbinvars : number of binary variables
93  * - nintvars : number of general integer variables
94  * - nimplvars : number of implicit integer variables
95  * - ncontvars; : number of continuous variables
96  * - fixedvars : array with fixed and aggregated variables
97  * - nfixedvars : number of fixed and aggregated variables in the problem
98  * - startnvars : number of variables existing when problem solving started
99  * - conss : array with constraints of the problem
100  * - nconss : number of constraints in the problem
101  * - maxnconss : maximum number of constraints existing at the same time
102  * - startnconss : number of constraints existing when problem solving started
103  * - genericnames : using generic variable and constraint names?
104  * - result : pointer to store the result of the file reading call
105  *
106  * possible return values for *result:
107  * - SCIP_SUCCESS : the reader wrote the file correctly
108  * - SCIP_DIDNOTRUN : the reader is not responsible for given input file
109  *
110  * If the reader detected an error while writing the output file, it should return with RETCODE SCIP_WRITEERROR
111  */
112 #define SCIP_DECL_READERWRITE(x) SCIP_RETCODE x (SCIP* scip, SCIP_READER* reader, FILE* file, \
113  const char* name, SCIP_PROBDATA* probdata, SCIP_Bool transformed, \
114  SCIP_OBJSENSE objsense, SCIP_Real objscale, SCIP_Real objoffset, \
115  SCIP_VAR** vars, int nvars, int nbinvars, int nintvars, int nimplvars, int ncontvars, \
116  SCIP_VAR** fixedvars, int nfixedvars, int startnvars, \
117  SCIP_CONS** conss, int nconss, int maxnconss, int startnconss, \
118  SCIP_Bool genericnames, SCIP_RESULT* result)
119 
120 #ifdef __cplusplus
121 }
122 #endif
123 
124 #endif
type definitions for return codes for SCIP methods
type definitions for SCIP&#39;s main datastructure
type definitions for problem variables
struct SCIP_ReaderData SCIP_READERDATA
Definition: type_reader.h:39
result codes for SCIP callback methods
common defines and data types used in all packages of SCIP
type definitions for constraints and constraint handlers