【发布时间】:2020-01-07 15:46:12
【问题描述】:
我有 25 个代理(操作员)。生成订单时,我会抓住几个 Operator,并将它们移动到由 Order 中的参数确定的许多不同 ProductionSuite 之一。
在 ProductionSuite 中,我有一个 ResourcePool 类型的变量,我想用它让这些 Operator 执行任务。
在主窗口中,我将这段代码放在“On capture unit:”代码框中:
agent.assignedSuite.suiteOperatorPool.addAgentToContents(unit);
但这会触发 NullPointerException 错误。我是否错误地使用了 addAgentToContents 方法?
【问题讨论】:
标签: anylogic