Interface TrackableSearch<T extends Copyable<T>>

    • Method Detail

      • 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.