使用Netlogo过程添加特性

时间:2016-10-17 22:24:53

标签: netlogo

我正在尝试运行以下Netlogo过程:

to spread-virus
  ask turtles with [infected?]
      [ ask link-neighbors with [not infected?]
        [ if random-float 100 < virus-spread-chance
          [ become-infected ] ] ]
end

我不仅要ask turtles with [infected?],还要with [immune?]。除了immune之外,如何添加第二个特征(infected)?

1 个答案:

答案 0 :(得分:0)

来自@alan,with [infected? or immune?]