From Manufacturing Event Logs to Simulation: Enabling SMEs with Agentic AI for SimPy Simulation Generation
Organizations: Dept. for Eng. of Products and Systems, Otto von Guericke University, Magdeburg, GERMANY · Faculty of Eng. and Mathematics, Bielefeld University of Applied Sciences and Arts, GERMANY · Fraunhofer Institute for Factory Operation and Automation, Magdeburg, GERMANY · Dept. of Economics, Anhalt University of Applied Sciences, Bernburg, GERMANY
Abstract
High expertise and cost barriers exclude small and medium-sized enterprises from discrete-event simulation (DES). We introduce GenAI4SimPy, a multi-agent framework powered by Qwen 3.6 (27B), an open-weight large language model, that automates end-to-end DES generation from manufacturing event logs to executable SimPy models through tool-augmented reasoning and human-in-the-loop validation. Evaluated on three execution blocks from a public smart factory dataset, the framework achieved a mean absolute percentage error of 7.9% and coverage of failure rate for all three blocks and of throughput for two of three. A fidelity paradox was observed: accurate process-level parameters did not ensure system-level behavioral fidelity, with flow-time and throughput errors driven by misinterpreted observation-window truncation and absent system-level calibration. These results demonstrate that local open-weight models can perform DES generation at accuracy comparable to cloud-based alternatives, while identifying parameter extraction as necessary but insufficient for behavioral validity. Source code and results are available at https://github.com/RaikoPipe/genai4simpy
Figures & tables
| Block | Day | Cases | Events | Conc. | Multifl. | Fail. | wait |
|---|---|---|---|---|---|---|---|
| A | 2021-07-06 | 18 | 576 | 7.1/12 | 14/18 | 7 | 139 s |
| B | 2021-06-30 | 38 | 1383 | 5.9/9 | 34/38 | 7 | 67 s |
| C | 2021-07-01 | 37 | 1137 | 6.1/9 | 25/37 | 5 | 62 s |
| Metric | Block A | Block B | Block C |
|---|---|---|---|
| Wall-clock time (min) | 109 | 118 | 145 |
| Generated code (lines) | 379 | 658 | 793 |
| Self-repair iterations | 2 | 1 | 0 |
| Phase-level recovery events | 1 | 2 | 1 |