relife.replacement_policy.OneCycleRunToFailure

relife.replacement_policy.OneCycleRunToFailure

class relife.replacement_policy.OneCycleRunToFailure(model: relife.model.AbsolutelyContinuousLifetimeModel, args: Tuple[numpy.ndarray, ...] = (), a0: Optional[numpy.ndarray] = None, cf: Optional[numpy.ndarray] = None, rate: numpy.ndarray = 0)[source]

Bases: object

One cyle run-to-failure policy.

One cycle run-to-failure policy.

Parameters
  • model (AbsolutelyContinuousLifetimeModel) – Absolutely continuous lifetime model of the asset.

  • args (Tuple[ndarray,...], optional) – Extra arguments required by the lifetime model.

  • a0 (float or 2D array, optional) – Current ages of the assets, by default 0 for each asset.

  • cf (float, 2D array or 3D array, optional) – Costs of failures, by default None.

  • rate (float, 2D array or 3D array, optional) – Discount rate, by default 0.

Notes

If cf is set to None, if should be defined when using methods to compute costs.

If cf and rate are 2D or 3D array, then:

  • axis=-2 represents the indices of each asset,

  • axis=-3 represents the indices of each component of the cost vector.

References

1

Coolen-Schrijner, P., & Coolen, F. P. A. (2006). On optimality criteria for age replacement. Proceedings of the Institution of Mechanical Engineers, Part O: Journal of Risk and Reliability, 220(1), 21-29

Methods

asymptotic_expected_equivalent_annual_cost

The asymptotic expected equivalent annual cost.

asymptotic_expected_total_cost

The asymptotic expected total cost.

expected_equivalent_annual_cost

The expected equivalent annual cost.

expected_total_cost

The expected total discounted cost.

rrp_args

Arguments of the underlying renewal reward process.

sample

One cycle run-to-failure policy sampling.

Attributes

discount

Exponential discounting.

reward

The failure cost of the asset.

reward: relife.reward.FailureCost = <relife.reward.FailureCost object>

The failure cost of the asset.

discount: relife.discounting.ExponentialDiscounting = <relife.discounting.ExponentialDiscounting object>

Exponential discounting.

rrp_args(cf: Optional[numpy.ndarray] = None, rate: Optional[numpy.ndarray] = None) Tuple[Tuple[numpy.ndarray, ...], ...][source]

Arguments of the underlying renewal reward process.

Parameters
  • cf (float, 2D array or 3D array, optional) – Costs of failures, by default None.

  • rate (float, 2D array or 3D array, optional) – Discount rate, by default None.

Returns

(model_args, reaward_args, discount_args)

Return type

Tuple[Tuple[ndarray,…],…]

Notes

If an argument is None, the value of the class attribute is taken.

expected_total_cost(t: numpy.ndarray, cf: Optional[numpy.ndarray] = None, rate: Optional[numpy.ndarray] = None) numpy.ndarray[source]

The expected total discounted cost.

Parameters
  • t (1D array) – Timeline.

  • cf (float, 2D array or 3D array, optional) – Costs of failures, by default None.

  • rate (float, 2D array or 3D array, optional) – Discount rate, by default None.

Returns

The cumulative expected total cost for each asset along the timeline.

Return type

ndarray

Notes

If an argument is None, the value of the class attribute is taken.

asymptotic_expected_total_cost(cf: Optional[numpy.ndarray] = None, rate: Optional[numpy.ndarray] = None) numpy.ndarray[source]

The asymptotic expected total cost.

Parameters
  • cf (float, 2D array or 3D array, optional) – Costs of failures, by default None.

  • rate (float, 2D array or 3D array, optional) – Discount rate, by default None.

Returns

The asymptotic expected total cost for each asset.

Return type

ndarray

Notes

If an argument is None, the value of the class attribute is taken.

expected_equivalent_annual_cost(t: numpy.ndarray, cf: Optional[numpy.ndarray] = None, rate: Optional[numpy.ndarray] = None, dt: float = 1.0) numpy.ndarray[source]

The expected equivalent annual cost.

Parameters
  • t (1D array) – Timeline.

  • cf (float, 2D array or 3D array, optional) – Costs of failures, by default None.

  • rate (float, 2D array or 3D array, optional) – Discount rate, by default None.

  • dt (float, optional) – The length of the first period before discounting, by default 1.

Returns

The expected equivalent annual cost until time t.

Return type

ndarray

Notes

If an argument is None, the value of the class attribute is taken.

The expected equivalent annual cost until time \(t\) is given by:

\[EEAC(t) = \int_0^t \frac{\delta c_f e^{-\delta x}}{1 - e^{-\delta x}} \mathrm{d}F(x)\]
asymptotic_expected_equivalent_annual_cost(cf: Optional[numpy.ndarray] = None, rate: Optional[numpy.ndarray] = None, dt: float = 1.0) numpy.ndarray[source]

The asymptotic expected equivalent annual cost.

Parameters
  • cf (float, 2D array or 3D array, optional) – Costs of failures, by default None.

  • rate (float, 2D array or 3D array, optional) – Discount rate, by default None.

  • dt (float, optional) – The length of the first period before discounting, by default 1.

Returns

The asymptotic expected equivalent annual cost.

Return type

ndarray

Notes

If an argument is None, the value of the class attribute is taken.

The asymptotic expected equivalent annual cost is:

\[EEAC_\infty = \int_0^\infty \frac{\delta c_f e^{-\delta x}}{1 - e^{-\delta x}} \mathrm{d}F(x)\]
sample(cf: Optional[numpy.ndarray] = None, rate: Optional[numpy.ndarray] = None, n_samples: int = 1, random_state: Optional[int] = None) relife.data.ReplacementPolicyData[source]

One cycle run-to-failure policy sampling.

Parameters
  • cf (float, 2D array or 3D array, optional) – Costs of failures, by default None.

  • rate (float, 2D array or 3D array, optional) – Discount rate, by default None.

  • n_samples (int, optional) – Number of samples, by default 1.

  • random_state (int, optional) – Random seed, by default None.

Returns

Samples of replacement times, durations, costs and events for each asset.

Return type

ReplacementPolicyData

Notes

If an argument is None, the value of the class attribute is taken.