Detailed Description
LP diving heuristic that changes variable's objective value instead of bounds, using pseudo cost values as guide.
Definition in file heur_objpscostdiving.c.
#include "blockmemshell/memory.h"
#include "scip/heur_objpscostdiving.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_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_numerics.h"
#include "scip/scip_param.h"
#include "scip/scip_prob.h"
#include "scip/scip_randnumgen.h"
#include "scip/scip_sol.h"
#include "scip/scip_solvingstats.h"
#include "scip/scip_tree.h"
#include "scip/scip_var.h"
#include <string.h>
Go to the source code of this file.
Macros | |
#define | HEUR_NAME "objpscostdiving" |
#define | HEUR_DESC "LP diving heuristic that changes variable's objective values instead of bounds, using pseudo costs as guide" |
#define | HEUR_DISPCHAR SCIP_HEURDISPCHAR_OBJDIVING |
#define | HEUR_PRIORITY -1004000 |
#define | HEUR_FREQ 20 |
#define | HEUR_FREQOFS 4 |
#define | HEUR_MAXDEPTH -1 |
#define | HEUR_TIMING SCIP_HEURTIMING_AFTERLPPLUNGE |
#define | HEUR_USESSUBSCIP FALSE |
#define | DEFAULT_MINRELDEPTH 0.0 |
#define | DEFAULT_MAXRELDEPTH 1.0 |
#define | DEFAULT_MAXLPITERQUOT 0.01 |
#define | DEFAULT_MAXLPITEROFS 1000 |
#define | DEFAULT_MAXSOLS -1 |
#define | DEFAULT_DEPTHFAC 0.5 |
#define | DEFAULT_DEPTHFACNOSOL 2.0 |
#define | DEFAULT_RANDSEED 139 |
#define | MINLPITER 10000 |
Functions | |
static void | calcPscostQuot (SCIP *scip, SCIP_HEURDATA *heurdata, SCIP_VAR *var, SCIP_Real primsol, SCIP_Real frac, int rounddir, SCIP_Real *pscostquot, SCIP_Bool *roundup) |
static | SCIP_DECL_HEURCOPY (heurCopyObjpscostdiving) |
static | SCIP_DECL_HEURFREE (heurFreeObjpscostdiving) |
static | SCIP_DECL_HEURINIT (heurInitObjpscostdiving) |
static | SCIP_DECL_HEUREXIT (heurExitObjpscostdiving) |
static | SCIP_DECL_HEUREXEC (heurExecObjpscostdiving) |
SCIP_RETCODE | SCIPincludeHeurObjpscostdiving (SCIP *scip) |
Macro Definition Documentation
◆ HEUR_NAME
#define HEUR_NAME "objpscostdiving" |
Definition at line 46 of file heur_objpscostdiving.c.
Referenced by SCIP_DECL_HEURCOPY(), SCIP_DECL_HEUREXEC(), SCIP_DECL_HEUREXIT(), SCIP_DECL_HEURFREE(), SCIP_DECL_HEURINIT(), and SCIPincludeHeurObjpscostdiving().
◆ HEUR_DESC
#define HEUR_DESC "LP diving heuristic that changes variable's objective values instead of bounds, using pseudo costs as guide" |
Definition at line 47 of file heur_objpscostdiving.c.
Referenced by SCIPincludeHeurObjpscostdiving().
◆ HEUR_DISPCHAR
#define HEUR_DISPCHAR SCIP_HEURDISPCHAR_OBJDIVING |
Definition at line 48 of file heur_objpscostdiving.c.
Referenced by SCIPincludeHeurObjpscostdiving().
◆ HEUR_PRIORITY
#define HEUR_PRIORITY -1004000 |
Definition at line 49 of file heur_objpscostdiving.c.
Referenced by SCIPincludeHeurObjpscostdiving().
◆ HEUR_FREQ
#define HEUR_FREQ 20 |
Definition at line 50 of file heur_objpscostdiving.c.
Referenced by SCIPincludeHeurObjpscostdiving().
◆ HEUR_FREQOFS
#define HEUR_FREQOFS 4 |
Definition at line 51 of file heur_objpscostdiving.c.
Referenced by SCIPincludeHeurObjpscostdiving().
◆ HEUR_MAXDEPTH
#define HEUR_MAXDEPTH -1 |
Definition at line 52 of file heur_objpscostdiving.c.
Referenced by SCIPincludeHeurObjpscostdiving().
◆ HEUR_TIMING
#define HEUR_TIMING SCIP_HEURTIMING_AFTERLPPLUNGE |
Definition at line 53 of file heur_objpscostdiving.c.
Referenced by SCIPincludeHeurObjpscostdiving().
◆ HEUR_USESSUBSCIP
#define HEUR_USESSUBSCIP FALSE |
does the heuristic use a secondary SCIP instance?
Definition at line 54 of file heur_objpscostdiving.c.
Referenced by SCIPincludeHeurObjpscostdiving().
◆ DEFAULT_MINRELDEPTH
#define DEFAULT_MINRELDEPTH 0.0 |
minimal relative depth to start diving
Definition at line 61 of file heur_objpscostdiving.c.
Referenced by SCIPincludeHeurObjpscostdiving().
◆ DEFAULT_MAXRELDEPTH
#define DEFAULT_MAXRELDEPTH 1.0 |
maximal relative depth to start diving
Definition at line 62 of file heur_objpscostdiving.c.
Referenced by SCIPincludeHeurObjpscostdiving().
◆ DEFAULT_MAXLPITERQUOT
#define DEFAULT_MAXLPITERQUOT 0.01 |
maximal fraction of diving LP iterations compared to total iteration number
Definition at line 63 of file heur_objpscostdiving.c.
Referenced by SCIPincludeHeurObjpscostdiving().
◆ DEFAULT_MAXLPITEROFS
#define DEFAULT_MAXLPITEROFS 1000 |
additional number of allowed LP iterations
Definition at line 64 of file heur_objpscostdiving.c.
Referenced by SCIPincludeHeurObjpscostdiving().
◆ DEFAULT_MAXSOLS
#define DEFAULT_MAXSOLS -1 |
total number of feasible solutions found up to which heuristic is called (-1: no limit)
Definition at line 65 of file heur_objpscostdiving.c.
Referenced by SCIPincludeHeurObjpscostdiving().
◆ DEFAULT_DEPTHFAC
#define DEFAULT_DEPTHFAC 0.5 |
maximal diving depth: number of binary/integer variables times depthfac
Definition at line 68 of file heur_objpscostdiving.c.
Referenced by SCIPincludeHeurObjpscostdiving().
◆ DEFAULT_DEPTHFACNOSOL
#define DEFAULT_DEPTHFACNOSOL 2.0 |
maximal diving depth factor if no feasible solution was found yet
Definition at line 69 of file heur_objpscostdiving.c.
Referenced by SCIPincludeHeurObjpscostdiving().
◆ DEFAULT_RANDSEED
#define DEFAULT_RANDSEED 139 |
initial random seed
Definition at line 70 of file heur_objpscostdiving.c.
Referenced by SCIP_DECL_HEURINIT().
◆ MINLPITER
#define MINLPITER 10000 |
minimal number of LP iterations allowed in each LP solving call
Definition at line 72 of file heur_objpscostdiving.c.
Referenced by SCIP_DECL_HEUREXEC().
Function Documentation
◆ calcPscostQuot()
|
static |
- Parameters
-
scip SCIP data structure heurdata heuristic data structure var problem variable primsol primal solution of variable frac fractionality of variable rounddir -1: round down, +1: round up, 0: select due to pseudo cost values pscostquot pointer to store pseudo cost quotient roundup pointer to store whether the variable should be rounded up
Definition at line 98 of file heur_objpscostdiving.c.
References FALSE, MAX, NULL, SCIP_DECL_HEURCOPY(), SCIP_Real, SCIPgetVarPseudocostVal(), SCIPisEQ(), SCIPisGT(), SCIPisLT(), SCIPrandomGetInt(), SCIPvarGetRootSol(), SCIPvarIsBinary(), sqrt(), and TRUE.
Referenced by SCIP_DECL_HEUREXEC().
◆ SCIP_DECL_HEURCOPY()
|
static |
copy method for primal heuristic plugins (called when SCIP copies plugins)
Definition at line 168 of file heur_objpscostdiving.c.
References HEUR_NAME, NULL, SCIP_CALL, SCIP_DECL_HEURFREE(), SCIP_OKAY, SCIPheurGetName(), and SCIPincludeHeurObjpscostdiving().
Referenced by calcPscostQuot().
◆ SCIP_DECL_HEURFREE()
|
static |
destructor of primal heuristic to free user data (called when SCIP is exiting)
Definition at line 182 of file heur_objpscostdiving.c.
References HEUR_NAME, NULL, SCIP_DECL_HEURINIT(), SCIP_OKAY, SCIPfreeBlockMemory, SCIPheurGetData(), SCIPheurGetName(), and SCIPheurSetData().
Referenced by SCIP_DECL_HEURCOPY().
◆ SCIP_DECL_HEURINIT()
|
static |
initialization method of primal heuristic (called after problem was transformed)
Definition at line 202 of file heur_objpscostdiving.c.
References DEFAULT_RANDSEED, HEUR_NAME, NULL, SCIP_CALL, SCIP_DECL_HEUREXIT(), SCIP_OKAY, SCIPcreateRandom(), SCIPcreateSol(), SCIPheurGetData(), SCIPheurGetName(), and TRUE.
Referenced by SCIP_DECL_HEURFREE().
◆ SCIP_DECL_HEUREXIT()
|
static |
deinitialization method of primal heuristic (called before transformed problem is freed)
Definition at line 229 of file heur_objpscostdiving.c.
References HEUR_NAME, NULL, SCIP_CALL, SCIP_DECL_HEUREXEC(), SCIP_OKAY, SCIPfreeRandom(), SCIPfreeSol(), SCIPheurGetData(), and SCIPheurGetName().
Referenced by SCIP_DECL_HEURINIT().
◆ SCIP_DECL_HEUREXEC()
|
static |
execution method of primal heuristic
Definition at line 252 of file heur_objpscostdiving.c.
References BMSclearMemoryArray, calcPscostQuot(), FALSE, HEUR_NAME, MAX, MINLPITER, NULL, SCIP_Bool, SCIP_CALL, SCIP_DELAYED, SCIP_DIDNOTFIND, SCIP_DIDNOTRUN, SCIP_FOUNDSOL, SCIP_Longint, SCIP_LPSOLSTAT_OPTIMAL, SCIP_LPSOLSTAT_UNBOUNDEDRAY, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPchgVarLbDive(), SCIPchgVarObjDive(), SCIPchgVarUbDive(), SCIPdebugMsg, SCIPendDive(), SCIPfeasCeil(), SCIPfeasFloor(), SCIPfreeBufferArray, SCIPgetCutoffbound(), SCIPgetDepth(), SCIPgetDualbound(), SCIPgetLastDivenode(), SCIPgetLPBranchCands(), SCIPgetLPObjval(), SCIPgetLPSolstat(), SCIPgetMaxDepth(), SCIPgetNBinVars(), SCIPgetNIntVars(), SCIPgetNLPIterations(), SCIPgetNNodeLPIterations(), SCIPgetNNodes(), SCIPgetNSolsFound(), SCIPgetSolOrigObj(), SCIPgetVarLbDive(), SCIPgetVarObjDive(), SCIPgetVarUbDive(), SCIPhasCurrentNodeLP(), SCIPheurGetData(), SCIPheurGetName(), SCIPheurGetNBestSolsFound(), SCIPheurGetNCalls(), SCIPincludeHeurObjpscostdiving(), SCIPisGE(), SCIPisLPSolBasic(), SCIPisStopped(), SCIPlinkLPSol(), SCIProundSol(), SCIPsolveDiveLP(), SCIPstartDive(), SCIPtrySol(), SCIPvarGetName(), SCIPvarGetProbindex(), SCIPvarMayRoundDown(), SCIPvarMayRoundUp(), SCIPwarningMessage(), and TRUE.
Referenced by SCIP_DECL_HEUREXIT().