Package hyperheuristic.examples.hyflex
Class HyFlexExampleHyperHeuristic2
java.lang.Object
AbstractClasses.HyperHeuristic
hyperheuristic.examples.hyflex.HyFlexExampleHyperHeuristic2
- All Implemented Interfaces:
HyperHeuristicIntrf
public class HyFlexExampleHyperHeuristic2 extends AbstractClasses.HyperHeuristic implements HyperHeuristicIntrf
This is an example class for using two dynamic sets in a hyper-heuristic.
This class extends the GenericHyperHeuristic class. It
implements a simple iterated local search hyper-heuristic that chooses
a perturbative heuristic at random and applies it followed by applying
a local search heuristic that is also chosen at random. It accepts better moves.
In this example, we use two dynamic sets to manage the perturbative heuristics and local search heuristic separately.
This example uses the HyFlex framework.
-
Field Summary
-
Constructor Summary
Constructors Constructor Description HyFlexExampleHyperHeuristic2(long seed) -
Method Summary
Modifier and Type Method Description voidsetLsDynSet(DynHeurSet lsDynSet)voidsetPertDynSet(DynHeurSet pertDynSet)voidsolve(AbstractClasses.ProblemDomain problem)java.lang.StringtoString()Methods inherited from class AbstractClasses.HyperHeuristic
getBestSolutionValue, getElapsedTime, getFitnessTrace, getTimeLimit, hasTimeExpired, loadProblemDomain, run, setTimeLimitMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface hyperheuristic.HyperHeuristicIntrf
getBestSolutionValue, getDySet, getElapsedTime, getLsDynSet, getPertDynSet, getTimeLimit, loadProblem, loadProblemDomain, run, setDynSet, setTimeLimit
-
Constructor Details
-
HyFlexExampleHyperHeuristic2
public HyFlexExampleHyperHeuristic2(long seed)
-
-
Method Details
-
solve
public void solve(AbstractClasses.ProblemDomain problem)- Specified by:
solvein classAbstractClasses.HyperHeuristic
-
setPertDynSet
- Specified by:
setPertDynSetin interfaceHyperHeuristicIntrf
-
setLsDynSet
- Specified by:
setLsDynSetin interfaceHyperHeuristicIntrf
-
toString
public java.lang.String toString()- Specified by:
toStringin classAbstractClasses.HyperHeuristic
-