【发布时间】:2021-10-22 08:57:39
【问题描述】:
我试图让代理与其他代理之间的距离小于指定距离时,它们会改变颜色。但是当我使用getNearestAgent(this.getPopulation()) 时,它会给我人口列表中位置 0 的代理。
我正在使用一个事件来让代理改变颜色。
this is the code of the event and the output of the console
颜色变化取决于事件的发生率,有时还取决于与点 (0,0,0) 的距离
【问题讨论】:
标签: anylogic agent-based-modeling