question

Cat avatar image
0 Likes"
Cat asked Joerg Vogel commented

How to set flow control?

Hi,

I want to step a flow control that use a global table to check if value>0, use processor1-3, else use processor 4 as below.

Red line- I step to get global table value

But I don't know how to step code in blue line.

Please help...Thanks.

1676015086616.png

FlexSim 7.7.4
queueflow control
1676015086616.png (200.8 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

Jacob W2 avatar image
0 Likes"
Jacob W2 answered Joerg Vogel commented

Hi @Cat,

It looks like you just need to check the value in the table for that "if" statement in FlexSim it would be written like this.

if(Table("tablename")[row][col] > 0){
return duniform(1,3);
}
else


· 2
5 |100000

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

Cat avatar image Cat commented ·
Hi Jacob,

I got it. Thanks for your kindly help :)
0 Likes 0 ·
Joerg Vogel avatar image Joerg Vogel Cat commented ·
@Cat please take some more time to look sharper into your spelling of coding words: “Return” and “return” are two different statements. One of them written as “return” is a structural name of a statement and will return a value of a function. The other one will be interpreted as undeclared variable and causes eventually an error.
0 Likes 0 ·