为什么代理不遵循吸引子

huangapple go评论41阅读模式
英文:

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

这确实不能直接工作。您可以使用一个小技巧强制您的代理使用引力点:

  1. 创建一个"进入"和"退出"流程图,如下所示,使其接受您的代理类型:
    为什么代理不遵循吸引子

  2. 确保将"进入"块设置如上所示,位于"新位置"和"节点"上。

  3. 代理群体中的初始位置可以保持默认设置,如下所示:
    为什么代理不遵循吸引子

  4. 在代理类型的"启动时"代码中,将它们通过"进入"块发送出去:
    为什么代理不遵循吸引子

注意:引力点是随机工作的,没有"满"的概念。您可能会看到100个代理位于一个引力点上。

英文:

True, this does not work directly. You can force your agents to use attractors using a small trick:

  1. Create and Enter and Exit flow chart as below, make it accept your agent type:
    为什么代理不遵循吸引子
  2. Ensure to setup the Enter block as above on the "New Location" and "Node"
  3. The initial position in the agent population can stay at the default setting as below:
    为什么代理不遵循吸引子
  4. 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.

huangapple
  • 本文由 发表于 2023年5月29日 22:55:22
  • 转载请务必保留本文链接:https://go.coder-hub.com/76358343.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定