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?
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?
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!
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):
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:
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:
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).
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.
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.
16 People are following this question.
FlexSim can help you understand and improve any system or process. Transform your existing data into accurate predictions.
FlexSim is a fully 3D simulation software environment. FlexSim can be used to simulate any process in any industry.
FlexSim®, FlexSim Healthcare™, Problem Solved.®, the FlexSim logo, the FlexSim X-mark, and the FlexSim Healthcare logo with stylized Caduceus mark are trademarks of FlexSim Software Products, Inc. All rights reserved.
Privacy | Do not sell or share my personal information | Cookie preferences | Report noncompliance | Terms of use | Legal | © Autodesk Inc. All rights reserved