question

Sandeep Kumar I avatar image
0 Likes"
Sandeep Kumar I asked Matthew Gillespie edited

what does subnodes.length refers to in processor or sink?

I understand the subnodes.length expression refers to the content in queues. But if I use the same expression to refer contents in processor or sinks it doesn't work the same. Please help.

Model attached is just a sample piece to make my question more understandable. The sample doesn't represent the actual scope of the model or what I am trying to do. In this, I am trying to send the items from queues to the processor, based on its current content. Please check decide activity in the sample, that relates to my question. sample.fsm

FlexSim 18.1.1
flexscriptdot syntax
sample.fsm (27.7 KiB)
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

·
Matthew Gillespie avatar image
1 Like"
Matthew Gillespie answered Sandeep Kumar I commented

You have a space between the equal signs in the comparison in the Decide. Change

model().find("Processor1").subnodes.length = = 0

to

model().find("Processor1").subnodes.length == 0

Then your model works fine.

Also, a Sink will never have content because it destorys flowitems that enter it, so sink.subnodes.length will always be 0.

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

Sandeep Kumar I avatar image Sandeep Kumar I commented ·

@Matthew Gillespie: Thank you for quickly identifying the error. It works now.

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.