*当有3000个补丁时,netlogo的速度是正常的。但是当我改变世界的大小(99 * 99)时,速度太慢了,大约5分钟更新了10个刻度。我渴望提高速度。以下是代码。
to publish
set contribution_list ( reverse sort [cumulative-contribution] of patches)
let m count patches
if contribution > item (round( m * shibei-proportion) ) contribution_list
[set pcolor blue + 3]
if contribution > item (round( m * (shibei-proportion + bian-proportion)) ) contribution_list
[set pcolor blue + 2]
if contribution > item (round( m * (shibei-proportion + bian-proportion + dahongbao-proportion))) contribution_list
[set pcolor blue + 1]
set cumulative-contribution 0
end