Stop running model once throughput threshold reaches

Stop running model once throughput threshold reaches

mia_l
Not applicable
104 Views
6 Replies
Message 1 of 7

Stop running model once throughput threshold reaches

mia_l
Not applicable

[ FlexSim 19.2.4 ]

Hello, I am trying to add decide logic into my process flow to stop running the model when the throughput sink hits a certain amount (not when the queue is depleted), however I am running into an error. Is it possible to do this? If so, which Decide 'Send Token To' option should I be choosing instead?

Process Flow Circle.fsm

0 Likes
Accepted solutions (1)
105 Views
6 Replies
Replies (6)
Message 2 of 7

joerg_vogel_HsH
Mentor
Mentor
Accepted solution

You select from the Picklist the Option template Conditional Decide and set a condition you sample partly by the sample tool.

31315-choose-codition-by-sampler.gif

0 Likes
Message 3 of 7

mia_l
Not applicable

Thank you very much!

0 Likes
Message 4 of 7

mia_l
Not applicable

@joerg.vogel My model seems to be going over the limit I set with your help in the process flow. Is there a way to fix this?

0 Likes
Message 5 of 7

tanner_p
Not applicable

You probably still need to add in the code to stop the model. I suggest you listen for the event where the sink's input value changes to 40 rather than rely on the Decide activity. Sometimes the token won't be in the Decide activity right when the value changes to 40, and it sounds like you don't want any delay. Here's an idea that uses an Event-Triggered Source and a Custom Code.

31324-input-change-trigger.png

31307-stop-model-code.png

process-flow-circle_1.fsm

Message 6 of 7

joerg_vogel_HsH
Mentor
Mentor

You have probably already identified an answer how to set the correct value to get exact 40 items into the sink. You have to set the value in the condition in the decide activity to 39. You transport the items, then there is a difference until it gets into the sink.

Message 7 of 7

mia_l
Not applicable

This helps a lot. Thank you!