0

I want to set up the queuing mode from simulation page in my AnyLogic model. I have a combo box with two options: FIFO and fewest remaining operations (FRO). The chosen option is saved in the variable strategie from type String.

In the main page I have the parameter Strategie which is linked to the variable. Now I need a function to change the queueing mode. For FIFO I want to take the standard FIFO Queuing Mode and for FRO the agent comparison with the function: agent1.remaining<agent2.remaining (this variable is already defined in the agent). This is what I already tried.

if (Strategie.equals("FiFo"))
queue.set_queuing(Queue.QUEUING_FIFO);
else {
if (Strategie.equals("FRO"))
????;
else {
error ("Error in Queuing Decision");
}}

but this does not work as the value in the queuing bracktes could not be assigned to a variable. So I’m looking for a correct function.

Thanks in advance!

Anne
  • 1
  • 1
  • if you want to make a customized handling of queue, use a wait block instead of a queue block.. FRO doesn't exist in AnyLogic and you will have to program it yourself – Felipe Mar 25 '20 at 21:55
  • Plus take a look at a Java tutorial on control flow; the syntax of your if...else is incorrect (missing curly brackets and incorrect semi-colon after second if). – Stuart Rossiter Mar 26 '20 at 15:21

0 Answers0