question

Devdatta D avatar image
0 Likes"
Devdatta D asked Jeanette F commented

How to choose a specific task executor based on a condition from a dispatcher

I have dispatcher with two operators. Operators are supposed to pick up widgets from 5 different stock piles. Once operator 1 starts picking from stockpile 1, I don't want operator 2 to pick from stockpile 1 even if widgets are available to pick up. So once an operator is assigned to stockpile it will continue until stock pile is empty. How can I model this using dispatcher? Based on the operator availability either operator could pick from any stockpile.

FlexSim 22.2.4
operatordispatcherconditional
· 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.

Jeanette F avatar image Jeanette F ♦♦ commented ·

Hi @Devdatta D, was Jason Lightfoot's answer helpful? If so, please click the "Accept" button at the bottom of their answer. 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 ·

1 Answer

·
Jason Lightfoot avatar image
0 Likes"
Jason Lightfoot answered Jason Lightfoot edited

Use the dispatcher PassTo for 1 through 3 and then the stockpile exittrigger for 4.


1. Find out which stockpile the task is for (look at task attributes)

2. See if that stockpile has a designated TE (a label on the stockpile object)

3a. If TE already exists PassTo that TE.

3b. If not choose a TE and label the stockpile with a pointer to it.

4. When the stockpile is empty set its TE label to NULL

· 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.

Devdatta D avatar image Devdatta D commented ·
I think I am not sure how to get task attirbute. Where and when do you assign task attribute?


I am assuming I will have to write my own code in the pass to for dispatcher?

0 Likes 0 ·
Jason Lightfoot avatar image Jason Lightfoot ♦ Devdatta D commented ·

Yes, you can refer to the reference for TaskSequence.Task and TaskSequence.

When you create the task sequence (using the default "UseTransport" or process activities) the tasks get various attributes depending on the task type. It sounds like you'll be wanting to check the Involved2 station to see if it matches your stockpile.

The task sequence is passed into the PassTo trigger and is already cast as an instance of the TaskSequence class.

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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