Scippy

SCIP

Solving Constraint Integer Programs

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-2024 Zuse Institute Berlin (ZIB) */
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.h
26 * @ingroup INTERNALAPI
27 * @brief internal methods for input file readers
28 * @author Tobias Achterberg
29 */
30
31/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
32
33#ifndef __SCIP_READER_H__
34#define __SCIP_READER_H__
35
36
37#include "scip/def.h"
38#include "scip/type_prob.h"
39#include "scip/type_retcode.h"
40#include "scip/type_result.h"
41#include "scip/type_set.h"
42#include "scip/type_reader.h"
43#include "scip/pub_reader.h"
44
45#ifdef __cplusplus
46extern "C" {
47#endif
48
49
50/** copies the given reader to a new scip */
52 SCIP_READER* reader, /**< reader */
53 SCIP_SET* set /**< SCIP_SET of SCIP to copy to */
54 );
55
56/** creates a reader */
58 SCIP_READER** reader, /**< pointer to store reader */
59 SCIP_SET* set, /**< global SCIP settings */
60 const char* name, /**< name of reader */
61 const char* desc, /**< description of reader */
62 const char* extension, /**< file extension that reader processes */
63 SCIP_DECL_READERCOPY ((*readercopy)), /**< copy method of reader or NULL if you don't want to copy your plugin into sub-SCIPs */
64 SCIP_DECL_READERFREE ((*readerfree)), /**< destructor of reader */
65 SCIP_DECL_READERREAD ((*readerread)), /**< read method */
66 SCIP_DECL_READERWRITE ((*readerwrite)), /**< write method */
67 SCIP_READERDATA* readerdata /**< reader data */
68 );
69
70/** frees memory of reader */
72 SCIP_READER** reader, /**< pointer to reader data structure */
73 SCIP_SET* set /**< global SCIP settings */
74 );
75
76/** reads problem data from file with given reader or returns SCIP_DIDNOTRUN */
78 SCIP_READER* reader, /**< reader */
79 SCIP_SET* set, /**< global SCIP settings */
80 const char* filename, /**< name of the input file */
81 const char* extension, /**< extension of the input file name */
82 SCIP_RESULT* result /**< pointer to store the result of the callback method */
83 );
84
85/** writes problem data to file with given reader or returns SCIP_DIDNOTRUN */
87 SCIP_READER* reader, /**< reader */
88 SCIP_PROB* prob, /**< problem data */
89 SCIP_SET* set, /**< global SCIP settings */
90 FILE* file, /**< output file (or NULL for standard output) */
91 const char* format, /**< file format (or NULL) */
92 SCIP_Bool genericnames, /**< using generic variable and constraint names? */
93 SCIP_RESULT* result /**< pointer to store the result of the callback method */
94 );
95
96/** gets time in seconds used in this reader for reading */
98 SCIP_READER* reader /**< reader */
99 );
100
101/** enables or disables all clocks of \p reader, depending on the value of the flag */
103 SCIP_READER* reader, /**< the reader for which all clocks should be enabled or disabled */
104 SCIP_Bool enable /**< should the clocks be enabled? */
105 );
106
107/** resets reading time of reader */
109 SCIP_READER* reader /**< reader */
110 );
111
112/** sets copy method of reader */
114 SCIP_READER* reader, /**< reader */
115 SCIP_DECL_READERCOPY ((*readercopy)) /**< copy method of reader or NULL if you don't want to copy your plugin into sub-SCIPs */
116 );
117
118/** sets destructor of reader */
120 SCIP_READER* reader, /**< reader */
121 SCIP_DECL_READERFREE ((*readerfree)) /**< destructor of reader */
122 );
123
124/** sets read method of reader */
126 SCIP_READER* reader, /**< reader */
127 SCIP_DECL_READERREAD ((*readerread)) /**< read method */
128 );
129
130/** sets write method of reader */
132 SCIP_READER* reader, /**< reader */
133 SCIP_DECL_READERWRITE ((*readerwrite)) /**< write method */
134 );
135
136#ifdef __cplusplus
137}
138#endif
139
140#endif
SCIP_DECL_READERREAD(ReaderTSP::scip_read)
Definition: ReaderTSP.cpp:211
SCIP_DECL_READERWRITE(ReaderTSP::scip_write)
Definition: ReaderTSP.cpp:546
SCIP_DECL_READERFREE(ReaderTSP::scip_free)
Definition: ReaderTSP.cpp:198
common defines and data types used in all packages of SCIP
#define SCIP_Bool
Definition: def.h:91
#define SCIP_Real
Definition: def.h:172
public methods for input file readers
SCIP_RETCODE SCIPreaderWrite(SCIP_READER *reader, SCIP_PROB *prob, SCIP_SET *set, FILE *file, const char *format, SCIP_Bool genericnames, SCIP_RESULT *result)
Definition: reader.c:270
SCIP_RETCODE SCIPreaderFree(SCIP_READER **reader, SCIP_SET *set)
Definition: reader.c:139
void SCIPreaderSetFree(SCIP_READER *reader, SCIP_DECL_READERFREE((*readerfree)))
Definition: reader.c:524
void SCIPreaderSetCopy(SCIP_READER *reader, SCIP_DECL_READERCOPY((*readercopy)))
Definition: reader.c:513
SCIP_Real SCIPreaderGetReadingTime(SCIP_READER *reader)
Definition: reader.c:607
SCIP_RETCODE SCIPreaderCopyInclude(SCIP_READER *reader, SCIP_SET *set)
Definition: reader.c:58
SCIP_RETCODE SCIPreaderRead(SCIP_READER *reader, SCIP_SET *set, const char *filename, const char *extension, SCIP_RESULT *result)
Definition: reader.c:183
void SCIPreaderSetWrite(SCIP_READER *reader, SCIP_DECL_READERWRITE((*readerwrite)))
Definition: reader.c:546
SCIP_RETCODE SCIPreaderCreate(SCIP_READER **reader, SCIP_SET *set, const char *name, const char *desc, const char *extension, SCIP_DECL_READERCOPY((*readercopy)), SCIP_DECL_READERFREE((*readerfree)), SCIP_DECL_READERREAD((*readerread)), SCIP_DECL_READERWRITE((*readerwrite)), SCIP_READERDATA *readerdata)
Definition: reader.c:113
SCIP_RETCODE SCIPreaderResetReadingTime(SCIP_READER *reader)
Definition: reader.c:628
void SCIPreaderEnableOrDisableClocks(SCIP_READER *reader, SCIP_Bool enable)
Definition: reader.c:617
void SCIPreaderSetRead(SCIP_READER *reader, SCIP_DECL_READERREAD((*readerread)))
Definition: reader.c:535
Definition: heur_padm.c:135
type definitions for storing and manipulating the main problem
type definitions for input file readers
struct SCIP_ReaderData SCIP_READERDATA
Definition: type_reader.h:53
#define SCIP_DECL_READERCOPY(x)
Definition: type_reader.h:62
result codes for SCIP callback methods
enum SCIP_Result SCIP_RESULT
Definition: type_result.h:61
type definitions for return codes for SCIP methods
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:63
type definitions for global SCIP settings