How can I calculate time durations excluding scheduled down time?

How can I calculate time durations excluding scheduled down time?

jon_abbott
Not applicable
74 Views
4 Replies
Message 1 of 5

How can I calculate time durations excluding scheduled down time?

jon_abbott
Not applicable

[ FlexSim 16.2.2 ]

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?

0 Likes
Accepted solutions (1)
75 Views
4 Replies
Replies (4)
Message 2 of 5

joerg_vogel_HsH
Mentor
Mentor
Accepted solution

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.

0 Likes
Message 3 of 5

jon_abbott
Not applicable

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
Message 4 of 5

joerg_vogel_HsH
Mentor
Mentor

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
Message 5 of 5

jon_abbott
Not applicable

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