question

Ahadr A avatar image
0 Likes"
Ahadr A asked Ahadr A commented

receive a fixed number of item for specific queue based on decision point

hyetju.fsmHi,

I want please some help with flexsim. Here is my project my idea is i want the queue receive only 3 items red color and the fourth item will continue through the big conveyor with others, but as shown in the following image the red items stuck in the small conveyor. May you please provide me with the solution.

Many thanks.

FlexSim 19.1.1
decision point
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

tannerp avatar image
2 Likes"
tannerp answered Ahadr A commented

Hi @Ahadr A,

Here is a possible solution for your problem. You may also find it useful to implement Process Flow to avoid so much hard coding, but for now, you may review this example model and see if it fits your needs. It may be difficult to expand this idea to many item types and many queues, but it's a start.

I used the DP1 "On Arrival" trigger that you had set up to determine where to send Type 1 flowitems. There is also a label on DP1 that acts as a counter for how many red boxes (Type 1 flowitems) have been sent. Every time a red box is sent to Queue2, the counter is incremented by 1.

The structure of the code came from the default code on the Send Item By Case function, as shown:

I just added some logic to increment the label "NumRed" and to NOT send an item once the counter "NumRed" had reached a value of 3. This is shown in the highlighted text block here:

In the case that you empty Queue2 and want to send 3 more Type 1 flowitems to that location, you can simply trigger a label change on DP1 that will reset the "NumRed" counter label to 0.

Let me know if you have questions. For additional reference, I've attached an updated version of your model:

ahadr-help-1.fsm


dp1-code-before.png (46.8 KiB)
dp1-code-after.png (53.3 KiB)
ahadr-help-1.fsm (35.5 KiB)
· 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.

Ahadr A avatar image Ahadr A commented ·

Thank you so much, its help me.

i will try the code for several cases.

i hope it will work.

thank you.

0 Likes 0 ·