diff --git a/timefold-solver/src/main/java/com/baeldung/timefoldsolver/ShiftScheduleApp.java b/timefold-solver/src/main/java/com/baeldung/timefoldsolver/ShiftScheduleApp.java index 24666ac6aa..e8dc02e2b3 100644 --- a/timefold-solver/src/main/java/com/baeldung/timefoldsolver/ShiftScheduleApp.java +++ b/timefold-solver/src/main/java/com/baeldung/timefoldsolver/ShiftScheduleApp.java @@ -20,9 +20,9 @@ public class ShiftScheduleApp { SolverFactory solverFactory = SolverFactory.create(new SolverConfig().withSolutionClass(ShiftSchedule.class) .withEntityClasses(Shift.class) .withConstraintProviderClass(ShiftScheduleConstraintProvider.class) - // The solver runs only for 5 seconds on this small dataset. - // It's recommended to run for at least 5 minutes ("5m") otherwise. - .withTerminationSpentLimit(Duration.ofSeconds(5))); + // The solver runs only for 2 seconds on this tiny dataset. + // It's recommended to run for at least 5 minutes ("5m") on large datasets. + .withTerminationSpentLimit(Duration.ofSeconds(2))); Solver solver = solverFactory.buildSolver(); ShiftSchedule problem = loadProblem();