如何解决NetLogo:使用 SDM 中“库存”的值作为 ABM 的输入
我做了两个简单的模型; 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 举报,一经查实,本站将立刻删除。