简体   繁体   English

AnyLogic,代理移动到多个位置并返回到原始位置

[英]AnyLogic, Agent Movement to multiple locations and returning to original location

How can I move an agent Truck from one place to multiple places one by one and then return to original place?如何将代理卡车从一个地方一个一个地移动到多个地方,然后再回到原来的地方?

What should I use: Process modelling or statechart to approach?我应该使用什么:流程建模或状态图来处理?

Any suggestion would be helpful.任何建议都会有所帮助。

both are possible.两者都是可能的。 If you select Process modelling then your truck should loop through moveTo block for every new destination.如果您 select 流程建模,那么您的卡车应该循环通过 moveTo 块以到达每个新目的地。 Use selectOutput to terminate the loop.使用 selectOutput 终止循环。 If statechart: again loop but this time between two states: say "inDestination" and "goingToNextDestination".如果状态图:再次循环,但这次在两个状态之间:说“inDestination”和“goingToNextDestination”。

I both cases you need to take care about some data structure that will store a list of unvisited locations.在这两种情况下,您都需要注意一些将存储未访问位置列表的数据结构。

Hope that helps, otherwise let us know.希望有帮助,否则请告诉我们。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM