heur_gcgpscostdiving.c
Go to the documentation of this file.
34 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
57 #define DEFAULT_USEMASTERPSCOSTS FALSE /**< shall pseudocosts be calculated w.r.t. the master problem? */
101 SCIP_CALL( SCIPsetSolVal(masterprob, masterrootsol, mastervars[i], SCIPvarGetRootSol(mastervars[i])) );
220 /** calculates the down-pseudocost for a given original variable w.r.t. the master variables in which it is contained */
247 SCIP_CALL( SCIPgetVarsData(masterprob, &mastervars, NULL, &nbinmastervars, &nintmastervars, NULL, NULL) );
294 /** calculates the up-pseudocost for a given original variable w.r.t. the master variables in which it is contained */
321 SCIP_CALL( SCIPgetVarsData(masterprob, &mastervars, NULL, &nbinmastervars, &nintmastervars, NULL, NULL) );
368 /** calculates the pseudocost score for a given variable w.r.t. a given solution value and a given rounding direction */
404 SCIPdebugMessage("Pseudocosts of variable %s: %g down, %g up\n", SCIPvarGetName(var), pscostdown, pscostup);
505 /** execution initialization method of diving heuristic (called when execution of diving heuristic is about to begin) */
517 /* if the heuristic is running for the first time, the root relaxation solution needs to be stored */
532 /** execution deinitialization method of diving heuristic (called when execution data is freed) */
554 * - of these variables, round variable with largest rel. difference of pseudo cost values in corresponding
585 SCIP_CALL( SCIPgetExternBranchCands(scip, &lpcands, &lpcandssol, NULL, &nlpcands, NULL, NULL, NULL, NULL) );
625 /* the candidate may be rounded: choose this candidate only, if the best candidate may also be rounded */
629 * - if variable may be rounded in both directions, round corresponding to the pseudo cost values
630 * - otherwise, round in the infeasible direction, because feasible direction is tried by rounding
636 SCIP_CALL( calcPscostQuot(scip, divingdata, var, primsol, rootsolval, frac, 0, &pscostquot, &roundup) );
640 SCIP_CALL( calcPscostQuot(scip, divingdata, var, primsol, rootsolval, frac, +1, &pscostquot, &roundup) );
644 SCIP_CALL( calcPscostQuot(scip, divingdata, var, primsol, rootsolval, frac, -1, &pscostquot, &roundup) );
661 SCIP_CALL( calcPscostQuot(scip, divingdata, var, primsol, rootsolval, frac, 0, &pscostquot, &roundup) );
699 HEUR_MAXDEPTH, heurFreeGcgpscostdiving, heurInitGcgpscostdiving, heurExitGcgpscostdiving, NULL, NULL,
GCG_DIVINGDATA * GCGheurGetDivingDataOrig(SCIP_HEUR *heur)
Definition: heur_origdiving.c:1087
GCG interface methods.
SCIP_VAR ** GCGoriginalVarGetMastervars(SCIP_VAR *var)
Definition: gcgvar.c:587
SCIP_Bool GCGisLinkingVarInBlock(SCIP_VAR *var, int block)
Definition: gcgvar.c:1064
primal heuristic interface for LP diving heuristics on the original variables
static GCG_DECL_DIVINGFREE(heurFreeGcgpscostdiving)
Definition: heur_gcgpscostdiving.c:445
static SCIP_RETCODE calcPscostDownMaster(SCIP *scip, SCIP_VAR *var, SCIP_Real *masterpscosts, SCIP_Real *pscostdown)
Definition: heur_gcgpscostdiving.c:222
SCIP_Real * GCGoriginalVarGetMastervals(SCIP_VAR *var)
Definition: gcgvar.c:605
static SCIP_RETCODE calcPscostQuot(SCIP *scip, GCG_DIVINGDATA *divingdata, SCIP_VAR *var, SCIP_Real primsol, SCIP_Real rootsolval, SCIP_Real frac, int rounddir, SCIP_Real *pscostquot, SCIP_Bool *roundup)
Definition: heur_gcgpscostdiving.c:370
static SCIP_RETCODE getRootRelaxSol(SCIP *scip, SCIP_SOL **rootsol)
Definition: heur_gcgpscostdiving.c:76
SCIP_RETCODE GCGincludeHeurGcgpscostdiving(SCIP *scip)
Definition: heur_gcgpscostdiving.c:686
Definition: heur_gcgcoefdiving.c:61
static GCG_DECL_DIVINGINITEXEC(heurInitexecGcgpscostdiving)
Definition: heur_gcgpscostdiving.c:507
SCIP_RETCODE GCGincludeDivingHeurOrig(SCIP *scip, 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:1120
static SCIP_Bool areVarsInSameBlock(SCIP_VAR *origvar, SCIP_VAR *mastervar)
Definition: heur_gcgpscostdiving.c:167
SCIP_RETCODE GCGtransformMastersolToOrigsol(SCIP *scip, SCIP_SOL *mastersol, SCIP_SOL **origsol)
Definition: misc.c:120
void GCGheurSetDivingDataOrig(SCIP_HEUR *heur, GCG_DIVINGDATA *divingdata)
Definition: heur_origdiving.c:1103
static SCIP_RETCODE calcMasterPscosts(SCIP *scip, SCIP_Real **masterpscosts)
Definition: heur_gcgpscostdiving.c:114
static GCG_DECL_DIVINGEXITEXEC(heurExitexecGcgpscostdiving)
Definition: heur_gcgpscostdiving.c:534
static GCG_DECL_DIVINGINIT(heurInitGcgpscostdiving)
Definition: heur_gcgpscostdiving.c:464
static GCG_DECL_DIVINGEXIT(heurExitGcgpscostdiving)
Definition: heur_gcgpscostdiving.c:485
LP diving heuristic that chooses fixings w.r.t. the pseudo cost values.
static SCIP_RETCODE calcPscostUpMaster(SCIP *scip, SCIP_VAR *var, SCIP_Real *masterpscosts, SCIP_Real *pscostup)
Definition: heur_gcgpscostdiving.c:296
static GCG_DECL_DIVINGSELECTVAR(heurSelectVarGcgpscostdiving)
Definition: heur_gcgpscostdiving.c:561