自动化立体仓库 - WCS系统
zc
3 天以前 d34366b9d348f47a8083aa3dd2e3e0efa2377dcf
src/main/java/com/zy/core/dispatcher/ShuttleDispatchUtils.java
@@ -434,7 +434,7 @@
                    if (wrkMast1.getIoType() == 101 && currentLocNo.equals(locNo)) {
                        //车辆当前位置已经是目标库位,调度该车
                        //给工作档绑定小车号
                        diffShuttles.put(-1, shuttleThread);
                        diffShuttles.put(-2, shuttleThread);
                    } else {
//                        if (tongLev && diffLev.size() >= 2) {
//                            //当前穿梭车线程到目标地点距离
@@ -445,14 +445,24 @@
//                            Integer currentAllDistance = navigateUtils.getOriginPathAllDistance(currentShuttlePath);//计算当前路径行走总距离
//                            diffShuttles.put(currentAllDistance, shuttleThread);
//                        } else {
                            //ABS(目标楼层 - 当前楼层) 得到差距,取最小差值
                            int currentValue = Math.abs(lev - currentLev);
                            if (diffShuttles.get(currentValue) != null) {
                        //ABS(目标楼层 - 当前楼层) 得到差距,取最小差值
                        int currentValue = Math.abs(lev - currentLev);
                        if (diffShuttles.get(currentValue) != null) {
                            try {
                                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);
                                diffShuttles.put(currentValue - 1, shuttleThread);
                            } catch (Exception e) {
                                diffShuttles.put(currentValue + 1, shuttleThread);
                            } else {
                                diffShuttles.put(currentValue, shuttleThread);
                            }
    //                   }
                        } else {
                            diffShuttles.put(currentValue, shuttleThread);
                        }
                        //                   }
                    }
                }