How do I remove duplication of lanes from the model at same instant of time?

How do I remove duplication of lanes from the model at same instant of time?

moosa
Not applicable
5 Views
18 Replies
Message 1 of 19

How do I remove duplication of lanes from the model at same instant of time?

moosa
Not applicable

[ FlexSim 22.2.4 ]

0 Likes
Accepted solutions (1)
6 Views
18 Replies
Replies (18)
Message 2 of 19

jason_lightfootVL7B4
Autodesk
Autodesk
Is this a different question from your comment in your other question?

If so, could you explain it a little more? Also if these are really conveyors then why not model them as such?

0 Likes
Message 3 of 19

jason_lightfootVL7B4
Autodesk
Autodesk

Let's re-write this - but first tell us exactly what needs to happen.

Does each type get sent to one lane only at a time?

Once a lane is allocated a type then it receives only that type until it has 6 items?

Once you've sent 6 items you can then start to send a second different type to that lane even though it still contains the previous type?

Lanes don't need to flush between types?

Anything else?

0 Likes
Message 4 of 19

moosa
Not applicable
yeah each lane can have one particular type of item,once it gets filled up with 6 pieces(max content of the lane,I could any ways change this numbe rif the logic is generated) of a particular type , the following lane or other lane can take this type of item, to summarise:

if they are 10 different types of items flowing , each item should flow into 10 different lanes, but the 11th item if is of type 1 it should take the lane 1 or the lane it already occupied until it reaches the value of 6, after it reaches the vale of 6( max content), it could take another lane.

0 Likes
Message 5 of 19

jason_lightfootVL7B4
Autodesk
Autodesk
What's the purpose here - are you trying to create slugs of items?

The reason I ask is I'm wondering about the case when you have 2 of Type1 and 4 of Type2 in a lane. Since it has 6 in total, can it then take Type3 or does it need a minimum of 5 of each type as a 'slug'?

0 Likes
Message 6 of 19

moosa
Not applicable
nopes it cant take type 3,the type 3 should go to the next lane.one lane is fixed for only one type until it reaches max limit or the pieces would leave if they reach the max stay time.
0 Likes
Message 7 of 19

moosa
Not applicable

luckily I was able to solve the issue, but yeah ofcourse you could have a look for suggestions as well in case I made any mistakes.

model_built_mockup_testing_final_macro_5.fsm

0 Likes
Message 8 of 19

moosa
Not applicable
sorry looks like I still have issues regarding duplicated lane..
0 Likes
Message 9 of 19

moehlmann_fe
Observer
Observer
Accepted solution

Here's a model that uses a Decision Point at the end of the conveyor to assign a queue to the arriving items. It uses maps and an array (as labels on the DP) to keep track of which type is currently assigned to what queue/port, how many items where already send there and which queues are still available. If no queue can be assigned the item is stopped.

When the last item exits a queue, it resets the respective map entries on the Decision Point and sends a message to it. This then lets the point reevaluate where to send the currently waiting item, if there is one.

model-built-mockup-testing-fm.fsm

If you also want the processor to first empty a queue before moving on to the next, I would suggest to have all queues push their items to a list from which the processor pulls. (Meaning the entire batch will be pushed to the list immediately, preventing other items of getting mixed in).

0 Likes
Message 10 of 19

moosa
Not applicable
Thanks for this solution,it does what exactly I needed,but anyways would recheck it for all the conditions.
0 Likes
Message 11 of 19

moosa
Not applicable
I still find some duplication, when I tested for the logic.The max content when changed to 8 and the batch size of 5 or max stay time of 1000 seconds, is still creating duplication
0 Likes
Message 12 of 19

moehlmann_fe
Observer
Observer
The logic was designed under the assumption that the batch size and max content are equal and that due to this, a full queue will get emptied completely before receiving new items.

If they are not you will always see cases of "duplication". Take the following example: A queue's maximum content is reached, but because the processor is busy it cannot yet release any items. If another item of the same type arrives it will be assigned to an empty queue if there is one. Some time later items will start to leave the first queue leaving you with two partial queues with the same type.

Whichever queue you choose to route items to now, the other one will probably stay blocked by the partial batch until the max wait time elapses, since it is not guaranteed that the first queue will completely empty out before that time. What should the logic do at this point in your opinion?

0 Likes
Message 13 of 19

moosa
Not applicable
well thanks for the detailed explanation, well it does make sense as you mentioned,well if they are two ques of same time, the item that flows should flow into the que with higher number of pieces so that it makes it to its batch size and leave


0 Likes
Message 14 of 19

moosa
Not applicable

same type at same time *


0 Likes
Message 15 of 19

moosa
Not applicable

I have done a similar logic but used it in pull,but when i compare it with your logic the results are very similar but not the same dont know why ,kind of confusing .model_built_mockup_testing_final_macro_5.fsm

0 Likes
Message 16 of 19

moehlmann_fe
Observer
Observer

The pull requirement of the queues is evaluated in the order of their port rankings. So checking queues with a lower port number is actually not needed, since if there was a queue with a lower port that could receive the item it would have and the pull requirement of the current queue would be executed in the first place.

You should do the check the other way around. Start at the highest port rank and work your way down to check if the queue has to leave the item for another queue whose pull requirement will be evaulated later.

Also you are trying to read the "Type" label on the queues without checking if it exists which leads to the error for Queue68 for every arriving item.

Attached is an improved version of the logic I build. It now keeps track of all queues that might be assigned to a type and not only the most recent one. This enables it to choose between multiple possible destinations. This decision is based on how many items are needed in each queue to reach the batch size. The queue with fewer needed items will get priority. The pending number of items to the next batch is tracked together with the current content in the "QtyMap".

I also changed the transport logic. The items are now pushed to a list and the processor pulls them from there. This has two effects. The processor will work in on the items in the order in which the batches were released, rather than pulling the item from the lowest port rank that is available. And this allows me to reset the batch counter in the "Send to Port" code in case a partial batch is released.

model-built-mockup-testing-fm_1.fsm

0 Likes
Message 17 of 19

moosa
Not applicable
well thanks for this detailed explanation of both the models,well the basic idea of this model was to evaluate for the max wip on the conveyor that is sending output to lanes(24) and these lanes(24) send an output to a que of max size 10(Max Wip of this is also to be evaluated) which again sends this to the processor. Now as you changed this transport logic , you think if I send the output of the lanes to a queue(max size 10) and then push it to the list and then pull it back by processor, the results obtained by my model will be right ?


0 Likes
Message 18 of 19

moehlmann_fe
Observer
Observer
Since I currently use the fact that the batches are released (the "Send to Port" trigger is evaluated) immediately when they become full to reset the batch counter, I would have the output queue pull items from the list, so this logic can keep working.

The processor could then again use a port connection, since the items will enter the output queue in FIFO order anyway.

0 Likes
Message 19 of 19

moosa
Not applicable
Thanks a lot , I exactly got what i needed,Really appreciate for your support.
0 Likes