Scippy

SCIP

Solving Constraint Integer Programs

scipshell.c File Reference

Detailed Description

SCIP command line interface.

Author
Tobias Achterberg

Definition in file scipshell.c.

#include <stdio.h>
#include <string.h>
#include "scip/scip.h"
#include "scip/scipdefplugins.h"
#include "scip/scipshell.h"
#include "scip/message_default.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)
 
SCIP_RETCODE SCIPprocessShellArguments (SCIP *scip, int argc, char **argv, const char *defaultsetname)
 
SCIP_RETCODE SCIPrunShell (int argc, char **argv, const char *defaultsetname)
 

Function Documentation

static SCIP_RETCODE readParams ( SCIP scip,
const char *  filename 
)
static
Parameters
scipSCIP data structure
filenameparameter file name

Definition at line 36 of file scipshell.c.

References NULL, SCIP_CALL, SCIP_OKAY, SCIPfileExists(), SCIPinfoMessage(), and SCIPreadParams().

Referenced by SCIPprocessShellArguments().

static SCIP_RETCODE fromCommandLine ( SCIP scip,
const char *  filename 
)
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
scipSCIP data structure
filenameinput file name

Definition at line 53 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().

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
scipSCIP data structure
argcnumber of shell parameters
argvarray with shell parameters
defaultsetnamename of default settings file

Definition at line 148 of file scipshell.c.

References FALSE, fromCommandLine(), NULL, readParams(), SCIP_Bool, SCIP_CALL, SCIP_MAXSTRLEN, SCIP_OKAY, SCIPaddDialogInputLine(), SCIPfclose(), SCIPfeof(), SCIPfgets(), SCIPfopen(), SCIPinfoMessage(), SCIPprintExternalCodes(), SCIPprintSysError(), SCIPprintVersion(), SCIPsetMessagehdlrLogfile(), SCIPsetMessagehdlrQuiet(), SCIPstartInteraction(), and TRUE.

Referenced by 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
argcnumber of shell parameters
argvarray with shell parameters
defaultsetnamename of default settings file

Definition at line 340 of file scipshell.c.

References BMScheckEmptyMemory, NULL, SCIP_CALL, SCIP_OKAY, SCIPcreate(), SCIPenableDebugSol(), SCIPfree(), SCIPincludeDefaultPlugins(), and SCIPprocessShellArguments().

Referenced by main().