I have a simple model with two agents, Shipment and Location. The Shipment has different parameters including "destination". The Location is a population of agents with a parameter called "name" which is the name of each location and another parameter called "shpNbr".
The shipments start from source, go to the queue and then delay block. In delay block, I want to check the shipment's destination and if it is equal to one of the name parameters in location, it increases the shpNbr parameter for that location by one. I appreciate it if someone could help me with that. I do not know how to refer to the parameters of different agents in the Main window and compare them.
for (Location l: locations){
if (l.name.contains(agent.destination))
l.shpNbr++;}