SCIP Doxygen Documentation
Loading...
Searching...
No Matches

Detailed Description

heuristic that tries to solve the problem without objective. In Gurobi, this heuristic is known as "Hail Mary"

Author
Timo Berthold

Definition in file heur_zeroobj.c.

#include "blockmemshell/memory.h"
#include "scip/cons_linear.h"
#include "scip/heur_zeroobj.h"
#include "scip/pub_event.h"
#include "scip/pub_heur.h"
#include "scip/pub_message.h"
#include "scip/pub_misc.h"
#include "scip/pub_var.h"
#include "scip/scip_branch.h"
#include "scip/scip_cons.h"
#include "scip/scip_copy.h"
#include "scip/scip_event.h"
#include "scip/scip_general.h"
#include "scip/scip_heur.h"
#include "scip/scip_lp.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_tree.h"
#include "scip/scip_var.h"

Go to the source code of this file.

Macros

#define HEUR_NAME   "zeroobj"
#define HEUR_DESC   "heuristic trying to solve the problem without objective"
#define HEUR_DISPCHAR   SCIP_HEURDISPCHAR_LNS
#define HEUR_PRIORITY   100
#define HEUR_FREQ   -1
#define HEUR_FREQOFS   0
#define HEUR_MAXDEPTH   0
#define HEUR_TIMING   SCIP_HEURTIMING_BEFORENODE | SCIP_HEURTIMING_BEFOREPRESOL
#define HEUR_USESSUBSCIP   TRUE
#define EVENTHDLR_NAME   "Zeroobj"
#define EVENTHDLR_DESC   "LP event handler for " HEUR_NAME " heuristic"
#define DEFAULT_MAXNODES   1000LL
#define DEFAULT_MINIMPROVE   0.01
#define DEFAULT_MINNODES   100LL
#define DEFAULT_MAXLPITERS   5000LL
#define DEFAULT_NODESOFS   100LL
#define DEFAULT_NODESQUOT   0.1
#define DEFAULT_ADDALLSOLS   FALSE
#define DEFAULT_ONLYWITHOUTSOL   TRUE
#define DEFAULT_USEUCT   FALSE

Functions

static SCIP_DECL_EVENTEXEC (eventExecZeroobj)
static SCIP_DECL_HEURCOPY (heurCopyZeroobj)
static SCIP_DECL_HEURFREE (heurFreeZeroobj)
static SCIP_DECL_HEURINIT (heurInitZeroobj)
static SCIP_DECL_HEUREXEC (heurExecZeroobj)
static SCIP_RETCODE setupAndSolveSubscip (SCIP *scip, SCIP *subscip, SCIP_HEUR *heur, SCIP_RESULT *result, SCIP_Real minimprove, SCIP_Longint nnodes)
SCIP_RETCODE SCIPapplyZeroobj (SCIP *scip, SCIP_HEUR *heur, SCIP_RESULT *result, SCIP_Real minimprove, SCIP_Longint nnodes)
SCIP_RETCODE SCIPincludeHeurZeroobj (SCIP *scip)

Macro Definition Documentation

◆ HEUR_NAME

#define HEUR_NAME   "zeroobj"

Definition at line 61 of file heur_zeroobj.c.

◆ HEUR_DESC

#define HEUR_DESC   "heuristic trying to solve the problem without objective"

Definition at line 62 of file heur_zeroobj.c.

◆ HEUR_DISPCHAR

#define HEUR_DISPCHAR   SCIP_HEURDISPCHAR_LNS

Definition at line 63 of file heur_zeroobj.c.

◆ HEUR_PRIORITY

#define HEUR_PRIORITY   100

Definition at line 64 of file heur_zeroobj.c.

◆ HEUR_FREQ

#define HEUR_FREQ   -1

Definition at line 65 of file heur_zeroobj.c.

◆ HEUR_FREQOFS

#define HEUR_FREQOFS   0

Definition at line 66 of file heur_zeroobj.c.

◆ HEUR_MAXDEPTH

#define HEUR_MAXDEPTH   0

Definition at line 67 of file heur_zeroobj.c.

◆ HEUR_TIMING

Definition at line 68 of file heur_zeroobj.c.

◆ HEUR_USESSUBSCIP

#define HEUR_USESSUBSCIP   TRUE

does the heuristic use a secondary SCIP instance?

Definition at line 69 of file heur_zeroobj.c.

◆ EVENTHDLR_NAME

#define EVENTHDLR_NAME   "Zeroobj"

Definition at line 72 of file heur_zeroobj.c.

◆ EVENTHDLR_DESC

#define EVENTHDLR_DESC   "LP event handler for " HEUR_NAME " heuristic"

Definition at line 73 of file heur_zeroobj.c.

◆ DEFAULT_MAXNODES

#define DEFAULT_MAXNODES   1000LL

Definition at line 76 of file heur_zeroobj.c.

◆ DEFAULT_MINIMPROVE

#define DEFAULT_MINIMPROVE   0.01

Definition at line 77 of file heur_zeroobj.c.

◆ DEFAULT_MINNODES

#define DEFAULT_MINNODES   100LL

Definition at line 78 of file heur_zeroobj.c.

◆ DEFAULT_MAXLPITERS

#define DEFAULT_MAXLPITERS   5000LL

Definition at line 79 of file heur_zeroobj.c.

◆ DEFAULT_NODESOFS

#define DEFAULT_NODESOFS   100LL

Definition at line 80 of file heur_zeroobj.c.

◆ DEFAULT_NODESQUOT

#define DEFAULT_NODESQUOT   0.1

Definition at line 81 of file heur_zeroobj.c.

◆ DEFAULT_ADDALLSOLS

#define DEFAULT_ADDALLSOLS   FALSE

Definition at line 82 of file heur_zeroobj.c.

◆ DEFAULT_ONLYWITHOUTSOL

#define DEFAULT_ONLYWITHOUTSOL   TRUE

should heuristic only be executed if no primal solution was found, yet?

Definition at line 83 of file heur_zeroobj.c.

◆ DEFAULT_USEUCT

#define DEFAULT_USEUCT   FALSE

Definition at line 84 of file heur_zeroobj.c.

Function Documentation

◆ SCIP_DECL_EVENTEXEC()

◆ SCIP_DECL_HEURCOPY()

SCIP_DECL_HEURCOPY ( heurCopyZeroobj )
static

copy method for primal heuristic plugins (called when SCIP copies plugins)

Definition at line 143 of file heur_zeroobj.c.

References assert(), HEUR_NAME, NULL, SCIP_CALL, SCIP_DECL_HEURCOPY, SCIP_INVALIDCALL, SCIP_OKAY, SCIP_STRINGEQ, SCIPheurGetName(), and SCIPincludeHeurZeroobj().

◆ SCIP_DECL_HEURFREE()

SCIP_DECL_HEURFREE ( heurFreeZeroobj )
static

destructor of primal heuristic to free user data (called when SCIP is exiting)

Definition at line 158 of file heur_zeroobj.c.

References assert(), heurdata, NULL, SCIP_DECL_HEURFREE, SCIP_OKAY, SCIPfreeBlockMemory, SCIPheurGetData(), and SCIPheurSetData().

◆ SCIP_DECL_HEURINIT()

SCIP_DECL_HEURINIT ( heurInitZeroobj )
static

initialization method of primal heuristic (called after problem was transformed)

Definition at line 179 of file heur_zeroobj.c.

References assert(), heurdata, NULL, SCIP_DECL_HEURINIT, SCIP_OKAY, and SCIPheurGetData().

◆ SCIP_DECL_HEUREXEC()

◆ setupAndSolveSubscip()

SCIP_RETCODE setupAndSolveSubscip ( SCIP * scip,
SCIP * subscip,
SCIP_HEUR * heur,
SCIP_RESULT * result,
SCIP_Real minimprove,
SCIP_Longint nnodes )
static

setup and solve subscip

Parameters
scipSCIP data structure
subscipSCIP data structure
heurheuristic data structure
resultresult data structure
minimprovefactor by which zeroobj should at least improve the incumbent
nnodesnode limit for the subproblem

Definition at line 248 of file heur_zeroobj.c.

References assert(), cutoff, EVENTHDLR_DESC, EVENTHDLR_NAME, FALSE, HEUR_NAME, heurdata, i, MAX, MIN, nnodes, NULL, nvars, result, SCIP_Bool, SCIP_CALL, SCIP_CALL_ABORT, SCIP_EVENTTYPE_NODESOLVED, SCIP_FOUNDSOL, SCIP_Longint, SCIP_LONGINT_FORMAT, SCIP_OKAY, SCIP_PARAMSETTING_FAST, SCIP_PARAMSETTING_OFF, SCIP_PLUGINNOTFOUND, SCIP_Real, SCIPaddCoefLinear(), SCIPaddCons(), SCIPallocBufferArray, SCIPblkmem(), SCIPcatchEvent(), SCIPchgVarLbGlobal(), SCIPchgVarObj(), SCIPchgVarUbGlobal(), SCIPcopy(), SCIPcopyLimits(), SCIPcreateConsLinear(), SCIPdebugMsg, SCIPdropEvent(), SCIPerrorMessage, SCIPfeastol(), SCIPfindBranchrule(), SCIPfindNodesel(), SCIPfreeBufferArray, SCIPgetLowerbound(), SCIPgetNObjVars(), SCIPgetNSols(), SCIPgetSols(), SCIPgetUpperbound(), SCIPgetVarsData(), SCIPhashmapCreate(), SCIPhashmapFree(), SCIPhashmapGetImage(), SCIPheurGetData(), SCIPincludeEventhdlrBasic(), SCIPinfinity(), SCIPisFeasZero(), SCIPisInfinity(), SCIPisParamFixed(), SCIPprintStatistics(), SCIPreleaseCons(), SCIPsetBoolParam(), SCIPsetIntParam(), SCIPsetLongintParam(), SCIPsetPresolving(), SCIPsetSeparating(), SCIPsetSubscipsOff(), SCIPsolve(), SCIPsumepsilon(), SCIPtransformProb(), SCIPtranslateSubSol(), SCIPtrySolFree(), SCIPvarGetLbGlobal(), SCIPvarGetObj(), SCIPvarGetUbGlobal(), setupAndSolveSubscip(), TRUE, valid, and vars.