question

gio-c avatar image
0 Likes"
gio-c asked gio-c commented

How to assign each order to the first avaible operator?

I have a very long list of orders in the same global table. Each order has the same orderID, so there are different rows with the same number and different destination and quantity to pick up. How can i assign each order (so rows with the same id) to the first avaible operator?DOMANDAAAAA.fsm


Thanks in advance.

FlexSim 25.0.2
global tablespicking orders
domandaaaaa.fsm (145.9 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

Steven Hamoen avatar image
0 Likes"
Steven Hamoen answered gio-c commented

@Gio_C Use process flow. Put all the orders in a list. Make each operator have their own token. First pull one order. So then you have 1 orderID and then in a next pull, pull all the remaining orders with the same orderID using a require of 0 and a request of a large number e.g. 100. Then use a subflow to work through the array of orders and process them individually.

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

gio-c avatar image gio-c commented ·

I don't understand how to configure the query to pull the tokens with the same OrdrID.

The tokens per operator must have independent blocks like i did for 2 operators or all in the same and must be identified by a label?DOMANDAAAAA.fsm

0 Likes 0 ·
domandaaaaa.fsm (152.0 KiB)
Steven Hamoen avatar image Steven Hamoen commented ·

@Gio_C You have 2 timings problems and a label problem.

First you create both the token to fill the order list together with the token for the operator. This means the operator take the first order that is placed on the list and then tries to pull more but there is nothing there yet.

The 2nd timing issue is that when you pull an order from the list it is immediately send to the sink so it doesn't exist anymore but you still have to get the OrderID label from the order token onto the operator token. So the easiest is to remove the sink and let the tokens live in the push. When they are pulled they are not on the list anymore but the token does still exists.

You can look at these problems by using the step functionality and you could have seen in what order everything was handled.

The last problem is that to get the OrderID label onto the operator token you have to use an assign labels activity.

I have added the fixed model:domandaaaaa_tal.fsm

0 Likes 0 ·
domandaaaaa-tal.fsm (122.7 KiB)
gio-c avatar image gio-c Steven Hamoen commented ·

Thank you very much for your answer. Another problem is that in the array of pulled tokens i miss the first pulled, how can i insert him back there at the first position? And i can't get the token label "Quantità" from the array. domandaaaaa-tal.fsm

0 Likes 0 ·
domandaaaaa-tal.fsm (122.0 KiB)
gio-c avatar image gio-c gio-c commented ·

I solved the problem of appending the first order in the pulled array. Now i have the problem of getting the "Quantità" value from the array, I don't know why it returns always 0.domandaaaaa-tal.fsm

0 Likes 0 ·
domandaaaaa-tal.fsm (125.5 KiB)
Show more comments