Interface TrackableSearch<T extends Copyable<T>>

Type Parameters:
T - The type of object under optimization.
All Superinterfaces:
Splittable<TrackableSearch<T>>
All Known Subinterfaces:
Metaheuristic<T>, ReoptimizableMetaheuristic<T>, SimpleLocalMetaheuristic<T>, SimpleMetaheuristic<T>, SingleSolutionMetaheuristic<T>
All Known Implementing Classes:
AcceptanceBandSampling, AdaptiveEvolutionaryAlgorithm, AdaptiveMutationOnlyEvolutionaryAlgorithm, FirstDescentHillClimber, GenerationalEvolutionaryAlgorithm, GenerationalEvolutionaryAlgorithmMutuallyExclusiveOperators, GenerationalMutationOnlyEvolutionaryAlgorithm, GeneticAlgorithm, HeuristicBiasedStochasticSampling, HeuristicPermutationGenerator, HeuristicSolutionGenerator, IterativeSampling, Multistarter, MutationOnlyGeneticAlgorithm, NaiveGenerationalEvolutionaryAlgorithm, OnePlusOneEvolutionaryAlgorithm, OnePlusOneGeneticAlgorithm, ParallelMetaheuristic, ParallelMultistarter, ParallelReoptimizableMetaheuristic, ParallelReoptimizableMultistarter, ReoptimizableMultistarter, SimpleGeneticAlgorithm, SimulatedAnnealing, SteepestDescentHillClimber, TimedParallelMultistarter, TimedParallelReoptimizableMultistarter, ValueBiasedStochasticSampling

public interface TrackableSearch<T extends Copyable<T>> extends Splittable<TrackableSearch<T>>
This interface defines the required functionality of search algorithm implementations that support tracking search progress across multiple runs, whether multiple sequential runs, or multiple concurrent runs in the case of a parallel metaheuristic.
  • Method Details

    • getProgressTracker

      ProgressTracker<T> getProgressTracker()
      Gets the ProgressTracker object that is in use for tracking search progress. The object returned by this method contains the best solution found during the search (including across multiple concurrent runs if the search is multithreaded, or across multiple restarts if the run methods were called multiple times), as well as cost of that solution, among other information. See the ProgressTracker documentation for more information about the search data tracked by this object.
      Returns:
      the ProgressTracker in use by this metaheuristic.
    • setProgressTracker

      void setProgressTracker(ProgressTracker<T> tracker)
      Sets the ProgressTracker object that is in use for tracking search progress. Any previously set ProgressTracker is replaced by this one.
      Parameters:
      tracker - The new ProgressTracker to set. The tracker must not be null. This method does nothing if tracker is null.
    • getTotalRunLength

      long getTotalRunLength()
      Gets the total run length of the metaheuristic. This is the total run length across all calls to the search. This may differ from what may be expected based on run lengths. For example, the search terminates if it finds the theoretical best solution, and also immediately returns if a prior call found the theoretical best. In such cases, the total run length may be less than the requested run length.

      The meaning of run length may vary from one metaheuristic to another. Therefore, implementing classes should provide fresh documentation rather than relying entirely on the interface documentation.

      Returns:
      the total run length of the metaheuristic
    • getProblem

      Problem<T> getProblem()
      Gets a reference to the problem that this search is solving.
      Returns:
      a reference to the problem.