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