Query on Task Executer

Query on Task Executer

sudheer_r
Not applicable
644 Views
6 Replies
Message 1 of 7

Query on Task Executer

sudheer_r
Not applicable

[ FlexSim 19.1.2 ]

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.

23072-doubt1.jpg

taskexe.fsm

0 Likes
Accepted solutions (1)
645 Views
6 Replies
Replies (6)
Message 2 of 7

sudheer_r
Not applicable
0 Likes
Message 3 of 7

jeff_nordgren
Not applicable

@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
Message 4 of 7

sudheer_r
Not applicable

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

Thank you

0 Likes
Message 5 of 7

joerg_vogel_HsH
Mentor
Mentor
Accepted solution

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.

Message 6 of 7

sudheer_r
Not applicable

@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
Message 7 of 7

joerg_vogel_HsH
Mentor
Mentor
token.item.shift();

23142-shift-item-array.jpg

in Process Flow: Travel tasks here.

0 Likes