internal methods for input file readers
Definition in file reader.h.
#include "scip/def.h"
#include "scip/type_prob.h"
#include "scip/type_retcode.h"
#include "scip/type_result.h"
#include "scip/type_set.h"
#include "scip/type_reader.h"
#include "scip/pub_reader.h"
Go to the source code of this file.
SCIP_RETCODE SCIPreaderCopyInclude | ( | SCIP_READER * | reader, |
SCIP_SET * | set | ||
) |
copies the given reader to a new scip
reader | reader |
set | SCIP_SET of SCIP to copy to |
Definition at line 47 of file reader.c.
References SCIP_CALL, SCIP_OKAY, SCIPreaderGetName(), and SCIPsetDebugMsg.
Referenced by SCIPsetEnableOrDisablePluginClocks().
SCIP_RETCODE SCIPreaderCreate | ( | SCIP_READER ** | reader, |
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 | ||
) |
creates a reader
reader | pointer to store reader |
name | name of reader |
desc | description of reader |
extension | file extension that reader processes |
readerdata | reader data |
Definition at line 65 of file reader.c.
References BMSallocMemory, BMSduplicateMemoryArray, SCIP_ALLOC, SCIP_CALL, SCIP_CLOCKTYPE_DEFAULT, SCIP_OKAY, and SCIPclockCreate().
Referenced by SCIPincludeReader(), and SCIPincludeReaderBasic().
SCIP_RETCODE SCIPreaderFree | ( | SCIP_READER ** | reader, |
SCIP_SET * | set | ||
) |
frees memory of reader
reader | pointer to reader data structure |
set | global SCIP settings |
Definition at line 99 of file reader.c.
References BMSfreeMemory, BMSfreeMemoryArray, SCIP_CALL, SCIP_OKAY, and SCIPclockFree().
SCIP_RETCODE SCIPreaderRead | ( | SCIP_READER * | reader, |
SCIP_SET * | set, | ||
const char * | filename, | ||
const char * | extension, | ||
SCIP_RESULT * | result | ||
) |
reads problem data from file with given reader or returns SCIP_DIDNOTRUN
reader | reader |
set | global SCIP settings |
filename | name of the input file |
extension | extension of the input file name |
result | pointer to store the result of the callback method |
Definition at line 140 of file reader.c.
References readerIsApplicable(), SCIP_Reader::readingtime, SCIP_CALL, SCIP_CLOCKTYPE_DEFAULT, SCIP_DIDNOTRUN, SCIP_NOFILE, SCIP_OKAY, SCIP_READERROR, SCIP_SUCCESS, SCIPclockCreate(), SCIPclockFree(), SCIPclockGetTime(), SCIPclockIsRunning(), SCIPclockSetTime(), SCIPclockStart(), and SCIPclockStop().
Referenced by SCIPreadProb().
SCIP_RETCODE SCIPreaderWrite | ( | SCIP_READER * | reader, |
SCIP_PROB * | prob, | ||
SCIP_SET * | set, | ||
FILE * | file, | ||
const char * | extension, | ||
SCIP_Bool | genericnames, | ||
SCIP_RESULT * | result | ||
) |
writes problem data to file with given reader or returns SCIP_DIDNOTRUN
reader | reader |
prob | problem data |
set | global SCIP settings |
file | output file (or NULL for standard output) |
extension | file format |
genericnames | using generic variable and constraint names? |
result | pointer to store the result of the callback method |
Definition at line 227 of file reader.c.
References SCIP_Prob::conss, SCIP_Prob::fixedvars, SCIP_Prob::maxnconss, SCIP_Prob::name, SCIP_Prob::nbinvars, SCIP_Prob::nconss, SCIP_Prob::ncontvars, SCIP_Prob::nfixedvars, SCIP_Prob::nimplvars, SCIP_Prob::nintvars, SCIP_Prob::nvars, SCIP_Prob::objoffset, SCIP_Prob::objscale, SCIP_Prob::objsense, SCIP_Prob::probdata, readerIsApplicable(), resetVarname(), SCIP_CALL, SCIP_DIDNOTRUN, SCIP_OBJSENSE_MINIMIZE, SCIP_OKAY, SCIP_WRITEERROR, SCIPconsGetName(), SCIPconshdlrGetConss(), SCIPconshdlrGetEnfoConss(), SCIPconshdlrGetName(), SCIPconshdlrGetNConss(), SCIPconshdlrGetNEnfoConss(), SCIPconsSetNamePointer(), SCIPsetAllocBufferArray, SCIPsetDebugMsg, SCIPsetFreeBufferArray, SCIPsnprintf(), SCIPvarGetName(), SCIPvarSetNamePointer(), SCIP_Prob::startnconss, SCIP_Prob::startnvars, SCIP_Prob::transformed, and SCIP_Prob::vars.
Referenced by printProblem().
SCIP_Real SCIPreaderGetReadingTime | ( | SCIP_READER * | reader | ) |
gets time in seconds used in this reader for reading
reader | reader |
Definition at line 565 of file reader.c.
References SCIP_Reader::readingtime, and SCIPclockGetTime().
Referenced by SCIPgetReadingTime().
void SCIPreaderEnableOrDisableClocks | ( | SCIP_READER * | reader, |
SCIP_Bool | enable | ||
) |
enables or disables all clocks of reader
, depending on the value of the flag
reader | the reader for which all clocks should be enabled or disabled |
enable | should the clocks be enabled? |
Definition at line 575 of file reader.c.
References SCIP_Reader::readingtime, and SCIPclockEnableOrDisable().
Referenced by SCIP_DECL_PARAMCHGD().
SCIP_RETCODE SCIPreaderResetReadingTime | ( | SCIP_READER * | reader | ) |
resets reading time of reader
reader | reader |
Definition at line 586 of file reader.c.
References SCIP_Reader::readingtime, SCIP_OKAY, and SCIPclockReset().
Referenced by SCIPfreeProb().
void SCIPreaderSetCopy | ( | SCIP_READER * | reader, |
SCIP_DECL_READERCOPY((*readercopy)) | |||
) |
sets copy method of reader
reader | reader |
Definition at line 471 of file reader.c.
Referenced by SCIPsetReaderCopy().
void SCIPreaderSetFree | ( | SCIP_READER * | reader, |
SCIP_DECL_READERFREE((*readerfree)) | |||
) |
sets destructor of reader
reader | reader |
Definition at line 482 of file reader.c.
Referenced by SCIPsetReaderFree().
void SCIPreaderSetRead | ( | SCIP_READER * | reader, |
SCIP_DECL_READERREAD((*readerread)) | |||
) |
sets read method of reader
reader | reader |
Definition at line 493 of file reader.c.
Referenced by SCIPsetReaderRead().
void SCIPreaderSetWrite | ( | SCIP_READER * | reader, |
SCIP_DECL_READERWRITE((*readerwrite)) | |||
) |
sets write method of reader
reader | reader |
Definition at line 504 of file reader.c.
Referenced by SCIPsetReaderWrite().