ECLM

class ECLM(totalImpactVector, integrationAlgo=None, nIntervals=8, verbose=False)

Provides a class for the Extended Common Load Model (ECLM).

Parameters
totalImpactVectorIndices

The total impact vector of the common cause failure (CCF) group.

integrationAlgoIntegrationAlgorithm

The integration algorithm used to compute the integrals.

Notes

The Extended Common Load Model (ECLM) is detailed in Extended Common Load Model: a tool for dependent failure modelling in highly redundant structures, T. Mankamo, Report number: 2017:11, ISSN: 2000-0456, available at www.stralsakerhetsmyndigheten.se, 2017.

We consider a common cause failure (CCF) group of n components supposed to be independent and identical.

We denote by S the load and R_i the resistance of the component i of the CCF group. We assume that (R_1, \dots, R_n) are independent and identically distributed according to R.

We assume that the load S is modelled as a mixture of two normal distributions:

  • the base part with mean and variance (\mu_b, \sigma_b^2)

  • the extreme load parts with mean and variance (\mu_x, \sigma_x^2)

  • the respective weights (\pi, 1-\pi).

Then the density of S is written as:

f_S(s) = \pi \dfrac{1}{\sigma_b} \varphi \left(\dfrac{s-\mu_b}{\sigma_b}\right) + (1-\pi) \dfrac{1}{\sigma_x} \varphi \left(\dfrac{s-\mu_x}{\sigma_x}\right)\quad \forall s \in \mathbb{R}

We assume that the resistance R is modelled as a normal distribution with mean and variance (\mu_R, \sigma_R^2). We denote by p_R and F_R its density and its cumulative density function.

We define the ECLM probabilities of a CCF group of size n, for 0 \leq k \leq n are the following:

  • \mathrm{PSG}(k|n): probability that a specific set of k components fail.

  • \mathrm{PEG}(k|n): probability that a specific set of k components fail while the other (n-k) survive.

  • \mathrm{PES}(k|n): probability that some set of k components fail while the other (n-k) survive.

  • \mathrm{PTS}(k|n): probability that at least some specific set of k components fail.

Then the \mathrm{PEG}(k|n) probabilities are defined as:

\begin{array}{rcl}
  \mathrm{PEG}(k|n) & = & \mathbb{P}\left[S>R_1, \dots, S>R_k, S<R_{k+1}, \dots, S<R_n\right] \\
                  & = & \int_{s\in \mathbb{R}} f_S(s) \left[F_R(s)\right]^k \left[1-F_R(s)\right]^{n-k} \, ds
\end{array}

We get the \mathrm{PSG}(k|n), \mathrm{PES}(k|n) and \mathrm{PTS}(k|n) and probabilities with the relations:

(1)\mathrm{PSG}(k|n) = \sum_{i=k}^n C_{n-k}^{i-k} \, \mathrm{PEG}(i|n)

(2)\mathrm{PES}(k|n) = C_n^k \, \mathrm{PEG}(k|n)

(3)\mathrm{PTS}(k|n) = \sum_{i=k}^n \mathrm{PES}(i|n)

Note that for k=0, we have:

\begin{array}{rcl}
   \mathrm{PSG}(0|n) & = & 1 \\
   \mathrm{PTS}(0|n) & = & 1
\end{array}

We use the following set of parameters called general parameter :

(4)\vect{\theta} = (\pi, d_b, d_x, d_R, y_{xm})

defined by:

\begin{array}{rcl}
 d_{b} & = & \dfrac{\sigma_b}{\mu_R-\mu_b}\\
 d_{x} & = & \dfrac{\sigma_x}{\mu_R-\mu_b}\\
 d_{R} & = & \dfrac{\sigma_R}{\mu_R-\mu_b}\\
 y_{xm} & = & \dfrac{\mu_x-\mu_b}{\mu_R-\mu_b}
\end{array}

Then the \mathrm{PEG}(k|n) probabilities are written as:

(5)\mathrm{PEG}(k|n) = \int_{-\infty}^{+\infty} \left[ \dfrac{\pi}{d_b} \varphi \left(\dfrac{y}{d_b}\right) + \dfrac{(1-\pi)}{d_x}\varphi \left(\dfrac{y-y_{xm}}{d_x}\right)\right] \left[\Phi\left(\dfrac{y-1}{d_R}\right)\right]^k \left[1-\Phi\left(\dfrac{y-1}{d_R}\right)\right]^{n-k} \, dy

We note that for k=1, the integral can be computed explicitly:

(6)\begin{array}{lcl}
   \mathrm{PSG}(1|n) & = & \displaystyle \int_{-\infty}^{+\infty}\left[ \dfrac{\pi}{d_b} \varphi \left(\dfrac{y}{d_b}\right) \right]\left[\Phi\left(\dfrac{y-1}{d_R}\right)\right] \, dy + \int_{-\infty}^{+\infty} \left[ \dfrac{(1-\pi)}{d_x}\varphi \left(\dfrac{y-y_{xm}}{d_x}\right)\right]\left[\Phi\left(\dfrac{y-1}{d_R}\right)\right] \, dy \\
         & = & \pi \left[1-\Phi\left(\dfrac{1}{\sqrt{d_b^2+d_R^2}}\right)\right] + (1-\pi) \left[1-\Phi\left(\dfrac{1-y_{xm}}{\sqrt{d_x^2+d_R^2}}\right)\right]
\end{array}

The computation of the \mathrm{PEG}(k|n) probabilities is done with a quadrature method provided at the creation of the class. We advice the GaussLegendre quadrature with 40 points (default algorithm) applied on the integration interval divided into n sub-intervals. We advice to use n=8 (default value).

The probabilistic model:

We denote by N^n the random variable that counts the number of failure events in the CCF group under one test or demand. Then the range of N^n is [0, n] and its probability law is \mathbb{P}\left[N^n=k\right] = \mathrm{PES}(k|n).

Under N test or demands, we denote by N^{n,N}_t the random variable that counts the number of times when k failure events have occured, for each k in [0, n]. Then N^{n,N}_t follows a Multinomial distribution parameterized by (N,(p_0, \dots, p_n)) with:

(p_0, \dots, p_n) = (\mathrm{PES}(0|n), \dots, \mathrm{PES}(n|n))

The data:

The data is the total impact vector V_t^{n,N} of the CCF group. The component V_t^{n,N}[k] for 0 \leq k \leq n is the number of failure events of multiplicity k in the CCF group. In addition, N is the number of tests and demands on the whole group. Then we have N = \sum_{k=0}^n V_t^{n,N}[k].

Then V_t^{n,N} is a realization of the random variable N^{n,N}_t.

Data likelihood:

The log-likelihood of the model is defined by:

\log \mathcal{L}(\vect{\theta}|V_t^{n,N}) = \sum_{k=0}^n V_t^{n,N}[k] \log \mathrm{PES}(k|n)

The optimal parameter \vect{\theta} maximises the log-likelihoodand is defined as:

(7)\vect{\theta}_{optim} = \arg \max_{\vect{\theta}} \log \mathcal{L}(\vect{\theta}|V_t^{n,N})

Remark: As we have (2), then the log-likelihood can be written as:

\log \cL(\vect{\theta}_t|V_t^{n,N}) = \sum_{k=0}^n V_t^{n,N}[k] \log C_n^k + \sum_{k=0}^n V_t^{n,N}[k] \log \mathrm{PEG}(k|n)

Noting that the first term does not depend on the parameter \vect{\theta}, then we also have:

(8)\vect{\theta}_{optim} = \arg \max_{\vect{\theta}} \sum_{k=0}^n V_t^{n,N}[k] \log \mathrm{PEG}(k|n)

At last, we normalize the log-likelihood values and we consider the following optimisation problem:

(9)\vect{\theta}_{optim} = \arg \max_{\vect{\theta}} \dfrac{\sum_{k=0}^n V_t^{n,N}[k] \log \mathrm{PEG}(k|n)}{\sum_{k=0}^n V_t^{n,N}[k]}

Mankamo method:

Mankamo introduces a new set of parameters: (P_t, P_x, C_{co}, C_x, y_{xm}) defined from the general parameter (4) as follows:

(10)\begin{array}{rcl}
     P_t & = & \mathrm{PSG}(1|n) = \displaystyle \int_{-\infty}^{+\infty} \left[ \dfrac{\pi}{d_b} \varphi \left(\dfrac{y}{d_b}\right) + \dfrac{(1-\pi)}{d_x}\varphi \left(\dfrac{y-y_{xm}}{d_x}\right)\right]\left[\Phi\left(\dfrac{y-1}{d_R}\right)\right] \, dy \\
     P_x & = &\displaystyle \int_{-\infty}^{+\infty} \left[ \dfrac{(1-\pi)}{d_x}\varphi \left(\dfrac{y-y_{xm}}{d_x}\right)\right]\left[\Phi\left(\dfrac{y-1}{d_R}\right)\right] \, dy = (1-\pi) \left[1-\Phi\left(\dfrac{1-y_{xm}}{\sqrt{d_x^2+d_R^2}}\right)\right]\\
     c_{co} & = & \dfrac{d_b^2}{d_b^2+d_R^2}\\
     c_x & = & \dfrac{d_x^2}{d_x^2+d_R^2}
\end{array}

Mankamo assumes that:

(11)y_{xm} = 1-d_R

This assumption means that \mu_R = \mu_x+\sigma_R. Then equations (10) simplifies and we get:

(12)\begin{array}{rcl}
    (1-\pi) & = & -\dfrac{P_x}{\Phi\left(\sqrt{1-c_{x}}\right)}\\
    d_b & = & -\dfrac{\sqrt{c_{co}}}{\Phi^{-1}\left(\dfrac{P_t-P_x}{\pi} \right)}\\
    d_R & = & -\dfrac{\sqrt{1-c_{co}}}{\Phi^{-1}\left( \dfrac{P_t-P_x}{\pi} \right)} \\
    d_x & = & d_R \sqrt{\dfrac{c_{x}}{1-c_{x}}}
\end{array}

We call Mankamo parameter the set:

(13)(P_t, P_x, C_{co}, C_x)

The parameter P_t is directly estimated from the total impact vector:

(14)\hat{P}_t = \sum_{i=1}^n\dfrac{iV_t^{n,N}[i]}{nN}

The parameters must verifiy the following constraints: :

\begin{array}{l}
     0 \leq P_x \leq P_t \\
     0 \leq c_{co} \leq c_{x} \leq 1 \\
     0 \leq 1-\pi = \dfrac{P_x}{\Phi\left(- \sqrt{1-c_{x}}\right)}\leq 1 \\
     0 \leq d_b = -\dfrac{\sqrt{c_{co}}}{\Phi^{-1}\left( \dfrac{P_t-P_x}{\pi} \right)} \\
      0 \leq d_R = -\dfrac{\sqrt{1-c_{co}}}{\Phi^{-1}\left( \dfrac{P_t-P_x}{\pi} \right)}
\end{array}

Assuming that P_t \leq \frac{1}{2}, we can write the parameters definition domain as:

\mathcal{D}_{\cL} = \left\{ (P_t, P_x, c_{co}, c_x) \mbox{ verifies } \cS \right\}

\mathcal{S}= \left\{
\begin{array}{l}
    0\leq P_t \leq \dfrac{1}{2}\\
    0 \leq P_x \leq \min \left \{P_t, \left (P_t-\dfrac{1}{2}\right ) \left(
    1-\dfrac{1}{2\Phi\left(-\sqrt{1-c_{x}}\right)}\right)^{-1}, \Phi\left(- \sqrt{1-c_{x}}\right) \right \} \\
    0 \leq c_{co} \leq 1 \\
    0 \leq c_{x} \leq 1 
\end{array}
\right.

Mankamo adds the following constraint:

(15)\mathcal{C} = \left\{(c_{co}, c_x) \mbox{ verifies } c_{co} \leq c_x \right\}

which means that \sigma_x \geq \sigma_b.

Then the optimal (P_x, C_{co}, C_x) maximises the log-likelihood of the model and then the expression:

(16)(P_x, C_{co}, C_x)_{optim} = \arg \max_{(P_x, C_{co}, C_x) \in \mathcal{D}_{\cL} \cap \mathcal{C}} \sum_{k=0}^n V_t^{n,N}[k] \log \mathrm{PEG}(k|n)

Methods

analyseDistECLMProbabilities(fileNameSample, ...)

Fits distribution on ECL probabilities sample.

analyseGraphsECLMParam(fileNameSample)

Produces graphs to analyse a sample of (Mankamo and general) parameters.

analyseGraphsECLMProbabilities(...)

Produces graphs to analyse a sample of all the ECLM probabilities.

computeAnalyseKMaxSample(p, fileNameInput, ...)

Generates a k_{max} sample and produces graphs to analyse it.

computeECLMProbabilitiesFromMankano(...[, ...])

Computes the sample of all the ECLM probabilities from a sample of Mankamo parameters using the Mankamo assumption.

computeGeneralParamFromMankamo(mankamoParam)

Computes the general parameter from the Mankamo parameter under the Mankamo assumption.

computeKMaxPTS(p)

Computes the minimal multipicity of the common cause failure with a probability greater than a given threshold.

computePEG(k)

Computes the \mathrm{PEG}(k|n) probability.

computePEGall()

Computes all the \mathrm{PEG}(k|n) probabilities for 0 \leq k \leq n.

computePES(k)

Computes the \mathrm{PES}(k|n) probability.

computePESall()

Computes all the \mathrm{PES}(k|n) probabilities for 0 \leq k \leq n.

computePSG(k)

Computes the \mathrm{PSG}(k|n) probability.

computePSG1()

Computes the \mathrm{PSG}(1|n) probability.

computePSGall()

Computes all the \mathrm{PSG}(k|n) probabilities for 0 \leq k \leq n.

computePTS(k)

Computes the \mathrm{PTS}(k|n) probability.

computePTSall()

Computes all the \mathrm{PTS}(k|n) probabilities for 0 \leq k \leq n.

computeValidMankamoStartingPoint(Cx)

Gives a point (P_x, C_{co}) given C_x and P_t verifying the constraints.

estimateBootstrapParamSampleFromMankamo(...)

Generates a Bootstrap sample of the (Mankamo and general) parameters under the Mankamo assumption.

estimateMaxLikelihoodFromMankamo(startingPoint)

Estimates the maximum likelihood (general and Mankamo) parameters under the Mankamo assumption.

getGeneralParameter()

Accessor to the general parameter.

getIntegrationAlgorithm()

Accessor to the integration algorithm.

getMankamoParameter()

Accessor to the Mankamo Parameter.

getN()

Accessor to the CCF group size n.

getPt()

Accessor to the the probability P_t.

getTotalImpactVector()

Accessor to the total impact vector.

setGeneralParameter(generalParameter)

Accessor to the general parameter.

setIntegrationAlgo(integrationAlgo)

Accessor to the integration algorithm.

setMankamoParameter(mankamoParameter)

Accessor to the Mankamo parameter.

setTotalImpactVector(totalImpactVector)

Accessor to the total impact vector.

verifyMankamoConstraints(X)

Verifies if the point (P_x, C_{co}, C_x) verifies the constraints.

logVrais_Mankamo

__init__(totalImpactVector, integrationAlgo=None, nIntervals=8, verbose=False)
analyseDistECLMProbabilities(fileNameSample, kMax, confidenceLevel, factoryColl)

Fits distribution on ECL probabilities sample.

Parameters
fileNameSample: string

The csv file that stores the sample of all the ECLM probabilities.

kMaxint, 0 \leq k_{max} \leq 1

The maximal multipicity of the common cause failure.

confidenceLevelfloat, 0 \leq confidenceLevel \leq 1

The confidence level of each interval.

factoryCollectionlist of DistributionFactory

List of factories that will be used to fit a distribution to the sample.

desc_list: :class:`~openturns.Description`

Description of each graph.

Returns
confidenceInterval_listlist of Interval

The confidence intervals of all the ECLM probability.

graph_marg_listlist of Graph

The fitting graphs of all the ECLM probabilities.

Notes

The confidence intervals and the graphs illustrating the fitting are given according to the following order: (\mathrm{PEG}(0|n), \dots, \mathrm{PEG}(n|n), \mathrm{PSG}(0|n), \dots, \mathrm{PSG}(n|n), \mathrm{PES}(0|n), \dots, \mathrm{PES}(n|n), \mathrm{PTS}(0|n), \dots, \mathrm{PTS}(n|n)). Each fitting is tested using the Lilliefors test. The result is printed and the best model among the list of factories is given. Care: it is not guaranted that the best model be accepted by the Lilliefors test.

analyseGraphsECLMParam(fileNameSample)

Produces graphs to analyse a sample of (Mankamo and general) parameters.

Parameters
fileNameSample: string,

The csv file that stores the sample of (P_t, P_x, C_{co}, C_x, \pi, d_b, d_x, d_R, y_{xm}).

Returns
graphPairsMankamoParamGraph

The Pairs graph of the Mankamo parameter (13).

graphPairsGeneralParamGraph

The Pairs graph of the general parameter (4).

graphMarg_listlist of Graph

The list of the marginal pdf of the Mankamoand general parameters.

descParam: Description

Description of each paramater.

Notes

The marginal distributions are first estimated for the Mankamo parameter (13) then for the general parameter (4).

Each distribution is approximated with a Histogram and a normal kernel smoothing.

analyseGraphsECLMProbabilities(fileNameSample, kMax)

Produces graphs to analyse a sample of all the ECLM probabilities.

Parameters
fileNameSample: string

The csv file that stores the ECLM probabilities.

kMaxint, 0 \leq k_{max} \leq n

The maximal multiplicity of the common cause failure.

Returns
graphPairs_listlist of Graph

The Pairs graph of the ECLM probabilities.

graphPEG_PES_PTS_listlist of Graph

The Pairs graph of the probabilities (\mathrm{PEG}(k|n),\mathrm{PES}(k|n), \mathrm{PTS}(k|n)) for 0 \leq k \leq k_{max}.

graphMargPEG_listlist of Graph

The list of the marginal pdf of the \mathrm{PEG}(k|n) probabilities for 0 \leq k \leq k_{max}.

graphMargPSG_listlist of Graph

The list of the marginal pdf of the \mathrm{PSG}(k|n) probabilities for 0 \leq k \leq k_{max}.

graphMargPES_listlist of Graph

The list of the marginal pdf of the \mathrm{PES}(k|n) probabilities for 0 \leq k \leq k_{max}.

graphMargPTS_listlist of Graph

The list of the marginal pdf of the \mathrm{PTS}(k|n) probabilities for 0 \leq k \leq k_{max}.

desc_list: Description

Description of each graph.

Notes

Each distribution is approximated with a Histogram and a normal kernel smoothing.

computeAnalyseKMaxSample(p, fileNameInput, fileNameRes, blockSize=256, parallel=True)

Generates a k_{max} sample and produces graphs to analyse it.

Parameters
pfloat, :math:` 0 leq p leq 1`

The probability threshold.

fileNameInput: string

The csv file that stores the sample of (P_t, P_x, C_{co}, C_x, \pi, d_b, d_x, d_R, y_{xm}).

fileNameRes: string

The csv file that stores the sample of k_{max} defined by (17).

blockSizeint

The block size after which the sample is saved. Default value is 256.

parallelbool

True if the parallelisation is used. Default value is True.

Returns
kmax_graphGraph

The empirical distribution of K_{max}.

Notes

The function generates a script script_bootstrap_KMax.py that uses the parallelisation of the pool object of the multiprocessing module and a module job_bootstrap_KMax.py where the parallel job is defined. It also creates a file myECLMxxx.xml, where xxx is a large random integer, that stores the total impact vector to be read by the script. All these files are removed at the end of the execution of the method.

The computation is saved in the csv file named fileNameRes every blockSize calculus. The computation can be interrupted: it will be restarted from the last filenameRes saved.

The k_{max} sample is stored in the same order as the parameters sample.

The empirical distribution is fitted on the sample. The 90\% confidence interval is given, computed from the empirical distribution.

computeECLMProbabilitiesFromMankano(fileNameInput, fileNameRes, blockSize=256, parallel=True)

Computes the sample of all the ECLM probabilities from a sample of Mankamo parameters using the Mankamo assumption.

Parameters
fileNameInput: string

The csv file that stores the sample of (P_t, P_x, C_{co}, C_x, \pi, d_b, d_x, d_R, y_{xm}).

fileNameRes: string

The csv file that stores the ECLM probabilities.

blockSizeint

The block size after which the sample is saved. Default value is 256.

parallelbool

True if the parallelisation is used. Default value is True.

Notes

The ECLM probabilities are computed using the Mankamo assumption (11). They are returned according to the order (\mathrm{PEG}(0|n), \dots, \mathrm{PEG}(n|n), \mathrm{PSG}(0|n), \dots, \mathrm{PSG}(n|n), \mathrm{PES}(0|n), \dots, \mathrm{PES}(n|n), \mathrm{PTS}(0|n), \dots, \mathrm{PTS}(n|n)) using equations (5), (1), (2), (3), using the Mankamo assumption (11).

The function generates a script script_bootstrap_ECLMProbabilities.py that uses the parallelisation of the pool object of the multiprocessing module and a module job_bootstrap_ECLMProbabilities.py where the parallel job is defined. It also creates a file myECLMxxx.xml, where xxx is a large random integer, that stores the total impact vector to be read by the script. All these files are removed at the end of the execution of the method.

The computation is saved in the csv file named fileNameRes every blockSize calculus. The computation can be interrupted: it will be restarted from the last filenameRes saved.

The probabilities sample is stored in the same order as the parameters sample.

computeGeneralParamFromMankamo(mankamoParam)

Computes the general parameter from the Mankamo parameter under the Mankamo assumption.

Parameters
mankamoParamlist of float

The Mankamo parameter (13).

Returns
generalParamlist of float

The general parameter (4).

Notes

The general parameter (4) is computed from the Mankamo parameter (13) under the Mankamo assumption (11) using equations (12).

computeKMaxPTS(p)

Computes the minimal multipicity of the common cause failure with a probability greater than a given threshold.

Parameters
pfloat, :math:` 0 leq p leq 1`

The probability threshold.

Returns
kMaxint

The minimal multipicity of the common cause failure with a probability greater than p.

Notes

The k_{max} multiplicity is the minimal multipicity of the common cause failure such that the probability that at least k_{max} failures occur is greater than p. Then k_{max} is defined by:

(17)k_{max}(p) = \max \{ k | \mathrm{PTS}(k|n) > p \}

The probability \mathrm{PTS}(k|n) is computed using (3).

computePEG(k)

Computes the \mathrm{PEG}(k|n) probability.

Parameters
kint, 0 \leq k \leq n

Multiplicity of the common cause failure event.

Returns
peg_knfloat, 0 \leq \mathrm{PEG}(k|n) \leq 1

The \mathrm{PEG}(k|n) probability.

Notes

The \mathrm{PEG}(k|n) probability is computed using (5).

computePEGall()

Computes all the \mathrm{PEG}(k|n) probabilities for 0 \leq k \leq n.

Returns
peg_listseq of float, 0 \leq \mathrm{PEG}(k|n) \leq 1

The \mathrm{PEG}(k|n) probabilities for 0 \leq k \leq n.

Notes

All the \mathrm{PEG}(k|n) probabilities are computed using (5).

computePES(k)

Computes the \mathrm{PES}(k|n) probability.

Parameters
kint, 0 \leq k \leq n

Multiplicity of the failure event.

Returns
pes_knfloat, 0 \leq \mathrm{PES}(k|n) \leq 1

The \mathrm{PES}(k|n) probability.

Notes

The \mathrm{PES}(k|n) probability is computed using (2).

computePESall()

Computes all the \mathrm{PES}(k|n) probabilities for 0 \leq k \leq n.

Returns
pes_listseq of float, 0 \leq \mathrm{PES}(k|n) \leq 1

The \mathrm{PES}(k|n) probabilities for 0 \leq k \leq n.

Notes

All the \mathrm{PES}(k|n) probabilities are computed using (2).

computePSG(k)

Computes the \mathrm{PSG}(k|n) probability.

Parameters
kint, 0 \leq k \leq n

Multiplicity of the common cause failure event.

Returns
psg_knfloat, 0 \leq \mathrm{PSG}(k|n) \leq 1

The \mathrm{PSG}(k|n) probability.

Notes

The \mathrm{PSG}(k|n) probability is computed using (1) for k !=1 and using (6) for k=1.

computePSG1()

Computes the \mathrm{PSG}(1|n) probability.

Returns
psg_1nfloat, 0 \leq \mathrm{PSG}(1|n) \leq 1

The \mathrm{PSG}(1|n) probability.

Notes

The -\mathrm{PSG}(1|n) probability is computed using (6).

computePSGall()

Computes all the \mathrm{PSG}(k|n) probabilities for 0 \leq k \leq n.

Returns
psg_listseq of float, 0 \leq \mathrm{PSG}(k|n) \leq 1

The \mathrm{PSG}(k|n) probabilities for 0 \leq k \leq n.

Notes

All the \mathrm{PSG}(k|n) probabilities are computed using (1) for k != 1 and (6) for k = 1.

computePTS(k)

Computes the \mathrm{PTS}(k|n) probability.

Parameters
kint, 0 \leq k \leq n

Multiplicity of the common cause failure event.

Returns
pts_knfloat, 0 \leq \mathrm{PTS}(k|n) \leq 1

The \mathrm{PTS}(k|n) probability.

Notes

The \mathrm{PTS}(k|n) probability is computed using (3) where the \mathrm{PES}(i|n) probability is computed using (2).

computePTSall()

Computes all the \mathrm{PTS}(k|n) probabilities for 0 \leq k \leq n.

Returns
pts_listseq of float, 0 \leq \mathrm{PTS}(k|n) \leq 1

The \mathrm{PTS}(k|n) probabilities for 0 \leq k \leq n.

Notes

All the \mathrm{PTS}(k|n) probabilities are computed using (3).

computeValidMankamoStartingPoint(Cx)

Gives a point (P_x, C_{co}) given C_x and P_t verifying the constraints.

Parameters
Cxfloat, 0 < C_x < 1

The parameter C_x.

Returns
validPointPoint

A valid point (P_x, C_{co}, C_x) verifying the constraints.

Notes

The constraints are defined in (15) under the Mankamo assumption (11). The parameter P_t is computed from the total impact vector as (14). For a given C_x, we give the range of possible values for P_x and C_{co} and we propose a valid point (P_x, C_{co}, C_x).

estimateBootstrapParamSampleFromMankamo(Nbootstrap, startingPoint, fileNameRes, blockSize=256, parallel=True)

Generates a Bootstrap sample of the (Mankamo and general) parameters under the Mankamo assumption.

Parameters
Nbootstrapint

The size of the sample generated.

startingPointlist of float

Mankamo starting point (13) for the optimization problem.

fileNameRes: string

The csv file that stores the sample of (P_t, P_x, C_{co}, C_x, \pi, d_b, d_x, d_R, y_{xm}) under the Mankamo assumption (11).

blockSizeint

The block size after which the sample is saved. Default value is 256.

parallelbool

True if the parallelisation is used. Default value is True.

Notes

The Mankamo parameter sample is obtained by bootstraping the empirical law of the total impact vector N_b times. The total empirical impact vector follows the distribution MultiNomial parameterized by the empirical probabilities [p_0^{emp},\dots, p_n^{emp}] where p_k^{emp} = \dfrac{V_t^{n,N}[k]}{N} and N is the number of tests and demands on the whole group. Then the optimisation problem (16) is solved using the specified starting point.

The function generates a script script_bootstrap_ParamFromMankamo.py that uses the parallelisation of the pool object of the multiprocessing module and a module job_bootstrap_ParamFromMankamo.py where the parallel job is defined. It also creates a file myECLMxxx.xml, where xxx is a large random integer, that stores the total impact vector to be read by the script. All these files are removed at the end of the execution of the method.

The computation is saved in the csv file named fileNameRes every blockSize calculus. The computation can be interrupted: it will be restarted from the last filenameRes saved.

estimateMaxLikelihoodFromMankamo(startingPoint, visuLikelihood=False)

Estimates the maximum likelihood (general and Mankamo) parameters under the Mankamo assumption.

Parameters
startingPointPoint

Starting point (P_x, C_{co}, C_x) for the optimization problem.

visuLikelihoodbool

Produces the graph of the log-likelihood function at the optimal point. Default value is False.

Returns
paramListPoint

The optimal point (P_t, P_x, C_{co}, C_x, \pi, d_b, d_x, d_R, y_{xm}) where y_{xm} = 1-d_R.

finalLogLikValuefloat

The value of the reduced log-likelihood function (9) at the optimal point.

graphListlist of Graph

The collection of graphs drawing the log-likelihood function at the optimal point when one or two components are fixed.

Notes

If the starting point is not valid, we computes a valid one witht the function computeValidMankamoStartingPoint at the point c_x = 0.7.

getGeneralParameter()

Accessor to the general parameter.

Returns
generalParameterlist of foat

The general parameter defined in (4).

getIntegrationAlgorithm()

Accessor to the integration algorithm.

Returns
integrationAlgoIntegrationAlgorithm

The integration algorithm used to compute the integrals.

getMankamoParameter()

Accessor to the Mankamo Parameter.

Returns
mankamoParameterPoint

The Mankamo parameter (13).

getN()

Accessor to the CCF group size n.

Returns
nint

The CCF group size n.

getPt()

Accessor to the the probability P_t.

Returns
Ptfloat, 0 < P_t < 1

The estimator of PT(|n).

getTotalImpactVector()

Accessor to the total impact vector.

Returns
totalImpactVectorIndices

The total impact vector of the CCF group.

setGeneralParameter(generalParameter)

Accessor to the general parameter.

Parameters
generalParameterlist of float

The general parameter (4).

setIntegrationAlgo(integrationAlgo)

Accessor to the integration algorithm.

Parameters
integrationAlgoIntegrationAlgorithm

The integration algorithm used to compute the integrals.

setMankamoParameter(mankamoParameter)

Accessor to the Mankamo parameter.

Parameters
mankamoParameterlist of float

The Mankamo parameter (13).

Notes

It automaticcally updates the general parameter.

setTotalImpactVector(totalImpactVector)

Accessor to the total impact vector.

Parameters
totalImpactVectorIndices

The total impact vector of the common cause failure (CCF) group.

verifyMankamoConstraints(X)

Verifies if the point (P_x, C_{co}, C_x) verifies the constraints.

Parameters
inPointPoint

The point (P_x, C_{co}, C_x)

Returns
testResbool

True if the point verifies the constraints.

Notes

The constraints are defined in (15) under the Mankamo assumption (11).