61#define READER_NAME "bndreader"
62#define READER_DESC "file reader for variable bounds"
63#define READER_EXTENSION "bnd"
65#define DEFAULT_IMPROVEONLY FALSE
71 SCIP_Bool improveonly;
90 SCIP_Bool unknownvariablemessage;
91 SCIP_Bool usevartable;
101 SCIPerrorMessage(
"Cannot read bounds file if vartable is disabled. Make sure parameter 'misc/usevartable' is set to TRUE.\n");
116 unknownvariablemessage =
FALSE;
138 (void) sscanf(buffer, format, varname, lbstring, ubstring);
143 SCIPerrorMessage(
"Error parsing variable name in line %d of bounds file <%s>\n", lineno, fname);
149 nread = sscanf(endptr, format, lbstring, ubstring);
152 SCIPerrorMessage(
"invalid input line %d in bounds file <%s>: <%s>\n", lineno, fname, buffer);
159 if( !unknownvariablemessage )
161 SCIPwarningMessage(
scip,
"unable to parse variable name in line %d of bounds file <%s>:\n", lineno, fname);
164 unknownvariablemessage =
TRUE;
178 nread = sscanf(lbstring,
"%lf", &lb);
181 SCIPerrorMessage(
"invalid lower bound value <%s> for variable <%s> in line %d of bounds file <%s>\n",
182 lbstring, varname, lineno, fname);
198 nread = sscanf(ubstring,
"%lf", &ub);
201 SCIPerrorMessage(
"invalid lower bound value <%s> for variable <%s> in line %d of bounds file <%s>\n",
202 ubstring, varname, lineno, fname);
208 if( readerdata->improveonly )
212 SCIPwarningMessage(
scip,
"not applying lower bound value %s for variable <%s> in line %d of bounds file %s,"
213 " because it does not improve existing bound of %f\n",
218 SCIPwarningMessage(
scip,
"not applying upper bound value %s for variable <%s> in line %d of bounds file %s, "
219 "because it does not improve existing bound of %f\n",
232 SCIPerrorMessage(
"Error changing lower bound for variable <%s> in line %d of bounds file <%s>\n", varname, lineno, fname);
240 SCIPerrorMessage(
"Error changing upper bound for variable <%s> in line %d of bounds file <%s>\n", varname, lineno, fname);
292 SCIPerrorMessage(
"reading of bounds file is only possible after a problem was created\n");
298 SCIPerrorMessage(
"reading of bounds file is only possible during problem creation stage\n");
375 varname = varname + 2;
452 "reading/bndreader/improveonly",
"only use improving bounds",
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 SCIPincludeReaderBnd(SCIP *scip)
SCIP_STAGE SCIPgetStage(SCIP *scip)
void SCIPinfoMessage(SCIP *scip, FILE *file, const char *formatstr,...)
SCIP_MESSAGEHDLR * SCIPgetMessagehdlr(SCIP *scip)
void SCIPwarningMessage(SCIP *scip, const char *formatstr,...)
SCIP_RETCODE SCIPgetBoolParam(SCIP *scip, const char *name, SCIP_Bool *value)
SCIP_RETCODE SCIPaddBoolParam(SCIP *scip, const char *name, const char *desc, SCIP_Bool *valueptr, SCIP_Bool isadvanced, SCIP_Bool defaultvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
#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_READERDATA * SCIPreaderGetData(SCIP_READER *reader)
SCIP_RETCODE SCIPsetReaderWrite(SCIP *scip, SCIP_READER *reader,)
SCIP_RETCODE SCIPsetReaderRead(SCIP *scip, SCIP_READER *reader,)
const char * SCIPreaderGetName(SCIP_READER *reader)
SCIP_RETCODE SCIPsetReaderFree(SCIP *scip, SCIP_READER *reader,)
SCIP_Real SCIPinfinity(SCIP *scip)
SCIP_Bool SCIPisInfinity(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisGT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisLT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_RETCODE SCIPchgVarLb(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound)
SCIP_Real SCIPvarGetLbOriginal(SCIP_VAR *var)
SCIP_Bool SCIPvarIsTransformed(SCIP_VAR *var)
SCIP_RETCODE SCIPchgVarUb(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound)
SCIP_RETCODE SCIPparseVarName(SCIP *scip, const char *str, SCIP_VAR **var, char **endptr)
SCIP_Real SCIPvarGetUbGlobal(SCIP_VAR *var)
const char * SCIPvarGetName(SCIP_VAR *var)
SCIP_Real SCIPvarGetUbOriginal(SCIP_VAR *var)
SCIP_Bool SCIPvarIsTransformedOrigvar(SCIP_VAR *var)
SCIP_Real SCIPvarGetLbGlobal(SCIP_VAR *var)
int SCIPsnprintf(char *t, int len, const char *s,...)
void SCIPprintSysError(const char *message)
int SCIPstrncasecmp(const char *s1, const char *s2, int length)
assert(minobj< SCIPgetCutoffbound(scip))
void SCIPmessageFPrintInfo(SCIP_MESSAGEHDLR *messagehdlr, FILE *file, const char *formatstr,...)
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
public methods for problem variables
#define DEFAULT_IMPROVEONLY
static SCIP_RETCODE readBounds(SCIP *scip, const char *fname, SCIP_READERDATA *readerdata)
static void printBounds(SCIP *scip, SCIP_MESSAGEHDLR *messagehdlr, FILE *file, SCIP_Real lb, SCIP_Real ub)
static SCIP_RETCODE SCIPwriteBnd(SCIP *scip, FILE *file, SCIP_VAR **vars, int nvars, SCIP_RESULT *result)
file reader for variable bounds
public methods for memory management
public methods for message handling
public methods for numerical tolerances
public methods for SCIP parameter handling
public methods for reader plugins
public methods for SCIP variables
#define SCIP_DECL_READERWRITE(x)
struct SCIP_ReaderData SCIP_READERDATA
#define SCIP_DECL_READERREAD(x)
#define SCIP_DECL_READERCOPY(x)
#define SCIP_DECL_READERFREE(x)
enum SCIP_Result SCIP_RESULT
enum SCIP_Retcode SCIP_RETCODE