Reputation: 87
I have a population of agents (called products) that has multiple parameters of different types. The parameters are "amount" of type int and the other is "location" which is a location on the GIS map. Now I would like to store these agents in a collection when they enter an enter block. Does anyone know how to do this? What type of collection could I use and how do I define the elements?
Upvotes: 0
Views: 416
Reputation: 12795
Drag in a collection, keep the default ArrayList
type and set the content type to your agent type.
In the Enter
block's "on enter", write myCollection.add(agent)
That is all :)
Upvotes: 0