|
@@ -225,6 +225,9 @@ public class ApsConstraintProvider implements ConstraintProvider {
|
|
|
private Constraint nextLockProNew(ConstraintFactory constraintFactory) {
|
|
|
return constraintFactory.forEach(ProductionProcesses.class)
|
|
|
.filter(productionProcesses -> {
|
|
|
+ if(productionProcesses.getId().equals("d6ea246661804ca5982b81b9a691a34e")){
|
|
|
+ int a1 = 0;
|
|
|
+ }
|
|
|
boolean bln = false;
|
|
|
List<ProductionProcesses> nextProcesses = productionProcesses.getNextProcesses();
|
|
|
if(nextProcesses != null && nextProcesses.size()>0){
|
|
@@ -1540,6 +1543,16 @@ public class ApsConstraintProvider implements ConstraintProvider {
|
|
|
if(processes.get(0).getApsOverallConfig().getFurnacedifference() != null && processes.get(0).getApsOverallConfig().getFurnacedifference()>0){
|
|
|
ctkc = new BigDecimal(processes.get(0).getApsOverallConfig().getFurnacedifference());
|
|
|
}
|
|
|
+ // 读取配置中的卷重差
|
|
|
+ BigDecimal ztjzc = new BigDecimal("4");
|
|
|
+ BigDecimal ctjzc = new BigDecimal("2");
|
|
|
+ if(processes.get(0).getApsOverallConfig().getWeightdifference() != null){
|
|
|
+ ztjzc = processes.get(0).getApsOverallConfig().getWeightdifference();
|
|
|
+ }
|
|
|
+ if(processes.get(0).getApsOverallConfig().getMidweightdifference() != null){
|
|
|
+ ctjzc = processes.get(0).getApsOverallConfig().getMidweightdifference();
|
|
|
+ }
|
|
|
+
|
|
|
BigDecimal zthc = new BigDecimal("0.05");
|
|
|
BigDecimal cthc = new BigDecimal("0.05");
|
|
|
List<ApsAnnealingDifferenceDo> apsAnnealingDifferences = processes.get(0).getApsOverallConfig().getApsAnnealingDifferences();
|
|
@@ -1577,11 +1590,11 @@ public class ApsConstraintProvider implements ConstraintProvider {
|
|
|
if("成退".equals(processType)){
|
|
|
btVolumeWidth = ctkc;
|
|
|
btVolumeThickness = cthc;
|
|
|
- btSinglerollweight = new BigDecimal("1");
|
|
|
+ btSinglerollweight = ctjzc;
|
|
|
}else if ("中退".equals(processType)){
|
|
|
btVolumeWidth = ztkc;
|
|
|
btVolumeThickness = zthc;
|
|
|
- btSinglerollweight = new BigDecimal("1");
|
|
|
+ btSinglerollweight = ztjzc;
|
|
|
}
|
|
|
if(maxVolumeWidth.subtract(minVolumeWidth).compareTo(btVolumeWidth)>0 || maxVolumeThickness.subtract(minVolumeThickness).compareTo(btVolumeThickness)>0
|
|
|
|| maxSinglerollweight.subtract(minSinglerollweight).compareTo(btSinglerollweight)>0){
|
|
@@ -1906,6 +1919,10 @@ public class ApsConstraintProvider implements ConstraintProvider {
|
|
|
if("铸轧".equals(hasStartTimeProcess.get(i).getProcessType())){
|
|
|
String[] serspre = hasStartTimeProcess.get(i).getSeriesProduceMark().split("\\^_\\^");
|
|
|
String[] sersafter = hasStartTimeProcess.get(i+1).getSeriesProduceMark().split("\\^_\\^");
|
|
|
+ // 获取产品类型二级
|
|
|
+ String bfcplx = serspre[1].split("-")[0];
|
|
|
+ // 获取产品类型二级
|
|
|
+ String afcplx = sersafter[1].split("-")[0];
|
|
|
if(serspre.length == 5 && sersafter.length == 5){
|
|
|
// 铸轧换辊兼容规则
|
|
|
if(!zzSeriesJr(hasStartTimeProcess.get(i),hasStartTimeProcess.get(i+1),apsNochangeRollerDos)){
|
|
@@ -1938,6 +1955,16 @@ public class ApsConstraintProvider implements ConstraintProvider {
|
|
|
}else{
|
|
|
conflictRoptions2.put("soft-seriesProduceZz","和前一道工序违反立板的连续约束");
|
|
|
}
|
|
|
+ }else{
|
|
|
+ // 二级产品类型不一样的也需要立板
|
|
|
+ if(!bfcplx.equals(afcplx)){
|
|
|
+ b = b+8;
|
|
|
+ if(hasStartTimeProcess.get(i).getId() != null){
|
|
|
+ conflictRoptions1.put("soft-seriesProduceZz",conflictRoptions1.get("soft-seriesProduceZz") == null ? "和后一道工序违反立板的连续约束" : conflictRoptions1.get("soft-seriesProduceZz")+";和后一道工序违反立板的连续约束");
|
|
|
+ }else{
|
|
|
+ conflictRoptions2.put("soft-seriesProduceZz","和前一道工序违反立板的连续约束");
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}catch (Exception e){
|
|
|
e.printStackTrace();
|