relife.reward.AgeReplacementCost
relife.reward.AgeReplacementCost¶
- class relife.reward.AgeReplacementCost[source]¶
Bases:
relife.reward.Reward
Age replacement costs.
The replacements occur at a fixed age ar with preventive costs cp or upon failure with failure costs cf if earlier.
Methods
Conditional expected reward.
Reward conditional sampling.
- conditional_expectation(x: numpy.ndarray, ar: numpy.ndarray, cf: numpy.ndarray, cp: numpy.ndarray) numpy.ndarray [source]¶
Conditional expected reward.
- Parameters
x (ndarray) – Duration.
*reward_args (ndarray) – Extra arguments of the reward random variable.
- Returns
The conditional expected reward with respect to the duration.
- Return type
ndarray
- sample(x: numpy.ndarray, *reward_args: numpy.ndarray) numpy.ndarray ¶
Reward conditional sampling.
- Parameters
x (ndarray) – Duration.
*reward_args (ndarray) – Extra arguments of the reward random variable.
- Returns
Random drawing of a reward with respect to the duration.
- Return type
ndarray