【发布时间】:2021-10-25 15:01:09
【问题描述】:
在 anylogic 中,我对卡车进行了建模,以运送到多个送货地点。卡车使用代码移动到集合中的第一个位置
moveTo(order.orderLocation.getFirst());
卡车到达第一个位置后,使用代码移除第一个代理:
order.orderLocation.removeFirst();
该过程迭代直到集合为空(见图)。
我正试图让卡车前往最近的代理商,而不仅仅是收藏中的第一个代理商。但是,我不知道删除它移动到的代理的代码是什么。我还尝试根据距离对列表进行排序,但没有成功。有人知道如何建模吗?
【问题讨论】:
标签: anylogic