question

Aaupadhye avatar image
0 Likes"
Aaupadhye asked Aaupadhye commented

Triggering Specific Sources

Hi all,


I am trying to make a model in which the quantity of arrival makes specific sources trigger. For example, if the arrival is between 8 and 14 items from the clothing source, then I want EITHER Box Source A or B to send one box to Queue 2. If the arrival is 15 or greater, then I want either Box Source C or D to send a single box to queue 2. I tried pulling from a list using process flow and I feel like I am almost there, but I am not sure how to actually make another source trigger. It seems like there are basically random boxes showing up in the queue which is not what I want.


CreateBoxBasedonLabel.fsm


Thanks,

Amit

FlexSim 23.0.8
process flowtriggers
5 |100000

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

Julie Weller avatar image
1 Like"
Julie Weller answered Aaupadhye commented

Hi @Aaupadhye! I looked at your model (it looks good!) the biggest issue I saw were that you need to add a breathe activity and a decide, then you can use two create objects. I also changed some of your sources into queues. The first thing to change is to change the Clothing Items source to push to list in a trigger instead of in Output, that was causing nothing to show up in Queue1:

1687820424784.png

Then I changed the sources into queues for the BoxSources:

1687820447755.png

Those were pretty simple and then my process flow ended up like this:

1687820476256.png

You need the breathe activity so that it pulls the tokens as a group instead of individually so set the request value high (I did 50 but you can really do anything), that way it grabs all the tokens. Then in the decide I did connector by case with the case as token.pulled.length < 14:

1687820565413.png

You want your cases to be 1 and 0 (1 if true, 0 if false) then I did two create object activities. Both have a 50/50 chance of creating an object in A or B, or C or D, depending on how many were created in Queue1.

I attached the model! Let me know if you have any other questions!

createboxbasedonlabel_1.fsm


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

Aaupadhye avatar image Aaupadhye commented ·
Hi Julie,


I just read through this and went through the model, everything makes perfect sense. As a follow up question- lets say I wanted to have token.pulled.length between two values. Is it possible to write "token.pulled.length>=14 AND token.pulled.length<=20" for example?

0 Likes 0 ·
Aaupadhye avatar image Aaupadhye Aaupadhye commented ·
Never mind, I was able to figure it out! I just nested some more 'decide' blocks and used the same method with the && to indicate 'and' and my model works how I want!
0 Likes 0 ·
Joerg Vogel avatar image
0 Likes"
Joerg Vogel answered Aaupadhye commented

Conditional creation of items is more a task of create object activity in Process Flow. Once you can decide which Type of box you want to show up in your model, you can call a sub flow process which creates a box in a queue.

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

Aaupadhye avatar image Aaupadhye commented ·

Hi Joerg,


I updated my model to have this, but I am confused on why the clothing items do not show up in queue 1. Also, I am wondering how you can assign a certain label name to the created boxes based on the quantity of arrivals going into queue 1.

CreateBoxBasedonLabel.fsm

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.