From 25b1f6699b46bb9413b8c6b98f32c20aa60394fd Mon Sep 17 00:00:00 2001
From: Junjie <xjj@123>
Date: 星期二, 03 十二月 2024 16:01:13 +0800
Subject: [PATCH] #算法优化

---
 zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/kernel/AnalyzeService.java |   56 +++++++++++++++++++++++++++++++-------------------------
 1 files changed, 31 insertions(+), 25 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 fbad661..6660003 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);//鎵ц瀹屾垚鍚庨噴鏀炬彁鍗囨満
                         }))
                 ));
 
@@ -206,6 +206,7 @@
                             dto.setShuttleNo(shuttleDevice.getId().intValue());
                             dto.setLiftNo(transferLiftDevice.getId().intValue());
                             dto.setLocNo(destLoc);
+//                            dto.setReleaseLift(2);//鎵ц涓噴鏀炬彁鍗囨満
                         })),
                         MotionCtgType.SHUTTLE_TRANSPORT
                 ));
@@ -236,6 +237,7 @@
                             dto.setLev(Utils.getLev(task.getDestLoc()));
                             dto.setStaNo(getStaByLev(Utils.getLev(task.getDestLoc())));
                             dto.setDevpNo(basConveyorStaDest.getConveyorDeviceId().intValue());
+                            dto.setReleaseLift(1);//鎵ц瀹屾垚鍚庨噴鏀炬彁鍗囨満
                         }))
                 ));
 
@@ -534,18 +536,20 @@
                         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.setLocNo(lastPathStartLoc);
+                            })),
+                            MotionCtgType.SHUTTLE_TRANSPORT
+                    ));
+                }
 
                 // 绌挎杞﹁浇璐ц嚦鎻愬崌鏈哄緟鏈轰綅
                 motionList.addAll(kernelService.shuttleMove(
@@ -766,18 +770,20 @@
                         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.setLocNo(lastPathStartLoc);
+                            })),
+                            MotionCtgType.SHUTTLE_TRANSPORT
+                    ));
+                }
 
                 // 绌挎杞﹁浇璐ц嚦鎻愬崌鏈哄緟鏈轰綅
                 motionList.addAll(kernelService.shuttleMove(

--
Gitblit v1.9.1