0
votes

In AnyLogic, my agent has integer parameters agent.size and agent.height

In a queue, I would like to select the agents with a specific size, i.e., agent.size == 5 over the other agents. In a size tie, I would like to select the one with biggest height. How can I model this?

I think I should define this in the priority-based section of the queue module. But, there I can only say agent.size and the larger size will have more priority. How can I adjust this to be able to give a hierarchy (not from a database input, but with parameters which change during the run)?

1

1 Answers

1
votes

You should put queueing rule to be "Agent comparison".

You have to write a condition more or less like this:

agent1.size == 5  && agent1.size == agent2.size ? 
    agent1.height > agent2.height : agent1.size == 5 ?
        true : agent1.size > agent2.size