/** creates a SCIP instance with default plugins, evaluates command line parameters, runs SCIP appropriately, * and frees the SCIP instance */ SCIP_RETCODE SCIPrunShell( int argc, /**< number of shell parameters */ char** argv, /**< array with shell parameters */ const char* defaultsetname /**< name of default settings file */ ) { SCIP* scip = NULL; /********* * Setup * *********/ /* initialize SCIP */ SCIP_CALL( SCIPcreate(&scip) ); /* include default SCIP plugins */ SCIP_CALL( SCIPincludeDefaultPlugins(scip) ); /********************************** * Process command line arguments * **********************************/ SCIP_CALL( SCIPprocessShellArguments(scip, argc, argv, defaultsetname) ); /******************** * Deinitialization * ********************/ SCIP_CALL( SCIPfree(&scip) ); BMScheckEmptyMemory(); return SCIP_OKAY; }
/** runs the shell */ static SCIP_RETCODE runShell( int argc, /**< number of shell parameters */ char** argv, /**< array with shell parameters */ const char* defaultsetname /**< name of default settings file */ ) { SCIP* scip = NULL; /********* * Setup * *********/ /* initialize SCIP */ SCIP_CALL( SCIPcreate(&scip) ); /* include default plugins */ SCIP_CALL( SCIPincludeDefaultPlugins(scip) ); /* include problem reader */ SCIP_CALL( SCIPincludeReaderCmin(scip) ); SCIP_CALL( SCIPincludeReaderSch(scip) ); SCIP_CALL( SCIPincludeReaderSm(scip) ); SCIP_CALL( SCIPincludeReaderRcp(scip) ); /* include problem specific heuristic */ SCIP_CALL( SCIPincludeHeurListScheduling(scip) ); SCIP_CALL( SCIPincludeHeurOptcumulative(scip) ); /* include cumulative constraint handler with optional activities */ SCIP_CALL( SCIPincludeConshdlrOptcumulative(scip) ); #ifdef WITH_CPOPTIMIZER SCIP_CALL( SCIPsetSolveCumulative(scip, cpoptimizer) ); #endif /********************************** * Process command line arguments * **********************************/ SCIP_CALL( SCIPprocessShellArguments(scip, argc, argv, defaultsetname) ); /******************** * Deinitialization * ********************/ SCIP_CALL( SCIPfree(&scip) ); /* check block memory */ BMScheckEmptyMemory(); return SCIP_OKAY; }
/** creates a SCIP instance with default plugins, evaluates command line parameters, runs SCIP appropriately, * and frees the SCIP instance */ static SCIP_RETCODE runShell( int argc, /**< number of shell parameters */ char** argv, /**< array with shell parameters */ const char* defaultsetname /**< name of default settings file */ ) { SCIP* scip = NULL; /********* * Setup * *********/ /* initialize SCIP */ SCIP_CALL( SCIPcreate(&scip) ); /* include binpacking reader */ SCIP_CALL( SCIPincludeReaderBpa(scip) ); /* include binpacking branching and branching data */ SCIP_CALL( SCIPincludeBranchruleRyanFoster(scip) ); SCIP_CALL( SCIPincludeConshdlrSamediff(scip) ); /* include binpacking pricer */ SCIP_CALL( SCIPincludePricerBinpacking(scip) ); /* include default SCIP plugins */ SCIP_CALL( SCIPincludeDefaultPlugins(scip) ); /* for column generation instances, disable restarts */ SCIP_CALL( SCIPsetIntParam(scip,"presolving/maxrestarts",0) ); /* turn off all separation algorithms */ SCIP_CALL( SCIPsetSeparating(scip, SCIP_PARAMSETTING_OFF, TRUE) ); /********************************** * Process command line arguments * **********************************/ SCIP_CALL( SCIPprocessShellArguments(scip, argc, argv, defaultsetname) ); /******************** * Deinitialization * ********************/ SCIP_CALL( SCIPfree(&scip) ); BMScheckEmptyMemory(); return SCIP_OKAY; }
/** runs the shell */ static SCIP_RETCODE runShell( int argc, /**< number of shell parameters */ char** argv, /**< array with shell parameters */ const char* defaultsetname /**< name of default settings file */ ) { SCIP* scip = NULL; /********* * Setup * *********/ /* initialize SCIP */ SCIP_CALL( SCIPcreate(&scip) ); /* include default plugins */ SCIP_CALL( SCIPincludeDefaultPlugins(scip) ); /* include event handler for best solution found */ SCIP_CALL( SCIPincludeEventHdlrBestsol(scip) ); SCIP_CALL( SCIPincludeEventHdlrBoundwriting(scip) ); /********************************** * Process command line arguments * **********************************/ SCIP_CALL( SCIPprocessShellArguments(scip, argc, argv, defaultsetname) ); /******************** * Deinitialization * ********************/ SCIP_CALL( SCIPfree(&scip) ); /* check block memory */ BMScheckEmptyMemory(); return SCIP_OKAY; }