question

Jon Abbott avatar image
0 Likes"
Jon Abbott asked Jon Abbott commented

How can I calculate time durations excluding scheduled down time?

I have a product being built with a span time that is currently being calculated by subtracting the start time from the finish time. This reports the number of minutes that have elapsed. I would like to adjust this calculation so that it excludes scheduled down time using a specified time table and/or MTBF/MTTR. Is this possible? I'm envisioning a command like the following:

timedelta(start_sim_time,finish_sim_time,[time table 1],[MTBF/MTTR 1],...)

This would behave similar to the NETWORKDAYS formula in Excel, except that it would return using the time units being used in the model. If something like this isn't available, is there another way to achieve the same result?

FlexSim 16.2.2
scheduled downtime in systemcalculate times
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

Joerg Vogel avatar image
0 Likes"
Joerg Vogel answered Jon Abbott commented

You can use the state pie chart. In its properties you can set the states you like to see or evaluated. If you explore the pie chart as a table you can compute the duration in your model run over all shown states.

· 3
5 |100000

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

Jon Abbott avatar image Jon Abbott commented ·

Thanks @Jörg Vogel. I should explain my problem further, as I do not think the state pie would be sufficient. This model is for building a product that goes through multiple processes. I would like to measure the time that it takes for each product to go from the first process to the finish of the last process, excluding non-working (or scheduled down) time.

0 Likes 0 ·
Joerg Vogel avatar image Joerg Vogel Jon Abbott commented ·

If it is only the process and setup time you want to cumulate then you find these times in the variables of the items in the rank 2 and 3. You can increment an own label at every item in OnExit trigger of every processor.

processtime: getitemvar(item,2)

setup time : getitemvar(item,3)

Otherwise you can enhance the down-function and resume-function with the method to record the begin and end of a breakdown inside the involved item if it exists in the member object.

0 Likes 0 ·
Jon Abbott avatar image Jon Abbott Joerg Vogel commented ·

Thank you @Jörg Vogel. I am not sure that the first approach will work, as sometimes the flowitems may be waiting in a queue that does not have process time or setup time, while the time table switches to a non-working time. I am not sure the second option works for the same reason - flowitems may be waiting in a queue that is not listed as a member of the schedule. I was hoping to be able to do this without resorting to lots of code or adjustments to the model. I may suggest the timedelta command as an idea for future versions of FlexSim.

0 Likes 0 ·