question

SudheerReddy avatar image
0 Likes"
SudheerReddy asked Joerg Vogel commented

Query on Task Executer

In Process 2 , in process flow I have written a logic for Task Executer 2 to carry one item. But when Task Executer 2 come to Queue2 , and if Queue2 has 10 items, then Task Executer 2 has to carry all 10 items and deliver the 10 items to respective destinations (each item has different destination or same destination based on the destination it has to deliver the items), if Queue2 has 4 items it has to carry all the 4 and deliver the 4 items to respective destinations. So I have to write a loop logic for loading activity and travel to each respective destination( here destination is Queues in the model).

Please help me on these.

taskexe.fsm

FlexSim 19.1.2
task executer
doubt1.jpg (25.7 KiB)
taskexe.fsm (49.7 KiB)
· 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.

SudheerReddy avatar image SudheerReddy commented ·
0 Likes 0 ·
Jeff Nordgren avatar image Jeff Nordgren commented ·

@Sudheer R,

I'm a little confused on what you want the transporters to do. Pickup and deliver one flowitem regardless of how many are in the queue? Or to pickup everything in the queue and then deliver the flowitems to their destination? Any more information about what should happen would be helpful in answering your questions.

Thanks.

0 Likes 0 ·
SudheerReddy avatar image SudheerReddy Jeff Nordgren commented ·

@Jeff Nordgren to pickup everything in the queue and then deliver the flowitems to their destinations

Thank you

0 Likes 0 ·

1 Answer

·
Joerg Vogel avatar image
1 Like"
Joerg Vogel answered Joerg Vogel commented

Put the destination at a label to the item. Push the item OnEntry to a list. If the taskexecuter gets available, pull all items from the list ORDERED BY same destination. The pulled items references are in an array. You call a sub flow that do the delivery. There you add a label called “item” to transfer a reference to one token of the sub flow. You get the reference by the local variable “creationRank” or you return from the array the first or last entry by the method pop() or shift(). Both method delete the entry from the array. I have used a variant in an previous answer.

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

SudheerReddy avatar image SudheerReddy commented ·

@Jörg Vogel

Thanks for your support. Could you please update the model with pop() or shift() method as you specified in your answer.

Thanks

0 Likes 0 ·
Joerg Vogel avatar image Joerg Vogel SudheerReddy commented ·
token.item.shift();

in Process Flow: Travel tasks here.

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.