| | |
| | | /// <returns></returns> |
| | | public static List<CarModel> GetCarPathUp(List<CarModel> list, int moveType) |
| | | { |
| | | if (list == null) |
| | | { |
| | | return null; |
| | | } |
| | | for (int i = 0; i < list.Count; i++) |
| | | { |
| | | if (i >= 0 && i < list.Count - 1) |
| | |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | /// <param name="data">当前任务总路径</param> |
| | | /// <param name="kXCarList">所有小车</param> |
| | | /// <param name="assignCar">当前分配小车</param> |
| | | /// <param name="waitTask">当前总任务</param> |
| | | /// <param name="moveType">0去取货任务 1去放货</param> |
| | | /// <returns></returns> |
| | | public static bool AddCarTask(List<CarModel> data, List<CarInfo> kXCarList, CarInfo assignCar, WcsTask waitTask,int moveType) |
| | | { |
| | | #region 获取适合执行当前任务的小车 生成路径(需考虑小车阻阻挡) |
| | |
| | | var lastPath = lastPathList[lastPathList.Length - 2]; |
| | | var lastPath2 = lastPath.Substring(0,6); |
| | | |
| | | //如果此此分配路径包含醉舞中最终节点路径,添加移走小车 |
| | | //如果此此分配路径包含任务中最终节点路径,添加移走小车 |
| | | if (path.Contains(lastPath2)) |
| | | { |
| | | |
| | |
| | | |
| | | if (current.Equals(end)) |
| | | { |
| | | Log.Error(ReconstructPath(cameFrom, current).ToString()); |
| | | Log.Error("小车路径分配:" +ReconstructPath(cameFrom, current).ToString()); |
| | | return ReconstructPath(cameFrom, current); |
| | | } |
| | | |