OFINS - Objective Function Induced Neighborhood Search - a primal heuristic for reoptimization.
Definition in file heur_ofins.c.
#include "blockmemshell/memory.h"
#include "scip/heuristics.h"
#include "scip/heur_ofins.h"
#include "scip/pub_event.h"
#include "scip/pub_heur.h"
#include "scip/pub_message.h"
#include "scip/pub_misc.h"
#include "scip/pub_sol.h"
#include "scip/pub_var.h"
#include "scip/scip_branch.h"
#include "scip/scip_copy.h"
#include "scip/scip_event.h"
#include "scip/scip_general.h"
#include "scip/scip_heur.h"
#include "scip/scip_mem.h"
#include "scip/scip_message.h"
#include "scip/scip_nodesel.h"
#include "scip/scip_numerics.h"
#include "scip/scip_param.h"
#include "scip/scip_prob.h"
#include "scip/scip_sol.h"
#include "scip/scip_solve.h"
#include "scip/scip_solvingstats.h"
#include "scip/scip_timing.h"
#include <string.h>
Go to the source code of this file.
Macros | |
#define | HEUR_NAME "ofins" |
#define | HEUR_DESC "primal heuristic for reoptimization, objective function induced neighborhood search" |
#define | HEUR_DISPCHAR SCIP_HEURDISPCHAR_LNS |
#define | HEUR_PRIORITY 60000 |
#define | HEUR_FREQ 0 |
#define | HEUR_FREQOFS 0 |
#define | HEUR_MAXDEPTH 0 |
#define | HEUR_TIMING SCIP_HEURTIMING_BEFORENODE |
#define | HEUR_USESSUBSCIP TRUE |
#define | DEFAULT_MAXNODES 5000LL |
#define | DEFAULT_MAXCHGRATE 0.50 |
#define | DEFAULT_COPYCUTS TRUE |
#define | DEFAULT_MAXCHANGE 0.04 |
#define | DEFAULT_MINIMPROVE 0.01 |
#define | DEFAULT_ADDALLSOLS FALSE |
#define | DEFAULT_MINNODES 50LL |
#define | DEFAULT_NODESOFS 500LL |
#define | DEFAULT_NODESQUOT 0.1 |
#define | DEFAULT_LPLIMFAC 2.0 |
#define | EVENTHDLR_NAME "Ofins" |
#define | EVENTHDLR_DESC "LP event handler for " HEUR_NAME " heuristic" |
Functions | |
static | SCIP_DECL_EVENTEXEC (eventExecOfins) |
static SCIP_RETCODE | setupAndSolve (SCIP *scip, SCIP *subscip, SCIP_HEUR *heur, SCIP_HEURDATA *heurdata, SCIP_RESULT *result, SCIP_Longint nstallnodes, SCIP_Bool *chgcoeffs) |
static SCIP_RETCODE | applyOfins (SCIP *scip, SCIP_HEUR *heur, SCIP_HEURDATA *heurdata, SCIP_RESULT *result, SCIP_Longint nstallnodes, SCIP_Bool *chgcoeffs) |
static | SCIP_DECL_HEURCOPY (heurCopyOfins) |
static | SCIP_DECL_HEURFREE (heurFreeOfins) |
static | SCIP_DECL_HEUREXEC (heurExecOfins) |
SCIP_RETCODE | SCIPincludeHeurOfins (SCIP *scip) |
#define HEUR_NAME "ofins" |
Definition at line 59 of file heur_ofins.c.
#define HEUR_DESC "primal heuristic for reoptimization, objective function induced neighborhood search" |
Definition at line 60 of file heur_ofins.c.
#define HEUR_DISPCHAR SCIP_HEURDISPCHAR_LNS |
Definition at line 61 of file heur_ofins.c.
#define HEUR_PRIORITY 60000 |
Definition at line 62 of file heur_ofins.c.
#define HEUR_FREQ 0 |
Definition at line 63 of file heur_ofins.c.
#define HEUR_FREQOFS 0 |
Definition at line 64 of file heur_ofins.c.
#define HEUR_MAXDEPTH 0 |
Definition at line 65 of file heur_ofins.c.
#define HEUR_TIMING SCIP_HEURTIMING_BEFORENODE |
Definition at line 66 of file heur_ofins.c.
#define HEUR_USESSUBSCIP TRUE |
does the heuristic use a secondary SCIP instance?
Definition at line 67 of file heur_ofins.c.
#define DEFAULT_MAXNODES 5000LL |
maximum number of nodes to regard in the subproblem
Definition at line 70 of file heur_ofins.c.
#define DEFAULT_MAXCHGRATE 0.50 |
maximum percentage of changed objective coefficients
Definition at line 71 of file heur_ofins.c.
Referenced by SCIPincludeHeurOfins().
#define DEFAULT_COPYCUTS TRUE |
if DEFAULT_USELPROWS is FALSE, then should all active cuts from the cutpool of the original scip be copied to constraints of the subscip
Definition at line 72 of file heur_ofins.c.
#define DEFAULT_MAXCHANGE 0.04 |
maximal rate of change per coefficient to get fixed
Definition at line 74 of file heur_ofins.c.
Referenced by SCIPincludeHeurOfins().
#define DEFAULT_MINIMPROVE 0.01 |
factor by which OFINS should at least improve the incumbent
Definition at line 75 of file heur_ofins.c.
#define DEFAULT_ADDALLSOLS FALSE |
should all subproblem solutions be added to the original SCIP?
Definition at line 76 of file heur_ofins.c.
#define DEFAULT_MINNODES 50LL |
minimum number of nodes to regard in the subproblem
Definition at line 77 of file heur_ofins.c.
#define DEFAULT_NODESOFS 500LL |
number of nodes added to the contingent of the total nodes
Definition at line 78 of file heur_ofins.c.
#define DEFAULT_NODESQUOT 0.1 |
subproblem nodes in relation to nodes of the original problem
Definition at line 79 of file heur_ofins.c.
#define DEFAULT_LPLIMFAC 2.0 |
factor by which the limit on the number of LP depends on the node limit
Definition at line 80 of file heur_ofins.c.
#define EVENTHDLR_NAME "Ofins" |
Definition at line 83 of file heur_ofins.c.
#define EVENTHDLR_DESC "LP event handler for " HEUR_NAME " heuristic" |
Definition at line 84 of file heur_ofins.c.
|
static |
Definition at line 110 of file heur_ofins.c.
References assert(), EVENTHDLR_NAME, heurdata, NULL, SCIP_CALL, SCIP_EVENTTYPE_LPSOLVED, SCIP_LONGINT_FORMAT, SCIP_OKAY, SCIPdebugMsg, SCIPeventGetType(), SCIPeventhdlrGetName(), SCIPgetNLPs(), and SCIPinterruptSolve().
|
static |
scip | original SCIP data structure |
subscip | sub-SCIP data structure |
heur | heuristic data structure |
heurdata | euristic's private data structure |
result | result data structure |
nstallnodes | number of stalling nodes for the subproblem |
chgcoeffs | array of changed coefficients |
Definition at line 135 of file heur_ofins.c.
References assert(), EVENTHDLR_DESC, EVENTHDLR_NAME, FALSE, HEUR_NAME, heurdata, i, nintvars, NULL, nvars, result, SCIP_Bool, SCIP_CALL, SCIP_CALL_ABORT, SCIP_EVENTTYPE_LPSOLVED, SCIP_FOUNDSOL, SCIP_Longint, SCIP_LONGINT_FORMAT, SCIP_OKAY, SCIP_PARAMSETTING_FAST, SCIP_PARAMSETTING_OFF, SCIP_PLUGINNOTFOUND, SCIP_Real, SCIP_STATUS_INFEASIBLE, SCIP_STATUS_INFORUNBD, SCIP_STATUS_UNBOUNDED, SCIP_UNBOUNDED, SCIPABORT, SCIPallocBufferArray, SCIPblkmem(), SCIPcatchEvent(), SCIPcopyLargeNeighborhoodSearch(), SCIPcopyLimits(), SCIPcreateSol(), SCIPdebug, SCIPdebugMsg, SCIPdropEvent(), SCIPerrorMessage, SCIPfindBranchrule(), SCIPfindNodesel(), SCIPfreeBufferArray, SCIPfreeBufferArrayNull, SCIPfreeSol(), SCIPgetBestSol(), SCIPgetNBinVars(), SCIPgetNConss(), SCIPgetNImplVars(), SCIPgetNIntVars(), SCIPgetNNodes(), SCIPgetNSols(), SCIPgetNVars(), SCIPgetPrimalbound(), SCIPgetPrimalRayVal(), SCIPgetReoptLastOptSol(), SCIPgetSols(), SCIPgetSolVal(), SCIPgetSolvingTime(), SCIPgetStatus(), SCIPgetUpperbound(), SCIPgetVars(), SCIPhashmapCreate(), SCIPhashmapFree(), SCIPhashmapGetImage(), SCIPhasPrimalRay(), SCIPincludeEventhdlrBasic(), SCIPinfinity(), SCIPisParamFixed(), SCIPpresolve(), SCIPprintRay(), SCIPprintStatistics(), SCIPsetBoolParam(), SCIPsetIntParam(), SCIPsetLongintParam(), SCIPsetObjlimit(), SCIPsetPresolving(), SCIPsetSeparating(), SCIPsetSolVal(), SCIPsetSubscipsOff(), SCIPsolGetNodenum(), SCIPsolve(), SCIPstatisticPrintf, SCIPtransformProb(), SCIPtranslateSubSol(), SCIPtrySolFree(), SCIPupdatePrimalRay(), SCIPwarningMessage(), sol, TRUE, and vars.
Referenced by applyOfins().
|
static |
main procedure of the OFINS heuristic, creates and solves a sub-SCIP
scip | original SCIP data structure |
heur | heuristic data structure |
heurdata | euristic's private data structure |
result | result data structure |
nstallnodes | number of stalling nodes for the subproblem |
chgcoeffs | array of changed coefficients |
Definition at line 389 of file heur_ofins.c.
References assert(), heurdata, NULL, result, SCIP_Bool, SCIP_CALL, SCIP_DIDNOTFIND, SCIP_DIDNOTRUN, SCIP_Longint, SCIP_OKAY, SCIPcheckCopyLimits(), SCIPcreate(), SCIPfree(), SCIPgetReoptLastOptSol(), and setupAndSolve().
Referenced by SCIP_DECL_HEUREXEC().
|
static |
copy method for primal heuristic plugins (called when SCIP copies plugins)
Definition at line 443 of file heur_ofins.c.
References assert(), HEUR_NAME, NULL, SCIP_CALL, SCIP_OKAY, SCIPheurGetName(), and SCIPincludeHeurOfins().
|
static |
destructor of primal heuristic to free user data (called when SCIP is exiting)
Definition at line 457 of file heur_ofins.c.
References assert(), heurdata, NULL, SCIP_OKAY, SCIPfreeBlockMemory, SCIPheurGetData(), and SCIPheurSetData().
|
static |
execution method of primal heuristic
Definition at line 477 of file heur_ofins.c.
References applyOfins(), assert(), FALSE, frac, heurdata, MAX, MIN, NULL, nvars, REALABS, result, SCIP_Bool, SCIP_CALL, SCIP_DELAYED, SCIP_DIDNOTRUN, SCIP_Longint, SCIP_LONGINT_FORMAT, SCIP_OKAY, SCIP_Real, SCIP_VARSTATUS_ORIGINAL, SCIPallocBufferArray, SCIPdebugMsg, SCIPfreeBufferArray, SCIPgetNBinVars(), SCIPgetNImplVars(), SCIPgetNIntVars(), SCIPgetNNodes(), SCIPgetNReoptRuns(), SCIPgetReoptOldObjCoef(), SCIPgetVars(), SCIPheurGetData(), SCIPheurGetNBestSolsFound(), SCIPheurGetNCalls(), SCIPisNegative(), SCIPisPositive(), SCIPisReoptEnabled(), SCIPisStopped(), SCIPisZero(), SCIPvarGetStatus(), SCIPvarIsActive(), TRUE, and vars.