Package hyperheuristic.examples
Class ExampleHyperHeuristic2
java.lang.Object
hyperheuristic.GenericHyperHeuristic
hyperheuristic.examples.ExampleHyperHeuristic2
- All Implemented Interfaces:
HyperHeuristicIntrf
public class ExampleHyperHeuristic2 extends GenericHyperHeuristic
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.
-
Field Summary
Fields inherited from class hyperheuristic.GenericHyperHeuristic
dynSet, lsDynSet, pertDynSet, problem, rng -
Constructor Summary
Constructors Constructor Description ExampleHyperHeuristic2(long seed) -
Method Summary
Modifier and Type Method Description voidsolve()Methods inherited from class hyperheuristic.GenericHyperHeuristic
getBestSolutionValue, getDySet, getElapsedTime, getLsDynSet, getPertDynSet, getTimeLimit, hasTimeExpired, loadProblem, run, setDynSet, setLsDynSet, setPertDynSet, setTimeLimit
-
Constructor Details
-
ExampleHyperHeuristic2
public ExampleHyperHeuristic2(long seed)
-
-
Method Details
-
solve
public void solve()- Specified by:
solvein classGenericHyperHeuristic
-