question

sara S2 avatar image
0 Likes"
sara S2 asked tannerp commented

The condition "a conveyor is empty and a queue is empty" in "Decide" activity ?

Hello,

How to set the condition "a conveyor is empty and a queue is empty" in "Decide" activity ?

(FlexSim version 19.0.0)

Regards.


Other
Other (please specify)
process flowdecide activity
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
0 Likes"
tannerp answered tannerp commented
Object MyConveyor = Model.find("Conveyor"); //Change to name of Conveyor
Object MyQueue = Model.find("Queue"); //Change to name of Queue

if(MyConveyor.subnodes.length == 0 && MyQueue.subnodes.length == 0)  {
  return 1;
}
· 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.

tannerp avatar image tannerp commented ·

The key, of course, is the portion in the "IF" statement if you're using the Conditional Decide pick list option.

0 Likes 0 ·
sara S2 avatar image sara S2 commented ·

Thank you very much for your help.

Is there a difference if I use directly Model.find("conveyor") instead of defining the object Myconveyor ?

0 Likes 0 ·
tannerp avatar image tannerp sara S2 commented ·

That works just fine as well. I defined it so it looked cleaner in the code, but you can define it however you'd like, even with a label.

1 Like 1 ·

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.