question

Tee Hiett avatar image
0 Likes"
Tee Hiett asked Tee Hiett commented

Problem displaying throughput of groups in version 19

throughtput-groups.gif

I can display the throughput for each an individual kiosk when I try to display the group of kiosks, I get the results shown in the attached gif file.


????

Thanks,

FlexSim 19.1.1
groupsthroughputdisplayver19.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.

Matthew Gillespie avatar image
0 Likes"
Matthew Gillespie answered Tee Hiett commented

You can change the code behind that popup to loop over the members of the group and add up the output of each group member:

Object current = ownerobject(c);
treenode textnode = param(1);

/***popup:DisplayObjectStat*/
/**Display Object Stat*/
string starttext = /***tag:text*//**/"Object Stat: "/**/;
Object involved = model().find(/** \nObject: *//***tag:object*//**/"Operator1"/**/);

int stat = /***tag:stat*//**/1/**/;
string statstr = "";

if (involved.is(Group)) {
	Group group = involved;
	Array members = group.toFlatArray();
	int output = 0;
	for (int i = 1; i <= members.length; i++) {
		output += getoutput(members[i]);
	}
	statstr = string.fromNum(output,0);
} else 
	statstr = string.fromNum(getoutput(involved),0);

setnodestr(textnode, concat(starttext, statstr));

Note that the above code will only work for the Output option.

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

Tee Hiett avatar image Tee Hiett commented ·

The dashboard method works fine and is really sufficient for my needs. I haven't gotten to the Statistics Collector yet. I appreciate having the code for collecting the output for all of the members of the group.

Thanks for the help

0 Likes 0 ·
Phil BoBo avatar image
0 Likes"
Phil BoBo answered

That pick option gets the output of an individual object. It doesn't return the sum of the outputs of the members of a group.

The Group object itself does not keep aggregated stats about the members of the group. It only keeps a list of members.

If you want Group statistics, you can use a Statistics Collector, Calculated Table, or Dashboard chart to get that data. For example, you can drag a Composite Throughput chart into a Dashboard to collect the sum of the outputs of the members of a group.

5 |100000

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