Interface SolutionAcceptor

All Known Implementing Classes:
AcceptNewRemoveFirst, ExperimentalSchrimpfAcceptance, GreedyAcceptance, RecordToRecordTravelAcceptance, SchrimpfAcceptance

public interface SolutionAcceptor
Acceptor that decides whether the newSolution is accepted or not.
Author:
stefan
  • Method Details

    • acceptSolution

      boolean acceptSolution(Collection<VehicleRoutingProblemSolution> solutions, VehicleRoutingProblemSolution newSolution)
      Accepts solution or not, and returns true if a new solution has been accepted.

      If the solution is accepted, it is added to solutions, i.e. the solutions-collections is modified.

      Parameters:
      solutions - collection of existing solutions
      newSolution - new solution to be evaluated
      Returns:
      true if solution accepted
    • getCurrentThreshold

      default double getCurrentThreshold()
      Returns the current acceptance threshold.

      For threshold-based acceptors like Schrimpf acceptance, this returns the current threshold value. For greedy acceptors, this returns 0.

      Returns:
      the current threshold value