Note
Go to the end to download the full example code.
Print a reliability benchmark problemΒΆ
import otbenchmark as otb
problem = otb.RminusSReliability()
print(problem)
name = R-S
event = class=ThresholdEventImplementation antecedent=class=CompositeRandomVector function=class=Function name=Unnamed implementation=class=FunctionImplementation name=Unnamed description=[R,S,y0] evaluationImplementation=class=SymbolicEvaluation name=Unnamed inputVariablesNames=[R,S] outputVariablesNames=[y0] formulas=[R - S] gradientImplementation=class=SymbolicGradient name=Unnamed evaluation=class=SymbolicEvaluation name=Unnamed inputVariablesNames=[R,S] outputVariablesNames=[y0] formulas=[R - S] hessianImplementation=class=SymbolicHessian name=Unnamed evaluation=class=SymbolicEvaluation name=Unnamed inputVariablesNames=[R,S] outputVariablesNames=[y0] formulas=[R - S] antecedent=class=UsualRandomVector distribution=class=JointDistribution name=JointDistribution dimension=2 copula=class=IndependentCopula name=IndependentCopula dimension=2 marginal[0]=class=Normal name=Normal dimension=1 mean=class=Point name=Unnamed dimension=1 values=[4] sigma=class=Point name=Unnamed dimension=1 values=[1] correlationMatrix=class=CorrelationMatrix dimension=1 implementation=class=MatrixImplementation name=Unnamed rows=1 columns=1 values=[1] marginal[1]=class=Normal name=Normal dimension=1 mean=class=Point name=Unnamed dimension=1 values=[2] sigma=class=Point name=Unnamed dimension=1 values=[1] correlationMatrix=class=CorrelationMatrix dimension=1 implementation=class=MatrixImplementation name=Unnamed rows=1 columns=1 values=[1] operator=class=Less name=Unnamed threshold=0
probability = 0.07864960352514257
print(problem.toFullString())
name = R-S
function = [R,S]->[R - S]
operator = <
threshold = 0.0
probability = 0.07864960352514257
beta = 1.414213562373095
distribution = JointDistribution(Normal(mu = 4, sigma = 1), Normal(mu = 2, sigma = 1), IndependentCopula(dimension = 2))
problem.getName()
'R-S'
event = problem.getEvent()
g = event.getFunction()
g
event.getOperator()
threshold = event.getThreshold()
threshold
0.0
pf = problem.getProbability()
pf
0.07864960352514257
beta = problem.computeBeta()
beta
1.414213562373095
inputVector = event.getAntecedent()
distribution = inputVector.getDistribution()
distribution
Total running time of the script: (0 minutes 0.004 seconds)