Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/algorithm/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Netlogo 使用和&;询问半径范围内的修补程序;或条件_Netlogo - Fatal编程技术网

Netlogo 使用和&;询问半径范围内的修补程序;或条件

Netlogo 使用和&;询问半径范围内的修补程序;或条件,netlogo,Netlogo,我试着要求给定半径内的补丁子集执行一个操作。我想知道是否可以使用AND和OR控件调用radius中的补丁?示例:我想将森林补丁、草地补丁或作物补丁称为同样经过认证的补丁,如下所示: To identify-patches ask patches in-radius 5 with [land-cover = "forest" OR land-cover = "grass" OR land-cover = "crop" AN

我试着要求给定半径内的补丁子集执行一个操作。我想知道是否可以使用AND和OR控件调用radius中的补丁?示例:我想将森林补丁、草地补丁或作物补丁称为同样经过认证的补丁,如下所示:

To identify-patches

   ask patches in-radius 5 with [land-cover = "forest" OR land-cover = "grass" OR land-cover = "crop" 
   AND certified? = "yes"

End

我尝试了几个括号组合,但似乎没有一个选择我正在寻找的补丁的子集,似乎只要我使用和,这个条件就适用于所有补丁。所以,我想知道你们是否知道一种方法,我可以在这些条件下询问这个子集?

所以认证只适用于草和作物?如果是这样,我想这就是你想要的:

to identify-patches
  ask patches in-radius 5 with [land-cover = "forest" or ((land-cover = "grass" or land-cover = "crop") and certified? = "yes")]
end

那么认证只适用于草和农作物?如果是这样,我想这就是你想要的:

to identify-patches
  ask patches in-radius 5 with [land-cover = "forest" or ((land-cover = "grass" or land-cover = "crop") and certified? = "yes")]
end