Interface SolutionOperator<S extends Solution<S>>

Type Parameters:
S - the solution type
All Known Subinterfaces:
DestroyOperator<S>, LocalSearch<S>, RepairOperator<S>
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface SolutionOperator<S extends Solution<S>>
Transforms a solution during an ALNS iteration.
  • Method Summary

    Modifier and Type
    Method
    Description
    apply(S solution, RandomGenerator randomGenerator)
    Applies this operator using the supplied source of randomness.
  • Method Details

    • apply

      S apply(S solution, RandomGenerator randomGenerator)
      Applies this operator using the supplied source of randomness.

      The operator may modify the input solution and return it, or return a different solution. Use the supplied generator for random choices to support reproducible runs.

      Parameters:
      solution - the non-null solution to transform
      randomGenerator - the non-null random generator used by the search
      Returns:
      a non-null transformed solution