From 8ef2bb5e46d84594e6ed632c07ea0b47a1bf6c4d Mon Sep 17 00:00:00 2001 From: Junjie <540245094@qq.com> Date: 星期三, 11 十二月 2024 16:15:17 +0800 Subject: [PATCH] #path similarity --- zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/kernel/AnalyzeService.java | 89 +++++++++++++++++++++++++++++++------------- 1 files changed, 62 insertions(+), 27 deletions(-) diff --git a/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/kernel/AnalyzeService.java b/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/kernel/AnalyzeService.java index 0f11234..22a654f 100644 --- a/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/kernel/AnalyzeService.java +++ b/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/kernel/AnalyzeService.java @@ -170,7 +170,7 @@ dto.setLev(Utils.getLev(task.getDestLoc())); dto.setStaNo(getStaByLev(Utils.getLev(task.getDestLoc()))); dto.setDevpNo(basConveyorStaDest.getConveyorDeviceId().intValue()); -// dto.setSync();//寮傛鎵ц + dto.setReleaseLift(1);//鎵ц瀹屾垚鍚庨噴鏀炬彁鍗囨満 })) )); @@ -182,6 +182,7 @@ })), MotionDto.build((dto -> { dto.setShuttleNo(shuttleDevice.getId().intValue()); + dto.setShuttleDevice(shuttleDevice); dto.setLocNo(standbyLocNoTo); })), MotionCtgType.SHUTTLE_MOVE @@ -204,9 +205,10 @@ })), MotionDto.build((dto -> { dto.setShuttleNo(shuttleDevice.getId().intValue()); + dto.setShuttleDevice(shuttleDevice); dto.setLiftNo(transferLiftDevice.getId().intValue()); dto.setLocNo(destLoc); - dto.setReleaseLift(2);//鎵ц涓噴鏀炬彁鍗囨満 +// dto.setReleaseLift(2);//鎵ц涓噴鏀炬彁鍗囨満 })), MotionCtgType.SHUTTLE_TRANSPORT )); @@ -237,6 +239,7 @@ dto.setLev(Utils.getLev(task.getDestLoc())); dto.setStaNo(getStaByLev(Utils.getLev(task.getDestLoc()))); dto.setDevpNo(basConveyorStaDest.getConveyorDeviceId().intValue()); + dto.setReleaseLift(1);//鎵ц瀹屾垚鍚庨噴鏀炬彁鍗囨満 })) )); @@ -248,6 +251,7 @@ })), MotionDto.build((dto -> { dto.setShuttleNo(shuttleDevice.getId().intValue()); + dto.setShuttleDevice(shuttleDevice); dto.setLiftNo(transferLiftDevice.getId().intValue()); dto.setLocNo(standbyLocNoTo); })), @@ -288,6 +292,7 @@ })), MotionDto.build((dto -> { dto.setShuttleNo(shuttleDevice.getId().intValue()); + dto.setShuttleDevice(shuttleDevice); dto.setLiftNo(transferLiftDevice.getId().intValue()); dto.setLocNo(liftLocNoTo); })), @@ -340,6 +345,7 @@ })), MotionDto.build((dto -> { dto.setShuttleNo(shuttleDevice.getId().intValue()); + dto.setShuttleDevice(shuttleDevice); dto.setLocNo(standbyLocNoFrom); })), MotionCtgType.SHUTTLE_MOVE_FROM_LIFT @@ -380,9 +386,9 @@ })), MotionDto.build((dto -> { dto.setShuttleNo(shuttleDevice.getId().intValue()); + dto.setShuttleDevice(shuttleDevice); dto.setLiftNo(transferLiftDevice.getId().intValue()); dto.setLocNo(destLoc); - dto.setReleaseLift(2);//鎵ц涓噴鏀炬彁鍗囨満 })), MotionCtgType.SHUTTLE_TRANSPORT )); @@ -521,6 +527,7 @@ })), MotionDto.build((dto -> { dto.setShuttleNo(shuttleDevice.getId().intValue()); + dto.setShuttleDevice(shuttleDevice); dto.setLocNo(originLoc); })), MotionCtgType.SHUTTLE_MOVE @@ -536,18 +543,21 @@ MotionCtgType.SHUTTLE_PALLET_LIFT )); - // 绌挎杞﹁浇璐у嚭搴撹嚦鏈�鍚庝竴娈佃矾寰勭瓑寰� - motionList.addAll(kernelService.shuttleMove( - MotionDto.build((dto -> { - dto.setShuttleNo(shuttleDevice.getId().intValue()); - dto.setLocNo(originLoc); - })), - MotionDto.build((dto -> { - dto.setShuttleNo(shuttleDevice.getId().intValue()); - dto.setLocNo(lastPathStartLoc); - })), - MotionCtgType.SHUTTLE_TRANSPORT - )); + if (!originLoc.equals(lastPathStartLoc)) { + // 绌挎杞﹁浇璐у嚭搴撹嚦鏈�鍚庝竴娈佃矾寰勭瓑寰� + motionList.addAll(kernelService.shuttleMove( + MotionDto.build((dto -> { + dto.setShuttleNo(shuttleDevice.getId().intValue()); + dto.setLocNo(originLoc); + })), + MotionDto.build((dto -> { + dto.setShuttleNo(shuttleDevice.getId().intValue()); + dto.setShuttleDevice(shuttleDevice); + dto.setLocNo(lastPathStartLoc); + })), + MotionCtgType.SHUTTLE_TRANSPORT + )); + } // 绌挎杞﹁浇璐ц嚦鎻愬崌鏈哄緟鏈轰綅 motionList.addAll(kernelService.shuttleMove( @@ -557,6 +567,7 @@ })), MotionDto.build((dto -> { dto.setShuttleNo(shuttleDevice.getId().intValue()); + dto.setShuttleDevice(shuttleDevice); dto.setLiftNo(transferLiftDevice.getId().intValue()); dto.setLocNo(standbyLocNoTo); dto.setStaNo(getStaByLev(Utils.getLev(task.getOriginLoc())));//杈撻�佺珯 @@ -581,6 +592,7 @@ })), MotionDto.build((dto -> { dto.setShuttleNo(shuttleDevice.getId().intValue()); + dto.setShuttleDevice(shuttleDevice); dto.setLocNo(standbyLocs); dto.setSync(0);//寮傛鎵ц dto.setReleaseShuttle(1);//鎵ц瀹屾垚鍚庨噴鏀惧皬杞� @@ -630,6 +642,7 @@ })), MotionDto.build((dto -> { dto.setShuttleNo(shuttleDevice.getId().intValue()); + dto.setShuttleDevice(shuttleDevice); dto.setLiftNo(transferLiftDevice.getId().intValue()); dto.setLocNo(standbyLocNoTo); })), @@ -670,6 +683,7 @@ })), MotionDto.build((dto -> { dto.setShuttleNo(shuttleDevice.getId().intValue()); + dto.setShuttleDevice(shuttleDevice); dto.setLiftNo(transferLiftDevice.getId().intValue()); dto.setLocNo(liftLocNoTo); })), @@ -722,6 +736,7 @@ })), MotionDto.build((dto -> { dto.setShuttleNo(shuttleDevice.getId().intValue()); + dto.setShuttleDevice(shuttleDevice); dto.setLocNo(standbyLocNoFrom); })), MotionCtgType.SHUTTLE_MOVE_FROM_LIFT @@ -754,6 +769,7 @@ })), MotionDto.build((dto -> { dto.setShuttleNo(shuttleDevice.getId().intValue()); + dto.setShuttleDevice(shuttleDevice); dto.setLocNo(originLoc); })), MotionCtgType.SHUTTLE_MOVE @@ -768,18 +784,21 @@ MotionCtgType.SHUTTLE_PALLET_LIFT )); - // 绌挎杞﹁浇璐у嚭搴撹嚦鏈�鍚庝竴娈佃矾寰勭瓑寰� - motionList.addAll(kernelService.shuttleMove( - MotionDto.build((dto -> { - dto.setShuttleNo(shuttleDevice.getId().intValue()); - dto.setLocNo(originLoc); - })), - MotionDto.build((dto -> { - dto.setShuttleNo(shuttleDevice.getId().intValue()); - dto.setLocNo(lastPathStartLoc); - })), - MotionCtgType.SHUTTLE_TRANSPORT - )); + if (!originLoc.equals(lastPathStartLoc)) { + // 绌挎杞﹁浇璐у嚭搴撹嚦鏈�鍚庝竴娈佃矾寰勭瓑寰� + motionList.addAll(kernelService.shuttleMove( + MotionDto.build((dto -> { + dto.setShuttleNo(shuttleDevice.getId().intValue()); + dto.setLocNo(originLoc); + })), + MotionDto.build((dto -> { + dto.setShuttleNo(shuttleDevice.getId().intValue()); + dto.setShuttleDevice(shuttleDevice); + dto.setLocNo(lastPathStartLoc); + })), + MotionCtgType.SHUTTLE_TRANSPORT + )); + } // 绌挎杞﹁浇璐ц嚦鎻愬崌鏈哄緟鏈轰綅 motionList.addAll(kernelService.shuttleMove( @@ -789,6 +808,7 @@ })), MotionDto.build((dto -> { dto.setShuttleNo(shuttleDevice.getId().intValue()); + dto.setShuttleDevice(shuttleDevice); dto.setLiftNo(transferLiftDevice.getId().intValue()); dto.setLocNo(standbyLocNoFrom); dto.setStaNo(getStaByLev(Utils.getLev(task.getOriginLoc())));//杈撻�佺珯 @@ -813,6 +833,7 @@ })), MotionDto.build((dto -> { dto.setShuttleNo(shuttleDevice.getId().intValue()); + dto.setShuttleDevice(shuttleDevice); dto.setLocNo(standbyLocs); dto.setSync(0);//寮傛鎵ц dto.setReleaseShuttle(1);//鎵ц瀹屾垚鍚庨噴鏀惧皬杞� @@ -946,6 +967,7 @@ })), MotionDto.build((dto -> { dto.setShuttleNo(shuttleDevice.getId().intValue()); + dto.setShuttleDevice(shuttleDevice); dto.setLocNo(chargeLocNo); })), MotionCtgType.SHUTTLE_MOVE @@ -961,6 +983,7 @@ })), MotionDto.build((dto -> { dto.setShuttleNo(shuttleDevice.getId().intValue()); + dto.setShuttleDevice(shuttleDevice); dto.setLocNo(standbyLocNoTo); })), MotionCtgType.SHUTTLE_MOVE @@ -991,6 +1014,7 @@ })), MotionDto.build((dto -> { dto.setShuttleNo(shuttleDevice.getId().intValue()); + dto.setShuttleDevice(shuttleDevice); dto.setLiftNo(transferLiftDevice.getId().intValue()); dto.setLocNo(liftLocNoTo); })), @@ -1043,6 +1067,7 @@ })), MotionDto.build((dto -> { dto.setShuttleNo(shuttleDevice.getId().intValue()); + dto.setShuttleDevice(shuttleDevice); dto.setLocNo(standbyLocNoFrom); })), MotionCtgType.SHUTTLE_MOVE_FROM_LIFT @@ -1064,6 +1089,7 @@ })), MotionDto.build((dto -> { dto.setShuttleNo(shuttleDevice.getId().intValue()); + dto.setShuttleDevice(shuttleDevice); dto.setLocNo(chargeLocNo); })), MotionCtgType.SHUTTLE_MOVE @@ -1132,6 +1158,7 @@ })), MotionDto.build((dto -> { dto.setShuttleNo(shuttleDevice.getId().intValue()); + dto.setShuttleDevice(shuttleDevice); dto.setLocNo(locNo); })), MotionCtgType.SHUTTLE_MOVE @@ -1186,6 +1213,7 @@ })), MotionDto.build((dto -> { dto.setShuttleNo(shuttleDevice.getId().intValue()); + dto.setShuttleDevice(shuttleDevice); dto.setLocNo(locNo); })), MotionCtgType.SHUTTLE_MOVE @@ -1226,6 +1254,7 @@ })), MotionDto.build((dto -> { dto.setShuttleNo(shuttleDevice.getId().intValue()); + dto.setShuttleDevice(shuttleDevice); dto.setLiftNo(liftDevice.getId().intValue()); dto.setLocNo(standbyLocNoTo); })), @@ -1266,6 +1295,7 @@ })), MotionDto.build((dto -> { dto.setShuttleNo(shuttleDevice.getId().intValue()); + dto.setShuttleDevice(shuttleDevice); dto.setLiftNo(liftDevice.getId().intValue()); dto.setLocNo(liftLocNoTo); })), @@ -1318,6 +1348,7 @@ })), MotionDto.build((dto -> { dto.setShuttleNo(shuttleDevice.getId().intValue()); + dto.setShuttleDevice(shuttleDevice); dto.setLocNo(standbyLocNoFrom); })), MotionCtgType.SHUTTLE_MOVE_FROM_LIFT @@ -1349,6 +1380,7 @@ })), MotionDto.build((dto -> { dto.setShuttleNo(shuttleDevice.getId().intValue()); + dto.setShuttleDevice(shuttleDevice); dto.setLocNo(locNo); })), MotionCtgType.SHUTTLE_MOVE @@ -1404,6 +1436,7 @@ })), MotionDto.build((dto -> { dto.setShuttleNo(device.getId().intValue()); + dto.setShuttleDevice(device); dto.setLocNo(targetLoc); })), MotionCtgType.SHUTTLE_MOVE @@ -1456,6 +1489,7 @@ })), MotionDto.build((dto -> { dto.setShuttleNo(device.getId().intValue()); + dto.setShuttleDevice(device); dto.setLocNo(sourceLoc); })), MotionCtgType.SHUTTLE_MOVE @@ -1477,6 +1511,7 @@ })), MotionDto.build((dto -> { dto.setShuttleNo(device.getId().intValue()); + dto.setShuttleDevice(device); dto.setLocNo(targetLoc); })), MotionCtgType.SHUTTLE_TRANSPORT -- Gitblit v1.9.1