question

farh123 avatar image
0 Likes"
farh123 asked Andrew O commented

How to send items to specific lanes based on set of conditions?

Hey,

I'm trying to route items to two sets of lanes based on certain conditions. Both sets have two lanes each, each lane able to hold 2 items (1 set = 4 items). At the beginning of the simulation, the items should initially be sent to Set 1 to be filled up, processed (2mins) then sinked. Once Set 1 is full, items are sent to Set 2 in the same manner as Set 1. This cycle would repeat after either "sets" are free (assuming set 1 will be free before set 2 since it was filled up first). I've tried to decision points but it has outputs in either random or round robin which I don't want.


Ideal Conditions 1.fsm

FlexSim 22.2.4
batchdecision pointflowitem routing
· 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.

Andrew O avatar image Andrew O ♦ commented ·

Hi @farh123, was one of Jason Lightfoot's answers helpful? If so, please click the "Accept" button at the bottom of the one that best answers your question. 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 ·
Jason Lightfoot avatar image
0 Likes"
Jason Lightfoot answered Jason Lightfoot edited

Answer1: Without knowing your level of student knowledge we'll try to give some hints on how to go about a list based approach.

First we'd (@Kavika F and I) like to point out that you don't need a few of the stations and extra DPs in your model (especially the stacked stations). For the routing you only really need one DP to branch into this cell and another to route to the lanes if you want it done as late as possible and have trays queuing into the cell. You may have delays at stations along the route, so keep those if that's the case.

We can begin by deciding pull Set1 stations from a list and label a token with each station pulled. Then we can just send the item to that station. Once we've sent 4 items we can change the set number to 2 and pull 4 more stations. For this to work, each station should be on the list twice and should have a label indicating to which setNumber it belongs. To put a value on a list more than once you must disable "Unique Values Only" in the General section of the Global List Properties. So then in your process flow you could had something like this where you push the values twice:

1672264220755.png

In this case the value being pushed is an array of the four stations.

Next is a process that is associated with the arrival a decision point before the lanes. Instead of creating one token for each tray arrival, this creates a token at time 0 and then waits for each tray to arrive. When it does it tries to pull a station for the current SetNum (using the WHERE clause of the pull) and sets the token's station label to the value pulled. Using a timeout on the pull, a failed token will stop the item, wait for a push before resuming the item and trying again. Once 4 items have been successfully set we change the set number and wait for another tray.

1672264594959.png

Finally we need to consider when and how to push stations back onto the list when the set is completed. In the flow below I detect the tray arrival at each station - label the token with the station, and wait for them to enter the sinks. I then batch them by set number - appending to an array of stations as each token is batched. Once 4 are batched together the station array can be pushed to the List since all trays have been completed.

1672264815888.png

We've not attached the model since we encourage students to learn how to do this themselves. How you structure this and store references to items may differ from the method we used.

Here's the expected result:

setlanerouting.gif..which show exit transfers we added to the lanes. Since you're not releasing Set1 trays, and the flow strictly cycles between set1 and set2 it stops sending, waiting for set1 to complete.


1672264220755.png (6.3 KiB)
1672264594959.png (25.2 KiB)
1672264815888.png (10.2 KiB)
setlanerouting.gif (1.4 MiB)
5 |100000

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

Jason Lightfoot avatar image
0 Likes"
Jason Lightfoot answered Jason Lightfoot edited

Answer2. It's not as exciting but if you're happy to have the trays queuing on the conveyors and forcing their way to their correct stations, just use round robin output port from a DP connected to the stations ( 8 connections).

5 |100000

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

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.