我的模型我有几个版本的我的世界应该是什么样子。我将其实现为“选择器”,包括选择:“single_tree”“集群”。我的世界是 501 * 501 个补丁。
当我运行setup
我的两个变体时,直到我按下工具 - >“暂停”,它们才会被创建。
我真的不明白为什么,因为在我的工作模型上这很好用。此外,当我使用基本参数运行这个“世界变化”时 - 只需使用 [set pcolor ...]。
请问我的模型有什么问题或者我做错了什么?
这是工作示例 - 工作正常:
to setup-patches ; define patchy landscape
ask patches [
; Single tree
; -------------------------
if world = "single_tree" [
set pcolor green
]
; Clustered trees
; -------------------------
if world = "clustered" [
set pcolor red
]
end
这里有一些更复杂的代码,但我看不出有什么理由花这么长时间来显示..
to setup-patches ; define patchy landscape
ask patches [
; Single tree
; -------------------------
if world = "single_tree" [
ask patches with [pxcor mod 50 = 0 and pycor mod 50 = 0] [
set pcolor red
]
]
; Clustered trees
; -------------------------
if world = "clustered" [
ask patch 0 0 [
ask patches in-radius (2.99 * Grid) with [pxcor mod Grid = 0 and pycor mod Grid = 0] [
set pcolor red
]
]
; ; determine cluster size
ask patches with [pcolor = red] [
ask patches in-radius radius [
set pcolor yellow
]
]
]
end
我真的很感激任何建议,非常感谢你!