OneCycleRunToFailure#

class relife.OneCycleRunToFailure(model, cf, *, discounting_rate=0.0, model_args=(), nb_assets=1, a0=None)[source]#

One cyle run-to-failure policy

A policy for running assets to failure within one cycle.

Parameters:
modelLifetimeModel

The lifetime model of the assets.

cfnp.ndarray

The cost of failure for each asset.

discounting_ratefloat, default is 0.

The discounting rate.

model_argsModelArgs, optional

ModelArgs is a tuple of zero or more ndarray required by the underlying lifetime model of the process.

nb_assetsint, optional

Number of assets (default is 1).

a0ndarray, optional

Current ages of the assets (default is None). Setting a0 will add left truncations.

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 cost.

sample

Sample simulation .

Attributes

discounting

model1

reward

asymptotic_expected_equivalent_annual_cost()[source]#

The asymptotic expected equivalent annual cost.

Returns:
ndarray

The asymptotic expected equivalent annual cost.

asymptotic_expected_total_cost()[source]#

The asymptotic expected total cost.

Returns:
ndarray

The asymptotic expected total cost for each asset.

expected_equivalent_annual_cost(timeline, dt=1.0)[source]#

The expected equivalent annual cost.

Parameters:
timelinendarray

Timeline of points where the function is evaluated

dtfloat, default 1.0

The length of the first period before discounting

Returns:
ndarray

The expected equivalent annual cost until each time point

expected_total_cost(timeline)[source]#

The expected total cost.

Parameters:
timelinendarray

Timeline of points where the function is evaluated

Returns:
ndarray

The expected total cost for each asset along the timeline

sample(nb_samples, seed=None)[source]#

Sample simulation .

Parameters:
nb_samplesint

Number of samples generated

seedint, optional

Sample seed. Usefull to fix random generation and reproduce results

Returns:
RenewalRewardData

Iterable object that encapsulates results with additional functions