选定品种最大的一组乌龟

问题描述 投票:0回答:1

我收到以下错误消息:

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

其中bagchildren-owninfant-own中定义。 Toys没有bagChildren, infanttoys是我在模型中考虑的品种。由于我只考虑attribute1children's infant's中的最大值bags,而不考虑toys'中的最大值,我该如何相应地更改代码?

谢谢您的帮助

netlogo
1个回答
0
投票

首先,从您的另一个问题(Error in plotting: OF expected input to be a turtle agentset or turtle),'bag'是代理列表,而不是代理集。

但是,我认为书包里装有玩具。为什么您想要的代理集不只是“玩具”?

© www.soinside.com 2019 - 2024. All rights reserved.