Detailed Description
SCIP command line interface.
Definition in file scipshell.c.
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include "scip/scip.h"
#include "scip/scipdefplugins.h"
#include "scip/scipshell.h"
#include "scip/message_default.h"
#include "scip/reader_nl.h"
Go to the source code of this file.
Functions | |
static SCIP_RETCODE | readParams (SCIP *scip, const char *filename) |
static SCIP_RETCODE | fromCommandLine (SCIP *scip, const char *filename) |
static SCIP_RETCODE | fromAmpl (SCIP *scip, char *nlfilename, SCIP_Bool interactive, const char *defaultsetname) |
SCIP_RETCODE | SCIPprocessShellArguments (SCIP *scip, int argc, char **argv, const char *defaultsetname) |
SCIP_RETCODE | SCIPrunShell (int argc, char **argv, const char *defaultsetname) |
Function Documentation
◆ readParams()
|
static |
- Parameters
-
scip SCIP data structure filename parameter file name
Definition at line 48 of file scipshell.c.
References NULL, SCIP_CALL, SCIP_OKAY, SCIPfileExists(), SCIPinfoMessage(), and SCIPreadParams().
Referenced by SCIPprocessShellArguments().
◆ fromCommandLine()
|
static |
- Note
- The message handler should be only fed line by line such the message has the chance to add string in front of each message
- Parameters
-
scip SCIP data structure filename input file name
Definition at line 65 of file scipshell.c.
References FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_NOFILE, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIP_READERROR, SCIPcreateSolCopy(), SCIPfreeSol(), SCIPgetBestSol(), SCIPgetBoolParam(), SCIPinfoMessage(), SCIPprintBestSol(), SCIPprintSol(), SCIPprintStatistics(), SCIPreadProb(), SCIPretransformSol(), and SCIPsolve().
Referenced by SCIPprocessShellArguments().
◆ fromAmpl()
|
static |
runs SCIP as if it was called by AMPL
- Parameters
-
scip SCIP data structure nlfilename name of .nl file, without the .nl interactive whether to start SCIP shell instead of solve only defaultsetname name of default settings file
Definition at line 159 of file scipshell.c.
References FALSE, interactive(), NULL, SCIP_Bool, SCIP_CALL, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIP_VERBLEVEL_HIGH, SCIPaddBoolParam(), SCIPaddStringParam(), SCIPerrorMessage, SCIPfileExists(), SCIPgetBoolParam(), SCIPgetStringParam(), SCIPinfoMessage(), SCIPprintExternalCodes(), SCIPprintStatistics(), SCIPprintVersion(), SCIPreadParams(), SCIPreadProb(), SCIPsetMessagehdlrLogfile(), SCIPsetParam(), SCIPsnprintf(), SCIPsolve(), SCIPstartInteraction(), SCIPverbMessage(), SCIPwriteParams(), SCIPwriteSolutionNl(), and TRUE.
Referenced by SCIPprocessShellArguments().
◆ SCIPprocessShellArguments()
SCIP_RETCODE SCIPprocessShellArguments | ( | SCIP * | scip, |
int | argc, | ||
char ** | argv, | ||
const char * | defaultsetname | ||
) |
evaluates command line parameters and runs SCIP appropriately in the given SCIP instance
- Parameters
-
scip SCIP data structure argc number of shell parameters argv array with shell parameters defaultsetname name of default settings file
Definition at line 273 of file scipshell.c.
References FALSE, fromAmpl(), fromCommandLine(), interactive(), NULL, readParams(), SCIP_Bool, SCIP_CALL, SCIP_CALL_FINALLY, SCIP_ERROR, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_Real, SCIP_UNKNOWN, SCIPaddDialogInputLine(), SCIPfclose(), SCIPfeastol(), SCIPfeof(), SCIPfgets(), SCIPfopen(), SCIPinfoMessage(), SCIPparseReal(), SCIPprintBuildOptions(), SCIPprintExternalCodes(), SCIPprintSysError(), SCIPprintVersion(), SCIPsetIntParam(), SCIPsetMessagehdlrLogfile(), SCIPsetMessagehdlrQuiet(), SCIPstartInteraction(), SCIPvalidateSolve(), and TRUE.
Referenced by main(), runSCIP(), runShell(), SCIPrunColoringShell(), and SCIPrunShell().
◆ SCIPrunShell()
SCIP_RETCODE SCIPrunShell | ( | int | argc, |
char ** | argv, | ||
const char * | defaultsetname | ||
) |
creates a SCIP instance with default plugins, evaluates command line parameters, runs SCIP appropriately, and frees the SCIP instance
- Parameters
-
argc number of shell parameters argv array with shell parameters defaultsetname name of default settings file
Definition at line 569 of file scipshell.c.
References BMScheckEmptyMemory, NULL, SCIP_CALL, SCIP_OKAY, SCIPcreate(), SCIPenableDebugSol(), SCIPfree(), SCIPincludeDefaultPlugins(), and SCIPprocessShellArguments().
Referenced by main().