#
luxiaotao1123
2024-12-16 edd8ab14f72df3404b3a523e788eff2836238f3b
#
2个文件已修改
4个文件已添加
1703 ■■■■■ 已修改文件
zy-acs-manager/src/main/java/com/zy/acs/manager/common/config/RedisProperties.java 96 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-acs-manager/src/main/java/com/zy/acs/manager/core/service/AvoidWaveCalculator.java 157 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-acs-manager/src/main/java/com/zy/acs/manager/fake/FakeProcessor.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-acs-manager/src/main/resources/agv.py 169 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-acs-manager/src/main/resources/cdaMatrix.txt 639 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-acs-manager/src/main/resources/codeMatrix.txt 639 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-acs-manager/src/main/java/com/zy/acs/manager/common/config/RedisProperties.java
New file
@@ -0,0 +1,96 @@
package com.zy.acs.manager.common.config;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import java.net.InetAddress;
import java.net.UnknownHostException;
/**
 * redis系统配置
 * Created by vincent on 2018/10/15
 */
@Configuration
@ConfigurationProperties(prefix = "redis")
public class RedisProperties {
    public static String HOST_NAME;
    static {
        try {
            HOST_NAME = InetAddress.getLocalHost().getHostName();
        } catch (UnknownHostException e) {
            System.err.println("find hostname err");
        }
    }
    private String host;
    private String password;
    private int port;
    private int min;
    private int max;
    private int timeout;
    private int index;
    public String getHost() {
        return host;
    }
    public void setHost(String host) {
        this.host = host;
    }
    public String getPassword() {
        return password;
    }
    public void setPassword(String password) {
        this.password = password;
    }
    public int getPort() {
        return port;
    }
    public void setPort(int port) {
        this.port = port;
    }
    public int getMin() {
        return min;
    }
    public void setMin(int min) {
        this.min = min;
    }
    public int getMax() {
        return max;
    }
    public void setMax(int max) {
        this.max = max;
    }
    public int getTimeout() {
        return timeout;
    }
    public void setTimeout(int timeout) {
        this.timeout = timeout;
    }
    public int getIndex() {
        return index;
    }
    public void setIndex(int index) {
        this.index = index;
    }
}
zy-acs-manager/src/main/java/com/zy/acs/manager/core/service/AvoidWaveCalculator.java
@@ -3,6 +3,7 @@
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.zy.acs.common.utils.Utils;
import com.zy.acs.framework.common.Cools;
import com.zy.acs.manager.common.config.RedisProperties;
import com.zy.acs.manager.common.utils.MapDataUtils;
import com.zy.acs.manager.core.constant.MapDataConstant;
import com.zy.acs.manager.core.service.astart.DynamicNodeType;
@@ -13,6 +14,7 @@
import com.zy.acs.manager.manager.entity.AgvDetail;
import com.zy.acs.manager.manager.entity.AgvModel;
import com.zy.acs.manager.manager.entity.Code;
import com.zy.acs.manager.manager.enums.AgvModelType;
import com.zy.acs.manager.manager.service.AgvDetailService;
import com.zy.acs.manager.manager.service.AgvModelService;
import com.zy.acs.manager.manager.service.AgvService;
@@ -20,10 +22,16 @@
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.time.StopWatch;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.Resource;
import org.springframework.stereotype.Component;
import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;
import java.io.BufferedReader;
import java.io.File;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.List;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
@@ -55,6 +63,8 @@
    private CodeService codeService;
    @Autowired
    private MapService mapService;
    @Autowired
    private RedisProperties redisProperties;
    @PostConstruct
    @SuppressWarnings("all")
@@ -89,78 +99,95 @@
                return;
            }
//            AgvModel agvModel = agvModelService.selectByType(AgvModelType.CTU_BOX_TRANSPORT_AGV.toString());    // can be optimized
//
//            Double avoidDistance = MapDataUtils.getVehicleWaveSafeDistance(agvModel.getDiameter(), MapDataConstant.MAX_DISTANCE_BETWEEN_ADJACENT_AGV_FACTOR);
//
//            long startTime = System.currentTimeMillis();
//
//            ProcessBuilder processBuilder = new ProcessBuilder("python"
//                    , "D:\\tmp\\pyagv\\agv4.py"
//                    , String.valueOf(avoidDistance)
//            );
//            processBuilder.redirectErrorStream(true);
//
//            try {
//                Process process = processBuilder.start();
//
//                // 读取Python脚本的输出
//                BufferedReader reader = new BufferedReader(new InputStreamReader(process.getInputStream()));
//                String line;
//                StringBuilder builder = new StringBuilder();
//                while ((line = reader.readLine()) != null) {
//                    builder.append(line);
//                }
//
//                // 等待Python脚本执行完成
//                int exitCode = process.waitFor();
//                if (exitCode != 0) {
//                    System.out.println("Python script exited with error code: " + exitCode);
//                    return;
//                }
//                reader.close();
//
//                if (builder.length() <= 0) {
//                    return;
//                }
//
//                String result = builder.toString();
//
//                if (!Cools.isEmpty(result)) {
//                    if (!"1".equals(result)) {
//                        log.error("Fail python");
//                    }
//                }
//            } catch (IOException | InterruptedException e) {
//                e.printStackTrace();
//            }
//            log.error("python finish {}", System.currentTimeMillis() - startTime);
            // python
            AgvModel agvModel = agvModelService.selectByType(AgvModelType.CTU_BOX_TRANSPORT_AGV.toString());    // can be optimized
            Double avoidDistance = MapDataUtils.getVehicleWaveSafeDistance(agvModel.getDiameter(), MapDataConstant.MAX_DISTANCE_BETWEEN_ADJACENT_AGV_FACTOR);
            String[][] codeMatrix = mapDataDispatcher.getCodeMatrix(lev);
            String[][] waveMatrix = mapDataDispatcher.initWaveMatrix(lev);
//
//            // lock path
            DynamicNode[][] dynamicMatrix = mapDataDispatcher.getDynamicMatrix(lev);
            for (int i = 0; i < dynamicMatrix.length; i++) {
                for (int j = 0; j < dynamicMatrix[i].length; j++) {
                    DynamicNode dynamicNode = dynamicMatrix[i][j];
                    String vehicle = dynamicNode.getVehicle();
                    if (!DynamicNodeType.ACCESS.val.equals(vehicle) && !DynamicNodeType.BLOCK.val.equals(vehicle)) {
                        AgvModel agvModel = agvModelService.getById(agvService.selectByUuid(vehicle).getAgvModel());    // can be optimized
            long startTime = System.currentTimeMillis();
                        Double avoidDistance = MapDataUtils.getVehicleWaveSafeDistance(agvModel.getDiameter(), MapDataConstant.MAX_DISTANCE_BETWEEN_ADJACENT_AGV_FACTOR);
                        List<NavigateNode> includeList = mapService.getWaveScopeByCode(lev, codeMatrix[i][j], avoidDistance);
            Resource codeMatrixResource = new ClassPathResource("codeMatrix.txt");
            Resource cdaMatrixResource = new ClassPathResource("cdaMatrix.txt");
                        for (NavigateNode navigateNode : includeList) {
                            String waveNode = waveMatrix[navigateNode.getX()][navigateNode.getY()]; // overlay
                            waveMatrix[navigateNode.getX()][navigateNode.getY()] = MapDataUtils.generateWaveNode(waveNode, vehicle);
                        }
            File codeMatrixFile = codeMatrixResource.getFile();
            File cdaMatrixFile = cdaMatrixResource.getFile();
            String codeMatrixPath = codeMatrixFile.getAbsolutePath();
            String cdaMatrixPath = cdaMatrixFile.getAbsolutePath();
            Resource resource = new ClassPathResource("agv.py");
            File file = resource.getFile();
            ProcessBuilder processBuilder = new ProcessBuilder(
                    "python"
                    , file.getAbsolutePath()
                    , String.valueOf(avoidDistance)
                    , codeMatrixPath
                    , cdaMatrixPath
                    , redisProperties.getHost()
                    , redisProperties.getPassword()
                    , String.valueOf(redisProperties.getPort())
                    , String.valueOf(redisProperties.getIndex())
            );
            processBuilder.redirectErrorStream(true);
            try {
                Process process = processBuilder.start();
                BufferedReader reader = new BufferedReader(new InputStreamReader(process.getInputStream()));
                String line;
                StringBuilder builder = new StringBuilder();
                while ((line = reader.readLine()) != null) {
                    builder.append(line);
                }
                int exitCode = process.waitFor();
                if (exitCode != 0) {
                    System.out.println("Python script exited with error code: " + exitCode);
                    return;
                }
                reader.close();
                if (builder.length() <= 0) {
                    return;
                }
                String result = builder.toString();
                if (!Cools.isEmpty(result)) {
                    if (!"1".equals(result)) {
                        log.error("Fail python");
                    }
                }
            } catch (IOException | InterruptedException e) {
                e.printStackTrace();
            }
            log.error("python finish {}", System.currentTimeMillis() - startTime);
//            mapDataDispatcher.printMatrix(waveMatrix);
            mapDataDispatcher.setWaveMatrix(lev, waveMatrix);
            // java
//            String[][] codeMatrix = mapDataDispatcher.getCodeMatrix(lev);
//            String[][] waveMatrix = mapDataDispatcher.initWaveMatrix(lev);
//
//            // lock path
//            DynamicNode[][] dynamicMatrix = mapDataDispatcher.getDynamicMatrix(lev);
//            for (int i = 0; i < dynamicMatrix.length; i++) {
//                for (int j = 0; j < dynamicMatrix[i].length; j++) {
//                    DynamicNode dynamicNode = dynamicMatrix[i][j];
//                    String vehicle = dynamicNode.getVehicle();
//                    if (!DynamicNodeType.ACCESS.val.equals(vehicle) && !DynamicNodeType.BLOCK.val.equals(vehicle)) {
//                        AgvModel agvModel = agvModelService.getById(agvService.selectByUuid(vehicle).getAgvModel());    // can be optimized
//
//                        Double avoidDistance = MapDataUtils.getVehicleWaveSafeDistance(agvModel.getDiameter(), MapDataConstant.MAX_DISTANCE_BETWEEN_ADJACENT_AGV_FACTOR);
//                        List<NavigateNode> includeList = mapService.getWaveScopeByCode(lev, codeMatrix[i][j], avoidDistance);
//
//                        for (NavigateNode navigateNode : includeList) {
//                            String waveNode = waveMatrix[navigateNode.getX()][navigateNode.getY()]; // overlay
//                            waveMatrix[navigateNode.getX()][navigateNode.getY()] = MapDataUtils.generateWaveNode(waveNode, vehicle);
//                        }
//                    }
//                }
//            }
//
////            mapDataDispatcher.printMatrix(waveMatrix);
//            mapDataDispatcher.setWaveMatrix(lev, waveMatrix);
        } catch (Exception e) {
zy-acs-manager/src/main/java/com/zy/acs/manager/fake/FakeProcessor.java
@@ -16,6 +16,7 @@
import com.zy.acs.manager.system.service.ConfigService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import java.util.List;
@@ -59,7 +60,7 @@
     * 4.AgvServiceImpl.judgeOnline
     * 5.
     */
//    @Scheduled(cron = "0/1 * * * * ? ")
    @Scheduled(cron = "0/1 * * * * ? ")
    public void process() {
        Boolean fakeSign = configService.getVal("fakeSign", Boolean.class);
        if (null == fakeSign || !fakeSign) {
zy-acs-manager/src/main/resources/agv.py
New file
@@ -0,0 +1,169 @@
import ast
import sys
import numpy as np
import json
import time
import redis
radiusLen = None
#with open("./codeMatrix.txt", "r") as file:
#    codeMatrix = np.array(json.loads(file.read()))
#with open("./cdaMatrix.txt", "r") as file:
#    data = json.loads(file.read())
#    cdaMatrix = np.array(data)
# 将字符串转换为浮点型数组
def convert_to_float_array(str_array):
    if isinstance(str_array, str):
        return np.array(ast.literal_eval(str_array), dtype=float)
    return str_array
def getWaveScopeByCode(x, y):
    code = codeMatrix[x, y]
    includeList = []
    existNodes = set()
    spreadWaveNode({"x": x, "y": y}, {"x": x, "y": y}, existNodes, includeList)
    return includeList
def spreadWaveNode(originNode, currNode, existNodes, includeList):
    x, y = currNode['x'], currNode['y']
    neighbors = [(x + 1, y), (x - 1, y), (x, y + 1), (x, y - 1)]
    for neighbor in neighbors:
        extendNeighborNodes(originNode, {"x": neighbor[0], "y": neighbor[1]}, existNodes, includeList)
def extendNeighborNodes(originNode, nextNode, existNodes, includeList):
    x, y = nextNode['x'], nextNode['y']
    if (x < 0 or x >= codeMatrix.shape[0] or y < 0 or y >= codeMatrix.shape[1]):
        return
    if (x, y) in existNodes:
        return
    existNodes.add((x, y))
    nextNodeCodeData = codeMatrix[x, y]
    if nextNodeCodeData == 'NONE':
        spreadWaveNode(originNode, nextNode, existNodes, includeList)
    else:
        o1Cda = convert_to_float_array(cdaMatrix[originNode['x'], originNode['y']])
        o2Cda = convert_to_float_array(cdaMatrix[x, y])
        num1 = (o1Cda[0] - o2Cda[0]) ** 2
        num2 = (o1Cda[1] - o2Cda[1]) ** 2
        if num1 + num2 <= radiusLen ** 2:
            includeList.append({"x": int(x), "y": int(y), "code": str(codeMatrix[x, y])})
            spreadWaveNode(originNode, nextNode, existNodes, includeList)
# 找到某个值对应的 x, y 下标
def find_value_in_matrix(value):
    indices = np.where(codeMatrix == value)
    return list(zip(indices[0], indices[1]))
def initWaveMatrix():
    lev = 1
    waveMatrix = np.empty_like(codeMatrix, dtype=object)
    for x in range(codeMatrix.shape[0]):
        for y in range(codeMatrix.shape[1]):
            if codeMatrix[x][y] == 'NONE':
                waveMatrix[x][y] = "-"
            else:
                waveMatrix[x][y] = '[]'
    return waveMatrix
# 优化版本:使用集合来提高性能
def mergeWave(originWave, vehicle):
    # 将字符串解析为集合
    set_data = set(ast.literal_eval(originWave))
    # 如果 vehicle 不在集合中,则添加
    set_data.add(vehicle)
    # 返回序列化后的字符串
    return json.dumps(list(set_data))
# 将 dynamicMatrix 转换为 numpy 结构化数组
def convert_to_structured_array(dynamicMatrix):
    # 定义结构化数组的 dtype
    dtype = [('serial', int), ('vehicle', 'U2')]
    # 将嵌套的列表转换为结构化数组
    structured_array = np.array([tuple(d.values()) for row in dynamicMatrix for d in row], dtype=dtype)
    # 重塑为原始的二维形状
    return structured_array.reshape(len(dynamicMatrix), -1)
# 使用 numpy 加速的代码
def process_dynamic_matrix(dynamicMatrix, codeMatrix):
    # 将 dynamicMatrix 转换为结构化数组
    dynamicMatrix = convert_to_structured_array(dynamicMatrix)
    # 获取 dynamicMatrix 的形状
    rows, cols = dynamicMatrix.shape
    # 创建一个布尔掩码,用于筛选出 vehicle 不为 '0' 和 '-1' 的元素
    mask = (dynamicMatrix['vehicle'] != '0') & (dynamicMatrix['vehicle'] != '-1')
    # 获取满足条件的 x 和 y 坐标
    x_indices, y_indices = np.where(mask)
    # 遍历满足条件的坐标
    for x, y in zip(x_indices, y_indices):
        # print(code)
        data = dynamicMatrix[x][y]
        vehicle = data['vehicle']
        includeList = getWaveScopeByCode(x,y)
        for include in includeList:
            originWave = waveMatrix[include['x']][include['y']]
            waveMatrix[include['x']][include['y']] = mergeWave(originWave, vehicle)
radiusLenStr = sys.argv[1]
radiusLen = float(radiusLenStr)
codeMatrixPath = sys.argv[2]
cdaMatrixPath = sys.argv[3]
redisHost = sys.argv[4]
redisPwd = sys.argv[5]
redisPort = sys.argv[6]
redisIdx = sys.argv[7]
with open(codeMatrixPath, "r") as file:
    codeMatrix = np.array(json.loads(file.read()))
with open(cdaMatrixPath, "r") as file:
    data = json.loads(file.read())
    cdaMatrix = np.array(data)
startTime = time.perf_counter()
waveMatrix = initWaveMatrix()
# 创建一个连接池
pool = redis.ConnectionPool(host=redisHost, port=int(redisPort), password=redisPwd, db=int(redisIdx))
r = redis.Redis(connection_pool=pool)
dynamicMatrixStr = r.get('KV.AGV_MAP_ASTAR_DYNAMIC_FLAG.1')
dynamicMatrix = np.array(json.loads(dynamicMatrixStr))
# # 使用 numpy 加速的代码
process_dynamic_matrix(dynamicMatrix, codeMatrix)
# for x in range(dynamicMatrix.shape[0]):
#     for y in range(dynamicMatrix.shape[1]):
#         data = dynamicMatrix[x, y]
#         vehicle = data['vehicle']
#         if vehicle != '0' and vehicle != '-1':
#             getWaveScopeByCode(x, y)
# 将 numpy.ndarray 转换为嵌套列表
waveMatrixList = waveMatrix.tolist()
# 将嵌套列表转换为 JSON 字符串
waveMatrixJsonStr = json.dumps(waveMatrixList)
r.set("KV.AGV_MAP_ASTAR_WAVE_FLAG.1",waveMatrixJsonStr)
end = time.perf_counter()
# print('程序运行时间为: %s Seconds' % (end - startTime))
print("1")
zy-acs-manager/src/main/resources/cdaMatrix.txt
New file
@@ -0,0 +1,639 @@
[
    [
        "-",
        "-",
        "[0.0,0.0]",
        "[1235.0,0.0]",
        "[2470.0,0.0]",
        "[3705.0,0.0]",
        "[4940.0,0.0]",
        "[6175.0,0.0]",
        "[7183.0,0.0]",
        "[8191.0,0.0]",
        "[9199.0,0.0]"
    ],
    [
        "-",
        "-",
        "[0.0,918.0]",
        "-",
        "[2470.0,918.0]",
        "-",
        "[4940.0,918.0]",
        "-",
        "-",
        "-",
        "-"
    ],
    [
        "-",
        "-",
        "-",
        "-",
        "-",
        "-",
        "-",
        "-",
        "[7183.0,1008.0]",
        "-",
        "[9199.0,1008.0]"
    ],
    [
        "-",
        "-",
        "[0.0,1423.0]",
        "-",
        "[2470.0,1423.0]",
        "-",
        "[4940.0,1423.0]",
        "-",
        "-",
        "-",
        "-"
    ],
    [
        "-",
        "-",
        "[0.0,1928.0]",
        "-",
        "[2470.0,1928.0]",
        "-",
        "[4940.0,1928.0]",
        "-",
        "-",
        "-",
        "-"
    ],
    [
        "-",
        "-",
        "-",
        "-",
        "-",
        "-",
        "-",
        "-",
        "[7183.0,2016.0]",
        "[8191.0,2016.0]",
        "[9199.0,2016.0]"
    ],
    [
        "-",
        "-",
        "[0.0,2433.0]",
        "-",
        "[2470.0,2433.0]",
        "-",
        "[4940.0,2433.0]",
        "-",
        "-",
        "-",
        "-"
    ],
    [
        "-",
        "-",
        "[0.0,3098.0]",
        "-",
        "[2470.0,3098.0]",
        "-",
        "[4940.0,3098.0]",
        "-",
        "-",
        "-",
        "-"
    ],
    [
        "-",
        "-",
        "[0.0,3603.0]",
        "-",
        "[2470.0,3603.0]",
        "-",
        "[4940.0,3603.0]",
        "-",
        "-",
        "-",
        "-"
    ],
    [
        "-",
        "-",
        "[0.0,4108.0]",
        "-",
        "[2470.0,4108.0]",
        "-",
        "[4940.0,4108.0]",
        "-",
        "-",
        "-",
        "-"
    ],
    [
        "-",
        "-",
        "[0.0,4613.0]",
        "-",
        "[2470.0,4613.0]",
        "-",
        "[4940.0,4613.0]",
        "-",
        "-",
        "-",
        "-"
    ],
    [
        "-",
        "-",
        "[0.0,5531.5]",
        "-",
        "[2470.0,5531.5]",
        "-",
        "[4940.0,5531.5]",
        "-",
        "-",
        "-",
        "-"
    ],
    [
        "-",
        "-",
        "[0.0,6449.5]",
        "[1235.0,6449.5]",
        "[2470.0,6449.5]",
        "[3705.0,6449.5]",
        "[4940.0,6449.5]",
        "[6175.0,6449.5]",
        "[7183.0,6449.5]",
        "[8191.0,6449.5]",
        "[9199.0,6449.5]"
    ],
    [
        "-",
        "-",
        "-",
        "-",
        "-",
        "-",
        "-",
        "-",
        "[7183.0,7457.5]",
        "-",
        "[9199.0,7457.5]"
    ],
    [
        "-",
        "-",
        "[0.0,7458.0]",
        "-",
        "[2470.0,7458.0]",
        "-",
        "[4940.0,7458.0]",
        "-",
        "-",
        "-",
        "-"
    ],
    [
        "-",
        "-",
        "[0.0,7963.0]",
        "-",
        "[2470.0,7963.0]",
        "-",
        "[4940.0,7963.0]",
        "-",
        "-",
        "-",
        "-"
    ],
    [
        "-",
        "-",
        "-",
        "-",
        "-",
        "-",
        "-",
        "-",
        "[7183.0,8465.5]",
        "[8191.0,8465.5]",
        "[9199.0,8465.5]"
    ],
    [
        "-",
        "-",
        "[0.0,8468.0]",
        "-",
        "[2470.0,8468.0]",
        "-",
        "[4940.0,8468.0]",
        "-",
        "-",
        "-",
        "-"
    ],
    [
        "-",
        "-",
        "[0.0,8973.0]",
        "-",
        "[2470.0,8973.0]",
        "-",
        "[4940.0,8973.0]",
        "-",
        "-",
        "-",
        "-"
    ],
    [
        "-",
        "-",
        "[0.0,9638.0]",
        "-",
        "[2470.0,9638.0]",
        "-",
        "[4940.0,9638.0]",
        "-",
        "-",
        "-",
        "-"
    ],
    [
        "-",
        "-",
        "[0.0,10143.0]",
        "-",
        "[2470.0,10143.0]",
        "-",
        "[4940.0,10143.0]",
        "-",
        "-",
        "-",
        "-"
    ],
    [
        "-",
        "-",
        "[0.0,10648.0]",
        "-",
        "[2470.0,10648.0]",
        "-",
        "[4940.0,10648.0]",
        "-",
        "-",
        "-",
        "-"
    ],
    [
        "-",
        "-",
        "[0.0,11153.0]",
        "-",
        "[2470.0,11153.0]",
        "-",
        "[4940.0,11153.0]",
        "-",
        "-",
        "-",
        "-"
    ],
    [
        "-",
        "-",
        "[0.0,11818.0]",
        "-",
        "[2470.0,11818.0]",
        "-",
        "[4940.0,11818.0]",
        "-",
        "-",
        "-",
        "-"
    ],
    [
        "-",
        "-",
        "[0.0,12323.0]",
        "-",
        "[2470.0,12323.0]",
        "-",
        "[4940.0,12323.0]",
        "-",
        "-",
        "-",
        "-"
    ],
    [
        "-",
        "-",
        "[0.0,12828.0]",
        "-",
        "[2470.0,12828.0]",
        "-",
        "[4940.0,12828.0]",
        "-",
        "-",
        "-",
        "-"
    ],
    [
        "-",
        "-",
        "[0.0,13333.0]",
        "-",
        "[2470.0,13333.0]",
        "-",
        "[4940.0,13333.0]",
        "-",
        "-",
        "-",
        "-"
    ],
    [
        "-",
        "-",
        "[0.0,14251.5]",
        "-",
        "[2470.0,14251.5]",
        "-",
        "[4940.0,14251.5]",
        "-",
        "-",
        "-",
        "-"
    ],
    [
        "-",
        "-",
        "[0.0,15169.5]",
        "[1235.0,15169.5]",
        "[2470.0,15169.5]",
        "[3705.0,15169.5]",
        "[4940.0,15169.5]",
        "-",
        "-",
        "-",
        "-"
    ],
    [
        "-",
        "-",
        "[0.0,16178.0]",
        "-",
        "[2470.0,16178.0]",
        "-",
        "[4940.0,16178.0]",
        "-",
        "-",
        "-",
        "-"
    ],
    [
        "-",
        "-",
        "[0.0,16683.0]",
        "-",
        "[2470.0,16683.0]",
        "-",
        "[4940.0,16683.0]",
        "-",
        "-",
        "-",
        "-"
    ],
    [
        "-",
        "-",
        "[0.0,17188.0]",
        "-",
        "[2470.0,17188.0]",
        "-",
        "[4940.0,17188.0]",
        "-",
        "-",
        "-",
        "-"
    ],
    [
        "-",
        "-",
        "[0.0,17693.0]",
        "-",
        "[2470.0,17693.0]",
        "-",
        "[4940.0,17693.0]",
        "-",
        "-",
        "-",
        "-"
    ],
    [
        "-",
        "-",
        "[0.0,18358.0]",
        "-",
        "[2470.0,18358.0]",
        "-",
        "[4940.0,18358.0]",
        "-",
        "-",
        "-",
        "-"
    ],
    [
        "-",
        "-",
        "[0.0,18863.0]",
        "-",
        "[2470.0,18863.0]",
        "-",
        "[4940.0,18863.0]",
        "-",
        "-",
        "-",
        "-"
    ],
    [
        "-",
        "-",
        "[0.0,19368.0]",
        "-",
        "[2470.0,19368.0]",
        "-",
        "[4940.0,19368.0]",
        "-",
        "-",
        "-",
        "-"
    ],
    [
        "-",
        "-",
        "[0.0,19873.0]",
        "-",
        "[2470.0,19873.0]",
        "-",
        "[4940.0,19873.0]",
        "-",
        "-",
        "-",
        "-"
    ],
    [
        "-",
        "-",
        "[0.0,20791.5]",
        "-",
        "[2470.0,20791.5]",
        "-",
        "[4940.0,20791.5]",
        "-",
        "-",
        "-",
        "-"
    ],
    [
        "-",
        "-",
        "[0.0,21709.5]",
        "[1235.0,21709.5]",
        "[2470.0,21709.5]",
        "[3705.0,21709.5]",
        "[4940.0,21709.5]",
        "-",
        "-",
        "-",
        "-"
    ],
    [
        "-",
        "-",
        "[0.0,22718.0]",
        "-",
        "[2470.0,22718.0]",
        "-",
        "[4940.0,22718.0]",
        "-",
        "-",
        "-",
        "-"
    ],
    [
        "-",
        "-",
        "[0.0,23223.0]",
        "-",
        "[2470.0,23223.0]",
        "-",
        "[4940.0,23223.0]",
        "-",
        "-",
        "-",
        "-"
    ],
    [
        "-",
        "-",
        "[0.0,23728.0]",
        "-",
        "[2470.0,23728.0]",
        "-",
        "[4940.0,23728.0]",
        "-",
        "-",
        "-",
        "-"
    ],
    [
        "-",
        "-",
        "[0.0,24233.0]",
        "-",
        "[2470.0,24233.0]",
        "-",
        "[4940.0,24233.0]",
        "-",
        "-",
        "-",
        "-"
    ],
    [
        "-",
        "-",
        "[0.0,24898.0]",
        "-",
        "[2470.0,24898.0]",
        "-",
        "[4940.0,24898.0]",
        "-",
        "-",
        "-",
        "-"
    ],
    [
        "-",
        "-",
        "[0.0,25403.0]",
        "-",
        "[2470.0,25403.0]",
        "-",
        "[4940.0,25403.0]",
        "-",
        "-",
        "-",
        "-"
    ],
    [
        "-",
        "-",
        "[0.0,25908.0]",
        "-",
        "[2470.0,25908.0]",
        "-",
        "[4940.0,25908.0]",
        "-",
        "-",
        "-",
        "-"
    ],
    [
        "-",
        "-",
        "[0.0,26413.0]",
        "-",
        "[2470.0,26413.0]",
        "-",
        "[4940.0,26413.0]",
        "-",
        "-",
        "-",
        "-"
    ],
    [
        "-",
        "-",
        "[0.0,27331.0]",
        "-",
        "[2470.0,27331.0]",
        "-",
        "[4940.0,27331.0]",
        "-",
        "-",
        "-",
        "-"
    ],
    [
        "[-2243.0,28249.0]",
        "[-1235.0,28249.0]",
        "[0.0,28249.0]",
        "[1235.0,28249.0]",
        "[2470.0,28249.0]",
        "[3705.0,28249.0]",
        "[4940.0,28249.0]",
        "-",
        "-",
        "-",
        "-"
    ]
]
zy-acs-manager/src/main/resources/codeMatrix.txt
New file
@@ -0,0 +1,639 @@
[
    [
        "NONE",
        "NONE",
        "00000001",
        "00000051",
        "00000101",
        "00000151",
        "00000201",
        "00000251",
        "00000301",
        "00000351",
        "00000401"
    ],
    [
        "NONE",
        "NONE",
        "00000002",
        "NONE",
        "00000102",
        "NONE",
        "00000202",
        "NONE",
        "NONE",
        "NONE",
        "NONE"
    ],
    [
        "NONE",
        "NONE",
        "NONE",
        "NONE",
        "NONE",
        "NONE",
        "NONE",
        "NONE",
        "00000302",
        "NONE",
        "00000402"
    ],
    [
        "NONE",
        "NONE",
        "00000003",
        "NONE",
        "00000103",
        "NONE",
        "00000203",
        "NONE",
        "NONE",
        "NONE",
        "NONE"
    ],
    [
        "NONE",
        "NONE",
        "00000004",
        "NONE",
        "00000104",
        "NONE",
        "00000204",
        "NONE",
        "NONE",
        "NONE",
        "NONE"
    ],
    [
        "NONE",
        "NONE",
        "NONE",
        "NONE",
        "NONE",
        "NONE",
        "NONE",
        "NONE",
        "00000303",
        "00000353",
        "00000403"
    ],
    [
        "NONE",
        "NONE",
        "00000005",
        "NONE",
        "00000105",
        "NONE",
        "00000205",
        "NONE",
        "NONE",
        "NONE",
        "NONE"
    ],
    [
        "NONE",
        "NONE",
        "00000006",
        "NONE",
        "00000106",
        "NONE",
        "00000206",
        "NONE",
        "NONE",
        "NONE",
        "NONE"
    ],
    [
        "NONE",
        "NONE",
        "00000007",
        "NONE",
        "00000107",
        "NONE",
        "00000207",
        "NONE",
        "NONE",
        "NONE",
        "NONE"
    ],
    [
        "NONE",
        "NONE",
        "00000008",
        "NONE",
        "00000108",
        "NONE",
        "00000208",
        "NONE",
        "NONE",
        "NONE",
        "NONE"
    ],
    [
        "NONE",
        "NONE",
        "00000009",
        "NONE",
        "00000109",
        "NONE",
        "00000209",
        "NONE",
        "NONE",
        "NONE",
        "NONE"
    ],
    [
        "NONE",
        "NONE",
        "00000010",
        "NONE",
        "00000110",
        "NONE",
        "00000210",
        "NONE",
        "NONE",
        "NONE",
        "NONE"
    ],
    [
        "NONE",
        "NONE",
        "00000011",
        "00000061",
        "00000111",
        "00000161",
        "00000211",
        "00000261",
        "00000311",
        "00000361",
        "00000411"
    ],
    [
        "NONE",
        "NONE",
        "NONE",
        "NONE",
        "NONE",
        "NONE",
        "NONE",
        "NONE",
        "00000312",
        "NONE",
        "00000412"
    ],
    [
        "NONE",
        "NONE",
        "00000012",
        "NONE",
        "00000112",
        "NONE",
        "00000212",
        "NONE",
        "NONE",
        "NONE",
        "NONE"
    ],
    [
        "NONE",
        "NONE",
        "00000013",
        "NONE",
        "00000113",
        "NONE",
        "00000213",
        "NONE",
        "NONE",
        "NONE",
        "NONE"
    ],
    [
        "NONE",
        "NONE",
        "NONE",
        "NONE",
        "NONE",
        "NONE",
        "NONE",
        "NONE",
        "00000313",
        "00000363",
        "00000413"
    ],
    [
        "NONE",
        "NONE",
        "00000014",
        "NONE",
        "00000114",
        "NONE",
        "00000214",
        "NONE",
        "NONE",
        "NONE",
        "NONE"
    ],
    [
        "NONE",
        "NONE",
        "00000015",
        "NONE",
        "00000115",
        "NONE",
        "00000215",
        "NONE",
        "NONE",
        "NONE",
        "NONE"
    ],
    [
        "NONE",
        "NONE",
        "00000016",
        "NONE",
        "00000116",
        "NONE",
        "00000216",
        "NONE",
        "NONE",
        "NONE",
        "NONE"
    ],
    [
        "NONE",
        "NONE",
        "00000017",
        "NONE",
        "00000117",
        "NONE",
        "00000217",
        "NONE",
        "NONE",
        "NONE",
        "NONE"
    ],
    [
        "NONE",
        "NONE",
        "00000018",
        "NONE",
        "00000118",
        "NONE",
        "00000218",
        "NONE",
        "NONE",
        "NONE",
        "NONE"
    ],
    [
        "NONE",
        "NONE",
        "00000019",
        "NONE",
        "00000119",
        "NONE",
        "00000219",
        "NONE",
        "NONE",
        "NONE",
        "NONE"
    ],
    [
        "NONE",
        "NONE",
        "00000020",
        "NONE",
        "00000120",
        "NONE",
        "00000220",
        "NONE",
        "NONE",
        "NONE",
        "NONE"
    ],
    [
        "NONE",
        "NONE",
        "00000021",
        "NONE",
        "00000121",
        "NONE",
        "00000221",
        "NONE",
        "NONE",
        "NONE",
        "NONE"
    ],
    [
        "NONE",
        "NONE",
        "00000022",
        "NONE",
        "00000122",
        "NONE",
        "00000222",
        "NONE",
        "NONE",
        "NONE",
        "NONE"
    ],
    [
        "NONE",
        "NONE",
        "00000023",
        "NONE",
        "00000123",
        "NONE",
        "00000223",
        "NONE",
        "NONE",
        "NONE",
        "NONE"
    ],
    [
        "NONE",
        "NONE",
        "00000024",
        "NONE",
        "00000124",
        "NONE",
        "00000224",
        "NONE",
        "NONE",
        "NONE",
        "NONE"
    ],
    [
        "NONE",
        "NONE",
        "00000025",
        "00000075",
        "00000125",
        "00000175",
        "00000225",
        "NONE",
        "NONE",
        "NONE",
        "NONE"
    ],
    [
        "NONE",
        "NONE",
        "00000026",
        "NONE",
        "00000126",
        "NONE",
        "00000226",
        "NONE",
        "NONE",
        "NONE",
        "NONE"
    ],
    [
        "NONE",
        "NONE",
        "00000027",
        "NONE",
        "00000127",
        "NONE",
        "00000227",
        "NONE",
        "NONE",
        "NONE",
        "NONE"
    ],
    [
        "NONE",
        "NONE",
        "00000028",
        "NONE",
        "00000128",
        "NONE",
        "00000228",
        "NONE",
        "NONE",
        "NONE",
        "NONE"
    ],
    [
        "NONE",
        "NONE",
        "00000029",
        "NONE",
        "00000129",
        "NONE",
        "00000229",
        "NONE",
        "NONE",
        "NONE",
        "NONE"
    ],
    [
        "NONE",
        "NONE",
        "00000030",
        "NONE",
        "00000130",
        "NONE",
        "00000230",
        "NONE",
        "NONE",
        "NONE",
        "NONE"
    ],
    [
        "NONE",
        "NONE",
        "00000031",
        "NONE",
        "00000131",
        "NONE",
        "00000231",
        "NONE",
        "NONE",
        "NONE",
        "NONE"
    ],
    [
        "NONE",
        "NONE",
        "00000032",
        "NONE",
        "00000132",
        "NONE",
        "00000232",
        "NONE",
        "NONE",
        "NONE",
        "NONE"
    ],
    [
        "NONE",
        "NONE",
        "00000033",
        "NONE",
        "00000133",
        "NONE",
        "00000233",
        "NONE",
        "NONE",
        "NONE",
        "NONE"
    ],
    [
        "NONE",
        "NONE",
        "00000034",
        "NONE",
        "00000134",
        "NONE",
        "00000234",
        "NONE",
        "NONE",
        "NONE",
        "NONE"
    ],
    [
        "NONE",
        "NONE",
        "00000035",
        "00000085",
        "00000135",
        "00000185",
        "00000235",
        "NONE",
        "NONE",
        "NONE",
        "NONE"
    ],
    [
        "NONE",
        "NONE",
        "00000036",
        "NONE",
        "00000136",
        "NONE",
        "00000236",
        "NONE",
        "NONE",
        "NONE",
        "NONE"
    ],
    [
        "NONE",
        "NONE",
        "00000037",
        "NONE",
        "00000137",
        "NONE",
        "00000237",
        "NONE",
        "NONE",
        "NONE",
        "NONE"
    ],
    [
        "NONE",
        "NONE",
        "00000038",
        "NONE",
        "00000138",
        "NONE",
        "00000238",
        "NONE",
        "NONE",
        "NONE",
        "NONE"
    ],
    [
        "NONE",
        "NONE",
        "00000039",
        "NONE",
        "00000139",
        "NONE",
        "00000239",
        "NONE",
        "NONE",
        "NONE",
        "NONE"
    ],
    [
        "NONE",
        "NONE",
        "00000040",
        "NONE",
        "00000140",
        "NONE",
        "00000240",
        "NONE",
        "NONE",
        "NONE",
        "NONE"
    ],
    [
        "NONE",
        "NONE",
        "00000041",
        "NONE",
        "00000141",
        "NONE",
        "00000241",
        "NONE",
        "NONE",
        "NONE",
        "NONE"
    ],
    [
        "NONE",
        "NONE",
        "00000042",
        "NONE",
        "00000142",
        "NONE",
        "00000242",
        "NONE",
        "NONE",
        "NONE",
        "NONE"
    ],
    [
        "NONE",
        "NONE",
        "00000043",
        "NONE",
        "00000143",
        "NONE",
        "00000243",
        "NONE",
        "NONE",
        "NONE",
        "NONE"
    ],
    [
        "NONE",
        "NONE",
        "00000044",
        "NONE",
        "00000144",
        "NONE",
        "00000244",
        "NONE",
        "NONE",
        "NONE",
        "NONE"
    ],
    [
        "00000047",
        "00000046",
        "00000045",
        "00000095",
        "00000145",
        "00000195",
        "00000245",
        "NONE",
        "NONE",
        "NONE",
        "NONE"
    ]
]