44 SCIPinfoMessage(scip, NULL,
"reading user parameter file <%s>\n", filename);
48 SCIPinfoMessage(scip, NULL,
"user parameter file <%s> not found - using default parameters\n", filename);
83 SCIPinfoMessage(scip, NULL,
"no reader for input file <%s> available\n", filename);
115 if ( bestsol == NULL )
129 SCIPinfoMessage(scip, NULL,
"\nprimal solution (transformed space):\n");
130 SCIPinfoMessage(scip, NULL,
"====================================\n\n");
153 const char* defaultsetname
156 char* probname = NULL;
157 char* settingsname = NULL;
158 char* logname = NULL;
167 const char* dualrefstring;
168 const char* primalrefstring;
179 randomseedread =
FALSE;
181 primalrefstring = NULL;
182 dualrefstring = NULL;
184 for( i = 1; i < argc; ++i )
186 if( strcmp(argv[i],
"-l") == 0 )
193 printf(
"missing log filename after parameter '-l'\n");
197 else if( strcmp(argv[i],
"-q") == 0 )
199 else if( strcmp(argv[i],
"-v") == 0 )
201 else if( strcmp(argv[i],
"--version") == 0 )
203 else if( strcmp(argv[i],
"-s") == 0 )
207 settingsname = argv[i];
210 printf(
"missing settings filename after parameter '-s'\n");
214 else if( strcmp(argv[i],
"-f") == 0 )
221 printf(
"missing problem filename after parameter '-f'\n");
225 else if( strcmp(argv[i],
"-c") == 0 )
235 printf(
"missing command line after parameter '-c'\n");
239 else if( strcmp(argv[i],
"-b") == 0 )
249 printf(
"cannot read command batch file <%s>\n", argv[i]);
259 (void)
SCIPfgets(buffer, (
int)
sizeof(buffer), file);
260 if( buffer[0] !=
'\0' )
271 printf(
"missing command batch filename after parameter '-b'\n");
275 else if( strcmp(argv[i],
"-r") == 0 )
279 if( i < argc && isdigit(argv[i][0]) )
281 randomseed = atoi(argv[i]);
282 randomseedread =
TRUE;
286 printf(
"Random seed parameter '-r' followed by something that is not an integer\n");
290 else if( strcmp(argv[i],
"-o") == 0 )
294 printf(
"wrong usage of reference objective parameter '-o': -o <primref> <dualref>\n");
300 primalrefstring = argv[i + 1];
301 dualrefstring = argv[i+2];
307 printf(
"invalid parameter <%s>\n", argv[i]);
312 if( interactive && probname != NULL )
314 printf(
"cannot mix batch mode '-c' and '-b' with file mode '-f'\n");
329 if( logname != NULL )
355 if( settingsname != NULL )
359 else if( defaultsetname != NULL )
376 if( probname != NULL )
380 if( primalrefstring != NULL && dualrefstring != NULL )
383 if( !
SCIPparseReal(scip, primalrefstring, &primalreference, &endptr) ||
384 !
SCIPparseReal(scip, dualrefstring, &dualreference, &endptr) )
386 printf(
"error parsing primal and dual reference values for validation: %s %s\n", primalrefstring, dualrefstring);
390 validatesolve =
TRUE;
408 printf(
"\nsyntax: %s [-l <logfile>] [-q] [-s <settings>] [-r <randseed>] [-f <problem>] [-b <batchfile>] [-c \"command\"]\n" 409 " -v, --version : print version and build options\n" 410 " -l <logfile> : copy output into log file\n" 411 " -q : suppress screen messages\n" 412 " -s <settings> : load parameter settings (.set) file\n" 413 " -f <problem> : load and solve problem file\n" 414 " -o <primref> <dualref> : pass primal and dual objective reference values for validation at the end of the solve\n" 415 " -b <batchfile>: load and execute dialog command batch file (can be used multiple times)\n" 416 " -r <randseed> : nonnegative integer to be used as random seed. " 417 "Has priority over random seed specified through parameter settings (.set) file\n" 418 " -c \"command\" : execute single line of dialog commands (can be used multiple times)\n\n",
431 const char* defaultsetname
SCIP_RETCODE SCIPprintBestSol(SCIP *scip, FILE *file, SCIP_Bool printzeros)
#define BMScheckEmptyMemory()
SCIP_Real SCIPfeastol(SCIP *scip)
SCIP_Bool SCIPparseReal(SCIP *scip, const char *str, SCIP_Real *value, char **endptr)
#define SCIP_CALL_FINALLY(x, y)
static SCIP_RETCODE fromCommandLine(SCIP *scip, const char *filename)
void SCIPprintExternalCodes(SCIP *scip, FILE *file)
enum SCIP_Retcode SCIP_RETCODE
static SCIP_RETCODE readParams(SCIP *scip, const char *filename)
SCIP_RETCODE SCIPcreate(SCIP **scip)
SCIP_RETCODE SCIPprintStatistics(SCIP *scip, FILE *file)
void SCIPinfoMessage(SCIP *scip, FILE *file, const char *formatstr,...)
SCIP_Bool SCIPfileExists(const char *filename)
SCIP_FILE * SCIPfopen(const char *path, const char *mode)
SCIP_RETCODE SCIPcreateSolCopy(SCIP *scip, SCIP_SOL **sol, SCIP_SOL *sourcesol)
SCIP_RETCODE SCIPsolve(SCIP *scip)
SCIP command line interface.
SCIP_RETCODE SCIPreadProb(SCIP *scip, const char *filename, const char *extension)
int SCIPfeof(SCIP_FILE *stream)
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)
SCIP_RETCODE SCIPrunShell(int argc, char **argv, const char *defaultsetname)
SCIP_RETCODE SCIPincludeDefaultPlugins(SCIP *scip)
void SCIPprintVersion(SCIP *scip, FILE *file)
void SCIPprintSysError(const char *message)
SCIP_RETCODE SCIPvalidateSolve(SCIP *scip, SCIP_Real primalreference, SCIP_Real dualreference, SCIP_Real reftol, SCIP_Bool quiet, SCIP_Bool *feasible, SCIP_Bool *primalboundcheck, SCIP_Bool *dualboundcheck)
void SCIPsetMessagehdlrQuiet(SCIP *scip, SCIP_Bool quiet)
SCIP_RETCODE SCIPsetIntParam(SCIP *scip, const char *name, int value)
SCIP_RETCODE SCIPfreeSol(SCIP *scip, SCIP_SOL **sol)
SCIP_RETCODE SCIPretransformSol(SCIP *scip, SCIP_SOL *sol)
SCIP_RETCODE SCIPprocessShellArguments(SCIP *scip, int argc, char **argv, const char *defaultsetname)
SCIP_RETCODE SCIPstartInteraction(SCIP *scip)
SCIP_SOL * SCIPgetBestSol(SCIP *scip)
void SCIPsetMessagehdlrLogfile(SCIP *scip, const char *filename)
SCIP_RETCODE SCIPreadParams(SCIP *scip, const char *filename)
#define SCIP_CALL_TERMINATE(retcode, x, TERM)
int SCIPfclose(SCIP_FILE *fp)
void SCIPprintBuildOptions(SCIP *scip, FILE *file)
static SCIP_RETCODE interactive(SCIP *scip)
SCIP_RETCODE SCIPaddDialogInputLine(SCIP *scip, const char *inputline)
SCIP_RETCODE SCIPfree(SCIP **scip)
void SCIPenableDebugSol(SCIP *scip)
SCIP_RETCODE SCIPprintSol(SCIP *scip, SCIP_SOL *sol, FILE *file, SCIP_Bool printzeros)