90 history->
vsids[0] = 0.0;
91 history->
vsids[1] = 0.0;
116 SCIP_Bool switcheddirs
125 for(
i = 0;
i <= 1; ++
i )
128 d = (switcheddirs ? 1 -
i :
i);
177 SCIP_Real solvaldelta,
184 SCIP_Real sumcontribution;
193 assert(0.0 < weight && weight <= 1.0);
199 distance = solvaldelta;
205 distance = -solvaldelta;
212 assert(dir == 0 || dir == 1);
217 distance =
MAX(distance,
eps);
224 sumcontribution = objdelta/distance;
231 SCIPsetDebugMsg(
set,
"updated pseudo costs of history %p: dir=%d, distance=%g, objdelta=%g, weight=%g -> %g/%g\n",
252 (*valuehistory)->nvalues = 0;
253 (*valuehistory)->sizevalues = 5;
269 if( *valuehistory !=
NULL )
273 for(
i = (*valuehistory)->nvalues-1;
i >= 0; --
i )
321 (*history) = valuehistory->
histories[pos];
334 if( valuehistory !=
NULL )
338 for(
i = valuehistory->
nvalues-1;
i >= 0; --
i )
358#undef SCIPvaluehistoryGetNValues
359#undef SCIPvaluehistoryGetHistories
360#undef SCIPvaluehistoryGetValues
389 return valuehistory->
values;
408#undef SCIPbranchdirOpposite
409#undef SCIPhistoryGetPseudocost
410#undef SCIPhistoryGetPseudocostCount
411#undef SCIPhistoryIsPseudocostEmpty
412#undef SCIPhistoryIncVSIDS
413#undef SCIPhistoryScaleVSIDS
414#undef SCIPhistoryGetVSIDS
415#undef SCIPhistoryIncNActiveConflicts
416#undef SCIPhistoryGetNActiveConflicts
417#undef SCIPhistoryGetAvgConflictlength
418#undef SCIPhistoryIncNBranchings
419#undef SCIPhistoryIncInferenceSum
420#undef SCIPhistoryIncCutoffSum
421#undef SCIPhistoryGetNBranchings
422#undef SCIPhistoryGetInferenceSum
423#undef SCIPhistoryGetAvgInferences
424#undef SCIPhistoryGetCutoffSum
425#undef SCIPhistoryGetAvgCutoffs
426#undef SCIPhistoryGetAvgBranchdepth
427#undef SCIPhistoryIsRatioValid
428#undef SCIPhistoryGetLastRatio
429#undef SCIPhistorySetRatioHistory
430#undef SCIPhistoryGetLastBalance
431#undef SCIPhistorySetLastGMIeff
432#undef SCIPhistoryGetLastGMIeff
433#undef SCIPhistoryIncGMIeffSum
434#undef SCIPhistoryGetAvgGMIeff
448 SCIP_Real solvaldelta
453 if( solvaldelta >= 0.0 )
466 SCIP_Real correctionfactor;
472 correctionfactor = history->
pscostcount[dir] - 1.0;
475 if( correctionfactor > 0.9 )
491 assert((
int)dir == 0 || (
int)dir == 1);
504 assert((
int)dir == 0 || (
int)dir == 1);
518 assert((
int)dir == 0 || (
int)dir == 1);
520 history->
vsids[dir] += weight;
531 history->
vsids[0] *= scalar;
532 history->
vsids[1] *= scalar;
543 assert((
int)dir == 0 || (
int)dir == 1);
545 return history->
vsids[dir];
557 assert((
int)dir == 0 || (
int)dir == 1);
572 assert((
int)dir == 0 || (
int)dir == 1);
585 assert((
int)dir == 0 || (
int)dir == 1);
600 assert((
int)dir == 0 || (
int)dir == 1);
615 assert((
int)dir == 0 || (
int)dir == 1);
631 assert((
int)dir == 0 || (
int)dir == 1);
646 assert((
int)dir == 0 || (
int)dir == 1);
659 assert((
int)dir == 0 || (
int)dir == 1);
672 assert((
int)dir == 0 || (
int)dir == 1);
685 assert((
int)dir == 0 || (
int)dir == 1);
698 assert((
int)dir == 0 || (
int)dir == 1);
711 assert((
int)dir == 0 || (
int)dir == 1);
734 return history->
ratio;
803 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)
void SCIPhistorySetLastGMIeff(SCIP_HISTORY *history, SCIP_Real gmieff)
SCIP_Real SCIPhistoryGetLastRatio(SCIP_HISTORY *history)
void SCIPhistoryIncInferenceSum(SCIP_HISTORY *history, SCIP_BRANCHDIR dir, SCIP_Real weight)
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_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_Longint nbranchings[2]
SCIP_Real pscostweightedmean[2]
SCIP_Longint nactiveconflicts[2]
SCIP_Real pscostvariance[2]
SCIP_Real inferencesum[2]
SCIP_Real conflengthsum[2]
SCIP_Longint branchdepthsum[2]
SCIP_HISTORY ** histories
datastructures for branching and inference history
@ SCIP_BRANCHDIR_DOWNWARDS
enum SCIP_BranchDir SCIP_BRANCHDIR
enum SCIP_Retcode SCIP_RETCODE