43#define READER_NAME "lopreader"
44#define READER_DESC "file reader for linear ordering problems"
45#define READER_EXTENSION "lop"
47#define READER_STRLEN 65536
68 while ( isspace(**s) )
72 if ( **s ==
'\n' || **s ==
'\0' )
83 while ( isspace(**s) )
88 if ( isdigit(**s) || **s ==
'-' || **s ==
'+' )
93 while ( isdigit(**s) || **s ==
'-' || **s ==
'+' )
117 const char* filename,
159 while ( *s !=
'\0' && (isspace(*s) || isdigit(*s)) )
163 if ( *s ==
'\0' || *s ==
'\n' )
166 while ( !
SCIPfeof(file) && *n < 0 );
177 for (
i = 0;
i < *n; ++
i)
181 for (
i = 0;
i < *n; ++
i)
183 for (j = 0; j < *n; ++j)
203 const char* filename,
213 while ( filename[
i] != 0)
218 while ((
i > 0) && (filename[
i] !=
'.') && (filename[
i] !=
'/') && (filename[
i] !=
'\\'))
222 if (filename[
i] ==
'.')
225 while ((
i > 0) && (filename[
i] !=
'/') && (filename[
i] !=
'\\'))
230 if ((filename[
i] ==
'/') || (filename[
i] ==
'\\'))
234 while ( (
i < l) && (filename[
i] != 0) )
236 probname[j++] = filename[
i++];
288 for (
i = 0;
i < n; ++
i)
291 for (j = 0; j < n; ++j)
306 SCIP_CALL(
SCIPcreateConsLOP(
scip, &cons,
"LOP", n,
vars,
TRUE,
TRUE,
TRUE,
TRUE,
TRUE,
FALSE,
319 for (
i = 0;
i < n; ++
i)
321 for (j = 0; j < n; ++j)
SCIP_RETCODE SCIPcreateConsLOP(SCIP *scip, SCIP_CONS **cons, const char *name, int n, SCIP_VAR ***vars, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode)
constraint handler for linear ordering constraints
SCIP_FILE * SCIPfopen(const char *path, const char *mode)
int SCIPfeof(SCIP_FILE *stream)
int SCIPfclose(SCIP_FILE *fp)
char * SCIPfgets(char *s, int size, SCIP_FILE *stream)
SCIP_RETCODE SCIPaddVar(SCIP *scip, SCIP_VAR *var)
SCIP_RETCODE SCIPaddCons(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPsetObjsense(SCIP *scip, SCIP_OBJSENSE objsense)
SCIP_RETCODE SCIPcreateProbBasic(SCIP *scip, const char *name)
void SCIPinfoMessage(SCIP *scip, FILE *file, const char *formatstr,...)
SCIP_RETCODE SCIPreleaseCons(SCIP *scip, SCIP_CONS **cons)
#define SCIPfreeBlockMemoryArray(scip, ptr, num)
#define SCIPallocBlockMemoryArray(scip, ptr, num)
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,)
SCIP_RETCODE SCIPprintOrigProblem(SCIP *scip, FILE *file, const char *extension, SCIP_Bool genericnames)
SCIP_RETCODE SCIPreleaseVar(SCIP *scip, SCIP_VAR **var)
SCIP_RETCODE SCIPcreateVar(SCIP *scip, SCIP_VAR **var, const char *name, SCIP_Real lb, SCIP_Real ub, SCIP_Real obj, SCIP_VARTYPE vartype, SCIP_Bool initial, SCIP_Bool removable, SCIP_DECL_VARDELORIG((*vardelorig)), SCIP_DECL_VARTRANS((*vartrans)), SCIP_DECL_VARDELTRANS((*vardeltrans)), SCIP_DECL_VARCOPY((*varcopy)), SCIP_VARDATA *vardata)
int SCIPsnprintf(char *t, int len, const char *s,...)
void SCIPprintSysError(const char *message)
assert(minobj< SCIPgetCutoffbound(scip))
wrapper functions to map file i/o to standard or zlib file i/o
struct SCIP_File SCIP_FILE
static SCIP_RETCODE getProblemName(const char *filename, char *probname, int maxSize)
SCIP_RETCODE SCIPincludeReaderLOP(SCIP *scip)
static SCIP_RETCODE LOPreadFile(SCIP *scip, const char *filename, int *n, SCIP_Real ***W)
static SCIP_RETCODE getNextNumber(SCIP_FILE *file, char *buffer, char **s, SCIP_Real *value)
linear ordering file reader
#define SCIP_DECL_READERREAD(x)
enum SCIP_Retcode SCIP_RETCODE