GCG 4.1.1 (dev)

Generic Column Generation

Loading...
Searching...
No Matches
main.c File Reference

Detailed Description

Main file for C compilation.

Author
Gerald Gamrath
Martin Bergner
Christian Puchert

Definition in file main.c.

#include <string.h>
#include "scip/scip.h"
#include "scip/scipdefplugins.h"
#include "scip/scipshell.h"
#include "gcg/gcgplugins.h"
#include "gcg/cons_decomp.h"
#include "gcg/relax_gcg.h"
#include "gcg/gcg.h"

Go to the source code of this file.

Functions

static SCIP_RETCODE readParams (SCIP *scip, const char *filename)
static SCIP_RETCODE fromCommandLine (GCG *gcg, const char *filename, const char *decname)
static SCIP_RETCODE GCGprocessGCGShellArguments (GCG *gcg, int argc, char **argv, const char *defaultsetname)
static SCIP_RETCODE GCGrunGCGShell (int argc, char **argv, const char *defaultsetname)
int main (int argc, char **argv)

Function Documentation

◆ readParams()

SCIP_RETCODE readParams ( SCIP * scip,
const char * filename )
static

read in parameter file

Returns
SCIP return code
Parameters
scipSCIP data structure
filenameparameter file name

Definition at line 57 of file main.c.

References readParams(), and SCIP_CALL().

Referenced by GCGprocessGCGShellArguments(), and readParams().

◆ fromCommandLine()

SCIP_RETCODE fromCommandLine ( GCG * gcg,
const char * filename,
const char * decname )
static

runs GCG from the command line

Returns
SCIPreturn code
Parameters
gcgGCG data structure
filenameinput file name
decnamedecomposition file name (or NULL)

Definition at line 76 of file main.c.

References fromCommandLine(), GCGgetOrigprob(), GCGprintStatistics(), GCGsolve(), GCGtransformProb(), and SCIP_CALL().

Referenced by fromCommandLine(), and GCGprocessGCGShellArguments().

◆ GCGprocessGCGShellArguments()

SCIP_RETCODE GCGprocessGCGShellArguments ( GCG * gcg,
int argc,
char ** argv,
const char * defaultsetname )
static

evaluates command line parameters and runs GCG appropriately in the given SCIP instance

Returns
SCIP return code
Parameters
gcgGCG data structure
argcnumber of shell parameters
argvarray with shell parameters
defaultsetnamename of default settings file

Definition at line 127 of file main.c.

References fromCommandLine(), GCGgetMasterprob(), GCGgetOrigprob(), GCGprocessGCGShellArguments(), i, readParams(), and SCIP_CALL().

Referenced by GCGprocessGCGShellArguments(), and GCGrunGCGShell().

◆ GCGrunGCGShell()

SCIP_RETCODE GCGrunGCGShell ( int argc,
char ** argv,
const char * defaultsetname )
static

runs the interactive shell

Returns
SCIP return code
Parameters
argcnumber of shell parameters
argvarray with shell parameters
defaultsetnamename of default settings file

Definition at line 414 of file main.c.

References GCGcreate(), GCGfree(), GCGprintVersion(), GCGprocessGCGShellArguments(), GCGrunGCGShell(), and SCIP_CALL().

Referenced by GCGrunGCGShell(), and main().

◆ main()

int main ( int argc,
char ** argv )

main function called first

Returns
0 if success, -1 otherwise
Parameters
argcnumber of arguments
argvarray of arguments

Definition at line 452 of file main.c.

References GCGrunGCGShell(), and retcode.