英文:
Why are agents not following attractors
问题
所以,我有一个模型,我想要插入若干个服务站来处理飞机的进入。 "Main" 看起来像这样:
在服务站人口的属性中,我已将 "初始位置" 设置为 "节点"(围绕吸引子的节点)。 并且参数 "numberOfServiceStations" 包含一个整数 6,以决定初始代理数量。
然而,当我运行模型时,代理会随机散布如下:
有没有一种方法可以根据吸引子来安排服务站代理?
英文:
So, I have a model where I want to insert a number of service stations to handle incoming aircrafts. "Main" looks like this:
In the properties of the serviceStations population I have set the "inital location" to "in the node" (the node surrounding the attractors). And the parameter "numberOfServiceStations" holds an integer of 6 in order to decide the initial number of agents.
However, when I run the model, the agents gets randomly scattered like so:
Is there a way to arrange the service station agents according to the attractors?
答案1
得分: 1
这确实不能直接工作。您可以使用一个小技巧强制您的代理使用引力点:
-
确保将"进入"块设置如上所示,位于"新位置"和"节点"上。
注意:引力点是随机工作的,没有"满"的概念。您可能会看到100个代理位于一个引力点上。
英文:
True, this does not work directly. You can force your agents to use attractors using a small trick:
- Create and
Enter
andExit
flow chart as below, make it accept your agent type:
- Ensure to setup the
Enter
block as above on the "New Location" and "Node" - The initial position in the agent population can stay at the default setting as below:
- In the "on startup" code of the agent type, send them through the
Enter
block:
NOTE: Attractors work randomly and have no concept of being "full". You could see 100 agents on top of each other on 1 attractor.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论