question

Lambert avatar image
0 Likes"
Lambert asked Lambert commented

Passing between dispatchers

Hi I have some operators connected to Dispatcher 1 and different ones connected to Dispatcher 2.

I would like the operators connected to Dispatcher 1 be able to work on tasks of Dispatcher 2, but ONLY when they're idle.

I have done some search (https://answers.flexsim.com/questions/108980/how-to-pass-task-to-correct-dispatcher-when-operat.html) but I am unable to find a solution.

Seems like a simple problem, could you please help?

FlexSim 23.0.3
dispatchers
· 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.

Jason Lightfoot avatar image Jason Lightfoot ♦♦ commented ·
Try making a second connection to an operator from dispatcher 2 directly - I feel there's a good chance the operator, when free, will accept jobs from the dispatcher on input port1 before considering the dispatcher on input port 2
1 Like 1 ·
Jason Lightfoot avatar image Jason Lightfoot ♦♦ commented ·

Hi @Lambert, was one of Felix Möhlmann's or Long G's answers helpful? If so, please click the "Accept" button at the bottom of the one that best answers your question. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always unaccept and comment back to reopen your question.

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

I think a "Pull logic" where the operators decide which available task to work on next would work better in this case.

You can implement this by having the processors push the tasks to a list and pull them in a Process Flow by tokens that each represent one operator. To distinguish between the groups, you can push the tasks to different partitions. The tokens first try to pull a task from their own group, if not successful they see if other work is available.

pulltasks_fm.fsm

For multiple groups of operators, using partitions can get cumbersome, since you can only ever try to pull from one partition at a time.

An alternative approach is to write the task group to the list as a push argument (added directly to the push command in the processors' operator field code at line 36).

Tokens can then compare their value to that of the list entry and sort by whether they match or not when pulling a task sequence.

pulltasks_fm_1.fsm


pulltasks-fm.fsm (50.8 KiB)
pulltasks-fm-1.fsm (52.0 KiB)
· 1
5 |100000

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

Lambert avatar image Lambert commented ·
thank you all for your help!! as always super helpful
0 Likes 0 ·
Lambert avatar image
0 Likes"
Lambert answered Joerg Vogel commented

Hi, I have a follow up question if I may.

Is there a way of forcing a dispatcher assign a task to a specific operator based for example on an operator label?

In other words, I have 5 operators connected to one dispatcher moving items from queues. I want 1 specific operator of those to be the only one able to pick up items from a different queue.

thank you!

· 6
5 |100000

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

Joerg Vogel avatar image Joerg Vogel commented ·
If you can choose or implement in Pass To function Port by Case AND you can evaluate a statement returning discrete numbers for tasksequences then you can pass distinct tasksequences to special output ports in a dispatcher.

I think of for example a tag tasktype to be inserted in your transport task to distinguish between your different travel destinations.

For Example: Operator3 is connected to output port number 4 of a dispatcher. He should load all transport task from Queue C. Then you can insert a tag task to all your receiving tasksequences at this dispatcher. First parameter is by default e.g, 25 or any other number and for loadstation Queue C is it 2. In Pass To function you evaluate the first parameter of tag task in Port by Case picklist option. Case 2 returns for output port number 4 a 4. And any other case are returning by default statement a value of 0 which is interpreted as any available port.
This approach can you enhance to connect at output port number 4 another dispatcher, which is connected to other or already used operators to filter different conditions for tasksequences. In Pass To function the option first available or in source code a return 0; statement chooses to pass tasksequences to availble taskexecuter by order of output port connections. See @Jason Lightfoot comment on this above.

If you had pushed all tasksequences to a list you can naturally filter the list by customized expression fields and control transfers of tasksequences this way. Each list properties has got an Advanced Tab to insert fields to evaluate different attributes of pushed value. Those field values can you use to choose a distinct value from a list by matching conditions. In your case you push as a list value your tasksequences.

0 Likes 0 ·
Lambert avatar image Lambert Joerg Vogel commented ·
Thank you very much Joerg! Could you please tell me how to insert a tag task to a task sequence, and how to reference it later when evaluating in the Pass To function?

I've never done anything like that.

Thanks again


0 Likes 0 ·
Felix Möhlmann avatar image Felix Möhlmann Lambert commented ·

The TAG task type is (to my understanding) mostly useful if you build custom task sequences with a varying amounts and types of tasks in them. A tag can then be an easy way to distinguish between them.

If you only use the dispatcher to assign task executers to transport tasks that were generated by fixed resources you can generally rely on the format being the same for all tasks. (Travel, Load, Break, Travel, Unload in that order)

1677749972208.png

So in the "Pass To" field you can access any determining features directly. For example the destination would either be "involved1" of task 4 or "involved2" of task 5.

In the attached example, all items going to Queue3 must be transported by Operator3. Others use the "First Available" method ("Pass To" returns a 0).

TaskSequenceParsing_fm.fsm

0 Likes 0 ·
Show more comments
Long G avatar image
0 Likes"
Long G answered Lambert commented

Just make 'A' connection from 'Dispatcher 2' to 'Dispatcher 1' at the end, and default setting of 'Pass To'(First Available) meets the request.

· 1
5 |100000

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

Lambert avatar image Lambert commented ·
thank you, ill try this too as sounds super simple!
0 Likes 0 ·