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 Summary
Modifier and TypeMethodDescriptionbooleanacceptSolution(Collection<VehicleRoutingProblemSolution> solutions, VehicleRoutingProblemSolution newSolution) Accepts solution or not, and returns true if a new solution has been accepted.default doubleReturns the current acceptance threshold.
-
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 solutionsnewSolution- 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
-