|
@@ -236,6 +236,10 @@ public class ApsServiceImpl implements ApsService {
|
|
|
if(thps.get(i).getProcessType().equals("小卷成退")){
|
|
|
thps.get(0).setMinThPcNum(thps.get(0).getMinThPcNum()+thps.get(i).getMinThPcNum());
|
|
|
}
|
|
|
+ // 排程排序字段重新设置,取最小的排序字段值
|
|
|
+ if(thps.get(i).getOrderMark()<thps.get(0).getOrderMark()){
|
|
|
+ thps.get(0).setOrderMark(thps.get(i).getOrderMark());
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
// 取第一个作业作为合并作业
|
|
@@ -243,6 +247,12 @@ public class ApsServiceImpl implements ApsService {
|
|
|
mergePro.setVolumeWidth(mergePro.getVolumeWidth().multiply(new BigDecimal(thps.size())));
|
|
|
mergePro.setSinglerollweight(mergePro.getSinglerollweight().multiply(new BigDecimal(thps.size())));
|
|
|
mergePro.setOpeProducePcNum(thps.size());
|
|
|
+
|
|
|
+ // 重新设置前道工序的排序字段值
|
|
|
+ Map<String,Integer> sortMap = new HashMap<>();
|
|
|
+ sortMap.put("sortInt",mergePro.getOrderMark());
|
|
|
+ setPreOrderMark(mergePro.getPreviousProcesses(),sortMap);
|
|
|
+
|
|
|
}
|
|
|
});
|
|
|
// 过滤被合并的退火作业
|
|
@@ -257,12 +267,29 @@ public class ApsServiceImpl implements ApsService {
|
|
|
}
|
|
|
return a;
|
|
|
}).collect(Collectors.toList());
|
|
|
+ mThs.sort(Comparator.comparing(ProductionProcesses::getOrderMark));
|
|
|
apsSolution.setProcessesList(mThs);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ private void setPreOrderMark(List<ProductionProcesses> pres,Map<String,Integer> sortMap){
|
|
|
+ List<ProductionProcesses> prepres = new ArrayList<>();
|
|
|
+ if(pres != null && pres.size()>0){
|
|
|
+ for (ProductionProcesses pre : pres) {
|
|
|
+ sortMap.put("sortInt",sortMap.get("sortInt")-1);
|
|
|
+ pre.setOrderMark(sortMap.get("sortInt"));
|
|
|
+ if(pre.getPreviousProcesses() != null && pre.getPreviousProcesses().size()>0){
|
|
|
+ prepres.addAll(pre.getPreviousProcesses());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(prepres != null && prepres.size()>0){
|
|
|
+ setPreOrderMark(prepres,sortMap);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 获取所有前道工序的时间总和
|
|
|
* @param process
|
|
@@ -1698,7 +1725,7 @@ public class ApsServiceImpl implements ApsService {
|
|
|
List<ProductionProcesses> otherThproces = new ArrayList<>();
|
|
|
// 铸轧提前排序
|
|
|
int processNum1 = apsSolutionZz.getProcessesList().size();
|
|
|
- int runPlanSeconds1 = (processNum1)*10;
|
|
|
+ int runPlanSeconds1 = (processNum1)*30;
|
|
|
// CPU核数
|
|
|
String cores = Runtime.getRuntime().availableProcessors() + "";
|
|
|
SolverFactory<ApsSolution> solverFactory1 = SolverFactory.create(new SolverConfig()
|