My model supports real-time change by Solver#addProblemFactChange
and ProblemFactChange
interface. Implementing doChange
method of this interface, I actively use notifications of scoreDirector
by methods like beforeEntityRemoved
, beforeProblemFactRemoved
, beforeProblemFactChanged
and other. Besides, incremental score calculator of model implements callback methods beforeEntityAdded
, beforeEntityRemoved
and their after
-versions.
Investigating solver behavior, I saw such diagram of score calculator calls from optaplanner:
That is optaplanner doesn't invoke entities related methods of calculator despite model changes. Why so occurs and why necessary to notify scoreDirector
?