Problem displaying throughput of groups in version 19

Problem displaying throughput of groups in version 19

tee_hiett
Not applicable
12 Views
3 Replies
Message 1 of 4

Problem displaying throughput of groups in version 19

tee_hiett
Not applicable

[ FlexSim 19.1.1 ]

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,

0 Likes
Accepted solutions (1)
13 Views
3 Replies
Replies (3)
Message 2 of 4

philboboADSK
Autodesk
Autodesk

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.



Phil BoBo
Sr. Manager, Software Development
0 Likes
Message 3 of 4

Matthew_Gillespie
Autodesk
Autodesk
Accepted solution

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);
	}
	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.



Matthew Gillespie
FlexSim Software Developer

0 Likes
Message 4 of 4

tee_hiett
Not applicable

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