[Screenshot] I'm sorry it's in german..
1I have a problem with a pickup element in AnyLogic. I have two agents: pallets and pieces.
If an order arrives I combine the two with a pickup element (pallet in inPort) with "at least 4 pieces" and I also set up a parameter on the Agent pallet with the name amountofpieces.
I now want to know exactly how many pieces there are in the container pallet, so that I can add the amount of pieces to my stock variable.
With: Agent.amountofpieces = container.contents().size() I get a error note.
Also Agent.amountofpieces = pallet.contents().size() is not working.
I later want to add it to a variable (name: stock). My code now is: stock += + Agent.amountofpieces.
Do you maybe have an idea how to solve it?
Or is there another posibility to get the amount of agents that went out as "one" new agent?