Detailed Description
primal heuristic that solves the problem with a sparser matrix as a submip
Definition in file heur_redsize.c.
#include <assert.h>
#include <string.h>
#include "heur_redsize.h"
#include "cycplugins.h"
#include "probdata_cyc.h"
Go to the source code of this file.
Macros | |
#define | HEUR_NAME "redsize" |
#define | HEUR_DESC "primal heuristic that solves the problem with a sparser matrix as a submip" |
#define | HEUR_DISPCHAR 'u' |
#define | HEUR_PRIORITY 536870911 |
#define | HEUR_FREQ 0 |
#define | HEUR_FREQOFS 0 |
#define | HEUR_MAXDEPTH -1 |
#define | HEUR_TIMING SCIP_HEURTIMING_BEFORENODE |
#define | HEUR_USESSUBSCIP TRUE |
#define | DEFAULT_REDUCTIONRATE 0.75 |
Functions | |
static SCIP_RETCODE | SCIPcycAddIncompleteSol (SCIP *scip, SCIP *subscip, SCIP_HEUR *heur, SCIP_SOL *subsol, SCIP_RESULT *result) |
static SCIP_RETCODE | SCIPreduceMatrixSize (SCIP *scip, SCIP_Real **matrix, SCIP_Real percentile, SCIP_Real scale, int size) |
static SCIP_RETCODE | SCIPapplyRedSize (SCIP *scip, SCIP_HEUR *heur, SCIP_RESULT *result, SCIP_Real reductionrate, SCIP_Longint maxnodes) |
static | SCIP_DECL_HEURCOPY (heurCopyRedsize) |
static | SCIP_DECL_HEURFREE (heurFreeRedsize) |
static | SCIP_DECL_HEUREXEC (heurExecRedsize) |
SCIP_RETCODE | SCIPincludeHeurRedsize (SCIP *scip) |
Macro Definition Documentation
◆ HEUR_NAME
#define HEUR_NAME "redsize" |
Definition at line 38 of file heur_redsize.c.
Referenced by SCIP_DECL_HEURCOPY(), SCIP_DECL_HEUREXEC(), and SCIPincludeHeurRedsize().
◆ HEUR_DESC
Definition at line 39 of file heur_redsize.c.
Referenced by SCIPincludeHeurRedsize().
◆ HEUR_DISPCHAR
#define HEUR_DISPCHAR 'u' |
Definition at line 40 of file heur_redsize.c.
Referenced by SCIPincludeHeurRedsize().
◆ HEUR_PRIORITY
#define HEUR_PRIORITY 536870911 |
Definition at line 41 of file heur_redsize.c.
Referenced by SCIPincludeHeurRedsize().
◆ HEUR_FREQ
#define HEUR_FREQ 0 |
Definition at line 42 of file heur_redsize.c.
Referenced by SCIPincludeHeurRedsize().
◆ HEUR_FREQOFS
#define HEUR_FREQOFS 0 |
Definition at line 43 of file heur_redsize.c.
Referenced by SCIPincludeHeurRedsize().
◆ HEUR_MAXDEPTH
#define HEUR_MAXDEPTH -1 |
Definition at line 44 of file heur_redsize.c.
Referenced by SCIPincludeHeurRedsize().
◆ HEUR_TIMING
#define HEUR_TIMING SCIP_HEURTIMING_BEFORENODE |
Definition at line 45 of file heur_redsize.c.
Referenced by SCIPincludeHeurRedsize().
◆ HEUR_USESSUBSCIP
#define HEUR_USESSUBSCIP TRUE |
does the heuristic use a secondary SCIP instance?
Definition at line 46 of file heur_redsize.c.
Referenced by SCIPincludeHeurRedsize().
◆ DEFAULT_REDUCTIONRATE
#define DEFAULT_REDUCTIONRATE 0.75 |
default percentile of transition that gets deleted
Definition at line 48 of file heur_redsize.c.
Referenced by SCIPincludeHeurRedsize().
Function Documentation
◆ SCIPcycAddIncompleteSol()
|
static |
Add incomplete solution to main scip
- Parameters
-
scip SCIP data structure subscip SCIP data structure of subscip heur pointer to heuristic subsol solution of subscip result result pointer
Definition at line 61 of file heur_redsize.c.
References assignVars(), FALSE, SCIP_Bool, SCIP_CALL, SCIP_FOUNDSOL, SCIP_OKAY, SCIP_Real, SCIPallocBlockMemoryArray, SCIPcreateSol(), SCIPcycGetBinvars(), SCIPcycGetNBins(), SCIPcycGetNCluster(), SCIPfreeBlockMemoryArray, SCIPgetSolVal(), SCIPtrySolFree(), and TRUE.
Referenced by SCIPapplyRedSize().
◆ SCIPreduceMatrixSize()
|
static |
set all the given percentile of nonzeros to zero
- Parameters
-
scip SCIP data structure matrix the matrix percentile the percentile of entries to be deleted scale scaling between net flow and coherence size the size of the matrix
Definition at line 115 of file heur_redsize.c.
References MAX, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPallocBlockMemoryArray, SCIPfreeBlockMemoryArray, SCIPisZero(), SCIPreallocBlockMemoryArray, and SCIPsortRealInt().
Referenced by SCIPapplyRedSize().
◆ SCIPapplyRedSize()
|
static |
main procedure of the heuristic, creates and solves a sub-SCIP
- Parameters
-
scip original SCIP data structure heur heuristic data structure result result data structure reductionrate minimum percentage of integer variables that have to be fixed maxnodes maximum number of nodes for the subproblem
Definition at line 181 of file heur_redsize.c.
References FALSE, NULL, SCIP_CALL, SCIP_CALL_ABORT, SCIP_DIDNOTRUN, SCIP_OKAY, SCIP_PARAMSETTING_FAST, SCIP_PARAMSETTING_OFF, SCIP_Real, SCIPallocBlockMemoryArray, SCIPcreate(), SCIPcreateProbCyc(), SCIPcycAddIncompleteSol(), SCIPcycGetCmatrix(), SCIPcycGetNBins(), SCIPcycGetNCluster(), SCIPcycGetScale(), SCIPdebug, SCIPfindBranchrule(), SCIPfindNodesel(), SCIPfree(), SCIPfreeBlockMemoryArray, SCIPgetNSols(), SCIPgetSols(), SCIPincludeCycPlugins(), SCIPisParamFixed(), SCIPprintStatistics(), SCIPreduceMatrixSize(), SCIPsetBoolParam(), SCIPsetCharParam(), SCIPsetIntParam(), SCIPsetLongintParam(), SCIPsetPresolving(), SCIPsetSeparating(), SCIPsetSubscipsOff(), SCIPsolve(), 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 322 of file heur_redsize.c.
References HEUR_NAME, NULL, SCIP_CALL, SCIP_OKAY, SCIPheurGetName(), and SCIPincludeHeurRedsize().
◆ SCIP_DECL_HEURFREE()
|
static |
destructor of primal heuristic to free user data (called when SCIP is exiting)
Definition at line 336 of file heur_redsize.c.
References NULL, SCIP_OKAY, SCIPfreeBlockMemory, SCIPheurGetData(), and SCIPheurSetData().
◆ SCIP_DECL_HEUREXEC()
|
static |
execution method of primal heuristic
Definition at line 356 of file heur_redsize.c.
References HEUR_NAME, NULL, SCIP_CALL, SCIP_DIDNOTRUN, SCIP_Longint, SCIP_OKAY, SCIPapplyRedSize(), SCIPheurGetData(), and SCIPheurGetName().
◆ SCIPincludeHeurRedsize()
SCIP_RETCODE SCIPincludeHeurRedsize | ( | SCIP * | scip | ) |
creates the oneopt primal heuristic and includes it in SCIP
- Parameters
-
scip SCIP data structure
Definition at line 381 of file heur_redsize.c.
References DEFAULT_REDUCTIONRATE, FALSE, HEUR_DESC, HEUR_DISPCHAR, HEUR_FREQ, HEUR_FREQOFS, HEUR_MAXDEPTH, HEUR_NAME, HEUR_PRIORITY, HEUR_TIMING, HEUR_USESSUBSCIP, NULL, SCIP_CALL, SCIP_OKAY, SCIPaddRealParam(), SCIPallocBlockMemory, SCIPincludeHeurBasic(), SCIPsetHeurCopy(), and SCIPsetHeurFree().
Referenced by SCIP_DECL_HEURCOPY(), and SCIPincludeCycPlugins().