Class PatientPhaseFairGreedyUpdate
public class PatientPhaseFairGreedyUpdate extends PhaseFairGreedyUpdate
The active set is updated every phaseLen iterations. A patience
factor is used to control how long the update strategy waits for the best
solution to improve before updating the active set.
The best top are included in the active set where top
is a field for the number of heuristics to include in the active set.
The greediness selection is fair. Every heuristic will be part of the active
set for a maximum number of times controlled by max. If a heuristic
is chosen max times, it cannot be part of the active set until
all other heuristics are selected max times. In this case, the
frequency count for all heuristics is reset to 0.
The selection is greedy considering the heuristics that are available (those
that are not permanently removed or hits max.
-
Field Summary
Fields Modifier and Type Field Description protected doublepatienceA patience factor controlling how long the update strategy waits for the best solution to improve before updating the active set.Fields inherited from class dynheurset.update.Update
activeList, heurList, measure, numRemove, numReset, numUpdates, remove, reset, runStat -
Constructor Summary
Constructors Constructor Description PatientPhaseFairGreedyUpdate(double patience, int max, int phaseLen, int top) -
Method Summary
Modifier and Type Method Description booleancanUpdate()Returnstrueif the active set is to be updated andfalseotherwise.Methods inherited from class dynheurset.update.Update
getActiveList, setHeurList, setMeasure, setRemove, setReset, setRunStat, updateActiveList
-
Field Details
-
patience
protected final double patienceA patience factor controlling how long the update strategy waits for the best solution to improve before updating the active set.
-
-
Constructor Details
-
PatientPhaseFairGreedyUpdate
public PatientPhaseFairGreedyUpdate(double patience, int max, int phaseLen, int top)
-
-
Method Details
-
canUpdate
public boolean canUpdate()Description copied from class:UpdateReturnstrueif the active set is to be updated andfalseotherwise.In this method, you should use the
RunStatfield to access the run information that you may need to decides whether to update the active set.- Overrides:
canUpdatein classPhaseGreedyUpdate- Returns:
trueif the active set is to be updated andfalseotherwise.
-