94 history->
vsids[0] = 0.0;
95 history->
vsids[1] = 0.0;
102 history->
ratio = 0.0;
129 for(
i = 0;
i <= 1; ++
i )
132 d = (switcheddirs ? 1 -
i :
i);
210 assert(0.0 < weight && weight <= 1.0);
216 distance = solvaldelta;
222 distance = -solvaldelta;
229 assert(dir == 0 || dir == 1);
234 distance =
MAX(distance,
eps);
241 sumcontribution = objdelta/distance;
248 SCIPsetDebugMsg(
set,
"updated pseudo costs of history %p: dir=%d, distance=%g, objdelta=%g, weight=%g -> %g/%g\n",
274 assert(0.0 < weight && weight <= 1.0);
280 distance = solvaldelta;
286 distance = -solvaldelta;
293 assert(dir == 0 || dir == 1);
298 distance =
MAX(distance,
eps);
305 sumcontribution = objdelta/distance;
311 SCIPsetDebugMsg(
set,
"updated ancestor pseudo costs of history %p: dir=%d, distance=%g, objdelta=%g, weight=%g -> %g/%g\n",
332 (*valuehistory)->nvalues = 0;
333 (*valuehistory)->sizevalues = 5;
349 if( *valuehistory !=
NULL )
353 for(
i = (*valuehistory)->nvalues-1;
i >= 0; --
i )
401 (*history) = valuehistory->
histories[pos];
414 if( valuehistory !=
NULL )
418 for(
i = valuehistory->
nvalues-1;
i >= 0; --
i )
438#undef SCIPvaluehistoryGetNValues
439#undef SCIPvaluehistoryGetHistories
440#undef SCIPvaluehistoryGetValues
469 return valuehistory->
values;
488#undef SCIPbranchdirOpposite
489#undef SCIPhistoryGetPseudocost
490#undef SCIPhistoryGetPseudocostCount
491#undef SCIPhistoryIsPseudocostEmpty
492#undef SCIPhistoryGetAncPseudocost
493#undef SCIPhistoryGetAncPseudocostCount
494#undef SCIPhistoryIsAncPseudocostEmpty
495#undef SCIPhistoryIncVSIDS
496#undef SCIPhistoryScaleVSIDS
497#undef SCIPhistoryGetVSIDS
498#undef SCIPhistoryIncNActiveConflicts
499#undef SCIPhistoryGetNActiveConflicts
500#undef SCIPhistoryGetAvgConflictlength
501#undef SCIPhistoryIncNBranchings
502#undef SCIPhistoryIncInferenceSum
503#undef SCIPhistoryIncCutoffSum
504#undef SCIPhistoryGetNBranchings
505#undef SCIPhistoryGetInferenceSum
506#undef SCIPhistoryGetAvgInferences
507#undef SCIPhistoryGetCutoffSum
508#undef SCIPhistoryGetAvgCutoffs
509#undef SCIPhistoryGetAvgBranchdepth
510#undef SCIPhistoryIsRatioValid
511#undef SCIPhistoryGetLastRatio
512#undef SCIPhistorySetRatioHistory
513#undef SCIPhistoryGetLastBalance
514#undef SCIPhistorySetLastGMIeff
515#undef SCIPhistoryGetLastGMIeff
516#undef SCIPhistoryIncGMIeffSum
517#undef SCIPhistoryGetAvgGMIeff
536 if( solvaldelta >= 0.0 )
550 if( solvaldelta >= 0.0 )
569 correctionfactor = history->
pscostcount[dir] - 1.0;
572 if( correctionfactor > 0.9 )
588 assert((
int)dir == 0 || (
int)dir == 1);
603 assert((
int)dir == 0 || (
int)dir == 1);
616 assert((
int)dir == 0 || (
int)dir == 1);
629 assert((
int)dir == 0 || (
int)dir == 1);
643 assert((
int)dir == 0 || (
int)dir == 1);
645 history->
vsids[dir] += weight;
656 history->
vsids[0] *= scalar;
657 history->
vsids[1] *= scalar;
668 assert((
int)dir == 0 || (
int)dir == 1);
670 return history->
vsids[dir];
682 assert((
int)dir == 0 || (
int)dir == 1);
697 assert((
int)dir == 0 || (
int)dir == 1);
710 assert((
int)dir == 0 || (
int)dir == 1);
725 assert((
int)dir == 0 || (
int)dir == 1);
740 assert((
int)dir == 0 || (
int)dir == 1);
756 assert((
int)dir == 0 || (
int)dir == 1);
771 assert((
int)dir == 0 || (
int)dir == 1);
784 assert((
int)dir == 0 || (
int)dir == 1);
797 assert((
int)dir == 0 || (
int)dir == 1);
810 assert((
int)dir == 0 || (
int)dir == 1);
823 assert((
int)dir == 0 || (
int)dir == 1);
836 assert((
int)dir == 0 || (
int)dir == 1);
859 return history->
ratio;
928 history->
ratio = ratio;
common defines and data types used in all packages of SCIP
SCIP_Bool SCIPsortedvecFindReal(SCIP_Real *realarray, SCIP_Real val, int len, int *pos)
void SCIPsortedvecInsertRealPtr(SCIP_Real *realarray, void **ptrarray, SCIP_Real keyval, void *field1val, int *len, int *pos)
int SCIPvaluehistoryGetNValues(SCIP_VALUEHISTORY *valuehistory)
SCIP_RETCODE SCIPvaluehistoryCreate(SCIP_VALUEHISTORY **valuehistory, BMS_BLKMEM *blkmem)
SCIP_HISTORY ** SCIPvaluehistoryGetHistories(SCIP_VALUEHISTORY *valuehistory)
SCIP_RETCODE SCIPvaluehistoryFind(SCIP_VALUEHISTORY *valuehistory, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_Real value, SCIP_HISTORY **history)
SCIP_Real * SCIPvaluehistoryGetValues(SCIP_VALUEHISTORY *valuehistory)
void SCIPvaluehistoryFree(SCIP_VALUEHISTORY **valuehistory, BMS_BLKMEM *blkmem)
void SCIPvaluehistoryScaleVSIDS(SCIP_VALUEHISTORY *valuehistory, SCIP_Real scalar)
assert(minobj< SCIPgetCutoffbound(scip))
void SCIPhistoryReset(SCIP_HISTORY *history)
SCIP_Real SCIPhistoryGetPseudocost(SCIP_HISTORY *history, SCIP_Real solvaldelta)
SCIP_Real SCIPhistoryGetAvgInferences(SCIP_HISTORY *history, SCIP_BRANCHDIR dir)
void SCIPhistorySetRatioHistory(SCIP_HISTORY *history, SCIP_Bool valid, SCIP_Real ratio, SCIP_Real balance)
SCIP_Longint SCIPhistoryGetNActiveConflicts(SCIP_HISTORY *history, SCIP_BRANCHDIR dir)
SCIP_Longint SCIPhistoryGetNBranchings(SCIP_HISTORY *history, SCIP_BRANCHDIR dir)
SCIP_Real SCIPhistoryGetAvgConflictlength(SCIP_HISTORY *history, SCIP_BRANCHDIR dir)
SCIP_Real SCIPhistoryGetAvgCutoffs(SCIP_HISTORY *history, SCIP_BRANCHDIR dir)
SCIP_RETCODE SCIPhistoryCreate(SCIP_HISTORY **history, BMS_BLKMEM *blkmem)
SCIP_Real SCIPhistoryGetAncPseudocostCount(SCIP_HISTORY *history, SCIP_BRANCHDIR dir)
void SCIPhistorySetLastGMIeff(SCIP_HISTORY *history, SCIP_Real gmieff)
void SCIPhistoryUpdateAncPseudocost(SCIP_HISTORY *history, SCIP_SET *set, SCIP_Real solvaldelta, SCIP_Real objdelta, SCIP_Real weight)
SCIP_Real SCIPhistoryGetLastRatio(SCIP_HISTORY *history)
void SCIPhistoryIncInferenceSum(SCIP_HISTORY *history, SCIP_BRANCHDIR dir, SCIP_Real weight)
SCIP_Real SCIPhistoryGetAncPseudocost(SCIP_HISTORY *history, SCIP_Real solvaldelta)
SCIP_Real SCIPhistoryGetCutoffSum(SCIP_HISTORY *history, SCIP_BRANCHDIR dir)
SCIP_Real SCIPhistoryGetPseudocostCount(SCIP_HISTORY *history, SCIP_BRANCHDIR dir)
SCIP_Bool SCIPhistoryIsPseudocostEmpty(SCIP_HISTORY *history, SCIP_BRANCHDIR dir)
SCIP_Bool SCIPhistoryIsAncPseudocostEmpty(SCIP_HISTORY *history, SCIP_BRANCHDIR dir)
SCIP_Real SCIPhistoryGetPseudocostVariance(SCIP_HISTORY *history, SCIP_BRANCHDIR direction)
void SCIPhistoryIncNActiveConflicts(SCIP_HISTORY *history, SCIP_BRANCHDIR dir, SCIP_Real length)
void SCIPhistoryScaleVSIDS(SCIP_HISTORY *history, SCIP_Real scalar)
void SCIPhistoryIncCutoffSum(SCIP_HISTORY *history, SCIP_BRANCHDIR dir, SCIP_Real weight)
void SCIPhistoryIncNBranchings(SCIP_HISTORY *history, SCIP_BRANCHDIR dir, int depth)
void SCIPhistoryUpdatePseudocost(SCIP_HISTORY *history, SCIP_SET *set, SCIP_Real solvaldelta, SCIP_Real objdelta, SCIP_Real weight)
SCIP_Real SCIPhistoryGetVSIDS(SCIP_HISTORY *history, SCIP_BRANCHDIR dir)
SCIP_Bool SCIPhistoryIsRatioValid(SCIP_HISTORY *history)
SCIP_Real SCIPhistoryGetAvgBranchdepth(SCIP_HISTORY *history, SCIP_BRANCHDIR dir)
SCIP_Real SCIPhistoryGetLastBalance(SCIP_HISTORY *history)
SCIP_Real SCIPhistoryGetLastGMIeff(SCIP_HISTORY *history)
SCIP_Real SCIPhistoryGetAvgGMIeff(SCIP_HISTORY *history)
SCIP_Real SCIPhistoryGetInferenceSum(SCIP_HISTORY *history, SCIP_BRANCHDIR dir)
void SCIPhistoryFree(SCIP_HISTORY **history, BMS_BLKMEM *blkmem)
void SCIPhistoryUnite(SCIP_HISTORY *history, SCIP_HISTORY *addhistory, SCIP_Bool switcheddirs)
void SCIPhistoryIncGMIeffSum(SCIP_HISTORY *history, SCIP_Real gmieff)
SCIP_BRANCHDIR SCIPbranchdirOpposite(SCIP_BRANCHDIR dir)
void SCIPhistoryIncVSIDS(SCIP_HISTORY *history, SCIP_BRANCHDIR dir, SCIP_Real weight)
internal methods for branching and inference history
#define BMSfreeBlockMemory(mem, ptr)
#define BMSallocBlockMemory(mem, ptr)
#define BMSallocBlockMemoryArray(mem, ptr, num)
#define BMSfreeBlockMemoryArray(mem, ptr, num)
#define BMSreallocBlockMemoryArray(mem, ptr, oldnum, newnum)
struct BMS_BlkMem BMS_BLKMEM
public methods for branching and inference history structure
public methods for message output
public data structures and miscellaneous methods
SCIP_Real SCIPsetPseudocosteps(SCIP_SET *set)
SCIP_Bool SCIPsetIsPositive(SCIP_SET *set, SCIP_Real val)
SCIP_Bool SCIPsetIsInfinity(SCIP_SET *set, SCIP_Real val)
SCIP_Real SCIPsetPseudocostdelta(SCIP_SET *set)
int SCIPsetCalcMemGrowSize(SCIP_SET *set, int num)
SCIP_Bool SCIPsetIsNegative(SCIP_SET *set, SCIP_Real val)
internal methods for global SCIP settings
SCIP_Real ancpscostcount[2]
SCIP_Longint nbranchings[2]
SCIP_Real pscostweightedmean[2]
SCIP_Longint nactiveconflicts[2]
SCIP_Real pscostvariance[2]
SCIP_Real inferencesum[2]
SCIP_Real conflengthsum[2]
SCIP_Real ancpscostweightedmean[2]
SCIP_Longint branchdepthsum[2]
SCIP_HISTORY ** histories
datastructures for branching and inference history
struct SCIP_History SCIP_HISTORY
@ SCIP_BRANCHDIR_DOWNWARDS
struct SCIP_ValueHistory SCIP_VALUEHISTORY
enum SCIP_BranchDir SCIP_BRANCHDIR
enum SCIP_Retcode SCIP_RETCODE