Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -731,14 +731,19 @@ and reference the implementation class in the solver configuration like so:
[source,xml]
----
<solver xmlns="https://timefold.ai/xsd/solver">
<enablePreviewFeature>NEIGHBORHOODS</enablePreviewFeature>
...
<enablePreviewFeature>NEIGHBORHOODS</enablePreviewFeature>
<constructionHeuristic/> <!-- Often used before localSearch when the solution is not yet initialized -->

<localSearch>
<neighborhoodProviderClass>com.acme.MyNeighborhoodProvider</neighborhoodProviderClass>
</localSearch>
</solver>
----

NOTE: As the Neighborhoods API is a part of Local Search, it needs to be used on an initialized solution.
This usually means that a xref:optimization-algorithms/construction-heuristics.adoc[construction heuristic] precedes it.

The `NeighborhoodProvider` interface has a single method:

[source,java,options="nowrap"]
Expand Down
Loading