如何在netlogo中的泛型函数中将具有特定属性的品种作为参数传递?

如何在netlogo中的泛型函数中将具有特定属性的品种作为参数传递?,netlogo,Netlogo,下面的代码用几个参数显示了我的函数,其中一些是品种名称,如#询问品种,为了将品种作为参数传递,我使用let breed here turtles here和[breed=#species2]如下: to bwd-reaction2 [ #asking-species #species2 #x-k_off #new-breed x-occupiedepitopes x-size x-exempt_from_immobilisation x-aggregated x-color #hatching-

下面的代码用几个参数显示了我的函数,其中一些是品种名称,如#询问品种,为了将品种作为参数传递,我使用
let breed here turtles here和[breed=#species2]
如下:

to bwd-reaction2 [ #asking-species #species2 #x-k_off #new-breed x-occupiedepitopes x-size x-exempt_from_immobilisation x-aggregated x-color #hatching-species x-occupiedepitopes2 x-size2 x-exempt_from_immobilisation2 x-aggregated2]
  
  let breed-here turtles-here with [breed = #species2]
  ask #asking-species [ 
    if (any? other breed-here) and random-float 1000 < (#x-k_off)
    [
      set breed #new-breed    ;; change back to reactant
      set-attributes2 x-occupiedepitopes x-size x-exempt_from_immobilisation x-aggregated x-color
      ;; then split into two reactants
      hatch-#hatching-species 1
      [
        set-attributes x-occupiedepitopes2 x-size2 x-exempt_from_immobilisation2 x-aggregated2
      ]
      
    ]
  ]
end
对bwd-reaction 2[#询问物种#物种2#x-k#关闭#新品种x-occupidepitopes x-size x-except#U不动x-aggregated x-color#孵化物种x-occupidepitopes2 x-size2 x-except#U不动2 x-aggregated 2]
让我们在这里用[品种=#种类2]繁殖海龟
询问#询问物种[
如果(这里有其他品种)和随机浮动1000<(#x-k#u off)
[
设定品种#新品种#变回反应物
集合属性2 x占用分区x尺寸x免除固定x聚集x颜色
然后分成两种反应物
孵化-孵化物种1
[
设置属性x-occupiedepitopes2 x-size2 x-except_from_immobilization2 x-aggregated2
]
]
]
结束
但是,为了更改下面的函数,使其接受具有特定属性的品种作为参数,我应该如何更改代码

例如,我想:
ask#用[aggregated=false]询问物种

而不仅仅是询问物种


作为论据之一?

如果我正确地阅读了问题,您希望在使用
bwd-reaction2
过程时,改变以不同方式过滤
#提问物种的方式。既然您已经接受了
#asking species
作为一个参数,那么您不能在调用过程时添加过滤器吗<代码>bwd-reaction2(带有[aggregated=false]的海龟)#x-k#U off#新品种…