我是Netlogo的新手,我正在努力解決以下問題,即在空間環境中實施意見動態模型。 我進口GIS光柵有四個不同的土地利用班(值1-4)用下面的代碼:NetLogo - 如何從GIS字典或兩個並行列表中讀取和存儲GIS柵格數據?
to loadData
clear-patches
initLandCharacter
show "loading landCharacter from file luw6604.asc"
set landUse gis:load-dataset landUseDataSet
show word "rows : "gis:height-of landUse
show word "columns: "gis:width-of landUse
gis:set-world-envelope-ds gis:envelope-of landUse
gis:apply-raster landUse value
resize-world 0 gis:width-of landUse (gis:height-of landUse - (2 * gis:height-of landUse)) 0
在我的模型3人靜品種應具有在世界的每一個補丁基於不同很有高見某些pxcor pycor的土地使用價值以及此補丁與他們自己的位置之間的距離。
因此,我的想法是創建一個字典或並行列表來存儲位置的鍵以及相應的意見。
但是,經過幾天的努力,我比初學者更困惑,我感到完全失去了。 請,如果有人有任何想法,如何解決這個問題。彷彿GIS數據不是你的問題至關重要,我將非常感激
感謝, 揚
嗨,簡,你想要存儲什麼?您可以定義'varX'和'varX'變量,並在行爲空間中獲取結果,或者將'varX'和'varY'定義爲2個列表並記錄每個ticks的pxcor pycor whit'lput' – delaye 2015-01-15 21:45:45