【问题标题】:NetLogo - Create functions that affect landscape equallyNetLogo - 创建同样影响景观的功能
【发布时间】:2015-08-08 16:29:31
【问题描述】:

我有一个 NetLogo 模型,我想为它创建不同的人为干扰场景,影响整个景观的食肉动物“猎物”。这是我的真实保护区的 NetLogo 景观。浅色像素比深色像素具有更高的猎物值。

我想创建功能来模拟来自保护区边缘的人为干扰。我想尝试不同的函数,例如 sigmoidal 和指数衰减(即,靠近保护区边缘的区域的猎物像素值比远离边缘的猎物像素减少得更多)。

我可以通过以下方式实现一些简单的功能:

ask patches with [is-park?] ; patches inside the protected area
[
set dist-boundary distance (min-one-of patches with [is-park? = FALSE][distance myself]) ; calculate distance of patch from edge of park
set prey (prey - e ^ (- dist-boundary / 10)) ; scenario 1 human disturbance
set prey (prey - (-0.1 * dist-boundary ^ 2 + 0.9 * dist-boundary)) ; scenario 2 human disturbance
]

但是,理想情况下,我希望创建一组场景,以使每种场景的猎物减少总量相等(但在整个景观中的分布不同)。这将使我能够独立于影响的总幅度来评估人为干扰的空间分布的影响。关于如何做到这一点的任何想法都会对我有很大帮助。我已经坚持了一段时间了。

【问题讨论】:

  • user2359494,这似乎更像是一个数学问题,而不是 NetLogo 问题。在 NetLogo 中实现数学函数似乎并不困难。相反,您有一组要求,并且您正在寻找一组满足这些要求的数学函数。我建议更抽象地制定要求,然后在 math.stackexchange 上提问。我认为您正在寻找的是一组功能,除其他外,它们在整个环境中具有相同的积分(“总猎物减少......相等”)。

标签: netlogo


【解决方案1】:

听起来您正在寻找“漫反射”功能。

diffuse "patch-variable" "number"

当你在一个补丁中有一个人(可能是一只乌龟)时,他们可以扩散“负面影响”一个补丁变量 double 我刚刚发明的它会移除猎物并减少它。

    ask patches with [human?] ;patches with a human create negative influence
     [
      set negative-influence 8.8; can be any number
     ]

所以你已经创造了负面影响,现在我们实施扩散:

   ask patches with [negative-influence>1]
    [ 
        set prey prey-(factor*negative-influence); removes some prey
        set negative-influence negative-influence*(1-factor); reduce negative-influence
        diffuse negative-influence 0.5 ; half gets diffused into neighboring patches
    ]

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-11-18
    • 1970-01-01
    • 2017-03-13
    • 2021-12-11
    • 1970-01-01
    • 2021-02-18
    相关资源
    最近更新 更多