Class ExperimentalSchrimpfAcceptance
java.lang.Object
com.graphhopper.jsprit.core.algorithm.acceptor.ExperimentalSchrimpfAcceptance
- All Implemented Interfaces:
SolutionAcceptor,AlgorithmStartsListener,IterationStartsListener,VehicleRoutingAlgorithmListener
public class ExperimentalSchrimpfAcceptance
extends Object
implements SolutionAcceptor, IterationStartsListener, AlgorithmStartsListener
-
Constructor Summary
ConstructorsConstructorDescriptionExperimentalSchrimpfAcceptance(int solutionMemory, double alpha, int nOfWarmupIterations) -
Method Summary
Modifier and TypeMethodDescriptionbooleanacceptSolution(Collection<VehicleRoutingProblemSolution> solutions, VehicleRoutingProblemSolution newSolution) Accepts solution or not, and returns true if a new solution has been accepted.voidinformAlgorithmStarts(VehicleRoutingProblem problem, VehicleRoutingAlgorithm algorithm, Collection<VehicleRoutingProblemSolution> solutions) voidinformIterationStarts(int i, VehicleRoutingProblem problem, Collection<VehicleRoutingProblemSolution> solutions) toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.graphhopper.jsprit.core.algorithm.acceptor.SolutionAcceptor
getCurrentThreshold
-
Constructor Details
-
ExperimentalSchrimpfAcceptance
public ExperimentalSchrimpfAcceptance(int solutionMemory, double alpha, int nOfWarmupIterations)
-
-
Method Details
-
acceptSolution
public boolean acceptSolution(Collection<VehicleRoutingProblemSolution> solutions, VehicleRoutingProblemSolution newSolution) Description copied from interface:SolutionAcceptorAccepts 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.
- Specified by:
acceptSolutionin interfaceSolutionAcceptor- Parameters:
solutions- collection of existing solutionsnewSolution- new solution to be evaluated- Returns:
- true if solution accepted
-
toString
-
informAlgorithmStarts
public void informAlgorithmStarts(VehicleRoutingProblem problem, VehicleRoutingAlgorithm algorithm, Collection<VehicleRoutingProblemSolution> solutions) - Specified by:
informAlgorithmStartsin interfaceAlgorithmStartsListener
-
informIterationStarts
public void informIterationStarts(int i, VehicleRoutingProblem problem, Collection<VehicleRoutingProblemSolution> solutions) - Specified by:
informIterationStartsin interfaceIterationStartsListener
-