自动化立体仓库 - WCS系统
zc
3 天以前 292ad975aaa9f3a4a74ac2a3f89b5cf3bf9a1bbb
src/main/java/com/zy/core/dispatcher/ShuttleDispatchUtils.java
@@ -399,7 +399,7 @@
            }
        }
        //寻找离任务楼层最近的穿梭车(不考虑跨楼层小车移动距离)
        //
        if (!diffLev.isEmpty()) {
            Map<Integer, ShuttleThread> diffShuttles = new TreeMap<>();//自然排序小车Map
            //获取任务
@@ -436,15 +436,15 @@
                        //给工作档绑定小车号
                        diffShuttles.put(-1, shuttleThread);
                    } else {
                        if (tongLev && diffLev.size() >= 2) {
                            //当前穿梭车线程到目标地点距离
                            List<NavigateNode> currentShuttlePath = navigateUtils.calc(currentLocNo, locNo, NavigationMapType.NORMAL.id, Utils.getShuttlePoints(shuttleProtocol.getShuttleNo(), Utils.getLev(currentLocNo)), null);//搜索空闲穿梭车,使用正常通道地图
                            if (currentShuttlePath == null) {
                                continue;
                            }
                            Integer currentAllDistance = navigateUtils.getOriginPathAllDistance(currentShuttlePath);//计算当前路径行走总距离
                            diffShuttles.put(currentAllDistance, shuttleThread);
                        } else {
//                        if (tongLev && diffLev.size() >= 2) {
//                            //当前穿梭车线程到目标地点距离
//                            List<NavigateNode> currentShuttlePath = navigateUtils.calc(currentLocNo, locNo, NavigationMapType.NORMAL.id, Utils.getShuttlePoints(shuttleProtocol.getShuttleNo(), Utils.getLev(currentLocNo)), null);//搜索空闲穿梭车,使用正常通道地图
//                            if (currentShuttlePath == null) {
//                                continue;
//                            }
//                            Integer currentAllDistance = navigateUtils.getOriginPathAllDistance(currentShuttlePath);//计算当前路径行走总距离
//                            diffShuttles.put(currentAllDistance, shuttleThread);
//                        } else {
                            //ABS(目标楼层 - 当前楼层) 得到差距,取最小差值
                            int currentValue = Math.abs(lev - currentLev);
                            if (diffShuttles.get(currentValue) != null) {
@@ -452,7 +452,7 @@
                            } else {
                                diffShuttles.put(currentValue, shuttleThread);
                            }
                        }
    //                   }
                    }
                }