38#if defined(_WIN32) || defined(_WIN64)
48#define COL_MAX_LINELEN 1024
107 if( soluname !=
NULL )
161 const char* defaultsetname
164 char* probname =
NULL;
165 char* soluname =
NULL;
166 char* settingsname =
NULL;
167 char* logname =
NULL;
171 SCIP_Bool paramerror;
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],
"-s") == 0 )
203 settingsname = argv[
i];
206 printf(
"missing settings filename after parameter '-s'\n");
210 else if( strcmp(argv[
i],
"-f") == 0 )
220 printf(
"missing problem filename after parameter '-f'\n");
224 else if( strcmp(argv[
i],
"-c") == 0 )
234 printf(
"missing command line after parameter '-c'\n");
238 else if( strcmp(argv[
i],
"-x") == 0 )
247 printf(
"missing solution filename after parameter '-x'\n");
251 else if( strcmp(argv[
i],
"-b") == 0 )
261 printf(
"cannot read command batch file <%s>\n", argv[
i]);
271 (void)
SCIPfgets(buffer, (
int)
sizeof(buffer), file);
272 if( buffer[0] !=
'\0' )
283 printf(
"missing command batch filename after parameter '-b'\n");
291 printf(
"cannot mix batch mode '-c' and '-b' with file mode '-f'\n");
306 if( logname !=
NULL )
325 if( settingsname !=
NULL )
329 else if( defaultsetname !=
NULL )
337 if( probname !=
NULL )
351 printf(
"\nsyntax: %s [-l <logfile>] [-q] [-s <settings>] [-f <problem>]\n"
352 " -l <logfile> : copy output into log file\n"
353 " -q : suppress screen messages\n"
354 " -s <settings> : load parameter settings (.set) file\n"
355 " -f <problem> : load and solve problem file\n\n",
367 const char* defaultsetname
int main(int argc, char **argv)
static SCIP_RETCODE processArguments(SCIP *scip, int argc, char **argv, const char *defaultsetname)
static SCIP_RETCODE SCIPrunCyc(int argc, char **argv, const char *defaultsetname)
static SCIP_RETCODE readParams(SCIP *scip, const char *filename)
static SCIP_RETCODE fromCommandLine(SCIP *scip, const char *filename, const char *soluname)
SCIP_RETCODE SCIPincludeCycPlugins(SCIP *scip)
SCIP plugins for cycle clustering.
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_Bool SCIPfileExists(const char *filename)
SCIP_RETCODE SCIPfree(SCIP **scip)
SCIP_RETCODE SCIPcreate(SCIP **scip)
SCIP_RETCODE SCIPreadProb(SCIP *scip, const char *filename, const char *extension)
void SCIPinfoMessage(SCIP *scip, FILE *file, const char *formatstr,...)
void SCIPsetMessagehdlrLogfile(SCIP *scip, const char *filename)
void SCIPsetMessagehdlrQuiet(SCIP *scip, SCIP_Bool quiet)
void SCIPprintError(SCIP_RETCODE retcode)
void SCIPprintVersion(SCIP *scip, FILE *file)
SCIP_RETCODE SCIPreadParams(SCIP *scip, const char *filename)
SCIP_RETCODE SCIPstartInteraction(SCIP *scip)
SCIP_RETCODE SCIPaddDialogInputLine(SCIP *scip, const char *inputline)
void SCIPprintExternalCodes(SCIP *scip, FILE *file)
SCIP_RETCODE SCIPsolve(SCIP *scip)
SCIP_RETCODE SCIPprintStatistics(SCIP *scip, FILE *file)
int SCIPsnprintf(char *t, int len, const char *s,...)
void SCIPprintSysError(const char *message)
#define BMScheckEmptyMemory()
problem data for cycle clustering problem
struct SCIP_File SCIP_FILE
file reader for cycle clustering instances
SCIP command line interface.
enum SCIP_Retcode SCIP_RETCODE