私は、パッチが建物と同等で、影響力の値が異なる移動を見るために都市景観をモデリングしています。カメは最も高い影響値とパッチの方が、定義された通りに沿って移動するnetlogo:レポーターを使用して影響値を計算する
(its own influence) plus (the influence of neighbors) divided by the
distance to a specific turtle (max-one-of distance myself)
:私のようなもので、各パッチの値を算出し、レポーター機能を使用する必要があります。
私はnetlogoを使い始めたばかりで、完全に立ち往生しています。
これまでの内容の一部を取り上げましたが、各パッチの影響値(イン・コーン)を計算するレポーター機能をどのように記述すれば、カメが最高の選択肢。
to setup-influence-field
ask patches with [pcolor = green] [set influence commercial-influence]
ask patches with [pcolor = orange] [set influence production-influence]
ask patches with [pcolor = yellow] [set influence domestic-influence]
ask patches with [pcolor = pink] [set influence religious-influence]
ask patches with [pcolor = blue] [set influence public-influence]
end
to go
move-serapis
end
to move-serapis
ask serapis [set-procession-heading]
repeat 2 [ ask serapis [ fd .25 ] display ]
tick
end
;;;;; the reporter values are need for this part of the code so that the turtles (serapis) can move towards the patches with the highest influence value;;;;
to set-procession-heading
let direction patches in-cone 4 40 with [influence-field > 0]
if any? influence-field
[face max-one-of influence-field] ;;;; face towards the highest computed influence value
ifelse any? patches with [pcolor = black] in-cone 1 25
[process]
end
ご協力いただければ幸いです。