netlogoで感染したカメの累積平均を計算しようとしていますが、どのコードを正確に使用すればよいのか、netlogoコードのどこに配置すればよいのかわかりません。いくつかのテストを行い、ノードの平均を計算しようとしましたが、正しくありません。私もリストを作成しようとしましたが、どちらも成功しませんでした。コードのどこに行を配置する必要がありますか?
ここにいくつかのコード:
observer> show mean [num-infected] of turtles
observer: 198
observer> show mean [num-infected] of turtles / length num-infected
observer> show mean [num-infected] of turtles / length [num-infected] of turtles
observer: 0.99
observer> show sum [num-infected] of turtles / length [num-infected] of turtles
observer: 197
observer> show count [num-infected] of turtles / length [num-infected] of turtles
observer> show mean [num-infected] of turtles / length [num-infected] of turtles
observer: 0.955
observer> show sum [num-infected] of turtles / length [num-infected] of turtles
observer: 191
observer> show sum [mean num-infected] of turtles
observer> show mean [ num-infected] of turtles
observer: 191
observer> show mean [ num-infected] of turtles
observer: 1
observer> show mean [ num-infected] of turtles
observer: 198
observer> show mean [ num-infected] of turtles
observer: 198
observer> show mean [ num-infected] of turtles
observer: 198
observer> show [ num-infected] of turtles
observer> show count turtles with [infected? = true]
observer: 198
observer> show count turtles with [infected? = true] / length [num-infected] of turtles
observer: 0.99
observer> show count num-infected / count turtles with [infected? = true]
ERROR: Expected an agentset here, rather than a list or block.
ありがとう。