Loading...
Searching...
No Matches
heur_gcgguideddiving.c
Go to the documentation of this file.
35/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
292/** execution initialization method of diving heuristic (called when execution of diving heuristic is about to begin) */
312/** execution deinitialization method of diving heuristic (called when execution data is freed) */
335 * - of these variables, round a variable to its value in direction of incumbent solution, and choose the
338 * - round variable in direction that destroys LP feasibility (other direction is checked by SCIProundSol())
341 * - variables in a minimal cover or variables that are also fractional in an optimal LP solution might
372 SCIP_CALL( SCIPgetExternBranchCands(origprob, &lpcands, &lpcandssol, &lpcandsfrac, &nlpcands, NULL, NULL, NULL, NULL) );
418 /* the candidate may be rounded: choose this candidate only, if the best candidate may also be rounded */
424 * - if variable may be rounded in both directions, round corresponding to its value in incumbent solution
425 * - otherwise, round in the infeasible direction, because feasible direction is tried by rounding
460 if( SCIPisLT(origprob, objgain, bestobjgain) || (SCIPisEQ(origprob, objgain, bestobjgain) && score < bestscore) )
#define SCIP_INVALID
#define SCIP_Bool
#define SCIP_Real
#define TRUE
#define FALSE
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)
#define SCIPallocMemory(scip, ptr)
SCIP_SOL * SCIPgetBestSol(SCIP *scip)
SCIP_RETCODE SCIPcreateSolCopy(SCIP *scip, SCIP_SOL **sol, SCIP_SOL *sourcesol)
SCIP_RETCODE SCIPfreeSol(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 SCIPinfinity(SCIP *scip)
SCIP_Real SCIPfeasFrac(SCIP *scip, SCIP_Real val)
SCIP_Real SCIPfeasCeil(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_Bool SCIPisEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisLT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisFeasPositive(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPvarMayRoundUp(SCIP_VAR *var)
SCIP_Bool SCIPvarIsBinary(SCIP_VAR *var)
SCIP_Bool SCIPvarMayRoundDown(SCIP_VAR *var)
SCIP_Real SCIPvarGetObj(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
static SCIP_RETCODE getMasterUpFrac(GCG *gcg, SCIP_VAR *var, SCIP_Real *frac)
Definition heur_gcgfracdiving.c:204
static SCIP_RETCODE getMasterDownFrac(GCG *gcg, SCIP_VAR *var, SCIP_Real *frac)
Definition heur_gcgfracdiving.c:132
SCIP_RETCODE GCGincludeHeurGcgguideddiving(GCG *gcg)
Definition heur_gcgguideddiving.c:518
LP diving heuristic that chooses fixings in direction of incumbent solutions.
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