- All Superinterfaces:
BiFunction<S,
Integer, Integer>
- All Known Implementing Classes:
DefaultVNSNeighChange
- 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 VNSNeighChange<S extends Solution<S,I>,I extends Instance>
extends BiFunction<S,Integer,Integer>
Calculates K value for each VNS step.
See
DefaultVNSNeighChange
for an example implementation.-
Field Summary
Fields -
Method Summary
Methods inherited from interface java.util.function.BiFunction
andThen
-
Field Details
-
STOPNOW
static final int STOPNOW- See Also:
-
-
Method Details
-
apply
Implements the neighborhood change strategy for VNS. K starts at 0 and can be incremented or modified based on the solution's state.- Specified by:
apply
in interfaceBiFunction<S extends Solution<S,
I>, Integer, Integer> - Parameters:
solution
- Current solution, provided as a parameter so K can be adapted or scaled to instance size.originalK
- Current k strength. Starts at 0 and increments by 1 each time the solution does not improve.- Returns:
- new K value. Return
STOPNOW
to stop when the VNS should terminate
-