Interface SolverJobBuilder.FirstInitializedSolutionConsumer<Solution_>

Type Parameters:
Solution_ - the solution type, the class with the PlanningSolution annotation
Enclosing interface:
SolverJobBuilder<Solution_,ProblemId_>

@NullMarked public static interface SolverJobBuilder.FirstInitializedSolutionConsumer<Solution_>
A consumer that accepts the first initialized solution.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    accept(Solution_ solution, boolean isTerminatedEarly)
    Accepts the first solution after initialization.
  • Method Details

    • accept

      void accept(Solution_ solution, boolean isTerminatedEarly)
      Accepts the first solution after initialization.
      Parameters:
      solution - the first solution after initialization phase(s) finished
      isTerminatedEarly - false in most common cases. True if the solver was terminated early, before the solution could be fully initialized, typically as a result of construction heuristic running for too long and tripping a time-based termination condition. In that case, there will likely be no other phase after this one and the solver will terminate as well, without launching any optimizing phase. Therefore, the solution captured with SolverJobBuilder.withBestSolutionConsumer(Consumer) will likely be unchanged from this one.