用 Netlogo 程序添加特性
Add characteristic to with Netlogo procedure
我正在尝试 运行 以下 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?]
。除了 infected
之外,如何添加第二个特征 (immune
)?
感谢@alan,with [infected? or immune?]
我正在尝试 运行 以下 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?]
。除了 infected
之外,如何添加第二个特征 (immune
)?
感谢@alan,with [infected? or immune?]