用大模型辅助生成更符合真实队列逻辑的仿真代码,减少人工出错。
Mechanism-Faithful Queueing Simulation Model Translation with Large Language Model Support
- 设计模板框架,分阶段适配事件逻辑与常见错误模式
- 在多类队列场景中提升代码可执行性与逻辑一致性
- 适合需要高可靠性的仿真建模研究者使用
队列仿真常需大量手动工作将系统描述转化为可执行程序,并验证实现机制是否匹配预期逻辑。尽管大语言模型(LLMs)能生成可运行脚本,但若到达、路由、中断或报告逻辑错误,仅可执行仍不足。本文提出基于 exttt{SimPy} 的仿真支持框架,采用类别-模板机制覆盖常见队列行为,结合分阶段适配流程,聚焦结构化事件逻辑与典型仿真错误模式。在保留任务实例上,适配后模型在基础、行为及网络化队列设置中均提升了可执行性、输出格式合规性与指令-机制一致性,生成脚本更可靠。错误分析显示路由语义与中断-恢复逻辑保存更好,但在多节点传输与残余服务更新方面仍有不足。总体表明,该框架可作为仿真忠实生成器,推动队列模型构建的标准化与可复现性。
原文摘要 · Abstract (English)
Queueing simulation studies often require substantial manual effort to translate conceptual system descriptions into executable programs and to verify that the implemented mechanisms match the intended queueing logic. Although large language models (LLMs) may produce executable scripts, executability alone is insufficient when arrival, routing, interruption, or reporting logic is wrong. This study presents a simulation-oriented support framework for \texttt{SimPy}-based queueing model translation. We propose a category-template framework for mechanism coverage with a staged adaptation workflow that targets structured event logic and common simulation-specific failure modes. On held-out task instances, the adapted models improve executability, output-format compliance, and instruction-mechanism consistency across basic, behavioral, and networked queueing settings, so the generated scripts are more reliable as queueing simulation scripts. Error analysis shows better preservation of routing semantics and interruption-resume logic, while also exposing remaining weaknesses in multi-node transfer and residual-service updates. Overall, the results suggest that the proposed framework can act as a simulation-faithful generator for more standardized and reproducible queueing model construction.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。