微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

在 Anylogic 中,我想存储使用 switch 语句排序的 n 个“产品”,然后使用 AGV 移动它们 独立批处理动态批量大小

如何解决在 Anylogic 中,我想存储使用 switch 语句排序的 n 个“产品”,然后使用 AGV 移动它们 独立批处理动态批量大小

我想存储n个已经用switch语句排序的“Product”,然后用AGV移动它们。 但是,当第一个“产品”进入 Batch 块时,传送带停止移动。 是否可以指定批量存储在A1到C3的每个节点中的产品数量

非常感谢。 enter image description here

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 EnterandExitblocks. In your main flow,send products to the respectiveMyNodeagent using anExit` 流块。

如果这太难了,请查看一些示例模型和 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,但从您的屏幕上看不清楚。

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。