Interface NewBestSolutionEvent<Solution_>

Type Parameters:
Solution_ - the solution type, the class with the PlanningSolution annotation

public interface NewBestSolutionEvent<Solution_>
Delivered in a consumer thread multiple times during the solving process, containing the best solution found so far.
  • Method Details

    • solution

      Solution_ solution()
      The best solution found by the solver. Don't apply any changes to the solution instance while the solver runs. The solver's best solution instance is the same as the one in the event, and any modifications may lead to solver corruption due to its internal reuse.
      Returns:
      the best solution found by the solver
    • producerId

      EventProducerId producerId()
      Returns:
      A EventProducerId identifying what generated the event