Ver Fonte

退火调度新模型排程优化

fangpengyuan há 3 meses atrás
pai
commit
d4170436aa

+ 6 - 3
rw-aps-server/src/main/java/com/rongwei/rwapsserver/aps/service/impl/DdApsServiceImpl.java

@@ -1186,6 +1186,8 @@ public class DdApsServiceImpl implements DdApsService {
                             // 合并退火作业
                             for(int j = 0;j < chunks.size();j++){
                                 List<ProductionProcesses> thps = chunks.get(j);
+                                // 取第一个作业作为合并作业
+                                ProductionProcesses mergePro = thps.get(0);
                                 for (int i = 0; i < thps.size(); i++) {
                                     if(i>0){
                                         // 设置待合并退火的主ID
@@ -1264,12 +1266,13 @@ public class DdApsServiceImpl implements DdApsService {
                                         if(thps.get(i).getProcessType().equals("小卷成退")){
                                             thps.get(0).setMinThPcNum(thps.get(0).getMinThPcNum()+thps.get(i).getMinThPcNum());
                                         }
+
+                                        mergePro.setTotalSinglerollweight(mergePro.getTotalSinglerollweight().add(thps.get(i).getTotalSinglerollweight()));
                                     }
                                 }
-                                // 取第一个作业作为合并作业
-                                ProductionProcesses mergePro = thps.get(0);
+
                                 mergePro.setTotalVolumeWidth(mergePro.getVolumeWidth().multiply(new BigDecimal(thps.size())));
-                                mergePro.setTotalSinglerollweight(mergePro.getTotalSinglerollweight().multiply(new BigDecimal(thps.size())));
+//                                mergePro.setTotalSinglerollweight(mergePro.getTotalSinglerollweight().multiply(new BigDecimal(thps.size())));
                                 mergePro.setOpeProducePcNum(thps.size());
                                 // 设置是否满炉
                                 if(thps.size() == a){

+ 3 - 3
rw-aps-server/src/main/java/com/rongwei/rwapsserver/aps/taskassigning/tado/TaskStartTimeListenerTa.java

@@ -397,12 +397,12 @@ public class TaskStartTimeListenerTa implements ListVariableListener<ApsSolution
                 BigDecimal totalWeight = null;
                 for (ProductionProcessesTa mergePro : mergePros) {
                     if(totalWeight == null){
-                        totalWeight = mergePro.getSinglerollweight();
+                        totalWeight = mergePro.getTotalSinglerollweight();
                     }else{
-                        totalWeight = totalWeight.add(mergePro.getSinglerollweight());
+                        totalWeight = totalWeight.add(mergePro.getTotalSinglerollweight());
                     }
                 }
-                totalWeight = totalWeight.add(process.getSinglerollweight());
+                totalWeight = totalWeight.add(process.getTotalSinglerollweight());
                 if(totalWeight.compareTo(equipmentTa.getEquipmentParameter().getEquipmentBearing())<=0 && process.getProcessType().equals(processbf.getProcessType())){
                     if(minThGroupNames.size() == 1){
                         hasMergeTh = true;