|
@@ -892,7 +892,7 @@ public class ApsConstraintProvider implements ConstraintProvider {
|
|
|
equipment = processes.get(0).getEquipment();
|
|
|
apsNochangeRollerDos = processes.get(0).getApsOverallConfig().getApsNochangeRollerDos();
|
|
|
}
|
|
|
- if(processes.size() == 7){
|
|
|
+ if(processes.size() == 1 && processes.get(0).getId().equals("f391376a40da481ab92e219a6a933a9b") && processes.get(0).getDelay() == 47 && equipment.getId().equals("0001be252874536843730b100151")){
|
|
|
int a = 0;
|
|
|
}
|
|
|
List<ProductionProcesses> hasStartTimeProcess = processes.stream().filter(v -> v.getStartTime() != null).collect(Collectors.toList());
|
|
@@ -911,6 +911,7 @@ public class ApsConstraintProvider implements ConstraintProvider {
|
|
|
pp.setProduceTime(equipmentRunTime.getOnceprocessmin());
|
|
|
pp.setSinglerollweight(equipmentRunTime.getTotalSinglerollweight());
|
|
|
pp.setLastSerialLbWeight(equipmentRunTime.getLastSerialLbWeight());
|
|
|
+ pp.setProZg(equipmentRunTime.getZjgid());
|
|
|
hasStartTimeProcess.add(pp);
|
|
|
}
|
|
|
}
|
|
@@ -927,6 +928,7 @@ public class ApsConstraintProvider implements ConstraintProvider {
|
|
|
pp.setProduceTime(equipment.getOnceprocessmin());
|
|
|
pp.setConflictRoptions(new HashMap<>());
|
|
|
pp.setLastSerialLbWeight(equipment.getLastSerialLbWeight());
|
|
|
+ pp.setProZg(equipment.getLastZjgid());
|
|
|
hasStartTimeProcess.add(0,pp);
|
|
|
}
|
|
|
for(int i=0;i<hasStartTimeProcess.size()-1;i++){
|
|
@@ -1015,11 +1017,22 @@ public class ApsConstraintProvider implements ConstraintProvider {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- } else if ("冷轧".equals(hasStartTimeProcess.get(i).getProcessType())) {
|
|
|
+ } else if ("冷轧".equals(hasStartTimeProcess.get(i).getProcessType()) || "箔轧".equals(hasStartTimeProcess.get(i).getProcessType())) {
|
|
|
+ ProductionProcesses prepro = hasStartTimeProcess.get(i);
|
|
|
+ ProductionProcesses nextpro = hasStartTimeProcess.get(i+1);
|
|
|
String[] serspre = hasStartTimeProcess.get(i).getSeriesProduceMark().split("\\^_\\^");
|
|
|
String[] sersafter = hasStartTimeProcess.get(i+1).getSeriesProduceMark().split("\\^_\\^");
|
|
|
- if(serspre.length == 5 && sersafter.length == 5){
|
|
|
- if(!serspre[0].equals(sersafter[0]) || !serspre[1].equals(sersafter[1])){
|
|
|
+ // 前道工序宽度、输入物料厚度、输出物料厚度
|
|
|
+ String s1 = serspre[2];
|
|
|
+ // 后道工序宽度、输入物料厚度、输出物料厚度
|
|
|
+ String s2 = sersafter[2];
|
|
|
+ BigDecimal i1 = new BigDecimal(s1);
|
|
|
+ BigDecimal i2 = new BigDecimal(s2);
|
|
|
+ // 前后道所属作业ID
|
|
|
+ if(StrUtil.isNotBlank(prepro.getProZg()) && StrUtil.isNotBlank(nextpro.getProZg())){
|
|
|
+ String preZg = prepro.getProZg();
|
|
|
+ String nextZg = nextpro.getProZg();
|
|
|
+ if(!preZg.equals(nextZg)){
|
|
|
if(hasStartTimeProcess.get(i).getEndTime().plusMinutes(hasStartTimeProcess.get(i).getCutfinishmin())
|
|
|
.plusMinutes(hasStartTimeProcess.get(i+1).getPrepressworkmin()).compareTo(hasStartTimeProcess.get(i+1).getStartTime())>0){
|
|
|
b++;
|
|
@@ -1027,11 +1040,19 @@ public class ApsConstraintProvider implements ConstraintProvider {
|
|
|
conflictRoptions2.put("hard-seriesProduceTimeWait","和上道工序没有预留足够的上机准备时间和下机收尾时间");
|
|
|
}
|
|
|
}else{
|
|
|
- String s1 = serspre[2];
|
|
|
- String s2 = sersafter[2];
|
|
|
+ if(i1.compareTo(i2)<0){
|
|
|
+ if(hasStartTimeProcess.get(i).getEndTime().plusMinutes(hasStartTimeProcess.get(i).getCutfinishmin())
|
|
|
+ .plusMinutes(hasStartTimeProcess.get(i+1).getPrepressworkmin()).compareTo(hasStartTimeProcess.get(i+1).getStartTime())>0){
|
|
|
+ b++;
|
|
|
+ conflictRoptions1.put("hard-seriesProduceTimeWait","和下道工序没有预留足够的上机准备时间和下机收尾时间");
|
|
|
+ conflictRoptions2.put("hard-seriesProduceTimeWait","和上道工序没有预留足够的上机准备时间和下机收尾时间");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ if(serspre.length == 5 && sersafter.length == 5){
|
|
|
try{
|
|
|
- BigDecimal i1 = new BigDecimal(s1);
|
|
|
- BigDecimal i2 = new BigDecimal(s2);
|
|
|
+ // 后端工序大于前道工序,并且大于30mm
|
|
|
if(i1.compareTo(i2)<0){
|
|
|
if(hasStartTimeProcess.get(i).getEndTime().plusMinutes(hasStartTimeProcess.get(i).getCutfinishmin())
|
|
|
.plusMinutes(hasStartTimeProcess.get(i+1).getPrepressworkmin()).compareTo(hasStartTimeProcess.get(i+1).getStartTime())>0){
|
|
@@ -1039,34 +1060,21 @@ public class ApsConstraintProvider implements ConstraintProvider {
|
|
|
conflictRoptions1.put("hard-seriesProduceTimeWait","和下道工序没有预留足够的上机准备时间和下机收尾时间");
|
|
|
conflictRoptions2.put("hard-seriesProduceTimeWait","和上道工序没有预留足够的上机准备时间和下机收尾时间");
|
|
|
}
|
|
|
+ }else{
|
|
|
+ if(!serspre[1].equals(sersafter[1])){
|
|
|
+ if(hasStartTimeProcess.get(i).getEndTime().plusMinutes(hasStartTimeProcess.get(i).getCutfinishmin())
|
|
|
+ .plusMinutes(hasStartTimeProcess.get(i+1).getPrepressworkmin()).compareTo(hasStartTimeProcess.get(i+1).getStartTime())>0){
|
|
|
+ b++;
|
|
|
+ conflictRoptions1.put("hard-seriesProduceTimeWait","和下道工序没有预留足够的上机准备时间和下机收尾时间");
|
|
|
+ conflictRoptions2.put("hard-seriesProduceTimeWait","和上道工序没有预留足够的上机准备时间和下机收尾时间");
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}catch (Exception e){
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- }else if ("箔轧".equals(hasStartTimeProcess.get(i).getProcessType())) {
|
|
|
- // 宽度从大到小
|
|
|
- String[] serspre = hasStartTimeProcess.get(i).getSeriesProduceMark().split("\\^_\\^");
|
|
|
- String[] sersafter = hasStartTimeProcess.get(i+1).getSeriesProduceMark().split("\\^_\\^");
|
|
|
- if(serspre.length == 5 && sersafter.length == 5){
|
|
|
- String s1 = serspre[2];
|
|
|
- String s2 = sersafter[2];
|
|
|
- try {
|
|
|
- BigDecimal volumeWidth = new BigDecimal(s1);
|
|
|
- BigDecimal volumeWidth1 = new BigDecimal(s2);
|
|
|
- if(volumeWidth.compareTo(volumeWidth1)<0){
|
|
|
- if(hasStartTimeProcess.get(i).getEndTime().plusMinutes(hasStartTimeProcess.get(i).getCutfinishmin())
|
|
|
- .plusMinutes(hasStartTimeProcess.get(i+1).getPrepressworkmin()).compareTo(hasStartTimeProcess.get(i+1).getStartTime())>0){
|
|
|
- b++;
|
|
|
- conflictRoptions1.put("hard-seriesProduceTimeWait","和下道工序没有预留足够的上机准备时间和下机收尾时间");
|
|
|
- conflictRoptions2.put("hard-seriesProduceTimeWait","和上道工序没有预留足够的上机准备时间和下机收尾时间");
|
|
|
- }
|
|
|
- }
|
|
|
- }catch (Exception e){
|
|
|
- e.printStackTrace();
|
|
|
- }
|
|
|
- }
|
|
|
}
|
|
|
}
|
|
|
}
|