46#define HEURISTICS_OFF FALSE
48#define MAXMEMUSAGE 0.9
76 const char* settingsfilename,
77 const char* problemfilename,
102 if( settingsfilename !=
NULL )
108 if( timelimit >= 0.0 )
114 if( timelimit < 0.0 )
135 if( strcmp(extension,
"opb") == 0 || strcmp(extension,
"wbo") == 0 )
160 for( v = 0; v <
nvars; ++v )
173 assert(conshdlrconss !=
NULL || nconshdlrconss == 0);
174 hasindicator =
FALSE;
175 for(
c = 0;
c < nconshdlrconss; ++
c )
197 for( v = 0; v <
nvars; ++v )
208 if( hasindicator && settingsfilename ==
NULL )
226 if( conshdlr !=
NULL )
231 if( conshdlr !=
NULL )
236 if( conshdlr !=
NULL )
242 assert(conshdlrconss !=
NULL || nconshdlrconss == 0);
243 for(
c = 0;
c < nconshdlrconss; ++
c )
248 if(
c == nconshdlrconss )
249 npuresatconss += nconshdlrconss;
259 if( settingsfilename ==
NULL )
275 for(
h = 0;
h < nheuristics; ++
h )
285 SCIPinfoMessage(
scip,
NULL,
"\n- non default parameters ----------------------------------------------------------------------\n\n");
287 SCIPinfoMessage(
scip,
NULL,
"-----------------------------------------------------------------------------------------------\n");
308 const char* defaultsetname
318 char* logname =
NULL;
319 char* settingsname =
NULL;
320 char* problemname =
NULL;
327 for(
i = 1;
i < argc; ++
i )
330 if( argv[
i][0] ==
'-' && strlen(argv[
i]) == 2 )
355 settingsname = argv[
i];
365 problemname = argv[
i];
387 timelimit = atof(argv[
i]);
424 (void)
SCIPfgets(buffer, (
int)
sizeof(buffer), file);
425 if( buffer[0] !=
'\0' )
472 if( problemname ==
NULL )
514 SCIPinfoMessage(
scip,
NULL,
"syntax: %s [-q] [-p] [-l <logfile>] [-s <settings>] [-f <problem>] [-d <dispfreq>] [-t <timelimit>] [-m <memlimit>] [-b <batchfile> ...] [-c <command> ...]\n", argv[0]);
539 const char* defaultsetname
587 clock_t startclock, endclock;
589 startclock = clock();
591 retcode =
runShell(argc, argv, startclock,
"scip.set");
596 printf(
"s UNKNOWN\n");
598 printf(
"c Time complete (sec): %10.3lf\n", (
double)(endclock - startclock) / (
double)CLOCKS_PER_SEC);
int main(int argc, char **argv)
static SCIP_RETCODE fromCommandLine(SCIP *scip, const char *filename, const char *soluname)
SCIP_RETCODE SCIPcreateEventHdlrBestsol(SCIP *scip)
eventhdlr to print the best solution value
static SCIP_RETCODE runShell(int argc, char **argv, clock_t startclock, const char *defaultsetname)
static SCIP_RETCODE processShellArguments(SCIP *scip, int argc, char **argv, clock_t startclock, const char *defaultsetname)
static SCIP_RETCODE loadSettingsMaxSAT(SCIP *scip)
static SCIP_RETCODE loadSettingsPureSat(SCIP *scip)
#define SCIP_CALL_FINALLY(x, y)
static SCIP_RETCODE interactive(SCIP *scip)
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_VAR * SCIPgetIndVarPseudoboolean(SCIP *const scip, SCIP_CONS *const cons)
SCIP_SETPPCTYPE SCIPgetTypeSetppc(SCIP *scip, SCIP_CONS *cons)
@ SCIP_SETPPCTYPE_COVERING
SCIP_Bool SCIPfileExists(const char *filename)
void SCIPsplitFilename(char *filename, char **path, char **name, char **extension, char **compression)
SCIP_RETCODE SCIPfree(SCIP **scip)
SCIP_RETCODE SCIPcreate(SCIP **scip)
int SCIPgetNCheckConss(SCIP *scip)
SCIP_VAR ** SCIPgetOrigVars(SCIP *scip)
int SCIPgetNOrigVars(SCIP *scip)
SCIP_RETCODE SCIPwriteTransProblem(SCIP *scip, const char *filename, const char *extension, SCIP_Bool genericnames)
SCIP_RETCODE SCIPreadProb(SCIP *scip, const char *filename, const char *extension)
void SCIPinfoMessage(SCIP *scip, FILE *file, const char *formatstr,...)
SCIP_RETCODE SCIPsetMessagehdlr(SCIP *scip, SCIP_MESSAGEHDLR *messagehdlr)
SCIP_MESSAGEHDLR * SCIPgetMessagehdlr(SCIP *scip)
void SCIPsetMessagehdlrLogfile(SCIP *scip, const char *filename)
void SCIPsetMessagehdlrQuiet(SCIP *scip, SCIP_Bool quiet)
void SCIPprintVersion(SCIP *scip, FILE *file)
SCIP_RETCODE SCIPsetIntParam(SCIP *scip, const char *name, int value)
SCIP_RETCODE SCIPreadParams(SCIP *scip, const char *filename)
SCIP_RETCODE SCIPwriteParams(SCIP *scip, const char *filename, SCIP_Bool comments, SCIP_Bool onlychanged)
SCIP_RETCODE SCIPsetBoolParam(SCIP *scip, const char *name, SCIP_Bool value)
SCIP_RETCODE SCIPsetRealParam(SCIP *scip, const char *name, SCIP_Real value)
int SCIPconshdlrGetNCheckConss(SCIP_CONSHDLR *conshdlr)
SCIP_CONS ** SCIPconshdlrGetCheckConss(SCIP_CONSHDLR *conshdlr)
int SCIPconshdlrGetNConss(SCIP_CONSHDLR *conshdlr)
SCIP_CONSHDLR * SCIPfindConshdlr(SCIP *scip, const char *name)
SCIP_CONS ** SCIPconshdlrGetConss(SCIP_CONSHDLR *conshdlr)
SCIP_RETCODE SCIPstartInteraction(SCIP *scip)
SCIP_RETCODE SCIPaddDialogInputLine(SCIP *scip, const char *inputline)
void SCIPprintExternalCodes(SCIP *scip, FILE *file)
SCIP_HEUR ** SCIPgetHeurs(SCIP *scip)
int SCIPgetNHeurs(SCIP *scip)
int SCIPheurGetFreq(SCIP_HEUR *heur)
const char * SCIPheurGetName(SCIP_HEUR *heur)
#define SCIPfreeBufferArray(scip, ptr)
#define SCIPduplicateBufferArray(scip, ptr, source, num)
SCIP_RETCODE SCIPpresolve(SCIP *scip)
SCIP_RETCODE SCIPsolve(SCIP *scip)
SCIP_RETCODE SCIPprintStatistics(SCIP *scip, FILE *file)
SCIP_Real SCIPgetReadingTime(SCIP *scip)
SCIP_Bool SCIPisZero(SCIP *scip, SCIP_Real val)
SCIP_Real SCIPvarGetObj(SCIP_VAR *var)
int SCIPvarGetNLocksUp(SCIP_VAR *var)
SCIP_RETCODE SCIPchgVarObj(SCIP *scip, SCIP_VAR *var, SCIP_Real newobj)
int SCIPsnprintf(char *t, int len, const char *s,...)
assert(minobj< SCIPgetCutoffbound(scip))
#define BMScheckEmptyMemory()
SCIP_MESSAGEHDLRDATA * SCIPmessagehdlrGetData(SCIP_MESSAGEHDLR *messagehdlr)
SCIP_RETCODE SCIPmessagehdlrRelease(SCIP_MESSAGEHDLR **messagehdlr)
SCIP_RETCODE SCIPprintSolutionPbSolver(SCIP *scip)
SCIP_RETCODE SCIPcreateMessagehdlrPbSolver(SCIP_MESSAGEHDLR **messagehdlr, SCIP_Bool buffered, const char *filename, SCIP_Bool quiet)
SCIP_RETCODE SCIPprintUnsupportedPbSolver(SCIP *scip)
messagehdlr for the Pseudo-Boolean output format
struct SCIP_File SCIP_FILE
SCIP_RETCODE SCIPincludeDefaultPlugins(SCIP *scip)
SCIP command line interface.
struct SCIP_Cons SCIP_CONS
struct SCIP_Conshdlr SCIP_CONSHDLR
struct SCIP_Heur SCIP_HEUR
struct SCIP_Messagehdlr SCIP_MESSAGEHDLR
struct SCIP_MessagehdlrData SCIP_MESSAGEHDLRDATA
enum SCIP_Retcode SCIP_RETCODE