Commit 5f79e72a by 张晓

调整运行时间

1 parent d135bab3
...@@ -53,7 +53,7 @@ public class PrepareController { ...@@ -53,7 +53,7 @@ public class PrepareController {
SolverConfig solverConfig = new SolverConfig().withSolutionClass(DispatchSolution.class); SolverConfig solverConfig = new SolverConfig().withSolutionClass(DispatchSolution.class);
solverConfig.withEntityClassList(Arrays.asList(Technician.class, Customer.class));// 这里不能漏掉,否则约束不生效 solverConfig.withEntityClassList(Arrays.asList(Technician.class, Customer.class));// 这里不能漏掉,否则约束不生效
solverConfig.withConstraintProviderClass(DispatchConstraintProvider.class); solverConfig.withConstraintProviderClass(DispatchConstraintProvider.class);
solverConfig.withTerminationSpentLimit(Duration.ofSeconds(10)); solverConfig.withTerminationSpentLimit(Duration.ofSeconds(60 * 5));
SolverFactory<DispatchSolution> solverFactory = SolverFactory.create(solverConfig); SolverFactory<DispatchSolution> solverFactory = SolverFactory.create(solverConfig);
solver = solverFactory.buildSolver(); solver = solverFactory.buildSolver();
......
...@@ -55,7 +55,7 @@ public class BatchScheduler { ...@@ -55,7 +55,7 @@ public class BatchScheduler {
SolverConfig solverConfig = new SolverConfig().withSolutionClass(DispatchSolution.class); SolverConfig solverConfig = new SolverConfig().withSolutionClass(DispatchSolution.class);
solverConfig.withEntityClassList(Arrays.asList(Technician.class, Customer.class));// 这里不能漏掉,否则约束不生效 solverConfig.withEntityClassList(Arrays.asList(Technician.class, Customer.class));// 这里不能漏掉,否则约束不生效
solverConfig.withConstraintProviderClass(DispatchConstraintProvider.class); solverConfig.withConstraintProviderClass(DispatchConstraintProvider.class);
solverConfig.withTerminationSpentLimit(Duration.ofSeconds(20)); solverConfig.withTerminationSpentLimit(Duration.ofSeconds(60 * 5));
SolverFactory<DispatchSolution> solverFactory = SolverFactory.create(solverConfig); SolverFactory<DispatchSolution> solverFactory = SolverFactory.create(solverConfig);
solver = solverFactory.buildSolver(); solver = solverFactory.buildSolver();
......
...@@ -40,7 +40,7 @@ class SolveServiceTest { ...@@ -40,7 +40,7 @@ class SolveServiceTest {
ExtractService extractService; ExtractService extractService;
String groupId = "gsuzhou"; String groupId = "gsuzhou";
String day = "2023-07-11"; String day = "2023-03-20";
private SolverManager<DispatchSolution, UUID> solverManager; private SolverManager<DispatchSolution, UUID> solverManager;
private Solver<DispatchSolution> solver; private Solver<DispatchSolution> solver;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!