Kent Zhang
Kent Zhang

Reputation: 89

How can I get the scores during solving

I'm creating a report that presents the score changes during solving, so I have to collect the scores every 10 minutes. How can I do that?

Upvotes: 1

Views: 149

Answers (1)

Geoffrey De Smet
Geoffrey De Smet

Reputation: 27312

Use this code:

solver.addEventListener((BestSolutionChangedEvent e) -> {
    System.out.println(e.getNewBestScore());
});

Upvotes: 1

Related Questions