question

Ruben Mariduena avatar image
0 Likes"
Ruben Mariduena asked Ruben Mariduena commented

How to make flowitems wait in the queue until all the flowitems that will be part of that order have been created?

This is for a shipping scenario. There is a cargo ready schedule that shows the dates the cargo items are ready to ship, along with their corresponding information (GlobalTable1). Every time a cargo is ready at the queue it can be transported to the inspection area and then to the shipping dock where it can be loaded to a TE. The only condition for this to happen is that orders can only leave the queue if all the cargo items that are part of that order are in succession. To give an example (please see global table in the model): Order 1 has two cargo items and they are ready one after the other. This means that as soon as cargo 1 is ready it can leave and the same thing for the cargo 2. Now for Order 2, 2 cargo items are in succession but then there's a cargo item from order 3 that is going to be ready before the last cargo item from order 2. This means that all items from order 2 have to wait until the last cargo item from that order is ready before the can leave the queue (same for order 3). Items are only transported one at a time and cannot be batched (they are large items) . Any suggestions on how to approach this issue?

sample.fsm

FlexSim 16.2.0
schedulewait queue
sample.fsm (21.7 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

·
Joerg Vogel avatar image
0 Likes"
Joerg Vogel answered Ruben Mariduena commented

Classic 3D model. You could hold the items in the queue. In the OnEntry trigger of the queue and you compare all stored items in the queue if they belong to your batch. If all have entered you write a loop wherein you release all items of the batch.

holditem is flexscript function, you can use also the picklist item Do Not Release Item in Send To Port under Flow.

releaseitem is the other function. You must explicitly put a port into the function, otherwise the Send To function is executed again, which could lead to a not wished behaviour: the items stay in the queue.

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

Ruben Mariduena avatar image Ruben Mariduena commented ·

@Jörg Vogel

Thank you for the prompt response. Is there any way you could provide me with a sample of this approach? I'm just getting familiar with flexscript functions

0 Likes 0 ·
Joerg Vogel avatar image Joerg Vogel commented ·

Model: 5 different items with a random ID in the range [1..3] are collected to a batch of the size of 3 with the ID of 1. All is done without the batching option in the queue. The model stops when 2 batches are released.

0 Likes 0 ·
batching-of-id.fsm (16.0 KiB)
Ruben Mariduena avatar image Ruben Mariduena Joerg Vogel commented ·

@Jörg Vogel

Thank you for the suggestion, I looked into implementing this approach on my model but unfortunately my case is a little more complicated. To continue the discussion my teammate and I have created a sample model closer to the model that we are working on (please see attached). This is shipping scenario where we are shipping a number of items per voyage. The global table "MArrivalTable" shows you a sample schedule of items we need to ship. In this sample we have set everything to go from the "MF Site" and the "TES SubFlow" shows you the different activities it goes through to deliver to the leading area "M_Load RR". This is the only section of the model my question pertains to. Our model needs to be able to look at the schedule and only release items from the queue, on their ready dates, when the items in the voyage are in succession. If there's an item from another voyage in between, all of the items from the original voyage now have to wait until the last item in that voyage to be ready for them to be released one by one. The illustration I have provided shows when every item in the sample model should be released. Items in green mean that they leave as soon as they are created, items in red mean that they wait until the last module on the schedule for all of them to be released. Our input schedules are going to be made out of hundreds of items and voyages so we need to somehow make the model be able to determine this by itself. If you have any questions please let me know. Thank you in advance for your help

modelsample411.fsm

voyage-schedule-sample.png

0 Likes 0 ·

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.