question

Kilian K avatar image
0 Likes"
Kilian K asked tannerp commented

if condition

Is it possible to add in if condition in my pareallel process. Because in the "Queue_1" should stop if it has more than 3 pieces

FlexSim 20.0.0
FlexSim 19.2.4
simulation
test-23.fsm (127.6 KiB)
· 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.

Kilian K avatar image Kilian K commented ·

*more than 3 pieces

0 Likes 0 ·

1 Answer

·
tannerp avatar image
0 Likes"
tannerp answered tannerp commented

Hi @Kilian K,

When Queue_1 has more than 3 pieces, what process do you want to stop? Once it is stopped, when will it start again?

I would use an Event-Triggered Source that listens to "On Content Change". This will create a token that can be used with a Custom Code Activity to stop whatever process you like, close an input/output, etc.


· 3
5 |100000

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

Kilian K avatar image Kilian K commented ·

The process before the queue_1, so the multiporcessor should stopp. Once it is stopped it should start if in the queue_1 has lower than 3 pieces

0 Likes 0 ·
Kilian K avatar image Kilian K commented ·

Do you have any example file for to me. Because I am not so familiar with the "process flow"

0 Likes 0 ·
tannerp avatar image tannerp Kilian K commented ·
@Kilian K

Yes, I have attached an updated version of your model to this comment as well as an example model that shows it more clearly. Let me know if this is what you're hoping the behavior to be. I used an Event-Triggered Source to listen to when the Queue has 3 or more items (shown in original reply). If it does, the activity creates a token that moves into a Custom Code activity that stops the Multiprocessor.

Then the token moves to a Wait for Event activity that listens for the content of the queue to drop below 3.

When this occurs, the token moves to a Custom Code activity that resumes the Multiprocessor.

Example Model: stop-processor-example.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.