I am working on a Swing based GUI handling my planning problem. The GUI should like in the examples be updated each time a better solution is found. I use the SwingWorker (SolveWorker) from the examples and starting the solving works fine. I add my event listener to the Solver, however it seems that I never get an event on:
public void bestSolutionChanged(final BestSolutionChangedEvent event)
If I then terminate the solver early, I get an event right away and the score is negative for soft and hard constraints. I can understand from the Java Docs that calling ‘bestSolutionChanged’ not guaranteed, so the frequency of calls might depend on the Problem Facts in the planning problem. Is it possible to force events each time a constraint changes or use a other way to get the current solution that is being solved? Thanks