Class PhaseFairGreedyUpdate
- Direct Known Subclasses:
PatientPhaseFairGreedyUpdate
public class PhaseFairGreedyUpdate extends PhaseGreedyUpdate
The active set is updated every phaseLen iterations.
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 java.util.List<java.lang.Integer>freqThe frequencies of being in the active set.protected intmaxThe maximum number of consecutive iterations a heuristic can be in the active set.Fields inherited from class dynheurset.update.Update
activeList, heurList, measure, numRemove, numReset, numUpdates, remove, reset, runStat -
Constructor Summary
Constructors Constructor Description PhaseFairGreedyUpdate(int max, int phaseLen, int top) -
Method Summary
Modifier and Type Method Description voidperformUpdate()Determines which heuristics to include in the active set.Methods inherited from class dynheurset.update.Update
getActiveList, setHeurList, setMeasure, setRemove, setReset, setRunStat, updateActiveList
-
Field Details
-
Constructor Details
-
PhaseFairGreedyUpdate
public PhaseFairGreedyUpdate(int max, int phaseLen, int top)
-
-
Method Details
-
performUpdate
public void performUpdate()Description copied from class:UpdateDetermines which heuristics to include in the active set.This method should contain your logic for updating the active set. You can access the
runStatandmeasurefields in your implementation to get the search-status information and measure the performance of heuristics. regarding the search- Overrides:
performUpdatein classPhaseGreedyUpdate
-