1
votes

I want to assign priority to my agents and then queue them based on that. I have an agent Container which has two parameters carrier (which can be either Truck or Train) & priority (which is to be assigned with some value). 50% of agents where carrier=Truck and 50% of agents where carrier=Train should be assigned priority 1 and rest should be zero. How can I do that?

This is my model. [model]. I want to move the above mentioned agents from storage1 to rackPick block on priority.

Thanks in advance.

1

1 Answers

0
votes

This can be achieved by creating an integer 'priority' field in the agent and then setting it to 0 or 1 based on random(0.5) value in the on at exit action of the originating Source and then checking that field in the Queue to get priority. It won't be exactly 50% but pretty close for a large enough number of agent.