Browse Source

货架压力测试

master
修宁 6 months ago
parent
commit
6b4f763845
  1. 88
      src/example/ExampleUtil.js
  2. 101
      src/example/example1.js

88
src/example/ExampleUtil.js

@ -1,3 +1,91 @@
export function buildRackPerformanceData(rows, cols) {
const spacingX = 60 // X轴间距
const spacingZ = 2.5 // Y轴间距
// 创建一个二维数组来存储点阵数据
const data = new Map()
for (let row = 0; row < rows; row++) {
for (let col = 0; col < cols; col++) {
// 计算每个点的坐标
const node = {
id: 'wp_' + row + '_' + col,
t: 'rack',
v: true,
tf: [[4.196, 0.1, 5.882], [0, 270, 0], [1, 1, 1]],
dt: {
rackDepth: 1,
rackWidth: 5.1,
rackHeight: 4.2,
levelCount: 3,
bayCount: 4,
hideFloor: false,
extendColumns: true,
columnSpacing: 1,
bays: [
{ bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] },
{ bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] },
{ bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] },
{ bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] },
{ bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] },
{ bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] },
{ bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] },
{ bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] },
{ bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] },
{ bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] },
{ bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] },
{ bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] },
{ bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] },
{ bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] },
{ bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] },
{ bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] },
{ bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] },
{ bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] },
{ bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] },
{ bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] },
{ bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] },
{ bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] },
{ bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] },
{ bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] },
{ bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] },
{ bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] },
{ bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] },
{ bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] },
{ bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] },
{ bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] },
{ bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] },
{ bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] },
{ bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] },
{ bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] },
{ bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] },
{ bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] },
{ bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] },
{ bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] },
{ bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] },
{ bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] },
{ bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] },
{ bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] },
{ bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] },
{ bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] },
{ bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }],
center: [],
in: [],
out: []
}
}
node.tf[0][0] = row * spacingX
node.tf[0][1] = 0.01
node.tf[0][2] = col * spacingZ
node.tf[1] = [0, 0, 0]
node.tf[2] = [1, 0.4, 1]
data.set(node.id, node)
}
}
debugger
return Array.from(data.values())
}
/** /**
* 构建点阵性能数据 * 构建点阵性能数据
* @param t * @param t

101
src/example/example1.js

@ -1,4 +1,4 @@
import { buildAgvPerformanceData, buildPointPerformanceData } from '@/example/ExampleUtil.js' import { buildAgvPerformanceData, buildPointPerformanceData, buildRackPerformanceData } from '@/example/ExampleUtil.js'
export default { export default {
project_uuid: 'example1', project_uuid: 'example1',
@ -168,51 +168,51 @@ export default {
extendColumns: true, extendColumns: true,
columnSpacing: 1, columnSpacing: 1,
bays: [ bays: [
{ bayWidth: 1.275, levelHeight: [1.4, 1.4,1.4, 1.4,1.4, 1.4, 1.4] }, { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] },
{ bayWidth: 1.275, levelHeight: [1.4, 1.4,1.4, 1.4,1.4, 1.4, 1.4] }, { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] },
{ bayWidth: 1.275, levelHeight: [1.4, 1.4,1.4, 1.4,1.4, 1.4, 1.4] }, { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] },
{ bayWidth: 1.275, levelHeight: [1.4, 1.4,1.4, 1.4,1.4, 1.4, 1.4] }, { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] },
{ bayWidth: 1.275, levelHeight: [1.4, 1.4,1.4, 1.4,1.4, 1.4, 1.4] }, { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] },
{ bayWidth: 1.275, levelHeight: [1.4, 1.4,1.4, 1.4,1.4, 1.4, 1.4] }, { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] },
{ bayWidth: 1.275, levelHeight: [1.4, 1.4,1.4, 1.4,1.4, 1.4, 1.4] }, { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] },
{ bayWidth: 1.275, levelHeight: [1.4, 1.4,1.4, 1.4,1.4, 1.4, 1.4] }, { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] },
{ bayWidth: 1.275, levelHeight: [1.4, 1.4,1.4, 1.4,1.4, 1.4, 1.4] }, { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] },
{ bayWidth: 1.275, levelHeight: [1.4, 1.4,1.4, 1.4,1.4, 1.4, 1.4] }, { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] },
{ bayWidth: 1.275, levelHeight: [1.4, 1.4,1.4, 1.4,1.4, 1.4, 1.4] }, { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] },
{ bayWidth: 1.275, levelHeight: [1.4, 1.4,1.4, 1.4,1.4, 1.4, 1.4] }, { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] },
{ bayWidth: 1.275, levelHeight: [1.4, 1.4,1.4, 1.4,1.4, 1.4, 1.4] }, { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] },
{ bayWidth: 1.275, levelHeight: [1.4, 1.4,1.4, 1.4,1.4, 1.4, 1.4] }, { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] },
{ bayWidth: 1.275, levelHeight: [1.4, 1.4,1.4, 1.4,1.4, 1.4, 1.4] }, { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] },
{ bayWidth: 1.275, levelHeight: [1.4, 1.4,1.4, 1.4,1.4, 1.4, 1.4] }, { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] },
{ bayWidth: 1.275, levelHeight: [1.4, 1.4,1.4, 1.4,1.4, 1.4, 1.4] }, { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] },
{ bayWidth: 1.275, levelHeight: [1.4, 1.4,1.4, 1.4,1.4, 1.4, 1.4] }, { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] },
{ bayWidth: 1.275, levelHeight: [1.4, 1.4,1.4, 1.4,1.4, 1.4, 1.4] }, { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] },
{ bayWidth: 1.275, levelHeight: [1.4, 1.4,1.4, 1.4,1.4, 1.4, 1.4] }, { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] },
{ bayWidth: 1.275, levelHeight: [1.4, 1.4,1.4, 1.4,1.4, 1.4, 1.4] }, { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] },
{ bayWidth: 1.275, levelHeight: [1.4, 1.4,1.4, 1.4,1.4, 1.4, 1.4] }, { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] },
{ bayWidth: 1.275, levelHeight: [1.4, 1.4,1.4, 1.4,1.4, 1.4, 1.4] }, { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] },
{ bayWidth: 1.275, levelHeight: [1.4, 1.4,1.4, 1.4,1.4, 1.4, 1.4] }, { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] },
{ bayWidth: 1.275, levelHeight: [1.4, 1.4,1.4, 1.4,1.4, 1.4, 1.4] }, { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] },
{ bayWidth: 1.275, levelHeight: [1.4, 1.4,1.4, 1.4,1.4, 1.4, 1.4] }, { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] },
{ bayWidth: 1.275, levelHeight: [1.4, 1.4,1.4, 1.4,1.4, 1.4, 1.4] }, { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] },
{ bayWidth: 1.275, levelHeight: [1.4, 1.4,1.4, 1.4,1.4, 1.4, 1.4] }, { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] },
{ bayWidth: 1.275, levelHeight: [1.4, 1.4,1.4, 1.4,1.4, 1.4, 1.4] }, { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] },
{ bayWidth: 1.275, levelHeight: [1.4, 1.4,1.4, 1.4,1.4, 1.4, 1.4] }, { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] },
{ bayWidth: 1.275, levelHeight: [1.4, 1.4,1.4, 1.4,1.4, 1.4, 1.4] }, { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] },
{ bayWidth: 1.275, levelHeight: [1.4, 1.4,1.4, 1.4,1.4, 1.4, 1.4] }, { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] },
{ bayWidth: 1.275, levelHeight: [1.4, 1.4,1.4, 1.4,1.4, 1.4, 1.4] }, { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] },
{ bayWidth: 1.275, levelHeight: [1.4, 1.4,1.4, 1.4,1.4, 1.4, 1.4] }, { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] },
{ bayWidth: 1.275, levelHeight: [1.4, 1.4,1.4, 1.4,1.4, 1.4, 1.4] }, { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] },
{ bayWidth: 1.275, levelHeight: [1.4, 1.4,1.4, 1.4,1.4, 1.4, 1.4] }, { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] },
{ bayWidth: 1.275, levelHeight: [1.4, 1.4,1.4, 1.4,1.4, 1.4, 1.4] }, { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] },
{ bayWidth: 1.275, levelHeight: [1.4, 1.4,1.4, 1.4,1.4, 1.4, 1.4] }, { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] },
{ bayWidth: 1.275, levelHeight: [1.4, 1.4,1.4, 1.4,1.4, 1.4, 1.4] }, { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] },
{ bayWidth: 1.275, levelHeight: [1.4, 1.4,1.4, 1.4,1.4, 1.4, 1.4] }, { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] },
{ bayWidth: 1.275, levelHeight: [1.4, 1.4,1.4, 1.4,1.4, 1.4, 1.4] }, { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] },
{ bayWidth: 1.275, levelHeight: [1.4, 1.4,1.4, 1.4,1.4, 1.4, 1.4] }, { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] },
{ bayWidth: 1.275, levelHeight: [1.4, 1.4,1.4, 1.4,1.4, 1.4, 1.4] }, { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] },
{ bayWidth: 1.275, levelHeight: [1.4, 1.4,1.4, 1.4,1.4, 1.4, 1.4] }, { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] },
{ bayWidth: 1.275, levelHeight: [1.4, 1.4,1.4, 1.4,1.4, 1.4, 1.4] }], { bayWidth: 1.275, levelHeight: [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4] }],
center: [], center: [],
in: [], in: [],
out: [] out: []
@ -378,14 +378,14 @@ export default {
t: 'way', t: 'way',
v: true, v: true,
tf: [[2, 0.1, 0], [0, 0, 0], [1.0, 1.0, 1.0]], tf: [[2, 0.1, 0], [0, 0, 0], [1.0, 1.0, 1.0]],
dt: { in: [], out: [], center: ['way2'] } dt: { in: ['way2'], out: ['way2'], center: [] }
}, },
{ {
id: 'way2', id: 'way2',
t: 'way', t: 'way',
v: true, v: true,
tf: [[5, 0.1, 0], [0, 0, 0], [1.0, 1.0, 1.0]], tf: [[5, 0.1, 0], [0, 0, 0], [1.0, 1.0, 1.0]],
dt: { in: [], out: [], center: ['way1'] } dt: { in: ['way1'], out: ['way1'], center: [] }
} }
] ]
}, },
@ -396,6 +396,10 @@ export default {
{ {
catalogCode: '__f2', t: 'floor', catalogCode: '__f2', t: 'floor',
items: buildPointPerformanceData('carton', 100, 100) items: buildPointPerformanceData('carton', 100, 100)
},
{
catalogCode: '__f3', t: 'floor',
items: buildRackPerformanceData(5, 200)
} }
], ],
elevator: [], // 电梯 elevator: [], // 电梯
@ -405,6 +409,7 @@ export default {
{ {
label: '仓库楼层', // 目录分组名 label: '仓库楼层', // 目录分组名
items: [ items: [
{ catalogCode: '__f3', label: '货架测试 (-f3)' },
{ catalogCode: '__f2', label: '压力测试 (-f2)' }, // 目录项 { catalogCode: '__f2', label: '压力测试 (-f2)' }, // 目录项
{ catalogCode: '__f1', label: '地下室 (-f1)' }, // 目录项 { catalogCode: '__f1', label: '地下室 (-f1)' }, // 目录项
{ catalogCode: 'f1', label: '一楼 (f1)' }, { catalogCode: 'f1', label: '一楼 (f1)' },

Loading…
Cancel
Save