私はRailsbackとグリムによってエージェントベースと個別ベースのモデリングと呼ばれる本からABMを学んでいます。本によると、最初の完全なモデルが、彼らはこのようになりますを歩く:NetLogo 5.3.1、「予想される[」エラーメッセージ
globals
turtles-own
[
time-since-last-found
]
num-clusters
]
[
time-since-last-found
]
[
num-clusters
]
to setup
clear-all
set num-clusters 4
ask n-of 4 patches
[
ask n-of 20 patches in-radius 5
[
set pcolor red
]
]
create-turtles 2
[
set size 2
set color yellow
set time-since-last-found 999
]
end
to go
ask turtles [search]
to search
if-else time-since-last-found <= 20
[right (random 181) -90]
[right (random 21) -10]
forward 1
ifelse pcolor = red
[
set time-since-last-found 0
set pcolor yellow
]
[
set time-since-last-found time-since-last-found + 1
]
end
本は、私は、単純なキノコ狩りモデルを実行することができるはずと言います。しかし、代わりに、私は余分な[、 "予想される["が必要ですと言うエラーメッセージが表示され続けます。
私はそれを配置する必要がない考えを持っていません。さらに、私はそれが必要ではないと私は思っています。なぜ私が言っているのか理解できません。
ありがとうございます!
おそらくそのコメントを答え、幸運にする必要があります。 –
完了、thanks Nicolas。 –