Anylogic - 使用导入的数据库将代理从一个源发送到各种矩形节点

Anylogic - Send Agents to Various Rectangular Nodes from one Source using Imported Database

我正在尝试将在一个源中创建的代理(比方说托盘)发送到各种终端节点。我对所有代理使用简单的 seize、moveTo 和 release 命令,并让工作人员完成任务。执行以下操作的最佳方法是什么:

源创建了 10 个托盘 1.前5个发给矩形节点1 2.第二个5发送给矩形节点2

理想情况下,我很乐意使用导入的数据库使用 10 个托盘的参数目标(类似于 tecnomatix 使用属性 "destination" 的方式)来执行此操作,但我似乎无法完成这项工作- 甚至知道这是否可能。非常感谢您的任何意见!

想法是将所有结束节点(所有目的地)添加到一个集合中(在我的示例中,该集合被命名为 "destinations"),设置 "Source' block to read names of the destinations for the new pallets from the built-in database (my database includes a column titled "db_destination"包括我希望我的每件物品运输到的各种终端节点的列表),并使用函数 findFirst() 在集合中找到与托盘目的地名称对应的节点。

源块

  1. 单击 - 从数据库设置代理参数
  2. 设置你的数据库table
  3. 在您的代理部分,包括代理参数映射:目的地 - db_destination

移动到方块

  1. 目的地:Network/GIS节点
  2. 节点:findFirst(destinations, d -> d.getName().equals(agent.destination))

谢谢!