question

Preet avatar image
0 Likes"
Preet asked Preet commented

Performance measure from the composite state table

Hello!

I have a model with multiple technicians who are tracking their state based on custom state tables. I want to track each of their composite state as a performance measure. I tried adding it with the default options but only able to get Utilization. I also explored various options and found that there are some ways but by default it is only able to state it based on default state state.


How would I have each state mentioned in composite state bar as a performance measure?

1676936999363.png


delayed-mtbf-mttr-fm.fsm

FlexSim 23.0.2
performance measures
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 Preet commented

Option 1:

Install the components of the composite state chart. Edit the respective calculated table to contain the average time spend in a state instead of the sum. Then use that value to calculate the percentage in the performance measure.

1676963562873.png

(You can type the expression directly in the performance measure value field. I just use the code window so it is fully visible in the screenshot.)

Option 2:

Use code to read the statistical data directly in the performance measure. (This assumes all objects are part of a single group and that the PFM points to that group.)

/**Custom Code*/
treenode reference = param(1);
treenode extraData = param(2);
treenode repData = param(3);

Group tech = reference;
double timeSum = 0;
Array objects = tech.toFlatArray();
for(int i = 1; i <= objects.length; i++)
{
    timeSum += objects[i].stats.state().getTotalTimeAt(STATE_IDLE);
}
return timeSum/objects.length/Model.statisticalTime;

delayed-mtbf-mttr-fm_1.fsm


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

Preet avatar image Preet commented ·
Hi @Felix Möhlmann This is exactly what I was looking for. I implemented to my actual model and it worked as expected. Thank you very much for quickly answering the question.
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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