54#define READER_NAME "smpsreader"
55#define READER_DESC "file reader for core problem of stochastic programs in the SMPS file format"
56#define READER_EXTENSION "smps"
58#define SMPS_MAX_LINELEN 1024
62#define COR_FILEEXTENSION "cor"
63#define TIM_FILEEXTENSION "tim"
64#define STO_FILEEXTENSION "sto"
103 (*smpsi)->lineno = 0;
104 (*smpsi)->haserror =
FALSE;
105 (*smpsi)->buf [0] =
'\0';
161 smpsi->
f0 = smpsi->
f1 = 0;
172 while( *smpsi->
buf ==
'*' );
175 len = (
unsigned int) strlen(smpsi->
buf);
178 for(
i = 0;
i < len;
i++ )
180 if( (smpsi->
buf[
i] ==
'\t') || (smpsi->
buf[
i] ==
'\n') || (smpsi->
buf[
i] ==
'\r') )
206 while( is_marker || is_empty );
267 fromlastslash = (
char*) strrchr(filename,
'/');
269 if( fromlastslash ==
NULL )
272 parentlen = strlen(filename) - (strlen(fromlastslash) - 1);
274 (void)
SCIPstrncpy(parent, filename, (
int)parentlen + 1);
337 if( !hascorfile || !hastimfile || !hasstofile )
343 for(
i = 0;
i < 3;
i++ )
365 "core problem has %d variables (%d bin, %d int, %d impl, %d cont) and %d constraints\n",
408 "has %d variables (%d bin, %d int, %d impl, %d cont) and %d constraints\n",
#define SCIP_STRINGEQ(name, reference, retcode)
#define SCIP_CALL_TERMINATE(retcode, x, TERM)
SCIP_FILE * SCIPfopen(const char *path, const char *mode)
int SCIPfclose(SCIP_FILE *fp)
char * SCIPfgets(char *s, int size, SCIP_FILE *stream)
int SCIPstoGetNScenarios(SCIP *scip)
SCIP_RETCODE SCIPreadCor(SCIP *scip, const char *filename, SCIP_RESULT *result)
SCIP_RETCODE SCIPreadTim(SCIP *scip, const char *filename, SCIP_RESULT *result)
SCIP_RETCODE SCIPreadSto(SCIP *scip, const char *filename, SCIP_RESULT *result)
void SCIPsplitFilename(char *filename, char **path, char **name, char **extension, char **compression)
SCIP_RETCODE SCIPincludeReaderSmps(SCIP *scip)
SCIP_RETCODE SCIPgetOrigVarsData(SCIP *scip, SCIP_VAR ***vars, int *nvars, int *nbinvars, int *nintvars, int *nimplvars, int *ncontvars)
int SCIPgetNOrigConss(SCIP *scip)
void SCIPinfoMessage(SCIP *scip, FILE *file, const char *formatstr,...)
SCIP_RETCODE SCIPgetBoolParam(SCIP *scip, const char *name, SCIP_Bool *value)
#define SCIPfreeBufferArray(scip, ptr)
#define SCIPduplicateBufferArray(scip, ptr, source, num)
#define SCIPfreeBlockMemory(scip, ptr)
#define SCIPallocBlockMemory(scip, ptr)
SCIP_RETCODE SCIPsetReaderCopy(SCIP *scip, SCIP_READER *reader,)
SCIP_RETCODE SCIPincludeReaderBasic(SCIP *scip, SCIP_READER **readerptr, const char *name, const char *desc, const char *extension, SCIP_READERDATA *readerdata)
SCIP_RETCODE SCIPsetReaderRead(SCIP *scip, SCIP_READER *reader,)
const char * SCIPreaderGetName(SCIP_READER *reader)
int SCIPstrcasecmp(const char *s1, const char *s2)
int SCIPsnprintf(char *t, int len, const char *s,...)
void SCIPprintSysError(const char *message)
int SCIPstrncpy(char *t, const char *s, int size)
char * SCIPstrtok(char *s, const char *delim, char **ptrptr)
static assert(heur !=NULL)
memory allocation routines
wrapper functions to map file i/o to standard or zlib file i/o
struct SCIP_File SCIP_FILE
public methods for message output
public data structures and miscellaneous methods
public methods for input file readers
COR file reader (MPS format of the core problem for stochastic programs).
static void clearFrom(char *buf, unsigned int pos)
#define STO_FILEEXTENSION
static SCIP_RETCODE smpsinputCreate(SCIP *scip, SMPSINPUT **smpsi, SCIP_FILE *fp)
static SCIP_Bool smpsinputReadLine(SMPSINPUT *smpsi)
#define TIM_FILEEXTENSION
enum SCIP_SmpsFileType SCIP_SMPSFILETYPE
static void smpsinputFree(SCIP *scip, SMPSINPUT **smpsi)
struct SmpsInput SMPSINPUT
static const char * smpsinputField0(const SMPSINPUT *smpsi)
#define COR_FILEEXTENSION
SMPS file reader - SMPS files lists the cor, tim and sto files for a single instance to be read.
STO file reader - the stochastic information of an instance in SMPS format.
int SCIPtimGetNStages(SCIP *scip)
TIM file reader - the stage information for a stochastic programming instance in SMPS format.
public methods for memory management
public methods for message handling
public methods for global and local (sub)problems
public methods for reader plugins
struct SCIP_Reader SCIP_READER
#define SCIP_DECL_READERREAD(x)
#define SCIP_DECL_READERCOPY(x)
enum SCIP_Retcode SCIP_RETCODE