45 assert(history !=
NULL);
60 assert(history !=
NULL);
61 assert(*history !=
NULL);
71 assert(history !=
NULL);
79 history->
vsids[0] = 0.0;
80 history->
vsids[1] = 0.0;
104 assert(history !=
NULL);
105 assert(addhistory !=
NULL);
108 for( i = 0; i <= 1; ++i )
111 d = (switcheddirs ? 1 - i : i);
173 assert(history !=
NULL);
178 assert(0.0 < weight && weight <= 1.0);
184 distance = solvaldelta;
190 distance = -solvaldelta;
197 assert(dir == 0 || dir == 1);
202 distance =
MAX(distance, eps);
209 sumcontribution = objdelta/distance;
216 SCIPsetDebugMsg(
set,
"updated pseudo costs of history %p: dir=%d, distance=%g, objdelta=%g, weight=%g -> %g/%g\n",
217 (
void*)history, dir, distance, objdelta, weight, history->
pscostcount[dir], history->pscostweightedmean[dir]);
233 assert(valuehistory !=
NULL);
237 (*valuehistory)->nvalues = 0;
238 (*valuehistory)->sizevalues = 5;
252 assert(valuehistory !=
NULL);
254 if( *valuehistory !=
NULL )
258 for( i = (*valuehistory)->nvalues-1; i >= 0; --i )
279 assert(valuehistory !=
NULL);
280 assert(blkmem !=
NULL);
282 assert(history !=
NULL);
306 (*history) = valuehistory->
histories[pos];
308 assert(*history !=
NULL);
319 if( valuehistory !=
NULL )
323 for( i = valuehistory->
nvalues-1; i >= 0; --i )
343 #undef SCIPvaluehistoryGetNValues 344 #undef SCIPvaluehistoryGetHistories 345 #undef SCIPvaluehistoryGetValues 352 assert(valuehistory !=
NULL);
362 assert(valuehistory !=
NULL);
372 assert(valuehistory !=
NULL);
374 return valuehistory->
values;
393 #undef SCIPbranchdirOpposite 394 #undef SCIPhistoryGetPseudocost 395 #undef SCIPhistoryGetPseudocostCount 396 #undef SCIPhistoryIsPseudocostEmpty 397 #undef SCIPhistoryIncVSIDS 398 #undef SCIPhistoryScaleVSIDS 399 #undef SCIPhistoryGetVSIDS 400 #undef SCIPhistoryIncNActiveConflicts 401 #undef SCIPhistoryGetNActiveConflicts 402 #undef SCIPhistoryGetAvgConflictlength 403 #undef SCIPhistoryIncNBranchings 404 #undef SCIPhistoryIncInferenceSum 405 #undef SCIPhistoryIncCutoffSum 406 #undef SCIPhistoryGetNBranchings 407 #undef SCIPhistoryGetInferenceSum 408 #undef SCIPhistoryGetAvgInferences 409 #undef SCIPhistoryGetCutoffSum 410 #undef SCIPhistoryGetAvgCutoffs 411 #undef SCIPhistoryGetAvgBranchdepth 428 assert(history !=
NULL);
430 if( solvaldelta >= 0.0 )
445 assert(history !=
NULL);
449 correctionfactor = history->
pscostcount[dir] - 1.0;
452 if( correctionfactor > 0.9 )
466 assert(history !=
NULL);
468 assert((
int)dir == 0 || (
int)dir == 1);
479 assert(history !=
NULL);
481 assert((
int)dir == 0 || (
int)dir == 1);
493 assert(history !=
NULL);
495 assert((
int)dir == 0 || (
int)dir == 1);
497 history->
vsids[dir] += weight;
506 assert(history !=
NULL);
508 history->
vsids[0] *= scalar;
509 history->
vsids[1] *= scalar;
518 assert(history !=
NULL);
520 assert((
int)dir == 0 || (
int)dir == 1);
522 return history->
vsids[dir];
532 assert(history !=
NULL);
534 assert((
int)dir == 0 || (
int)dir == 1);
535 assert(length >= 0.0);
547 assert(history !=
NULL);
549 assert((
int)dir == 0 || (
int)dir == 1);
560 assert(history !=
NULL);
562 assert((
int)dir == 0 || (
int)dir == 1);
574 assert(history !=
NULL);
577 assert((
int)dir == 0 || (
int)dir == 1);
590 assert(history !=
NULL);
592 assert((
int)dir == 0 || (
int)dir == 1);
594 assert(weight >= 0.0);
606 assert(history !=
NULL);
608 assert((
int)dir == 0 || (
int)dir == 1);
610 assert(weight >= 0.0);
621 assert(history !=
NULL);
623 assert((
int)dir == 0 || (
int)dir == 1);
634 assert(history !=
NULL);
636 assert((
int)dir == 0 || (
int)dir == 1);
647 assert(history !=
NULL);
649 assert((
int)dir == 0 || (
int)dir == 1);
660 assert(history !=
NULL);
662 assert((
int)dir == 0 || (
int)dir == 1);
673 assert(history !=
NULL);
675 assert((
int)dir == 0 || (
int)dir == 1);
686 assert(history !=
NULL);
688 assert((
int)dir == 0 || (
int)dir == 1);
SCIP_Real SCIPhistoryGetAvgConflictlength(SCIP_HISTORY *history, SCIP_BRANCHDIR dir)
SCIP_Bool SCIPsetIsInfinity(SCIP_SET *set, SCIP_Real val)
void SCIPhistoryIncNBranchings(SCIP_HISTORY *history, SCIP_BRANCHDIR dir, int depth)
void SCIPhistoryIncVSIDS(SCIP_HISTORY *history, SCIP_BRANCHDIR dir, SCIP_Real weight)
public methods for branching and inference history structure
SCIP_Longint nactiveconflicts[2]
void SCIPhistoryIncCutoffSum(SCIP_HISTORY *history, SCIP_BRANCHDIR dir, SCIP_Real weight)
SCIP_RETCODE SCIPvaluehistoryCreate(SCIP_VALUEHISTORY **valuehistory, BMS_BLKMEM *blkmem)
SCIP_Real pscostvariance[2]
SCIP_Real SCIPsetPseudocosteps(SCIP_SET *set)
void SCIPhistoryIncInferenceSum(SCIP_HISTORY *history, SCIP_BRANCHDIR dir, SCIP_Real weight)
SCIP_Bool SCIPsetIsPositive(SCIP_SET *set, SCIP_Real val)
void SCIPvaluehistoryScaleVSIDS(SCIP_VALUEHISTORY *valuehistory, SCIP_Real scalar)
SCIP_RETCODE SCIPhistoryCreate(SCIP_HISTORY **history, BMS_BLKMEM *blkmem)
void SCIPsortedvecInsertRealPtr(SCIP_Real *realarray, void **ptrarray, SCIP_Real keyval, void *field1val, int *len, int *pos)
void SCIPhistoryReset(SCIP_HISTORY *history)
enum SCIP_Retcode SCIP_RETCODE
int SCIPsetCalcMemGrowSize(SCIP_SET *set, int num)
SCIP_Real SCIPhistoryGetVSIDS(SCIP_HISTORY *history, SCIP_BRANCHDIR dir)
SCIP_Bool SCIPsetIsNegative(SCIP_SET *set, SCIP_Real val)
SCIP_Real SCIPhistoryGetAvgCutoffs(SCIP_HISTORY *history, SCIP_BRANCHDIR dir)
SCIP_Real pscostweightedmean[2]
SCIP_Real SCIPhistoryGetPseudocost(SCIP_HISTORY *history, SCIP_Real solvaldelta)
internal methods for branching and inference history
SCIP_Real SCIPsetPseudocostdelta(SCIP_SET *set)
void SCIPhistoryScaleVSIDS(SCIP_HISTORY *history, SCIP_Real scalar)
enum SCIP_BranchDir SCIP_BRANCHDIR
SCIP_RETCODE SCIPvaluehistoryFind(SCIP_VALUEHISTORY *valuehistory, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_Real value, SCIP_HISTORY **history)
SCIP_Real SCIPhistoryGetPseudocostVariance(SCIP_HISTORY *history, SCIP_BRANCHDIR direction)
void SCIPvaluehistoryFree(SCIP_VALUEHISTORY **valuehistory, BMS_BLKMEM *blkmem)
int SCIPvaluehistoryGetNValues(SCIP_VALUEHISTORY *valuehistory)
SCIP_Real inferencesum[2]
void SCIPhistoryIncNActiveConflicts(SCIP_HISTORY *history, SCIP_BRANCHDIR dir, SCIP_Real length)
SCIP_Real SCIPhistoryGetAvgBranchdepth(SCIP_HISTORY *history, SCIP_BRANCHDIR dir)
SCIP_Real conflengthsum[2]
void SCIPhistoryUnite(SCIP_HISTORY *history, SCIP_HISTORY *addhistory, SCIP_Bool switcheddirs)
SCIP_Longint SCIPhistoryGetNActiveConflicts(SCIP_HISTORY *history, SCIP_BRANCHDIR dir)
internal methods for global SCIP settings
SCIP_Real SCIPhistoryGetPseudocostCount(SCIP_HISTORY *history, SCIP_BRANCHDIR dir)
SCIP_Bool SCIPhistoryIsPseudocostEmpty(SCIP_HISTORY *history, SCIP_BRANCHDIR dir)
#define BMSfreeBlockMemory(mem, ptr)
public data structures and miscellaneous methods
#define BMSallocBlockMemoryArray(mem, ptr, num)
#define BMSfreeBlockMemoryArray(mem, ptr, num)
SCIP_HISTORY ** histories
datastructures for branching and inference history
void SCIPhistoryUpdatePseudocost(SCIP_HISTORY *history, SCIP_SET *set, SCIP_Real solvaldelta, SCIP_Real objdelta, SCIP_Real weight)
SCIP_Longint SCIPhistoryGetNBranchings(SCIP_HISTORY *history, SCIP_BRANCHDIR dir)
SCIP_Real SCIPhistoryGetCutoffSum(SCIP_HISTORY *history, SCIP_BRANCHDIR dir)
SCIP_BRANCHDIR SCIPbranchdirOpposite(SCIP_BRANCHDIR dir)
SCIP_Real SCIPhistoryGetInferenceSum(SCIP_HISTORY *history, SCIP_BRANCHDIR dir)
SCIP_Real * SCIPvaluehistoryGetValues(SCIP_VALUEHISTORY *valuehistory)
SCIP_Longint branchdepthsum[2]
SCIP_Bool SCIPsortedvecFindReal(SCIP_Real *realarray, SCIP_Real val, int len, int *pos)
SCIP_HISTORY ** SCIPvaluehistoryGetHistories(SCIP_VALUEHISTORY *valuehistory)
SCIP_Real SCIPhistoryGetAvgInferences(SCIP_HISTORY *history, SCIP_BRANCHDIR dir)
#define BMSallocBlockMemory(mem, ptr)
common defines and data types used in all packages of SCIP
SCIP_Longint nbranchings[2]
struct BMS_BlkMem BMS_BLKMEM
void SCIPhistoryFree(SCIP_HISTORY **history, BMS_BLKMEM *blkmem)
#define BMSreallocBlockMemoryArray(mem, ptr, oldnum, newnum)