我有两个品种:supras和subs。
我想画两行:
我该怎么做?我试过这个:
System-specific pagecopy.h files should define these macros and then
#include this file:
...
PAGE_COPY_FWD (dstp, srcp, nbytes_left, nbytes)
plot count (subs with [one-of neighbors = supras]) / num-turtles
每个人口的数字始终为0,但情况并非如此。这是我的代码:
plot count (supras with [one-of neighbors = subs]) / num-turtles
答案 0 :(得分:2)
neighbors
会返回patches
的代理集,因此说neighbors = supras
无法满足您的需求 - 没有补丁supras
或subs
。相反,您要检查是否有任何邻居有supras-here
或subs-here
。这对我有用:
plot (count ( subs with [ any? neighbors with [ any? supras-here ] ] ) ) / ( count turtles )
plot (count ( supras with [ any? neighbors with [ any? subs-here ] ] ) ) / ( count turtles )
您可能希望将Y max缩小到1,以便查看更多内容。