32 #define READER_NAME "solreader" 33 #define READER_DESC "file reader for primal solutions" 34 #define READER_EXTENSION "sol" 56 assert(fname != NULL);
62 SCIPerrorMessage(
"Cannot read solution file if vartable is disabled. Make sure parameter 'misc/usevartable' is set to TRUE.\n");
88 fname, stored ?
"accepted" :
"rejected - solution is infeasible or objective too poor");
97 partial ?
"partial " :
"", fname, stored ?
"accepted as candidate, will be checked when solving starts" :
"rejected - solution objective too poor");
119 assert(
scip != NULL);
120 assert(reader != NULL);
142 assert(reader != NULL);
144 assert(result != NULL);
150 SCIPerrorMessage(
"reading of solution file is only possible after a problem was created\n");
157 "primal solution from solution file <%s> was ignored - problem is already solved to optimality\n",
173 if(
SCIPfgets(buffer, (
int)
sizeof(buffer), file) == NULL )
185 while( isspace((
unsigned char)*s) )
187 if( s[0] ==
'<' && s[1] ==
'?' && s[2] ==
'x' && s[3] ==
'm' && s[4] ==
'l' )
218 assert(reader != NULL);
SCIP_STAGE SCIPgetStage(SCIP *scip)
SCIP_RETCODE SCIPaddSolFree(SCIP *scip, SCIP_SOL **sol, SCIP_Bool *stored)
const char * SCIPreaderGetName(SCIP_READER *reader)
static SCIP_DECL_READERREAD(readerReadSol)
enum SCIP_Retcode SCIP_RETCODE
static SCIP_DECL_READERCOPY(readerCopySol)
SCIP_Bool SCIPisTransformed(SCIP *scip)
SCIP_FILE * SCIPfopen(const char *path, const char *mode)
struct SCIP_File SCIP_FILE
char * SCIPfgets(char *s, int size, SCIP_FILE *stream)
SCIP_RETCODE SCIPgetBoolParam(SCIP *scip, const char *name, SCIP_Bool *value)
void SCIPverbMessage(SCIP *scip, SCIP_VERBLEVEL msgverblevel, FILE *file, const char *formatstr,...)
SCIP_RETCODE SCIPincludeReaderBasic(SCIP *scip, SCIP_READER **readerptr, const char *name, const char *desc, const char *extension, SCIP_READERDATA *readerdata)
void SCIPprintSysError(const char *message)
SCIP_RETCODE SCIPtrySolFree(SCIP *scip, SCIP_SOL **sol, SCIP_Bool printreason, SCIP_Bool completely, SCIP_Bool checkbounds, SCIP_Bool checkintegrality, SCIP_Bool checklprows, SCIP_Bool *stored)
SCIP_RETCODE SCIPfreeSol(SCIP *scip, SCIP_SOL **sol)
SCIP_RETCODE SCIPsetReaderCopy(SCIP *scip, SCIP_READER *reader, SCIP_DECL_READERCOPY((*readercopy)))
SCIP_RETCODE SCIPreadSolFile(SCIP *scip, const char *filename, SCIP_SOL *sol, SCIP_Bool xml, SCIP_Bool *partial, SCIP_Bool *error)
static SCIP_RETCODE readSol(SCIP *scip, const char *fname, SCIP_Bool xml)
file reader for primal solutions
SCIP_RETCODE SCIPsetReaderRead(SCIP *scip, SCIP_READER *reader, SCIP_DECL_READERREAD((*readerread)))
SCIP_Bool SCIPsolIsPartial(SCIP_SOL *sol)
int SCIPfclose(SCIP_FILE *fp)
SCIP_RETCODE SCIPincludeReaderSol(SCIP *scip)
SCIP_RETCODE SCIPcreateSol(SCIP *scip, SCIP_SOL **sol, SCIP_HEUR *heur)