RenewalRewardProcess#
- class relife.stochastic_process.RenewalRewardProcess(lifetime_model, reward, discounting_rate=0.0, first_lifetime_model=None, first_reward=None)[source]#
Methods
asymptotic_expected_equivalent_annual_worth
asymptotic_expected_total_reward
expected_equivalent_annual_worth
expected_total_reward
The renewal density.
The renewal function.
Renewal data sampling.
sample_lifetime_data
- property nb_params#
Number of parameters.
- Returns:
- int
Number of parameters.
- property params#
Parameters values.
- Returns:
- ndarray
Parameters values of the core
Notes
If parameter values are not set, they are encoded as np.nan value.
Parameters can be by manually setting`params` through its setter, fitting the core if fit exists or by specifying all parameters values when the core object is initialized.
- property params_names#
Parameters names.
- Returns:
- list of str
Parameters names
Notes
Parameters values can be requested (a.k.a. get) by their name at instance level.
- renewal_density(tf, nb_steps)#
The renewal density.
- Parameters:
- tffloat
Time horizon. The renewal density will be computed up until this calendar time.
- nb_stepsint
The number of steps used to compute the renewal density.
- Returns:
- tuple of two ndarrays
A tuple containing the timeline used to compute the renewal density and its corresponding values at each step of the timeline.
Notes
The renewal density is the derivative of the renewal function with respect to time. It is computed by solving the renewal equation:
\[\mu(t) = f_1(t) + \int_0^t \mu(t-x) \mathrm{d}F(x)\]where:
\(\mu\) is the renewal function,
\(F\) is the cumulative distribution function of the underlying lifetime model,
\(f_1\) is the probability density function of the underlying lifetime model for the fist renewal in the case of a delayed renewal process.
References
[1]Rausand, M., Barros, A., & Hoyland, A. (2020). System Reliability Theory: Models, Statistical Methods, and Applications. John Wiley & Sons.
- renewal_function(tf, nb_steps)#
The renewal function.
- Parameters:
- tffloat
Time horizon. The renewal function will be computed up until this calendar time.
- nb_stepsint
The number of steps used to compute the renewal function.
- Returns:
- tuple of two ndarrays
A tuple containing the timeline used to compute the renewal function and its corresponding values at each step of the timeline.
Notes
The expected total number of renewals is computed by solving the renewal equation:
\[m(t) = F_1(t) + \int_0^t m(t-x) \mathrm{d}F(x)\]where:
\(m\) is the renewal function,
\(F\) is the cumulative distribution function of the underlying lifetime model,
\(F_1\) is the cumulative distribution function of the underlying lifetime model for the fist renewal in the case of a delayed renewal process.
References
[1]Rausand, M., Barros, A., & Hoyland, A. (2020). System Reliability Theory: Models, Statistical Methods, and Applications. John Wiley & Sons.
- sample_count_data(tf, t0=0.0, size=1, maxsample=100000.0, seed=None)[source]#
Renewal data sampling.
This function will generate sampling data insternally. These data
- Parameters:
- tffloat
Time at the end of the observation.
- t0float, default 0
Time at the beginning of the observation.
- sizeint or tuple of 2 int
Size of the sample
- maxsampleint, optional
Maximum number of samples, by default 100000.
- seedint, optional
Random seed, by default None.