我正在创建关于动物园的Netlogo模型。我需要我的动物园客人(多只海龟)沿着从动物园入口处开始的每24个蜱(在我的模型中1个蜱是1小时)开始的循环路径。它必须移动笼子里的动物,因为我不能让我的客人进入动物区域。路径不一定要快或者最短,我只需要乌龟不要偏离它。我不想用GIS来创建一个通路。在Netlogo中为海龟创建特定路径
我的世界的尺寸是-30到30在两个方向,不包裹。
笼下落说明如下:从您的评论
patches-own [ tigerhabitat?
flamingohabitat?
monkeyhabitat?
hippohabitat?
giraffehabitat?
]
to create-habitats
ask patches with [ pxcor < -12 and pycor > 23 ]
[ set tigerhabitat? true
set pcolor green ]
ask patches with [ pxcor > 20 and pycor > 20 ]
[ set hippohabitat? true
set pcolor blue ]
ask patches with [ pxcor > 18 and pycor < 15 and -1 < pycor ]
[ set flamingohabitat? true
set pcolor 96 ]
ask patches with [ pxcor > -10 and pxcor < 10 and pycor < 10 and -10 < pycor ]
[ set monkeyhabitat? true
set pcolor green ]
ask patches with [ pxcor < -12 and pycor < -20 ]
[ set giraffehabitat? true
set pcolor 67 ]
end
客人是否需要沿着路径只移动一个方向? –
他们可以向一个方向移动(向前)。 – paula
你希望他们遵循的路径在哪里?当我创造栖息地时,我看到了笼子;你能给出更多的细节:你尝试过什么,为什么它不做你想要的?如果您只需要了解从哪里开始,可以查看模型库中包含的一些模型。例如,[Surface Walking 2D](http://ccl.northwestern.edu/netlogo/models/SurfaceWalking2D),Wall Following示例或Look Ahead模型。 –