From 7b79b23a277e68669476dc970ebf1139dfc896fe Mon Sep 17 00:00:00 2001
From: lsh <lsh@163.com>
Date: 星期三, 15 一月 2025 15:47:22 +0800
Subject: [PATCH] *

---
 src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java |   29 ++++++++++++++---------------
 src/main/resources/application.yml                          |    2 +-
 2 files changed, 15 insertions(+), 16 deletions(-)

diff --git a/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
index e590600..40d6c8c 100644
--- a/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -287,21 +287,20 @@
                             && rgvProtocol.getTaskNo1() == 0
                             && rgvProtocol.getAlarm() == 0) {
                         if (rgvProtocol.getStatusType() == RgvStatusType.ROAM) {
-//                            double finalVelocity = 0.0;     // 鏈�缁堥�熷害 (m/s)
-//                            double distance = (Math.pow(finalVelocity, 2) - Math.pow(rgvProtocol.instantaneousSpeed / 60, 2)) / (2 * acceleration);
-//                            BasDevpPosition basDevpPosition = basDevpPositionService.selectOne(new EntityWrapper<BasDevpPosition>().eq("dev_no", wrkMast.getSourceStaNo()));
-//                            if (distance * proportion > ((SortTheExecutionOfTheCarUtil.LatelyAndLessThan(basDevpPosition.getPlcPosition(), rgvProtocol.getRgvPos(), perimeter) + (rgvProtocol.instantaneousSpeed / 60) * proportion * rgvDate))) {
-//                                continue;
-//                            }
-                            List<BasDevpPosition> basDevpPositions = basDevpPositionService.selectList(new EntityWrapper<BasDevpPosition>().orderBy("plc_position", true));
-                            if (basDevpPositions.isEmpty()) {
-                                log.error("鑾峰彇鎵�鏈夌珯鐐逛俊鎭紓甯�,RGV浠诲姟涓嬪彂澶辫触锛岃鑱旂郴绠$悊鍛橈紒锛侊紒");
-                                break runRgv;
-                            }
-                            List<Integer> devpList = SortTheExecutionOfTheCarUtil.BasDevpPositionExtractSites(basDevpPositions);
-
-                            if (!SortTheExecutionOfTheCarUtil.calculateShortestDistanceDirection(devpList,rgvProtocol.getEndStaM(),wrkMast.getSourceStaNo())){
-                                continue;
+                            double finalVelocity = 0.0;     // 鏈�缁堥�熷害 (m/s)
+                            double distance = (Math.pow(finalVelocity, 2) - Math.pow(rgvProtocol.instantaneousSpeed / 60, 2)) / (2 * acceleration);
+                            BasDevpPosition basDevpPosition = basDevpPositionService.selectOne(new EntityWrapper<BasDevpPosition>().eq("dev_no", wrkMast.getSourceStaNo()));
+                            if ((distance * proportion + (rgvProtocol.instantaneousSpeed / 60) * proportion * rgvDate) > (SortTheExecutionOfTheCarUtil.LatelyAndLessThan(basDevpPosition.getPlcPosition(), rgvProtocol.getRgvPos(), perimeter) )) {
+//                                List<BasDevpPosition> basDevpPositions = basDevpPositionService.selectList(new EntityWrapper<BasDevpPosition>().orderBy("plc_position", true));
+//                                if (basDevpPositions.isEmpty()) {
+//                                    log.error("鑾峰彇鎵�鏈夌珯鐐逛俊鎭紓甯�,RGV浠诲姟涓嬪彂澶辫触锛岃鑱旂郴绠$悊鍛橈紒锛侊紒");
+//                                    break runRgv;
+//                                }
+//                                List<Integer> devpList = SortTheExecutionOfTheCarUtil.BasDevpPositionExtractSites(basDevpPositions);
+//
+//                                if (!SortTheExecutionOfTheCarUtil.calculateShortestDistanceDirection(devpList,rgvProtocol.getEndStaM(),wrkMast.getSourceStaNo())){
+                                    continue;
+//                                }
                             }
                         }
                         RgvCommand rgvCommand = new RgvCommand();
diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml
index 38ce3f7..a11a586 100644
--- a/src/main/resources/application.yml
+++ b/src/main/resources/application.yml
@@ -50,7 +50,7 @@
   # 灏忚溅鏁�
   rgvCount: 10
   # 寤惰繜鏃堕棿
-  rgvDate: 0.5
+  rgvDate: 1
 
 # 涓嬩綅鏈洪厤缃�
 wcs-slave:

--
Gitblit v1.9.1