ResourcePool多Schedule配置失败排查及Excel联动生产线仿真解决方案咨询
Troubleshooting Multi-Shift Schedule Setup in AnyLogic ResourcePool (Excel-Driven Production Simulation)
Background
I’m building a production line simulation using AnyLogic, with Excel as the data source for configuration. A key requirement is letting users freely set 3 distinct worker shifts for each machine—shift data is stored in Excel and needs to be reflected directly in the simulation.
What I’ve Tried So Far
- I created three separate
Scheduleelements in the model, each mapped to one of the three shifts. - I attempted to control which schedule the ResourcePool uses with an If statement (checking shift-related conditions to assign the corresponding schedule).
- Earlier, I tried generating schedules dynamically via Java code to pull shift data directly from Excel, but I couldn’t figure out how to assign these dynamically created schedules to the ResourcePool at runtime. That’s why I switched to the manual Schedule + conditional logic approach.
The Problem
The conditional logic in the ResourcePool isn’t working as expected—none of the schedules are being applied correctly, or shift changes don’t take effect when they should.
What I Need Help With
- Is my core approach (using multiple Schedules + conditional assignment in ResourcePool) fundamentally flawed, or is there a mistake in my Java/AnyLogic syntax?
- What’s the proper method to configure multi-shift schedules in a ResourcePool that can pull data directly from Excel and automatically use the correct schedule for each machine/resource group?
Additional Context
Worker shift configuration is a core evaluation parameter for this production system model, so getting this right is essential for accurate simulation results.
内容的提问来源于stack exchange,提问作者Mengzhang
相关产品推荐
相关产品推荐

