if condition

if condition

kilian_k
Not applicable
127 Views
5 Replies
Message 1 of 6

if condition

kilian_k
Not applicable

[ FlexSim 19.2.4 ]

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

0 Likes
Accepted solutions (1)
128 Views
5 Replies
Replies (5)
Message 2 of 6

kilian_k
Not applicable

*more than 3 pieces

0 Likes
Message 3 of 6

tanner_p
Not applicable
Accepted solution

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.

24361-on-content-change.png

0 Likes
Message 4 of 6

kilian_k
Not applicable

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
Message 5 of 6

kilian_k
Not applicable

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

0 Likes
Message 6 of 6

tanner_p
Not applicable
@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.

24362-stop-object-custom-code.png

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

24363-wait-for-event-less-3.png

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

24364-resume-multiprocessor.png

Example Model: stop-processor-example.fsm

0 Likes