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) |
| #define MAXINTSIZE 47 |
maximal intsize accepted in problem instance
Definition at line 47 of file main.c.
Referenced by fromCommandLine().
| #define MAXMEMUSAGE 0.9 |
maximal memory usage relative to given memory limit
Definition at line 48 of file main.c.
Referenced by processShellArguments().
| #define POSTTIME 3.0 |
time in seconds saved in the end to display solution and free everything
Definition at line 49 of file main.c.
Referenced by fromCommandLine().
|
static |
|
static |
|
static |
run SCIP from command line
| 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 assert(), c, FALSE, h, loadSettingsMaxSAT(), loadSettingsPureSat(), MAXINTSIZE, NULL, nvars, 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(), TRUE, and vars.
|
static |
evaluates command line parameters and runs SCIP appropriately in the given SCIP instance
| 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 assert(), FALSE, fromCommandLine(), i, 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().
|
static |
creates a SCIP instance with default plugins, evaluates command line parameters, runs SCIP appropriately, and frees the SCIP instance
| 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().
| int main | ( | int | argc, |
| char ** | argv ) |
main method starting the PBSolver
| argc | number of arguments |
| argv | string array with arguments |
Definition at line 581 of file main.c.
References runShell(), and SCIP_OKAY.