question

Doris C avatar image
0 Likes"
Doris C asked Doris C commented

how can i Express the sum of items in two queues in TEXT?

hello

I want to display the combined quantity of items in two queues on the screen using the TEXT function in the VISUAL tab.

how can i do?

1718875577899.png

Express the sum of items in two queues in TEXT.fsm

FlexSim 24.1.0
queuetextvisure
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

Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered Doris C commented

You need a way to refer to the objects whose contents you want to sum. In the attached model I use centerport connections. Labels, groups, table entries, global variables and reference by name might be other ways that come to mind.

Once you have that, you need to write code that sums up the content statistics and set the value of the "textnode" in the "Text Display" field to that value (first convert to a string).

express-the-sum-of-items-in-two-queues-in-text_1.fsm


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

Doris C avatar image Doris C commented ·

Thanks to you, I've fixed the issue. If I want to change the settings to MAX CONTENT, how do I do it?

0 Likes 0 ·
Felix Möhlmann avatar image Felix Möhlmann Doris C commented ·

Use ".stats.content.maximum" instead of ".stats.content.value". Same for "minimum" and "average" at the end.

0 Likes 0 ·
Doris C avatar image Doris C Felix Möhlmann commented ·

The problem has been resolved, thank you.

0 Likes 0 ·