simple and fast LP rounding heuristic
The heuristic also tries to round relaxation solutions if available.
Definition in file heur_simplerounding.c.
Go to the source code of this file.
Macros | |
#define | HEUR_NAME "simplerounding" |
#define | HEUR_DESC "simple and fast LP rounding heuristic" |
#define | HEUR_DISPCHAR 'r' |
#define | HEUR_PRIORITY 0 |
#define | HEUR_FREQ 1 |
#define | HEUR_FREQOFS 0 |
#define | HEUR_MAXDEPTH -1 |
#define | HEUR_TIMING SCIP_HEURTIMING_DURINGLPLOOP | SCIP_HEURTIMING_DURINGPRICINGLOOP |
#define | HEUR_USESSUBSCIP FALSE |
#define | DEFAULT_ONCEPERNODE FALSE |
Functions | |
static SCIP_RETCODE | performSimpleRounding (SCIP *scip, SCIP_SOL *sol, SCIP_VAR **cands, SCIP_Real *candssol, int ncands, SCIP_RESULT *result) |
static SCIP_RETCODE | performLPSimpleRounding (SCIP *scip, SCIP_HEURDATA *heurdata, SCIP_HEURTIMING heurtiming, SCIP_RESULT *result) |
static SCIP_RETCODE | performRelaxSimpleRounding (SCIP *scip, SCIP_HEURDATA *heurdata, SCIP_RESULT *result) |
static | SCIP_DECL_HEURCOPY (heurCopySimplerounding) |
static | SCIP_DECL_HEURFREE (heurFreeSimplerounding) |
static | SCIP_DECL_HEURINIT (heurInitSimplerounding) |
static | SCIP_DECL_HEUREXIT (heurExitSimplerounding) |
static | SCIP_DECL_HEURINITSOL (heurInitsolSimplerounding) |
static | SCIP_DECL_HEUREXITSOL (heurExitsolSimplerounding) |
static | SCIP_DECL_HEUREXEC (heurExecSimplerounding) |
SCIP_RETCODE | SCIPincludeHeurSimplerounding (SCIP *scip) |
#define HEUR_NAME "simplerounding" |
Definition at line 32 of file heur_simplerounding.c.
Referenced by SCIP_DECL_HEURCOPY(), SCIP_DECL_HEUREXEC(), SCIP_DECL_HEUREXIT(), SCIP_DECL_HEURFREE(), SCIP_DECL_HEURINIT(), SCIP_DECL_HEURINITSOL(), and SCIPincludeHeurSimplerounding().
#define HEUR_DESC "simple and fast LP rounding heuristic" |
Definition at line 33 of file heur_simplerounding.c.
Referenced by SCIPincludeHeurSimplerounding().
#define HEUR_DISPCHAR 'r' |
Definition at line 34 of file heur_simplerounding.c.
Referenced by SCIPincludeHeurSimplerounding().
#define HEUR_PRIORITY 0 |
Definition at line 35 of file heur_simplerounding.c.
Referenced by SCIPincludeHeurSimplerounding().
#define HEUR_FREQ 1 |
Definition at line 36 of file heur_simplerounding.c.
Referenced by SCIPincludeHeurSimplerounding().
#define HEUR_FREQOFS 0 |
Definition at line 37 of file heur_simplerounding.c.
Referenced by SCIPincludeHeurSimplerounding().
#define HEUR_MAXDEPTH -1 |
Definition at line 38 of file heur_simplerounding.c.
Referenced by SCIPincludeHeurSimplerounding().
#define HEUR_TIMING SCIP_HEURTIMING_DURINGLPLOOP | SCIP_HEURTIMING_DURINGPRICINGLOOP |
Definition at line 39 of file heur_simplerounding.c.
Referenced by SCIP_DECL_HEUREXITSOL(), and SCIPincludeHeurSimplerounding().
#define HEUR_USESSUBSCIP FALSE |
does the heuristic use a secondary SCIP instance?
Definition at line 40 of file heur_simplerounding.c.
Referenced by SCIPincludeHeurSimplerounding().
#define DEFAULT_ONCEPERNODE FALSE |
should the heuristic only be called once per node?
Definition at line 42 of file heur_simplerounding.c.
Referenced by SCIPincludeHeurSimplerounding().
|
static |
perform rounding
scip | SCIP main data structure |
sol | solution to round |
cands | candidate variables |
candssol | solutions of candidate variables |
ncands | number of candidates |
result | pointer to store the result of the heuristic call |
Definition at line 60 of file heur_simplerounding.c.
References FALSE, SCIP_Bool, SCIP_CALL, SCIP_FOUNDSOL, SCIP_OKAY, SCIP_Real, SCIP_VARSTATUS_COLUMN, SCIP_VARTYPE_IMPLINT, SCIPadjustImplicitSolVals(), SCIPallColsInLP(), SCIPdebugMsg, SCIPfeasCeil(), SCIPfeasFloor(), SCIPisFeasIntegral(), SCIPprintSol(), SCIPsetSolVal(), SCIPtrySol(), SCIPvarGetName(), SCIPvarGetObj(), SCIPvarGetStatus(), SCIPvarGetType(), SCIPvarMayRoundDown(), SCIPvarMayRoundUp(), and TRUE.
Referenced by performLPSimpleRounding(), and performRelaxSimpleRounding().
|
static |
perform LP-rounding
scip | SCIP main data structure |
heurdata | heuristic data |
heurtiming | heuristic timing mask |
result | pointer to store the result of the heuristic call |
Definition at line 164 of file heur_simplerounding.c.
References performSimpleRounding(), SCIP_CALL, SCIP_HEURTIMING_DURINGPRICINGLOOP, SCIP_Longint, SCIP_LPSOLSTAT_OPTIMAL, SCIP_OKAY, SCIP_Real, SCIPdebugMsg, SCIPgetCutoffbound(), SCIPgetLPBranchCands(), SCIPgetLPObjval(), SCIPgetLPSolstat(), SCIPgetNLPs(), SCIPisGE(), and SCIPlinkLPSol().
Referenced by SCIP_DECL_HEUREXEC().
|
static |
perform relaxation solution rounding
scip | SCIP main data structure |
heurdata | heuristic data |
result | pointer to store the result of the heuristic call |
Definition at line 224 of file heur_simplerounding.c.
References performSimpleRounding(), SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPdebugMsg, SCIPfreeBufferArray, SCIPgetRelaxSolVal(), SCIPgetVarsData(), SCIPisFeasIntegral(), SCIPisRelaxSolValid(), and SCIPlinkRelaxSol().
Referenced by SCIP_DECL_HEUREXEC().
|
static |
copy method for primal heuristic plugins (called when SCIP copies plugins)
Definition at line 314 of file heur_simplerounding.c.
References HEUR_NAME, SCIP_CALL, SCIP_OKAY, SCIPheurGetName(), and SCIPincludeHeurSimplerounding().
|
static |
destructor of primal heuristic to free user data (called when SCIP is exiting)
Definition at line 328 of file heur_simplerounding.c.
References HEUR_NAME, SCIP_OKAY, SCIPfreeBlockMemory, SCIPheurGetData(), SCIPheurGetName(), and SCIPheurSetData().
|
static |
initialization method of primal heuristic (called after problem was transformed)
Definition at line 348 of file heur_simplerounding.c.
References HEUR_NAME, SCIP_CALL, SCIP_OKAY, SCIPcreateSol(), SCIPheurGetData(), and SCIPheurGetName().
|
static |
deinitialization method of primal heuristic (called before transformed problem is freed)
Definition at line 367 of file heur_simplerounding.c.
References HEUR_NAME, SCIP_CALL, SCIP_OKAY, SCIPfreeSol(), SCIPheurGetData(), and SCIPheurGetName().
|
static |
solving process initialization method of primal heuristic (called when branch and bound process is about to begin)
Definition at line 384 of file heur_simplerounding.c.
References HEUR_NAME, SCIP_HEURTIMING_AFTERLPNODE, SCIP_OKAY, SCIPheurGetData(), SCIPheurGetName(), and SCIPheurSetTimingmask().
|
static |
solving process deinitialization method of primal heuristic (called before branch and bound process data is freed)
Definition at line 404 of file heur_simplerounding.c.
References HEUR_TIMING, SCIP_OKAY, and SCIPheurSetTimingmask().
|
static |
execution method of primal heuristic
Definition at line 415 of file heur_simplerounding.c.
References HEUR_NAME, performLPSimpleRounding(), performRelaxSimpleRounding(), SCIP_CALL, SCIP_DIDNOTFIND, SCIP_DIDNOTRUN, SCIP_HEURTIMING_DURINGPRICINGLOOP, SCIP_LPSOLSTAT_OPTIMAL, SCIP_OKAY, SCIPgetCutoffbound(), SCIPgetLPObjval(), SCIPgetLPSolstat(), SCIPgetNBinVars(), SCIPgetNIntVars(), SCIPgetNLPs(), SCIPgetVars(), SCIPhasCurrentNodeLP(), SCIPheurGetData(), SCIPheurGetName(), SCIPisGE(), SCIPisRelaxSolValid(), SCIPvarMayRoundDown(), and SCIPvarMayRoundUp().