Detailed Description
main file for the Pseudo-Boolean solver application
Definition in file main.c.
#include <stdio.h>#include <string.h>#include <time.h>#include "scip/scipdefplugins.h"#include "scip/scipshell.h"#include "message_pb.h"#include "event_bestsol.h"Go to the source code of this file.
Macros | |
| #define | SETOBJ FALSE |
| #define | HEURISTICS_OFF FALSE |
| #define | MAXINTSIZE 47 |
| #define | MAXMEMUSAGE 0.9 |
| #define | POSTTIME 3.0 |
Functions | |
| static SCIP_RETCODE | loadSettingsPureSat (SCIP *scip) |
| static SCIP_RETCODE | loadSettingsMaxSAT (SCIP *scip) |
| static SCIP_RETCODE | fromCommandLine (SCIP *scip, const char *settingsfilename, const char *problemfilename, SCIP_Real timelimit, clock_t startclock) |
| static SCIP_RETCODE | processShellArguments (SCIP *scip, int argc, char **argv, clock_t startclock, const char *defaultsetname) |
| static SCIP_RETCODE | runShell (int argc, char **argv, clock_t startclock, const char *defaultsetname) |
| int | main (int argc, char **argv) |
Macro Definition Documentation
◆ SETOBJ
◆ HEURISTICS_OFF
◆ MAXINTSIZE
| #define MAXINTSIZE 47 |
◆ MAXMEMUSAGE
| #define MAXMEMUSAGE 0.9 |
◆ POSTTIME
| #define POSTTIME 3.0 |
Function Documentation
◆ loadSettingsPureSat()
|
static |
sets parameters for pure satisfiability problems
- Parameters
-
scip SCIP data structure
Definition at line 54 of file main.c.
References SCIP_OKAY.
Referenced by fromCommandLine().
◆ loadSettingsMaxSAT()
|
static |
sets parameters for maximum satisfiability instances
- Parameters
-
scip SCIP data structure
Definition at line 64 of file main.c.
References SCIP_OKAY.
Referenced by fromCommandLine().
◆ fromCommandLine()
|
static |
run SCIP from command line
- Parameters
-
scip SCIP data structure settingsfilename settings file name problemfilename problem file name timelimit required time limit startclock clock at which the process started
Definition at line 74 of file main.c.
References FALSE, h, loadSettingsMaxSAT(), loadSettingsPureSat(), MAXINTSIZE, NULL, POSTTIME, SCIP_Bool, SCIP_CALL, SCIP_INVALIDCALL, SCIP_INVALIDDATA, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_Real, SCIP_SETPPCTYPE_COVERING, SCIPchgVarObj(), SCIPconshdlrGetCheckConss(), SCIPconshdlrGetConss(), SCIPconshdlrGetNCheckConss(), SCIPconshdlrGetNConss(), SCIPcreateEventHdlrBestsol(), SCIPduplicateBufferArray, SCIPfindConshdlr(), SCIPfreeBufferArray, SCIPgetHeurs(), SCIPgetIndVarPseudoboolean(), SCIPgetMessagehdlr(), SCIPgetNCheckConss(), SCIPgetNHeurs(), SCIPgetNOrigVars(), SCIPgetOrigVars(), SCIPgetReadingTime(), SCIPgetTypeSetppc(), SCIPheurGetFreq(), SCIPheurGetName(), SCIPinfoMessage(), SCIPisZero(), SCIPmessagehdlrGetData(), SCIPpresolve(), SCIPprintSolutionPbSolver(), SCIPprintStatistics(), SCIPprintUnsupportedPbSolver(), SCIPreadParams(), SCIPreadProb(), SCIPsetBoolParam(), SCIPsetIntParam(), SCIPsetRealParam(), SCIPsnprintf(), SCIPsolve(), SCIPsplitFilename(), SCIPvarGetNLocksUp(), SCIPvarGetObj(), SCIPwriteParams(), SCIPwriteTransProblem(), and TRUE.
Referenced by processShellArguments().
◆ processShellArguments()
|
static |
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 startclock clock at which the process started defaultsetname name of default settings file
Definition at line 303 of file main.c.
References FALSE, fromCommandLine(), interactive(), MAXMEMUSAGE, NULL, SCIP_Bool, SCIP_CALL, SCIP_CALL_FINALLY, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_Real, SCIPaddDialogInputLine(), SCIPerrorMessage, SCIPfclose(), SCIPfeof(), SCIPfgets(), SCIPfileExists(), SCIPfopen(), SCIPgetMessagehdlr(), SCIPinfoMessage(), SCIPmessagehdlrGetData(), SCIPprintExternalCodes(), SCIPprintVersion(), SCIPreadParams(), SCIPsetIntParam(), SCIPsetMessagehdlrLogfile(), SCIPsetMessagehdlrQuiet(), SCIPsetRealParam(), SCIPstartInteraction(), and TRUE.
Referenced by runShell().
◆ runShell()
|
static |
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 startclock clock at which the process started defaultsetname name of default settings file
Definition at line 535 of file main.c.
References BMScheckEmptyMemory, FALSE, NULL, processShellArguments(), SCIP_CALL, SCIP_OKAY, SCIPcreate(), SCIPcreateMessagehdlrPbSolver(), SCIPfree(), SCIPincludeDefaultPlugins(), SCIPmessagehdlrRelease(), SCIPsetMessagehdlr(), and TRUE.
Referenced by main().
◆ main()
| int main | ( | int | argc, |
| char ** | argv | ||
| ) |
main method starting the PBSolver
- Parameters
-
argc number of arguments argv string array with arguments
Definition at line 581 of file main.c.
References runShell(), and SCIP_OKAY.