我收到以下错误消息:
List inputs to TURTLE-SET must only contain turtle or turtle agentset elements. The list [(toy 10)(toy 9) 0 (toy 7)] contained 0 which is NOT a turtle or turtle agentset
因为乌龟被安置在
set picked_toy max-one-of turtle-set [bag] attribute 1
其中bag
在children-own
和infant-own
中定义。 Toys
没有bag
。 Children, infant
和toys
是我在模型中考虑的品种。由于我只考虑attribute1
和children's
infant's
中的最大值bags
,而不考虑toys
'中的最大值,我该如何相应地更改代码?
谢谢您的帮助
首先,从您的另一个问题(Error in plotting: OF expected input to be a turtle agentset or turtle),'bag'是代理列表,而不是代理集。
但是,我认为书包里装有玩具。为什么您想要的代理集不只是“玩具”?