Package io.github.nhtc2005.alns.core
Interface IterationCallback<S extends Solution<S>>
- Type Parameters:
S- the solution type
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Observes completed ALNS iterations synchronously on the search thread.
Callbacks run after selector feedback and statistics collection, independently of whether
statistics are enabled. Exceptions propagate to the caller of Alns.solve(S, io.github.nhtc2005.alns.acceptance.AcceptanceCriterion<S>, io.github.nhtc2005.alns.stopping.StoppingCriterion<S>).
-
Method Summary
Modifier and TypeMethodDescriptionvoidonIteration(IterationContext<S> context) Receives the state after a completed iteration.
-
Method Details
-
onIteration
Receives the state after a completed iteration.Solutions must not be modified. Copy them before retaining them or using them on another thread. Callback time is included in total search time, but excluded from iteration statistics.
- Parameters:
context- the non-null completed iteration context
-