自动化立体仓库 - WMS系统
#
luxiaotao1123
2020-06-11 5d3f5d5ca5a925c6d163b846f0c8b456586ccf85
#
1个文件已修改
8 ■■■■■ 已修改文件
src/main/java/com/zy/common/model/Shelves.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/common/model/Shelves.java
@@ -58,9 +58,11 @@
    /**
     * 开始计算 =======>>>
     *
     *          货架命中规则如下:
     *              安装位置:   [1]  [2]  |  [3]  [4]  --------  [5] [6]  |  [7] [8]
     *                  命中顺序:      1 -> 5 -> 4 -> 8 -> 2 -> 6 -> 3 -> 9 -> 1 ...
     *
     *          1.该规则适不限制货架数量,总数与组别在构造器中设置
     *          2.如有序列号起始问题,用偏移量规避即可
     *
@@ -78,8 +80,8 @@
                    return iterator.next().get(idx);
                } else {
                    List<Integer> first = nodes.get(0);
                    Integer val = first.get(idx);
                    int res = size /group + 1 + offset - val;
                    int val = first.get(idx);
                    int res = size / group + 1 + offset - val;
                    // 反向命中货架时不再是对立下标(相对于巷道)
                    if (res < val) {
                        // 轮询所有货架后重新开始定位
@@ -97,7 +99,7 @@
    public static void main(String[] args) throws InterruptedException {
        Shelves shelves = new Shelves(4,2);
        Shelves shelves = new Shelves(8,2);
        System.out.println(shelves.nodes.toString());
        int start = 1;
        while (true) {