这是我基于hunter-gatherer代理的模型,我正在尝试将GIS层集成到https://auckland.figshare.com/articles/Source_Code_Netlogo_5_3_1_for_Perry_O_Sullivan_Hunter-gatherer_agent-based_model_see_Journal_of_Archaeological_Method_Theory_/5327944
中我无法弄清楚如何使用自己的数据进行代理交互。在这里可能需要一点点,但是没有人知道吗,通过在NetLogo 5.3.1中查看此模型的代码,可以确定禁用模型运行的最简单方式来禁用横向初始化,而不会抛出其他任何情况并加载我的数据代替它?
模型本身使用SINMAP算法(包含在simmap_code_v1.8.nls中)生成抽象风景。我可以使用以下代码将图层加载到模型中
extensions [ gis ]
globals [ twelveK-dataset
sinks-dataset
elevation]
;; Landscape initialization based on GIS data.
to setup
clear-all
;Load all datsets
set twelveK-dataset gis:load-dataset "twelveK.asc"
set sinks-dataset gis:load-dataset "Combined Karsts.shp"
; Set the world envelope to the union of all of our dataset's envelopes
gis:set-world-envelope (gis:envelope-union-of (gis:envelope-of twelveK-dataset)
(gis:envelope-of sinks-dataset))
reset-ticks
end
; Drawing a raster dataset to the NetLogo drawing layer, which sits
; on top of (and obscures) the patches.
to display-elevation
gis:paint twelveK-dataset 52
end
; Drawing point data of karst features shapefile (combinded GIS layer of reported
; and modeled sinks in Gulf Of Mexico) and optionally loading the data into turles
to display-sinks
gis:set-drawing-color blue
gis:draw sinks-dataset 1
end
理想情况下,与之交互的补丁将是我的接收器数据集周围的缓冲区。该模型将以相同的方式工作,但具有空间明确的设置,而不是使用simmap_code_v1.8.nls包生成的随机设置。