问题描述
我想存储n个已经用switch语句排序的“Product”,然后用AGV移动它们。 但是,当第一个“产品”进入 Batch 块时,传送带停止移动。 是否可以指定批量存储在A1到C3的每个节点中的产品数量?
非常感谢。 enter image description here
解决方法
独立批处理
是否要为每个节点独立批处理?
如果是这样,您应该 "agentify" your node process flow. For each node,create an AgentType
MyNode,store the actual node using a parameter and create a batch process flow with
Enterand
Exitblocks. In your main flow,send products to the respective
MyNodeagent using an
Exit` 流块。
如果这太难了,请查看一些示例模型和 AnyLogic YouTube 频道,那里有一些很好的资源来学习这种强大的 OOP 技术。
动态批量大小
如果我理解错误,那么这可能会有所帮助(即您不想独立批处理,而只是动态更改批处理大小):
与您的 getTargetNode
类似,您可以创建一个函数 getBatchSize
,它根据类型为 Node
的参数返回一个整数,将其命名为 argNode
。在里面,你可以写一些类似
if argNode.equals(A1) {
return X; // whatever batch size needed for node A1
else if... // for other nodes
可能,argNode
是您的 targetNode
,但从您的屏幕上看不清楚。