question

mUg24 avatar image
0 Likes"
mUg24 asked Jason Lightfoot commented

How can I calculate the hours an operator has been working

I am trying to measure productivity as a ratio between Production / workedhours.

For that purpose I need to have how many hours an operator has worked (without considering scheduled down or idle states). I tried using the performance measure table but all I can get is %.

I am attaching the model.

Example worked hours.fsm

Thank you in advance

FlexSim 23.2.1
operatorsexperimenter statistics
· 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.

Jason Lightfoot avatar image Jason Lightfoot ♦♦ commented ·

Hi @mUg24, was our answer helpful? If so, please click the "Accept" button at the bottom of their answer. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always comment back to reopen your question.

0 Likes 0 ·

1 Answer

Jason Lightfoot avatar image
0 Likes"
Jason Lightfoot answered

The worked hours PFM should have this:

double idleTime=getstat(current, "State", STAT_TIME_AT_VALUE, 0, STATE_IDLE);
double offshiftTime=getstat(current, "State", STAT_TIME_AT_VALUE, 0, STATE_SCHEDULED_DOWN);
double availableTime=Model.statisticalTime-offshiftTime;
double workedTime=availableTime-idleTime;
return workedTime/hours(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.