问题描述
我做了两个简单的模型; Netlogo 中的一种系统动力学模型和一种基于代理的模型。 SDM 有一个库存“游客”,其价值取决于流入和流出。每个刻度重新计算该值。游客在 ABM 中每一刻都萌芽。现在,我想使用 TouristStock 的值作为基于代理的模型中每个刻度发芽的海龟的输入。做这个的最好方式是什么?我已经检查了模型库中的示例代码(如 Tabonuco Yagrumo 模型),但对我来说没有任何意义。将这些模型相互集成的最佳方法是什么?提前致谢!
ABM的相关代码如下:
to go
clear-turtles
;sprouts turtles only on patches with value beach AND patches that are close to the lagoon (calculated in ArcMap)
;the initial number of tourists is multiplied by the percentage of tourists that were satisfied in the prevIoUs tick.
;percentage of tourists that were not satisfied is subtracted from 100 and divided by 100 to make it a factor between 0-1.
ask n-of (initial-number-tourists * ((100 - percent-dissatisfied) / 100)) (patches with [ beach_close_to_lagoon = 1])
[
sprout 1 [
set color black
set size 10
]
]
ask turtles [
set neighbor min-one-of other turtles [distance myself] ;; choose my nearest tourist based on distance
set distance-tourist distance neighbor ; measure/calculate distance of closest neighboring tourist
]
ask turtles
[ ifelse distance-tourist > 5
[ set satisfied? True]
[ set satisfied? False ] ]
update-turtles ;before the end of each tick,the satisfaction of each turtle is updated
update-globals ;before the end of each tick,the percentage of satisfied tourists is updated in globals
;clear-turtles ;because each tick represents one day,the tourists will leave the beach after one tick so the turtles will die
tick
end
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)