Netlogo:是否可以使用不同的补丁大小来节省建模的计算时间?



我是Netlogo的新手,我的想法是模拟水和浓度流。 我的模型的比例约为 1/10 毫米;由 7.7 厘米至 2.6 厘米的单元格。这会产生大约 200200 个补丁,这消耗了相当多的计算能力。我的问题是,是否可以在Netlogo的特定点创建更粗糙的网格?我知道这在CFD建模,地下水建模,

...感谢您的帮助!我锁定了一个很好的讨论。

此致敬意

基督教

不可能有不同大小的补丁。但是,您可以创建修补程序集,将修补程序组合到一个命名实体中。这将允许你解决一些计算能力问题,但也可能导致相当尴尬的编码。下面是一个随机更改色块颜色但将某些区域视为单个单元的示例。

globals [ list-of-regions region1 region2 ]
patches-own
[ regionID
]
to setup
clear-all
ask patches
[ set regionID 0
set pcolor one-of [ green brown yellow ]
]
set region1 patches with [ pxcor > -10 and pxcor < 0 and pycor > -10 and pycor < -6 ]
ask region1
[ set regionID 1
set pcolor red
]
set region2 patches with [ pxcor > 5 and pxcor < 10 and pycor > 0 and pycor < 3 ]
ask region2
[ set regionID 2
set pcolor blue
]
set list-of-regions (list region1 region2)
reset-ticks
end
to go
ask patches with [regionID = 0 ] [ set pcolor one-of [ green brown yellow ] ]
foreach list-of-regions
[ #region ->
let this-colour one-of [ red blue ]
ask #region
[ set pcolor this-colour
]
]
tick
end

NetLogo非常自然地处理个人级别的patch-sets,但是如果您不想单独编写每个patch-set的操作,则需要切换到列表。

最新更新