2016-11-07 32 views

回答

1

是的,雖然你會怎麼做,它會改變NetLogo 5.x和6.x(which is currently in beta)。

在的NetLogo 5.x中,您使用tasks可以這樣做:

to calc-col [ x y ] 
    ask x [ run y ] 
end 

然後你把這個像這樣:calc-col some-agent task [ set pcolor grey ]

在的NetLogo 6.x中,任務已經取代anonymous procedures。您在完全相同的方式(與runrun-result)運行它們,但您使用新->語法定義它們:

calc-col some-agent [ [] -> set pcolor grey ]

相關問題