import { Agent } from '@/store/demoStore'; import { SimulationData } from './index'; // 能源订单班专属Agent配置 const energyAgents: Agent[] = [ { id: 'energy_plc_engineer', name: 'PLC工程师', icon: '⚙️', avatar: '/data/订单班文档资料/能源/agent头像/PLC工程师.jpg', model: 'GPT-4', role: '系统控制逻辑设计', status: 'waiting', }, { id: 'energy_vision_engineer', name: '机器视觉识别工程师', icon: '📷', avatar: '/data/订单班文档资料/能源/agent头像/机器视觉识别工程师.jpeg', model: 'GPT-4', role: 'AOI缺陷检测', status: 'waiting', }, { id: 'energy_vision_technician', name: '机器视觉识别技术员', icon: '🔍', avatar: '/data/订单班文档资料/能源/agent头像/机器视觉识别技术员.jpeg', model: 'GPT-4', role: '视觉系统调试', status: 'waiting', }, { id: 'energy_robot_engineer', name: '机器人调试工程师', icon: '🤖', avatar: '/data/订单班文档资料/能源/agent头像/机器人调试工程师.jpg', model: 'GPT-4', role: '机器人分拣协同', status: 'waiting', }, ]; export const energySimulation = (): SimulationData => ({ orderClassId: 'energy', orderClassName: '能源', projectTitle: '光伏晶硅电池片AOI检测与分拣单元', agents: energyAgents, startupSequence: [ { type: 'info', content: '🚀 启动光伏AOI检测与智能分拣系统...' }, { type: 'system', content: '初始化工业自动化多Agent协作框架' }, { type: 'success', content: '✓ 系统核心加载完成' }, { type: 'system', content: '加载专业知识库: PLC控制/机器视觉/工业机器人/质量追溯' }, { type: 'progress', content: '████████████████████ 100%', duration: 1500 }, { type: 'success', content: '✓ 知识库加载完成' }, { type: 'info', content: '连接工业设备通讯...' }, { type: 'system', content: '├─ Siemens S7-1500 PLC (Profinet)' }, { type: 'system', content: '├─ Cognex In-Sight D900 视觉系统' }, { type: 'system', content: '├─ ABB IRB 1200 六轴机器人' }, { type: 'system', content: '└─ MES系统 (OPC UA)' }, { type: 'success', content: '✓ 设备通讯连接成功' }, { type: 'warning', content: '⚡ 检测到生产需求: PERC/TopCon单晶硅电池片质检' }, { type: 'info', content: '核心特点: 丝印后AOI缺陷检测,智能分拣,全程追溯' }, { type: 'info', content: '技术指标: 节拍≥3600片/h,漏检≤0.3%,误检≤0.5%' }, { type: 'info', content: '正在分配4位专业Agent...' }, ], agentSequence: [ // Agent 1: PLC工程师 { agent: () => energyAgents[0], outputs: [ { type: 'system', content: '⚙️ PLC工程师 正在设计系统控制逻辑...' }, { type: 'info', content: '基于Siemens S7-1500设计主控系统架构' }, { type: 'progress', content: '分析中...', duration: 1000 }, { type: 'success', content: '✓ 硬件平台: Siemens SIMATIC S7-1500 (CPU 1512C-1 PN)' }, { type: 'success', content: '✓ 通讯协议: Profinet(设备层)+ OPC UA(MES层)' }, { type: 'success', content: '✓ 开发环境: TIA Portal V1x,梯形图+FBD编程' }, { type: 'info', content: '' }, { type: 'image', content: '⚙️ PLC控制系统架构', imageSrc: '/data/订单班文档资料/能源/notion文稿/image/PLC示意图.jpg', imageAlt: 'Siemens S7-1500 PLC控制系统' }, { type: 'info', content: '' }, { type: 'info', content: '核心控制逻辑设计:' }, { type: 'output', content: ' 1. 启停与安全联锁' }, { type: 'output', content: ' • 启动按钮SB1 + 停止SB2 + 急停ES + 安全门GS' }, { type: 'output', content: ' • 过载保护FR + 负压检测VS → 运行允许RUN_EN' }, { type: 'output', content: ' • 异常触发:立即断电 + 撤销握手 + 三色灯报警' }, { type: 'output', content: ' 2. 来料检测与高精定位' }, { type: 'output', content: ' • PE1入口光电 → 输送至定位工位 → PE2到位信号' }, { type: 'output', content: ' • 伺服对中机构精度±0.1mm + 真空定位台锁定' }, { type: 'output', content: ' 3. 相机握手与结果锁存' }, { type: 'output', content: ' • Cam_Trig上升沿触发 → 300ms超时保护' }, { type: 'output', content: ' • R2..R0三位二进制码:000=OK, 001=RW, 010=NG, 111=UNCERTAIN' }, { type: 'output', content: ' 4. 机器人协同分拣' }, { type: 'output', content: ' • PartReady就位 + RobotReady响应 → StartAllow启动' }, { type: 'output', content: ' • PickDone完成脉冲 → 清握手信号 → 续行输送' }, { type: 'output', content: ' 5. 追溯数据上报' }, { type: 'output', content: ' • 批次号+片ID+检测分值+缺陷图像 → OPC UA上传MES' }, { type: 'output', content: ' • 网络异常→本地RingBuffer缓存≥5000片 + 定时补发' }, { type: 'output', content: ' 6. 异常处理与降级' }, { type: 'output', content: ' • 相机超时→人工复判模式(所有片送复判仓)' }, { type: 'output', content: ' • 机器人故障→RobotFault报警 + 停机' }, { type: 'info', content: '' }, { type: 'info', content: 'I/O配置分配:' }, { type: 'output', content: ' 输入: SB1/SB2/ES/GS/FR/VS(安全链) + PE1/PE2(定位) + Cam信号 + Robot信号' }, { type: 'output', content: ' 输出: KM1(输送) + SV1/SV2(夹具) + Cam_Trig + StartAllow/PartReady + 三色灯/蜂鸣' }, { type: 'info', content: '' }, { type: 'success', content: '✓ PLC控制逻辑架构设计完成,支持3600片/h节拍' }, ] }, // Agent 2: 机器视觉识别工程师 { agent: () => energyAgents[1], outputs: [ { type: 'system', content: '📷 机器视觉识别工程师 正在设计AOI缺陷检测系统...' }, { type: 'info', content: '基于Cognex In-Sight D900深度学习相机设计视觉方案' }, { type: 'progress', content: '方案设计中...', duration: 1200 }, { type: 'success', content: '✓ 相机平台: Cognex In-Sight D900深度学习系列' }, { type: 'success', content: '✓ 镜头配置: 25-35mm远心镜头(抑制边缘畸变)' }, { type: 'success', content: '✓ 光源方案: 矩形漫射顶光 + 同轴光(交叉偏振抑制反射)' }, { type: 'success', content: '✓ 触发模式: PLC硬件触发(Cam_Trig上升沿)' }, { type: 'success', content: '✓ 结果回传: Profinet I/O(实时R2..R0)+ TCP(缺陷掩膜)' }, { type: 'info', content: '' }, { type: 'image', content: '📷 Cognex In-Sight D900视觉系统', imageSrc: '/data/订单班文档资料/能源/notion文稿/image/机器视觉相机图片.jpg', imageAlt: 'Cognex深度学习视觉相机' }, { type: 'info', content: '' }, { type: 'info', content: 'AOI检测分级逻辑(深度学习ViDi模型):' }, { type: 'output', content: ' • 严重缺陷(NG):断栅、漏印、连锡 → 报废' }, { type: 'output', content: ' • 轻微缺陷(RW):拖浆、脏污、刮伤、崩边 → 复判' }, { type: 'output', content: ' • 无缺陷(OK):外观合格 → 良品' }, { type: 'output', content: ' • 不确定(UNCERTAIN):模型无法明确判断 → 人工审核' }, { type: 'info', content: '' }, { type: 'info', content: '成像质量指标:' }, { type: 'output', content: ' • 灰度分布: 银浆均值180±10,硅基底40±5' }, { type: 'output', content: ' • 景深控制: F/#≥8,工作距离倾角<0.1°' }, { type: 'output', content: ' • 清晰度: MTF@10lp/mm对比度≥0.3' }, { type: 'output', content: ' • 运动冻结: 外触发频闪100-200µs,抖动<1ms' }, { type: 'info', content: '' }, { type: 'info', content: '深度学习模型训练策略:' }, { type: 'output', content: ' • 数据集: OK≥5000样本,每类缺陷≥2000样本' }, { type: 'output', content: ' • 划分: 训练/验证/测试 = 6:2:2' }, { type: 'output', content: ' • 增强: 旋转±5°、亮度±10%、高斯噪声σ≤3' }, { type: 'output', content: ' • 调参目标: NG召回率≥99.5%,漏检≤0.3%,OK误检≤0.5%' }, { type: 'info', content: '' }, { type: 'info', content: '推理性能预算(≤300ms总时长):' }, { type: 'output', content: ' • 采集: 10ms + 预处理: 20ms' }, { type: 'output', content: ' • 推理: ≤180ms + 结果打包: 20ms' }, { type: 'output', content: ' • 下发: 20ms → Cam_Done置位' }, { type: 'info', content: '' }, { type: 'image', content: '🔬 光伏电池片检测应用场景', imageSrc: '/data/订单班文档资料/能源/notion文稿/image/光伏面板生成画面.jpg', imageAlt: '光伏电池片AOI检测应用' }, { type: 'info', content: '' }, { type: 'success', content: '✓ AOI视觉检测系统设计完成,满足≤300ms检测时长要求' }, ] }, // Agent 3: 机器视觉识别技术员 { agent: () => energyAgents[2], outputs: [ { type: 'system', content: '🔍 机器视觉识别技术员 正在执行系统调试与验收...' }, { type: 'info', content: '对视觉系统进行光学标定、模型优化和性能验证' }, { type: 'progress', content: '调试中...', duration: 1000 }, { type: 'info', content: '' }, { type: 'info', content: '1. 光学与成像调试:' }, { type: 'output', content: ' ✓ 光源优化: 同轴光+漫射顶光,交叉偏振角≈90°' }, { type: 'output', content: ' ✓ 曝光调整: 银浆灰度180±10,硅基底40±5' }, { type: 'output', content: ' ✓ 景深验证: F/#=8,工作距离稳定,倾角<0.1°' }, { type: 'output', content: ' ✓ 运动冻结: 频闪脉宽150µs,触发抖动<1ms' }, { type: 'info', content: '' }, { type: 'info', content: '2. 标定与几何校正:' }, { type: 'output', content: ' ✓ 内参标定: 棋盘格校正焦距、主点、畸变系数' }, { type: 'output', content: ' ✓ 外参标定: 手眼标定重投影误差<0.3mm' }, { type: 'output', content: ' ✓ 像素映射: px2mm比例+透视矫正矩阵 → 存档备份' }, { type: 'info', content: '' }, { type: 'info', content: '3. 深度学习模型优化:' }, { type: 'output', content: ' ✓ 类别设计: OK/RW/NG/UNCERTAIN四层级' }, { type: 'output', content: ' ✓ 缺陷子类: 断栅、漏印、连锡、拖浆、脏污、划伤、崩边(7类)' }, { type: 'output', content: ' ✓ 数据增强: 几何+光照扰动(保持缺陷语义)' }, { type: 'output', content: ' ✓ 阈值调参: NG召回99.5%、漏检0.3%、OK误检0.5%' }, { type: 'info', content: '' }, { type: 'info', content: '4. 缺陷库与标注规范:' }, { type: 'output', content: ' ✓ 断栅/漏印: 连通域断开长度≥栅线节距40%' }, { type: 'output', content: ' ✓ 拖浆: 扩散宽度≥0.1mm' }, { type: 'output', content: ' ✓ 崩边: 缺口深度≥0.15mm' }, { type: 'output', content: ' ✓ 标注一致性: Cohen\'s kappa≥0.8,双人互审+仲裁' }, { type: 'info', content: '' }, { type: 'info', content: '5. 与PLC/机器人联调:' }, { type: 'output', content: ' ✓ 时序测量: Cam_Trig→Cam_Done P95≤220ms,P99≤280ms' }, { type: 'output', content: ' ✓ 握手验证: 300ms窗口内PLC锁存R2..R0结果' }, { type: 'output', content: ' ✓ 节拍优化: Ping-Pong双工位,解耦相机处理与机械节拍' }, { type: 'info', content: '' }, { type: 'info', content: '6. 性能验收(10000片连续生产测试):' }, { type: 'output', content: ' ✓ 漏检率: 0.28%(目标≤0.3%)✓' }, { type: 'output', content: ' ✓ 误检率: 0.47%(目标≤0.5%)✓' }, { type: 'output', content: ' ✓ UNCERTAIN: 0.9%(目标≤1%)✓' }, { type: 'output', content: ' ✓ 帧丢失率: 0%,相机温升: 12℃' }, { type: 'output', content: ' ✓ Gage R&R(重复性/再现性): 8.5%(≤10%)✓' }, { type: 'info', content: '' }, { type: 'success', content: '✓ 视觉系统调试完成,性能指标全部达标' }, ] }, // Agent 4: 机器人调试工程师 { agent: () => energyAgents[3], outputs: [ { type: 'system', content: '🤖 机器人调试工程师 正在配置智能分拣系统...' }, { type: 'info', content: '基于ABB IRB 1200-7/0.7六轴机器人设计分拣方案' }, { type: 'progress', content: '配置中...', duration: 1000 }, { type: 'success', content: '✓ 机器人平台: ABB IRB 1200-7/0.7(重复精度±0.02mm)' }, { type: 'success', content: '✓ 控制柜: OmniCore C30' }, { type: 'success', content: '✓ 末端执行器: 真空吸具(可调负压)' }, { type: 'success', content: '✓ 通讯接口: Profinet Device(与PLC握手)' }, { type: 'success', content: '✓ 编程语言: RAPID(ABB专用)' }, { type: 'info', content: '' }, { type: 'image', content: '🤖 ABB IRB 1200六轴机器人', imageSrc: '/data/订单班文档资料/能源/notion文稿/image/工业机器人图片.jpg', imageAlt: 'ABB IRB 1200工业机器人' }, { type: 'info', content: '' }, { type: 'info', content: 'I/O信号映射:' }, { type: 'output', content: ' 输入: diStartAllow←Q0.4,diPartReady←Q0.5,diPLC_Reset←Q0.6' }, { type: 'output', content: ' diR0/R1/R2←检测结果位(000=OK, 001=RW, 010=NG)' }, { type: 'output', content: ' 输出: doRobotReady→I1.5,doPickDone→I1.6,doRobotFault→I1.7' }, { type: 'output', content: ' doVacOn/Off→末端真空控制' }, { type: 'info', content: '' }, { type: 'info', content: '分拣路径规划:' }, { type: 'output', content: ' pHome: [0,0,500] → 安全待命位' }, { type: 'output', content: ' pPick: [250,0,80] → 定位台取片位' }, { type: 'output', content: ' pOK: [600,200,120] → 良品料盘(OK分拣)' }, { type: 'output', content: ' pRW: [600,0,120] → 复判料盘(RW复判)' }, { type: 'output', content: ' pNG: [600,-200,120] → 报废料箱(NG淘汰)' }, { type: 'info', content: '' }, { type: 'info', content: 'RAPID程序逻辑:' }, { type: 'output', content: ' 1. 初始化: SetDO doRobotReady,1(就绪信号)' }, { type: 'output', content: ' 2. 等待: WaitUntil diStartAllow=1 AND diPartReady=1' }, { type: 'output', content: ' 3. 取片: MoveJ pPick → SetDO doVacOn,1(吸附0.10s)' }, { type: 'output', content: ' 4. 读结果: result = diR2*4 + diR1*2 + diR0*1' }, { type: 'output', content: ' 5. 分拣: SELECT result → 000:pOK, 001:pRW, 010:pNG' }, { type: 'output', content: ' 6. 放件: SetDO doVacOn,0(释放0.05s)' }, { type: 'output', content: ' 7. 完成: PulseDO doPickDone,0.20(完成脉冲→PLC续行)' }, { type: 'output', content: ' 8. 异常: TRAP TrapFault → SetDO doRobotFault,1' }, { type: 'info', content: '' }, { type: 'info', content: '时序协同要点:' }, { type: 'output', content: ' • PLC在RobotReady=1 & PartReady=1 & StartAllow=1时允许取片' }, { type: 'output', content: ' • doPickDone脉冲→PLC清PartReady/StartAllow并续行下一片' }, { type: 'output', content: ' • 报警时doRobotFault=1,PLC紧急停机' }, { type: 'output', content: ' • PLC复位脉冲→机器人ResetErrors后恢复运行' }, { type: 'info', content: '' }, { type: 'image', content: '🔧 输送与治具系统', imageSrc: '/data/订单班文档资料/能源/notion文稿/image/输送与治具.jpg', imageAlt: '边夹式输送线与伺服对中治具' }, { type: 'info', content: '' }, { type: 'info', content: '系统集成测试(3600片/h节拍验证):' }, { type: 'output', content: ' ✓ 单片循环时间: 0.98s(≤1.0s目标)' }, { type: 'output', content: ' ✓ 取片成功率: 99.97%(3次吸取失败/10000片)' }, { type: 'output', content: ' ✓ 分拣准确率: 100%(R2..R0解析无误)' }, { type: 'output', content: ' ✓ 握手响应: StartAllow→PickDone平均1.2s' }, { type: 'output', content: ' ✓ 异常恢复: PLC_Reset脉冲清除故障<2s' }, { type: 'info', content: '' }, { type: 'success', content: '✓ 机器人分拣系统集成完成,节拍性能达标' }, ] }, ], completionSequence: [ { type: 'system', content: '=' .repeat(70) }, { type: 'success', content: '🎉 光伏晶硅电池片AOI检测与分拣单元 生成完成!' }, { type: 'system', content: '=' .repeat(70) }, { type: 'info', content: '' }, { type: 'info', content: '🎯 核心技术优势:' }, { type: 'success', content: '✓ PLC主控: Siemens S7-1500高可靠架构,安全联锁+降级模式' }, { type: 'success', content: '✓ 深度学习AOI: Cognex In-Sight D900,漏检≤0.3%,误检≤0.5%' }, { type: 'success', content: '✓ 智能分拣: ABB IRB 1200六轴协同,±0.02mm重复精度' }, { type: 'success', content: '✓ 全程追溯: OPC UA实时上报MES,本地缓存≥5000片' }, { type: 'success', content: '✓ 节拍性能: 3600片/小时,单片循环<1.0s' }, { type: 'info', content: '' }, { type: 'info', content: '📊 性能指标验收:' }, { type: 'success', content: '✓ 检测准确率: 漏检0.28%,误检0.47%,UNCERTAIN 0.9%' }, { type: 'success', content: '✓ 分拣成功率: 99.97%(取片失败率0.03%)' }, { type: 'success', content: '✓ 推理时延: P95≤220ms,P99≤280ms(≤300ms目标)' }, { type: 'success', content: '✓ 系统可靠性: 24h老化测试0帧丢失,温升<15℃' }, { type: 'info', content: '' }, { type: 'image', content: '🌞 光伏产业应用场景', imageSrc: '/data/订单班文档资料/能源/notion文稿/image/光伏面板室外场景图片.jpg', imageAlt: '光伏电池片产线应用' }, { type: 'info', content: '' }, { type: 'info', content: '🔧 系统集成架构:' }, { type: 'output', content: ' • 控制层: S7-1500 PLC(梯形图+FBD)' }, { type: 'output', content: ' • 视觉层: Cognex D900(ViDi深度学习模型)' }, { type: 'output', content: ' • 执行层: ABB IRB 1200(RAPID分拣程序)' }, { type: 'output', content: ' • 通讯层: Profinet(实时)+ OPC UA(MES)' }, { type: 'output', content: ' • 追溯层: 批次号+片ID+缺陷掩膜→数据库' }, { type: 'info', content: '' }, { type: 'info', content: '💡 创新亮点:' }, { type: 'output', content: ' • 深度学习缺陷分类:7类缺陷(断栅/漏印/连锡/拖浆/脏污/划伤/崩边)' }, { type: 'output', content: ' • Ping-Pong双工位:解耦相机推理与机械节拍,提升30%产能' }, { type: 'output', content: ' • 降级运行模式:相机异常→人工复判,保证产线不停机' }, { type: 'output', content: ' • 本地缓存追溯:网络故障时5000片缓存+定时补发,数据零丢失' }, { type: 'info', content: '' }, { type: 'info', content: '📋 交付物清单:' }, { type: 'output', content: ' 1. PLC程序(TIA Portal工程文件 + 梯形图/FBD源码)' }, { type: 'output', content: ' 2. 机器人程序(RAPID模块 + 路径坐标配置)' }, { type: 'output', content: ' 3. 视觉模型(ViDi训练权重 + 标定文件 + 数据集v1.2)' }, { type: 'output', content: ' 4. 通讯配置(Profinet GSD + OPC UA节点表)' }, { type: 'output', content: ' 5. 系统文档(电气图纸 + I/O清单 + 调试报告 + 验收记录)' }, { type: 'info', content: '' }, { type: 'success', content: '✅ 完整方案已保存至: /projects/PV_AOI_Sorting_System.pdf' }, { type: 'info', content: '📄 附件包含: 控制程序、视觉模型、机器人代码、系统文档、验收报告' }, { type: 'system', content: '' }, { type: 'info', content: '🔗 系统已就绪,可投入PERC/TopCon电池片产线质检使用' }, ] });