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) |
| #define HEUR_NAME "redsize" |
Definition at line 38 of file heur_redsize.c.
Definition at line 39 of file heur_redsize.c.
| #define HEUR_DISPCHAR 'u' |
Definition at line 40 of file heur_redsize.c.
| #define HEUR_PRIORITY 536870911 |
Definition at line 41 of file heur_redsize.c.
| #define HEUR_FREQ 0 |
Definition at line 42 of file heur_redsize.c.
| #define HEUR_FREQOFS 0 |
Definition at line 43 of file heur_redsize.c.
| #define HEUR_MAXDEPTH -1 |
Definition at line 44 of file heur_redsize.c.
| #define HEUR_TIMING SCIP_HEURTIMING_BEFORENODE |
Definition at line 45 of file heur_redsize.c.
| #define HEUR_USESSUBSCIP TRUE |
does the heuristic use a secondary SCIP instance?
Definition at line 46 of file heur_redsize.c.
| #define DEFAULT_REDUCTIONRATE 0.75 |
default percentile of transition that gets deleted
Definition at line 48 of file heur_redsize.c.
Referenced by SCIPincludeHeurRedsize().
|
static |
Add incomplete solution to main scip
| 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, i, result, SCIP_Bool, SCIP_CALL, SCIP_FOUNDSOL, SCIP_OKAY, SCIP_Real, SCIPallocBlockMemoryArray, SCIPcreateSol(), SCIPcycGetBinvars(), SCIPcycGetNBins(), SCIPcycGetNCluster(), SCIPfreeBlockMemoryArray, SCIPgetSolVal(), SCIPtrySolFree(), and TRUE.
Referenced by SCIPapplyRedSize().
|
static |
set all the given percentile of nonzeros to zero
| 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 i, MAX, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPallocBlockMemoryArray, SCIPfreeBlockMemoryArray, SCIPisZero(), SCIPreallocBlockMemoryArray, and SCIPsortRealInt().
Referenced by SCIPapplyRedSize().
|
static |
main procedure of the heuristic, creates and solves a sub-SCIP
| 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 assert(), FALSE, i, NULL, result, SCIP_CALL, SCIP_CALL_ABORT, SCIP_DIDNOTRUN, SCIP_Longint, 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().
|
static |
copy method for primal heuristic plugins (called when SCIP copies plugins)
Definition at line 322 of file heur_redsize.c.
References assert(), HEUR_NAME, NULL, SCIP_CALL, SCIP_OKAY, SCIPheurGetName(), and SCIPincludeHeurRedsize().
|
static |
destructor of primal heuristic to free user data (called when SCIP is exiting)
Definition at line 336 of file heur_redsize.c.
References assert(), heurdata, NULL, SCIP_OKAY, SCIPfreeBlockMemory, SCIPheurGetData(), and SCIPheurSetData().
|
static |
execution method of primal heuristic
Definition at line 356 of file heur_redsize.c.
References assert(), HEUR_NAME, heurdata, NULL, result, SCIP_CALL, SCIP_DIDNOTRUN, SCIP_Longint, SCIP_OKAY, SCIPapplyRedSize(), SCIPheurGetData(), and SCIPheurGetName().
| SCIP_RETCODE SCIPincludeHeurRedsize | ( | SCIP * | scip | ) |
creates the oneopt primal heuristic and includes it in SCIP
Definition at line 381 of file heur_redsize.c.
References assert(), DEFAULT_REDUCTIONRATE, FALSE, HEUR_DESC, HEUR_DISPCHAR, HEUR_FREQ, HEUR_FREQOFS, HEUR_MAXDEPTH, HEUR_NAME, HEUR_PRIORITY, HEUR_TIMING, HEUR_USESSUBSCIP, heurdata, NULL, SCIP_CALL, SCIP_OKAY, SCIPaddRealParam(), SCIPallocBlockMemory, SCIPincludeHeurBasic(), SCIPsetHeurCopy(), and SCIPsetHeurFree().
Referenced by SCIP_DECL_HEURCOPY(), and SCIPincludeCycPlugins().