|
@@ -1223,7 +1223,8 @@ public class ApsServiceImpl implements ApsService {
|
|
|
if("否".equals(rootPro.getIssubsection()) && ("冷轧".equals(rootPro.getProcessType()) || "箔轧".equals(rootPro.getProcessType())) && !rootPro.getIfLock()){
|
|
|
// 是否连续冷轧、箔轧
|
|
|
boolean hasSeries = false;
|
|
|
- if(StrUtil.isNotBlank(seriesKey) && StrUtil.isNotBlank(protype) && protype.equals(rootPro.getProcessType())){
|
|
|
+ if(StrUtil.isNotBlank(seriesKey) && StrUtil.isNotBlank(protype) && protype.equals(rootPro.getProcessType())
|
|
|
+ && (rootPro.getMinWaitTime() == null || rootPro.getMinWaitTime()<=0)){
|
|
|
if(commonEqus != null && commonEqus.size()>0){
|
|
|
List<String> commonEqusNext = new ArrayList<>();
|
|
|
for (String optionalEquipment : rootPro.getOptionalEquipments()) {
|
|
@@ -1426,6 +1427,19 @@ public class ApsServiceImpl implements ApsService {
|
|
|
.withMoveThreadCount(cores)
|
|
|
);
|
|
|
Solver<ApsSolution> solver1 = solverFactory1.buildSolver();
|
|
|
+ solver1.addEventListener(new SolverEventListener<ApsSolution>() {
|
|
|
+ public void bestSolutionChanged(BestSolutionChangedEvent<ApsSolution> event) {
|
|
|
+ if(solver1.isEveryProblemChangeProcessed()) {
|
|
|
+ event.getNewBestSolution().setConstructionHeuristicEnd(true);
|
|
|
+ if(event.getNewBestSolution().getStepBestProcessesList() == null){
|
|
|
+
|
|
|
+ }
|
|
|
+ System.out.println("************"+event.getNewBestScore()+"************");
|
|
|
+ log.info("************"+event.getNewBestScore()+"************");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
ApsSolution solvedBalance1 = solver1.solve(apsSolutionZz);
|
|
|
log.info("**************铸轧排程评分分析***************");
|
|
|
SolutionManager<ApsSolution, HardSoftScore> scoreManager1 = SolutionManager.create(solverFactory1);
|