|
@@ -91,6 +91,16 @@ public class ApsServiceImpl implements ApsService {
|
|
|
}else{
|
|
|
apsOverallConfig.setStartTime(process.getApsOverallConfig().getStartTime().plusMinutes(totaltime));
|
|
|
}
|
|
|
+
|
|
|
+ LocalDateTime proStartTime = apsOverallConfig.getStartTime();
|
|
|
+ if(proStartTime.getSecond()>0 || proStartTime.getMinute()>0){
|
|
|
+ proStartTime = proStartTime.minusSeconds(proStartTime.getSecond()) // 减去当前秒数
|
|
|
+ .minusNanos(proStartTime.getNano()) // 减去当前纳秒数
|
|
|
+ .plusMinutes(-proStartTime.getMinute() % 60) // 减去当前分钟数的余数,向下调整到最近的10的倍数
|
|
|
+ .plusMinutes(60);
|
|
|
+ }
|
|
|
+ apsOverallConfig.setStartTime(proStartTime);
|
|
|
+
|
|
|
// 开始时间设置
|
|
|
process.setApsOverallConfig(apsOverallConfig);
|
|
|
// 最大开始时间设置
|
|
@@ -363,7 +373,7 @@ public class ApsServiceImpl implements ApsService {
|
|
|
.withEntityClasses(ProductionProcesses.class)
|
|
|
.withConstraintProviderClass(ApsConstraintProvider.class)
|
|
|
// .withTerminationSpentLimit(Duration.ofSeconds(runPlanSeconds1))
|
|
|
- .withTerminationConfig(new TerminationConfig().withUnimprovedSecondsSpentLimit(60L))
|
|
|
+ .withTerminationConfig(new TerminationConfig().withUnimprovedSecondsSpentLimit(30L))
|
|
|
.withMoveThreadCount(cores)
|
|
|
);
|
|
|
Solver<ApsSolution> solver1 = solverFactory1.buildSolver();
|
|
@@ -506,7 +516,7 @@ public class ApsServiceImpl implements ApsService {
|
|
|
for (ProductionProcesses process : solvedBalance1.getProcessesList()) {
|
|
|
// 判断是否和历史数据合炉
|
|
|
boolean mergeHisTh = false;
|
|
|
- List<EquipmentRunTime> equipmentRunTimes = process.getEquipment().getEquipmentRunTimes();
|
|
|
+ /*List<EquipmentRunTime> equipmentRunTimes = process.getEquipment().getEquipmentRunTimes();
|
|
|
if(equipmentRunTimes != null && equipmentRunTimes.size()>0){
|
|
|
for (EquipmentRunTime equipmentRunTime : equipmentRunTimes) {
|
|
|
if(equipmentRunTime.getStartRunTime().compareTo(process.getStartTime()) == 0){
|
|
@@ -514,7 +524,7 @@ public class ApsServiceImpl implements ApsService {
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
+ }*/
|
|
|
// 未和历史数据合炉的不需要锁定当前设备当前时间
|
|
|
if(!mergeHisTh){
|
|
|
String thkey = process.getEquipment().getId() + format.format(process.getStartTime());
|
|
@@ -2741,7 +2751,7 @@ public class ApsServiceImpl implements ApsService {
|
|
|
.withEntityClasses(ProductionProcesses.class)
|
|
|
.withConstraintProviderClass(ApsConstraintProvider.class)
|
|
|
// .withTerminationSpentLimit(Duration.ofSeconds(runPlanSeconds1))
|
|
|
- .withTerminationConfig(new TerminationConfig().withUnimprovedSecondsSpentLimit(120L))
|
|
|
+ .withTerminationConfig(new TerminationConfig().withUnimprovedSecondsSpentLimit(60L))
|
|
|
.withMoveThreadCount(cores)
|
|
|
);
|
|
|
Solver<ApsSolution> solver1 = solverFactory1.buildSolver();
|