question

Joseph L4 avatar image
0 Likes"
Joseph L4 asked Joseph L4 commented

Picking from multiple queues based on percentage

roofTruss2Worker - Copy.fsmI have a crane (acting as an operator), that is responsible for picking up pallets from 9 queues and dropping them on a conveyor belt. I want the crane to pick from a certain queue based on a percentage. How can I do this?

FlexSim 21.1.4
queueflexsim 21.1.4by percentageflowmanagement queues
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

·
Eric M avatar image
0 Likes"
Eric M answered Joseph L4 commented

Hey @Joseph L4, I decided to use process flow for this. I figured I could create a group of the Queues so I could reference them by an index and then use an assign labels to assign an index to a token by percentage. Then that token could have a different index assigned to it for each task which would tell the crane where to go.

I used a list with partitions for this. Partitions work by basically segmenting the list into different groups. That way when you pull from the list you can specify which partition you want to pull from. Each queue gets its own partition which matches its index in the group. That index matches the label on the token of course. So now each of the queues has its own section on the list, and the token gets assigned an index by percentage that tells it which queue to pull from.

The main thing is setting the partition for pushing and pulling which you can see if you look at the Send to Port on the queues and Pull from List in the process flow. Let me know if you have any questions!

rooftruss2worker-copy_1.fsm


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

Joseph L4 avatar image Joseph L4 commented ·
Just so I can confirm I understand what is going on here. How/ where does the list know to use the partitions and what are the roles of the partitions? And where/ how exactly do I enter the percentages that I want the queues to be picked based of off? I know you answer these questions in your response above, but I am struggling to understand the process and the role everything plays in the process.
0 Likes 0 ·
Eric M avatar image Eric M Joseph L4 commented ·

Definitely, let me see if I can explain it in a better way. First, I think it's helpful to know how I've numbered each queue. I created a group and put them in the order as shown (excuse the terrible mouse handwriting):

1624636536069.png

This helps because now I can use the code below to get the number of the queue (1-9) which will come in handy with the partitions.

Group("PalletQueues").indexOf(reference to queue)

I'll try to describe a little how the partition works before explaining how to assign it. If you take a look at the entries of the list, you'll see that the items are split up into groups:

1624637191661.png

This is almost like having lists inside of a list. I've got different partitions with their own group of items. This is nice because now we can reference the items in each particular queue according to their partition. Now, instead of having a pull activity just pull something from the list, I need to specify which partition in that list I want to pull from. For example, if the pull activity specifies to pull from partition 1, it will only look at the items in that partition.

We create these partitions when we push items to the list and specify which partition to take from when we pull items from the list. In each of the queue's output section, the send to port pushes the item to the list Crane Pallets. I set up a Partition ID using the code above to give a unique reference to each queue:

1624637530286.png

Here's where the percentages come in. I now have the items in each queue on the list, so I just need a way to assign a percentage when deciding which partition to pull from. This is done in the Assign Labels activity. I give the token a label 1-9 based on a percent (10% for most in this case).

1624637667475.png

Now the token has a label called Queue that ranges from 1-9 based on a specified percent. When the token enters the pull from list activity, it's Partition ID is set to whatever is on that Queue label.

1624638073849.png

Overall, the pallets get pushed to the list according to their specific queue and the token uses values by percent to decide which queue to pull from.

0 Likes 0 ·
1624636536069.png (306.6 KiB)
1624636682639.png (306.6 KiB)
1624637191661.png (13.5 KiB)
1624637530286.png (9.6 KiB)
1624637667475.png (12.2 KiB)
1624638059236.png (9.0 KiB)
1624638073849.png (9.0 KiB)
Joseph L4 avatar image Joseph L4 Eric M commented ·
Yes, this makes more sense now, you are the man Eric. Hope you have a good rest of your day.
1 Like 1 ·

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.