question

cyc avatar image
0 Likes"
cyc asked Felix Möhlmann commented

How to dispatch task to operator correctly?

Hello, experts! I'm not entirely clear on how the Dispatcher receives and dispatches task sequences, which has led to some issues with the dispatch process. If expert could thoroughly explain how task sequences are observed and correctly set up in the following example, I would be grateful. Your help would mean a lot to me, so thank you in advance for your assistance.


Let me first use a model and then explain my issue using it: ProblemModel.fsm

1729129485036.png

In this scenario, there are two Processors, each with a Process Time of 5 seconds, and both require two operators to function. The only difference is that I have set the Priority of the red Processor to 10 and the green Processor to 5, meaning I want the red Processor to have a higher priority for operations. I have connected these Processors to a Dispatcher and assigned three Operators to receive tasks.

1729129493812.png

Here's the problem: even though the red Processor has a higher Priority, when I run the model, the three Operators initially go to the green Processor, which has a lower Priority. The Dispatcher is not assigning tasks according to the Priority as I intended. In an ideal scenario, based on the Priority, Operator1 and Operator2 should go to the red Processor first instead of the green Processor.

1729129504329.png

In the Dispatcher settings, the Dispatcher properties are set to default, meaning the Pass To and Queue Strategy may not align with my understanding. Could it be that I am misunderstanding or misconfiguring something here? Thank you for reading and assisting—I'm grateful for the expertise provided by all of you.

FlexSim 24.2.1
dispatcheroperatertasksequencesdispatch
1729129485036.png (216.8 KiB)
1729129493812.png (231.0 KiB)
1729129504329.png (38.9 KiB)
problemmodel.fsm (40.4 KiB)
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

Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered Felix Möhlmann commented

The green processor receices its item first (Source1 is Source2 in the tree and thus creates an item first). The task sequences for this item are created and dispatched before the red processor receives an item. The priority never comes into play because the task sequences are not in the task sequence queue of the dispatcher at the same time.

You could allow the tasks of the red processor to preempt other tasks and set the dispatcher's Pass To option to "First Available Unless Preempting". However, this would require to write custom logic that prevents both task sequences of the same processor getting passed to the same operator.

A simpler and easier to follow option is to not have the dispatcher pass the task sequences out at all (-1 in the Pass To field). Instead it pushes all received sequences to a list. In a simple Process Flow, tokens representing each operator can pull from the list and dispatch the task sequences to the respective operator. A list has the option to "Allow Multiple Pushes Before Back Order Fulfillment", meaning it will wait for more values to pushed at the same moment before making them available to be pulled.

problemmodel(1).fsm


problemmodel1.fsm (122.3 KiB)
· 2
5 |100000

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

cyc avatar image cyc commented ·

Dear @Felix Möhlmann, thanks for your help.

I haven't fully understood your explanation, but it works correctly under my original configuration. Thank you very much!

However, when I tried to apply it to a scenario more closer to a real-world setup, it didn’t work as expected.1729174088107.png

I want specific Dispatchers to handle only certain Processors. For example, Dispatcher2 (green) should have Operator 3 and Operator 4 work exclusively with Processor1 and Processor4, while Dispatcher1 (red) should have Operator 3 and Operator 4 work exclusively with Processor2 and Processor3. Additionally, each Dispatcher must consider the task's priority when dispatching, as these tasks have different priority levels. The reason for this setup is that products entering the production line earlier need to be completed and moved out first. Therefore, the Processors closer to the endpoint should have progressively higher priority to replicate a realistic production scenario.

In the above context, I used your Process Flow settings, but the Dispatcher or TS List is unable to assign tasks to the Operators as expected.

For example, in the below figure, The item on Processor 3 enters the production line first, so it needs to be completed first. However, Operator 1 and Operator 2 are working on the item on Processor 2, which entered later. This indicates that the Operators are not considering the task Priority while working.

1729174345894.png

For example, in the below figure, Processor3 (red) is handled by Operator 3 and Operator 4, which conflicts with the S link of Dispatcher2, while Processor4 (green) is handled by Operator 1 and Operator 2, which also conflicts with the S link of Dispatcher1.1729174116126.png

Could you advise on how to resolve this? Thanks again!

problemmodel2.fsm

0 Likes 0 ·
1729174088107.png (130.2 KiB)
1729174116126.png (121.9 KiB)
1729174345894.png (121.7 KiB)
problemmodel2.fsm (53.7 KiB)
Felix Möhlmann avatar image Felix Möhlmann cyc commented ·

You can use list partitions to have the operators only pull tasks that were received by the dispatcher they are connected to.

problemmodel2_list_partitions.fsm

The usage of the list was only to allow the priority to work if tasks become available in the 'wrong' order but at the same time (0s inbetween). If there is any finite amount of time between the item entries, the first item will be worked on first.

There are ways to increase this timeframe. In the example below tasks have up to 0.5s (Max Wait Time in the Batch activity) to accumulate before they are made available to the operators who will then choose the highest priority task of their dispatcher.

problemmodel2_list_partitions-wait-time.fsm

0 Likes 0 ·