question

Omar Aguilera Rico avatar image
0 Likes"
Omar Aguilera Rico asked Arun Kr commented

Problem with Round Robin

embarques.fsmI have a problem with the Pull strategy of QUEUE 8, first I have to pull material from QUEUE 10 and then QUEUE 6 repeating this logic indefinitely. The problem is that, if you respect the logic the first six times and the seventh does not respect, instead of going through the units to the QUEUE 10 goes to the QUEUE 8. Why is this problem that does not respect the logic of Round Robin? How do I solve this problem? Regards!

FlexSim 17.2.2
pull strategyround robin
embarques.fsm (2.0 MiB)
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

Jordan Johnson avatar image
0 Likes"
Jordan Johnson answered Arun Kr commented

If you are defining a specific procedure of the sort you are describing, I would strongly recommend using a Process Flow. That way, if the procedure needs to be more complex, it's easy to update. Also, it's much easier to predict.

I made a demo model, with a Task Executer Flow. It looks like this:

Both queues push their items to a list, rather trying to use push or pull logic. The operator waits for a chair, then transports it. Then the operator waits for a cover, and then transports it as well.

embarques-processflow.fsm


· 3
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Arun Kr avatar image Arun Kr commented ·

Hi @jordan.johnson,

As @Omar Aguilera Rico pointed out, why was the operator going to the same queue after the sixth delivery?

Regards,

Arun KR

0 Likes 0 ·
Phil BoBo avatar image Phil BoBo ♦♦ Arun Kr commented ·

The Pull Strategy code is correctly returning values in a round robin fashion: 1, 2, 1, 2, 1, 2, etc.

The issue is happening because the model is using transport and one of the upstream objects is starved. This is leading to a situation described below.

If you open the model and set the reset positions on the operators so that the model is repeatable, then this is what is happening:

  • At time 38.828585, Operator5 unloads to Queue10
    • which causes an item to be released from Queue10, to enter through the opened port 1
    • which causes Pull Strategy to fire again, returning 2, opening port 2
    • which causes an item to be released from Queue6, to enter through the opened port 2
    • which causes Pull Strategy to fire again, returning 1, opening port 1
  • Everything is fine at this point, with the Operator having task sequences from Q6 > Q10 > Q6 > Q10 > Q6.
  • At time 39.885999, Operator4 unloads to Queue8
    • which causes Pull Strategy to fire again, returning 2, opening port 2
    • which causes an item to be released from Queue6, to enter through the opened port 2
  • The issue has now surfaced, with Operator having task sequences from Q10 > Q6 > Q10 > Q6 > Q6.

Everything is working as designed for each individual part of the system, but the combined actions are not what was desired. The Pull Strategy is returning ports in a round robin fashion, but what was actually desired was that items enter the queue in a round robin fashion. The Pull Strategy is firing more often than desired for the intended outcome.

The way to fix this is to do as Jordan demonstrated: use Process Flow to control the logic at the system level instead of individual components on the objects that are not working together the way you want.

3 Likes 3 ·
Arun Kr avatar image Arun Kr Phil BoBo ♦♦ commented ·

Thanks phil.

0 Likes 0 ·