question

Dennis_orlando_ Cc avatar image
0 Likes"
Dennis_orlando_ Cc asked Ben Wilson commented

Priority items to a rack

Hi, I´m having some troubles with giving priority to the queue.

My source is creating 5 item types, and I need to give priority to the itemtype number 1 to go to the first rack, then the second itemtype needs to go to the rack before in priority than itemtype 3, and so on.

Please help, i dont code btw.


1630377714032.png

Choose One
priority of delivering itemschoose one
1630377714032.png (188.2 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.

Ben Wilson avatar image Ben Wilson ♦♦ commented ·

Hi @Dennis_orlando_ Cc, was Felix Möhlmann's answer helpful? If so, please click the "Accept" button at the bottom of their answer. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always unaccept and comment back to reopen your question.

0 Likes 0 ·

1 Answer

Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered

ItemPrioByType.fsm

This model contains two ways to achieve this.

1. Define an entry trigger on the queue with the "Sort By Expression" option (under "Control"). Choose so sort by "item.Type" in ascending order. Then connect the queue to a second queue with a max content of 1. This queue then connects to the racks with the "Send To Port" option set to "By Expression" -> "item.Type".

The first item from Queue1 will move to Queue2 and then be delivered to the rack. Downside with this solution is that, as soon as an item has moved into the second queue, a newly arriving item can't take priority over it anymore.

2. The second solution offers more control. In this case a process flow controls the transporter. First it moves to the queue which again sorts the items by type in ascending order. The queue is set to "Do Not Release Item" in the "Send To Port" option, because we want to control this manually. Then, the process flow token checks whether there are currently items in the queue. (decide activity -> conditional decide -> "token.Queue.subnodes.length > 0"; "token.Queue" is a reference to the queue and set as a label on the token in the source, "subnodes.length" returns the number of items in the queue)

If there are no items, the tokens waits until an item enters the queue (Wait for Event). Afterwards, or if items were available, the first item in the queue ("token.Queue.first") is assigned to a label on the token. Then the transporter loads the item and unloads it to the respective rack. The correct rack is referenced through the type label on the item and the connection ranks of the queue.


itempriobytype.fsm (84.1 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.