Note
Go to the end to download the full example code.
Use the Adaptive Directional Stratification Algorithm¶
In this example we estimate a failure probability with the adaptive directional simulation algorithm provided by the AdaptiveDirectionalStratification class.
Introduction¶
The adaptive directional simulation algorithm operates in the standard. It relies on:
a root strategy to evaluate the nearest failure point along each direction and take the contribution of each direction to the failure event probability into account. The available strategies are: - RiskyAndFast - MediumSafe - SafeAndSlow
a sampling strategy to choose directions in the standard space. The available strategies are: - RandomDirection - OrthogonalDirection
Let us consider the analytical example of the cantilever beam described here.
from openturns.usecases import cantilever_beam
import openturns as ot
We load the model from the usecases module :
We load the joint probability distribution of the input parameters :
We load the model giving the displacement at the end of the beam :
We create the event whose probability we want to estimate.
vect = ot.RandomVector(distribution)
G = ot.CompositeRandomVector(model, vect)
event = ot.ThresholdEvent(G, ot.Greater(), 0.30)
Root finding algorithm.
Direction sampling algorithm.
Create a simulation algorithm.
Retrieve results.
result = algo.getResult()
probability = result.getProbabilityEstimate()
print(result)
print("Pf=", probability)
print("Iterations=", result.getOuterSampling())
probabilityEstimate=5.080297e-07 varianceEstimate=1.473633e-15 standard deviation=3.84e-08 coefficient of variation=7.56e-02 confidenceLength(0.95)=1.50e-07 outerSampling=39995 blockSize=1
Pf= 5.080297382768879e-07
Iterations= 39995
OpenTURNS