question

Alex Gf avatar image
1 Like"
Alex Gf asked Matthew Gillespie edited

Pull items according to two requirements on a Queue

I need that the Queue4 select the best item according to two requirements (variables)

1.- Best minimun number on a label (sec)

2. Product B has to be separated by five A products

Is there anyway to do that?

items.fsm

hope somebody can help me with this!

FlexSim 18.1.0
queuepull requirement
picture1.png (734.2 KiB)
items.fsm (31.0 KiB)
· 1
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

tannerp avatar image tannerp commented ·

This kind of sorting can be difficult to do in the 3D model. Have you tried implementing Process Flow into your models before? It can be much easier to do things like this and it helps you avoid writing custom code. I'd be happy to make a sample model using Process Flow so you could see how it works in this situation.

0 Likes 0 ·

1 Answer

·
tannerp avatar image
0 Likes"
tannerp answered Steven Hamoen commented

The following attached model will hopefully help you pull the items as you outlined in your question.

It works by pushing the items to a list using Queues 2 and 3 as shown in this image:

Items are assigned to a partition, which can be pulled from later in the model by Process Flow. The token in process flow goes round robin style - getting 5 of Product A and then 1 of Product B on the next time through. The image below shows how it pulls from the item list:

Let me know if you have questions about Process Flow or if this didn't quite capture what you wanted for your model.

items-by-type-and-age.fsm


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

Alex Gf avatar image Alex Gf commented ·

Looks great, product B is being separated with product A, but there is something missing.

Product A and B has a label called "sec", that represents the sequence that the product should take to enter to Queue4, so, the most important thing its to respect that order, however if its impossible to respect the label "sec" because of the separation required by the process , then the software has to forget "sec" and put the separation between products.

Thank you man, i hope i can make something from this example.

0 Likes 0 ·
Steven Hamoen avatar image Steven Hamoen Alex Gf commented ·

@Alex Gf This is actually pretty straight forward with lists. If you open your list activity and open the advanced button you can add fields to the list. If you add a label field and call it "sec" it should have that field with correct value (if the item also has the label sec)

In the pull activity on the Query/Object field you select Order By and the field "sec" and you should be ready

2 Likes 2 ·

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.