My understanding is that attractors within nodes should have a capacity of 1, in the sense that in a 3D animation, there should only be one agent per attractor. When I run the model, I am seeing two agent shapes on the same attractor while other attractors are empty.
Is this normal behavior? Is there a way to prevent this from happening?
Note that this is not happening all the time, but as the model is running, sometimes agents go to empty attractors, while other times they go to one that already has an agent.
One option is to create a collection, simple ArrayList will do, of all the attractors
Then in the Process Modelling Block (PML) where you setup the attractor you have a function that returns an Attractor. I supply the agent here so that we can keep track of what agent is sent to which attractor so that we can put the attractor back into the available pile once the agent leaves the attractor location.
Here is the getAttractor function
It gets a random available attractor and then also saves the agent that is taking it to a map
If you want to free the attractor you can simple call this at any point that the attractor is freed
attractorsAvailable.add(mapAgentPerAttractor.get(agent));
mapAgentPerAttractor.remove(agent);
Here is the final result as well as a comparison where we are replciating the problem you described