[Scip] some questions about the file readers in the coloring example

Stefan Heinz heinz at zib.de
Tue Dec 22 11:24:36 MET 2009


Hi everyone,

here some additional comments:

SCIP_DECL_READERREAD is macro which is defined in the file type_reader.c
and  looks like this:

/** problem reading method of reader
 *
 *  input:
 *  - scip            : SCIP main data structure
 *  - reader          : the reader itself
 *  - filename        : full path and name of file to read, or NULL if
stdin should be used
 *  - result          : pointer to store the result of the file reading call
 *
 *  possible return values for *result:
 *  - SCIP_SUCCESS    : the reader read the file correctly and created an
appropritate problem
 *  - SCIP_DIDNOTRUN  : the reader is not responsible for given input file
 *
 *  If the reader detected an error in the input file, it should return
with RETCODE SCIP_PARSEERROR or SCIP_NOFILE.
 */
#define SCIP_DECL_READERREAD(x) SCIP_RETCODE x (SCIP* scip, SCIP_READER*
reader, const char* filename, SCIP_RESULT* result)

There you see the paramentes scip, reader, filename, and result.

The method SCIPincludeReaderCol() is used to tell SCIP that there is
another reader. This reader is add to SCIP and is from that moment
available for reading.

If you read in a file in SCIP, SCIP will depending on the extension of the
file call the corresponding reader (Each reader defines an file extension
for which files it should be used). In case of the coloring example each
file ending on .col (or .col.gz) is given to the the reader reader_col.c.
This means the function we are talking about is called by SCIP.

Best Stefan


More information about the Scip mailing list