https://raw.githubusercontent.com/MatthewReid854/reliability/master/docs/images/logo.png

optimal_replacement_time

class reliability.Repairable_systems.optimal_replacement_time(cost_PM, cost_CM, weibull_alpha, weibull_beta, show_time_plot=True, show_ratio_plot=True, print_results=True, q=0, **kwargs)

Calculates the cost model to determine how cost varies with replacement time. The cost model may be HPP (good as new replacement) or NHPP (as good as old replacement). Default is HPP.

Parameters:
  • Cost_PM (int, float) – The cost of preventative maintenance (must be smaller than Cost_CM)

  • Cost_CM (int, float) – The cost of corrective maintenance (must be larger than Cost_PM)

  • weibull_alpha (int, float) – The scale parameter of the underlying Weibull distribution.

  • weibull_beta (int, float) – The shape parameter of the underlying Weibull distribution. Should be greater than 1 otherwise conducting PM is not economical.

  • q (int, optional) – The restoration factor. Must be 0 or 1. Use q=1 for Power Law NHPP (as good as old) or q=0 for HPP (as good as new). Default is q=0 (as good as new).

  • show_time_plot (bool, axes, optional) – If True the plot of replacment time vs cost per unit time will be produced in a new figure. If an axes subclass is passed then the plot be generated in that axes. If False then no plot will be generated. Default is True.

  • show_ratio_plot (bool, axes, optional) – If True the plot of cost ratio vs replacement interval will be produced in a new figure. If an axes subclass is passed then the plot be generated in that axes. If False then no plot will be generated. Default is True.

  • print_results (bool, optional) – If True the results will be printed to console. Default = True.

  • kwargs – Plotting keywords that are passed directly to matplotlib (e.g. color, label, linestyle).

Returns:

  • ORT (float) – The optimal replacement time

  • min_cost (float) – The minimum cost per unit time