Loading...
Searching...
No Matches
heur_gcgveclendiving.c
Go to the documentation of this file.
35/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
58#define DEFAULT_USEMASTERSCORES FALSE /**< calculate vector length scores w.r.t. the master LP? */
92 colveclen = (SCIPvarGetStatus(var) == SCIP_VARSTATUS_COLUMN ? SCIPcolGetNNonz(SCIPvarGetCol(var)) : 0);
324/** execution initialization method of diving heuristic (called when execution of diving heuristic is about to begin) */
368 objdelta = SCIPfeasFrac(masterprob, SCIPgetSolVal(masterprob, masterlpsol, mastervar)) * SCIPvarGetObj(mastervar);
370 colveclen = (SCIPvarGetStatus(mastervar) == SCIP_VARSTATUS_COLUMN ? SCIPcolGetNNonz(SCIPvarGetCol(mastervar)) : 0);
381/** execution deinitialization method of diving heuristic (called when execution data is freed) */
407 * - round variables in direction where objective value gets worse; for zero objective coefficient, round upwards
434 SCIP_CALL( SCIPgetExternBranchCands(origprob, &lpcands, &lpcandssol, NULL, &nlpcands, NULL, NULL, NULL, NULL) );
462 SCIP_CALL( calculateScoreOrig(origprob, lpcands[c], lpcandssol[c] - SCIPfloor(origprob, lpcandssol[c]), &score, &roundup) );
466 *bestcandmayround = *bestcandmayround && (SCIPvarMayRoundDown(lpcands[c]) || SCIPvarMayRoundUp(lpcands[c]));
#define SCIP_REAL_MAX
#define SCIP_Bool
#define MIN(x, y)
#define SCIP_Real
#define ABS(x)
#define TRUE
GCG interface methods.
SCIP_VAR ** GCGoriginalVarGetMastervars(SCIP_VAR *var)
Definition gcgvar.c:666
SCIP_Real * GCGoriginalVarGetMastervals(SCIP_VAR *var)
Definition gcgvar.c:684
SCIP_Bool GCGisLinkingVarInBlock(SCIP_VAR *var, int block)
Definition gcgvar.c:1149
SCIP_RETCODE SCIPgetVarsData(SCIP *scip, SCIP_VAR ***vars, int *nvars, int *nbinvars, int *nintvars, int *nimplvars, int *ncontvars)
SCIP_RETCODE SCIPaddBoolParam(SCIP *scip, const char *name, const char *desc, SCIP_Bool *valueptr, SCIP_Bool isadvanced, SCIP_Bool defaultvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
SCIP_RETCODE SCIPgetExternBranchCands(SCIP *scip, SCIP_VAR ***externcands, SCIP_Real **externcandssol, SCIP_Real **externcandsscore, int *nexterncands, int *nprioexterncands, int *nprioexternbins, int *nprioexternints, int *nprioexternimpls)
int SCIPcolGetNNonz(SCIP_COL *col)
#define SCIPallocBufferArray(scip, ptr, num)
#define SCIPallocMemory(scip, ptr)
SCIP_RETCODE SCIPcreateSol(SCIP *scip, SCIP_SOL **sol, SCIP_HEUR *heur)
SCIP_RETCODE SCIPfreeSol(SCIP *scip, SCIP_SOL **sol)
SCIP_RETCODE SCIPlinkLPSol(SCIP *scip, SCIP_SOL *sol)
SCIP_Real SCIPgetSolVal(SCIP *scip, SCIP_SOL *sol, SCIP_VAR *var)
SCIP_Bool SCIPisFeasGE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Real SCIPfeasFrac(SCIP *scip, SCIP_Real val)
SCIP_Real SCIPfeasCeil(SCIP *scip, SCIP_Real val)
SCIP_Real SCIPfloor(SCIP *scip, SCIP_Real val)
SCIP_Real SCIPfeasFloor(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisFeasLT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisFeasNegative(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisFeasLE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisFeasGT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Real SCIPsumepsilon(SCIP *scip)
SCIP_Bool SCIPisFeasPositive(SCIP *scip, SCIP_Real val)
SCIP_COL * SCIPvarGetCol(SCIP_VAR *var)
SCIP_Bool SCIPvarMayRoundUp(SCIP_VAR *var)
SCIP_VARSTATUS SCIPvarGetStatus(SCIP_VAR *var)
SCIP_Bool SCIPvarMayRoundDown(SCIP_VAR *var)
SCIP_Real SCIPvarGetObj(SCIP_VAR *var)
SCIP_VARTYPE SCIPvarGetType(SCIP_VAR *var)
SCIP_Real SCIPgetRelaxSolVal(SCIP *scip, SCIP_VAR *var)
SCIPfreeMemory(GCGgetOrigprob(gcg), &divingdata)
static assert(heur !=NULL)
SCIP_CALL(SCIPgetExternBranchCands(origprob, &lpcands, &lpcandssol, NULL, &nlpcands, NULL, NULL, NULL, NULL))
GCGheurSetDivingDataOrig(heur, NULL)
static SCIP_Bool areVarsInSameBlock(SCIP_VAR *origvar, SCIP_VAR *mastervar)
Definition heur_gcgcoefdiving.c:74
SCIPfreeBufferArray(scip, &cycles)
static SCIP_RETCODE calculateScoreMaster(GCG *gcg, GCG_DIVINGDATA *divingdata, SCIP_VAR *var, SCIP_Real *score, SCIP_Bool *roundup)
Definition heur_gcgveclendiving.c:275
SCIP_RETCODE GCGincludeHeurGcgveclendiving(GCG *gcg)
Definition heur_gcgveclendiving.c:486
static SCIP_RETCODE getMasterDownScore(GCG *gcg, GCG_DIVINGDATA *divingdata, SCIP_VAR *var, SCIP_Real *score)
Definition heur_gcgveclendiving.c:164
static SCIP_RETCODE getMasterUpScore(GCG *gcg, GCG_DIVINGDATA *divingdata, SCIP_VAR *var, SCIP_Real *score)
Definition heur_gcgveclendiving.c:221
static SCIP_RETCODE calculateScoreOrig(SCIP *scip, SCIP_VAR *var, SCIP_Real frac, SCIP_Real *score, SCIP_Bool *roundup)
Definition heur_gcgveclendiving.c:75
LP diving heuristic that rounds variables with long column vectors.
SCIP_RETCODE GCGincludeDivingHeurOrig(GCG *gcg, SCIP_HEUR **heur, const char *name, const char *desc, char dispchar, int priority, int freq, int freqofs, int maxdepth, GCG_DECL_DIVINGFREE((*divingfree)), GCG_DECL_DIVINGINIT((*divinginit)), GCG_DECL_DIVINGEXIT((*divingexit)), GCG_DECL_DIVINGINITSOL((*divinginitsol)), GCG_DECL_DIVINGEXITSOL((*divingexitsol)), GCG_DECL_DIVINGINITEXEC((*divinginitexec)), GCG_DECL_DIVINGEXITEXEC((*divingexitexec)), GCG_DECL_DIVINGSELECTVAR((*divingselectvar)), GCG_DIVINGDATA *divingdata)
Definition heur_origdiving.c:1125
GCG_DIVINGDATA * GCGheurGetDivingDataOrig(SCIP_HEUR *heur)
Definition heur_origdiving.c:1092
primal heuristic interface for LP diving heuristics on the original variables
#define NULL
Definition class_conspartition.cpp:44
Definition heur_gcgcoefdiving.c:63
struct SCIP_Heur SCIP_HEUR
enum SCIP_Retcode SCIP_RETCODE
struct Scip SCIP
struct SCIP_Sol SCIP_SOL
struct SCIP_Var SCIP_VAR
SCIP_VARTYPE_BINARY
SCIP_VARSTATUS_COLUMN