Skip to content

Commit

Permalink
chore: improve docs
Browse files Browse the repository at this point in the history
  • Loading branch information
zepfred committed Aug 15, 2024
1 parent a1d9c7e commit 61c8c79
Showing 1 changed file with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -723,10 +723,12 @@ The `CustomPhaseCommand` interface appears as follows:
[source,java,options="nowrap"]
----
public interface CustomPhaseCommand<Solution_> {
...
void changeWorkingSolution(ScoreDirector<Solution_> scoreDirector);
...
default boolean requireUpdateBestSolution() {
return false;
}
}
----

Expand All @@ -742,6 +744,13 @@ That will corrupt the `Solver` because any previous score or solution was for a
To do that, read about xref:responding-to-change/responding-to-change.adoc[repeated planning] and do it with a xref:responding-to-change/responding-to-change.adoc#problemChange[ProblemChange] instead.
====

[NOTE]
====
When initializing the solution for a planning list variable model that accepts unassigned values,
the custom command may override `requireUpdateBestSolution`
to return `true` in order to ensure the best solution is updated.
====

Configure the `CustomPhaseCommand` in the solver configuration:

[source,xml,options="nowrap"]
Expand Down

0 comments on commit 61c8c79

Please sign in to comment.