*When there are 3 thousand patches,the speed of netlogo is normal. But when I change the size of world(99*99), the speed is too slow about 5 minutes update 10 tick. I am eager to improve the speed of it. The following is the code.
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