Przeglądaj źródła

新模型探索

fangpengyuan 4 miesięcy temu
rodzic
commit
c33dcde751

+ 1 - 1
rw-aps-server/src/main/java/com/rongwei/rwapsserver/aps/score/ApsConstraintListProvider.java

@@ -94,7 +94,7 @@ public class ApsConstraintListProvider implements ConstraintProvider {
                 .filter((equipment) -> {
                     return true;
                 })
-                .penalize(HardMediumSoftScore.ONE_HARD,(equipment) -> {
+                .penalize(HardMediumSoftScore.ONE_MEDIUM,(equipment) -> {
                     int b = 0;
                     List<ProductionProcesses> tasks = new ArrayList<>();
                     tasks.addAll(equipment.getTasks());

+ 2 - 2
rw-aps-server/src/main/java/com/rongwei/rwapsserver/aps/service/impl/ProductionScheduleServiceImpl.java

@@ -136,8 +136,8 @@ public class ProductionScheduleServiceImpl implements ProductionScheduleService
                         .withSolutionClass(ApsSolution.class)
                         .withEntityClasses(ProductionProcesses.class, Equipment.class)
                         .withConstraintProviderClass(ApsConstraintListProvider.class)
-//                        .withTerminationConfig(new TerminationConfig().withUnimprovedSecondsSpentLimit(60L))
-                    .withTerminationSpentLimit(Duration.ofSeconds(180))
+                        .withTerminationConfig(new TerminationConfig().withUnimprovedSecondsSpentLimit(90L))
+//                    .withTerminationSpentLimit(Duration.ofSeconds(180))
                         .withMoveThreadCount(cores)
         );
         Solver<ApsSolution> solver = solverFactory.buildSolver();