|
@@ -2,10 +2,7 @@ package com.rongwei.rwapsserver.aps;
|
|
|
|
|
|
import cn.hutool.core.date.DateUtil;
|
|
|
import cn.hutool.json.JSONUtil;
|
|
|
-import com.rongwei.rwapsserver.aps.domain.ApsSolution;
|
|
|
-import com.rongwei.rwapsserver.aps.domain.Equipment;
|
|
|
-import com.rongwei.rwapsserver.aps.domain.ProduceOrder;
|
|
|
-import com.rongwei.rwapsserver.aps.domain.ProductionProcesses;
|
|
|
+import com.rongwei.rwapsserver.aps.domain.*;
|
|
|
import com.rongwei.rwapsserver.aps.score.ApsConstraintProvider;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.optaplanner.core.api.score.buildin.hardsoft.HardSoftScore;
|
|
@@ -61,7 +58,7 @@ public class ApsBalancingApplication {
|
|
|
|
|
|
// System.out.println((int)Math.ceil((double) 3/2));
|
|
|
|
|
|
- Boolean a = true;
|
|
|
+ /*Boolean a = true;
|
|
|
while (a){
|
|
|
for (int i=0;i<10;i++){
|
|
|
if(i > 6){
|
|
@@ -70,7 +67,19 @@ public class ApsBalancingApplication {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- System.out.println("1111111");
|
|
|
+ System.out.println("1111111");*/
|
|
|
+ LocalDateTime now = LocalDateTime.now();
|
|
|
+ List<EquipmentRunTime> allRunTimes = new ArrayList<>();
|
|
|
+ EquipmentRunTime eq1 = new EquipmentRunTime();
|
|
|
+ eq1.setStartRunTime(now.plusMinutes(3));
|
|
|
+ EquipmentRunTime eq2 = new EquipmentRunTime();
|
|
|
+ eq2.setStartRunTime(now);
|
|
|
+ EquipmentRunTime eq3 = new EquipmentRunTime();
|
|
|
+ eq3.setStartRunTime(now.plusMinutes(1));
|
|
|
+ allRunTimes.add(eq1);allRunTimes.add(eq2);allRunTimes.add(eq3);
|
|
|
+ System.out.println(allRunTimes);
|
|
|
+ allRunTimes.sort(Comparator.comparing(EquipmentRunTime::getStartRunTime));
|
|
|
+ System.out.println(allRunTimes);
|
|
|
}
|
|
|
|
|
|
public static void testAps(){
|