question

Kari Payton avatar image
0 Likes"
Kari Payton asked Ryan Jaynes commented

Best way to get average statistics on operator states?

I have a dashboard that outputs a GANTT for operator utilization. I am using that because I want to get information on how long different operators are utilized, traveling, idle, etc. However I have over 200 operators and it's tedious to get the average states of all operators in a group using a GANTT. Is there a better way to do this?

FlexSim 16.2.0
dashboardsoperatorsstates
· 6
5 |100000

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

Kari Payton avatar image Kari Payton commented ·

@Matt Long thanks for responding, the above code is still not working. Is there a variable I am supposed to change? I edited the line "function_s(statObj, "addMember", yourOperator);" to change yourOperator to my getlabel(token, "Worker").

0 Likes 0 ·
Ryan Jaynes avatar image Ryan Jaynes Kari Payton commented ·

I don't know if there are any other issues, but you will need to set the name of the node you are using like if you dragged in a state gantt you will most likely need to change the treenode line of code to:

treenode statObj = node("Tools/Statistics/State Gantt", model());

I'd recommend looking in the tree to check the name of the node, but that should most likely be it.

0 Likes 0 ·
Kari Payton avatar image Kari Payton Ryan Jaynes commented ·

@Ryan Jaynes I changed it to match the name of the chart I am using, but the error is unknown variable "statObj"

0 Likes 0 ·
Show more comments
Kari Payton avatar image Kari Payton commented ·

@Ryan Jaynes thanks for the example. However, that is how my model is setup already. I wanted to change it to see the average stats. So something like the photo, that gives me the information for the whole group but for operators. Right now i have the percentages for each individual operator.

If it will help, I can send you my model in an email.

0 Likes 0 ·
capture1.png (15.5 KiB)
Ryan Jaynes avatar image Ryan Jaynes Kari Payton commented ·

@Kari Payton Yeah, if you could send me an email at [email protected] with your model then I'd be willing to look at getting that working as a group.

0 Likes 0 ·

1 Answer

Sam Stubbs avatar image
3 Likes"
Sam Stubbs answered Matt Long commented

If you want to get the average percentage of State times for a group of operators, what you could do is add them all to a group, and then use a "State Bar" chart. Instead of adding each individual to the chart, just add the group to the chart and it will give you the percentage of utilized, idle etc. for the group as a whole.


statebar.png (4.9 KiB)
· 6
5 |100000

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

Kari Payton avatar image Kari Payton commented ·

That is a good option @Sam Stubbs. My only issue is that the operators are created then added to a chart using custom code.

I don't know how to add the operators to a group without them being already in the model. However, I can't add them to the model manually because there are too many of them.

2 Likes 2 ·
help1.png (10.7 KiB)
Regan Blackett avatar image Regan Blackett ♦ Kari Payton commented ·

Since you have some Custom Code activities already, you can add the groupaddmember() function to one of those to add them ot the group as you create them.

Something like

groupaddmember("YourGroupName", getlabel(token, "Operator Reference from Create Object"))
2 Likes 2 ·
Kari Payton avatar image Kari Payton Regan Blackett ♦ commented ·

@regan.blackett and @Sam Stubbs

I am having trouble getting this to work. This is what my create object input look like:

And for the custom code I inserted a code snippet:

groupaddmember("Molding_Line_One", getlabel(token, "Worker"));

However, nothing is added to the group. I even tried getlabel(item, "Worker") but still nothing appears under the group.

0 Likes 0 ·
createobject.png (25.0 KiB)
Show more comments