Package org.ddolib.common.util.io
Class SolutionPrinter
java.lang.Object
org.ddolib.common.util.io.SolutionPrinter
Utility class providing helper methods to display solutions found by a solver.
The SolutionPrinter is typically used as a callback or logging utility during the
search process to print newly found incumbent (best so far) solutions, along with their
associated search statistics.
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidprintSolution(SearchStatistics stats, int[] solution) Prints a newly found solution and its associated statistics to the standard output.static voidprintSolution(SearchStatistics stats, List<Integer> solution) Prints a newly found solution and its associated statistics to the standard output.
-
Method Details
-
printSolution
Prints a newly found solution and its associated statistics to the standard output.This method is usually invoked each time a better solution is found during the solving process, displaying both the solver's performance information and the variable assignment.
- Parameters:
stats- theSearchStatisticsobject containing information about the current search statesolution- an array of integers representing the variable assignments of the new incumbent solution
-
printSolution
Prints a newly found solution and its associated statistics to the standard output.This method is usually invoked each time a better solution is found during the solving process, displaying both the solver's performance information and the variable assignment.
- Parameters:
stats- theSearchStatisticsobject containing information about the current search statesolution- the list of applied labels of the new incumbent solution
-