diff --git a/otbenchmark/master/_downloads/011e9011be6c44d1edb1eaeb85a11c55/plot_sensitivity_distribution_ishigami.ipynb b/otbenchmark/master/_downloads/011e9011be6c44d1edb1eaeb85a11c55/plot_sensitivity_distribution_ishigami.ipynb new file mode 100644 index 00000000000..d518aa44ad9 --- /dev/null +++ b/otbenchmark/master/_downloads/011e9011be6c44d1edb1eaeb85a11c55/plot_sensitivity_distribution_ishigami.ipynb @@ -0,0 +1,104 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Distribution of the Sobol' indices on Ishigami function\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "In this document, we consider the Ishigami function and check the distribution of the sensitivity indices.\nWe check that it is consistent with the actual distribution of the estimator.\n\nThe problem is that the exact distribution of the estimator is unknown in general.\nThe asymptotic distribution is known, but this may not reflect the true distribution\nwhen the sample size is not large enough.\nIn order to get a reference distribution of the estimator, we generate a Monte-Carlo sample of the Sobol' indices,\nbut repeating the estimation of the Sobol' indices on indepedent sub-samples.\nThen we use kernel smoothing to approximate the actual distribution of the Sobol' indices.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import openturns as ot\nimport otbenchmark as otb\nimport openturns.viewer as otv\nimport pylab as pl" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## When we estimate Sobol' indices, we may encounter the following warning messages:\nWRN - The estimated first order Sobol index (2) is greater than its total order index ...\nWRN - The estimated total order Sobol index (2) is lesser than first order index ...\n```\nLots of these messages are printed in the current Notebook. This is why we disable them with:\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "ot.Log.Show(ot.Log.NONE)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "problem = otb.IshigamiSensitivity()\nprint(problem)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "In the following loop, we compare the distribution of the sensitivity indices computed and the actual distribution\nof the estimator computed by Monte-Carlo sampling (using kernel smoothing).\nThe distribution of the sensitivity indices can be computed either from bootstrap\n(using kernel smoothing to approximate the distribution)\nor from asymptotic analysis (using a Gaussian distribution).\n\nIn both cases, the distribution is estimated using one sample only.\nOn the contrary, the actual distribution of the estimator (i.e. the reference distribution) is computed\nby generating independent realizations of the estimator.\nHence, it is expected that the distribution computed is not centered on the true value of the sensitivity indices.\nInstead, the distribution based on the sample of estimators must be centered on the true value of the index,\nsince these estimators are consistent, converge to the true value when the sample size increase\nand have no observable bias (although this is not proven by theory).\n\nThe two essential parameters in the script are the following:\n\n- `sampleSize` is the size of the sample used to estimated on set of sensitivity\n indices (the number of sensitivity indices is equal to twice, because of first and total order Sobol' indices,\n the product of the number of input variables),\n- `numberOfRepetitions` is the size of the Monte-Carlo sample of sensitivity indices.\n\nWe do not necessarily want to use a large value of `sampleSize`.\nThis may be required, however, if we want to check the asymptotic distribution computed,\nbecause the asymptotic regime may not be reached for small values and the code cannot be blamed for that.\nThis is why the asymptotic option may fail if `sampleSize` is not large enough.\nThe bootstrap option may fail too, because the sample size may be so small that re-sampling\nin the basic sample may not provide enough variability.\n\nThe value of `numberOfRepetitions` must be as large as possible because it ensures that\nthe reference distribution used for this verification is accurate enough.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "numberOfRepetitions = 100 # Larger is better\nproblem = otb.IshigamiSensitivity()\nmetaSAAlgorithm = otb.SensitivityBenchmarkMetaAlgorithm(problem)\nfor sampleSize in [100, 200, 400, 800]:\n print(\"sampleSize=\", sampleSize)\n for useAsymptotic in [False, True]:\n if useAsymptotic:\n label = \"Asymptotic\"\n else:\n label = \"Bootstrap\"\n print(label)\n ot.ResourceMap.SetAsBool(\n \"SobolIndicesAlgorithm-DefaultUseAsymptoticDistribution\", useAsymptotic\n )\n for estimator in [\"Saltelli\", \"Martinez\", \"Jansen\", \"MauntzKucherenko\"]:\n print(\"Estimator:\", estimator)\n benchmark = otb.SensitivityDistribution(\n problem,\n metaSAAlgorithm,\n sampleSize,\n numberOfRepetitions=numberOfRepetitions,\n estimator=estimator,\n )\n grid = benchmark.draw()\n view = otv.View(grid)\n figure = view.getFigure()\n _ = figure.suptitle(\n \"n = %d, %s, %s. %s.\"\n % (sampleSize, problem.getName(), estimator, label)\n )\n _ = figure.set_figwidth(8.0)\n _ = figure.set_figheight(6.0)\n _ = figure.subplots_adjust(wspace=0.4, hspace=0.4)\n # Customize legends\n ax = figure.get_axes()\n for i in range(len(ax) - 1):\n _ = ax[i].legend(\"\")\n _ = ax[-1].legend(bbox_to_anchor=(1.0, 1.0))\n _ = pl.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The plot compare two distributions.\n\n- The \"Computed\" distribution is the one computed by OpenTURNS.\n- The \"Sample\" distribution is the one generated by Monte-Carlo sampling.\n\nThe fact that the \"Computed\" distribution is not centered on the true value is an\nexpected property of the way the distribution is computed.\nWhat must be checked, instead, is the the variance of the distribution.\nMore precisely, we check that the asymptotic covariance is correctly computed by the library.\nIn other words, we focus on the spread of the distribution and check that it is consistent with the actual spread.\nThis comparison is, however, restricted by the fact that the re-sampling size has a limited size\nequal to the `numberOfRepetitions` parameter. Increasing this parameter allows the check to be more accurate,\nbut increases the simulation elapsed time.\n\nWe see that these distributions are never far away from each other.\nThis proves that the computation of the distribution is correct, for both the asymptotic and bootstrap options.\n\n" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.20" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/otbenchmark/master/_downloads/02ebaaff0fbfc2d6c398818b1ca6b2f8/plot_nloscillator_sensitivity.zip b/otbenchmark/master/_downloads/02ebaaff0fbfc2d6c398818b1ca6b2f8/plot_nloscillator_sensitivity.zip index 3c3a0db87cd..645f70e1c43 100644 Binary files a/otbenchmark/master/_downloads/02ebaaff0fbfc2d6c398818b1ca6b2f8/plot_nloscillator_sensitivity.zip and b/otbenchmark/master/_downloads/02ebaaff0fbfc2d6c398818b1ca6b2f8/plot_nloscillator_sensitivity.zip differ diff --git a/otbenchmark/master/_downloads/038b9ccad3f6f9c5a018a9685e9f905b/plot_reliability_benchmark.ipynb b/otbenchmark/master/_downloads/038b9ccad3f6f9c5a018a9685e9f905b/plot_reliability_benchmark.ipynb new file mode 100644 index 00000000000..140a9929def --- /dev/null +++ b/otbenchmark/master/_downloads/038b9ccad3f6f9c5a018a9685e9f905b/plot_reliability_benchmark.ipynb @@ -0,0 +1,274 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Benchmark on a given set of problems\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "In this example, we show how to make a loop over the problems in the benchmark.\nWe also show how to run various reliability algorithms on a given problem so that\nwe can score the methods using number of digits or performance.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import openturns as ot\nimport numpy as np\nimport otbenchmark as otb" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Browse the reliability problems\n\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "We present the BBRC test cases using the otbenchmark module.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "benchmarkProblemList = otb.ReliabilityBenchmarkProblemList()\nnumberOfProblems = len(benchmarkProblemList)\nnumberOfProblems" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "for i in range(numberOfProblems):\n problem = benchmarkProblemList[i]\n name = problem.getName()\n pf = problem.getProbability()\n event = problem.getEvent()\n antecedent = event.getAntecedent()\n distribution = antecedent.getDistribution()\n dimension = distribution.getDimension()\n print(\"#\", i, \":\", name, \" : pf = \", pf, \", dimension=\", dimension)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "maximumEvaluationNumber = 1000\nmaximumAbsoluteError = 1.0e-3\nmaximumRelativeError = 1.0e-3\nmaximumResidualError = 1.0e-3\nmaximumConstraintError = 1.0e-3\nnearestPointAlgorithm = ot.AbdoRackwitz()\nnearestPointAlgorithm.setMaximumCallsNumber(maximumEvaluationNumber)\nnearestPointAlgorithm.setMaximumAbsoluteError(maximumAbsoluteError)\nnearestPointAlgorithm.setMaximumRelativeError(maximumRelativeError)\nnearestPointAlgorithm.setMaximumResidualError(maximumResidualError)\nnearestPointAlgorithm.setMaximumConstraintError(maximumConstraintError)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## The FORM method\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "problem = otb.ReliabilityProblem8()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "metaAlgorithm = otb.ReliabilityBenchmarkMetaAlgorithm(problem)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "benchmarkResult = metaAlgorithm.runFORM(nearestPointAlgorithm)\nbenchmarkResult.summary()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## The SORM method\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "benchmarkResult = metaAlgorithm.runSORM(nearestPointAlgorithm)\nbenchmarkResult.summary()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## The LHS method\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "benchmarkResult = metaAlgorithm.runLHS(maximumOuterSampling=10000)\nbenchmarkResult.summary()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## The MonteCarloSampling method\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "benchmarkResult = metaAlgorithm.runMonteCarlo(maximumOuterSampling=10000)\nbenchmarkResult.summary()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## The FORM - Importance Sampling method\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "benchmarkResult = metaAlgorithm.runFORMImportanceSampling(nearestPointAlgorithm)\nbenchmarkResult.summary()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## The Subset method\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "benchmarkResult = metaAlgorithm.runSubsetSampling()\nbenchmarkResult.summary()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The following function computes the number of correct base-10 digits\nin the computed result compared to the exact result.\nThe `CompareMethods` function takes as a parameter a problem\nand it returns the probabilities estimated by each method.\nIn addition, it returns the performance of these methods.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "def PrintResults(name, benchmarkResult):\n print(\"------------------------------------------------------------------\")\n print(name)\n numberOfDigitsPerEvaluation = (\n benchmarkResult.numberOfCorrectDigits\n / benchmarkResult.numberOfFunctionEvaluations\n )\n print(\"Estimated probability:\", benchmarkResult.computedProbability)\n print(\"Number of function calls:\", benchmarkResult.numberOfFunctionEvaluations)\n print(\"Number of correct digits=%.1f\" % (benchmarkResult.numberOfCorrectDigits))\n print(\n \"Performance=%.2e (correct digits/evaluation)\" % (numberOfDigitsPerEvaluation)\n )\n return [name, benchmarkResult.numberOfCorrectDigits, numberOfDigitsPerEvaluation]" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "def CompareMethods(problem, nearestPointAlgorithm, maximumOuterSampling=10000):\n \"\"\"\n Runs various algorithms on a given problem.\n \"\"\"\n summaryList = []\n pfReference = problem.getProbability()\n print(\"Exact probability:\", pfReference)\n metaAlgorithm = otb.ReliabilityBenchmarkMetaAlgorithm(problem)\n # SubsetSampling\n benchmarkResult = metaAlgorithm.runSubsetSampling()\n summaryList.append(PrintResults(\"SubsetSampling\", benchmarkResult))\n # FORM\n benchmarkResult = metaAlgorithm.runFORM(nearestPointAlgorithm)\n summaryList.append(PrintResults(\"FORM\", benchmarkResult))\n # SORM\n benchmarkResult = metaAlgorithm.runSORM(nearestPointAlgorithm)\n summaryList.append(PrintResults(\"SORM\", benchmarkResult))\n # FORM - ImportanceSampling\n benchmarkResult = metaAlgorithm.runFORMImportanceSampling(\n nearestPointAlgorithm, maximumOuterSampling=maximumOuterSampling\n )\n summaryList.append(PrintResults(\"FORM-IS\", benchmarkResult))\n # MonteCarloSampling\n benchmarkResult = metaAlgorithm.runMonteCarlo(\n maximumOuterSampling=maximumOuterSampling\n )\n summaryList.append(PrintResults(\"MonteCarloSampling\", benchmarkResult))\n # LHS\n benchmarkResult = metaAlgorithm.runLHS()\n summaryList.append(PrintResults(\"LHS\", benchmarkResult))\n # Gather results\n numberOfMethods = len(summaryList)\n correctDigitsList = []\n performanceList = []\n algorithmNames = []\n for i in range(numberOfMethods):\n [name, numberOfCorrectDigits, numberOfDigitsPerEvaluation] = summaryList[i]\n algorithmNames.append(name)\n correctDigitsList.append(numberOfCorrectDigits)\n performanceList.append(numberOfDigitsPerEvaluation)\n print(\"------------------------------------------------------------------------\")\n print(\"Scoring by number of correct digits\")\n indices = np.argsort(correctDigitsList)\n rank = list(indices)\n for i in range(numberOfMethods):\n j = rank[i]\n print(\"%d : %s (%.1f)\" % (j, algorithmNames[j], correctDigitsList[j]))\n print(\"------------------------------------------------------------------------\")\n print(\"Scoring by performance (digits/evaluation)\")\n indices = np.argsort(performanceList)\n rank = list(indices)\n for i in range(len(indices)):\n j = rank[i]\n print(\"%d : %s (%.1e)\" % (j, algorithmNames[j], performanceList[j]))\n return correctDigitsList, performanceList" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "problem = otb.ReliabilityProblem8()\n_ = CompareMethods(problem, nearestPointAlgorithm)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Remarks\n\n* We note that the FORM and SORM methods are faster, but, they do not converge to the exact proba.\n* We also notice the effectiveness of the FORM-ImportanceSampling method (inexpensive method, and converges).\n* The convergence of the MonteCarlo method requires a large number of simulations.\n* SubsetSampling converges even if the probability is very low.\n\n\n" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.20" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/otbenchmark/master/_downloads/0615aea0c06739ae8be5b4dc14384624/plot_rp75.ipynb b/otbenchmark/master/_downloads/0615aea0c06739ae8be5b4dc14384624/plot_rp75.ipynb new file mode 100644 index 00000000000..5f37c651e99 --- /dev/null +++ b/otbenchmark/master/_downloads/0615aea0c06739ae8be5b4dc14384624/plot_rp75.ipynb @@ -0,0 +1,355 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# RP75 analysis and 2D graphics\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The objective of this example is to present problem 75 of the BBRC.\nWe also present graphic elements for the visualization of the limit state surface in 2 dimensions.\n\nThis problem has two dimension and a reference probability approximately equal to $10^{-2}$.\nHence, the problem should be relatively easy to solve.\nThe failure domain is made of two separate sub-domains, leading to two different design points.\nHence, the FORM approximation cannot be accurate, because it systematically ignores one of them,\nno matter what point is found by the optimization algorithm.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import openturns as ot\nimport openturns.viewer as otv\nimport otbenchmark as otb" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "problem = otb.ReliabilityProblem75()\nprint(problem)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "event = problem.getEvent()\ng = event.getFunction()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "problem.getProbability()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Create the Monte-Carlo algorithm\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "algoProb = ot.ProbabilitySimulationAlgorithm(event)\nalgoProb.setMaximumOuterSampling(1000)\nalgoProb.setMaximumCoefficientOfVariation(0.01)\nalgoProb.run()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Get the results\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "resultAlgo = algoProb.getResult()\nneval = g.getEvaluationCallsNumber()\nprint(\"Number of function calls = %d\" % (neval))\npf = resultAlgo.getProbabilityEstimate()\nprint(\"Failure Probability = %.4f\" % (pf))\nlevel = 0.95\nc95 = resultAlgo.getConfidenceLength(level)\npmin = pf - 0.5 * c95\npmax = pf + 0.5 * c95\nprint(\"%.1f %% confidence interval :[%.4f,%.4f] \" % (level * 100, pmin, pmax))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Compute the bounds of the domain\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "inputVector = event.getAntecedent()\ndistribution = inputVector.getDistribution()\nX1 = distribution.getMarginal(0)\nX2 = distribution.getMarginal(1)\nalphaMin = 0.00001\nalphaMax = 1 - alphaMin\nlowerBound = ot.Point(\n [X1.computeQuantile(alphaMin)[0], X2.computeQuantile(alphaMin)[0]]\n)\nupperBound = ot.Point(\n [X1.computeQuantile(alphaMax)[0], X2.computeQuantile(alphaMax)[0]]\n)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "nbPoints = [100, 100]\nfigure = g.draw(lowerBound, upperBound, nbPoints)\nfigure.setTitle(\" Iso-values of limit state function\")\nfigure" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Print the iso-values of the distribution\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "_ = otv.View(distribution.drawPDF())" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "sampleSize = 5000\ndrawEvent = otb.DrawEvent(event)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "cloud = drawEvent.drawSampleCrossCut(sampleSize)\n_ = otv.View(cloud)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Draw the limit state surface\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "bounds = ot.Interval(lowerBound, upperBound)\nbounds" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "graph = drawEvent.drawLimitStateCrossCut(bounds)\ngraph.add(cloud)\ngraph" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "domain = drawEvent.fillEventCrossCut(bounds)\n_ = otv.View(domain)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "domain.add(cloud)\n_ = otv.View(domain)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Test with FORM method\n\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "We create a NearestPoint algorithm\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "nearestPointAlgorithm = ot.Cobyla()\n# Resolution options:\neps = 1e-3\nnearestPointAlgorithm.setMaximumCallsNumber(1000)\nnearestPointAlgorithm.setMaximumAbsoluteError(eps)\nnearestPointAlgorithm.setMaximumRelativeError(eps)\nnearestPointAlgorithm.setMaximumResidualError(eps)\nnearestPointAlgorithm.setMaximumConstraintError(eps)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "initialNumberOfCall = g.getEvaluationCallsNumber()\nmean = distribution.getMean()\nalgoFORM = ot.FORM(nearestPointAlgorithm, event, mean)\nalgoFORM.run()\nresultFORM = algoFORM.getResult()\nnumberOfFunctionEvaluationsFORM = g.getEvaluationCallsNumber() - initialNumberOfCall\nprobabilityFORM = resultFORM.getEventProbability()\nprint(\"Number of calls to the limit state =\", numberOfFunctionEvaluationsFORM)\nprint(\"Pf =\", probabilityFORM)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "We create a NearestPoint algorithm\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "nearestPointAlgorithm = ot.AbdoRackwitz()\n# Resolution options:\neps = 1e-3\nnearestPointAlgorithm.setMaximumCallsNumber(100)\nnearestPointAlgorithm.setMaximumAbsoluteError(eps)\nnearestPointAlgorithm.setMaximumRelativeError(eps)\nnearestPointAlgorithm.setMaximumResidualError(eps)\nnearestPointAlgorithm.setMaximumConstraintError(eps)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### If the mean point is used as a starting point with the `AbdoRackwitz` class, then the algorithm fails with:\nRuntimeError: InternalException : Error in Abdo Rackwitz algorithm: the gradient of the level function is zero ...\n```\nIn order to fix this, we just use a different starting point.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "startingPoint = mean + [1.0e-3] * 2" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "initialNumberOfCall = g.getEvaluationCallsNumber()\nmean = distribution.getMean()\nalgoFORM = ot.FORM(nearestPointAlgorithm, event, startingPoint)\nalgoFORM.run()\nresultFORM = algoFORM.getResult()\nnumberOfFunctionEvaluationsFORM = g.getEvaluationCallsNumber() - initialNumberOfCall\nprobabilityFORM = resultFORM.getEventProbability()\nprint(\"Number of calls to the limit state =\", numberOfFunctionEvaluationsFORM)\nprint(\"Pf =\", probabilityFORM)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mean" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "g.gradient(mean)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "otv.View.ShowAll()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.20" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/otbenchmark/master/_downloads/07fcc19ba03226cd3d83d4e40ec44385/auto_examples_python.zip b/otbenchmark/master/_downloads/07fcc19ba03226cd3d83d4e40ec44385/auto_examples_python.zip index 6fade9a7ffa..63d3a520be8 100644 Binary files a/otbenchmark/master/_downloads/07fcc19ba03226cd3d83d4e40ec44385/auto_examples_python.zip and b/otbenchmark/master/_downloads/07fcc19ba03226cd3d83d4e40ec44385/auto_examples_python.zip differ diff --git a/otbenchmark/master/_downloads/089cc06bfbb04f449186c00ba90d1846/plot_rp24.ipynb b/otbenchmark/master/_downloads/089cc06bfbb04f449186c00ba90d1846/plot_rp24.ipynb new file mode 100644 index 00000000000..4c349a76fe5 --- /dev/null +++ b/otbenchmark/master/_downloads/089cc06bfbb04f449186c00ba90d1846/plot_rp24.ipynb @@ -0,0 +1,261 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# RP24 analysis and 2D graphics\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The objective of this example is to present problem 24 of the BBRC.\nWe also present graphic elements for the visualization of the limit state surface in 2 dimensions.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import openturns as ot\nimport openturns.viewer as otv\nimport otbenchmark as otb" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "problem = otb.ReliabilityProblem24()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "print(problem)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "event = problem.getEvent()\ng = event.getFunction()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "problem.getProbability()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Create the Monte-Carlo algorithm\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "algoProb = ot.ProbabilitySimulationAlgorithm(event)\nalgoProb.setMaximumOuterSampling(1000)\nalgoProb.setMaximumCoefficientOfVariation(0.01)\nalgoProb.run()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Get the results\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "resultAlgo = algoProb.getResult()\nneval = g.getEvaluationCallsNumber()\nprint(\"Number of function calls = %d\" % (neval))\npf = resultAlgo.getProbabilityEstimate()\nprint(\"Failure Probability = %.4f\" % (pf))\nlevel = 0.95\nc95 = resultAlgo.getConfidenceLength(level)\npmin = pf - 0.5 * c95\npmax = pf + 0.5 * c95\nprint(\"%.1f %% confidence interval :[%.4f,%.4f] \" % (level * 100, pmin, pmax))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Compute the bounds of the domain\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "inputVector = event.getAntecedent()\ndistribution = inputVector.getDistribution()\nX1 = distribution.getMarginal(0)\nX2 = distribution.getMarginal(1)\nalphaMin = 0.00001\nalphaMax = 1 - alphaMin\nlowerBound = ot.Point(\n [X1.computeQuantile(alphaMin)[0], X2.computeQuantile(alphaMin)[0]]\n)\nupperBound = ot.Point(\n [X1.computeQuantile(alphaMax)[0], X2.computeQuantile(alphaMax)[0]]\n)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "nbPoints = [100, 100]\nfigure = g.draw(lowerBound, upperBound, nbPoints)\nfigure.setTitle(\" Iso-values of limit state function\")\nfigure" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Print the iso-values of the distribution\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "_ = otv.View(distribution.drawPDF())" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "sampleSize = 5000\ndrawEvent = otb.DrawEvent(event)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "cloud = drawEvent.drawSampleCrossCut(sampleSize)\n_ = otv.View(cloud)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Draw the limit state surface\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "bounds = ot.Interval(lowerBound, upperBound)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "graph = drawEvent.drawLimitStateCrossCut(bounds)\ngraph.add(cloud)\ngraph" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "domain = drawEvent.fillEventCrossCut(bounds)\n_ = otv.View(domain)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "domain.add(cloud)\n_ = otv.View(domain)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "otv.View.ShowAll()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.20" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/otbenchmark/master/_downloads/09a8c2ecba196a7145cf5887e3bfbf39/plot_dirichlet_sensitivity.zip b/otbenchmark/master/_downloads/09a8c2ecba196a7145cf5887e3bfbf39/plot_dirichlet_sensitivity.zip index d97adc5b3e9..9872e7562f4 100644 Binary files a/otbenchmark/master/_downloads/09a8c2ecba196a7145cf5887e3bfbf39/plot_dirichlet_sensitivity.zip and b/otbenchmark/master/_downloads/09a8c2ecba196a7145cf5887e3bfbf39/plot_dirichlet_sensitivity.zip differ diff --git a/otbenchmark/master/_downloads/0b4d0577810c77038fc3a798767a76ea/plot_flood_sensitivity.zip b/otbenchmark/master/_downloads/0b4d0577810c77038fc3a798767a76ea/plot_flood_sensitivity.zip index d62292de176..49214737137 100644 Binary files a/otbenchmark/master/_downloads/0b4d0577810c77038fc3a798767a76ea/plot_flood_sensitivity.zip and b/otbenchmark/master/_downloads/0b4d0577810c77038fc3a798767a76ea/plot_flood_sensitivity.zip differ diff --git a/otbenchmark/master/_downloads/0d5ee64d5c0f831d71d6981eaa6c956d/plot_rp28.ipynb b/otbenchmark/master/_downloads/0d5ee64d5c0f831d71d6981eaa6c956d/plot_rp28.ipynb new file mode 100644 index 00000000000..eb5d644be6b --- /dev/null +++ b/otbenchmark/master/_downloads/0d5ee64d5c0f831d71d6981eaa6c956d/plot_rp28.ipynb @@ -0,0 +1,261 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# RP28 analysis and 2D graphics\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The objective of this example is to present problem 28 of the BBRC.\nWe also present graphic elements for the visualization of the limit state surface in 2 dimensions.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import openturns as ot\nimport openturns.viewer as otv\nimport otbenchmark as otb" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "problem = otb.ReliabilityProblem28()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "print(problem)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "event = problem.getEvent()\ng = event.getFunction()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "problem.getProbability()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Create the Monte-Carlo algorithm\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "algoProb = ot.ProbabilitySimulationAlgorithm(event)\nalgoProb.setMaximumOuterSampling(10000)\nalgoProb.setBlockSize(128)\nalgoProb.setMaximumCoefficientOfVariation(0.01)\nalgoProb.run()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Get the results\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "resultAlgo = algoProb.getResult()\nneval = g.getEvaluationCallsNumber()\nprint(\"Number of function calls = %d\" % (neval))\npf = resultAlgo.getProbabilityEstimate()\nprint(\"Failure Probability = %.4f (* 1.e-7)\" % (pf * 1.0e7))\nlevel = 0.95\nc95 = resultAlgo.getConfidenceLength(level)\npmin = pf - 0.5 * c95\npmax = pf + 0.5 * c95\nprint(\n \"%.1f %% confidence interval :[%.4f,%.4f] * 1.e-7 \"\n % (level * 100, pmin * 1.0e7, pmax * 1.0e7)\n)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Compute the bounds of the domain\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "inputVector = event.getAntecedent()\ndistribution = inputVector.getDistribution()\nX1 = distribution.getMarginal(0)\nX2 = distribution.getMarginal(1)\nalphaMin = 1.0e-8\nalphaMax = 1.0 - alphaMin\nlowerBound = ot.Point(\n [X1.computeQuantile(alphaMin)[0], X2.computeQuantile(alphaMin)[0]]\n)\nupperBound = ot.Point(\n [X1.computeQuantile(alphaMax)[0], X2.computeQuantile(alphaMax)[0]]\n)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "nbPoints = [100, 100]\nfigure = g.draw(lowerBound, upperBound, nbPoints)\nfigure.setTitle(\" Iso-values of limit state function\")\nfigure" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Print the iso-values of the distribution\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "_ = otv.View(distribution.drawPDF())" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "sampleSize = 100000\ndrawEvent = otb.DrawEvent(event)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "cloud = drawEvent.drawSampleCrossCut(sampleSize)\n_ = otv.View(cloud)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Draw the limit state surface\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "bounds = ot.Interval(lowerBound, upperBound)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "graph = drawEvent.drawLimitStateCrossCut(bounds)\ngraph.add(cloud)\ngraph" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "domain = drawEvent.fillEventCrossCut(bounds)\n_ = otv.View(domain)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "domain.add(cloud)\n_ = otv.View(domain)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "otv.View.ShowAll()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.20" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/otbenchmark/master/_downloads/0ee134db52089df8699dbb596527cd27/plot_crosscut_distribution_2d.zip b/otbenchmark/master/_downloads/0ee134db52089df8699dbb596527cd27/plot_crosscut_distribution_2d.zip index d7ee759b655..e3670eb5657 100644 Binary files a/otbenchmark/master/_downloads/0ee134db52089df8699dbb596527cd27/plot_crosscut_distribution_2d.zip and b/otbenchmark/master/_downloads/0ee134db52089df8699dbb596527cd27/plot_crosscut_distribution_2d.zip differ diff --git a/otbenchmark/master/_downloads/0f0a946634f709cea753e20f8a7f0540/plot_reliability_benchmark_table.py b/otbenchmark/master/_downloads/0f0a946634f709cea753e20f8a7f0540/plot_reliability_benchmark_table.py new file mode 100644 index 00000000000..b0659f565cb --- /dev/null +++ b/otbenchmark/master/_downloads/0f0a946634f709cea753e20f8a7f0540/plot_reliability_benchmark_table.py @@ -0,0 +1,246 @@ +""" +Benchmark the reliability solvers on the problems +================================================= +""" + +# %% +# In this example, we show how to run all the methods on all the problems and get the computed probability. + +# %% +import openturns as ot +import numpy as np +import otbenchmark as otb +import pandas as pd +from tqdm import tqdm + +# %% +ot.Log.Show(ot.Log.NONE) + +# %% +# We import the list of reliability problems. +benchmarkProblemList = otb.ReliabilityBenchmarkProblemList() +numberOfProblems = len(benchmarkProblemList) +numberOfProblems + +# %% +# For each problem in the benchmark, print the problem name and the exact failure probability. +for i in range(numberOfProblems): + problem = benchmarkProblemList[i] + name = problem.getName() + pf = problem.getProbability() + print("#", i, " : ", name, ", exact PF : ", pf) + +# %% +# Run several algorithms on a single problem +# ------------------------------------------ + +# %% +# We want to run several algorithms on a single problem. +# We set the parameters of the algorithms and run them on a single problem. +maximumEvaluationNumber = 1000 +maximumAbsoluteError = 1.0e-3 +maximumRelativeError = 1.0e-3 +maximumResidualError = 1.0e-3 +maximumConstraintError = 1.0e-3 +nearestPointAlgorithm = ot.AbdoRackwitz() +nearestPointAlgorithm.setMaximumCallsNumber(maximumEvaluationNumber) +nearestPointAlgorithm.setMaximumAbsoluteError(maximumAbsoluteError) +nearestPointAlgorithm.setMaximumRelativeError(maximumRelativeError) +nearestPointAlgorithm.setMaximumResidualError(maximumResidualError) +nearestPointAlgorithm.setMaximumConstraintError(maximumConstraintError) + + +# %% +i = 3 +problem = benchmarkProblemList[i] +metaAlgorithm = otb.ReliabilityBenchmarkMetaAlgorithm(problem) + +# %% +# We try the FORM algorithm. +benchmarkFORM = metaAlgorithm.runFORM(nearestPointAlgorithm) +s1 = benchmarkFORM.summary() +print(s1) + +# %% +# Then the SORM algorithm. +benchmarkSORM = metaAlgorithm.runSORM(nearestPointAlgorithm) +s2 = benchmarkSORM.summary() +print(s2) + +# %% +benchmarkMC = metaAlgorithm.runMonteCarlo( + maximumOuterSampling=1000000, coefficientOfVariation=0.1, blockSize=1, +) +s3 = benchmarkMC.summary() +print(s3) + +# %% +benchmarkFORMIS = metaAlgorithm.runFORMImportanceSampling( + nearestPointAlgorithm, + maximumOuterSampling=1000, + coefficientOfVariation=0.1, + blockSize=1, +) +s4 = benchmarkFORMIS.summary() +print(s4) + +# %% +benchmarkSS = metaAlgorithm.runSubsetSampling( + maximumOuterSampling=5000, coefficientOfVariation=0.1, blockSize=1, +) +s5 = benchmarkSS.summary() +print(s5) + +# %% +# Run all algorithms on all problems and produce a single result table +# -------------------------------------------------------------------- +# +# For several algorithms and all the reliability problems, we want to estimate the failure probability and compare them. + +# %% +# We create a list of problem names. +problem_names = [] +for i in range(numberOfProblems): + problem = benchmarkProblemList[i] + name = problem.getName() + problem_names.append(name) + + +# %% +metrics = [ + "Exact", + "FORM", + "SORM", + "Monte Carlo", + "FORM-IS", + "Subset", +] +results = np.zeros((numberOfProblems, len(metrics))) +maximumOuterSampling = 10 ** 2 +blockSize = 10 ** 2 +coefficientOfVariation = 0.0 + +for i in tqdm(range(numberOfProblems)): + problem = benchmarkProblemList[i] + results[i][0] = problem.getProbability() + metaAlgorithm = otb.ReliabilityBenchmarkMetaAlgorithm(problem) + benchmarkResult = metaAlgorithm.runFORM(nearestPointAlgorithm) + results[i][1] = benchmarkResult.computedProbability + benchmarkResult = metaAlgorithm.runSORM(nearestPointAlgorithm) + results[i][2] = benchmarkResult.computedProbability + benchmarkResult = metaAlgorithm.runMonteCarlo( + maximumOuterSampling=maximumOuterSampling, + coefficientOfVariation=coefficientOfVariation, + blockSize=blockSize, + ) + results[i][3] = benchmarkResult.computedProbability + benchmarkResult = metaAlgorithm.runFORMImportanceSampling( + nearestPointAlgorithm, + maximumOuterSampling=maximumOuterSampling, + coefficientOfVariation=coefficientOfVariation, + blockSize=blockSize, + ) + results[i][4] = benchmarkResult.computedProbability + benchmarkResult = metaAlgorithm.runSubsetSampling( + maximumOuterSampling=maximumOuterSampling, + coefficientOfVariation=coefficientOfVariation, + blockSize=blockSize, + ) + results[i][5] = benchmarkResult.computedProbability + +df = pd.DataFrame(results, index=problem_names, columns=metrics) +df.to_csv("reliability_benchmark_table-output.csv") +df + +# %% +# Run several algorithms on all problems and get detailed statistics +# ------------------------------------------------------------------ +# +# Run several algorithms on all reliability benchmark problems: print statistics on each problem. + +# %% + + +def FormatRow(benchmarkResult): + """Format a single row of the benchmark table""" + result = [ + benchmarkResult.exactProbability, + benchmarkResult.computedProbability, + benchmarkResult.absoluteError, + benchmarkResult.numberOfCorrectDigits, + benchmarkResult.numberOfFunctionEvaluations, + benchmarkResult.numberOfDigitsPerEvaluation, + ] + return result + + +# %% +method_names = ["Monte-Carlo", "FORM", "SORM", "FORM-IS", "SUBSET"] + +maximumOuterSampling = 10 ** 2 +blockSize = 10 ** 2 +coefficientOfVariation = 0.0 + +result = dict() +for i in range(numberOfProblems): + problem = benchmarkProblemList[i] + name = problem_names[i] + exact_pf_name = "%10s" % ("Exact PF " + name[0:10]) + metrics = [ + exact_pf_name, + "Estimated PF", + "Absolute Error", + "Correct Digits", + "Function Calls", + "Digits / Evaluation", + ] + results = np.zeros((len(method_names), len(metrics))) + metaAlgorithm = otb.ReliabilityBenchmarkMetaAlgorithm(problem) + # Monte-Carlo + benchmarkResult = metaAlgorithm.runMonteCarlo( + maximumOuterSampling=maximumOuterSampling, + coefficientOfVariation=coefficientOfVariation, + blockSize=blockSize, + ) + results[0, :] = FormatRow(benchmarkResult) + # FORM + benchmarkResult = metaAlgorithm.runFORM(nearestPointAlgorithm) + results[1, :] = FormatRow(benchmarkResult) + # SORM + benchmarkResult = metaAlgorithm.runSORM(nearestPointAlgorithm) + results[2, :] = FormatRow(benchmarkResult) + # FORM-IS + benchmarkResult = metaAlgorithm.runFORMImportanceSampling( + nearestPointAlgorithm, + maximumOuterSampling=maximumOuterSampling, + coefficientOfVariation=coefficientOfVariation, + blockSize=blockSize, + ) + results[3, :] = FormatRow(benchmarkResult) + # Subset + benchmarkResult = metaAlgorithm.runSubsetSampling( + maximumOuterSampling=maximumOuterSampling, + coefficientOfVariation=coefficientOfVariation, + blockSize=blockSize, + ) + results[4, :] = FormatRow(benchmarkResult) + # Gather statistics and print them + df = pd.DataFrame(results, index=method_names, columns=metrics,) + # Format the columns for readability + s = df.style.format( + { + exact_pf_name: lambda x: "{:.3e}".format(x), + "Estimated PF": lambda x: "{:.3e}".format(x), + "Absolute Error": lambda x: "{:.3e}".format(x), + "Correct Digits": lambda x: "{:.1f}".format(x), + "Function Calls": lambda x: "{:d}".format(int(x)), + "Digits / Evaluation": lambda x: "{:.1f}".format(x), + } + ) + result[name] = s + +# %% +result["RP33"] + +# %% +result["RP35"] diff --git a/otbenchmark/master/_downloads/14a1d6597b0093114c7f5fe62404859d/plot_case_rs.zip b/otbenchmark/master/_downloads/14a1d6597b0093114c7f5fe62404859d/plot_case_rs.zip new file mode 100644 index 00000000000..0bb919d214e Binary files /dev/null and b/otbenchmark/master/_downloads/14a1d6597b0093114c7f5fe62404859d/plot_case_rs.zip differ diff --git a/otbenchmark/master/_downloads/177f69a01b2091371b1393b3784ee85e/plot_convergence_reliability_mc.zip b/otbenchmark/master/_downloads/177f69a01b2091371b1393b3784ee85e/plot_convergence_reliability_mc.zip index 71700da848a..8a5d55eaecf 100644 Binary files a/otbenchmark/master/_downloads/177f69a01b2091371b1393b3784ee85e/plot_convergence_reliability_mc.zip and b/otbenchmark/master/_downloads/177f69a01b2091371b1393b3784ee85e/plot_convergence_reliability_mc.zip differ diff --git a/otbenchmark/master/_downloads/1e8c14dcab49e0991ed329fca8991db3/plot_rp57.zip b/otbenchmark/master/_downloads/1e8c14dcab49e0991ed329fca8991db3/plot_rp57.zip new file mode 100644 index 00000000000..3549d069681 Binary files /dev/null and b/otbenchmark/master/_downloads/1e8c14dcab49e0991ed329fca8991db3/plot_rp57.zip differ diff --git a/otbenchmark/master/_downloads/23220fd0e4f67e58999879308536164b/plot_rp35.zip b/otbenchmark/master/_downloads/23220fd0e4f67e58999879308536164b/plot_rp35.zip new file mode 100644 index 00000000000..a23e5f40cd6 Binary files /dev/null and b/otbenchmark/master/_downloads/23220fd0e4f67e58999879308536164b/plot_rp35.zip differ diff --git a/otbenchmark/master/_downloads/250105ef85fd416452f7706e0be46b34/plot_rp75.py b/otbenchmark/master/_downloads/250105ef85fd416452f7706e0be46b34/plot_rp75.py new file mode 100644 index 00000000000..4c4a2e955e0 --- /dev/null +++ b/otbenchmark/master/_downloads/250105ef85fd416452f7706e0be46b34/plot_rp75.py @@ -0,0 +1,177 @@ +""" +RP75 analysis and 2D graphics +============================= +""" + +# %% +# The objective of this example is to present problem 75 of the BBRC. +# We also present graphic elements for the visualization of the limit state surface in 2 dimensions. +# +# This problem has two dimension and a reference probability approximately equal to $10^{-2}$. +# Hence, the problem should be relatively easy to solve. +# The failure domain is made of two separate sub-domains, leading to two different design points. +# Hence, the FORM approximation cannot be accurate, because it systematically ignores one of them, +# no matter what point is found by the optimization algorithm. + +# %% +import openturns as ot +import openturns.viewer as otv +import otbenchmark as otb + +# %% +problem = otb.ReliabilityProblem75() +print(problem) + +# %% +event = problem.getEvent() +g = event.getFunction() + +# %% +problem.getProbability() + +# %% +# Create the Monte-Carlo algorithm +algoProb = ot.ProbabilitySimulationAlgorithm(event) +algoProb.setMaximumOuterSampling(1000) +algoProb.setMaximumCoefficientOfVariation(0.01) +algoProb.run() + +# %% +# Get the results +resultAlgo = algoProb.getResult() +neval = g.getEvaluationCallsNumber() +print("Number of function calls = %d" % (neval)) +pf = resultAlgo.getProbabilityEstimate() +print("Failure Probability = %.4f" % (pf)) +level = 0.95 +c95 = resultAlgo.getConfidenceLength(level) +pmin = pf - 0.5 * c95 +pmax = pf + 0.5 * c95 +print("%.1f %% confidence interval :[%.4f,%.4f] " % (level * 100, pmin, pmax)) + +# %% +# Compute the bounds of the domain +# -------------------------------- + +# %% +inputVector = event.getAntecedent() +distribution = inputVector.getDistribution() +X1 = distribution.getMarginal(0) +X2 = distribution.getMarginal(1) +alphaMin = 0.00001 +alphaMax = 1 - alphaMin +lowerBound = ot.Point( + [X1.computeQuantile(alphaMin)[0], X2.computeQuantile(alphaMin)[0]] +) +upperBound = ot.Point( + [X1.computeQuantile(alphaMax)[0], X2.computeQuantile(alphaMax)[0]] +) + +# %% +nbPoints = [100, 100] +figure = g.draw(lowerBound, upperBound, nbPoints) +figure.setTitle(" Iso-values of limit state function") +figure + +# %% +# Print the iso-values of the distribution +# ---------------------------------------- + +# %% +_ = otv.View(distribution.drawPDF()) + +# %% +sampleSize = 5000 +drawEvent = otb.DrawEvent(event) + +# %% +cloud = drawEvent.drawSampleCrossCut(sampleSize) +_ = otv.View(cloud) + +# %% +# Draw the limit state surface +# ---------------------------- + +# %% +bounds = ot.Interval(lowerBound, upperBound) +bounds + +# %% +graph = drawEvent.drawLimitStateCrossCut(bounds) +graph.add(cloud) +graph + +# %% +domain = drawEvent.fillEventCrossCut(bounds) +_ = otv.View(domain) + +# %% +domain.add(cloud) +_ = otv.View(domain) + +# %% +# Test with FORM method +# --------------------- + +# %% +# We create a NearestPoint algorithm +nearestPointAlgorithm = ot.Cobyla() +# Resolution options: +eps = 1e-3 +nearestPointAlgorithm.setMaximumCallsNumber(1000) +nearestPointAlgorithm.setMaximumAbsoluteError(eps) +nearestPointAlgorithm.setMaximumRelativeError(eps) +nearestPointAlgorithm.setMaximumResidualError(eps) +nearestPointAlgorithm.setMaximumConstraintError(eps) + +# %% +initialNumberOfCall = g.getEvaluationCallsNumber() +mean = distribution.getMean() +algoFORM = ot.FORM(nearestPointAlgorithm, event, mean) +algoFORM.run() +resultFORM = algoFORM.getResult() +numberOfFunctionEvaluationsFORM = g.getEvaluationCallsNumber() - initialNumberOfCall +probabilityFORM = resultFORM.getEventProbability() +print("Number of calls to the limit state =", numberOfFunctionEvaluationsFORM) +print("Pf =", probabilityFORM) + +# %% +# We create a NearestPoint algorithm +nearestPointAlgorithm = ot.AbdoRackwitz() +# Resolution options: +eps = 1e-3 +nearestPointAlgorithm.setMaximumCallsNumber(100) +nearestPointAlgorithm.setMaximumAbsoluteError(eps) +nearestPointAlgorithm.setMaximumRelativeError(eps) +nearestPointAlgorithm.setMaximumResidualError(eps) +nearestPointAlgorithm.setMaximumConstraintError(eps) + +# %% +# If the mean point is used as a starting point with the `AbdoRackwitz` class, then the algorithm fails with: +# ``` +# RuntimeError: InternalException : Error in Abdo Rackwitz algorithm: the gradient of the level function is zero ... +# ``` +# In order to fix this, we just use a different starting point. + +# %% +startingPoint = mean + [1.0e-3] * 2 + +# %% +initialNumberOfCall = g.getEvaluationCallsNumber() +mean = distribution.getMean() +algoFORM = ot.FORM(nearestPointAlgorithm, event, startingPoint) +algoFORM.run() +resultFORM = algoFORM.getResult() +numberOfFunctionEvaluationsFORM = g.getEvaluationCallsNumber() - initialNumberOfCall +probabilityFORM = resultFORM.getEventProbability() +print("Number of calls to the limit state =", numberOfFunctionEvaluationsFORM) +print("Pf =", probabilityFORM) + +# %% +mean + +# %% +g.gradient(mean) + +# %% +otv.View.ShowAll() diff --git a/otbenchmark/master/_downloads/25b0a3b7859426727b8a42df70ce7774/plot_rp22.zip b/otbenchmark/master/_downloads/25b0a3b7859426727b8a42df70ce7774/plot_rp22.zip new file mode 100644 index 00000000000..85394bc172d Binary files /dev/null and b/otbenchmark/master/_downloads/25b0a3b7859426727b8a42df70ce7774/plot_rp22.zip differ diff --git a/otbenchmark/master/_downloads/25e8c1857957286ba5590935942ebdbc/plot_rp53.zip b/otbenchmark/master/_downloads/25e8c1857957286ba5590935942ebdbc/plot_rp53.zip new file mode 100644 index 00000000000..8e454eacb3e Binary files /dev/null and b/otbenchmark/master/_downloads/25e8c1857957286ba5590935942ebdbc/plot_rp53.zip differ diff --git a/otbenchmark/master/_downloads/2a85d53963c2214f447db3057a5e8047/plot_rp110.ipynb b/otbenchmark/master/_downloads/2a85d53963c2214f447db3057a5e8047/plot_rp110.ipynb new file mode 100644 index 00000000000..3b46e609235 --- /dev/null +++ b/otbenchmark/master/_downloads/2a85d53963c2214f447db3057a5e8047/plot_rp110.ipynb @@ -0,0 +1,250 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# RP110 analysis and 2D graphics\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The objective of this example is to present problem 110 of the BBRC.\nWe also present graphic elements for the visualization of the limit state surface in 2 dimensions.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import openturns as ot\nimport openturns.viewer as otv\nimport otbenchmark as otb" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "problem = otb.ReliabilityProblem110()\nprint(problem)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "event = problem.getEvent()\ng = event.getFunction()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "problem.getProbability()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Create the Monte-Carlo algorithm\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "algoProb = ot.ProbabilitySimulationAlgorithm(event)\nalgoProb.setMaximumOuterSampling(1000)\nalgoProb.setMaximumCoefficientOfVariation(0.01)\nalgoProb.run()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Get the results\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "resultAlgo = algoProb.getResult()\nneval = g.getEvaluationCallsNumber()\nprint(\"Number of function calls = %d\" % (neval))\npf = resultAlgo.getProbabilityEstimate()\nprint(\"Failure Probability = %.4f\" % (pf))\nlevel = 0.95\nc95 = resultAlgo.getConfidenceLength(level)\npmin = pf - 0.5 * c95\npmax = pf + 0.5 * c95\nprint(\"%.1f %% confidence interval :[%.4f,%.4f] \" % (level * 100, pmin, pmax))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Compute the bounds of the domain\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "inputVector = event.getAntecedent()\ndistribution = inputVector.getDistribution()\nX1 = distribution.getMarginal(0)\nX2 = distribution.getMarginal(1)\nalphaMin = 0.0000001\nalphaMax = 1 - alphaMin\nlowerBound = ot.Point(\n [X1.computeQuantile(alphaMin)[0], X2.computeQuantile(alphaMin)[0]]\n)\nupperBound = ot.Point(\n [X1.computeQuantile(alphaMax)[0], X2.computeQuantile(alphaMax)[0]]\n)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "nbPoints = [100, 100]\nfigure = g.draw(lowerBound, upperBound, nbPoints)\nfigure.setTitle(\" Iso-values of limit state function\")\nfigure" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Print the iso-values of the distribution\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "_ = otv.View(distribution.drawPDF())" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "sampleSize = 10000\ndrawEvent = otb.DrawEvent(event)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "cloud = drawEvent.drawSampleCrossCut(sampleSize)\n_ = otv.View(cloud)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Draw the limit state surface\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "bounds = ot.Interval(lowerBound, upperBound)\nbounds" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "graph = drawEvent.drawLimitStateCrossCut(bounds)\ngraph.add(cloud)\ngraph" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "domain = drawEvent.fillEventCrossCut(bounds)\n_ = otv.View(domain)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "domain.add(cloud)\n_ = otv.View(domain)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "otv.View.ShowAll()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.20" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/otbenchmark/master/_downloads/2ac0b6da649c5a5611308c5bf7215304/plot_sensitivity_distribution_ishigami.py b/otbenchmark/master/_downloads/2ac0b6da649c5a5611308c5bf7215304/plot_sensitivity_distribution_ishigami.py new file mode 100644 index 00000000000..4961e041906 --- /dev/null +++ b/otbenchmark/master/_downloads/2ac0b6da649c5a5611308c5bf7215304/plot_sensitivity_distribution_ishigami.py @@ -0,0 +1,125 @@ +""" +Distribution of the Sobol' indices on Ishigami function +======================================================= +""" + +# %% +# In this document, we consider the Ishigami function and check the distribution of the sensitivity indices. +# We check that it is consistent with the actual distribution of the estimator. +# +# The problem is that the exact distribution of the estimator is unknown in general. +# The asymptotic distribution is known, but this may not reflect the true distribution +# when the sample size is not large enough. +# In order to get a reference distribution of the estimator, we generate a Monte-Carlo sample of the Sobol' indices, +# but repeating the estimation of the Sobol' indices on indepedent sub-samples. +# Then we use kernel smoothing to approximate the actual distribution of the Sobol' indices. + +# %% +import openturns as ot +import otbenchmark as otb +import openturns.viewer as otv +import pylab as pl + +# %% +# When we estimate Sobol' indices, we may encounter the following warning messages: +# ``` +# WRN - The estimated first order Sobol index (2) is greater than its total order index ... +# WRN - The estimated total order Sobol index (2) is lesser than first order index ... +# ``` +# Lots of these messages are printed in the current Notebook. This is why we disable them with: +ot.Log.Show(ot.Log.NONE) + +# %% +problem = otb.IshigamiSensitivity() +print(problem) + +# %% +# In the following loop, we compare the distribution of the sensitivity indices computed and the actual distribution +# of the estimator computed by Monte-Carlo sampling (using kernel smoothing). +# The distribution of the sensitivity indices can be computed either from bootstrap +# (using kernel smoothing to approximate the distribution) +# or from asymptotic analysis (using a Gaussian distribution). +# +# In both cases, the distribution is estimated using one sample only. +# On the contrary, the actual distribution of the estimator (i.e. the reference distribution) is computed +# by generating independent realizations of the estimator. +# Hence, it is expected that the distribution computed is not centered on the true value of the sensitivity indices. +# Instead, the distribution based on the sample of estimators must be centered on the true value of the index, +# since these estimators are consistent, converge to the true value when the sample size increase +# and have no observable bias (although this is not proven by theory). +# +# The two essential parameters in the script are the following: +# +# - `sampleSize` is the size of the sample used to estimated on set of sensitivity +# indices (the number of sensitivity indices is equal to twice, because of first and total order Sobol' indices, +# the product of the number of input variables), +# - `numberOfRepetitions` is the size of the Monte-Carlo sample of sensitivity indices. +# +# We do not necessarily want to use a large value of `sampleSize`. +# This may be required, however, if we want to check the asymptotic distribution computed, +# because the asymptotic regime may not be reached for small values and the code cannot be blamed for that. +# This is why the asymptotic option may fail if `sampleSize` is not large enough. +# The bootstrap option may fail too, because the sample size may be so small that re-sampling +# in the basic sample may not provide enough variability. +# +# The value of `numberOfRepetitions` must be as large as possible because it ensures that +# the reference distribution used for this verification is accurate enough. + +# %% +numberOfRepetitions = 100 # Larger is better +problem = otb.IshigamiSensitivity() +metaSAAlgorithm = otb.SensitivityBenchmarkMetaAlgorithm(problem) +for sampleSize in [100, 200, 400, 800]: + print("sampleSize=", sampleSize) + for useAsymptotic in [False, True]: + if useAsymptotic: + label = "Asymptotic" + else: + label = "Bootstrap" + print(label) + ot.ResourceMap.SetAsBool( + "SobolIndicesAlgorithm-DefaultUseAsymptoticDistribution", useAsymptotic + ) + for estimator in ["Saltelli", "Martinez", "Jansen", "MauntzKucherenko"]: + print("Estimator:", estimator) + benchmark = otb.SensitivityDistribution( + problem, + metaSAAlgorithm, + sampleSize, + numberOfRepetitions=numberOfRepetitions, + estimator=estimator, + ) + grid = benchmark.draw() + view = otv.View(grid) + figure = view.getFigure() + _ = figure.suptitle( + "n = %d, %s, %s. %s." + % (sampleSize, problem.getName(), estimator, label) + ) + _ = figure.set_figwidth(8.0) + _ = figure.set_figheight(6.0) + _ = figure.subplots_adjust(wspace=0.4, hspace=0.4) + # Customize legends + ax = figure.get_axes() + for i in range(len(ax) - 1): + _ = ax[i].legend("") + _ = ax[-1].legend(bbox_to_anchor=(1.0, 1.0)) + _ = pl.show() + +# %% +# The plot compare two distributions. +# +# - The "Computed" distribution is the one computed by OpenTURNS. +# - The "Sample" distribution is the one generated by Monte-Carlo sampling. +# +# The fact that the "Computed" distribution is not centered on the true value is an +# expected property of the way the distribution is computed. +# What must be checked, instead, is the the variance of the distribution. +# More precisely, we check that the asymptotic covariance is correctly computed by the library. +# In other words, we focus on the spread of the distribution and check that it is consistent with the actual spread. +# This comparison is, however, restricted by the fact that the re-sampling size has a limited size +# equal to the `numberOfRepetitions` parameter. Increasing this parameter allows the check to be more accurate, +# but increases the simulation elapsed time. +# +# We see that these distributions are never far away from each other. +# This proves that the computation of the distribution is correct, for both the asymptotic and bootstrap options. diff --git a/otbenchmark/master/_downloads/31c3dc71daca0ff913405757a374df54/plot_rp111.zip b/otbenchmark/master/_downloads/31c3dc71daca0ff913405757a374df54/plot_rp111.zip new file mode 100644 index 00000000000..4b8beeabd84 Binary files /dev/null and b/otbenchmark/master/_downloads/31c3dc71daca0ff913405757a374df54/plot_rp111.zip differ diff --git a/otbenchmark/master/_downloads/32aa5c9dcce0dccc2e928a569709118d/plot_reliability_benchmark.zip b/otbenchmark/master/_downloads/32aa5c9dcce0dccc2e928a569709118d/plot_reliability_benchmark.zip new file mode 100644 index 00000000000..fe12fffd3dd Binary files /dev/null and b/otbenchmark/master/_downloads/32aa5c9dcce0dccc2e928a569709118d/plot_reliability_benchmark.zip differ diff --git a/otbenchmark/master/_downloads/33016ce92fb2acd4d1511228541ab561/plot_print_reliability_benchmark.zip b/otbenchmark/master/_downloads/33016ce92fb2acd4d1511228541ab561/plot_print_reliability_benchmark.zip new file mode 100644 index 00000000000..a87c8c8859c Binary files /dev/null and b/otbenchmark/master/_downloads/33016ce92fb2acd4d1511228541ab561/plot_print_reliability_benchmark.zip differ diff --git a/otbenchmark/master/_downloads/368e3f7b5e43ae514b158dd43905a150/plot_reliability_benchmark.py b/otbenchmark/master/_downloads/368e3f7b5e43ae514b158dd43905a150/plot_reliability_benchmark.py new file mode 100644 index 00000000000..b488e0dc09f --- /dev/null +++ b/otbenchmark/master/_downloads/368e3f7b5e43ae514b158dd43905a150/plot_reliability_benchmark.py @@ -0,0 +1,204 @@ +""" +Benchmark on a given set of problems +==================================== +""" + +# %% +# In this example, we show how to make a loop over the problems in the benchmark. +# We also show how to run various reliability algorithms on a given problem so that +# we can score the methods using number of digits or performance. + +# %% +import openturns as ot +import numpy as np +import otbenchmark as otb + +# %% +# Browse the reliability problems +# ------------------------------- + +# %% +# We present the BBRC test cases using the otbenchmark module. +benchmarkProblemList = otb.ReliabilityBenchmarkProblemList() +numberOfProblems = len(benchmarkProblemList) +numberOfProblems + + +# %% +for i in range(numberOfProblems): + problem = benchmarkProblemList[i] + name = problem.getName() + pf = problem.getProbability() + event = problem.getEvent() + antecedent = event.getAntecedent() + distribution = antecedent.getDistribution() + dimension = distribution.getDimension() + print("#", i, ":", name, " : pf = ", pf, ", dimension=", dimension) + + +# %% +maximumEvaluationNumber = 1000 +maximumAbsoluteError = 1.0e-3 +maximumRelativeError = 1.0e-3 +maximumResidualError = 1.0e-3 +maximumConstraintError = 1.0e-3 +nearestPointAlgorithm = ot.AbdoRackwitz() +nearestPointAlgorithm.setMaximumCallsNumber(maximumEvaluationNumber) +nearestPointAlgorithm.setMaximumAbsoluteError(maximumAbsoluteError) +nearestPointAlgorithm.setMaximumRelativeError(maximumRelativeError) +nearestPointAlgorithm.setMaximumResidualError(maximumResidualError) +nearestPointAlgorithm.setMaximumConstraintError(maximumConstraintError) + +# %% +# The FORM method +# --------------- + +# %% +problem = otb.ReliabilityProblem8() + +# %% +metaAlgorithm = otb.ReliabilityBenchmarkMetaAlgorithm(problem) + +# %% +benchmarkResult = metaAlgorithm.runFORM(nearestPointAlgorithm) +benchmarkResult.summary() + +# %% +# The SORM method +# --------------- + +# %% +benchmarkResult = metaAlgorithm.runSORM(nearestPointAlgorithm) +benchmarkResult.summary() + +# %% +# The LHS method +# -------------- + +# %% +benchmarkResult = metaAlgorithm.runLHS(maximumOuterSampling=10000) +benchmarkResult.summary() + +# %% +# The MonteCarloSampling method +# ----------------------------- + +# %% +benchmarkResult = metaAlgorithm.runMonteCarlo(maximumOuterSampling=10000) +benchmarkResult.summary() + +# %% +# The FORM - Importance Sampling method +# ------------------------------------- + +# %% +benchmarkResult = metaAlgorithm.runFORMImportanceSampling(nearestPointAlgorithm) +benchmarkResult.summary() + +# %% +# The Subset method +# ----------------- + +# %% +benchmarkResult = metaAlgorithm.runSubsetSampling() +benchmarkResult.summary() + +# %% +# The following function computes the number of correct base-10 digits +# in the computed result compared to the exact result. +# The `CompareMethods` function takes as a parameter a problem +# and it returns the probabilities estimated by each method. +# In addition, it returns the performance of these methods. + +# %% + + +def PrintResults(name, benchmarkResult): + print("------------------------------------------------------------------") + print(name) + numberOfDigitsPerEvaluation = ( + benchmarkResult.numberOfCorrectDigits + / benchmarkResult.numberOfFunctionEvaluations + ) + print("Estimated probability:", benchmarkResult.computedProbability) + print("Number of function calls:", benchmarkResult.numberOfFunctionEvaluations) + print("Number of correct digits=%.1f" % (benchmarkResult.numberOfCorrectDigits)) + print( + "Performance=%.2e (correct digits/evaluation)" % (numberOfDigitsPerEvaluation) + ) + return [name, benchmarkResult.numberOfCorrectDigits, numberOfDigitsPerEvaluation] + + +# %% + + +def CompareMethods(problem, nearestPointAlgorithm, maximumOuterSampling=10000): + """ + Runs various algorithms on a given problem. + """ + summaryList = [] + pfReference = problem.getProbability() + print("Exact probability:", pfReference) + metaAlgorithm = otb.ReliabilityBenchmarkMetaAlgorithm(problem) + # SubsetSampling + benchmarkResult = metaAlgorithm.runSubsetSampling() + summaryList.append(PrintResults("SubsetSampling", benchmarkResult)) + # FORM + benchmarkResult = metaAlgorithm.runFORM(nearestPointAlgorithm) + summaryList.append(PrintResults("FORM", benchmarkResult)) + # SORM + benchmarkResult = metaAlgorithm.runSORM(nearestPointAlgorithm) + summaryList.append(PrintResults("SORM", benchmarkResult)) + # FORM - ImportanceSampling + benchmarkResult = metaAlgorithm.runFORMImportanceSampling( + nearestPointAlgorithm, maximumOuterSampling=maximumOuterSampling + ) + summaryList.append(PrintResults("FORM-IS", benchmarkResult)) + # MonteCarloSampling + benchmarkResult = metaAlgorithm.runMonteCarlo( + maximumOuterSampling=maximumOuterSampling + ) + summaryList.append(PrintResults("MonteCarloSampling", benchmarkResult)) + # LHS + benchmarkResult = metaAlgorithm.runLHS() + summaryList.append(PrintResults("LHS", benchmarkResult)) + # Gather results + numberOfMethods = len(summaryList) + correctDigitsList = [] + performanceList = [] + algorithmNames = [] + for i in range(numberOfMethods): + [name, numberOfCorrectDigits, numberOfDigitsPerEvaluation] = summaryList[i] + algorithmNames.append(name) + correctDigitsList.append(numberOfCorrectDigits) + performanceList.append(numberOfDigitsPerEvaluation) + print("------------------------------------------------------------------------") + print("Scoring by number of correct digits") + indices = np.argsort(correctDigitsList) + rank = list(indices) + for i in range(numberOfMethods): + j = rank[i] + print("%d : %s (%.1f)" % (j, algorithmNames[j], correctDigitsList[j])) + print("------------------------------------------------------------------------") + print("Scoring by performance (digits/evaluation)") + indices = np.argsort(performanceList) + rank = list(indices) + for i in range(len(indices)): + j = rank[i] + print("%d : %s (%.1e)" % (j, algorithmNames[j], performanceList[j])) + return correctDigitsList, performanceList + + +# %% +problem = otb.ReliabilityProblem8() +_ = CompareMethods(problem, nearestPointAlgorithm) + +# %% +# Remarks +# ------- +# +# * We note that the FORM and SORM methods are faster, but, they do not converge to the exact proba. +# * We also notice the effectiveness of the FORM-ImportanceSampling method (inexpensive method, and converges). +# * The convergence of the MonteCarlo method requires a large number of simulations. +# * SubsetSampling converges even if the probability is very low. +# diff --git a/otbenchmark/master/_downloads/3b623c442323676a530a2fd4725280c0/plot_rp25.ipynb b/otbenchmark/master/_downloads/3b623c442323676a530a2fd4725280c0/plot_rp25.ipynb new file mode 100644 index 00000000000..b4a831aecf0 --- /dev/null +++ b/otbenchmark/master/_downloads/3b623c442323676a530a2fd4725280c0/plot_rp25.ipynb @@ -0,0 +1,250 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# RP25 analysis and 2D graphics\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The objective of this example is to present problem 25 of the BBRC.\nWe also present graphic elements for the visualization of the limit state surface in 2 dimensions.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import openturns as ot\nimport openturns.viewer as otv\nimport otbenchmark as otb" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "problem = otb.ReliabilityProblem25()\nprint(problem)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "event = problem.getEvent()\ng = event.getFunction()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "problem.getProbability()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Create the Monte-Carlo algorithm\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "algoProb = ot.ProbabilitySimulationAlgorithm(event)\nalgoProb.setMaximumOuterSampling(100000)\nalgoProb.setMaximumCoefficientOfVariation(0.01)\nalgoProb.run()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Get the results\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "resultAlgo = algoProb.getResult()\nneval = g.getEvaluationCallsNumber()\nprint(\"Number of function calls = %d\" % (neval))\npf = resultAlgo.getProbabilityEstimate()\nprint(\"Failure Probability = %.4f\" % (pf))\nlevel = 0.95\nc95 = resultAlgo.getConfidenceLength(level)\npmin = pf - 0.5 * c95\npmax = pf + 0.5 * c95\nprint(\"%.1f %% confidence interval :[%.4f,%.4f] \" % (level * 100, pmin, pmax))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Compute the bounds of the domain\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "inputVector = event.getAntecedent()\ndistribution = inputVector.getDistribution()\nX1 = distribution.getMarginal(0)\nX2 = distribution.getMarginal(1)\nalphaMin = 0.00001\nalphaMax = 1 - alphaMin\nlowerBound = ot.Point(\n [X1.computeQuantile(alphaMin)[0], X2.computeQuantile(alphaMin)[0]]\n)\nupperBound = ot.Point(\n [X1.computeQuantile(alphaMax)[0], X2.computeQuantile(alphaMax)[0]]\n)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "nbPoints = [100, 100]\nfigure = g.draw(lowerBound, upperBound, nbPoints)\nfigure.setTitle(\" Iso-values of limit state function\")\nfigure" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Print the iso-values of the distribution\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "_ = otv.View(distribution.drawPDF())" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "sampleSize = 1000000\ndrawEvent = otb.DrawEvent(event)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "cloud = drawEvent.drawSampleCrossCut(sampleSize)\n_ = otv.View(cloud)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Draw the limit state surface\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "bounds = ot.Interval(lowerBound, upperBound)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "graph = drawEvent.drawLimitStateCrossCut(bounds)\ngraph.add(cloud)\ngraph" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "domain = drawEvent.fillEventCrossCut(bounds)\n_ = otv.View(domain)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "domain.add(cloud)\n_ = otv.View(domain)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "otv.View.ShowAll()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.20" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/otbenchmark/master/_downloads/3f2f5008640b2a9bf5fb56d17e3345fe/plot_gsobol_sensitivity.zip b/otbenchmark/master/_downloads/3f2f5008640b2a9bf5fb56d17e3345fe/plot_gsobol_sensitivity.zip index 797b484720b..40918027cd0 100644 Binary files a/otbenchmark/master/_downloads/3f2f5008640b2a9bf5fb56d17e3345fe/plot_gsobol_sensitivity.zip and b/otbenchmark/master/_downloads/3f2f5008640b2a9bf5fb56d17e3345fe/plot_gsobol_sensitivity.zip differ diff --git a/otbenchmark/master/_downloads/4040252c285bb6f1075da38d0970489f/plot_rp53.ipynb b/otbenchmark/master/_downloads/4040252c285bb6f1075da38d0970489f/plot_rp53.ipynb new file mode 100644 index 00000000000..2ac6d47b2e9 --- /dev/null +++ b/otbenchmark/master/_downloads/4040252c285bb6f1075da38d0970489f/plot_rp53.ipynb @@ -0,0 +1,232 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# RP53 analysis and 2D graphics\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The objective of this example is to present problem 53 of the BBRC.\nWe also present graphic elements for the visualization of the limit state surface in 2 dimensions.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import openturns as ot\nimport openturns.viewer as otv\nimport otbenchmark as otb" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "problem = otb.ReliabilityProblem53()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "event = problem.getEvent()\ng = event.getFunction()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "problem.getProbability()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Create the Monte-Carlo algorithm\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "algoProb = ot.ProbabilitySimulationAlgorithm(event)\nalgoProb.setMaximumOuterSampling(1000)\nalgoProb.setMaximumCoefficientOfVariation(0.01)\nalgoProb.run()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Get the results\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "resultAlgo = algoProb.getResult()\nneval = g.getEvaluationCallsNumber()\nprint(\"Number of function calls = %d\" % (neval))\npf = resultAlgo.getProbabilityEstimate()\nprint(\"Failure Probability = %.4f\" % (pf))\nlevel = 0.95\nc95 = resultAlgo.getConfidenceLength(level)\npmin = pf - 0.5 * c95\npmax = pf + 0.5 * c95\nprint(\"%.1f %% confidence interval :[%.4f,%.4f] \" % (level * 100, pmin, pmax))" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "inputVector = event.getAntecedent()\ndistribution = inputVector.getDistribution()\nX1 = distribution.getMarginal(0)\nX2 = distribution.getMarginal(0)\nalpha = 1 - 1.0e-4\nbounds, marginalProb = distribution.computeMinimumVolumeIntervalWithMarginalProbability(\n alpha\n)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "_ = otv.View(X1.drawPDF())" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Print the iso-values of the distribution\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "_ = otv.View(distribution.drawPDF())" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "sampleSize = 5000\ndrawEvent = otb.DrawEvent(event)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "cloud = drawEvent.drawSampleCrossCut(sampleSize)\n_ = otv.View(cloud)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Draw the limit state surface\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "graph = drawEvent.drawLimitStateCrossCut(bounds)\ngraph.add(cloud)\ngraph" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "domain = drawEvent.fillEventCrossCut(bounds)\n_ = otv.View(domain)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "domain.add(cloud)\n_ = otv.View(domain)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "otv.View.ShowAll()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.20" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/otbenchmark/master/_downloads/46d29d3c1661e8ef58b75d5dc2763b4e/plot_rp111.ipynb b/otbenchmark/master/_downloads/46d29d3c1661e8ef58b75d5dc2763b4e/plot_rp111.ipynb new file mode 100644 index 00000000000..3a514443620 --- /dev/null +++ b/otbenchmark/master/_downloads/46d29d3c1661e8ef58b75d5dc2763b4e/plot_rp111.ipynb @@ -0,0 +1,243 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# RP111 analysis and 2D graphics\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The objective of this example is to present problem 111 of the BBRC.\nWe also present graphic elements for the visualization of the limit state surface in 2 dimensions.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import openturns as ot\nimport openturns.viewer as otv\nimport otbenchmark as otb" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "problem = otb.ReliabilityProblem111()\nprint(problem)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "event = problem.getEvent()\ng = event.getFunction()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "problem.getProbability()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Create the Monte-Carlo algorithm\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "algoProb = ot.ProbabilitySimulationAlgorithm(event)\nalgoProb.setMaximumOuterSampling(1000)\nalgoProb.setMaximumCoefficientOfVariation(0.01)\nalgoProb.run()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Get the results\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "resultAlgo = algoProb.getResult()\nneval = g.getEvaluationCallsNumber()\nprint(\"Number of function calls = %d\" % (neval))\npf = resultAlgo.getProbabilityEstimate()\nprint(\"Failure Probability = %.4f\" % (pf))\nlevel = 0.95\nc95 = resultAlgo.getConfidenceLength(level)\npmin = pf - 0.5 * c95\npmax = pf + 0.5 * c95\nprint(\"%.1f %% confidence interval :[%.4f,%.4f] \" % (level * 100, pmin, pmax))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Compute the bounds of the domain\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "inputVector = event.getAntecedent()\ndistribution = inputVector.getDistribution()\nX1 = distribution.getMarginal(0)\nX2 = distribution.getMarginal(1)\nalphaMin = 0.00001\nalphaMax = 1 - alphaMin\nlowerBound = ot.Point(\n [X1.computeQuantile(alphaMin)[0], X2.computeQuantile(alphaMin)[0]]\n)\nupperBound = ot.Point(\n [X1.computeQuantile(alphaMax)[0], X2.computeQuantile(alphaMax)[0]]\n)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "nbPoints = [100, 100]\nfigure = g.draw(lowerBound, upperBound, nbPoints)\nfigure.setTitle(\" Iso-values of limit state function\")\nfigure" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "_ = otv.View(distribution.drawPDF())" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "sampleSize = 100000\ndrawEvent = otb.DrawEvent(event)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "cloud = drawEvent.drawSampleCrossCut(sampleSize)\n_ = otv.View(cloud)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Draw the limit state surface\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "bounds = ot.Interval(lowerBound, upperBound)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "graph = drawEvent.drawLimitStateCrossCut(bounds)\ngraph.add(cloud)\ngraph" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "domain = drawEvent.fillEventCrossCut(bounds)\n_ = otv.View(domain)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "domain.add(cloud)\n_ = otv.View(domain)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "otv.View.ShowAll()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.20" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/otbenchmark/master/_downloads/46d9182c78dc88736d1f543c37f689a4/plot_compute_reference_rp55_pf.py b/otbenchmark/master/_downloads/46d9182c78dc88736d1f543c37f689a4/plot_compute_reference_rp55_pf.py new file mode 100644 index 00000000000..450e65f77f3 --- /dev/null +++ b/otbenchmark/master/_downloads/46d9182c78dc88736d1f543c37f689a4/plot_compute_reference_rp55_pf.py @@ -0,0 +1,340 @@ +""" +Compute reference probability for RP55 +====================================== +""" + +# %% +# The goal of this example is to present how we computed the reference probability for problem 55 of the BBRC. +# This calculation is based on the geometry of the failure domain. +# In order to compute its surface, we use the `shapely` module, +# which allows to compute the surface of bidimensional polygons. + +# %% +import openturns as ot +import openturns.viewer as otv +import numpy as np +import otbenchmark as otb +from shapely.geometry import Polygon + +# %% +problem = otb.ReliabilityProblem55() + +# %% +event = problem.getEvent() +g = event.getFunction() + +# %% +problem.getProbability() + +# %% +# Compute the bounds of the domain +# -------------------------------- + +# %% +inputVector = event.getAntecedent() +distribution = inputVector.getDistribution() +X1 = distribution.getMarginal(0) +X2 = distribution.getMarginal(1) +alphaMin = 0.00001 +alphaMax = 1 - alphaMin +lowerBound = ot.Point( + [X1.computeQuantile(alphaMin)[0], X2.computeQuantile(alphaMin)[0]] +) +upperBound = ot.Point( + [X1.computeQuantile(alphaMax)[0], X2.computeQuantile(alphaMax)[0]] +) + +# %% +# Print the iso-values of the distribution +# ---------------------------------------- + +# %% +sampleSize = 5000 +sampleInput = inputVector.getSample(sampleSize) +sampleOutput = g(sampleInput) +drawEvent = otb.DrawEvent(event) + +# %% +cloud = drawEvent.drawSampleCrossCut(sampleSize) +_ = otv.View(cloud) + +# %% +# Draw the limit state surface +# ---------------------------- + +# %% +bounds = ot.Interval(lowerBound, upperBound) +bounds + +# %% +domain = drawEvent.fillEventCrossCut(bounds) +_ = otv.View(domain) + +# %% +# From integration +# ---------------- + +# %% +interval = ot.Interval([-1.0, -1.0], [1.0, 1.0]) +interval + +# %% +threshold = event.getThreshold() +threshold + +# %% +mean = distribution.getMean() +mean + + +# %% + + +def ComputeIntegrandPoint(x): + """Evaluate the integrand on one single point.""" + y = g(x) + if y[0] < threshold: + indicator = 1.0 + else: + indicator = 0.0 + pdf = distribution.computePDF(x) + z = [indicator * pdf] + return z + + +integrand = ot.PythonFunction(2, 1, ComputeIntegrandPoint) + + +# %% +integrand(mean) + + +# %% +dimension = distribution.getDimension() +totalNumberOfPoints = 10 ** 4 +numberOfPointsInX = int(totalNumberOfPoints ** (1.0 / dimension)) +numberOfPointsInX + + +# %% +algoGL = ot.GaussLegendre([numberOfPointsInX] * dimension) +value = algoGL.integrate(integrand, interval) +value + + +# %% + + +def ComputeIntegrandSample(sample): + """Evaluate the integrand on a sample.""" + indicatorBoolean = np.array(g(sample)) < threshold + indicator = np.array(indicatorBoolean, float) + pdf = np.array(distribution.computePDF(sample)) + z = indicator * pdf + return z + + +# %% +integrandSample = ot.PythonFunction(2, 1, func_sample=ComputeIntegrandSample) + + +# %% +sample = distribution.getSample(5) +integrandSample(sample) + +# %% +integrandSample(mean) + +# %% +dimension = distribution.getDimension() +totalNumberOfPoints = 10 ** 6 +numberOfPointsInX = int(totalNumberOfPoints ** (1.0 / dimension)) +numberOfPointsInX + +# %% +discretization = [numberOfPointsInX] * dimension +algoGL = ot.GaussLegendre(discretization) +value = algoGL.integrate(integrandSample, interval) +value + +# %% +# Exact computation +# ----------------- +# +# We solve the exact equation: +# +# https://www.wolframalpha.com/input/?i=solve+min%280.2+%2B+0.6+*+%28x+-+y%29%5E4+-+%28x+-+y%29+%2F+sqrt%282%29%2C+0.2+%2B+0.6+*+%28x+-+y%29%5E4+%2B+%28x+-+y%29+%2F+sqrt%282%29%2C+%28x+-+y%29+%2B+5+%2F+sqrt%282%29+-+2.2%2C+%28y+-+x%29+%2B+5+%2F+sqrt%282%29+-+2.2%29+%3D+0 +# +# ``` +# solve (x - y) + 5 / sqrt(2) - 22/10 = 0 +# solve 2/10 + 6/10 * d^4 - d / sqrt(2) +# ``` + +# %% +domain = drawEvent.fillEventCrossCut(bounds) +_ = otv.View(domain) + +# %% +# We first compute the exact equations defining the slanted lines at the limit state. +palette = [ + "dodgerblue3", + "darkorange1", + "forestgreen", + "firebrick3", + "mediumpurple3", + "lightsalmon4", + "orchid", + "gray50", + "goldenrod3", + "turquoise3", +] + +# %% +# The goal is to define the failure domain. +root1 = 5.0 / np.sqrt(2.0) - 2.2 +root1 + +# %% +root2 = 0.2887406174573670970 +root2 + +# %% +root3 = 0.9370483776955247344172976 +root3 + +# %% +root2 = 0.2887406174573670970 +f1full = ot.SymbolicFunction(["x", "root2"], ["x-root2"]) +f1 = ot.ParametricFunction(f1full, [1], [root2]) +graph1 = f1.draw(root2 - 1.0, 1.0, 100) +graph1.setColors([palette[0]]) +graph1.setLegends(["f1"]) + +# %% +f2full = ot.SymbolicFunction(["x", "root3"], ["x-root3"]) +f2 = ot.ParametricFunction(f2full, [1], [root3]) +graph2 = f2.draw(root3 - 1.0, 1.0, 100) +graph2.setColors([palette[1]]) +graph2.setLegends(["f2"]) + +# %% +f3full = ot.SymbolicFunction(["x", "root1"], ["x-root1"]) +f3 = ot.ParametricFunction(f3full, [1], [root1]) +graph3 = f3.draw(root1 - 1.0, 1.0, 100) +graph3.setColors([palette[2]]) +graph3.setLegends(["f3"]) + +# %% +f4full = ot.SymbolicFunction(["x", "root2"], ["x+root2"]) +f4 = ot.ParametricFunction(f4full, [1], [root2]) +graph4 = f4.draw(-1.0, 1.0 - root2, 100) +graph4.setColors([palette[3]]) +graph4.setLegends(["f4"]) + +# %% +f5full = ot.SymbolicFunction(["x", "root3"], ["x+root3"]) +f5 = ot.ParametricFunction(f5full, [1], [root3]) +graph5 = f5.draw(-1.0, 1.0 - root3, 100) +graph5.setColors([palette[4]]) +graph5.setLegends(["f5"]) + +# %% +f6full = ot.SymbolicFunction(["x", "root1"], ["x+root1"]) +f6 = ot.ParametricFunction(f6full, [1], [root1]) +graph6 = f6.draw(-1.0, 1.0 - root1, 100) +graph6.setColors([palette[5]]) +graph6.setLegends(["f6"]) + +# %% +domain.add(graph1) +domain.add(graph2) +domain.add(graph3) +domain.add(graph4) +domain.add(graph5) +domain.add(graph6) +_ = otv.View(domain) + +# %% +# Then we set the corners of the polygons in the failure domain. +data = [ + [-1.0, 1.0], + [1.0, f1([1.0])[0]], + [1.0, f2([1.0])[0]], + [1.0, f3([1.0])[0]], + [-1.0, f4([-1.0])[0]], + [-1.0, f5([-1.0])[0]], + [-1.0, f6([-1.0])[0]], + [root1 - 1.0, -1.0], + [root2 - 1.0, -1.0], + [root3 - 1.0, -1.0], + [1.0 - root1, 1.0], + [1.0 - root2, 1.0], + [1.0 - root3, 1.0], + [1.0, -1.0], +] +sample = ot.Sample(data) +sample + +# %% +cloud = ot.Cloud(sample) +domain.add(cloud) +extendedBounds = ot.Interval([-1.5, -1.5], [2.0, 2.0]) +domain.setBoundingBox(extendedBounds) +domain + +# %% +# In order to identify these points, we add the legends as text in the plot. + +# %% +texts = ["p" + str(i) for i in range(sample.getSize())] +texts + +# %% +text = ot.Text(sample, texts) + +# %% +domain.add(text) +domain + +# %% +# The probability is the ratio between the failure domain and the domain itself. +# The area of the domain is :math:`2^2`. +# The area of each polygon is computed based on the shapely module. +corners = np.array([sample[i] for i in [0, 6, 10]]) +corners + +# %% +polygon = Polygon(corners) +area1 = polygon.area +area1 + +# %% +corners = np.array([sample[i] for i in [4, 11, 12, 5]]) +corners +polygon = Polygon(corners) +area2 = polygon.area +area2 + +# %% +corners = np.array([sample[i] for i in [8, 9, 2, 1]]) +corners +polygon = Polygon(corners) +area3 = polygon.area +area3 + +# %% +corners = np.array([sample[i] for i in [7, 13, 3]]) +corners +polygon = Polygon(corners) +area4 = polygon.area +area4 + +# %% +pf = (area1 + area2 + area3 + area4) / 2.0 ** 2 +pf + +# %% +print("pf=%.17e" % (pf)) + +# %% +otv.View.ShowAll() diff --git a/otbenchmark/master/_downloads/4e8781bbbacd0177e6fd9ca95eec0d40/plot_reliability_compute_reference_proba.ipynb b/otbenchmark/master/_downloads/4e8781bbbacd0177e6fd9ca95eec0d40/plot_reliability_compute_reference_proba.ipynb new file mode 100644 index 00000000000..4015dac4a68 --- /dev/null +++ b/otbenchmark/master/_downloads/4e8781bbbacd0177e6fd9ca95eec0d40/plot_reliability_compute_reference_proba.ipynb @@ -0,0 +1,123 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Compute reference probabilities with Monte-Carlo\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "In this example, we perform a reliability benchmark based on a large Monte-Carlo sample.\nIn order to limit the elapsed time, we consider a limited elapsed time for each problem.\nIn order to get the best possible accuracy within this time limit, we set the coefficient of variation to zero.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import otbenchmark as otb\nimport pandas as pd\nimport numpy as np\nfrom tqdm import tqdm\nimport time" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "problemslist = otb.ReliabilityBenchmarkProblemList()\nnumberOfProblems = len(problemslist)\nnumberOfProblems" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "coefficientOfVariation = 0.0\nmaximumOuterSampling = 10 ** 4 # 10 ** 6 for real\nblockSize = 10 ** 0 # 10 ** 4 for real simulations\nblockSize" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "confidenceLevel = 0.95\nmaximumDurationSeconds = 5 * 60.0" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "totalDurationMinutes = numberOfProblems * maximumDurationSeconds / 60.0\ntotalDurationMinutes" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "model_names = [problemslist[i].getName() for i in range(numberOfProblems)]\nmetrics = [\"PF\", \"N. function calls\", \"PMin\", \"PMax\", \"C.O.V.\", \"Digits\", \"Time (s)\"]\nresultArray = np.zeros((numberOfProblems, len(metrics)))\nfor i in tqdm(range(numberOfProblems)):\n startTime = time.time()\n problem = problemslist[i]\n name = problem.getName()\n event = problem.getEvent()\n g = event.getFunction()\n factory = otb.ProbabilitySimulationAlgorithmFactory()\n algo = factory.buildMonteCarlo(problem)\n algo.setMaximumOuterSampling(maximumOuterSampling)\n algo.setBlockSize(blockSize)\n algo.setMaximumCoefficientOfVariation(coefficientOfVariation)\n algo.setMaximumTimeDuration(maximumDurationSeconds)\n initialNumberOfCall = g.getEvaluationCallsNumber()\n algo.run()\n result = algo.getResult()\n numberOfFunctionEvaluations = g.getEvaluationCallsNumber() - initialNumberOfCall\n computedProbability = result.getProbabilityEstimate()\n confidenceLength = result.getConfidenceLength(confidenceLevel)\n pmin = computedProbability - 0.5 * confidenceLength\n pmax = computedProbability + 0.5 * confidenceLength\n cov = result.getCoefficientOfVariation()\n if cov > 0.0:\n expectedDigits = -np.log10(cov) - 1.0\n else:\n expectedDigits = 0.0\n stopTime = time.time()\n elapsedTime = stopTime - startTime\n resultArray[i][0] = computedProbability\n resultArray[i][1] = numberOfFunctionEvaluations\n resultArray[i][2] = pmin\n resultArray[i][3] = pmax\n resultArray[i][4] = cov\n resultArray[i][5] = expectedDigits\n resultArray[i][6] = elapsedTime" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "df = pd.DataFrame(resultArray, index=model_names, columns=metrics)\n# df.to_csv(\"reliability_compute_reference_proba.csv\")\ndf" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The problems with higher failture probabilities are obviously solved with more accuracy with the Monte-Carlo method.\nFor example, the RP55 problem which has the highest probability equal to 0.560 has more than 3 significant digits.\nOn the opposite side, the problems with probabilities close to zero are much more difficult to solve.\nThe RP28 with a probability close to $10^{-7}$ has no significant digit.\n\nThese previous results are consistent with the distribution of the Monte-Carlo estimator.\nThe properties of the binomial distribution imply that its variance is:\n\n\\begin{align}\\sigma_{p_f}^2 = \\frac{p_f (1-p_f)}{n}\\end{align}\n\nwhere $n$ is the sample size and $p_f$ is the failure probability.\nThe coefficient of variation is:\n\n\\begin{align}CV = \\frac{\\sigma_{p_f}}{p_f}.\\end{align}\n\nSince we do not know the exact value of $p_f$, we use is approximation $\\tilde{p_f}$ instead\n(this turns rigorous equations into approximate ones, but does not change the outcome).\nThis implies:\n\n\\begin{align}CV = \\sqrt{\\frac{1 - p_f}{p_f n}}.\\end{align}\n\nWhen $p_f\\rightarrow 0$, we have $p_f \\rightarrow 0$ which implies:\n\n\\begin{align}CV \\rightarrow \\sqrt{\\frac{1}{p_f n}}.\\end{align}\n\nInverting the previous equation, we get the sample size given the coefficient of variation:\n\n\\begin{align}n \\approx \\frac{1}{p_f CV^2}.\\end{align}\n\nThis leads to the rule of thumb that, in order to estimate the probability $p_f = 10^{-m}$,\nwhere $m$ is an integer, we need a sample size equal to:\n\n\\begin{align}n \\approx \\frac{1}{10^{-m} 10^{-2}} = 10^{m+2}.\\end{align}\n\nFor example, estimating the probability of the RP28 problem with just one single digit leads to\na sample size equal to $n=10^9$, since the exact $p_f \\approx 10^{-7}$.\n\n" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.20" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/otbenchmark/master/_downloads/50c19c64eff7c8d6dfb7fc004da159c0/plot_rp110.py b/otbenchmark/master/_downloads/50c19c64eff7c8d6dfb7fc004da159c0/plot_rp110.py new file mode 100644 index 00000000000..8693e03822c --- /dev/null +++ b/otbenchmark/master/_downloads/50c19c64eff7c8d6dfb7fc004da159c0/plot_rp110.py @@ -0,0 +1,109 @@ +""" +RP110 analysis and 2D graphics +============================== +""" + +# %% +# The objective of this example is to present problem 110 of the BBRC. +# We also present graphic elements for the visualization of the limit state surface in 2 dimensions. + +# %% +import openturns as ot +import openturns.viewer as otv +import otbenchmark as otb + +# %% +problem = otb.ReliabilityProblem110() +print(problem) + +# %% +event = problem.getEvent() +g = event.getFunction() + +# %% +problem.getProbability() + +# %% +# Create the Monte-Carlo algorithm +algoProb = ot.ProbabilitySimulationAlgorithm(event) +algoProb.setMaximumOuterSampling(1000) +algoProb.setMaximumCoefficientOfVariation(0.01) +algoProb.run() + +# %% +# Get the results +resultAlgo = algoProb.getResult() +neval = g.getEvaluationCallsNumber() +print("Number of function calls = %d" % (neval)) +pf = resultAlgo.getProbabilityEstimate() +print("Failure Probability = %.4f" % (pf)) +level = 0.95 +c95 = resultAlgo.getConfidenceLength(level) +pmin = pf - 0.5 * c95 +pmax = pf + 0.5 * c95 +print("%.1f %% confidence interval :[%.4f,%.4f] " % (level * 100, pmin, pmax)) + + +# %% +# Compute the bounds of the domain +# -------------------------------- + + +# %% +inputVector = event.getAntecedent() +distribution = inputVector.getDistribution() +X1 = distribution.getMarginal(0) +X2 = distribution.getMarginal(1) +alphaMin = 0.0000001 +alphaMax = 1 - alphaMin +lowerBound = ot.Point( + [X1.computeQuantile(alphaMin)[0], X2.computeQuantile(alphaMin)[0]] +) +upperBound = ot.Point( + [X1.computeQuantile(alphaMax)[0], X2.computeQuantile(alphaMax)[0]] +) + +# %% +nbPoints = [100, 100] +figure = g.draw(lowerBound, upperBound, nbPoints) +figure.setTitle(" Iso-values of limit state function") +figure + +# %% +# Print the iso-values of the distribution +# ---------------------------------------- + +# %% +_ = otv.View(distribution.drawPDF()) + +# %% +sampleSize = 10000 +drawEvent = otb.DrawEvent(event) + +# %% +cloud = drawEvent.drawSampleCrossCut(sampleSize) +_ = otv.View(cloud) + +# %% +# Draw the limit state surface +# ---------------------------- + +# %% +bounds = ot.Interval(lowerBound, upperBound) +bounds + +# %% +graph = drawEvent.drawLimitStateCrossCut(bounds) +graph.add(cloud) +graph + +# %% +domain = drawEvent.fillEventCrossCut(bounds) +_ = otv.View(domain) + +# %% +domain.add(cloud) +_ = otv.View(domain) + +# %% +otv.View.ShowAll() diff --git a/otbenchmark/master/_downloads/5264af23fc1a9dd9e56a6756ff56b102/plot_rp22.ipynb b/otbenchmark/master/_downloads/5264af23fc1a9dd9e56a6756ff56b102/plot_rp22.ipynb new file mode 100644 index 00000000000..c401544ce62 --- /dev/null +++ b/otbenchmark/master/_downloads/5264af23fc1a9dd9e56a6756ff56b102/plot_rp22.ipynb @@ -0,0 +1,250 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# RP22 analysis and 2D graphics\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The objective of this example is to present problem 22 of the BBRC.\nWe also present graphic elements for the visualization of the limit state surface in 2 dimensions.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import openturns as ot\nimport openturns.viewer as otv\nimport otbenchmark as otb" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "problem = otb.ReliabilityProblem22()\nprint(problem)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "event = problem.getEvent()\ng = event.getFunction()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "problem.getProbability()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Create the Monte-Carlo algorithm\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "algoProb = ot.ProbabilitySimulationAlgorithm(event)\nalgoProb.setMaximumOuterSampling(1000)\nalgoProb.setMaximumCoefficientOfVariation(0.01)\nalgoProb.run()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Get the results\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "resultAlgo = algoProb.getResult()\nneval = g.getEvaluationCallsNumber()\nprint(\"Number of function calls = %d\" % (neval))\npf = resultAlgo.getProbabilityEstimate()\nprint(\"Failure Probability = %.4f\" % (pf))\nlevel = 0.95\nc95 = resultAlgo.getConfidenceLength(level)\npmin = pf - 0.5 * c95\npmax = pf + 0.5 * c95\nprint(\"%.1f %% confidence interval :[%.4f,%.4f] \" % (level * 100, pmin, pmax))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Compute the bounds of the domain\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "inputVector = event.getAntecedent()\ndistribution = inputVector.getDistribution()\nX1 = distribution.getMarginal(0)\nX2 = distribution.getMarginal(1)\nalphaMin = 0.00001\nalphaMax = 1 - alphaMin\nlowerBound = ot.Point(\n [X1.computeQuantile(alphaMin)[0], X2.computeQuantile(alphaMin)[0]]\n)\nupperBound = ot.Point(\n [X1.computeQuantile(alphaMax)[0], X2.computeQuantile(alphaMax)[0]]\n)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "nbPoints = [100, 100]\nfigure = g.draw(lowerBound, upperBound, nbPoints)\nfigure.setTitle(\" Iso-values of limit state function\")\nfigure" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Print the iso-values of the distribution\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "_ = otv.View(distribution.drawPDF())" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "sampleSize = 5000\ndrawEvent = otb.DrawEvent(event)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "cloud = drawEvent.drawSampleCrossCut(sampleSize)\n_ = otv.View(cloud)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Draw the limit state surface\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "bounds = ot.Interval(lowerBound, upperBound)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "graph = drawEvent.drawLimitStateCrossCut(bounds)\ngraph.add(cloud)\ngraph" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "domain = drawEvent.fillEventCrossCut(bounds)\n_ = otv.View(domain)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "domain.add(cloud)\n_ = otv.View(domain)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "otv.View.ShowAll()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.20" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/otbenchmark/master/_downloads/5399d208c631179e3fb3ec10196baa87/plot_rp25.py b/otbenchmark/master/_downloads/5399d208c631179e3fb3ec10196baa87/plot_rp25.py new file mode 100644 index 00000000000..75aa79c25c7 --- /dev/null +++ b/otbenchmark/master/_downloads/5399d208c631179e3fb3ec10196baa87/plot_rp25.py @@ -0,0 +1,100 @@ +""" +RP25 analysis and 2D graphics +============================= +""" + +# %% +# The objective of this example is to present problem 25 of the BBRC. +# We also present graphic elements for the visualization of the limit state surface in 2 dimensions. + +# %% +import openturns as ot +import openturns.viewer as otv +import otbenchmark as otb + +# %% +problem = otb.ReliabilityProblem25() +print(problem) + +# %% +event = problem.getEvent() +g = event.getFunction() + +# %% +problem.getProbability() + +# %% +# Create the Monte-Carlo algorithm +algoProb = ot.ProbabilitySimulationAlgorithm(event) +algoProb.setMaximumOuterSampling(100000) +algoProb.setMaximumCoefficientOfVariation(0.01) +algoProb.run() + +# %% +# Get the results +resultAlgo = algoProb.getResult() +neval = g.getEvaluationCallsNumber() +print("Number of function calls = %d" % (neval)) +pf = resultAlgo.getProbabilityEstimate() +print("Failure Probability = %.4f" % (pf)) +level = 0.95 +c95 = resultAlgo.getConfidenceLength(level) +pmin = pf - 0.5 * c95 +pmax = pf + 0.5 * c95 +print("%.1f %% confidence interval :[%.4f,%.4f] " % (level * 100, pmin, pmax)) + +# %% +# Compute the bounds of the domain +inputVector = event.getAntecedent() +distribution = inputVector.getDistribution() +X1 = distribution.getMarginal(0) +X2 = distribution.getMarginal(1) +alphaMin = 0.00001 +alphaMax = 1 - alphaMin +lowerBound = ot.Point( + [X1.computeQuantile(alphaMin)[0], X2.computeQuantile(alphaMin)[0]] +) +upperBound = ot.Point( + [X1.computeQuantile(alphaMax)[0], X2.computeQuantile(alphaMax)[0]] +) + +# %% +nbPoints = [100, 100] +figure = g.draw(lowerBound, upperBound, nbPoints) +figure.setTitle(" Iso-values of limit state function") +figure + +# %% +# Print the iso-values of the distribution +_ = otv.View(distribution.drawPDF()) + +# %% +sampleSize = 1000000 +drawEvent = otb.DrawEvent(event) + +# %% +cloud = drawEvent.drawSampleCrossCut(sampleSize) +_ = otv.View(cloud) + +# %% +# Draw the limit state surface +# ---------------------------- + +# %% +bounds = ot.Interval(lowerBound, upperBound) + +# %% +graph = drawEvent.drawLimitStateCrossCut(bounds) +graph.add(cloud) +graph + +# %% +domain = drawEvent.fillEventCrossCut(bounds) +_ = otv.View(domain) + +# %% +domain.add(cloud) +_ = otv.View(domain) + +# %% +otv.View.ShowAll() diff --git a/otbenchmark/master/_downloads/546015264311e3d42fe9b9adf5f7d337/plot_rp55.zip b/otbenchmark/master/_downloads/546015264311e3d42fe9b9adf5f7d337/plot_rp55.zip new file mode 100644 index 00000000000..967840d5d80 Binary files /dev/null and b/otbenchmark/master/_downloads/546015264311e3d42fe9b9adf5f7d337/plot_rp55.zip differ diff --git a/otbenchmark/master/_downloads/58ab3a86267c4c0d45a6c3655a442667/plot_rp57.ipynb b/otbenchmark/master/_downloads/58ab3a86267c4c0d45a6c3655a442667/plot_rp57.ipynb new file mode 100644 index 00000000000..9ef10bcdbf2 --- /dev/null +++ b/otbenchmark/master/_downloads/58ab3a86267c4c0d45a6c3655a442667/plot_rp57.ipynb @@ -0,0 +1,250 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# RP57 analysis and 2D graphics\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The objective of this example is to present problem 57 of the BBRC.\nWe also present graphic elements for the visualization of the limit state surface in 2 dimensions.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import openturns as ot\nimport openturns.viewer as otv\nimport otbenchmark as otb" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "problem = otb.ReliabilityProblem57()\nprint(problem)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "event = problem.getEvent()\ng = event.getFunction()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "problem.getProbability()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Create the Monte-Carlo algorithm\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "algoProb = ot.ProbabilitySimulationAlgorithm(event)\nalgoProb.setMaximumOuterSampling(1000)\nalgoProb.setMaximumCoefficientOfVariation(0.01)\nalgoProb.run()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Get the results\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "resultAlgo = algoProb.getResult()\nneval = g.getEvaluationCallsNumber()\nprint(\"Number of function calls = %d\" % (neval))\npf = resultAlgo.getProbabilityEstimate()\nprint(\"Failure Probability = %.4f\" % (pf))\nlevel = 0.95\nc95 = resultAlgo.getConfidenceLength(level)\npmin = pf - 0.5 * c95\npmax = pf + 0.5 * c95\nprint(\"%.1f %% confidence interval :[%.4f,%.4f] \" % (level * 100, pmin, pmax))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Compute the bounds of the domain\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "inputVector = event.getAntecedent()\ndistribution = inputVector.getDistribution()\nX1 = distribution.getMarginal(0)\nX2 = distribution.getMarginal(1)\nalphaMin = 0.00001\nalphaMax = 1 - alphaMin\nlowerBound = ot.Point(\n [X1.computeQuantile(alphaMin)[0], X2.computeQuantile(alphaMin)[0]]\n)\nupperBound = ot.Point(\n [X1.computeQuantile(alphaMax)[0], X2.computeQuantile(alphaMax)[0]]\n)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "nbPoints = [100, 100]\ngraph = g.draw(lowerBound, upperBound, nbPoints)\ngraph.setTitle(\"Iso-values of limit state function\")\n_ = otv.View(graph)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Print the iso-values of the distribution\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "distribution.drawPDF()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "sampleSize = 5000\ndrawEvent = otb.DrawEvent(event)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "cloud = drawEvent.drawSampleCrossCut(sampleSize)\n_ = otv.View(cloud)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Draw the limit state surface\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "bounds = ot.Interval(lowerBound, upperBound)\nbounds" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "graph = drawEvent.drawLimitStateCrossCut(bounds)\ngraph.add(cloud)\ngraph" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "domain = drawEvent.fillEventCrossCut(bounds)\n_ = otv.View(domain)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "domain.add(cloud)\n_ = otv.View(domain)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "otv.View.ShowAll()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.20" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/otbenchmark/master/_downloads/59eec10882101a6404142d6b65774fb1/plot_rp89.zip b/otbenchmark/master/_downloads/59eec10882101a6404142d6b65774fb1/plot_rp89.zip new file mode 100644 index 00000000000..b575b85022e Binary files /dev/null and b/otbenchmark/master/_downloads/59eec10882101a6404142d6b65774fb1/plot_rp89.zip differ diff --git a/otbenchmark/master/_downloads/5fab7882172318ff3e3ffcf48ef9eddf/plot_ishigami_sensitivity.zip b/otbenchmark/master/_downloads/5fab7882172318ff3e3ffcf48ef9eddf/plot_ishigami_sensitivity.zip index f283c455f68..80bb43f7738 100644 Binary files a/otbenchmark/master/_downloads/5fab7882172318ff3e3ffcf48ef9eddf/plot_ishigami_sensitivity.zip and b/otbenchmark/master/_downloads/5fab7882172318ff3e3ffcf48ef9eddf/plot_ishigami_sensitivity.zip differ diff --git a/otbenchmark/master/_downloads/61d7dccbee58a8f192186054f9414f65/plot_rp57.py b/otbenchmark/master/_downloads/61d7dccbee58a8f192186054f9414f65/plot_rp57.py new file mode 100644 index 00000000000..9df6b8757f2 --- /dev/null +++ b/otbenchmark/master/_downloads/61d7dccbee58a8f192186054f9414f65/plot_rp57.py @@ -0,0 +1,101 @@ +""" +RP57 analysis and 2D graphics +============================= +""" + +# %% +# The objective of this example is to present problem 57 of the BBRC. +# We also present graphic elements for the visualization of the limit state surface in 2 dimensions. + +# %% +import openturns as ot +import openturns.viewer as otv +import otbenchmark as otb + +# %% +problem = otb.ReliabilityProblem57() +print(problem) + +# %% +event = problem.getEvent() +g = event.getFunction() + +# %% +problem.getProbability() + +# %% +# Create the Monte-Carlo algorithm +algoProb = ot.ProbabilitySimulationAlgorithm(event) +algoProb.setMaximumOuterSampling(1000) +algoProb.setMaximumCoefficientOfVariation(0.01) +algoProb.run() + +# %% +# Get the results +resultAlgo = algoProb.getResult() +neval = g.getEvaluationCallsNumber() +print("Number of function calls = %d" % (neval)) +pf = resultAlgo.getProbabilityEstimate() +print("Failure Probability = %.4f" % (pf)) +level = 0.95 +c95 = resultAlgo.getConfidenceLength(level) +pmin = pf - 0.5 * c95 +pmax = pf + 0.5 * c95 +print("%.1f %% confidence interval :[%.4f,%.4f] " % (level * 100, pmin, pmax)) + +# %% +# Compute the bounds of the domain +inputVector = event.getAntecedent() +distribution = inputVector.getDistribution() +X1 = distribution.getMarginal(0) +X2 = distribution.getMarginal(1) +alphaMin = 0.00001 +alphaMax = 1 - alphaMin +lowerBound = ot.Point( + [X1.computeQuantile(alphaMin)[0], X2.computeQuantile(alphaMin)[0]] +) +upperBound = ot.Point( + [X1.computeQuantile(alphaMax)[0], X2.computeQuantile(alphaMax)[0]] +) + +# %% +nbPoints = [100, 100] +graph = g.draw(lowerBound, upperBound, nbPoints) +graph.setTitle("Iso-values of limit state function") +_ = otv.View(graph) + +# %% +# Print the iso-values of the distribution +distribution.drawPDF() + +# %% +sampleSize = 5000 +drawEvent = otb.DrawEvent(event) + +# %% +cloud = drawEvent.drawSampleCrossCut(sampleSize) +_ = otv.View(cloud) + +# %% +# Draw the limit state surface +# ---------------------------- + +# %% +bounds = ot.Interval(lowerBound, upperBound) +bounds + +# %% +graph = drawEvent.drawLimitStateCrossCut(bounds) +graph.add(cloud) +graph + +# %% +domain = drawEvent.fillEventCrossCut(bounds) +_ = otv.View(domain) + +# %% +domain.add(cloud) +_ = otv.View(domain) + +# %% +otv.View.ShowAll() diff --git a/otbenchmark/master/_downloads/629687dd8581020f5bdda375e12cf702/plot_gaussian_sum.zip b/otbenchmark/master/_downloads/629687dd8581020f5bdda375e12cf702/plot_gaussian_sum.zip index 0be7bd1c06e..657d66251d8 100644 Binary files a/otbenchmark/master/_downloads/629687dd8581020f5bdda375e12cf702/plot_gaussian_sum.zip and b/otbenchmark/master/_downloads/629687dd8581020f5bdda375e12cf702/plot_gaussian_sum.zip differ diff --git a/otbenchmark/master/_downloads/63226d731eafc09d2661a34b802d4684/plot_case_rs.ipynb b/otbenchmark/master/_downloads/63226d731eafc09d2661a34b802d4684/plot_case_rs.ipynb new file mode 100644 index 00000000000..de2b5379287 --- /dev/null +++ b/otbenchmark/master/_downloads/63226d731eafc09d2661a34b802d4684/plot_case_rs.ipynb @@ -0,0 +1,319 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# R-S analysis and 2D graphics\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The objective of this example is to present the R-S problem.\nWe also present graphic elements for the visualization of the limit state surface in 2 dimensions.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import openturns as ot\nimport openturns.viewer as otv\nimport otbenchmark as otb" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "problem = otb.RminusSReliability()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "event = problem.getEvent()\ng = event.getFunction()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "problem.getProbability()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Create the Monte-Carlo algorithm\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "algoProb = ot.ProbabilitySimulationAlgorithm(event)\nalgoProb.setMaximumOuterSampling(1000)\nalgoProb.setMaximumCoefficientOfVariation(0.01)\nalgoProb.run()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Get the results\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "resultAlgo = algoProb.getResult()\nneval = g.getEvaluationCallsNumber()\nprint(\"Number of function calls = %d\" % (neval))\npf = resultAlgo.getProbabilityEstimate()\nprint(\"Failure Probability = %.4f\" % (pf))\nlevel = 0.95\nc95 = resultAlgo.getConfidenceLength(level)\npmin = pf - 0.5 * c95\npmax = pf + 0.5 * c95\nprint(\"%.1f %% confidence interval :[%.4f,%.4f] \" % (level * 100, pmin, pmax))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Plot the contours of the function\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "inputVector = event.getAntecedent()\ndistribution = inputVector.getDistribution()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "R = distribution.getMarginal(0)\nS = distribution.getMarginal(1)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "alphaMin = 0.001\nalphaMax = 1 - alphaMin\nlowerBound = ot.Point([R.computeQuantile(alphaMin)[0], S.computeQuantile(alphaMin)[0]])\nupperBound = ot.Point([R.computeQuantile(alphaMax)[0], S.computeQuantile(alphaMax)[0]])" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "nbPoints = [100, 100]\n_ = otv.View(g.draw(lowerBound, upperBound, nbPoints))" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "Y = R - S\nY" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "_ = otv.View(Y.drawPDF())" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Print the iso-values of the distribution\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "_ = otv.View(distribution.drawPDF())" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Visualise the safe and unsafe regions on a sample\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "sampleSize = 500" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "drawEvent = otb.DrawEvent(event)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "cloud = drawEvent.drawSampleCrossCut(sampleSize)\ncloud" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Draw the limit state surface\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "bounds = ot.Interval(lowerBound, upperBound)\nbounds" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "graph = drawEvent.drawLimitStateCrossCut(bounds)\ngraph.add(cloud)\ngraph" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Fill the event domain with a color\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "domain = drawEvent.fillEventCrossCut(bounds)\n_ = otv.View(domain)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "domain.setLegends([\"\", \"\"])\ndomain.add(cloud)\n_ = otv.View(domain)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "otv.View.ShowAll()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.20" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/otbenchmark/master/_downloads/6627dfa18643515b598adfd9222193ac/plot_rp31.zip b/otbenchmark/master/_downloads/6627dfa18643515b598adfd9222193ac/plot_rp31.zip new file mode 100644 index 00000000000..dede193af72 Binary files /dev/null and b/otbenchmark/master/_downloads/6627dfa18643515b598adfd9222193ac/plot_rp31.zip differ diff --git a/otbenchmark/master/_downloads/66b4d9d63c28c108996cfe858ca9289e/plot_morris_sensitivity.zip b/otbenchmark/master/_downloads/66b4d9d63c28c108996cfe858ca9289e/plot_morris_sensitivity.zip index 32f776fc083..6943bf7e385 100644 Binary files a/otbenchmark/master/_downloads/66b4d9d63c28c108996cfe858ca9289e/plot_morris_sensitivity.zip and b/otbenchmark/master/_downloads/66b4d9d63c28c108996cfe858ca9289e/plot_morris_sensitivity.zip differ diff --git a/otbenchmark/master/_downloads/68768d04c3878a87772ae76c96f04080/plot_rp31.py b/otbenchmark/master/_downloads/68768d04c3878a87772ae76c96f04080/plot_rp31.py new file mode 100644 index 00000000000..2a9b9f3cc4e --- /dev/null +++ b/otbenchmark/master/_downloads/68768d04c3878a87772ae76c96f04080/plot_rp31.py @@ -0,0 +1,100 @@ +""" +RP31 analysis and 2D graphics +============================= +""" + +# %% +# The objective of this example is to present problem 31 of the BBRC. +# We also present graphic elements for the visualization of the limit state surface in 2 dimensions. + +# %% +import openturns as ot +import openturns.viewer as otv +import otbenchmark as otb + +# %% +problem = otb.ReliabilityProblem31() +print(problem) + +# %% +event = problem.getEvent() +g = event.getFunction() + +# %% +problem.getProbability() + +# %% +# Create the Monte-Carlo algorithm +algoProb = ot.ProbabilitySimulationAlgorithm(event) +algoProb.setMaximumOuterSampling(1000) +algoProb.setMaximumCoefficientOfVariation(0.01) +algoProb.run() + +# %% +# Get the results +resultAlgo = algoProb.getResult() +neval = g.getEvaluationCallsNumber() +print("Number of function calls = %d" % (neval)) +pf = resultAlgo.getProbabilityEstimate() +print("Failure Probability = %.4f" % (pf)) +level = 0.95 +c95 = resultAlgo.getConfidenceLength(level) +pmin = pf - 0.5 * c95 +pmax = pf + 0.5 * c95 +print("%.1f %% confidence interval :[%.4f,%.4f] " % (level * 100, pmin, pmax)) + +# %% +# Compute the bounds of the domain +inputVector = event.getAntecedent() +distribution = inputVector.getDistribution() +X1 = distribution.getMarginal(0) +X2 = distribution.getMarginal(1) +alphaMin = 0.00001 +alphaMax = 1 - alphaMin +lowerBound = ot.Point( + [X1.computeQuantile(alphaMin)[0], X2.computeQuantile(alphaMin)[0]] +) +upperBound = ot.Point( + [X1.computeQuantile(alphaMax)[0], X2.computeQuantile(alphaMax)[0]] +) + +# %% +nbPoints = [100, 100] +graph = g.draw(lowerBound, upperBound, nbPoints) +graph.setTitle(" Iso-values of limit state function") +_ = otv.View(graph) + +# %% +# Plot the iso-values of the distribution +_ = otv.View(distribution.drawPDF()) + +# %% +sampleSize = 10000 +drawEvent = otb.DrawEvent(event) + +# %% +cloud = drawEvent.drawSampleCrossCut(sampleSize) +_ = otv.View(cloud) + +# %% +# Draw the limit state surface +# ---------------------------- + +# %% +bounds = ot.Interval(lowerBound, upperBound) + +# %% +graph = drawEvent.drawLimitStateCrossCut(bounds) +graph.add(cloud) +graph + +# %% +domain = drawEvent.fillEventCrossCut(bounds) +_ = otv.View(domain) + +# %% +domain.add(cloud) +_ = otv.View(domain) + +# %% +otv.View.ShowAll() diff --git a/otbenchmark/master/_downloads/688ccf16ddb6f9c4e62926a26e569906/plot_rp53.py b/otbenchmark/master/_downloads/688ccf16ddb6f9c4e62926a26e569906/plot_rp53.py new file mode 100644 index 00000000000..8981a641912 --- /dev/null +++ b/otbenchmark/master/_downloads/688ccf16ddb6f9c4e62926a26e569906/plot_rp53.py @@ -0,0 +1,97 @@ +""" +RP53 analysis and 2D graphics +============================= +""" + +# %% +# The objective of this example is to present problem 53 of the BBRC. +# We also present graphic elements for the visualization of the limit state surface in 2 dimensions. + +# %% +import openturns as ot +import openturns.viewer as otv +import otbenchmark as otb + + +# %% +problem = otb.ReliabilityProblem53() + +# %% +event = problem.getEvent() +g = event.getFunction() + +# %% +problem.getProbability() + +# %% +# Create the Monte-Carlo algorithm +algoProb = ot.ProbabilitySimulationAlgorithm(event) +algoProb.setMaximumOuterSampling(1000) +algoProb.setMaximumCoefficientOfVariation(0.01) +algoProb.run() + +# %% +# Get the results +resultAlgo = algoProb.getResult() +neval = g.getEvaluationCallsNumber() +print("Number of function calls = %d" % (neval)) +pf = resultAlgo.getProbabilityEstimate() +print("Failure Probability = %.4f" % (pf)) +level = 0.95 +c95 = resultAlgo.getConfidenceLength(level) +pmin = pf - 0.5 * c95 +pmax = pf + 0.5 * c95 +print("%.1f %% confidence interval :[%.4f,%.4f] " % (level * 100, pmin, pmax)) + +# %% +inputVector = event.getAntecedent() +distribution = inputVector.getDistribution() +X1 = distribution.getMarginal(0) +X2 = distribution.getMarginal(0) +alpha = 1 - 1.0e-4 +bounds, marginalProb = distribution.computeMinimumVolumeIntervalWithMarginalProbability( + alpha +) + + +# %% +_ = otv.View(X1.drawPDF()) + +# %% +# Print the iso-values of the distribution +# ---------------------------------------- + +# %% +_ = otv.View(distribution.drawPDF()) + + +# %% +sampleSize = 5000 +drawEvent = otb.DrawEvent(event) + + +# %% +cloud = drawEvent.drawSampleCrossCut(sampleSize) +_ = otv.View(cloud) + +# %% +# Draw the limit state surface +# ---------------------------- + +# %% +graph = drawEvent.drawLimitStateCrossCut(bounds) +graph.add(cloud) +graph + + +# %% +domain = drawEvent.fillEventCrossCut(bounds) +_ = otv.View(domain) + + +# %% +domain.add(cloud) +_ = otv.View(domain) + +# %% +otv.View.ShowAll() diff --git a/otbenchmark/master/_downloads/6b55e1d416c35886a31041a6892cb0f0/plot_borehole_sensitivity.zip b/otbenchmark/master/_downloads/6b55e1d416c35886a31041a6892cb0f0/plot_borehole_sensitivity.zip index e4481c26a39..1697fce59c8 100644 Binary files a/otbenchmark/master/_downloads/6b55e1d416c35886a31041a6892cb0f0/plot_borehole_sensitivity.zip and b/otbenchmark/master/_downloads/6b55e1d416c35886a31041a6892cb0f0/plot_borehole_sensitivity.zip differ diff --git a/otbenchmark/master/_downloads/6f1e7a639e0699d6164445b55e6c116d/auto_examples_jupyter.zip b/otbenchmark/master/_downloads/6f1e7a639e0699d6164445b55e6c116d/auto_examples_jupyter.zip index 6b23ff1c558..ce8ef82e439 100644 Binary files a/otbenchmark/master/_downloads/6f1e7a639e0699d6164445b55e6c116d/auto_examples_jupyter.zip and b/otbenchmark/master/_downloads/6f1e7a639e0699d6164445b55e6c116d/auto_examples_jupyter.zip differ diff --git a/otbenchmark/master/_downloads/708113975e29ad6b539ace5031c620f7/plot_rp110.zip b/otbenchmark/master/_downloads/708113975e29ad6b539ace5031c620f7/plot_rp110.zip new file mode 100644 index 00000000000..8995528d39e Binary files /dev/null and b/otbenchmark/master/_downloads/708113975e29ad6b539ace5031c620f7/plot_rp110.zip differ diff --git a/otbenchmark/master/_downloads/70b5b02a8766a34d43ea534a7ac293dc/plot_rp25.zip b/otbenchmark/master/_downloads/70b5b02a8766a34d43ea534a7ac293dc/plot_rp25.zip new file mode 100644 index 00000000000..3dd47ee40d7 Binary files /dev/null and b/otbenchmark/master/_downloads/70b5b02a8766a34d43ea534a7ac293dc/plot_rp25.zip differ diff --git a/otbenchmark/master/_downloads/796cda602c719f224fdec1f3c5915223/plot_rp89.ipynb b/otbenchmark/master/_downloads/796cda602c719f224fdec1f3c5915223/plot_rp89.ipynb new file mode 100644 index 00000000000..e50e107e04a --- /dev/null +++ b/otbenchmark/master/_downloads/796cda602c719f224fdec1f3c5915223/plot_rp89.ipynb @@ -0,0 +1,250 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# RP89 analysis and 2D graphics\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The objective of this example is to present problem 89 of the BBRC.\nWe also present graphic elements for the visualization of the limit state surface in 2 dimensions.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import openturns as ot\nimport openturns.viewer as otv\nimport otbenchmark as otb" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "problem = otb.ReliabilityProblem89()\nprint(problem)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "event = problem.getEvent()\ng = event.getFunction()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "problem.getProbability()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Create the Monte-Carlo algorithm\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "algoProb = ot.ProbabilitySimulationAlgorithm(event)\nalgoProb.setMaximumOuterSampling(1000)\nalgoProb.setMaximumCoefficientOfVariation(0.01)\nalgoProb.run()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Get the results\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "resultAlgo = algoProb.getResult()\nneval = g.getEvaluationCallsNumber()\nprint(\"Number of function calls = %d\" % (neval))\npf = resultAlgo.getProbabilityEstimate()\nprint(\"Failure Probability = %.4f\" % (pf))\nlevel = 0.95\nc95 = resultAlgo.getConfidenceLength(level)\npmin = pf - 0.5 * c95\npmax = pf + 0.5 * c95\nprint(\"%.1f %% confidence interval :[%.4f,%.4f] \" % (level * 100, pmin, pmax))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Compute the bounds of the domain\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "inputVector = event.getAntecedent()\ndistribution = inputVector.getDistribution()\nX1 = distribution.getMarginal(0)\nX2 = distribution.getMarginal(1)\nalphaMin = 0.00001\nalphaMax = 1 - alphaMin\nlowerBound = ot.Point(\n [X1.computeQuantile(alphaMin)[0], X2.computeQuantile(alphaMin)[0]]\n)\nupperBound = ot.Point(\n [X1.computeQuantile(alphaMax)[0], X2.computeQuantile(alphaMax)[0]]\n)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "nbPoints = [100, 100]\nfigure = g.draw(lowerBound, upperBound, nbPoints)\nfigure.setTitle(\" Iso-values of limit state function\")\nfigure" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Print the iso-values of the distribution\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "_ = otv.View(distribution.drawPDF())" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "sampleSize = 5000\ndrawEvent = otb.DrawEvent(event)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "cloud = drawEvent.drawSampleCrossCut(sampleSize)\n_ = otv.View(cloud)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Draw the limit state surface\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "bounds = ot.Interval(lowerBound, upperBound)\nbounds" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "graph = drawEvent.drawLimitStateCrossCut(bounds)\ngraph.add(cloud)\ngraph" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "domain = drawEvent.fillEventCrossCut(bounds)\n_ = otv.View(domain)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "domain.add(cloud)\n_ = otv.View(domain)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "otv.View.ShowAll()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.20" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/otbenchmark/master/_downloads/7f13a44954884297d4db857bec1ecd92/plot_convergence_ishigami.zip b/otbenchmark/master/_downloads/7f13a44954884297d4db857bec1ecd92/plot_convergence_ishigami.zip index 239927d2540..9ca6d4d0f57 100644 Binary files a/otbenchmark/master/_downloads/7f13a44954884297d4db857bec1ecd92/plot_convergence_ishigami.zip and b/otbenchmark/master/_downloads/7f13a44954884297d4db857bec1ecd92/plot_convergence_ishigami.zip differ diff --git a/otbenchmark/master/_downloads/7f5965de1d28602e632761eef7891e27/plot_reliability_benchmark_table.ipynb b/otbenchmark/master/_downloads/7f5965de1d28602e632761eef7891e27/plot_reliability_benchmark_table.ipynb new file mode 100644 index 00000000000..c1cf398b3df --- /dev/null +++ b/otbenchmark/master/_downloads/7f5965de1d28602e632761eef7891e27/plot_reliability_benchmark_table.ipynb @@ -0,0 +1,289 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Benchmark the reliability solvers on the problems\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "In this example, we show how to run all the methods on all the problems and get the computed probability.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import openturns as ot\nimport numpy as np\nimport otbenchmark as otb\nimport pandas as pd\nfrom tqdm import tqdm" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "ot.Log.Show(ot.Log.NONE)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "We import the list of reliability problems.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "benchmarkProblemList = otb.ReliabilityBenchmarkProblemList()\nnumberOfProblems = len(benchmarkProblemList)\nnumberOfProblems" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "For each problem in the benchmark, print the problem name and the exact failure probability.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "for i in range(numberOfProblems):\n problem = benchmarkProblemList[i]\n name = problem.getName()\n pf = problem.getProbability()\n print(\"#\", i, \" : \", name, \", exact PF : \", pf)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Run several algorithms on a single problem\n\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "We want to run several algorithms on a single problem.\nWe set the parameters of the algorithms and run them on a single problem.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "maximumEvaluationNumber = 1000\nmaximumAbsoluteError = 1.0e-3\nmaximumRelativeError = 1.0e-3\nmaximumResidualError = 1.0e-3\nmaximumConstraintError = 1.0e-3\nnearestPointAlgorithm = ot.AbdoRackwitz()\nnearestPointAlgorithm.setMaximumCallsNumber(maximumEvaluationNumber)\nnearestPointAlgorithm.setMaximumAbsoluteError(maximumAbsoluteError)\nnearestPointAlgorithm.setMaximumRelativeError(maximumRelativeError)\nnearestPointAlgorithm.setMaximumResidualError(maximumResidualError)\nnearestPointAlgorithm.setMaximumConstraintError(maximumConstraintError)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "i = 3\nproblem = benchmarkProblemList[i]\nmetaAlgorithm = otb.ReliabilityBenchmarkMetaAlgorithm(problem)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "We try the FORM algorithm.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "benchmarkFORM = metaAlgorithm.runFORM(nearestPointAlgorithm)\ns1 = benchmarkFORM.summary()\nprint(s1)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Then the SORM algorithm.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "benchmarkSORM = metaAlgorithm.runSORM(nearestPointAlgorithm)\ns2 = benchmarkSORM.summary()\nprint(s2)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "benchmarkMC = metaAlgorithm.runMonteCarlo(\n maximumOuterSampling=1000000, coefficientOfVariation=0.1, blockSize=1,\n)\ns3 = benchmarkMC.summary()\nprint(s3)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "benchmarkFORMIS = metaAlgorithm.runFORMImportanceSampling(\n nearestPointAlgorithm,\n maximumOuterSampling=1000,\n coefficientOfVariation=0.1,\n blockSize=1,\n)\ns4 = benchmarkFORMIS.summary()\nprint(s4)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "benchmarkSS = metaAlgorithm.runSubsetSampling(\n maximumOuterSampling=5000, coefficientOfVariation=0.1, blockSize=1,\n)\ns5 = benchmarkSS.summary()\nprint(s5)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Run all algorithms on all problems and produce a single result table\n\nFor several algorithms and all the reliability problems, we want to estimate the failure probability and compare them.\n\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "We create a list of problem names.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "problem_names = []\nfor i in range(numberOfProblems):\n problem = benchmarkProblemList[i]\n name = problem.getName()\n problem_names.append(name)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "metrics = [\n \"Exact\",\n \"FORM\",\n \"SORM\",\n \"Monte Carlo\",\n \"FORM-IS\",\n \"Subset\",\n]\nresults = np.zeros((numberOfProblems, len(metrics)))\nmaximumOuterSampling = 10 ** 2\nblockSize = 10 ** 2\ncoefficientOfVariation = 0.0\n\nfor i in tqdm(range(numberOfProblems)):\n problem = benchmarkProblemList[i]\n results[i][0] = problem.getProbability()\n metaAlgorithm = otb.ReliabilityBenchmarkMetaAlgorithm(problem)\n benchmarkResult = metaAlgorithm.runFORM(nearestPointAlgorithm)\n results[i][1] = benchmarkResult.computedProbability\n benchmarkResult = metaAlgorithm.runSORM(nearestPointAlgorithm)\n results[i][2] = benchmarkResult.computedProbability\n benchmarkResult = metaAlgorithm.runMonteCarlo(\n maximumOuterSampling=maximumOuterSampling,\n coefficientOfVariation=coefficientOfVariation,\n blockSize=blockSize,\n )\n results[i][3] = benchmarkResult.computedProbability\n benchmarkResult = metaAlgorithm.runFORMImportanceSampling(\n nearestPointAlgorithm,\n maximumOuterSampling=maximumOuterSampling,\n coefficientOfVariation=coefficientOfVariation,\n blockSize=blockSize,\n )\n results[i][4] = benchmarkResult.computedProbability\n benchmarkResult = metaAlgorithm.runSubsetSampling(\n maximumOuterSampling=maximumOuterSampling,\n coefficientOfVariation=coefficientOfVariation,\n blockSize=blockSize,\n )\n results[i][5] = benchmarkResult.computedProbability\n\ndf = pd.DataFrame(results, index=problem_names, columns=metrics)\ndf.to_csv(\"reliability_benchmark_table-output.csv\")\ndf" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Run several algorithms on all problems and get detailed statistics\n\nRun several algorithms on all reliability benchmark problems: print statistics on each problem.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "def FormatRow(benchmarkResult):\n \"\"\"Format a single row of the benchmark table\"\"\"\n result = [\n benchmarkResult.exactProbability,\n benchmarkResult.computedProbability,\n benchmarkResult.absoluteError,\n benchmarkResult.numberOfCorrectDigits,\n benchmarkResult.numberOfFunctionEvaluations,\n benchmarkResult.numberOfDigitsPerEvaluation,\n ]\n return result" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "method_names = [\"Monte-Carlo\", \"FORM\", \"SORM\", \"FORM-IS\", \"SUBSET\"]\n\nmaximumOuterSampling = 10 ** 2\nblockSize = 10 ** 2\ncoefficientOfVariation = 0.0\n\nresult = dict()\nfor i in range(numberOfProblems):\n problem = benchmarkProblemList[i]\n name = problem_names[i]\n exact_pf_name = \"%10s\" % (\"Exact PF \" + name[0:10])\n metrics = [\n exact_pf_name,\n \"Estimated PF\",\n \"Absolute Error\",\n \"Correct Digits\",\n \"Function Calls\",\n \"Digits / Evaluation\",\n ]\n results = np.zeros((len(method_names), len(metrics)))\n metaAlgorithm = otb.ReliabilityBenchmarkMetaAlgorithm(problem)\n # Monte-Carlo\n benchmarkResult = metaAlgorithm.runMonteCarlo(\n maximumOuterSampling=maximumOuterSampling,\n coefficientOfVariation=coefficientOfVariation,\n blockSize=blockSize,\n )\n results[0, :] = FormatRow(benchmarkResult)\n # FORM\n benchmarkResult = metaAlgorithm.runFORM(nearestPointAlgorithm)\n results[1, :] = FormatRow(benchmarkResult)\n # SORM\n benchmarkResult = metaAlgorithm.runSORM(nearestPointAlgorithm)\n results[2, :] = FormatRow(benchmarkResult)\n # FORM-IS\n benchmarkResult = metaAlgorithm.runFORMImportanceSampling(\n nearestPointAlgorithm,\n maximumOuterSampling=maximumOuterSampling,\n coefficientOfVariation=coefficientOfVariation,\n blockSize=blockSize,\n )\n results[3, :] = FormatRow(benchmarkResult)\n # Subset\n benchmarkResult = metaAlgorithm.runSubsetSampling(\n maximumOuterSampling=maximumOuterSampling,\n coefficientOfVariation=coefficientOfVariation,\n blockSize=blockSize,\n )\n results[4, :] = FormatRow(benchmarkResult)\n # Gather statistics and print them\n df = pd.DataFrame(results, index=method_names, columns=metrics,)\n # Format the columns for readability\n s = df.style.format(\n {\n exact_pf_name: lambda x: \"{:.3e}\".format(x),\n \"Estimated PF\": lambda x: \"{:.3e}\".format(x),\n \"Absolute Error\": lambda x: \"{:.3e}\".format(x),\n \"Correct Digits\": lambda x: \"{:.1f}\".format(x),\n \"Function Calls\": lambda x: \"{:d}\".format(int(x)),\n \"Digits / Evaluation\": lambda x: \"{:.1f}\".format(x),\n }\n )\n result[name] = s" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "result[\"RP33\"]" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "result[\"RP35\"]" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.20" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/otbenchmark/master/_downloads/835448853a22ffd26b022a6b8d20860f/plot_rp55.ipynb b/otbenchmark/master/_downloads/835448853a22ffd26b022a6b8d20860f/plot_rp55.ipynb new file mode 100644 index 00000000000..f029b271099 --- /dev/null +++ b/otbenchmark/master/_downloads/835448853a22ffd26b022a6b8d20860f/plot_rp55.ipynb @@ -0,0 +1,341 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# RP55 analysis and 2D graphics\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The objective of this example is to present problem 55 of the BBRC.\nWe also present graphic elements for the visualization of the limit state surface in 2 dimensions.\n\nThe dimension is equal to 2 and the probability is close to $10^{-2}$.\nThis makes this problem relatively easy to solve.\nThe distribution is uniform in the square $[-1,1]^2$.\nThe failure domain is made of 5 diagonal bands.\nCapturing these bands is relatively easy and a Monte-Carlo simulation perform well in this case.\nThe FORM method cannot perform correctly, since the failure domain cannot be linearized in the gaussian space.\nHence, the SORM or FORM-IS methods do not perform satisfactorily.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import openturns as ot\nimport otbenchmark as otb\nimport openturns.viewer as otv" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Disable warnings\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "ot.Log.Show(ot.Log.NONE)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "problem = otb.ReliabilityProblem55()\nprint(problem)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "event = problem.getEvent()\ng = event.getFunction()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "problem.getProbability()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Compute the bounds of the domain\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "inputVector = event.getAntecedent()\ndistribution = inputVector.getDistribution()\nX1 = distribution.getMarginal(0)\nX2 = distribution.getMarginal(1)\nalphaMin = 0.00001\nalphaMax = 1 - alphaMin\nlowerBound = ot.Point(\n [X1.computeQuantile(alphaMin)[0], X2.computeQuantile(alphaMin)[0]]\n)\nupperBound = ot.Point(\n [X1.computeQuantile(alphaMax)[0], X2.computeQuantile(alphaMax)[0]]\n)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "nbPoints = [100, 100]\nfigure = g.draw(lowerBound, upperBound, nbPoints)\nfigure.setTitle(\" Iso-values of limit state function\")\nfigure" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Print the iso-values of the distribution\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "_ = otv.View(distribution.drawPDF())" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "sampleSize = 5000\nsampleInput = inputVector.getSample(sampleSize)\nsampleOutput = g(sampleInput)\ndrawEvent = otb.DrawEvent(event)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "cloud = drawEvent.drawSampleCrossCut(sampleSize)\ncloud" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Draw the limit state surface\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "bounds = ot.Interval(lowerBound, upperBound)\nbounds" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "graph = drawEvent.drawLimitStateCrossCut(bounds)\ngraph.add(cloud)\ngraph" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "domain = drawEvent.fillEventCrossCut(bounds)\n_ = otv.View(domain)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "domain.add(cloud)\n_ = otv.View(domain)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Perform Monte-Carlo simulation\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "algoProb = ot.ProbabilitySimulationAlgorithm(event)\nalgoProb.setMaximumOuterSampling(1000)\nalgoProb.setMaximumCoefficientOfVariation(0.01)\nalgoProb.run()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "resultAlgo = algoProb.getResult()\nneval = g.getEvaluationCallsNumber()\nprint(\"Number of function calls = %d\" % (neval))\npf = resultAlgo.getProbabilityEstimate()\nprint(\"Failure Probability = %.4f\" % (pf))\nlevel = 0.95\nc95 = resultAlgo.getConfidenceLength(level)\npmin = pf - 0.5 * c95\npmax = pf + 0.5 * c95\nprint(\"%.1f %% confidence interval :[%.4f,%.4f] \" % (level * 100, pmin, pmax))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## With FORM-IS\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "maximumEvaluationNumber = 1000\nmaximumAbsoluteError = 1.0e-3\nmaximumRelativeError = 1.0e-3\nmaximumResidualError = 1.0e-3\nmaximumConstraintError = 1.0e-3\nnearestPointAlgorithm = ot.AbdoRackwitz()\nnearestPointAlgorithm.setMaximumCallsNumber(maximumEvaluationNumber)\nnearestPointAlgorithm.setMaximumAbsoluteError(maximumAbsoluteError)\nnearestPointAlgorithm.setMaximumRelativeError(maximumRelativeError)\nnearestPointAlgorithm.setMaximumResidualError(maximumResidualError)\nnearestPointAlgorithm.setMaximumConstraintError(maximumConstraintError)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "metaAlgorithm = otb.ReliabilityBenchmarkMetaAlgorithm(problem)\nbenchmarkResult = metaAlgorithm.runFORMImportanceSampling(\n nearestPointAlgorithm, maximumOuterSampling=10 ** 5, coefficientOfVariation=0.0\n)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "print(benchmarkResult.summary())" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## With Quasi-Monte-Carlo\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "sequence = ot.SobolSequence()\nexperiment = ot.LowDiscrepancyExperiment(sequence, 1)\nexperiment.setRandomize(False)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "algo = ot.ProbabilitySimulationAlgorithm(event, experiment)\nalgo.setMaximumOuterSampling(10 ** 3)\nalgo.setMaximumCoefficientOfVariation(0.0)\nalgo.setBlockSize(10 ** 3)\nalgo.run()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "result = algo.getResult()\nprobability = result.getProbabilityEstimate()\nprint(\"Pf=\", probability)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "otv.View.ShowAll()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.20" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/otbenchmark/master/_downloads/8407992760a7c47a497c7cb5a67b4f4f/plot_rp35.py b/otbenchmark/master/_downloads/8407992760a7c47a497c7cb5a67b4f4f/plot_rp35.py new file mode 100644 index 00000000000..077b7998697 --- /dev/null +++ b/otbenchmark/master/_downloads/8407992760a7c47a497c7cb5a67b4f4f/plot_rp35.py @@ -0,0 +1,109 @@ +""" +RP35 analysis and 2D graphics +============================= +""" + +# %% +# The objective of this example is to present problem 35 of the BBRC. +# We also present graphic elements for the visualization of the limit state surface in 2 dimensions. + +# %% +import openturns as ot +import openturns.viewer as otv +import otbenchmark as otb + +# %% +problem = otb.ReliabilityProblem35() +print(problem) + +# %% +event = problem.getEvent() +g = event.getFunction() + +# %% +problem.getProbability() + +# %% +# Create the Monte-Carlo algorithm +algoProb = ot.ProbabilitySimulationAlgorithm(event) +algoProb.setMaximumOuterSampling(1000) +algoProb.setMaximumCoefficientOfVariation(0.01) +algoProb.run() + +# %% +# Get the results +resultAlgo = algoProb.getResult() +neval = g.getEvaluationCallsNumber() +print("Number of function calls = %d" % (neval)) +pf = resultAlgo.getProbabilityEstimate() +print("Failure Probability = %.4f" % (pf)) +level = 0.95 +c95 = resultAlgo.getConfidenceLength(level) +pmin = pf - 0.5 * c95 +pmax = pf + 0.5 * c95 +print("%.1f %% confidence interval :[%.4f,%.4f] " % (level * 100, pmin, pmax)) + +# %% +# Compute the bounds of the domain +# -------------------------------- + +# %% +inputVector = event.getAntecedent() +distribution = inputVector.getDistribution() +X1 = distribution.getMarginal(0) +X2 = distribution.getMarginal(1) +alphaMin = 0.00001 +alphaMax = 1 - alphaMin +lowerBound = ot.Point( + [X1.computeQuantile(alphaMin)[0], X2.computeQuantile(alphaMin)[0]] +) +upperBound = ot.Point( + [X1.computeQuantile(alphaMax)[0], X2.computeQuantile(alphaMax)[0]] +) + + +# %% +nbPoints = [100, 100] +figure = g.draw(lowerBound, upperBound, nbPoints) +figure.setTitle(" Iso-values of limit state function") +figure + +# %% +# Print the iso-values of the distribution +# ---------------------------------------- + +# %% +_ = otv.View(distribution.drawPDF()) + + +# %% +sampleSize = 10000 +drawEvent = otb.DrawEvent(event) + + +# %% +cloud = drawEvent.drawSampleCrossCut(sampleSize) +_ = otv.View(cloud) + +# %% +# Draw the limit state surface +# ---------------------------- + +# %% +bounds = ot.Interval(lowerBound, upperBound) + +# %% +graph = drawEvent.drawLimitStateCrossCut(bounds) +graph.add(cloud) +graph + +# %% +domain = drawEvent.fillEventCrossCut(bounds) +_ = otv.View(domain) + +# %% +domain.add(cloud) +_ = otv.View(domain) + +# %% +otv.View.ShowAll() diff --git a/otbenchmark/master/_downloads/8589aa8729f5fb9c2e0da8b03bbd7dab/plot_rp24.py b/otbenchmark/master/_downloads/8589aa8729f5fb9c2e0da8b03bbd7dab/plot_rp24.py new file mode 100644 index 00000000000..9bd9de41488 --- /dev/null +++ b/otbenchmark/master/_downloads/8589aa8729f5fb9c2e0da8b03bbd7dab/plot_rp24.py @@ -0,0 +1,109 @@ +""" +RP24 analysis and 2D graphics +============================= +""" + +# %% +# The objective of this example is to present problem 24 of the BBRC. +# We also present graphic elements for the visualization of the limit state surface in 2 dimensions. + +# %% +import openturns as ot +import openturns.viewer as otv +import otbenchmark as otb + +# %% +problem = otb.ReliabilityProblem24() + +# %% +print(problem) + +# %% +event = problem.getEvent() +g = event.getFunction() + +# %% +problem.getProbability() + +# %% +# Create the Monte-Carlo algorithm +algoProb = ot.ProbabilitySimulationAlgorithm(event) +algoProb.setMaximumOuterSampling(1000) +algoProb.setMaximumCoefficientOfVariation(0.01) +algoProb.run() + +# %% +# Get the results +resultAlgo = algoProb.getResult() +neval = g.getEvaluationCallsNumber() +print("Number of function calls = %d" % (neval)) +pf = resultAlgo.getProbabilityEstimate() +print("Failure Probability = %.4f" % (pf)) +level = 0.95 +c95 = resultAlgo.getConfidenceLength(level) +pmin = pf - 0.5 * c95 +pmax = pf + 0.5 * c95 +print("%.1f %% confidence interval :[%.4f,%.4f] " % (level * 100, pmin, pmax)) + +# %% +# Compute the bounds of the domain +# -------------------------------- + +# %% +inputVector = event.getAntecedent() +distribution = inputVector.getDistribution() +X1 = distribution.getMarginal(0) +X2 = distribution.getMarginal(1) +alphaMin = 0.00001 +alphaMax = 1 - alphaMin +lowerBound = ot.Point( + [X1.computeQuantile(alphaMin)[0], X2.computeQuantile(alphaMin)[0]] +) +upperBound = ot.Point( + [X1.computeQuantile(alphaMax)[0], X2.computeQuantile(alphaMax)[0]] +) + +# %% +nbPoints = [100, 100] +figure = g.draw(lowerBound, upperBound, nbPoints) +figure.setTitle(" Iso-values of limit state function") +figure + +# %% +# Print the iso-values of the distribution +# ---------------------------------------- + +# %% +_ = otv.View(distribution.drawPDF()) + +# %% +sampleSize = 5000 +drawEvent = otb.DrawEvent(event) + +# %% +cloud = drawEvent.drawSampleCrossCut(sampleSize) +_ = otv.View(cloud) + +# %% +# Draw the limit state surface +# ---------------------------- + +# %% +bounds = ot.Interval(lowerBound, upperBound) + +# %% +graph = drawEvent.drawLimitStateCrossCut(bounds) +graph.add(cloud) +graph + + +# %% +domain = drawEvent.fillEventCrossCut(bounds) +_ = otv.View(domain) + +# %% +domain.add(cloud) +_ = otv.View(domain) + +# %% +otv.View.ShowAll() diff --git a/otbenchmark/master/_downloads/8913ec89943b0659c1ae0097203f49c7/plot_compute_reference_rp55_pf.zip b/otbenchmark/master/_downloads/8913ec89943b0659c1ae0097203f49c7/plot_compute_reference_rp55_pf.zip new file mode 100644 index 00000000000..bf3f46a6a3c Binary files /dev/null and b/otbenchmark/master/_downloads/8913ec89943b0659c1ae0097203f49c7/plot_compute_reference_rp55_pf.zip differ diff --git a/otbenchmark/master/_downloads/8ae7a687d57e744b373533a12150bbe4/plot_four_branch_serial_system_waarts.zip b/otbenchmark/master/_downloads/8ae7a687d57e744b373533a12150bbe4/plot_four_branch_serial_system_waarts.zip new file mode 100644 index 00000000000..5b37478cfcb Binary files /dev/null and b/otbenchmark/master/_downloads/8ae7a687d57e744b373533a12150bbe4/plot_four_branch_serial_system_waarts.zip differ diff --git a/otbenchmark/master/_downloads/919d5c34833f060a914b578a7d4532cf/plot_reliability_benchmark_table.zip b/otbenchmark/master/_downloads/919d5c34833f060a914b578a7d4532cf/plot_reliability_benchmark_table.zip new file mode 100644 index 00000000000..1b8130c3041 Binary files /dev/null and b/otbenchmark/master/_downloads/919d5c34833f060a914b578a7d4532cf/plot_reliability_benchmark_table.zip differ diff --git a/otbenchmark/master/_downloads/91f30700716a0dd0a964e349dc44e117/plot_borgonovo_sensitivity.zip b/otbenchmark/master/_downloads/91f30700716a0dd0a964e349dc44e117/plot_borgonovo_sensitivity.zip index 7fed79469eb..c110269dec6 100644 Binary files a/otbenchmark/master/_downloads/91f30700716a0dd0a964e349dc44e117/plot_borgonovo_sensitivity.zip and b/otbenchmark/master/_downloads/91f30700716a0dd0a964e349dc44e117/plot_borgonovo_sensitivity.zip differ diff --git a/otbenchmark/master/_downloads/966aab35daf3bdeee31dc59712af12c7/plot_benchmark_sensitivity_methods.zip b/otbenchmark/master/_downloads/966aab35daf3bdeee31dc59712af12c7/plot_benchmark_sensitivity_methods.zip index 13967f29149..10eb8a162d9 100644 Binary files a/otbenchmark/master/_downloads/966aab35daf3bdeee31dc59712af12c7/plot_benchmark_sensitivity_methods.zip and b/otbenchmark/master/_downloads/966aab35daf3bdeee31dc59712af12c7/plot_benchmark_sensitivity_methods.zip differ diff --git a/otbenchmark/master/_downloads/978bfcc2a9ccf5ee5332e5f49dc6a141/plot_sensitivity_distribution_ishigami.zip b/otbenchmark/master/_downloads/978bfcc2a9ccf5ee5332e5f49dc6a141/plot_sensitivity_distribution_ishigami.zip new file mode 100644 index 00000000000..a58ba4ebfbd Binary files /dev/null and b/otbenchmark/master/_downloads/978bfcc2a9ccf5ee5332e5f49dc6a141/plot_sensitivity_distribution_ishigami.zip differ diff --git a/otbenchmark/master/_downloads/9aafdbfee23b48eed34e7b7fb324d32a/plot_gaussian_product_sensitivity.zip b/otbenchmark/master/_downloads/9aafdbfee23b48eed34e7b7fb324d32a/plot_gaussian_product_sensitivity.zip index bec7644e012..c82b475d680 100644 Binary files a/otbenchmark/master/_downloads/9aafdbfee23b48eed34e7b7fb324d32a/plot_gaussian_product_sensitivity.zip and b/otbenchmark/master/_downloads/9aafdbfee23b48eed34e7b7fb324d32a/plot_gaussian_product_sensitivity.zip differ diff --git a/otbenchmark/master/_downloads/9d2407fb1198b3186740d02d8b228f2c/plot_rp28.zip b/otbenchmark/master/_downloads/9d2407fb1198b3186740d02d8b228f2c/plot_rp28.zip new file mode 100644 index 00000000000..b283a96e6f5 Binary files /dev/null and b/otbenchmark/master/_downloads/9d2407fb1198b3186740d02d8b228f2c/plot_rp28.zip differ diff --git a/otbenchmark/master/_downloads/a75cbc7428088e7c93475b86c366016b/plot_rp35.ipynb b/otbenchmark/master/_downloads/a75cbc7428088e7c93475b86c366016b/plot_rp35.ipynb new file mode 100644 index 00000000000..4147d10920b --- /dev/null +++ b/otbenchmark/master/_downloads/a75cbc7428088e7c93475b86c366016b/plot_rp35.ipynb @@ -0,0 +1,250 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# RP35 analysis and 2D graphics\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The objective of this example is to present problem 35 of the BBRC.\nWe also present graphic elements for the visualization of the limit state surface in 2 dimensions.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import openturns as ot\nimport openturns.viewer as otv\nimport otbenchmark as otb" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "problem = otb.ReliabilityProblem35()\nprint(problem)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "event = problem.getEvent()\ng = event.getFunction()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "problem.getProbability()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Create the Monte-Carlo algorithm\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "algoProb = ot.ProbabilitySimulationAlgorithm(event)\nalgoProb.setMaximumOuterSampling(1000)\nalgoProb.setMaximumCoefficientOfVariation(0.01)\nalgoProb.run()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Get the results\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "resultAlgo = algoProb.getResult()\nneval = g.getEvaluationCallsNumber()\nprint(\"Number of function calls = %d\" % (neval))\npf = resultAlgo.getProbabilityEstimate()\nprint(\"Failure Probability = %.4f\" % (pf))\nlevel = 0.95\nc95 = resultAlgo.getConfidenceLength(level)\npmin = pf - 0.5 * c95\npmax = pf + 0.5 * c95\nprint(\"%.1f %% confidence interval :[%.4f,%.4f] \" % (level * 100, pmin, pmax))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Compute the bounds of the domain\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "inputVector = event.getAntecedent()\ndistribution = inputVector.getDistribution()\nX1 = distribution.getMarginal(0)\nX2 = distribution.getMarginal(1)\nalphaMin = 0.00001\nalphaMax = 1 - alphaMin\nlowerBound = ot.Point(\n [X1.computeQuantile(alphaMin)[0], X2.computeQuantile(alphaMin)[0]]\n)\nupperBound = ot.Point(\n [X1.computeQuantile(alphaMax)[0], X2.computeQuantile(alphaMax)[0]]\n)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "nbPoints = [100, 100]\nfigure = g.draw(lowerBound, upperBound, nbPoints)\nfigure.setTitle(\" Iso-values of limit state function\")\nfigure" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Print the iso-values of the distribution\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "_ = otv.View(distribution.drawPDF())" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "sampleSize = 10000\ndrawEvent = otb.DrawEvent(event)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "cloud = drawEvent.drawSampleCrossCut(sampleSize)\n_ = otv.View(cloud)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Draw the limit state surface\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "bounds = ot.Interval(lowerBound, upperBound)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "graph = drawEvent.drawLimitStateCrossCut(bounds)\ngraph.add(cloud)\ngraph" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "domain = drawEvent.fillEventCrossCut(bounds)\n_ = otv.View(domain)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "domain.add(cloud)\n_ = otv.View(domain)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "otv.View.ShowAll()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.20" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/otbenchmark/master/_downloads/a8435e4347336657854986c960fa1561/plot_rp55.py b/otbenchmark/master/_downloads/a8435e4347336657854986c960fa1561/plot_rp55.py new file mode 100644 index 00000000000..9a09c1cccc9 --- /dev/null +++ b/otbenchmark/master/_downloads/a8435e4347336657854986c960fa1561/plot_rp55.py @@ -0,0 +1,180 @@ +""" +RP55 analysis and 2D graphics +============================= +""" + +# %% +# The objective of this example is to present problem 55 of the BBRC. +# We also present graphic elements for the visualization of the limit state surface in 2 dimensions. +# +# The dimension is equal to 2 and the probability is close to $10^{-2}$. +# This makes this problem relatively easy to solve. +# The distribution is uniform in the square $[-1,1]^2$. +# The failure domain is made of 5 diagonal bands. +# Capturing these bands is relatively easy and a Monte-Carlo simulation perform well in this case. +# The FORM method cannot perform correctly, since the failure domain cannot be linearized in the gaussian space. +# Hence, the SORM or FORM-IS methods do not perform satisfactorily. + +# %% +import openturns as ot +import otbenchmark as otb +import openturns.viewer as otv + +# %% +# Disable warnings +ot.Log.Show(ot.Log.NONE) + +# %% +problem = otb.ReliabilityProblem55() +print(problem) + +# %% +event = problem.getEvent() +g = event.getFunction() + +# %% +problem.getProbability() + +# %% +# Compute the bounds of the domain +# -------------------------------- + +# %% +inputVector = event.getAntecedent() +distribution = inputVector.getDistribution() +X1 = distribution.getMarginal(0) +X2 = distribution.getMarginal(1) +alphaMin = 0.00001 +alphaMax = 1 - alphaMin +lowerBound = ot.Point( + [X1.computeQuantile(alphaMin)[0], X2.computeQuantile(alphaMin)[0]] +) +upperBound = ot.Point( + [X1.computeQuantile(alphaMax)[0], X2.computeQuantile(alphaMax)[0]] +) + + +# %% +nbPoints = [100, 100] +figure = g.draw(lowerBound, upperBound, nbPoints) +figure.setTitle(" Iso-values of limit state function") +figure + +# %% +# Print the iso-values of the distribution +# ---------------------------------------- + +# %% +_ = otv.View(distribution.drawPDF()) + + +# %% +sampleSize = 5000 +sampleInput = inputVector.getSample(sampleSize) +sampleOutput = g(sampleInput) +drawEvent = otb.DrawEvent(event) + + +# %% +cloud = drawEvent.drawSampleCrossCut(sampleSize) +cloud + +# %% +# ## Draw the limit state surface + +# %% +bounds = ot.Interval(lowerBound, upperBound) +bounds + + +# %% +graph = drawEvent.drawLimitStateCrossCut(bounds) +graph.add(cloud) +graph + + +# %% +domain = drawEvent.fillEventCrossCut(bounds) +_ = otv.View(domain) + + +# %% +domain.add(cloud) +_ = otv.View(domain) + +# %% +# Perform Monte-Carlo simulation +# ------------------------------ + +# %% +algoProb = ot.ProbabilitySimulationAlgorithm(event) +algoProb.setMaximumOuterSampling(1000) +algoProb.setMaximumCoefficientOfVariation(0.01) +algoProb.run() + + +# %% +resultAlgo = algoProb.getResult() +neval = g.getEvaluationCallsNumber() +print("Number of function calls = %d" % (neval)) +pf = resultAlgo.getProbabilityEstimate() +print("Failure Probability = %.4f" % (pf)) +level = 0.95 +c95 = resultAlgo.getConfidenceLength(level) +pmin = pf - 0.5 * c95 +pmax = pf + 0.5 * c95 +print("%.1f %% confidence interval :[%.4f,%.4f] " % (level * 100, pmin, pmax)) + +# %% +# With FORM-IS +# ------------ + +# %% +maximumEvaluationNumber = 1000 +maximumAbsoluteError = 1.0e-3 +maximumRelativeError = 1.0e-3 +maximumResidualError = 1.0e-3 +maximumConstraintError = 1.0e-3 +nearestPointAlgorithm = ot.AbdoRackwitz() +nearestPointAlgorithm.setMaximumCallsNumber(maximumEvaluationNumber) +nearestPointAlgorithm.setMaximumAbsoluteError(maximumAbsoluteError) +nearestPointAlgorithm.setMaximumRelativeError(maximumRelativeError) +nearestPointAlgorithm.setMaximumResidualError(maximumResidualError) +nearestPointAlgorithm.setMaximumConstraintError(maximumConstraintError) + + +# %% +metaAlgorithm = otb.ReliabilityBenchmarkMetaAlgorithm(problem) +benchmarkResult = metaAlgorithm.runFORMImportanceSampling( + nearestPointAlgorithm, maximumOuterSampling=10 ** 5, coefficientOfVariation=0.0 +) + + +# %% +print(benchmarkResult.summary()) + +# %% +# With Quasi-Monte-Carlo +# ---------------------- + +# %% +sequence = ot.SobolSequence() +experiment = ot.LowDiscrepancyExperiment(sequence, 1) +experiment.setRandomize(False) + + +# %% +algo = ot.ProbabilitySimulationAlgorithm(event, experiment) +algo.setMaximumOuterSampling(10 ** 3) +algo.setMaximumCoefficientOfVariation(0.0) +algo.setBlockSize(10 ** 3) +algo.run() + + +# %% +result = algo.getResult() +probability = result.getProbabilityEstimate() +print("Pf=", probability) + +# %% +otv.View.ShowAll() diff --git a/otbenchmark/master/_downloads/af55ea58745bf35d33f4dd8de7e4ff4a/plot_compute_reference_rp55_pf.ipynb b/otbenchmark/master/_downloads/af55ea58745bf35d33f4dd8de7e4ff4a/plot_compute_reference_rp55_pf.ipynb new file mode 100644 index 00000000000..d7e73b6ecd1 --- /dev/null +++ b/otbenchmark/master/_downloads/af55ea58745bf35d33f4dd8de7e4ff4a/plot_compute_reference_rp55_pf.ipynb @@ -0,0 +1,626 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Compute reference probability for RP55\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The goal of this example is to present how we computed the reference probability for problem 55 of the BBRC.\nThis calculation is based on the geometry of the failure domain.\nIn order to compute its surface, we use the `shapely` module,\nwhich allows to compute the surface of bidimensional polygons.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import openturns as ot\nimport openturns.viewer as otv\nimport numpy as np\nimport otbenchmark as otb\nfrom shapely.geometry import Polygon" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "problem = otb.ReliabilityProblem55()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "event = problem.getEvent()\ng = event.getFunction()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "problem.getProbability()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Compute the bounds of the domain\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "inputVector = event.getAntecedent()\ndistribution = inputVector.getDistribution()\nX1 = distribution.getMarginal(0)\nX2 = distribution.getMarginal(1)\nalphaMin = 0.00001\nalphaMax = 1 - alphaMin\nlowerBound = ot.Point(\n [X1.computeQuantile(alphaMin)[0], X2.computeQuantile(alphaMin)[0]]\n)\nupperBound = ot.Point(\n [X1.computeQuantile(alphaMax)[0], X2.computeQuantile(alphaMax)[0]]\n)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Print the iso-values of the distribution\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "sampleSize = 5000\nsampleInput = inputVector.getSample(sampleSize)\nsampleOutput = g(sampleInput)\ndrawEvent = otb.DrawEvent(event)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "cloud = drawEvent.drawSampleCrossCut(sampleSize)\n_ = otv.View(cloud)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Draw the limit state surface\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "bounds = ot.Interval(lowerBound, upperBound)\nbounds" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "domain = drawEvent.fillEventCrossCut(bounds)\n_ = otv.View(domain)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## From integration\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "interval = ot.Interval([-1.0, -1.0], [1.0, 1.0])\ninterval" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "threshold = event.getThreshold()\nthreshold" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mean = distribution.getMean()\nmean" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "def ComputeIntegrandPoint(x):\n \"\"\"Evaluate the integrand on one single point.\"\"\"\n y = g(x)\n if y[0] < threshold:\n indicator = 1.0\n else:\n indicator = 0.0\n pdf = distribution.computePDF(x)\n z = [indicator * pdf]\n return z\n\n\nintegrand = ot.PythonFunction(2, 1, ComputeIntegrandPoint)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "integrand(mean)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "dimension = distribution.getDimension()\ntotalNumberOfPoints = 10 ** 4\nnumberOfPointsInX = int(totalNumberOfPoints ** (1.0 / dimension))\nnumberOfPointsInX" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "algoGL = ot.GaussLegendre([numberOfPointsInX] * dimension)\nvalue = algoGL.integrate(integrand, interval)\nvalue" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "def ComputeIntegrandSample(sample):\n \"\"\"Evaluate the integrand on a sample.\"\"\"\n indicatorBoolean = np.array(g(sample)) < threshold\n indicator = np.array(indicatorBoolean, float)\n pdf = np.array(distribution.computePDF(sample))\n z = indicator * pdf\n return z" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "integrandSample = ot.PythonFunction(2, 1, func_sample=ComputeIntegrandSample)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "sample = distribution.getSample(5)\nintegrandSample(sample)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "integrandSample(mean)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "dimension = distribution.getDimension()\ntotalNumberOfPoints = 10 ** 6\nnumberOfPointsInX = int(totalNumberOfPoints ** (1.0 / dimension))\nnumberOfPointsInX" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "discretization = [numberOfPointsInX] * dimension\nalgoGL = ot.GaussLegendre(discretization)\nvalue = algoGL.integrate(integrandSample, interval)\nvalue" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Exact computation\n\nWe solve the exact equation:\n\nhttps://www.wolframalpha.com/input/?i=solve+min%280.2+%2B+0.6+*+%28x+-+y%29%5E4+-+%28x+-+y%29+%2F+sqrt%282%29%2C+0.2+%2B+0.6+*+%28x+-+y%29%5E4+%2B+%28x+-+y%29+%2F+sqrt%282%29%2C+%28x+-+y%29+%2B+5+%2F+sqrt%282%29+-+2.2%2C+%28y+-+x%29+%2B+5+%2F+sqrt%282%29+-+2.2%29+%3D+0\n\n```\nsolve (x - y) + 5 / sqrt(2) - 22/10 = 0\nsolve 2/10 + 6/10 * d^4 - d / sqrt(2)\n```\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "domain = drawEvent.fillEventCrossCut(bounds)\n_ = otv.View(domain)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "We first compute the exact equations defining the slanted lines at the limit state.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "palette = [\n \"dodgerblue3\",\n \"darkorange1\",\n \"forestgreen\",\n \"firebrick3\",\n \"mediumpurple3\",\n \"lightsalmon4\",\n \"orchid\",\n \"gray50\",\n \"goldenrod3\",\n \"turquoise3\",\n]" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The goal is to define the failure domain.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "root1 = 5.0 / np.sqrt(2.0) - 2.2\nroot1" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "root2 = 0.2887406174573670970\nroot2" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "root3 = 0.9370483776955247344172976\nroot3" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "root2 = 0.2887406174573670970\nf1full = ot.SymbolicFunction([\"x\", \"root2\"], [\"x-root2\"])\nf1 = ot.ParametricFunction(f1full, [1], [root2])\ngraph1 = f1.draw(root2 - 1.0, 1.0, 100)\ngraph1.setColors([palette[0]])\ngraph1.setLegends([\"f1\"])" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "f2full = ot.SymbolicFunction([\"x\", \"root3\"], [\"x-root3\"])\nf2 = ot.ParametricFunction(f2full, [1], [root3])\ngraph2 = f2.draw(root3 - 1.0, 1.0, 100)\ngraph2.setColors([palette[1]])\ngraph2.setLegends([\"f2\"])" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "f3full = ot.SymbolicFunction([\"x\", \"root1\"], [\"x-root1\"])\nf3 = ot.ParametricFunction(f3full, [1], [root1])\ngraph3 = f3.draw(root1 - 1.0, 1.0, 100)\ngraph3.setColors([palette[2]])\ngraph3.setLegends([\"f3\"])" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "f4full = ot.SymbolicFunction([\"x\", \"root2\"], [\"x+root2\"])\nf4 = ot.ParametricFunction(f4full, [1], [root2])\ngraph4 = f4.draw(-1.0, 1.0 - root2, 100)\ngraph4.setColors([palette[3]])\ngraph4.setLegends([\"f4\"])" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "f5full = ot.SymbolicFunction([\"x\", \"root3\"], [\"x+root3\"])\nf5 = ot.ParametricFunction(f5full, [1], [root3])\ngraph5 = f5.draw(-1.0, 1.0 - root3, 100)\ngraph5.setColors([palette[4]])\ngraph5.setLegends([\"f5\"])" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "f6full = ot.SymbolicFunction([\"x\", \"root1\"], [\"x+root1\"])\nf6 = ot.ParametricFunction(f6full, [1], [root1])\ngraph6 = f6.draw(-1.0, 1.0 - root1, 100)\ngraph6.setColors([palette[5]])\ngraph6.setLegends([\"f6\"])" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "domain.add(graph1)\ndomain.add(graph2)\ndomain.add(graph3)\ndomain.add(graph4)\ndomain.add(graph5)\ndomain.add(graph6)\n_ = otv.View(domain)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Then we set the corners of the polygons in the failure domain.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "data = [\n [-1.0, 1.0],\n [1.0, f1([1.0])[0]],\n [1.0, f2([1.0])[0]],\n [1.0, f3([1.0])[0]],\n [-1.0, f4([-1.0])[0]],\n [-1.0, f5([-1.0])[0]],\n [-1.0, f6([-1.0])[0]],\n [root1 - 1.0, -1.0],\n [root2 - 1.0, -1.0],\n [root3 - 1.0, -1.0],\n [1.0 - root1, 1.0],\n [1.0 - root2, 1.0],\n [1.0 - root3, 1.0],\n [1.0, -1.0],\n]\nsample = ot.Sample(data)\nsample" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "cloud = ot.Cloud(sample)\ndomain.add(cloud)\nextendedBounds = ot.Interval([-1.5, -1.5], [2.0, 2.0])\ndomain.setBoundingBox(extendedBounds)\ndomain" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "In order to identify these points, we add the legends as text in the plot.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "texts = [\"p\" + str(i) for i in range(sample.getSize())]\ntexts" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "text = ot.Text(sample, texts)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "domain.add(text)\ndomain" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The probability is the ratio between the failure domain and the domain itself.\nThe area of the domain is $2^2$.\nThe area of each polygon is computed based on the shapely module.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "corners = np.array([sample[i] for i in [0, 6, 10]])\ncorners" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "polygon = Polygon(corners)\narea1 = polygon.area\narea1" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "corners = np.array([sample[i] for i in [4, 11, 12, 5]])\ncorners\npolygon = Polygon(corners)\narea2 = polygon.area\narea2" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "corners = np.array([sample[i] for i in [8, 9, 2, 1]])\ncorners\npolygon = Polygon(corners)\narea3 = polygon.area\narea3" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "corners = np.array([sample[i] for i in [7, 13, 3]])\ncorners\npolygon = Polygon(corners)\narea4 = polygon.area\narea4" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "pf = (area1 + area2 + area3 + area4) / 2.0 ** 2\npf" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "print(\"pf=%.17e\" % (pf))" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "otv.View.ShowAll()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.20" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/otbenchmark/master/_downloads/ba720b6b316a0c59544950e9ab67c9dd/plot_rp75.zip b/otbenchmark/master/_downloads/ba720b6b316a0c59544950e9ab67c9dd/plot_rp75.zip new file mode 100644 index 00000000000..efa3f996872 Binary files /dev/null and b/otbenchmark/master/_downloads/ba720b6b316a0c59544950e9ab67c9dd/plot_rp75.zip differ diff --git a/otbenchmark/master/_downloads/bae0881354e6ddf770d072500bcad9f6/plot_rp31.ipynb b/otbenchmark/master/_downloads/bae0881354e6ddf770d072500bcad9f6/plot_rp31.ipynb new file mode 100644 index 00000000000..2931043306a --- /dev/null +++ b/otbenchmark/master/_downloads/bae0881354e6ddf770d072500bcad9f6/plot_rp31.ipynb @@ -0,0 +1,250 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# RP31 analysis and 2D graphics\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The objective of this example is to present problem 31 of the BBRC.\nWe also present graphic elements for the visualization of the limit state surface in 2 dimensions.\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import openturns as ot\nimport openturns.viewer as otv\nimport otbenchmark as otb" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "problem = otb.ReliabilityProblem31()\nprint(problem)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "event = problem.getEvent()\ng = event.getFunction()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "problem.getProbability()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Create the Monte-Carlo algorithm\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "algoProb = ot.ProbabilitySimulationAlgorithm(event)\nalgoProb.setMaximumOuterSampling(1000)\nalgoProb.setMaximumCoefficientOfVariation(0.01)\nalgoProb.run()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Get the results\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "resultAlgo = algoProb.getResult()\nneval = g.getEvaluationCallsNumber()\nprint(\"Number of function calls = %d\" % (neval))\npf = resultAlgo.getProbabilityEstimate()\nprint(\"Failure Probability = %.4f\" % (pf))\nlevel = 0.95\nc95 = resultAlgo.getConfidenceLength(level)\npmin = pf - 0.5 * c95\npmax = pf + 0.5 * c95\nprint(\"%.1f %% confidence interval :[%.4f,%.4f] \" % (level * 100, pmin, pmax))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Compute the bounds of the domain\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "inputVector = event.getAntecedent()\ndistribution = inputVector.getDistribution()\nX1 = distribution.getMarginal(0)\nX2 = distribution.getMarginal(1)\nalphaMin = 0.00001\nalphaMax = 1 - alphaMin\nlowerBound = ot.Point(\n [X1.computeQuantile(alphaMin)[0], X2.computeQuantile(alphaMin)[0]]\n)\nupperBound = ot.Point(\n [X1.computeQuantile(alphaMax)[0], X2.computeQuantile(alphaMax)[0]]\n)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "nbPoints = [100, 100]\ngraph = g.draw(lowerBound, upperBound, nbPoints)\ngraph.setTitle(\" Iso-values of limit state function\")\n_ = otv.View(graph)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Plot the iso-values of the distribution\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "_ = otv.View(distribution.drawPDF())" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "sampleSize = 10000\ndrawEvent = otb.DrawEvent(event)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "cloud = drawEvent.drawSampleCrossCut(sampleSize)\n_ = otv.View(cloud)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Draw the limit state surface\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "bounds = ot.Interval(lowerBound, upperBound)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "graph = drawEvent.drawLimitStateCrossCut(bounds)\ngraph.add(cloud)\ngraph" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "domain = drawEvent.fillEventCrossCut(bounds)\n_ = otv.View(domain)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "domain.add(cloud)\n_ = otv.View(domain)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "otv.View.ShowAll()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.20" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/otbenchmark/master/_downloads/c6c993e0e01873a6ba6c365bffae93ed/plot_reliability_compute_reference_proba.zip b/otbenchmark/master/_downloads/c6c993e0e01873a6ba6c365bffae93ed/plot_reliability_compute_reference_proba.zip new file mode 100644 index 00000000000..bee4be236ba Binary files /dev/null and b/otbenchmark/master/_downloads/c6c993e0e01873a6ba6c365bffae93ed/plot_reliability_compute_reference_proba.zip differ diff --git a/otbenchmark/master/_downloads/c8954246dda94be438bdcbf15a6c1ca4/plot_rp111.py b/otbenchmark/master/_downloads/c8954246dda94be438bdcbf15a6c1ca4/plot_rp111.py new file mode 100644 index 00000000000..f7d55899f68 --- /dev/null +++ b/otbenchmark/master/_downloads/c8954246dda94be438bdcbf15a6c1ca4/plot_rp111.py @@ -0,0 +1,99 @@ +""" +RP111 analysis and 2D graphics +============================== +""" + +# %% +# The objective of this example is to present problem 111 of the BBRC. +# We also present graphic elements for the visualization of the limit state surface in 2 dimensions. + +# %% +import openturns as ot +import openturns.viewer as otv +import otbenchmark as otb + +# %% +problem = otb.ReliabilityProblem111() +print(problem) + +# %% +event = problem.getEvent() +g = event.getFunction() + +# %% +problem.getProbability() + +# %% +# Create the Monte-Carlo algorithm +algoProb = ot.ProbabilitySimulationAlgorithm(event) +algoProb.setMaximumOuterSampling(1000) +algoProb.setMaximumCoefficientOfVariation(0.01) +algoProb.run() + +# %% +# Get the results +resultAlgo = algoProb.getResult() +neval = g.getEvaluationCallsNumber() +print("Number of function calls = %d" % (neval)) +pf = resultAlgo.getProbabilityEstimate() +print("Failure Probability = %.4f" % (pf)) +level = 0.95 +c95 = resultAlgo.getConfidenceLength(level) +pmin = pf - 0.5 * c95 +pmax = pf + 0.5 * c95 +print("%.1f %% confidence interval :[%.4f,%.4f] " % (level * 100, pmin, pmax)) + +# %% +# Compute the bounds of the domain +inputVector = event.getAntecedent() +distribution = inputVector.getDistribution() +X1 = distribution.getMarginal(0) +X2 = distribution.getMarginal(1) +alphaMin = 0.00001 +alphaMax = 1 - alphaMin +lowerBound = ot.Point( + [X1.computeQuantile(alphaMin)[0], X2.computeQuantile(alphaMin)[0]] +) +upperBound = ot.Point( + [X1.computeQuantile(alphaMax)[0], X2.computeQuantile(alphaMax)[0]] +) + +# %% +nbPoints = [100, 100] +figure = g.draw(lowerBound, upperBound, nbPoints) +figure.setTitle(" Iso-values of limit state function") +figure + +# %% +_ = otv.View(distribution.drawPDF()) + +# %% +sampleSize = 100000 +drawEvent = otb.DrawEvent(event) + +# %% +cloud = drawEvent.drawSampleCrossCut(sampleSize) +_ = otv.View(cloud) + +# %% +# Draw the limit state surface +# ---------------------------- + +# %% +bounds = ot.Interval(lowerBound, upperBound) + +# %% +graph = drawEvent.drawLimitStateCrossCut(bounds) +graph.add(cloud) +graph + +# %% +domain = drawEvent.fillEventCrossCut(bounds) +_ = otv.View(domain) + +# %% +domain.add(cloud) +_ = otv.View(domain) + +# %% +otv.View.ShowAll() diff --git a/otbenchmark/master/_downloads/cfc43f7941610c81e2f20b769e3f800c/plot_four_branch_serial_system_waarts.ipynb b/otbenchmark/master/_downloads/cfc43f7941610c81e2f20b769e3f800c/plot_four_branch_serial_system_waarts.ipynb new file mode 100644 index 00000000000..76f523d0ef5 --- /dev/null +++ b/otbenchmark/master/_downloads/cfc43f7941610c81e2f20b769e3f800c/plot_four_branch_serial_system_waarts.ipynb @@ -0,0 +1,192 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Using the Waarts four-branch serial system\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## References\n\n* Waarts, P.-H. (2000). Structural reliability using finite element\n methods: an appraisal of DARS: Directional Adaptive Response Surface\n Sampling. Ph. D. thesis, Technical University of Delft, The Netherlands.\n Pages 58, 69, 160.\n\n* Th\u00e8se Vincent Dubourg 2011, M\u00e9ta-mod\u00e8les adaptatifs pour l\u2019analyse\n de fiabilit\u00e9 et l\u2019optimisation sous contrainte fiabiliste,\n section \"A two-dimensional four-branch serial system\", page 182\n\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import openturns as ot\nimport openturns.viewer as otv\nimport otbenchmark as otb" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "problem = otb.FourBranchSerialSystemReliability()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "event = problem.getEvent()\ng = event.getFunction()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "inputVector = event.getAntecedent()\ndistribution = inputVector.getDistribution()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Draw isolines\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "lowerBound = ot.Point([-5.0, -5.0])\nupperBound = ot.Point([5.0, 5.0])\nnbPoints = [100, 100]\n_ = otv.View(g.draw(lowerBound, upperBound, nbPoints))" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "sampleSize = 500" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "drawEvent = otb.DrawEvent(event)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "cloud = drawEvent.drawSampleCrossCut(sampleSize)\n_ = otv.View(cloud)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Draw the limit state surface\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "bounds = ot.Interval(lowerBound, upperBound)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "graph = drawEvent.drawLimitStateCrossCut(bounds)\ngraph.add(cloud)\ngraph" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Fill the event domain with a color\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "_ = otv.View(drawEvent.fillEventCrossCut(bounds))" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "otv.View.ShowAll()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.20" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/otbenchmark/master/_downloads/d19761791a5181cb7f9f7d5d9d35dee3/plot_print_reliability_benchmark.py b/otbenchmark/master/_downloads/d19761791a5181cb7f9f7d5d9d35dee3/plot_print_reliability_benchmark.py new file mode 100644 index 00000000000..f12d0705902 --- /dev/null +++ b/otbenchmark/master/_downloads/d19761791a5181cb7f9f7d5d9d35dee3/plot_print_reliability_benchmark.py @@ -0,0 +1,44 @@ +""" +Print a reliability benchmark problem +===================================== +""" + +# %% +import otbenchmark as otb + +# %% +problem = otb.RminusSReliability() +print(problem) + +# %% +print(problem.toFullString()) + +# %% +problem.getName() + +# %% +event = problem.getEvent() + +# %% +g = event.getFunction() +g + +# %% +event.getOperator() + +# %% +threshold = event.getThreshold() +threshold + +# %% +pf = problem.getProbability() +pf + +# %% +beta = problem.computeBeta() +beta + +# %% +inputVector = event.getAntecedent() +distribution = inputVector.getDistribution() +distribution diff --git a/otbenchmark/master/_downloads/d54ce2324b0b413ac3dffc378d3ed7a8/plot_methodFactory.zip b/otbenchmark/master/_downloads/d54ce2324b0b413ac3dffc378d3ed7a8/plot_methodFactory.zip index 3b6ae6531c8..10b55234da1 100644 Binary files a/otbenchmark/master/_downloads/d54ce2324b0b413ac3dffc378d3ed7a8/plot_methodFactory.zip and b/otbenchmark/master/_downloads/d54ce2324b0b413ac3dffc378d3ed7a8/plot_methodFactory.zip differ diff --git a/otbenchmark/master/_downloads/d7037057d5e03c98cd1142b69d0d0599/plot_rp24.zip b/otbenchmark/master/_downloads/d7037057d5e03c98cd1142b69d0d0599/plot_rp24.zip new file mode 100644 index 00000000000..d847d651c4d Binary files /dev/null and b/otbenchmark/master/_downloads/d7037057d5e03c98cd1142b69d0d0599/plot_rp24.zip differ diff --git a/otbenchmark/master/_downloads/d9dfc16b3d96174b2c9ade5a59a2239c/plot_ConditionalDistribution_Demo.zip b/otbenchmark/master/_downloads/d9dfc16b3d96174b2c9ade5a59a2239c/plot_ConditionalDistribution_Demo.zip index d8df74f36ca..4d72438a3c7 100644 Binary files a/otbenchmark/master/_downloads/d9dfc16b3d96174b2c9ade5a59a2239c/plot_ConditionalDistribution_Demo.zip and b/otbenchmark/master/_downloads/d9dfc16b3d96174b2c9ade5a59a2239c/plot_ConditionalDistribution_Demo.zip differ diff --git a/otbenchmark/master/_downloads/da8d34383ff6cd241cf76b1846e01fd9/plot_rp89.py b/otbenchmark/master/_downloads/da8d34383ff6cd241cf76b1846e01fd9/plot_rp89.py new file mode 100644 index 00000000000..84625145880 --- /dev/null +++ b/otbenchmark/master/_downloads/da8d34383ff6cd241cf76b1846e01fd9/plot_rp89.py @@ -0,0 +1,106 @@ +""" +RP89 analysis and 2D graphics +============================= +""" + +# %% +# The objective of this example is to present problem 89 of the BBRC. +# We also present graphic elements for the visualization of the limit state surface in 2 dimensions. + +# %% +import openturns as ot +import openturns.viewer as otv +import otbenchmark as otb + +# %% +problem = otb.ReliabilityProblem89() +print(problem) + +# %% +event = problem.getEvent() +g = event.getFunction() + +# %% +problem.getProbability() + +# %% +# Create the Monte-Carlo algorithm +algoProb = ot.ProbabilitySimulationAlgorithm(event) +algoProb.setMaximumOuterSampling(1000) +algoProb.setMaximumCoefficientOfVariation(0.01) +algoProb.run() + +# %% +# Get the results +resultAlgo = algoProb.getResult() +neval = g.getEvaluationCallsNumber() +print("Number of function calls = %d" % (neval)) +pf = resultAlgo.getProbabilityEstimate() +print("Failure Probability = %.4f" % (pf)) +level = 0.95 +c95 = resultAlgo.getConfidenceLength(level) +pmin = pf - 0.5 * c95 +pmax = pf + 0.5 * c95 +print("%.1f %% confidence interval :[%.4f,%.4f] " % (level * 100, pmin, pmax)) + +# %% +# Compute the bounds of the domain +# -------------------------------- + +# %% +inputVector = event.getAntecedent() +distribution = inputVector.getDistribution() +X1 = distribution.getMarginal(0) +X2 = distribution.getMarginal(1) +alphaMin = 0.00001 +alphaMax = 1 - alphaMin +lowerBound = ot.Point( + [X1.computeQuantile(alphaMin)[0], X2.computeQuantile(alphaMin)[0]] +) +upperBound = ot.Point( + [X1.computeQuantile(alphaMax)[0], X2.computeQuantile(alphaMax)[0]] +) + +# %% +nbPoints = [100, 100] +figure = g.draw(lowerBound, upperBound, nbPoints) +figure.setTitle(" Iso-values of limit state function") +figure + +# %% +# Print the iso-values of the distribution +# ---------------------------------------- + +# %% +_ = otv.View(distribution.drawPDF()) + +# %% +sampleSize = 5000 +drawEvent = otb.DrawEvent(event) + +# %% +cloud = drawEvent.drawSampleCrossCut(sampleSize) +_ = otv.View(cloud) + +# %% +# ## Draw the limit state surface + +# %% +bounds = ot.Interval(lowerBound, upperBound) +bounds + +# %% +graph = drawEvent.drawLimitStateCrossCut(bounds) +graph.add(cloud) +graph + +# %% +domain = drawEvent.fillEventCrossCut(bounds) +_ = otv.View(domain) + +# %% +domain.add(cloud) +_ = otv.View(domain) + +# %% +otv.View.ShowAll() diff --git a/otbenchmark/master/_downloads/e1d8881096e5f55a38355b52bcf9c844/plot_four_branch_serial_system_waarts.py b/otbenchmark/master/_downloads/e1d8881096e5f55a38355b52bcf9c844/plot_four_branch_serial_system_waarts.py new file mode 100644 index 00000000000..86dfe58cebd --- /dev/null +++ b/otbenchmark/master/_downloads/e1d8881096e5f55a38355b52bcf9c844/plot_four_branch_serial_system_waarts.py @@ -0,0 +1,71 @@ +""" +Using the Waarts four-branch serial system +========================================== +""" + +# %% +# References +# ---------- +# +# * Waarts, P.-H. (2000). Structural reliability using finite element +# methods: an appraisal of DARS: Directional Adaptive Response Surface +# Sampling. Ph. D. thesis, Technical University of Delft, The Netherlands. +# Pages 58, 69, 160. +# +# * Thèse Vincent Dubourg 2011, Méta-modèles adaptatifs pour l’analyse +# de fiabilité et l’optimisation sous contrainte fiabiliste, +# section "A two-dimensional four-branch serial system", page 182 +# + +# %% +import openturns as ot +import openturns.viewer as otv +import otbenchmark as otb + +# %% +problem = otb.FourBranchSerialSystemReliability() + +# %% +event = problem.getEvent() +g = event.getFunction() + +# %% +inputVector = event.getAntecedent() +distribution = inputVector.getDistribution() + +# %% +# Draw isolines +lowerBound = ot.Point([-5.0, -5.0]) +upperBound = ot.Point([5.0, 5.0]) +nbPoints = [100, 100] +_ = otv.View(g.draw(lowerBound, upperBound, nbPoints)) + + +# %% +sampleSize = 500 + +# %% +drawEvent = otb.DrawEvent(event) + +# %% +cloud = drawEvent.drawSampleCrossCut(sampleSize) +_ = otv.View(cloud) + +# %% +# Draw the limit state surface +# ---------------------------- + +# %% +bounds = ot.Interval(lowerBound, upperBound) + +# %% +graph = drawEvent.drawLimitStateCrossCut(bounds) +graph.add(cloud) +graph + +# %% +# Fill the event domain with a color +_ = otv.View(drawEvent.fillEventCrossCut(bounds)) + +# %% +otv.View.ShowAll() diff --git a/otbenchmark/master/_downloads/e2b15a528a6607cd91fa376cbffc2002/plot_print_problems.zip b/otbenchmark/master/_downloads/e2b15a528a6607cd91fa376cbffc2002/plot_print_problems.zip index 56b4de065f9..c5be2989e6b 100644 Binary files a/otbenchmark/master/_downloads/e2b15a528a6607cd91fa376cbffc2002/plot_print_problems.zip and b/otbenchmark/master/_downloads/e2b15a528a6607cd91fa376cbffc2002/plot_print_problems.zip differ diff --git a/otbenchmark/master/_downloads/e6be8e01cd20ccf3d5e4421802d81703/plot_crosscut_distribution_3d.zip b/otbenchmark/master/_downloads/e6be8e01cd20ccf3d5e4421802d81703/plot_crosscut_distribution_3d.zip index 75c6dd6d4e9..a5f20f5a6eb 100644 Binary files a/otbenchmark/master/_downloads/e6be8e01cd20ccf3d5e4421802d81703/plot_crosscut_distribution_3d.zip and b/otbenchmark/master/_downloads/e6be8e01cd20ccf3d5e4421802d81703/plot_crosscut_distribution_3d.zip differ diff --git a/otbenchmark/master/_downloads/e9685936f0e9649b1b8ff6dcb9f0fc2b/plot_oakleyohagan_sensitivity.zip b/otbenchmark/master/_downloads/e9685936f0e9649b1b8ff6dcb9f0fc2b/plot_oakleyohagan_sensitivity.zip index 9473eb25f68..e6388694ec9 100644 Binary files a/otbenchmark/master/_downloads/e9685936f0e9649b1b8ff6dcb9f0fc2b/plot_oakleyohagan_sensitivity.zip and b/otbenchmark/master/_downloads/e9685936f0e9649b1b8ff6dcb9f0fc2b/plot_oakleyohagan_sensitivity.zip differ diff --git a/otbenchmark/master/_downloads/f226b37da0f2b9c1b0164e0e2ba892af/plot_case_rs.py b/otbenchmark/master/_downloads/f226b37da0f2b9c1b0164e0e2ba892af/plot_case_rs.py new file mode 100644 index 00000000000..61593b28777 --- /dev/null +++ b/otbenchmark/master/_downloads/f226b37da0f2b9c1b0164e0e2ba892af/plot_case_rs.py @@ -0,0 +1,122 @@ +""" +R-S analysis and 2D graphics +============================ +""" + +# %% +# The objective of this example is to present the R-S problem. +# We also present graphic elements for the visualization of the limit state surface in 2 dimensions. + +# %% +import openturns as ot +import openturns.viewer as otv +import otbenchmark as otb + +# %% +problem = otb.RminusSReliability() + + +# %% +event = problem.getEvent() +g = event.getFunction() + + +# %% +problem.getProbability() + +# %% +# Create the Monte-Carlo algorithm +algoProb = ot.ProbabilitySimulationAlgorithm(event) +algoProb.setMaximumOuterSampling(1000) +algoProb.setMaximumCoefficientOfVariation(0.01) +algoProb.run() + + +# %% +# Get the results +resultAlgo = algoProb.getResult() +neval = g.getEvaluationCallsNumber() +print("Number of function calls = %d" % (neval)) +pf = resultAlgo.getProbabilityEstimate() +print("Failure Probability = %.4f" % (pf)) +level = 0.95 +c95 = resultAlgo.getConfidenceLength(level) +pmin = pf - 0.5 * c95 +pmax = pf + 0.5 * c95 +print("%.1f %% confidence interval :[%.4f,%.4f] " % (level * 100, pmin, pmax)) + +# %% +# ## Plot the contours of the function + +# %% +inputVector = event.getAntecedent() +distribution = inputVector.getDistribution() + +# %% +R = distribution.getMarginal(0) +S = distribution.getMarginal(1) + +# %% +alphaMin = 0.001 +alphaMax = 1 - alphaMin +lowerBound = ot.Point([R.computeQuantile(alphaMin)[0], S.computeQuantile(alphaMin)[0]]) +upperBound = ot.Point([R.computeQuantile(alphaMax)[0], S.computeQuantile(alphaMax)[0]]) + +# %% +nbPoints = [100, 100] +_ = otv.View(g.draw(lowerBound, upperBound, nbPoints)) + +# %% +Y = R - S +Y + +# %% +_ = otv.View(Y.drawPDF()) + +# %% +# Print the iso-values of the distribution +# ---------------------------------------- + +# %% +_ = otv.View(distribution.drawPDF()) + +# %% +# ## Visualise the safe and unsafe regions on a sample + +# %% +sampleSize = 500 + +# %% +drawEvent = otb.DrawEvent(event) + +# %% +cloud = drawEvent.drawSampleCrossCut(sampleSize) +cloud + +# %% +# ## Draw the limit state surface + +# %% +bounds = ot.Interval(lowerBound, upperBound) +bounds + + +# %% +graph = drawEvent.drawLimitStateCrossCut(bounds) +graph.add(cloud) +graph + +# %% +# ## Fill the event domain with a color + +# %% +domain = drawEvent.fillEventCrossCut(bounds) +_ = otv.View(domain) + +# %% +domain.setLegends(["", ""]) +domain.add(cloud) +_ = otv.View(domain) + +# %% +otv.View.ShowAll() diff --git a/otbenchmark/master/_downloads/f5b0ee286dad922b045578dc2bef7b06/plot_reliability_compute_reference_proba.py b/otbenchmark/master/_downloads/f5b0ee286dad922b045578dc2bef7b06/plot_reliability_compute_reference_proba.py new file mode 100644 index 00000000000..6a2b7c43f7a --- /dev/null +++ b/otbenchmark/master/_downloads/f5b0ee286dad922b045578dc2bef7b06/plot_reliability_compute_reference_proba.py @@ -0,0 +1,126 @@ +""" +Compute reference probabilities with Monte-Carlo +================================================ +""" + +# %% +# In this example, we perform a reliability benchmark based on a large Monte-Carlo sample. +# In order to limit the elapsed time, we consider a limited elapsed time for each problem. +# In order to get the best possible accuracy within this time limit, we set the coefficient of variation to zero. + +# %% +import otbenchmark as otb +import pandas as pd +import numpy as np +from tqdm import tqdm +import time + + +# %% +problemslist = otb.ReliabilityBenchmarkProblemList() +numberOfProblems = len(problemslist) +numberOfProblems + + +# %% +coefficientOfVariation = 0.0 +maximumOuterSampling = 10 ** 4 # 10 ** 6 for real +blockSize = 10 ** 0 # 10 ** 4 for real simulations +blockSize + +# %% +confidenceLevel = 0.95 +maximumDurationSeconds = 5 * 60.0 + +# %% +totalDurationMinutes = numberOfProblems * maximumDurationSeconds / 60.0 +totalDurationMinutes + +# %% +model_names = [problemslist[i].getName() for i in range(numberOfProblems)] +metrics = ["PF", "N. function calls", "PMin", "PMax", "C.O.V.", "Digits", "Time (s)"] +resultArray = np.zeros((numberOfProblems, len(metrics))) +for i in tqdm(range(numberOfProblems)): + startTime = time.time() + problem = problemslist[i] + name = problem.getName() + event = problem.getEvent() + g = event.getFunction() + factory = otb.ProbabilitySimulationAlgorithmFactory() + algo = factory.buildMonteCarlo(problem) + algo.setMaximumOuterSampling(maximumOuterSampling) + algo.setBlockSize(blockSize) + algo.setMaximumCoefficientOfVariation(coefficientOfVariation) + algo.setMaximumTimeDuration(maximumDurationSeconds) + initialNumberOfCall = g.getEvaluationCallsNumber() + algo.run() + result = algo.getResult() + numberOfFunctionEvaluations = g.getEvaluationCallsNumber() - initialNumberOfCall + computedProbability = result.getProbabilityEstimate() + confidenceLength = result.getConfidenceLength(confidenceLevel) + pmin = computedProbability - 0.5 * confidenceLength + pmax = computedProbability + 0.5 * confidenceLength + cov = result.getCoefficientOfVariation() + if cov > 0.0: + expectedDigits = -np.log10(cov) - 1.0 + else: + expectedDigits = 0.0 + stopTime = time.time() + elapsedTime = stopTime - startTime + resultArray[i][0] = computedProbability + resultArray[i][1] = numberOfFunctionEvaluations + resultArray[i][2] = pmin + resultArray[i][3] = pmax + resultArray[i][4] = cov + resultArray[i][5] = expectedDigits + resultArray[i][6] = elapsedTime + + +# %% +df = pd.DataFrame(resultArray, index=model_names, columns=metrics) +# df.to_csv("reliability_compute_reference_proba.csv") +df + +# %% +# The problems with higher failture probabilities are obviously solved with more accuracy with the Monte-Carlo method. +# For example, the RP55 problem which has the highest probability equal to 0.560 has more than 3 significant digits. +# On the opposite side, the problems with probabilities close to zero are much more difficult to solve. +# The RP28 with a probability close to :math:`10^{-7}` has no significant digit. +# +# These previous results are consistent with the distribution of the Monte-Carlo estimator. +# The properties of the binomial distribution imply that its variance is: +# +# .. math:: +# \sigma_{p_f}^2 = \frac{p_f (1-p_f)}{n} +# +# where :math:`n` is the sample size and :math:`p_f` is the failure probability. +# The coefficient of variation is: +# +# .. math:: +# CV = \frac{\sigma_{p_f}}{p_f}. +# +# Since we do not know the exact value of :math:`p_f`, we use is approximation :math:`\tilde{p_f}` instead +# (this turns rigorous equations into approximate ones, but does not change the outcome). +# This implies: +# +# .. math:: +# CV = \sqrt{\frac{1 - p_f}{p_f n}}. +# +# When :math:`p_f\rightarrow 0`, we have :math:`p_f \rightarrow 0` which implies: +# +# .. math:: +# CV \rightarrow \sqrt{\frac{1}{p_f n}}. +# +# Inverting the previous equation, we get the sample size given the coefficient of variation: +# +# .. math:: +# n \approx \frac{1}{p_f CV^2}. +# +# This leads to the rule of thumb that, in order to estimate the probability :math:`p_f = 10^{-m}`, +# where :math:`m` is an integer, we need a sample size equal to: +# +# .. math:: +# n \approx \frac{1}{10^{-m} 10^{-2}} = 10^{m+2}. +# +# For example, estimating the probability of the RP28 problem with just one single digit leads to +# a sample size equal to :math:`n=10^9`, since the exact :math:`p_f \approx 10^{-7}`. diff --git a/otbenchmark/master/_downloads/f6463e8a686bee30a69d9d3bd12b16c5/plot_rp22.py b/otbenchmark/master/_downloads/f6463e8a686bee30a69d9d3bd12b16c5/plot_rp22.py new file mode 100644 index 00000000000..fb77d433164 --- /dev/null +++ b/otbenchmark/master/_downloads/f6463e8a686bee30a69d9d3bd12b16c5/plot_rp22.py @@ -0,0 +1,114 @@ +""" +RP22 analysis and 2D graphics +============================= +""" + +# %% +# The objective of this example is to present problem 22 of the BBRC. +# We also present graphic elements for the visualization of the limit state surface in 2 dimensions. + +# %% +import openturns as ot +import openturns.viewer as otv +import otbenchmark as otb + + +# %% +problem = otb.ReliabilityProblem22() +print(problem) + +# %% +event = problem.getEvent() +g = event.getFunction() + +# %% +problem.getProbability() + + +# %% +# Create the Monte-Carlo algorithm +algoProb = ot.ProbabilitySimulationAlgorithm(event) +algoProb.setMaximumOuterSampling(1000) +algoProb.setMaximumCoefficientOfVariation(0.01) +algoProb.run() + + +# %% +# Get the results +resultAlgo = algoProb.getResult() +neval = g.getEvaluationCallsNumber() +print("Number of function calls = %d" % (neval)) +pf = resultAlgo.getProbabilityEstimate() +print("Failure Probability = %.4f" % (pf)) +level = 0.95 +c95 = resultAlgo.getConfidenceLength(level) +pmin = pf - 0.5 * c95 +pmax = pf + 0.5 * c95 +print("%.1f %% confidence interval :[%.4f,%.4f] " % (level * 100, pmin, pmax)) + +# %% +# Compute the bounds of the domain +# -------------------------------- + +# %% +inputVector = event.getAntecedent() +distribution = inputVector.getDistribution() +X1 = distribution.getMarginal(0) +X2 = distribution.getMarginal(1) +alphaMin = 0.00001 +alphaMax = 1 - alphaMin +lowerBound = ot.Point( + [X1.computeQuantile(alphaMin)[0], X2.computeQuantile(alphaMin)[0]] +) +upperBound = ot.Point( + [X1.computeQuantile(alphaMax)[0], X2.computeQuantile(alphaMax)[0]] +) + + +# %% +nbPoints = [100, 100] +figure = g.draw(lowerBound, upperBound, nbPoints) +figure.setTitle(" Iso-values of limit state function") +figure + +# %% +# Print the iso-values of the distribution +# ---------------------------------------- + +# %% +_ = otv.View(distribution.drawPDF()) + + +# %% +sampleSize = 5000 +drawEvent = otb.DrawEvent(event) + + +# %% +cloud = drawEvent.drawSampleCrossCut(sampleSize) +_ = otv.View(cloud) + +# %% +# Draw the limit state surface +# ---------------------------- + +# %% +bounds = ot.Interval(lowerBound, upperBound) + + +# %% +graph = drawEvent.drawLimitStateCrossCut(bounds) +graph.add(cloud) +graph + + +# %% +domain = drawEvent.fillEventCrossCut(bounds) +_ = otv.View(domain) + +# %% +domain.add(cloud) +_ = otv.View(domain) + +# %% +otv.View.ShowAll() diff --git a/otbenchmark/master/_downloads/fb9f49f74b26df53e1cc530460c44c35/plot_CrossCutFunction_Demo.zip b/otbenchmark/master/_downloads/fb9f49f74b26df53e1cc530460c44c35/plot_CrossCutFunction_Demo.zip index 5cd4fd0f25a..63d21f35d32 100644 Binary files a/otbenchmark/master/_downloads/fb9f49f74b26df53e1cc530460c44c35/plot_CrossCutFunction_Demo.zip and b/otbenchmark/master/_downloads/fb9f49f74b26df53e1cc530460c44c35/plot_CrossCutFunction_Demo.zip differ diff --git a/otbenchmark/master/_downloads/fd26c2b6c146b7784bb0b2869d4860d5/plot_print_reliability_benchmark.ipynb b/otbenchmark/master/_downloads/fd26c2b6c146b7784bb0b2869d4860d5/plot_print_reliability_benchmark.ipynb new file mode 100644 index 00000000000..da51c034cea --- /dev/null +++ b/otbenchmark/master/_downloads/fd26c2b6c146b7784bb0b2869d4860d5/plot_print_reliability_benchmark.ipynb @@ -0,0 +1,153 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n# Print a reliability benchmark problem\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import otbenchmark as otb" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "problem = otb.RminusSReliability()\nprint(problem)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "print(problem.toFullString())" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "problem.getName()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "event = problem.getEvent()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "g = event.getFunction()\ng" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "event.getOperator()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "threshold = event.getThreshold()\nthreshold" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "pf = problem.getProbability()\npf" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "beta = problem.computeBeta()\nbeta" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "inputVector = event.getAntecedent()\ndistribution = inputVector.getDistribution()\ndistribution" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.20" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/otbenchmark/master/_downloads/ff03074b246d3e7c32e046ee160f2274/plot_rp28.py b/otbenchmark/master/_downloads/ff03074b246d3e7c32e046ee160f2274/plot_rp28.py new file mode 100644 index 00000000000..8495e883dbf --- /dev/null +++ b/otbenchmark/master/_downloads/ff03074b246d3e7c32e046ee160f2274/plot_rp28.py @@ -0,0 +1,120 @@ +""" +RP28 analysis and 2D graphics +============================= +""" + +# %% +# The objective of this example is to present problem 28 of the BBRC. +# We also present graphic elements for the visualization of the limit state surface in 2 dimensions. + +# %% +import openturns as ot +import openturns.viewer as otv +import otbenchmark as otb + + +# %% +problem = otb.ReliabilityProblem28() + + +# %% +print(problem) + + +# %% +event = problem.getEvent() +g = event.getFunction() + + +# %% +problem.getProbability() + + +# %% +# Create the Monte-Carlo algorithm +algoProb = ot.ProbabilitySimulationAlgorithm(event) +algoProb.setMaximumOuterSampling(10000) +algoProb.setBlockSize(128) +algoProb.setMaximumCoefficientOfVariation(0.01) +algoProb.run() + + +# %% +# Get the results +resultAlgo = algoProb.getResult() +neval = g.getEvaluationCallsNumber() +print("Number of function calls = %d" % (neval)) +pf = resultAlgo.getProbabilityEstimate() +print("Failure Probability = %.4f (* 1.e-7)" % (pf * 1.0e7)) +level = 0.95 +c95 = resultAlgo.getConfidenceLength(level) +pmin = pf - 0.5 * c95 +pmax = pf + 0.5 * c95 +print( + "%.1f %% confidence interval :[%.4f,%.4f] * 1.e-7 " + % (level * 100, pmin * 1.0e7, pmax * 1.0e7) +) + +# %% +# Compute the bounds of the domain +# -------------------------------- + +# %% +inputVector = event.getAntecedent() +distribution = inputVector.getDistribution() +X1 = distribution.getMarginal(0) +X2 = distribution.getMarginal(1) +alphaMin = 1.0e-8 +alphaMax = 1.0 - alphaMin +lowerBound = ot.Point( + [X1.computeQuantile(alphaMin)[0], X2.computeQuantile(alphaMin)[0]] +) +upperBound = ot.Point( + [X1.computeQuantile(alphaMax)[0], X2.computeQuantile(alphaMax)[0]] +) + + +# %% +nbPoints = [100, 100] +figure = g.draw(lowerBound, upperBound, nbPoints) +figure.setTitle(" Iso-values of limit state function") +figure + +# %% +# Print the iso-values of the distribution +# ---------------------------------------- + +# %% +_ = otv.View(distribution.drawPDF()) + + +# %% +sampleSize = 100000 +drawEvent = otb.DrawEvent(event) + +# %% +cloud = drawEvent.drawSampleCrossCut(sampleSize) +_ = otv.View(cloud) + +# %% +# Draw the limit state surface +# ---------------------------- + +# %% +bounds = ot.Interval(lowerBound, upperBound) + +# %% +graph = drawEvent.drawLimitStateCrossCut(bounds) +graph.add(cloud) +graph + +# %% +domain = drawEvent.fillEventCrossCut(bounds) +_ = otv.View(domain) + +# %% +domain.add(cloud) +_ = otv.View(domain) + +# %% +otv.View.ShowAll() diff --git a/otbenchmark/master/_images/sphx_glr_plot_case_rs_001.png b/otbenchmark/master/_images/sphx_glr_plot_case_rs_001.png new file mode 100644 index 00000000000..507e6745f82 Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_case_rs_001.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_case_rs_002.png b/otbenchmark/master/_images/sphx_glr_plot_case_rs_002.png new file mode 100644 index 00000000000..968a90d4cd1 Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_case_rs_002.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_case_rs_003.png b/otbenchmark/master/_images/sphx_glr_plot_case_rs_003.png new file mode 100644 index 00000000000..9b6ef2f0f5c Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_case_rs_003.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_case_rs_004.png b/otbenchmark/master/_images/sphx_glr_plot_case_rs_004.png new file mode 100644 index 00000000000..157962eb7df Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_case_rs_004.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_case_rs_005.png b/otbenchmark/master/_images/sphx_glr_plot_case_rs_005.png new file mode 100644 index 00000000000..9dc16e4e7e1 Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_case_rs_005.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_case_rs_thumb.png b/otbenchmark/master/_images/sphx_glr_plot_case_rs_thumb.png new file mode 100644 index 00000000000..c19b6dedaa5 Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_case_rs_thumb.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_compute_reference_rp55_pf_001.png b/otbenchmark/master/_images/sphx_glr_plot_compute_reference_rp55_pf_001.png new file mode 100644 index 00000000000..c216c3ea39a Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_compute_reference_rp55_pf_001.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_compute_reference_rp55_pf_002.png b/otbenchmark/master/_images/sphx_glr_plot_compute_reference_rp55_pf_002.png new file mode 100644 index 00000000000..95b38706b14 Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_compute_reference_rp55_pf_002.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_compute_reference_rp55_pf_003.png b/otbenchmark/master/_images/sphx_glr_plot_compute_reference_rp55_pf_003.png new file mode 100644 index 00000000000..95b38706b14 Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_compute_reference_rp55_pf_003.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_compute_reference_rp55_pf_004.png b/otbenchmark/master/_images/sphx_glr_plot_compute_reference_rp55_pf_004.png new file mode 100644 index 00000000000..8954d7cfd74 Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_compute_reference_rp55_pf_004.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_compute_reference_rp55_pf_thumb.png b/otbenchmark/master/_images/sphx_glr_plot_compute_reference_rp55_pf_thumb.png new file mode 100644 index 00000000000..06372af1a27 Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_compute_reference_rp55_pf_thumb.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_convergence_ishigami_004.png b/otbenchmark/master/_images/sphx_glr_plot_convergence_ishigami_004.png index 1c7dad1313f..158c56523ad 100644 Binary files a/otbenchmark/master/_images/sphx_glr_plot_convergence_ishigami_004.png and b/otbenchmark/master/_images/sphx_glr_plot_convergence_ishigami_004.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_convergence_ishigami_005.png b/otbenchmark/master/_images/sphx_glr_plot_convergence_ishigami_005.png index 28db08f8bf0..0991c931daa 100644 Binary files a/otbenchmark/master/_images/sphx_glr_plot_convergence_ishigami_005.png and b/otbenchmark/master/_images/sphx_glr_plot_convergence_ishigami_005.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_convergence_ishigami_006.png b/otbenchmark/master/_images/sphx_glr_plot_convergence_ishigami_006.png index 2bc00ffc724..ce36ace8830 100644 Binary files a/otbenchmark/master/_images/sphx_glr_plot_convergence_ishigami_006.png and b/otbenchmark/master/_images/sphx_glr_plot_convergence_ishigami_006.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_convergence_ishigami_007.png b/otbenchmark/master/_images/sphx_glr_plot_convergence_ishigami_007.png index d9710f26399..3391a3b2fd9 100644 Binary files a/otbenchmark/master/_images/sphx_glr_plot_convergence_ishigami_007.png and b/otbenchmark/master/_images/sphx_glr_plot_convergence_ishigami_007.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_four_branch_serial_system_waarts_001.png b/otbenchmark/master/_images/sphx_glr_plot_four_branch_serial_system_waarts_001.png new file mode 100644 index 00000000000..13725808054 Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_four_branch_serial_system_waarts_001.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_four_branch_serial_system_waarts_002.png b/otbenchmark/master/_images/sphx_glr_plot_four_branch_serial_system_waarts_002.png new file mode 100644 index 00000000000..85ce682e546 Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_four_branch_serial_system_waarts_002.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_four_branch_serial_system_waarts_003.png b/otbenchmark/master/_images/sphx_glr_plot_four_branch_serial_system_waarts_003.png new file mode 100644 index 00000000000..83c7e69a2f1 Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_four_branch_serial_system_waarts_003.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_four_branch_serial_system_waarts_thumb.png b/otbenchmark/master/_images/sphx_glr_plot_four_branch_serial_system_waarts_thumb.png new file mode 100644 index 00000000000..52b6fa47308 Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_four_branch_serial_system_waarts_thumb.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_print_reliability_benchmark_thumb.png b/otbenchmark/master/_images/sphx_glr_plot_print_reliability_benchmark_thumb.png new file mode 100644 index 00000000000..8a5fed589d1 Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_print_reliability_benchmark_thumb.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_reliability_benchmark_table_thumb.png b/otbenchmark/master/_images/sphx_glr_plot_reliability_benchmark_table_thumb.png new file mode 100644 index 00000000000..8a5fed589d1 Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_reliability_benchmark_table_thumb.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_reliability_benchmark_thumb.png b/otbenchmark/master/_images/sphx_glr_plot_reliability_benchmark_thumb.png new file mode 100644 index 00000000000..8a5fed589d1 Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_reliability_benchmark_thumb.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_reliability_compute_reference_proba_thumb.png b/otbenchmark/master/_images/sphx_glr_plot_reliability_compute_reference_proba_thumb.png new file mode 100644 index 00000000000..8a5fed589d1 Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_reliability_compute_reference_proba_thumb.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_rp110_001.png b/otbenchmark/master/_images/sphx_glr_plot_rp110_001.png new file mode 100644 index 00000000000..73a044aa66d Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_rp110_001.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_rp110_002.png b/otbenchmark/master/_images/sphx_glr_plot_rp110_002.png new file mode 100644 index 00000000000..d9264851e77 Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_rp110_002.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_rp110_003.png b/otbenchmark/master/_images/sphx_glr_plot_rp110_003.png new file mode 100644 index 00000000000..7d9dae8c803 Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_rp110_003.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_rp110_004.png b/otbenchmark/master/_images/sphx_glr_plot_rp110_004.png new file mode 100644 index 00000000000..f06c07d0760 Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_rp110_004.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_rp110_thumb.png b/otbenchmark/master/_images/sphx_glr_plot_rp110_thumb.png new file mode 100644 index 00000000000..72d760ae992 Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_rp110_thumb.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_rp111_001.png b/otbenchmark/master/_images/sphx_glr_plot_rp111_001.png new file mode 100644 index 00000000000..73a044aa66d Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_rp111_001.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_rp111_002.png b/otbenchmark/master/_images/sphx_glr_plot_rp111_002.png new file mode 100644 index 00000000000..c926937b5f5 Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_rp111_002.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_rp111_003.png b/otbenchmark/master/_images/sphx_glr_plot_rp111_003.png new file mode 100644 index 00000000000..bd00d68cacd Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_rp111_003.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_rp111_004.png b/otbenchmark/master/_images/sphx_glr_plot_rp111_004.png new file mode 100644 index 00000000000..d4590a6c9e3 Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_rp111_004.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_rp111_thumb.png b/otbenchmark/master/_images/sphx_glr_plot_rp111_thumb.png new file mode 100644 index 00000000000..72d760ae992 Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_rp111_thumb.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_rp22_001.png b/otbenchmark/master/_images/sphx_glr_plot_rp22_001.png new file mode 100644 index 00000000000..73a044aa66d Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_rp22_001.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_rp22_002.png b/otbenchmark/master/_images/sphx_glr_plot_rp22_002.png new file mode 100644 index 00000000000..1e08d81cd6c Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_rp22_002.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_rp22_003.png b/otbenchmark/master/_images/sphx_glr_plot_rp22_003.png new file mode 100644 index 00000000000..5414a685d14 Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_rp22_003.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_rp22_004.png b/otbenchmark/master/_images/sphx_glr_plot_rp22_004.png new file mode 100644 index 00000000000..163dbbe9ca2 Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_rp22_004.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_rp22_thumb.png b/otbenchmark/master/_images/sphx_glr_plot_rp22_thumb.png new file mode 100644 index 00000000000..72d760ae992 Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_rp22_thumb.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_rp24_001.png b/otbenchmark/master/_images/sphx_glr_plot_rp24_001.png new file mode 100644 index 00000000000..80137130d28 Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_rp24_001.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_rp24_002.png b/otbenchmark/master/_images/sphx_glr_plot_rp24_002.png new file mode 100644 index 00000000000..965e89d3a4c Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_rp24_002.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_rp24_003.png b/otbenchmark/master/_images/sphx_glr_plot_rp24_003.png new file mode 100644 index 00000000000..1b7a43349a9 Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_rp24_003.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_rp24_004.png b/otbenchmark/master/_images/sphx_glr_plot_rp24_004.png new file mode 100644 index 00000000000..60c68bcd456 Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_rp24_004.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_rp24_thumb.png b/otbenchmark/master/_images/sphx_glr_plot_rp24_thumb.png new file mode 100644 index 00000000000..596b230d74b Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_rp24_thumb.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_rp25_001.png b/otbenchmark/master/_images/sphx_glr_plot_rp25_001.png new file mode 100644 index 00000000000..73a044aa66d Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_rp25_001.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_rp25_002.png b/otbenchmark/master/_images/sphx_glr_plot_rp25_002.png new file mode 100644 index 00000000000..e146c306521 Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_rp25_002.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_rp25_003.png b/otbenchmark/master/_images/sphx_glr_plot_rp25_003.png new file mode 100644 index 00000000000..df175aa3183 Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_rp25_003.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_rp25_004.png b/otbenchmark/master/_images/sphx_glr_plot_rp25_004.png new file mode 100644 index 00000000000..f9227f4577e Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_rp25_004.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_rp25_thumb.png b/otbenchmark/master/_images/sphx_glr_plot_rp25_thumb.png new file mode 100644 index 00000000000..72d760ae992 Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_rp25_thumb.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_rp28_001.png b/otbenchmark/master/_images/sphx_glr_plot_rp28_001.png new file mode 100644 index 00000000000..d44614a70f6 Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_rp28_001.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_rp28_002.png b/otbenchmark/master/_images/sphx_glr_plot_rp28_002.png new file mode 100644 index 00000000000..20658a89e52 Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_rp28_002.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_rp28_003.png b/otbenchmark/master/_images/sphx_glr_plot_rp28_003.png new file mode 100644 index 00000000000..4e7183377ff Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_rp28_003.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_rp28_004.png b/otbenchmark/master/_images/sphx_glr_plot_rp28_004.png new file mode 100644 index 00000000000..b7dabf18623 Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_rp28_004.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_rp28_thumb.png b/otbenchmark/master/_images/sphx_glr_plot_rp28_thumb.png new file mode 100644 index 00000000000..4cecbe620fa Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_rp28_thumb.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_rp31_001.png b/otbenchmark/master/_images/sphx_glr_plot_rp31_001.png new file mode 100644 index 00000000000..af3e3ba152d Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_rp31_001.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_rp31_002.png b/otbenchmark/master/_images/sphx_glr_plot_rp31_002.png new file mode 100644 index 00000000000..73a044aa66d Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_rp31_002.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_rp31_003.png b/otbenchmark/master/_images/sphx_glr_plot_rp31_003.png new file mode 100644 index 00000000000..309a770c3a1 Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_rp31_003.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_rp31_004.png b/otbenchmark/master/_images/sphx_glr_plot_rp31_004.png new file mode 100644 index 00000000000..04c13ce9e0a Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_rp31_004.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_rp31_005.png b/otbenchmark/master/_images/sphx_glr_plot_rp31_005.png new file mode 100644 index 00000000000..6b0a3eed005 Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_rp31_005.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_rp31_thumb.png b/otbenchmark/master/_images/sphx_glr_plot_rp31_thumb.png new file mode 100644 index 00000000000..a7e1b8eba9c Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_rp31_thumb.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_rp35_001.png b/otbenchmark/master/_images/sphx_glr_plot_rp35_001.png new file mode 100644 index 00000000000..73a044aa66d Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_rp35_001.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_rp35_002.png b/otbenchmark/master/_images/sphx_glr_plot_rp35_002.png new file mode 100644 index 00000000000..4ed07f7cae9 Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_rp35_002.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_rp35_003.png b/otbenchmark/master/_images/sphx_glr_plot_rp35_003.png new file mode 100644 index 00000000000..854fe9c6abc Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_rp35_003.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_rp35_004.png b/otbenchmark/master/_images/sphx_glr_plot_rp35_004.png new file mode 100644 index 00000000000..a2f88e2120f Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_rp35_004.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_rp35_thumb.png b/otbenchmark/master/_images/sphx_glr_plot_rp35_thumb.png new file mode 100644 index 00000000000..72d760ae992 Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_rp35_thumb.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_rp53_001.png b/otbenchmark/master/_images/sphx_glr_plot_rp53_001.png new file mode 100644 index 00000000000..dd73047cc8a Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_rp53_001.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_rp53_002.png b/otbenchmark/master/_images/sphx_glr_plot_rp53_002.png new file mode 100644 index 00000000000..e8a41113403 Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_rp53_002.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_rp53_003.png b/otbenchmark/master/_images/sphx_glr_plot_rp53_003.png new file mode 100644 index 00000000000..3d522740e09 Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_rp53_003.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_rp53_004.png b/otbenchmark/master/_images/sphx_glr_plot_rp53_004.png new file mode 100644 index 00000000000..a29f39fa43e Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_rp53_004.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_rp53_005.png b/otbenchmark/master/_images/sphx_glr_plot_rp53_005.png new file mode 100644 index 00000000000..681967674b1 Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_rp53_005.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_rp53_thumb.png b/otbenchmark/master/_images/sphx_glr_plot_rp53_thumb.png new file mode 100644 index 00000000000..a011b5e5937 Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_rp53_thumb.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_rp55_001.png b/otbenchmark/master/_images/sphx_glr_plot_rp55_001.png new file mode 100644 index 00000000000..c31c70382e5 Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_rp55_001.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_rp55_002.png b/otbenchmark/master/_images/sphx_glr_plot_rp55_002.png new file mode 100644 index 00000000000..95b38706b14 Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_rp55_002.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_rp55_003.png b/otbenchmark/master/_images/sphx_glr_plot_rp55_003.png new file mode 100644 index 00000000000..19b6ca85846 Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_rp55_003.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_rp55_thumb.png b/otbenchmark/master/_images/sphx_glr_plot_rp55_thumb.png new file mode 100644 index 00000000000..34c105fa739 Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_rp55_thumb.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_rp57_001.png b/otbenchmark/master/_images/sphx_glr_plot_rp57_001.png new file mode 100644 index 00000000000..a30bc10b0f5 Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_rp57_001.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_rp57_002.png b/otbenchmark/master/_images/sphx_glr_plot_rp57_002.png new file mode 100644 index 00000000000..ca4672853dc Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_rp57_002.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_rp57_003.png b/otbenchmark/master/_images/sphx_glr_plot_rp57_003.png new file mode 100644 index 00000000000..7215c7a9ec7 Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_rp57_003.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_rp57_004.png b/otbenchmark/master/_images/sphx_glr_plot_rp57_004.png new file mode 100644 index 00000000000..57682b803c1 Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_rp57_004.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_rp57_thumb.png b/otbenchmark/master/_images/sphx_glr_plot_rp57_thumb.png new file mode 100644 index 00000000000..40a8d009e49 Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_rp57_thumb.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_rp75_001.png b/otbenchmark/master/_images/sphx_glr_plot_rp75_001.png new file mode 100644 index 00000000000..73a044aa66d Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_rp75_001.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_rp75_002.png b/otbenchmark/master/_images/sphx_glr_plot_rp75_002.png new file mode 100644 index 00000000000..b75a087444c Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_rp75_002.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_rp75_003.png b/otbenchmark/master/_images/sphx_glr_plot_rp75_003.png new file mode 100644 index 00000000000..1fcced1fbf7 Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_rp75_003.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_rp75_004.png b/otbenchmark/master/_images/sphx_glr_plot_rp75_004.png new file mode 100644 index 00000000000..3cecb636583 Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_rp75_004.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_rp75_thumb.png b/otbenchmark/master/_images/sphx_glr_plot_rp75_thumb.png new file mode 100644 index 00000000000..72d760ae992 Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_rp75_thumb.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_rp89_001.png b/otbenchmark/master/_images/sphx_glr_plot_rp89_001.png new file mode 100644 index 00000000000..73a044aa66d Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_rp89_001.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_rp89_002.png b/otbenchmark/master/_images/sphx_glr_plot_rp89_002.png new file mode 100644 index 00000000000..672d38e865c Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_rp89_002.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_rp89_003.png b/otbenchmark/master/_images/sphx_glr_plot_rp89_003.png new file mode 100644 index 00000000000..496ee9b0e71 Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_rp89_003.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_rp89_004.png b/otbenchmark/master/_images/sphx_glr_plot_rp89_004.png new file mode 100644 index 00000000000..e14023373ee Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_rp89_004.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_rp89_thumb.png b/otbenchmark/master/_images/sphx_glr_plot_rp89_thumb.png new file mode 100644 index 00000000000..72d760ae992 Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_rp89_thumb.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_sensitivity_distribution_ishigami_001.png b/otbenchmark/master/_images/sphx_glr_plot_sensitivity_distribution_ishigami_001.png new file mode 100644 index 00000000000..d2f72c6cff3 Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_sensitivity_distribution_ishigami_001.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_sensitivity_distribution_ishigami_002.png b/otbenchmark/master/_images/sphx_glr_plot_sensitivity_distribution_ishigami_002.png new file mode 100644 index 00000000000..86dd3ebbef6 Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_sensitivity_distribution_ishigami_002.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_sensitivity_distribution_ishigami_003.png b/otbenchmark/master/_images/sphx_glr_plot_sensitivity_distribution_ishigami_003.png new file mode 100644 index 00000000000..c4013661fd2 Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_sensitivity_distribution_ishigami_003.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_sensitivity_distribution_ishigami_004.png b/otbenchmark/master/_images/sphx_glr_plot_sensitivity_distribution_ishigami_004.png new file mode 100644 index 00000000000..5462f40ed8b Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_sensitivity_distribution_ishigami_004.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_sensitivity_distribution_ishigami_005.png b/otbenchmark/master/_images/sphx_glr_plot_sensitivity_distribution_ishigami_005.png new file mode 100644 index 00000000000..e46b580883a Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_sensitivity_distribution_ishigami_005.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_sensitivity_distribution_ishigami_006.png b/otbenchmark/master/_images/sphx_glr_plot_sensitivity_distribution_ishigami_006.png new file mode 100644 index 00000000000..a2cf44a85c9 Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_sensitivity_distribution_ishigami_006.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_sensitivity_distribution_ishigami_007.png b/otbenchmark/master/_images/sphx_glr_plot_sensitivity_distribution_ishigami_007.png new file mode 100644 index 00000000000..f747f9904d1 Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_sensitivity_distribution_ishigami_007.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_sensitivity_distribution_ishigami_008.png b/otbenchmark/master/_images/sphx_glr_plot_sensitivity_distribution_ishigami_008.png new file mode 100644 index 00000000000..c14547da44a Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_sensitivity_distribution_ishigami_008.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_sensitivity_distribution_ishigami_009.png b/otbenchmark/master/_images/sphx_glr_plot_sensitivity_distribution_ishigami_009.png new file mode 100644 index 00000000000..68106e7bbba Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_sensitivity_distribution_ishigami_009.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_sensitivity_distribution_ishigami_010.png b/otbenchmark/master/_images/sphx_glr_plot_sensitivity_distribution_ishigami_010.png new file mode 100644 index 00000000000..a40943ff03c Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_sensitivity_distribution_ishigami_010.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_sensitivity_distribution_ishigami_011.png b/otbenchmark/master/_images/sphx_glr_plot_sensitivity_distribution_ishigami_011.png new file mode 100644 index 00000000000..07586805b37 Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_sensitivity_distribution_ishigami_011.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_sensitivity_distribution_ishigami_012.png b/otbenchmark/master/_images/sphx_glr_plot_sensitivity_distribution_ishigami_012.png new file mode 100644 index 00000000000..e8739d3a69f Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_sensitivity_distribution_ishigami_012.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_sensitivity_distribution_ishigami_013.png b/otbenchmark/master/_images/sphx_glr_plot_sensitivity_distribution_ishigami_013.png new file mode 100644 index 00000000000..a6658a2535e Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_sensitivity_distribution_ishigami_013.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_sensitivity_distribution_ishigami_014.png b/otbenchmark/master/_images/sphx_glr_plot_sensitivity_distribution_ishigami_014.png new file mode 100644 index 00000000000..8230e2ffb15 Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_sensitivity_distribution_ishigami_014.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_sensitivity_distribution_ishigami_015.png b/otbenchmark/master/_images/sphx_glr_plot_sensitivity_distribution_ishigami_015.png new file mode 100644 index 00000000000..14a5e0bf020 Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_sensitivity_distribution_ishigami_015.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_sensitivity_distribution_ishigami_016.png b/otbenchmark/master/_images/sphx_glr_plot_sensitivity_distribution_ishigami_016.png new file mode 100644 index 00000000000..2224c2d7b23 Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_sensitivity_distribution_ishigami_016.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_sensitivity_distribution_ishigami_017.png b/otbenchmark/master/_images/sphx_glr_plot_sensitivity_distribution_ishigami_017.png new file mode 100644 index 00000000000..e865174eede Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_sensitivity_distribution_ishigami_017.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_sensitivity_distribution_ishigami_018.png b/otbenchmark/master/_images/sphx_glr_plot_sensitivity_distribution_ishigami_018.png new file mode 100644 index 00000000000..3da869cc536 Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_sensitivity_distribution_ishigami_018.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_sensitivity_distribution_ishigami_019.png b/otbenchmark/master/_images/sphx_glr_plot_sensitivity_distribution_ishigami_019.png new file mode 100644 index 00000000000..56c477c91b2 Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_sensitivity_distribution_ishigami_019.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_sensitivity_distribution_ishigami_020.png b/otbenchmark/master/_images/sphx_glr_plot_sensitivity_distribution_ishigami_020.png new file mode 100644 index 00000000000..5f6318318c6 Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_sensitivity_distribution_ishigami_020.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_sensitivity_distribution_ishigami_021.png b/otbenchmark/master/_images/sphx_glr_plot_sensitivity_distribution_ishigami_021.png new file mode 100644 index 00000000000..4cd73404690 Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_sensitivity_distribution_ishigami_021.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_sensitivity_distribution_ishigami_022.png b/otbenchmark/master/_images/sphx_glr_plot_sensitivity_distribution_ishigami_022.png new file mode 100644 index 00000000000..2113cb196fc Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_sensitivity_distribution_ishigami_022.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_sensitivity_distribution_ishigami_023.png b/otbenchmark/master/_images/sphx_glr_plot_sensitivity_distribution_ishigami_023.png new file mode 100644 index 00000000000..fe389b65fa4 Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_sensitivity_distribution_ishigami_023.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_sensitivity_distribution_ishigami_024.png b/otbenchmark/master/_images/sphx_glr_plot_sensitivity_distribution_ishigami_024.png new file mode 100644 index 00000000000..05b403dae0c Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_sensitivity_distribution_ishigami_024.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_sensitivity_distribution_ishigami_025.png b/otbenchmark/master/_images/sphx_glr_plot_sensitivity_distribution_ishigami_025.png new file mode 100644 index 00000000000..f771a9f9060 Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_sensitivity_distribution_ishigami_025.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_sensitivity_distribution_ishigami_026.png b/otbenchmark/master/_images/sphx_glr_plot_sensitivity_distribution_ishigami_026.png new file mode 100644 index 00000000000..d334f376e60 Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_sensitivity_distribution_ishigami_026.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_sensitivity_distribution_ishigami_027.png b/otbenchmark/master/_images/sphx_glr_plot_sensitivity_distribution_ishigami_027.png new file mode 100644 index 00000000000..98e4368a92b Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_sensitivity_distribution_ishigami_027.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_sensitivity_distribution_ishigami_028.png b/otbenchmark/master/_images/sphx_glr_plot_sensitivity_distribution_ishigami_028.png new file mode 100644 index 00000000000..c14dcd99957 Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_sensitivity_distribution_ishigami_028.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_sensitivity_distribution_ishigami_029.png b/otbenchmark/master/_images/sphx_glr_plot_sensitivity_distribution_ishigami_029.png new file mode 100644 index 00000000000..d786a6a6059 Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_sensitivity_distribution_ishigami_029.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_sensitivity_distribution_ishigami_030.png b/otbenchmark/master/_images/sphx_glr_plot_sensitivity_distribution_ishigami_030.png new file mode 100644 index 00000000000..1496f628a9a Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_sensitivity_distribution_ishigami_030.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_sensitivity_distribution_ishigami_031.png b/otbenchmark/master/_images/sphx_glr_plot_sensitivity_distribution_ishigami_031.png new file mode 100644 index 00000000000..7db820de365 Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_sensitivity_distribution_ishigami_031.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_sensitivity_distribution_ishigami_032.png b/otbenchmark/master/_images/sphx_glr_plot_sensitivity_distribution_ishigami_032.png new file mode 100644 index 00000000000..bbb12ee3bf7 Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_sensitivity_distribution_ishigami_032.png differ diff --git a/otbenchmark/master/_images/sphx_glr_plot_sensitivity_distribution_ishigami_thumb.png b/otbenchmark/master/_images/sphx_glr_plot_sensitivity_distribution_ishigami_thumb.png new file mode 100644 index 00000000000..5c1c1cfc4f6 Binary files /dev/null and b/otbenchmark/master/_images/sphx_glr_plot_sensitivity_distribution_ishigami_thumb.png differ diff --git a/otbenchmark/master/_sources/auto_examples/index.rst b/otbenchmark/master/_sources/auto_examples/index.rst index a6dc8593650..37244c59ef5 100644 --- a/otbenchmark/master/_sources/auto_examples/index.rst +++ b/otbenchmark/master/_sources/auto_examples/index.rst @@ -129,6 +129,363 @@ Examples /auto_examples/plot_ConditionalDistribution_Demo /auto_examples/plot_convergence_reliability_mc +Reliability examples +==================== + + + +.. raw:: html + +
+ +.. thumbnail-parent-div-open + +.. raw:: html + +
+ +.. only:: html + + .. image:: /auto_examples/reliability_problems/images/thumb/sphx_glr_plot_print_reliability_benchmark_thumb.png + :alt: + + :ref:`sphx_glr_auto_examples_reliability_problems_plot_print_reliability_benchmark.py` + +.. raw:: html + +
Print a reliability benchmark problem
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /auto_examples/reliability_problems/images/thumb/sphx_glr_plot_four_branch_serial_system_waarts_thumb.png + :alt: + + :ref:`sphx_glr_auto_examples_reliability_problems_plot_four_branch_serial_system_waarts.py` + +.. raw:: html + +
Using the Waarts four-branch serial system
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /auto_examples/reliability_problems/images/thumb/sphx_glr_plot_rp53_thumb.png + :alt: + + :ref:`sphx_glr_auto_examples_reliability_problems_plot_rp53.py` + +.. raw:: html + +
RP53 analysis and 2D graphics
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /auto_examples/reliability_problems/images/thumb/sphx_glr_plot_case_rs_thumb.png + :alt: + + :ref:`sphx_glr_auto_examples_reliability_problems_plot_case_rs.py` + +.. raw:: html + +
R-S analysis and 2D graphics
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /auto_examples/reliability_problems/images/thumb/sphx_glr_plot_rp24_thumb.png + :alt: + + :ref:`sphx_glr_auto_examples_reliability_problems_plot_rp24.py` + +.. raw:: html + +
RP24 analysis and 2D graphics
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /auto_examples/reliability_problems/images/thumb/sphx_glr_plot_rp57_thumb.png + :alt: + + :ref:`sphx_glr_auto_examples_reliability_problems_plot_rp57.py` + +.. raw:: html + +
RP57 analysis and 2D graphics
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /auto_examples/reliability_problems/images/thumb/sphx_glr_plot_rp111_thumb.png + :alt: + + :ref:`sphx_glr_auto_examples_reliability_problems_plot_rp111.py` + +.. raw:: html + +
RP111 analysis and 2D graphics
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /auto_examples/reliability_problems/images/thumb/sphx_glr_plot_rp35_thumb.png + :alt: + + :ref:`sphx_glr_auto_examples_reliability_problems_plot_rp35.py` + +.. raw:: html + +
RP35 analysis and 2D graphics
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /auto_examples/reliability_problems/images/thumb/sphx_glr_plot_rp25_thumb.png + :alt: + + :ref:`sphx_glr_auto_examples_reliability_problems_plot_rp25.py` + +.. raw:: html + +
RP25 analysis and 2D graphics
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /auto_examples/reliability_problems/images/thumb/sphx_glr_plot_rp89_thumb.png + :alt: + + :ref:`sphx_glr_auto_examples_reliability_problems_plot_rp89.py` + +.. raw:: html + +
RP89 analysis and 2D graphics
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /auto_examples/reliability_problems/images/thumb/sphx_glr_plot_rp22_thumb.png + :alt: + + :ref:`sphx_glr_auto_examples_reliability_problems_plot_rp22.py` + +.. raw:: html + +
RP22 analysis and 2D graphics
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /auto_examples/reliability_problems/images/thumb/sphx_glr_plot_rp110_thumb.png + :alt: + + :ref:`sphx_glr_auto_examples_reliability_problems_plot_rp110.py` + +.. raw:: html + +
RP110 analysis and 2D graphics
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /auto_examples/reliability_problems/images/thumb/sphx_glr_plot_rp31_thumb.png + :alt: + + :ref:`sphx_glr_auto_examples_reliability_problems_plot_rp31.py` + +.. raw:: html + +
RP31 analysis and 2D graphics
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /auto_examples/reliability_problems/images/thumb/sphx_glr_plot_rp28_thumb.png + :alt: + + :ref:`sphx_glr_auto_examples_reliability_problems_plot_rp28.py` + +.. raw:: html + +
RP28 analysis and 2D graphics
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /auto_examples/reliability_problems/images/thumb/sphx_glr_plot_reliability_compute_reference_proba_thumb.png + :alt: + + :ref:`sphx_glr_auto_examples_reliability_problems_plot_reliability_compute_reference_proba.py` + +.. raw:: html + +
Compute reference probabilities with Monte-Carlo
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /auto_examples/reliability_problems/images/thumb/sphx_glr_plot_rp55_thumb.png + :alt: + + :ref:`sphx_glr_auto_examples_reliability_problems_plot_rp55.py` + +.. raw:: html + +
RP55 analysis and 2D graphics
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /auto_examples/reliability_problems/images/thumb/sphx_glr_plot_rp75_thumb.png + :alt: + + :ref:`sphx_glr_auto_examples_reliability_problems_plot_rp75.py` + +.. raw:: html + +
RP75 analysis and 2D graphics
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /auto_examples/reliability_problems/images/thumb/sphx_glr_plot_reliability_benchmark_thumb.png + :alt: + + :ref:`sphx_glr_auto_examples_reliability_problems_plot_reliability_benchmark.py` + +.. raw:: html + +
Benchmark on a given set of problems
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /auto_examples/reliability_problems/images/thumb/sphx_glr_plot_compute_reference_rp55_pf_thumb.png + :alt: + + :ref:`sphx_glr_auto_examples_reliability_problems_plot_compute_reference_rp55_pf.py` + +.. raw:: html + +
Compute reference probability for RP55
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /auto_examples/reliability_problems/images/thumb/sphx_glr_plot_reliability_benchmark_table_thumb.png + :alt: + + :ref:`sphx_glr_auto_examples_reliability_problems_plot_reliability_benchmark_table.py` + +.. raw:: html + +
Benchmark the reliability solvers on the problems
+
+ + +.. thumbnail-parent-div-close + +.. raw:: html + +
+ Sensitivity examples ==================== @@ -157,6 +514,23 @@ Sensitivity examples +.. raw:: html + +
+ +.. only:: html + + .. image:: /auto_examples/sensitivity_problems/images/thumb/sphx_glr_plot_sensitivity_distribution_ishigami_thumb.png + :alt: + + :ref:`sphx_glr_auto_examples_sensitivity_problems_plot_sensitivity_distribution_ishigami.py` + +.. raw:: html + +
Distribution of the Sobol' indices on Ishigami function
+
+ + .. raw:: html
@@ -390,6 +764,7 @@ Sensitivity examples :includehidden: + /auto_examples/reliability_problems/index.rst /auto_examples/sensitivity_problems/index.rst diff --git a/otbenchmark/master/_sources/auto_examples/plot_ConditionalDistribution_Demo.rst b/otbenchmark/master/_sources/auto_examples/plot_ConditionalDistribution_Demo.rst index b2b4ef117d6..126d9612685 100644 --- a/otbenchmark/master/_sources/auto_examples/plot_ConditionalDistribution_Demo.rst +++ b/otbenchmark/master/_sources/auto_examples/plot_ConditionalDistribution_Demo.rst @@ -242,7 +242,7 @@ Create a Punk distribution .. rst-class:: sphx-glr-timing - **Total running time of the script:** (0 minutes 2.577 seconds) + **Total running time of the script:** (0 minutes 2.595 seconds) .. _sphx_glr_download_auto_examples_plot_ConditionalDistribution_Demo.py: diff --git a/otbenchmark/master/_sources/auto_examples/plot_CrossCutFunction_Demo.rst b/otbenchmark/master/_sources/auto_examples/plot_CrossCutFunction_Demo.rst index a68a90524c7..38d6e2815c3 100644 --- a/otbenchmark/master/_sources/auto_examples/plot_CrossCutFunction_Demo.rst +++ b/otbenchmark/master/_sources/auto_examples/plot_CrossCutFunction_Demo.rst @@ -213,7 +213,7 @@ Let :math:`\bar{x}\in\mathbb{R}^3` be the reference point. .. rst-class:: sphx-glr-timing - **Total running time of the script:** (0 minutes 1.229 seconds) + **Total running time of the script:** (0 minutes 1.184 seconds) .. _sphx_glr_download_auto_examples_plot_CrossCutFunction_Demo.py: diff --git a/otbenchmark/master/_sources/auto_examples/plot_convergence_reliability_mc.rst b/otbenchmark/master/_sources/auto_examples/plot_convergence_reliability_mc.rst index 15d485a8174..5f55e317d87 100644 --- a/otbenchmark/master/_sources/auto_examples/plot_convergence_reliability_mc.rst +++ b/otbenchmark/master/_sources/auto_examples/plot_convergence_reliability_mc.rst @@ -352,7 +352,7 @@ where :math:`n` is the sample size. .. code-block:: none - Elapsed = 1.74 (s) + Elapsed = 1.73 (s) @@ -414,7 +414,7 @@ where :math:`n` is the sample size. .. rst-class:: sphx-glr-timing - **Total running time of the script:** (0 minutes 2.177 seconds) + **Total running time of the script:** (0 minutes 2.194 seconds) .. _sphx_glr_download_auto_examples_plot_convergence_reliability_mc.py: diff --git a/otbenchmark/master/_sources/auto_examples/plot_crosscut_distribution_2d.rst b/otbenchmark/master/_sources/auto_examples/plot_crosscut_distribution_2d.rst index 7638d14386d..8347da9d43e 100644 --- a/otbenchmark/master/_sources/auto_examples/plot_crosscut_distribution_2d.rst +++ b/otbenchmark/master/_sources/auto_examples/plot_crosscut_distribution_2d.rst @@ -152,7 +152,7 @@ Plot cross-cuts of the distribution .. rst-class:: sphx-glr-timing - **Total running time of the script:** (0 minutes 2.066 seconds) + **Total running time of the script:** (0 minutes 2.064 seconds) .. _sphx_glr_download_auto_examples_plot_crosscut_distribution_2d.py: diff --git a/otbenchmark/master/_sources/auto_examples/plot_crosscut_distribution_3d.rst b/otbenchmark/master/_sources/auto_examples/plot_crosscut_distribution_3d.rst index 358c323007a..6b97be56813 100644 --- a/otbenchmark/master/_sources/auto_examples/plot_crosscut_distribution_3d.rst +++ b/otbenchmark/master/_sources/auto_examples/plot_crosscut_distribution_3d.rst @@ -146,7 +146,7 @@ Print the iso-values of the distribution .. rst-class:: sphx-glr-timing - **Total running time of the script:** (0 minutes 7.724 seconds) + **Total running time of the script:** (0 minutes 7.691 seconds) .. _sphx_glr_download_auto_examples_plot_crosscut_distribution_3d.py: diff --git a/otbenchmark/master/_sources/auto_examples/plot_methodFactory.rst b/otbenchmark/master/_sources/auto_examples/plot_methodFactory.rst index 0b51e0c6633..c3c2d0d7e7a 100644 --- a/otbenchmark/master/_sources/auto_examples/plot_methodFactory.rst +++ b/otbenchmark/master/_sources/auto_examples/plot_methodFactory.rst @@ -331,7 +331,7 @@ Create a LHS algorithm .. rst-class:: sphx-glr-timing - **Total running time of the script:** (0 minutes 7.465 seconds) + **Total running time of the script:** (0 minutes 7.477 seconds) .. _sphx_glr_download_auto_examples_plot_methodFactory.py: diff --git a/otbenchmark/master/_sources/auto_examples/reliability_problems/index.rst b/otbenchmark/master/_sources/auto_examples/reliability_problems/index.rst new file mode 100644 index 00000000000..e4e10c15d50 --- /dev/null +++ b/otbenchmark/master/_sources/auto_examples/reliability_problems/index.rst @@ -0,0 +1,386 @@ + + +.. _sphx_glr_auto_examples_reliability_problems: + +Reliability examples +==================== + + + +.. raw:: html + +
+ +.. thumbnail-parent-div-open + +.. raw:: html + +
+ +.. only:: html + + .. image:: /auto_examples/reliability_problems/images/thumb/sphx_glr_plot_print_reliability_benchmark_thumb.png + :alt: + + :ref:`sphx_glr_auto_examples_reliability_problems_plot_print_reliability_benchmark.py` + +.. raw:: html + +
Print a reliability benchmark problem
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /auto_examples/reliability_problems/images/thumb/sphx_glr_plot_four_branch_serial_system_waarts_thumb.png + :alt: + + :ref:`sphx_glr_auto_examples_reliability_problems_plot_four_branch_serial_system_waarts.py` + +.. raw:: html + +
Using the Waarts four-branch serial system
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /auto_examples/reliability_problems/images/thumb/sphx_glr_plot_rp53_thumb.png + :alt: + + :ref:`sphx_glr_auto_examples_reliability_problems_plot_rp53.py` + +.. raw:: html + +
RP53 analysis and 2D graphics
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /auto_examples/reliability_problems/images/thumb/sphx_glr_plot_case_rs_thumb.png + :alt: + + :ref:`sphx_glr_auto_examples_reliability_problems_plot_case_rs.py` + +.. raw:: html + +
R-S analysis and 2D graphics
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /auto_examples/reliability_problems/images/thumb/sphx_glr_plot_rp24_thumb.png + :alt: + + :ref:`sphx_glr_auto_examples_reliability_problems_plot_rp24.py` + +.. raw:: html + +
RP24 analysis and 2D graphics
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /auto_examples/reliability_problems/images/thumb/sphx_glr_plot_rp57_thumb.png + :alt: + + :ref:`sphx_glr_auto_examples_reliability_problems_plot_rp57.py` + +.. raw:: html + +
RP57 analysis and 2D graphics
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /auto_examples/reliability_problems/images/thumb/sphx_glr_plot_rp111_thumb.png + :alt: + + :ref:`sphx_glr_auto_examples_reliability_problems_plot_rp111.py` + +.. raw:: html + +
RP111 analysis and 2D graphics
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /auto_examples/reliability_problems/images/thumb/sphx_glr_plot_rp35_thumb.png + :alt: + + :ref:`sphx_glr_auto_examples_reliability_problems_plot_rp35.py` + +.. raw:: html + +
RP35 analysis and 2D graphics
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /auto_examples/reliability_problems/images/thumb/sphx_glr_plot_rp25_thumb.png + :alt: + + :ref:`sphx_glr_auto_examples_reliability_problems_plot_rp25.py` + +.. raw:: html + +
RP25 analysis and 2D graphics
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /auto_examples/reliability_problems/images/thumb/sphx_glr_plot_rp89_thumb.png + :alt: + + :ref:`sphx_glr_auto_examples_reliability_problems_plot_rp89.py` + +.. raw:: html + +
RP89 analysis and 2D graphics
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /auto_examples/reliability_problems/images/thumb/sphx_glr_plot_rp22_thumb.png + :alt: + + :ref:`sphx_glr_auto_examples_reliability_problems_plot_rp22.py` + +.. raw:: html + +
RP22 analysis and 2D graphics
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /auto_examples/reliability_problems/images/thumb/sphx_glr_plot_rp110_thumb.png + :alt: + + :ref:`sphx_glr_auto_examples_reliability_problems_plot_rp110.py` + +.. raw:: html + +
RP110 analysis and 2D graphics
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /auto_examples/reliability_problems/images/thumb/sphx_glr_plot_rp31_thumb.png + :alt: + + :ref:`sphx_glr_auto_examples_reliability_problems_plot_rp31.py` + +.. raw:: html + +
RP31 analysis and 2D graphics
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /auto_examples/reliability_problems/images/thumb/sphx_glr_plot_rp28_thumb.png + :alt: + + :ref:`sphx_glr_auto_examples_reliability_problems_plot_rp28.py` + +.. raw:: html + +
RP28 analysis and 2D graphics
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /auto_examples/reliability_problems/images/thumb/sphx_glr_plot_reliability_compute_reference_proba_thumb.png + :alt: + + :ref:`sphx_glr_auto_examples_reliability_problems_plot_reliability_compute_reference_proba.py` + +.. raw:: html + +
Compute reference probabilities with Monte-Carlo
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /auto_examples/reliability_problems/images/thumb/sphx_glr_plot_rp55_thumb.png + :alt: + + :ref:`sphx_glr_auto_examples_reliability_problems_plot_rp55.py` + +.. raw:: html + +
RP55 analysis and 2D graphics
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /auto_examples/reliability_problems/images/thumb/sphx_glr_plot_rp75_thumb.png + :alt: + + :ref:`sphx_glr_auto_examples_reliability_problems_plot_rp75.py` + +.. raw:: html + +
RP75 analysis and 2D graphics
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /auto_examples/reliability_problems/images/thumb/sphx_glr_plot_reliability_benchmark_thumb.png + :alt: + + :ref:`sphx_glr_auto_examples_reliability_problems_plot_reliability_benchmark.py` + +.. raw:: html + +
Benchmark on a given set of problems
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /auto_examples/reliability_problems/images/thumb/sphx_glr_plot_compute_reference_rp55_pf_thumb.png + :alt: + + :ref:`sphx_glr_auto_examples_reliability_problems_plot_compute_reference_rp55_pf.py` + +.. raw:: html + +
Compute reference probability for RP55
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /auto_examples/reliability_problems/images/thumb/sphx_glr_plot_reliability_benchmark_table_thumb.png + :alt: + + :ref:`sphx_glr_auto_examples_reliability_problems_plot_reliability_benchmark_table.py` + +.. raw:: html + +
Benchmark the reliability solvers on the problems
+
+ + +.. thumbnail-parent-div-close + +.. raw:: html + +
+ + +.. toctree:: + :hidden: + + /auto_examples/reliability_problems/plot_print_reliability_benchmark + /auto_examples/reliability_problems/plot_four_branch_serial_system_waarts + /auto_examples/reliability_problems/plot_rp53 + /auto_examples/reliability_problems/plot_case_rs + /auto_examples/reliability_problems/plot_rp24 + /auto_examples/reliability_problems/plot_rp57 + /auto_examples/reliability_problems/plot_rp111 + /auto_examples/reliability_problems/plot_rp35 + /auto_examples/reliability_problems/plot_rp25 + /auto_examples/reliability_problems/plot_rp89 + /auto_examples/reliability_problems/plot_rp22 + /auto_examples/reliability_problems/plot_rp110 + /auto_examples/reliability_problems/plot_rp31 + /auto_examples/reliability_problems/plot_rp28 + /auto_examples/reliability_problems/plot_reliability_compute_reference_proba + /auto_examples/reliability_problems/plot_rp55 + /auto_examples/reliability_problems/plot_rp75 + /auto_examples/reliability_problems/plot_reliability_benchmark + /auto_examples/reliability_problems/plot_compute_reference_rp55_pf + /auto_examples/reliability_problems/plot_reliability_benchmark_table + diff --git a/otbenchmark/master/_sources/auto_examples/reliability_problems/plot_case_rs.rst b/otbenchmark/master/_sources/auto_examples/reliability_problems/plot_case_rs.rst new file mode 100644 index 00000000000..f552f4decec --- /dev/null +++ b/otbenchmark/master/_sources/auto_examples/reliability_problems/plot_case_rs.rst @@ -0,0 +1,458 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "auto_examples/reliability_problems/plot_case_rs.py" +.. LINE NUMBERS ARE GIVEN BELOW. + +.. only:: html + + .. note:: + :class: sphx-glr-download-link-note + + :ref:`Go to the end ` + to download the full example code. + +.. rst-class:: sphx-glr-example-title + +.. _sphx_glr_auto_examples_reliability_problems_plot_case_rs.py: + + +R-S analysis and 2D graphics +============================ + +.. GENERATED FROM PYTHON SOURCE LINES 7-9 + +The objective of this example is to present the R-S problem. +We also present graphic elements for the visualization of the limit state surface in 2 dimensions. + +.. GENERATED FROM PYTHON SOURCE LINES 11-15 + +.. code-block:: Python + + import openturns as ot + import openturns.viewer as otv + import otbenchmark as otb + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 16-19 + +.. code-block:: Python + + problem = otb.RminusSReliability() + + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 20-24 + +.. code-block:: Python + + event = problem.getEvent() + g = event.getFunction() + + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 25-27 + +.. code-block:: Python + + problem.getProbability() + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + 0.07864960352514257 + + + +.. GENERATED FROM PYTHON SOURCE LINES 28-29 + +Create the Monte-Carlo algorithm + +.. GENERATED FROM PYTHON SOURCE LINES 29-35 + +.. code-block:: Python + + algoProb = ot.ProbabilitySimulationAlgorithm(event) + algoProb.setMaximumOuterSampling(1000) + algoProb.setMaximumCoefficientOfVariation(0.01) + algoProb.run() + + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 36-37 + +Get the results + +.. GENERATED FROM PYTHON SOURCE LINES 37-48 + +.. code-block:: Python + + resultAlgo = algoProb.getResult() + neval = g.getEvaluationCallsNumber() + print("Number of function calls = %d" % (neval)) + pf = resultAlgo.getProbabilityEstimate() + print("Failure Probability = %.4f" % (pf)) + level = 0.95 + c95 = resultAlgo.getConfidenceLength(level) + pmin = pf - 0.5 * c95 + pmax = pf + 0.5 * c95 + print("%.1f %% confidence interval :[%.4f,%.4f] " % (level * 100, pmin, pmax)) + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + Number of function calls = 1000 + Failure Probability = 0.0770 + 95.0 % confidence interval :[0.0605,0.0935] + + + + +.. GENERATED FROM PYTHON SOURCE LINES 49-50 + +## Plot the contours of the function + +.. GENERATED FROM PYTHON SOURCE LINES 52-55 + +.. code-block:: Python + + inputVector = event.getAntecedent() + distribution = inputVector.getDistribution() + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 56-59 + +.. code-block:: Python + + R = distribution.getMarginal(0) + S = distribution.getMarginal(1) + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 60-65 + +.. code-block:: Python + + alphaMin = 0.001 + alphaMax = 1 - alphaMin + lowerBound = ot.Point([R.computeQuantile(alphaMin)[0], S.computeQuantile(alphaMin)[0]]) + upperBound = ot.Point([R.computeQuantile(alphaMax)[0], S.computeQuantile(alphaMax)[0]]) + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 66-69 + +.. code-block:: Python + + nbPoints = [100, 100] + _ = otv.View(g.draw(lowerBound, upperBound, nbPoints)) + + + + +.. image-sg:: /auto_examples/reliability_problems/images/sphx_glr_plot_case_rs_001.png + :alt: y0 as a function of (R,S) + :srcset: /auto_examples/reliability_problems/images/sphx_glr_plot_case_rs_001.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 70-73 + +.. code-block:: Python + + Y = R - S + Y + + + + + + +.. raw:: html + +
+ Normal +
    +
  • name=Normal
  • +
  • dimension=1
  • +
  • weight=1
  • +
  • range=]-inf (-8.81962), (12.8196) +inf[
  • +
  • description=[X0]
  • +
  • isParallel=true
  • +
  • isCopula=false
  • +
+ +
+
+
+ +.. GENERATED FROM PYTHON SOURCE LINES 74-76 + +.. code-block:: Python + + _ = otv.View(Y.drawPDF()) + + + + +.. image-sg:: /auto_examples/reliability_problems/images/sphx_glr_plot_case_rs_002.png + :alt: plot case rs + :srcset: /auto_examples/reliability_problems/images/sphx_glr_plot_case_rs_002.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 77-79 + +Print the iso-values of the distribution +---------------------------------------- + +.. GENERATED FROM PYTHON SOURCE LINES 81-83 + +.. code-block:: Python + + _ = otv.View(distribution.drawPDF()) + + + + +.. image-sg:: /auto_examples/reliability_problems/images/sphx_glr_plot_case_rs_003.png + :alt: [R,S] iso-PDF + :srcset: /auto_examples/reliability_problems/images/sphx_glr_plot_case_rs_003.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 84-85 + +## Visualise the safe and unsafe regions on a sample + +.. GENERATED FROM PYTHON SOURCE LINES 87-89 + +.. code-block:: Python + + sampleSize = 500 + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 90-92 + +.. code-block:: Python + + drawEvent = otb.DrawEvent(event) + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 93-96 + +.. code-block:: Python + + cloud = drawEvent.drawSampleCrossCut(sampleSize) + cloud + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + class=Graph name=Points X s.t. g(X) < 0.0 implementation=class=GraphImplementation name=Points X s.t. g(X) < 0.0 title=Points X s.t. g(X) < 0.0 xTitle=R yTitle=S axes=ON grid=ON legendposition=topright legendFontSize=1 drawables=[class=Drawable name=In implementation=class=Cloud name=In derived from class=DrawableImplementation name=In legend=In data=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=40 dimension=2 data=[[2.84794,3.13143],[3.03313,3.36216],[2.27186,2.54362],[3.35218,3.7689],[4.23963,5.14934],[4.14925,4.21609],[2.72662,4.18324],[3.09634,3.23719],[2.72895,4.08218],[1.84192,2.21674],[3.50003,3.86472],[1.78046,1.88615],[1.22187,2.74547],[1.98527,2.66409],[3.76457,4.43539],[1.28243,2.94183],[2.29633,2.73309],[2.08868,3.38256],[2.40596,2.55732],[1.85371,3.30761],[3.07654,3.32548],[3.59569,3.64894],[1.95447,2.98333],[2.79903,3.12172],[2.30512,2.73431],[1.3691,2.51587],[2.57913,2.65806],[2.60908,3.46425],[2.79539,2.92518],[2.01425,2.29286],[3.95606,4.785],[2.34126,2.39601],[2.67873,2.77487],[2.48932,2.49644],[2.0482,2.37931],[2.5233,2.77569],[2.88083,3.73397],[2.35268,2.73377],[2.348,2.72118],[3.13783,3.54341]] color=lightsalmon3 isColorExplicitlySet=true fillStyle=solid lineStyle=solid pointStyle=fsquare lineWidth=1,class=Drawable name=Out implementation=class=Cloud name=Out derived from class=DrawableImplementation name=Out legend=Out data=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=460 dimension=2 data=[[4.35026,1.29234],[4.68621,0.908927],[3.01115,1.40344],[3.50866,3.15769],[3.79295,3.16403],[4.71952,1.6706],[4.3356,0.198451],[5.18927,2.13847],[3.59429,2.22317],[3.38294,2.16207],[6.40376,3.29444],[3.75542,3.65681],[3.63792,1.84985],[4.9926,2.60549],[3.69771,1.60758],[3.68808,1.54374],[2.8391,2.65487],[4.56256,0.971149],[4.00098,0.329665],[3.51013,1.87964],[3.81391,2.95889],[3.85267,3.45666],[3.82407,0.580057],[4.05976,2.34231],[3.66303,2.20786],[3.4274,1.50067],[5.03193,2.0723],[3.67681,1.62181],[3.44163,2.70091],[3.61272,3.21288],[3.37149,3.07344],[4.73685,3.95794],[3.41443,1.86585],[4.67718,2.81964],[4.6357,2.5671],[4.56039,3.01142],[4.6493,1.30285],[4.4342,2.28152],[4.62429,2.79761],[3.85577,1.07079],[3.96862,2.84883],[4.91546,1.9686],[5.85819,2.81925],[2.81286,1.90193],[2.89699,2.63801],[2.7418,1.3852],[4.23069,3.63038],[5.64923,0.0684376],[3.82313,2.29727],[4.66357,3.75243],[2.82768,2.06805],[3.91966,0.561955],[4.87361,2.53958],[4.16262,1.29641],[3.38688,2.32212],[3.46634,2.18472],[5.46486,2.41553],[4.73009,1.80676],[4.55434,0.767514],[2.5174,1.67429],[3.83679,1.66813],[3.98352,2.15097],[4.34576,2.30071],[4.92467,2.27178],[5.15621,1.03455],[4.1623,1.14283],[4.30336,1.69355],[2.40131,2.39066],[3.8446,1.48262],[3.98215,0.95148],[6.01831,1.51696],[4.1337,2.47821],[3.36645,1.81001],[3.92165,2.07885],[2.68099,1.99622],[3.47068,1.01259],[4.51546,2.34164],[2.87629,1.03078],[4.09903,3.03789],[4.46426,1.6623],[4.51593,4.28301],[2.89504,-0.106884],[4.41636,1.56521],[2.98772,0.00848427],[3.39969,1.06099],[4.26769,2.97759],[4.84817,2.59607],[3.99961,2.46304],[5.06598,2.67699],[5.6794,1.59303],[3.13878,3.00923],[4.00395,2.6914],[2.51641,0.820378],[3.39076,1.14559],[3.85028,1.78008],[4.0651,2.42479],[3.57507,1.00669],[3.33987,1.64731],[5.26053,0.227213],[2.68473,0.962189],[3.93753,2.73003],[4.6181,2.0208],[3.77718,1.7894],[3.95126,1.84816],[2.84689,1.35359],[3.73026,2.40139],[4.93608,2.72111],[3.37109,2.95301],[3.29007,2.19448],[4.03112,2.39802],[3.93072,2.05087],[4.60804,2.26075],[3.46405,0.9533],[4.17166,0.801968],[5.57695,2.14876],[4.32876,1.76656],[4.16918,1.76958],[5.05114,2.16115],[3.29638,1.17956],[3.59862,2.82791],[3.11772,2.86527],[3.33769,2.50854],[3.47063,1.7371],[4.47916,1.91055],[4.66766,2.87823],[4.03081,1.19919],[3.60619,1.31126],[4.80648,2.16949],[2.61849,2.45629],[5.16024,1.22328],[3.4537,0.121681],[4.68065,0.704944],[3.74731,2.28946],[2.44144,2.11445],[4.96235,2.60172],[5.58297,0.919859],[4.71721,1.52374],[4.03699,0.926182],[4.44893,3.61468],[3.46152,0.607778],[4.33752,1.76079],[3.50371,3.19001],[3.40563,1.50958],[3.1378,2.88518],[4.40148,1.54459],[4.13512,0.583569],[4.06802,0.846218],[4.30141,2.17377],[6.04428,0.968096],[3.86413,1.97832],[3.18752,-0.733654],[4.02653,3.61394],[4.42729,1.27924],[4.62197,1.60904],[5.04945,1.12332],[4.80111,1.0004],[3.05661,2.89163],[4.5471,1.51924],[4.38651,2.06045],[3.64628,1.18917],[3.31088,1.5446],[3.40498,1.83957],[4.71147,1.06331],[4.4627,1.62578],[4.35737,1.68636],[3.78397,2.68689],[3.4901,1.42965],[5.33719,2.83525],[3.42189,2.39849],[5.40084,2.0729],[3.49195,1.27176],[5.20054,1.81946],[5.02062,3.12169],[2.88143,1.79591],[3.47377,0.304029],[3.3807,2.9214],[3.16259,1.92697],[5.43909,2.4936],[3.12432,-0.245102],[3.65157,2.32079],[5.32076,2.64406],[5.95196,2.34718],[3.99459,3.09277],[2.54809,0.304515],[3.22949,1.64147],[4.17319,1.51159],[3.51691,1.5211],[4.14277,1.75863],[5.05857,2.89743],[3.37293,3.03399],[3.02648,2.0196],[3.54421,0.404602],[5.32366,1.98756],[4.12981,1.76584],[4.13326,3.73752],[4.57039,2.6233],[4.03581,1.63009],[3.00189,0.309283],[4.80237,1.93155],[6.34828,3.40608],[3.81932,1.34245],[3.94452,0.43479],[3.16792,2.1007],[5.15145,0.156402],[3.79348,3.74637],[3.47298,3.11171],[4.71996,0.765451],[6.07289,1.73715],[4.36527,3.0904],[3.40047,2.28722],[3.16672,2.08881],[3.55276,1.19719],[2.41597,0.905331],[2.90756,2.7079],[3.02952,0.779155],[5.88928,3.96639],[6.75352,3.16495],[2.22401,0.747819],[3.29399,2.57897],[5.23395,0.135621],[3.79802,3.46749],[5.0805,1.73885],[4.88712,3.30506],[5.13531,1.67381],[4.73346,0.486428],[3.2049,1.00988],[5.70496,1.9031],[4.67584,0.276449],[5.13866,2.20648],[2.5785,2.57756],[3.91318,3.83189],[4.3922,2.47081],[4.27549,2.09958],[5.10295,1.6064],[4.12727,2.46322],[6.60671,1.85707],[5.07178,2.81713],[3.40247,3.04618],[3.82904,0.809016],[4.49292,1.24068],[5.80213,1.67903],[4.97453,1.43905],[3.8779,2.07236],[3.54677,0.995343],[5.64596,3.3643],[4.38632,1.01366],[4.61326,1.33746],[3.33918,2.0651],[4.03219,1.61442],[2.99429,2.6422],[3.40255,1.36743],[3.54656,1.53557],[3.39064,0.594683],[4.53339,2.11075],[5.27525,0.794415],[3.33009,2.36573],[5.30233,0.888047],[5.51321,0.75236],[4.99588,2.64882],[2.83979,2.00724],[3.38001,2.68709],[5.66265,0.304667],[3.58361,0.86464],[2.84571,1.073],[2.7726,1.73225],[3.90004,2.47639],[3.62095,2.18164],[5.3436,3.47816],[3.51512,0.823718],[4.46262,2.17817],[4.40171,3.53419],[3.9872,3.83401],[5.09439,2.49755],[4.20249,2.41219],[2.656,1.88663],[5.06165,2.53495],[5.57222,1.69438],[4.28401,1.47312],[2.8079,2.23739],[4.46162,2.13585],[2.95283,2.64055],[5.35301,2.07824],[3.90335,-0.683836],[3.00788,1.32646],[4.42474,-0.0665975],[3.89175,-0.123598],[4.13121,0.974831],[3.16771,2.4104],[2.75863,0.830174],[4.71313,3.66141],[4.78244,1.76472],[3.56522,2.98423],[4.30432,2.04723],[2.60641,2.58592],[3.50269,2.88396],[4.93694,1.75897],[3.02849,2.1004],[4.81724,1.00954],[4.99721,1.275],[4.31304,2.85771],[3.61069,0.523109],[5.53872,0.80619],[5.29917,2.20094],[5.14955,3.24897],[3.39327,0.458563],[3.23238,1.15704],[3.83503,3.11438],[3.65714,2.11895],[5.11601,1.16758],[3.34147,3.25322],[3.1263,1.82802],[3.2061,0.590072],[3.43179,-0.0167134],[3.81195,1.33002],[3.88664,3.47315],[5.83831,2.86165],[3.34298,2.26575],[3.37179,1.78727],[3.59695,2.59986],[4.21987,1.0853],[4.37553,2.51008],[4.65905,2.46544],[3.40894,2.76852],[2.32369,1.88198],[2.56419,1.22275],[3.70457,0.805297],[4.29823,1.5314],[2.83636,1.98292],[3.6995,2.0472],[3.17787,2.53054],[4.56895,2.83562],[4.4634,2.16338],[4.90568,0.986049],[2.43099,1.09595],[3.27759,1.70343],[3.6727,0.958632],[3.29115,0.687408],[3.11808,1.23728],[4.73996,1.79797],[4.28314,0.908598],[2.87764,1.76494],[5.78612,1.21794],[3.85484,0.676338],[1.81005,0.521859],[5.08158,3.14761],[4.47877,1.07505],[3.25055,1.26346],[4.49085,0.598314],[4.70102,1.25807],[4.27176,2.45025],[4.64556,2.11961],[2.97072,2.66835],[3.13197,1.89829],[4.12659,2.09278],[3.66781,1.58145],[3.77774,1.60765],[4.81055,1.78388],[3.13676,1.45632],[2.21122,1.3565],[4.96993,1.13866],[4.86986,1.4758],[3.66911,1.63581],[5.42712,-0.00227924],[3.06192,1.54713],[2.11941,1.63611],[3.87217,2.4527],[4.80869,0.840315],[2.45702,1.5606],[3.64319,3.15402],[3.30496,0.487109],[2.7459,2.34494],[4.34352,1.14973],[3.74136,1.42559],[4.4198,1.52069],[3.75995,3.72486],[4.80209,1.93275],[3.96526,1.21722],[3.35732,2.29249],[3.62885,-0.429249],[3.22603,2.96427],[3.62481,2.38114],[3.45282,3.03169],[4.53532,2.01011],[3.95358,3.87537],[3.48932,1.96806],[4.84727,1.32824],[3.85229,1.17775],[2.4404,0.453041],[4.82672,2.03686],[3.80614,3.30024],[4.06227,1.3689],[2.8646,1.66293],[4.44741,1.1942],[3.05267,0.909236],[4.58495,2.68072],[2.85923,2.2521],[3.73195,2.58826],[4.78971,1.43877],[4.15894,1.61758],[3.25508,0.545322],[5.02719,1.37286],[3.43938,1.15216],[3.00012,0.414355],[4.35365,3.37779],[4.19052,0.691015],[4.61459,2.46306],[3.81289,1.33324],[4.17317,1.34858],[3.95648,0.444769],[2.10317,0.487881],[3.44247,1.77897],[4.36134,0.587382],[4.20664,2.08251],[4.94682,2.05194],[4.65345,3.05719],[3.00723,2.51911],[4.25672,1.73694],[3.39661,2.64471],[3.27206,2.67635],[3.56145,2.1228],[5.03416,2.92841],[4.58196,3.22822],[5.6661,1.25857],[3.74249,1.19142],[3.88151,0.650696],[2.56907,1.72454],[2.8938,2.84868],[1.69351,1.5695],[3.08583,0.755853],[3.68971,2.35527],[4.49967,1.7264],[4.19497,1.46661],[4.47416,2.66735],[4.51957,2.88868],[3.5666,0.430536],[4.11812,1.46994],[4.35095,1.7384],[5.13064,1.29269],[4.4222,2.18762],[4.48522,0.574062],[3.99409,1.40086],[3.928,1.55452],[3.63594,1.43257],[3.20243,0.486349],[3.49566,0.427867],[2.00703,-1.38656],[5.81417,0.799486],[4.73906,0.314631],[4.4242,1.66228],[4.11083,1.06236],[2.89089,2.10876],[4.93655,2.20676],[4.36966,1.10569],[4.68958,1.07878],[4.51051,1.71608],[3.99744,1.60737],[3.0042,1.22964],[3.01304,2.36387],[5.06641,0.906247],[5.60716,2.80819]] color=darkseagreen3 isColorExplicitlySet=true fillStyle=solid lineStyle=solid pointStyle=fsquare lineWidth=1] + + + +.. GENERATED FROM PYTHON SOURCE LINES 97-98 + +## Draw the limit state surface + +.. GENERATED FROM PYTHON SOURCE LINES 100-104 + +.. code-block:: Python + + bounds = ot.Interval(lowerBound, upperBound) + bounds + + + + + + + +.. raw:: html + +
+ class=Interval name=Unnamed dimension=2 lower bound=class=Point name=Unnamed dimension=2 values=[0.909768,-1.09023] upper bound=class=Point name=Unnamed dimension=2 values=[7.09023,5.09023] finite lower bound=[1,1] finite upper bound=[1,1] +
+
+
+ +.. GENERATED FROM PYTHON SOURCE LINES 105-109 + +.. code-block:: Python + + graph = drawEvent.drawLimitStateCrossCut(bounds) + graph.add(cloud) + graph + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + class=Graph name=Limit state surface implementation=class=GraphImplementation name=Limit state surface title=Limit state surface xTitle=R yTitle=S axes=ON grid=ON legendposition= legendFontSize=1 drawables=[class=Drawable name=Unnamed implementation=class=Contour name=Unnamed x=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=52 dimension=1 description=[t] data=[[0.909768],[1.03095],[1.15214],[1.27332],[1.39451],[1.5157],[1.63688],[1.75807],[1.87925],[2.00044],[2.12162],[2.24281],[2.36399],[2.48518],[2.60637],[2.72755],[2.84874],[2.96992],[3.09111],[3.21229],[3.33348],[3.45466],[3.57585],[3.69704],[3.81822],[3.93941],[4.06059],[4.18178],[4.30296],[4.42415],[4.54534],[4.66652],[4.78771],[4.90889],[5.03008],[5.15126],[5.27245],[5.39363],[5.51482],[5.63601],[5.75719],[5.87838],[5.99956],[6.12075],[6.24193],[6.36312],[6.4843],[6.60549],[6.72668],[6.84786],[6.96905],[7.09023]] y=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=52 dimension=1 description=[t] data=[[-1.09023],[-0.969047],[-0.847861],[-0.726676],[-0.60549],[-0.484304],[-0.363119],[-0.241933],[-0.120748],[0.00043792],[0.121624],[0.242809],[0.363995],[0.48518],[0.606366],[0.727551],[0.848737],[0.969923],[1.09111],[1.21229],[1.33348],[1.45466],[1.57585],[1.69704],[1.81822],[1.93941],[2.06059],[2.18178],[2.30296],[2.42415],[2.54534],[2.66652],[2.78771],[2.90889],[3.03008],[3.15126],[3.27245],[3.39363],[3.51482],[3.63601],[3.75719],[3.87838],[3.99956],[4.12075],[4.24193],[4.36312],[4.4843],[4.60549],[4.72668],[4.84786],[4.96905],[5.09023]] levels=class=Point name=Unnamed dimension=1 values=[0] labels=[0.0] show labels=true isFilled=false colorBarPosition=right isVminUsed=false vmin=0 isVmaxUsed=false vmax=0 colorMap=hsv alpha=1 norm=linear extend=both hatches=[] derived from class=DrawableImplementation name=Unnamed legend= data=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=2704 dimension=1 description=[y0] data=[[2],[2.12119],[2.24237],...,[1.75763],[1.87881],[2]] color=#1f77b4 isColorExplicitlySet=true fillStyle=solid lineStyle=solid pointStyle=plus lineWidth=1,class=Drawable name=In implementation=class=Cloud name=In derived from class=DrawableImplementation name=In legend=In data=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=40 dimension=2 data=[[2.84794,3.13143],[3.03313,3.36216],[2.27186,2.54362],[3.35218,3.7689],[4.23963,5.14934],[4.14925,4.21609],[2.72662,4.18324],[3.09634,3.23719],[2.72895,4.08218],[1.84192,2.21674],[3.50003,3.86472],[1.78046,1.88615],[1.22187,2.74547],[1.98527,2.66409],[3.76457,4.43539],[1.28243,2.94183],[2.29633,2.73309],[2.08868,3.38256],[2.40596,2.55732],[1.85371,3.30761],[3.07654,3.32548],[3.59569,3.64894],[1.95447,2.98333],[2.79903,3.12172],[2.30512,2.73431],[1.3691,2.51587],[2.57913,2.65806],[2.60908,3.46425],[2.79539,2.92518],[2.01425,2.29286],[3.95606,4.785],[2.34126,2.39601],[2.67873,2.77487],[2.48932,2.49644],[2.0482,2.37931],[2.5233,2.77569],[2.88083,3.73397],[2.35268,2.73377],[2.348,2.72118],[3.13783,3.54341]] color=lightsalmon3 isColorExplicitlySet=true fillStyle=solid lineStyle=solid pointStyle=fsquare lineWidth=1,class=Drawable name=Out implementation=class=Cloud name=Out derived from class=DrawableImplementation name=Out legend=Out data=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=460 dimension=2 data=[[4.35026,1.29234],[4.68621,0.908927],[3.01115,1.40344],[3.50866,3.15769],[3.79295,3.16403],[4.71952,1.6706],[4.3356,0.198451],[5.18927,2.13847],[3.59429,2.22317],[3.38294,2.16207],[6.40376,3.29444],[3.75542,3.65681],[3.63792,1.84985],[4.9926,2.60549],[3.69771,1.60758],[3.68808,1.54374],[2.8391,2.65487],[4.56256,0.971149],[4.00098,0.329665],[3.51013,1.87964],[3.81391,2.95889],[3.85267,3.45666],[3.82407,0.580057],[4.05976,2.34231],[3.66303,2.20786],[3.4274,1.50067],[5.03193,2.0723],[3.67681,1.62181],[3.44163,2.70091],[3.61272,3.21288],[3.37149,3.07344],[4.73685,3.95794],[3.41443,1.86585],[4.67718,2.81964],[4.6357,2.5671],[4.56039,3.01142],[4.6493,1.30285],[4.4342,2.28152],[4.62429,2.79761],[3.85577,1.07079],[3.96862,2.84883],[4.91546,1.9686],[5.85819,2.81925],[2.81286,1.90193],[2.89699,2.63801],[2.7418,1.3852],[4.23069,3.63038],[5.64923,0.0684376],[3.82313,2.29727],[4.66357,3.75243],[2.82768,2.06805],[3.91966,0.561955],[4.87361,2.53958],[4.16262,1.29641],[3.38688,2.32212],[3.46634,2.18472],[5.46486,2.41553],[4.73009,1.80676],[4.55434,0.767514],[2.5174,1.67429],[3.83679,1.66813],[3.98352,2.15097],[4.34576,2.30071],[4.92467,2.27178],[5.15621,1.03455],[4.1623,1.14283],[4.30336,1.69355],[2.40131,2.39066],[3.8446,1.48262],[3.98215,0.95148],[6.01831,1.51696],[4.1337,2.47821],[3.36645,1.81001],[3.92165,2.07885],[2.68099,1.99622],[3.47068,1.01259],[4.51546,2.34164],[2.87629,1.03078],[4.09903,3.03789],[4.46426,1.6623],[4.51593,4.28301],[2.89504,-0.106884],[4.41636,1.56521],[2.98772,0.00848427],[3.39969,1.06099],[4.26769,2.97759],[4.84817,2.59607],[3.99961,2.46304],[5.06598,2.67699],[5.6794,1.59303],[3.13878,3.00923],[4.00395,2.6914],[2.51641,0.820378],[3.39076,1.14559],[3.85028,1.78008],[4.0651,2.42479],[3.57507,1.00669],[3.33987,1.64731],[5.26053,0.227213],[2.68473,0.962189],[3.93753,2.73003],[4.6181,2.0208],[3.77718,1.7894],[3.95126,1.84816],[2.84689,1.35359],[3.73026,2.40139],[4.93608,2.72111],[3.37109,2.95301],[3.29007,2.19448],[4.03112,2.39802],[3.93072,2.05087],[4.60804,2.26075],[3.46405,0.9533],[4.17166,0.801968],[5.57695,2.14876],[4.32876,1.76656],[4.16918,1.76958],[5.05114,2.16115],[3.29638,1.17956],[3.59862,2.82791],[3.11772,2.86527],[3.33769,2.50854],[3.47063,1.7371],[4.47916,1.91055],[4.66766,2.87823],[4.03081,1.19919],[3.60619,1.31126],[4.80648,2.16949],[2.61849,2.45629],[5.16024,1.22328],[3.4537,0.121681],[4.68065,0.704944],[3.74731,2.28946],[2.44144,2.11445],[4.96235,2.60172],[5.58297,0.919859],[4.71721,1.52374],[4.03699,0.926182],[4.44893,3.61468],[3.46152,0.607778],[4.33752,1.76079],[3.50371,3.19001],[3.40563,1.50958],[3.1378,2.88518],[4.40148,1.54459],[4.13512,0.583569],[4.06802,0.846218],[4.30141,2.17377],[6.04428,0.968096],[3.86413,1.97832],[3.18752,-0.733654],[4.02653,3.61394],[4.42729,1.27924],[4.62197,1.60904],[5.04945,1.12332],[4.80111,1.0004],[3.05661,2.89163],[4.5471,1.51924],[4.38651,2.06045],[3.64628,1.18917],[3.31088,1.5446],[3.40498,1.83957],[4.71147,1.06331],[4.4627,1.62578],[4.35737,1.68636],[3.78397,2.68689],[3.4901,1.42965],[5.33719,2.83525],[3.42189,2.39849],[5.40084,2.0729],[3.49195,1.27176],[5.20054,1.81946],[5.02062,3.12169],[2.88143,1.79591],[3.47377,0.304029],[3.3807,2.9214],[3.16259,1.92697],[5.43909,2.4936],[3.12432,-0.245102],[3.65157,2.32079],[5.32076,2.64406],[5.95196,2.34718],[3.99459,3.09277],[2.54809,0.304515],[3.22949,1.64147],[4.17319,1.51159],[3.51691,1.5211],[4.14277,1.75863],[5.05857,2.89743],[3.37293,3.03399],[3.02648,2.0196],[3.54421,0.404602],[5.32366,1.98756],[4.12981,1.76584],[4.13326,3.73752],[4.57039,2.6233],[4.03581,1.63009],[3.00189,0.309283],[4.80237,1.93155],[6.34828,3.40608],[3.81932,1.34245],[3.94452,0.43479],[3.16792,2.1007],[5.15145,0.156402],[3.79348,3.74637],[3.47298,3.11171],[4.71996,0.765451],[6.07289,1.73715],[4.36527,3.0904],[3.40047,2.28722],[3.16672,2.08881],[3.55276,1.19719],[2.41597,0.905331],[2.90756,2.7079],[3.02952,0.779155],[5.88928,3.96639],[6.75352,3.16495],[2.22401,0.747819],[3.29399,2.57897],[5.23395,0.135621],[3.79802,3.46749],[5.0805,1.73885],[4.88712,3.30506],[5.13531,1.67381],[4.73346,0.486428],[3.2049,1.00988],[5.70496,1.9031],[4.67584,0.276449],[5.13866,2.20648],[2.5785,2.57756],[3.91318,3.83189],[4.3922,2.47081],[4.27549,2.09958],[5.10295,1.6064],[4.12727,2.46322],[6.60671,1.85707],[5.07178,2.81713],[3.40247,3.04618],[3.82904,0.809016],[4.49292,1.24068],[5.80213,1.67903],[4.97453,1.43905],[3.8779,2.07236],[3.54677,0.995343],[5.64596,3.3643],[4.38632,1.01366],[4.61326,1.33746],[3.33918,2.0651],[4.03219,1.61442],[2.99429,2.6422],[3.40255,1.36743],[3.54656,1.53557],[3.39064,0.594683],[4.53339,2.11075],[5.27525,0.794415],[3.33009,2.36573],[5.30233,0.888047],[5.51321,0.75236],[4.99588,2.64882],[2.83979,2.00724],[3.38001,2.68709],[5.66265,0.304667],[3.58361,0.86464],[2.84571,1.073],[2.7726,1.73225],[3.90004,2.47639],[3.62095,2.18164],[5.3436,3.47816],[3.51512,0.823718],[4.46262,2.17817],[4.40171,3.53419],[3.9872,3.83401],[5.09439,2.49755],[4.20249,2.41219],[2.656,1.88663],[5.06165,2.53495],[5.57222,1.69438],[4.28401,1.47312],[2.8079,2.23739],[4.46162,2.13585],[2.95283,2.64055],[5.35301,2.07824],[3.90335,-0.683836],[3.00788,1.32646],[4.42474,-0.0665975],[3.89175,-0.123598],[4.13121,0.974831],[3.16771,2.4104],[2.75863,0.830174],[4.71313,3.66141],[4.78244,1.76472],[3.56522,2.98423],[4.30432,2.04723],[2.60641,2.58592],[3.50269,2.88396],[4.93694,1.75897],[3.02849,2.1004],[4.81724,1.00954],[4.99721,1.275],[4.31304,2.85771],[3.61069,0.523109],[5.53872,0.80619],[5.29917,2.20094],[5.14955,3.24897],[3.39327,0.458563],[3.23238,1.15704],[3.83503,3.11438],[3.65714,2.11895],[5.11601,1.16758],[3.34147,3.25322],[3.1263,1.82802],[3.2061,0.590072],[3.43179,-0.0167134],[3.81195,1.33002],[3.88664,3.47315],[5.83831,2.86165],[3.34298,2.26575],[3.37179,1.78727],[3.59695,2.59986],[4.21987,1.0853],[4.37553,2.51008],[4.65905,2.46544],[3.40894,2.76852],[2.32369,1.88198],[2.56419,1.22275],[3.70457,0.805297],[4.29823,1.5314],[2.83636,1.98292],[3.6995,2.0472],[3.17787,2.53054],[4.56895,2.83562],[4.4634,2.16338],[4.90568,0.986049],[2.43099,1.09595],[3.27759,1.70343],[3.6727,0.958632],[3.29115,0.687408],[3.11808,1.23728],[4.73996,1.79797],[4.28314,0.908598],[2.87764,1.76494],[5.78612,1.21794],[3.85484,0.676338],[1.81005,0.521859],[5.08158,3.14761],[4.47877,1.07505],[3.25055,1.26346],[4.49085,0.598314],[4.70102,1.25807],[4.27176,2.45025],[4.64556,2.11961],[2.97072,2.66835],[3.13197,1.89829],[4.12659,2.09278],[3.66781,1.58145],[3.77774,1.60765],[4.81055,1.78388],[3.13676,1.45632],[2.21122,1.3565],[4.96993,1.13866],[4.86986,1.4758],[3.66911,1.63581],[5.42712,-0.00227924],[3.06192,1.54713],[2.11941,1.63611],[3.87217,2.4527],[4.80869,0.840315],[2.45702,1.5606],[3.64319,3.15402],[3.30496,0.487109],[2.7459,2.34494],[4.34352,1.14973],[3.74136,1.42559],[4.4198,1.52069],[3.75995,3.72486],[4.80209,1.93275],[3.96526,1.21722],[3.35732,2.29249],[3.62885,-0.429249],[3.22603,2.96427],[3.62481,2.38114],[3.45282,3.03169],[4.53532,2.01011],[3.95358,3.87537],[3.48932,1.96806],[4.84727,1.32824],[3.85229,1.17775],[2.4404,0.453041],[4.82672,2.03686],[3.80614,3.30024],[4.06227,1.3689],[2.8646,1.66293],[4.44741,1.1942],[3.05267,0.909236],[4.58495,2.68072],[2.85923,2.2521],[3.73195,2.58826],[4.78971,1.43877],[4.15894,1.61758],[3.25508,0.545322],[5.02719,1.37286],[3.43938,1.15216],[3.00012,0.414355],[4.35365,3.37779],[4.19052,0.691015],[4.61459,2.46306],[3.81289,1.33324],[4.17317,1.34858],[3.95648,0.444769],[2.10317,0.487881],[3.44247,1.77897],[4.36134,0.587382],[4.20664,2.08251],[4.94682,2.05194],[4.65345,3.05719],[3.00723,2.51911],[4.25672,1.73694],[3.39661,2.64471],[3.27206,2.67635],[3.56145,2.1228],[5.03416,2.92841],[4.58196,3.22822],[5.6661,1.25857],[3.74249,1.19142],[3.88151,0.650696],[2.56907,1.72454],[2.8938,2.84868],[1.69351,1.5695],[3.08583,0.755853],[3.68971,2.35527],[4.49967,1.7264],[4.19497,1.46661],[4.47416,2.66735],[4.51957,2.88868],[3.5666,0.430536],[4.11812,1.46994],[4.35095,1.7384],[5.13064,1.29269],[4.4222,2.18762],[4.48522,0.574062],[3.99409,1.40086],[3.928,1.55452],[3.63594,1.43257],[3.20243,0.486349],[3.49566,0.427867],[2.00703,-1.38656],[5.81417,0.799486],[4.73906,0.314631],[4.4242,1.66228],[4.11083,1.06236],[2.89089,2.10876],[4.93655,2.20676],[4.36966,1.10569],[4.68958,1.07878],[4.51051,1.71608],[3.99744,1.60737],[3.0042,1.22964],[3.01304,2.36387],[5.06641,0.906247],[5.60716,2.80819]] color=darkseagreen3 isColorExplicitlySet=true fillStyle=solid lineStyle=solid pointStyle=fsquare lineWidth=1] + + + +.. GENERATED FROM PYTHON SOURCE LINES 110-111 + +## Fill the event domain with a color + +.. GENERATED FROM PYTHON SOURCE LINES 113-116 + +.. code-block:: Python + + domain = drawEvent.fillEventCrossCut(bounds) + _ = otv.View(domain) + + + + +.. image-sg:: /auto_examples/reliability_problems/images/sphx_glr_plot_case_rs_004.png + :alt: Domain where g(x) < 0.0 + :srcset: /auto_examples/reliability_problems/images/sphx_glr_plot_case_rs_004.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 117-121 + +.. code-block:: Python + + domain.setLegends(["", ""]) + domain.add(cloud) + _ = otv.View(domain) + + + + +.. image-sg:: /auto_examples/reliability_problems/images/sphx_glr_plot_case_rs_005.png + :alt: Domain where g(x) < 0.0 + :srcset: /auto_examples/reliability_problems/images/sphx_glr_plot_case_rs_005.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 122-123 + +.. code-block:: Python + + otv.View.ShowAll() + + + + + + + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 1.635 seconds) + + +.. _sphx_glr_download_auto_examples_reliability_problems_plot_case_rs.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: plot_case_rs.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: plot_case_rs.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: plot_case_rs.zip ` diff --git a/otbenchmark/master/_sources/auto_examples/reliability_problems/plot_compute_reference_rp55_pf.rst b/otbenchmark/master/_sources/auto_examples/reliability_problems/plot_compute_reference_rp55_pf.rst new file mode 100644 index 00000000000..c6927586d49 --- /dev/null +++ b/otbenchmark/master/_sources/auto_examples/reliability_problems/plot_compute_reference_rp55_pf.rst @@ -0,0 +1,1071 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "auto_examples/reliability_problems/plot_compute_reference_rp55_pf.py" +.. LINE NUMBERS ARE GIVEN BELOW. + +.. only:: html + + .. note:: + :class: sphx-glr-download-link-note + + :ref:`Go to the end ` + to download the full example code. + +.. rst-class:: sphx-glr-example-title + +.. _sphx_glr_auto_examples_reliability_problems_plot_compute_reference_rp55_pf.py: + + +Compute reference probability for RP55 +====================================== + +.. GENERATED FROM PYTHON SOURCE LINES 7-11 + +The goal of this example is to present how we computed the reference probability for problem 55 of the BBRC. +This calculation is based on the geometry of the failure domain. +In order to compute its surface, we use the `shapely` module, +which allows to compute the surface of bidimensional polygons. + +.. GENERATED FROM PYTHON SOURCE LINES 13-19 + +.. code-block:: Python + + import openturns as ot + import openturns.viewer as otv + import numpy as np + import otbenchmark as otb + from shapely.geometry import Polygon + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 20-22 + +.. code-block:: Python + + problem = otb.ReliabilityProblem55() + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 23-26 + +.. code-block:: Python + + event = problem.getEvent() + g = event.getFunction() + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 27-29 + +.. code-block:: Python + + problem.getProbability() + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + 0.5600144282863704 + + + +.. GENERATED FROM PYTHON SOURCE LINES 30-32 + +Compute the bounds of the domain +-------------------------------- + +.. GENERATED FROM PYTHON SOURCE LINES 34-47 + +.. code-block:: Python + + inputVector = event.getAntecedent() + distribution = inputVector.getDistribution() + X1 = distribution.getMarginal(0) + X2 = distribution.getMarginal(1) + alphaMin = 0.00001 + alphaMax = 1 - alphaMin + lowerBound = ot.Point( + [X1.computeQuantile(alphaMin)[0], X2.computeQuantile(alphaMin)[0]] + ) + upperBound = ot.Point( + [X1.computeQuantile(alphaMax)[0], X2.computeQuantile(alphaMax)[0]] + ) + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 48-50 + +Print the iso-values of the distribution +---------------------------------------- + +.. GENERATED FROM PYTHON SOURCE LINES 52-57 + +.. code-block:: Python + + sampleSize = 5000 + sampleInput = inputVector.getSample(sampleSize) + sampleOutput = g(sampleInput) + drawEvent = otb.DrawEvent(event) + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 58-61 + +.. code-block:: Python + + cloud = drawEvent.drawSampleCrossCut(sampleSize) + _ = otv.View(cloud) + + + + +.. image-sg:: /auto_examples/reliability_problems/images/sphx_glr_plot_compute_reference_rp55_pf_001.png + :alt: Points X s.t. g(X) < 0.0 + :srcset: /auto_examples/reliability_problems/images/sphx_glr_plot_compute_reference_rp55_pf_001.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 62-64 + +Draw the limit state surface +---------------------------- + +.. GENERATED FROM PYTHON SOURCE LINES 66-69 + +.. code-block:: Python + + bounds = ot.Interval(lowerBound, upperBound) + bounds + + + + + + +.. raw:: html + +
+ class=Interval name=Unnamed dimension=2 lower bound=class=Point name=Unnamed dimension=2 values=[-0.99998,-0.99998] upper bound=class=Point name=Unnamed dimension=2 values=[0.99998,0.99998] finite lower bound=[1,1] finite upper bound=[1,1] +
+
+
+ +.. GENERATED FROM PYTHON SOURCE LINES 70-73 + +.. code-block:: Python + + domain = drawEvent.fillEventCrossCut(bounds) + _ = otv.View(domain) + + + + +.. image-sg:: /auto_examples/reliability_problems/images/sphx_glr_plot_compute_reference_rp55_pf_002.png + :alt: Domain where g(x) < 0.0 + :srcset: /auto_examples/reliability_problems/images/sphx_glr_plot_compute_reference_rp55_pf_002.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 74-76 + +From integration +---------------- + +.. GENERATED FROM PYTHON SOURCE LINES 78-81 + +.. code-block:: Python + + interval = ot.Interval([-1.0, -1.0], [1.0, 1.0]) + interval + + + + + + +.. raw:: html + +
+ class=Interval name=Unnamed dimension=2 lower bound=class=Point name=Unnamed dimension=2 values=[-1,-1] upper bound=class=Point name=Unnamed dimension=2 values=[1,1] finite lower bound=[1,1] finite upper bound=[1,1] +
+
+
+ +.. GENERATED FROM PYTHON SOURCE LINES 82-85 + +.. code-block:: Python + + threshold = event.getThreshold() + threshold + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + 0.0 + + + +.. GENERATED FROM PYTHON SOURCE LINES 86-90 + +.. code-block:: Python + + mean = distribution.getMean() + mean + + + + + + + +.. raw:: html + +
+ class=Point name=Unnamed dimension=2 values=[0,0] +
+
+
+ +.. GENERATED FROM PYTHON SOURCE LINES 91-108 + +.. code-block:: Python + + + + def ComputeIntegrandPoint(x): + """Evaluate the integrand on one single point.""" + y = g(x) + if y[0] < threshold: + indicator = 1.0 + else: + indicator = 0.0 + pdf = distribution.computePDF(x) + z = [indicator * pdf] + return z + + + integrand = ot.PythonFunction(2, 1, ComputeIntegrandPoint) + + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 109-112 + +.. code-block:: Python + + integrand(mean) + + + + + + + +.. raw:: html + +
+ class=Point name=Unnamed dimension=1 values=[0] +
+
+
+ +.. GENERATED FROM PYTHON SOURCE LINES 113-119 + +.. code-block:: Python + + dimension = distribution.getDimension() + totalNumberOfPoints = 10 ** 4 + numberOfPointsInX = int(totalNumberOfPoints ** (1.0 / dimension)) + numberOfPointsInX + + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + 100 + + + +.. GENERATED FROM PYTHON SOURCE LINES 120-125 + +.. code-block:: Python + + algoGL = ot.GaussLegendre([numberOfPointsInX] * dimension) + value = algoGL.integrate(integrand, interval) + value + + + + + + + +.. raw:: html + +
+ class=Point name=Unnamed dimension=1 values=[0.558822] +
+
+
+ +.. GENERATED FROM PYTHON SOURCE LINES 126-137 + +.. code-block:: Python + + + + def ComputeIntegrandSample(sample): + """Evaluate the integrand on a sample.""" + indicatorBoolean = np.array(g(sample)) < threshold + indicator = np.array(indicatorBoolean, float) + pdf = np.array(distribution.computePDF(sample)) + z = indicator * pdf + return z + + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 138-141 + +.. code-block:: Python + + integrandSample = ot.PythonFunction(2, 1, func_sample=ComputeIntegrandSample) + + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 142-145 + +.. code-block:: Python + + sample = distribution.getSample(5) + integrandSample(sample) + + + + + + +.. raw:: html + +
+ + + + + + + +
y0
00
10
20.25
30.25
40
+
+
+
+ +.. GENERATED FROM PYTHON SOURCE LINES 146-148 + +.. code-block:: Python + + integrandSample(mean) + + + + + + +.. raw:: html + +
+ class=Point name=Unnamed dimension=1 values=[0] +
+
+
+ +.. GENERATED FROM PYTHON SOURCE LINES 149-154 + +.. code-block:: Python + + dimension = distribution.getDimension() + totalNumberOfPoints = 10 ** 6 + numberOfPointsInX = int(totalNumberOfPoints ** (1.0 / dimension)) + numberOfPointsInX + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + 1000 + + + +.. GENERATED FROM PYTHON SOURCE LINES 155-160 + +.. code-block:: Python + + discretization = [numberOfPointsInX] * dimension + algoGL = ot.GaussLegendre(discretization) + value = algoGL.integrate(integrandSample, interval) + value + + + + + + +.. raw:: html + +
+ class=Point name=Unnamed dimension=1 values=[0.559983] +
+
+
+ +.. GENERATED FROM PYTHON SOURCE LINES 161-172 + +Exact computation +----------------- + +We solve the exact equation: + +https://www.wolframalpha.com/input/?i=solve+min%280.2+%2B+0.6+*+%28x+-+y%29%5E4+-+%28x+-+y%29+%2F+sqrt%282%29%2C+0.2+%2B+0.6+*+%28x+-+y%29%5E4+%2B+%28x+-+y%29+%2F+sqrt%282%29%2C+%28x+-+y%29+%2B+5+%2F+sqrt%282%29+-+2.2%2C+%28y+-+x%29+%2B+5+%2F+sqrt%282%29+-+2.2%29+%3D+0 + +``` +solve (x - y) + 5 / sqrt(2) - 22/10 = 0 +solve 2/10 + 6/10 * d^4 - d / sqrt(2) +``` + +.. GENERATED FROM PYTHON SOURCE LINES 174-177 + +.. code-block:: Python + + domain = drawEvent.fillEventCrossCut(bounds) + _ = otv.View(domain) + + + + +.. image-sg:: /auto_examples/reliability_problems/images/sphx_glr_plot_compute_reference_rp55_pf_003.png + :alt: Domain where g(x) < 0.0 + :srcset: /auto_examples/reliability_problems/images/sphx_glr_plot_compute_reference_rp55_pf_003.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 178-179 + +We first compute the exact equations defining the slanted lines at the limit state. + +.. GENERATED FROM PYTHON SOURCE LINES 179-192 + +.. code-block:: Python + + palette = [ + "dodgerblue3", + "darkorange1", + "forestgreen", + "firebrick3", + "mediumpurple3", + "lightsalmon4", + "orchid", + "gray50", + "goldenrod3", + "turquoise3", + ] + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 193-194 + +The goal is to define the failure domain. + +.. GENERATED FROM PYTHON SOURCE LINES 194-197 + +.. code-block:: Python + + root1 = 5.0 / np.sqrt(2.0) - 2.2 + root1 + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + 1.3355339059327371 + + + +.. GENERATED FROM PYTHON SOURCE LINES 198-201 + +.. code-block:: Python + + root2 = 0.2887406174573670970 + root2 + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + 0.2887406174573671 + + + +.. GENERATED FROM PYTHON SOURCE LINES 202-205 + +.. code-block:: Python + + root3 = 0.9370483776955247344172976 + root3 + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + 0.9370483776955247 + + + +.. GENERATED FROM PYTHON SOURCE LINES 206-213 + +.. code-block:: Python + + root2 = 0.2887406174573670970 + f1full = ot.SymbolicFunction(["x", "root2"], ["x-root2"]) + f1 = ot.ParametricFunction(f1full, [1], [root2]) + graph1 = f1.draw(root2 - 1.0, 1.0, 100) + graph1.setColors([palette[0]]) + graph1.setLegends(["f1"]) + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 214-220 + +.. code-block:: Python + + f2full = ot.SymbolicFunction(["x", "root3"], ["x-root3"]) + f2 = ot.ParametricFunction(f2full, [1], [root3]) + graph2 = f2.draw(root3 - 1.0, 1.0, 100) + graph2.setColors([palette[1]]) + graph2.setLegends(["f2"]) + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 221-227 + +.. code-block:: Python + + f3full = ot.SymbolicFunction(["x", "root1"], ["x-root1"]) + f3 = ot.ParametricFunction(f3full, [1], [root1]) + graph3 = f3.draw(root1 - 1.0, 1.0, 100) + graph3.setColors([palette[2]]) + graph3.setLegends(["f3"]) + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 228-234 + +.. code-block:: Python + + f4full = ot.SymbolicFunction(["x", "root2"], ["x+root2"]) + f4 = ot.ParametricFunction(f4full, [1], [root2]) + graph4 = f4.draw(-1.0, 1.0 - root2, 100) + graph4.setColors([palette[3]]) + graph4.setLegends(["f4"]) + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 235-241 + +.. code-block:: Python + + f5full = ot.SymbolicFunction(["x", "root3"], ["x+root3"]) + f5 = ot.ParametricFunction(f5full, [1], [root3]) + graph5 = f5.draw(-1.0, 1.0 - root3, 100) + graph5.setColors([palette[4]]) + graph5.setLegends(["f5"]) + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 242-248 + +.. code-block:: Python + + f6full = ot.SymbolicFunction(["x", "root1"], ["x+root1"]) + f6 = ot.ParametricFunction(f6full, [1], [root1]) + graph6 = f6.draw(-1.0, 1.0 - root1, 100) + graph6.setColors([palette[5]]) + graph6.setLegends(["f6"]) + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 249-257 + +.. code-block:: Python + + domain.add(graph1) + domain.add(graph2) + domain.add(graph3) + domain.add(graph4) + domain.add(graph5) + domain.add(graph6) + _ = otv.View(domain) + + + + +.. image-sg:: /auto_examples/reliability_problems/images/sphx_glr_plot_compute_reference_rp55_pf_004.png + :alt: Domain where g(x) < 0.0 + :srcset: /auto_examples/reliability_problems/images/sphx_glr_plot_compute_reference_rp55_pf_004.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 258-259 + +Then we set the corners of the polygons in the failure domain. + +.. GENERATED FROM PYTHON SOURCE LINES 259-278 + +.. code-block:: Python + + data = [ + [-1.0, 1.0], + [1.0, f1([1.0])[0]], + [1.0, f2([1.0])[0]], + [1.0, f3([1.0])[0]], + [-1.0, f4([-1.0])[0]], + [-1.0, f5([-1.0])[0]], + [-1.0, f6([-1.0])[0]], + [root1 - 1.0, -1.0], + [root2 - 1.0, -1.0], + [root3 - 1.0, -1.0], + [1.0 - root1, 1.0], + [1.0 - root2, 1.0], + [1.0 - root3, 1.0], + [1.0, -1.0], + ] + sample = ot.Sample(data) + sample + + + + + + +.. raw:: html + +
+ + + + + + + + + + + + + + + + +
v0v1
0-11
110.7112594
210.06295162
31-0.3355339
4-1-0.7112594
5-1-0.06295162
6-10.3355339
70.3355339-1
8-0.7112594-1
9-0.06295162-1
10-0.33553391
110.71125941
120.062951621
131-1
+
+
+
+ +.. GENERATED FROM PYTHON SOURCE LINES 279-285 + +.. code-block:: Python + + cloud = ot.Cloud(sample) + domain.add(cloud) + extendedBounds = ot.Interval([-1.5, -1.5], [2.0, 2.0]) + domain.setBoundingBox(extendedBounds) + domain + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + class=Graph name=Domain where g(x) < 0.0 implementation=class=GraphImplementation name=Domain where g(x) < 0.0 title=Domain where g(x) < 0.0 xTitle=x1 yTitle=x2 axes=ON grid=ON legendposition=topright legendFontSize=1 drawables=[class=Drawable name=Unnamed implementation=class=PolygonArray name=Unnamed derived from class=DrawableImplementation name=Unnamed legend=In data=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=11352 dimension=2 data=[[-0.679986,-0.99998],[-0.639987,-0.99998],[-0.679986,-0.959981],...,[0.719986,0.99998],[0.679986,0.99998],[0.679986,0.99998]] color=blue isColorExplicitlySet=true fillStyle=solid lineStyle=solid pointStyle=plus lineWidth=1 vertices number=4 palette=[lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1],class=Drawable name=Unnamed implementation=class=PolygonArray name=Unnamed derived from class=DrawableImplementation name=Unnamed legend=Out data=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=8648 dimension=2 data=[[-0.99998,-0.99998],[-0.959981,-0.99998],[-0.99998,-0.959981],...,[0.99998,0.99998],[0.959981,0.99998],[0.959981,0.99998]] color=blue isColorExplicitlySet=true fillStyle=solid lineStyle=solid pointStyle=plus lineWidth=1 vertices number=4 palette=[darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1],class=Drawable name=Unnamed implementation=class=Curve name=Unnamed derived from class=DrawableImplementation name=Unnamed legend=f1 data=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=100 dimension=2 data=[[-0.711259,-1],[-0.693974,-0.982715],[-0.676688,-0.965429],[-0.659403,-0.948144],[-0.642118,-0.930858],[-0.624832,-0.913573],[-0.607547,-0.896287],[-0.590261,-0.879002],[-0.572976,-0.861716],[-0.55569,-0.844431],[-0.538405,-0.827146],[-0.521119,-0.80986],[-0.503834,-0.792575],[-0.486549,-0.775289],[-0.469263,-0.758004],[-0.451978,-0.740718],[-0.434692,-0.723433],[-0.417407,-0.706147],[-0.400121,-0.688862],[-0.382836,-0.671576],[-0.36555,-0.654291],[-0.348265,-0.637006],[-0.33098,-0.61972],[-0.313694,-0.602435],[-0.296409,-0.585149],[-0.279123,-0.567864],[-0.261838,-0.550578],[-0.244552,-0.533293],[-0.227267,-0.516007],[-0.209981,-0.498722],[-0.192696,-0.481437],[-0.17541,-0.464151],[-0.158125,-0.446866],[-0.14084,-0.42958],[-0.123554,-0.412295],[-0.106269,-0.395009],[-0.0889832,-0.377724],[-0.0716978,-0.360438],[-0.0544123,-0.343153],[-0.0371269,-0.325868],[-0.0198415,-0.308582],[-0.002556,-0.291297],[0.0147294,-0.274011],[0.0320149,-0.256726],[0.0493003,-0.23944],[0.0665858,-0.222155],[0.0838712,-0.204869],[0.101157,-0.187584],[0.118442,-0.170298],[0.135728,-0.153013],[0.153013,-0.135728],[0.170298,-0.118442],[0.187584,-0.101157],[0.204869,-0.0838712],[0.222155,-0.0665858],[0.23944,-0.0493003],[0.256726,-0.0320149],[0.274011,-0.0147294],[0.291297,0.002556],[0.308582,0.0198415],[0.325868,0.0371269],[0.343153,0.0544123],[0.360438,0.0716978],[0.377724,0.0889832],[0.395009,0.106269],[0.412295,0.123554],[0.42958,0.14084],[0.446866,0.158125],[0.464151,0.17541],[0.481437,0.192696],[0.498722,0.209981],[0.516007,0.227267],[0.533293,0.244552],[0.550578,0.261838],[0.567864,0.279123],[0.585149,0.296409],[0.602435,0.313694],[0.61972,0.33098],[0.637006,0.348265],[0.654291,0.36555],[0.671576,0.382836],[0.688862,0.400121],[0.706147,0.417407],[0.723433,0.434692],[0.740718,0.451978],[0.758004,0.469263],[0.775289,0.486549],[0.792575,0.503834],[0.80986,0.521119],[0.827146,0.538405],[0.844431,0.55569],[0.861716,0.572976],[0.879002,0.590261],[0.896287,0.607547],[0.913573,0.624832],[0.930858,0.642118],[0.948144,0.659403],[0.965429,0.676688],[0.982715,0.693974],[1,0.711259]] color=dodgerblue3 isColorExplicitlySet=true fillStyle=solid lineStyle=solid pointStyle=none lineWidth=1,class=Drawable name=Unnamed implementation=class=Curve name=Unnamed derived from class=DrawableImplementation name=Unnamed legend=f2 data=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=100 dimension=2 data=[[-0.0629516,-1],[-0.0522147,-0.989263],[-0.0414779,-0.978526],[-0.030741,-0.967789],[-0.0200041,-0.957052],[-0.0092672,-0.946316],[0.00146969,-0.935579],[0.0122066,-0.924842],[0.0229435,-0.914105],[0.0336803,-0.903368],[0.0444172,-0.892631],[0.0551541,-0.881894],[0.065891,-0.871157],[0.0766279,-0.86042],[0.0873648,-0.849684],[0.0981017,-0.838947],[0.108839,-0.82821],[0.119575,-0.817473],[0.130312,-0.806736],[0.141049,-0.795999],[0.151786,-0.785262],[0.162523,-0.774525],[0.17326,-0.763789],[0.183997,-0.753052],[0.194734,-0.742315],[0.205471,-0.731578],[0.216207,-0.720841],[0.226944,-0.710104],[0.237681,-0.699367],[0.248418,-0.68863],[0.259155,-0.677893],[0.269892,-0.667157],[0.280629,-0.65642],[0.291366,-0.645683],[0.302102,-0.634946],[0.312839,-0.624209],[0.323576,-0.613472],[0.334313,-0.602735],[0.34505,-0.591998],[0.355787,-0.581261],[0.366524,-0.570525],[0.377261,-0.559788],[0.387998,-0.549051],[0.398734,-0.538314],[0.409471,-0.527577],[0.420208,-0.51684],[0.430945,-0.506103],[0.441682,-0.495366],[0.452419,-0.48463],[0.463156,-0.473893],[0.473893,-0.463156],[0.48463,-0.452419],[0.495366,-0.441682],[0.506103,-0.430945],[0.51684,-0.420208],[0.527577,-0.409471],[0.538314,-0.398734],[0.549051,-0.387998],[0.559788,-0.377261],[0.570525,-0.366524],[0.581261,-0.355787],[0.591998,-0.34505],[0.602735,-0.334313],[0.613472,-0.323576],[0.624209,-0.312839],[0.634946,-0.302102],[0.645683,-0.291366],[0.65642,-0.280629],[0.667157,-0.269892],[0.677893,-0.259155],[0.68863,-0.248418],[0.699367,-0.237681],[0.710104,-0.226944],[0.720841,-0.216207],[0.731578,-0.205471],[0.742315,-0.194734],[0.753052,-0.183997],[0.763789,-0.17326],[0.774525,-0.162523],[0.785262,-0.151786],[0.795999,-0.141049],[0.806736,-0.130312],[0.817473,-0.119575],[0.82821,-0.108839],[0.838947,-0.0981017],[0.849684,-0.0873648],[0.86042,-0.0766279],[0.871157,-0.065891],[0.881894,-0.0551541],[0.892631,-0.0444172],[0.903368,-0.0336803],[0.914105,-0.0229435],[0.924842,-0.0122066],[0.935579,-0.00146969],[0.946316,0.0092672],[0.957052,0.0200041],[0.967789,0.030741],[0.978526,0.0414779],[0.989263,0.0522147],[1,0.0629516]] color=darkorange1 isColorExplicitlySet=true fillStyle=solid lineStyle=solid pointStyle=none lineWidth=1,class=Drawable name=Unnamed implementation=class=Curve name=Unnamed derived from class=DrawableImplementation name=Unnamed legend=f3 data=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=100 dimension=2 data=[[0.335534,-1],[0.342246,-0.993288],[0.348957,-0.986576],[0.355669,-0.979865],[0.362381,-0.973153],[0.369093,-0.966441],[0.375805,-0.959729],[0.382516,-0.953018],[0.389228,-0.946306],[0.39594,-0.939594],[0.402652,-0.932882],[0.409363,-0.92617],[0.416075,-0.919459],[0.422787,-0.912747],[0.429499,-0.906035],[0.436211,-0.899323],[0.442922,-0.892612],[0.449634,-0.8859],[0.456346,-0.879188],[0.463058,-0.872476],[0.469769,-0.865764],[0.476481,-0.859053],[0.483193,-0.852341],[0.489905,-0.845629],[0.496617,-0.838917],[0.503328,-0.832206],[0.51004,-0.825494],[0.516752,-0.818782],[0.523464,-0.81207],[0.530175,-0.805358],[0.536887,-0.798647],[0.543599,-0.791935],[0.550311,-0.785223],[0.557023,-0.778511],[0.563734,-0.7718],[0.570446,-0.765088],[0.577158,-0.758376],[0.58387,-0.751664],[0.590581,-0.744952],[0.597293,-0.738241],[0.604005,-0.731529],[0.610717,-0.724817],[0.617429,-0.718105],[0.62414,-0.711394],[0.630852,-0.704682],[0.637564,-0.69797],[0.644276,-0.691258],[0.650988,-0.684546],[0.657699,-0.677835],[0.664411,-0.671123],[0.671123,-0.664411],[0.677835,-0.657699],[0.684546,-0.650988],[0.691258,-0.644276],[0.69797,-0.637564],[0.704682,-0.630852],[0.711394,-0.62414],[0.718105,-0.617429],[0.724817,-0.610717],[0.731529,-0.604005],[0.738241,-0.597293],[0.744952,-0.590581],[0.751664,-0.58387],[0.758376,-0.577158],[0.765088,-0.570446],[0.7718,-0.563734],[0.778511,-0.557023],[0.785223,-0.550311],[0.791935,-0.543599],[0.798647,-0.536887],[0.805358,-0.530175],[0.81207,-0.523464],[0.818782,-0.516752],[0.825494,-0.51004],[0.832206,-0.503328],[0.838917,-0.496617],[0.845629,-0.489905],[0.852341,-0.483193],[0.859053,-0.476481],[0.865764,-0.469769],[0.872476,-0.463058],[0.879188,-0.456346],[0.8859,-0.449634],[0.892612,-0.442922],[0.899323,-0.436211],[0.906035,-0.429499],[0.912747,-0.422787],[0.919459,-0.416075],[0.92617,-0.409363],[0.932882,-0.402652],[0.939594,-0.39594],[0.946306,-0.389228],[0.953018,-0.382516],[0.959729,-0.375805],[0.966441,-0.369093],[0.973153,-0.362381],[0.979865,-0.355669],[0.986576,-0.348957],[0.993288,-0.342246],[1,-0.335534]] color=forestgreen isColorExplicitlySet=true fillStyle=solid lineStyle=solid pointStyle=none lineWidth=1,class=Drawable name=Unnamed implementation=class=Curve name=Unnamed derived from class=DrawableImplementation name=Unnamed legend=f4 data=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=100 dimension=2 data=[[-1,-0.711259],[-0.982715,-0.693974],[-0.965429,-0.676688],[-0.948144,-0.659403],[-0.930858,-0.642118],[-0.913573,-0.624832],[-0.896287,-0.607547],[-0.879002,-0.590261],[-0.861716,-0.572976],[-0.844431,-0.55569],[-0.827146,-0.538405],[-0.80986,-0.521119],[-0.792575,-0.503834],[-0.775289,-0.486549],[-0.758004,-0.469263],[-0.740718,-0.451978],[-0.723433,-0.434692],[-0.706147,-0.417407],[-0.688862,-0.400121],[-0.671576,-0.382836],[-0.654291,-0.36555],[-0.637006,-0.348265],[-0.61972,-0.33098],[-0.602435,-0.313694],[-0.585149,-0.296409],[-0.567864,-0.279123],[-0.550578,-0.261838],[-0.533293,-0.244552],[-0.516007,-0.227267],[-0.498722,-0.209981],[-0.481437,-0.192696],[-0.464151,-0.17541],[-0.446866,-0.158125],[-0.42958,-0.14084],[-0.412295,-0.123554],[-0.395009,-0.106269],[-0.377724,-0.0889832],[-0.360438,-0.0716978],[-0.343153,-0.0544123],[-0.325868,-0.0371269],[-0.308582,-0.0198415],[-0.291297,-0.002556],[-0.274011,0.0147294],[-0.256726,0.0320149],[-0.23944,0.0493003],[-0.222155,0.0665858],[-0.204869,0.0838712],[-0.187584,0.101157],[-0.170298,0.118442],[-0.153013,0.135728],[-0.135728,0.153013],[-0.118442,0.170298],[-0.101157,0.187584],[-0.0838712,0.204869],[-0.0665858,0.222155],[-0.0493003,0.23944],[-0.0320149,0.256726],[-0.0147294,0.274011],[0.002556,0.291297],[0.0198415,0.308582],[0.0371269,0.325868],[0.0544123,0.343153],[0.0716978,0.360438],[0.0889832,0.377724],[0.106269,0.395009],[0.123554,0.412295],[0.14084,0.42958],[0.158125,0.446866],[0.17541,0.464151],[0.192696,0.481437],[0.209981,0.498722],[0.227267,0.516007],[0.244552,0.533293],[0.261838,0.550578],[0.279123,0.567864],[0.296409,0.585149],[0.313694,0.602435],[0.33098,0.61972],[0.348265,0.637006],[0.36555,0.654291],[0.382836,0.671576],[0.400121,0.688862],[0.417407,0.706147],[0.434692,0.723433],[0.451978,0.740718],[0.469263,0.758004],[0.486549,0.775289],[0.503834,0.792575],[0.521119,0.80986],[0.538405,0.827146],[0.55569,0.844431],[0.572976,0.861716],[0.590261,0.879002],[0.607547,0.896287],[0.624832,0.913573],[0.642118,0.930858],[0.659403,0.948144],[0.676688,0.965429],[0.693974,0.982715],[0.711259,1]] color=firebrick3 isColorExplicitlySet=true fillStyle=solid lineStyle=solid pointStyle=none lineWidth=1,class=Drawable name=Unnamed implementation=class=Curve name=Unnamed derived from class=DrawableImplementation name=Unnamed legend=f5 data=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=100 dimension=2 data=[[-1,-0.0629516],[-0.989263,-0.0522147],[-0.978526,-0.0414779],[-0.967789,-0.030741],[-0.957052,-0.0200041],[-0.946316,-0.0092672],[-0.935579,0.00146969],[-0.924842,0.0122066],[-0.914105,0.0229435],[-0.903368,0.0336803],[-0.892631,0.0444172],[-0.881894,0.0551541],[-0.871157,0.065891],[-0.86042,0.0766279],[-0.849684,0.0873648],[-0.838947,0.0981017],[-0.82821,0.108839],[-0.817473,0.119575],[-0.806736,0.130312],[-0.795999,0.141049],[-0.785262,0.151786],[-0.774525,0.162523],[-0.763789,0.17326],[-0.753052,0.183997],[-0.742315,0.194734],[-0.731578,0.205471],[-0.720841,0.216207],[-0.710104,0.226944],[-0.699367,0.237681],[-0.68863,0.248418],[-0.677893,0.259155],[-0.667157,0.269892],[-0.65642,0.280629],[-0.645683,0.291366],[-0.634946,0.302102],[-0.624209,0.312839],[-0.613472,0.323576],[-0.602735,0.334313],[-0.591998,0.34505],[-0.581261,0.355787],[-0.570525,0.366524],[-0.559788,0.377261],[-0.549051,0.387998],[-0.538314,0.398734],[-0.527577,0.409471],[-0.51684,0.420208],[-0.506103,0.430945],[-0.495366,0.441682],[-0.48463,0.452419],[-0.473893,0.463156],[-0.463156,0.473893],[-0.452419,0.48463],[-0.441682,0.495366],[-0.430945,0.506103],[-0.420208,0.51684],[-0.409471,0.527577],[-0.398734,0.538314],[-0.387998,0.549051],[-0.377261,0.559788],[-0.366524,0.570525],[-0.355787,0.581261],[-0.34505,0.591998],[-0.334313,0.602735],[-0.323576,0.613472],[-0.312839,0.624209],[-0.302102,0.634946],[-0.291366,0.645683],[-0.280629,0.65642],[-0.269892,0.667157],[-0.259155,0.677893],[-0.248418,0.68863],[-0.237681,0.699367],[-0.226944,0.710104],[-0.216207,0.720841],[-0.205471,0.731578],[-0.194734,0.742315],[-0.183997,0.753052],[-0.17326,0.763789],[-0.162523,0.774525],[-0.151786,0.785262],[-0.141049,0.795999],[-0.130312,0.806736],[-0.119575,0.817473],[-0.108839,0.82821],[-0.0981017,0.838947],[-0.0873648,0.849684],[-0.0766279,0.86042],[-0.065891,0.871157],[-0.0551541,0.881894],[-0.0444172,0.892631],[-0.0336803,0.903368],[-0.0229435,0.914105],[-0.0122066,0.924842],[-0.00146969,0.935579],[0.0092672,0.946316],[0.0200041,0.957052],[0.030741,0.967789],[0.0414779,0.978526],[0.0522147,0.989263],[0.0629516,1]] color=mediumpurple3 isColorExplicitlySet=true fillStyle=solid lineStyle=solid pointStyle=none lineWidth=1,class=Drawable name=Unnamed implementation=class=Curve name=Unnamed derived from class=DrawableImplementation name=Unnamed legend=f6 data=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=100 dimension=2 data=[[-1,0.335534],[-0.993288,0.342246],[-0.986576,0.348957],[-0.979865,0.355669],[-0.973153,0.362381],[-0.966441,0.369093],[-0.959729,0.375805],[-0.953018,0.382516],[-0.946306,0.389228],[-0.939594,0.39594],[-0.932882,0.402652],[-0.92617,0.409363],[-0.919459,0.416075],[-0.912747,0.422787],[-0.906035,0.429499],[-0.899323,0.436211],[-0.892612,0.442922],[-0.8859,0.449634],[-0.879188,0.456346],[-0.872476,0.463058],[-0.865764,0.469769],[-0.859053,0.476481],[-0.852341,0.483193],[-0.845629,0.489905],[-0.838917,0.496617],[-0.832206,0.503328],[-0.825494,0.51004],[-0.818782,0.516752],[-0.81207,0.523464],[-0.805358,0.530175],[-0.798647,0.536887],[-0.791935,0.543599],[-0.785223,0.550311],[-0.778511,0.557023],[-0.7718,0.563734],[-0.765088,0.570446],[-0.758376,0.577158],[-0.751664,0.58387],[-0.744952,0.590581],[-0.738241,0.597293],[-0.731529,0.604005],[-0.724817,0.610717],[-0.718105,0.617429],[-0.711394,0.62414],[-0.704682,0.630852],[-0.69797,0.637564],[-0.691258,0.644276],[-0.684546,0.650988],[-0.677835,0.657699],[-0.671123,0.664411],[-0.664411,0.671123],[-0.657699,0.677835],[-0.650988,0.684546],[-0.644276,0.691258],[-0.637564,0.69797],[-0.630852,0.704682],[-0.62414,0.711394],[-0.617429,0.718105],[-0.610717,0.724817],[-0.604005,0.731529],[-0.597293,0.738241],[-0.590581,0.744952],[-0.58387,0.751664],[-0.577158,0.758376],[-0.570446,0.765088],[-0.563734,0.7718],[-0.557023,0.778511],[-0.550311,0.785223],[-0.543599,0.791935],[-0.536887,0.798647],[-0.530175,0.805358],[-0.523464,0.81207],[-0.516752,0.818782],[-0.51004,0.825494],[-0.503328,0.832206],[-0.496617,0.838917],[-0.489905,0.845629],[-0.483193,0.852341],[-0.476481,0.859053],[-0.469769,0.865764],[-0.463058,0.872476],[-0.456346,0.879188],[-0.449634,0.8859],[-0.442922,0.892612],[-0.436211,0.899323],[-0.429499,0.906035],[-0.422787,0.912747],[-0.416075,0.919459],[-0.409363,0.92617],[-0.402652,0.932882],[-0.39594,0.939594],[-0.389228,0.946306],[-0.382516,0.953018],[-0.375805,0.959729],[-0.369093,0.966441],[-0.362381,0.973153],[-0.355669,0.979865],[-0.348957,0.986576],[-0.342246,0.993288],[-0.335534,1]] color=lightsalmon4 isColorExplicitlySet=true fillStyle=solid lineStyle=solid pointStyle=none lineWidth=1,class=Drawable name=Unnamed implementation=class=Cloud name=Unnamed derived from class=DrawableImplementation name=Unnamed legend= data=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=14 dimension=2 data=[[-1,1],[1,0.711259],[1,0.0629516],[1,-0.335534],[-1,-0.711259],[-1,-0.0629516],[-1,0.335534],[0.335534,-1],[-0.711259,-1],[-0.0629516,-1],[-0.335534,1],[0.711259,1],[0.0629516,1],[1,-1]] color=#bcbd22 isColorExplicitlySet=false fillStyle=solid lineStyle=solid pointStyle=plus lineWidth=1] + + + +.. GENERATED FROM PYTHON SOURCE LINES 286-287 + +In order to identify these points, we add the legends as text in the plot. + +.. GENERATED FROM PYTHON SOURCE LINES 289-292 + +.. code-block:: Python + + texts = ["p" + str(i) for i in range(sample.getSize())] + texts + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + ['p0', 'p1', 'p2', 'p3', 'p4', 'p5', 'p6', 'p7', 'p8', 'p9', 'p10', 'p11', 'p12', 'p13'] + + + +.. GENERATED FROM PYTHON SOURCE LINES 293-295 + +.. code-block:: Python + + text = ot.Text(sample, texts) + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 296-299 + +.. code-block:: Python + + domain.add(text) + domain + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + class=Graph name=Domain where g(x) < 0.0 implementation=class=GraphImplementation name=Domain where g(x) < 0.0 title=Domain where g(x) < 0.0 xTitle=x1 yTitle=x2 axes=ON grid=ON legendposition=topright legendFontSize=1 drawables=[class=Drawable name=Unnamed implementation=class=PolygonArray name=Unnamed derived from class=DrawableImplementation name=Unnamed legend=In data=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=11352 dimension=2 data=[[-0.679986,-0.99998],[-0.639987,-0.99998],[-0.679986,-0.959981],...,[0.719986,0.99998],[0.679986,0.99998],[0.679986,0.99998]] color=blue isColorExplicitlySet=true fillStyle=solid lineStyle=solid pointStyle=plus lineWidth=1 vertices number=4 palette=[lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1,lightsalmon1],class=Drawable name=Unnamed implementation=class=PolygonArray name=Unnamed derived from class=DrawableImplementation name=Unnamed legend=Out data=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=8648 dimension=2 data=[[-0.99998,-0.99998],[-0.959981,-0.99998],[-0.99998,-0.959981],...,[0.99998,0.99998],[0.959981,0.99998],[0.959981,0.99998]] color=blue isColorExplicitlySet=true fillStyle=solid lineStyle=solid pointStyle=plus lineWidth=1 vertices number=4 palette=[darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1,darkseagreen1],class=Drawable name=Unnamed implementation=class=Curve name=Unnamed derived from class=DrawableImplementation name=Unnamed legend=f1 data=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=100 dimension=2 data=[[-0.711259,-1],[-0.693974,-0.982715],[-0.676688,-0.965429],[-0.659403,-0.948144],[-0.642118,-0.930858],[-0.624832,-0.913573],[-0.607547,-0.896287],[-0.590261,-0.879002],[-0.572976,-0.861716],[-0.55569,-0.844431],[-0.538405,-0.827146],[-0.521119,-0.80986],[-0.503834,-0.792575],[-0.486549,-0.775289],[-0.469263,-0.758004],[-0.451978,-0.740718],[-0.434692,-0.723433],[-0.417407,-0.706147],[-0.400121,-0.688862],[-0.382836,-0.671576],[-0.36555,-0.654291],[-0.348265,-0.637006],[-0.33098,-0.61972],[-0.313694,-0.602435],[-0.296409,-0.585149],[-0.279123,-0.567864],[-0.261838,-0.550578],[-0.244552,-0.533293],[-0.227267,-0.516007],[-0.209981,-0.498722],[-0.192696,-0.481437],[-0.17541,-0.464151],[-0.158125,-0.446866],[-0.14084,-0.42958],[-0.123554,-0.412295],[-0.106269,-0.395009],[-0.0889832,-0.377724],[-0.0716978,-0.360438],[-0.0544123,-0.343153],[-0.0371269,-0.325868],[-0.0198415,-0.308582],[-0.002556,-0.291297],[0.0147294,-0.274011],[0.0320149,-0.256726],[0.0493003,-0.23944],[0.0665858,-0.222155],[0.0838712,-0.204869],[0.101157,-0.187584],[0.118442,-0.170298],[0.135728,-0.153013],[0.153013,-0.135728],[0.170298,-0.118442],[0.187584,-0.101157],[0.204869,-0.0838712],[0.222155,-0.0665858],[0.23944,-0.0493003],[0.256726,-0.0320149],[0.274011,-0.0147294],[0.291297,0.002556],[0.308582,0.0198415],[0.325868,0.0371269],[0.343153,0.0544123],[0.360438,0.0716978],[0.377724,0.0889832],[0.395009,0.106269],[0.412295,0.123554],[0.42958,0.14084],[0.446866,0.158125],[0.464151,0.17541],[0.481437,0.192696],[0.498722,0.209981],[0.516007,0.227267],[0.533293,0.244552],[0.550578,0.261838],[0.567864,0.279123],[0.585149,0.296409],[0.602435,0.313694],[0.61972,0.33098],[0.637006,0.348265],[0.654291,0.36555],[0.671576,0.382836],[0.688862,0.400121],[0.706147,0.417407],[0.723433,0.434692],[0.740718,0.451978],[0.758004,0.469263],[0.775289,0.486549],[0.792575,0.503834],[0.80986,0.521119],[0.827146,0.538405],[0.844431,0.55569],[0.861716,0.572976],[0.879002,0.590261],[0.896287,0.607547],[0.913573,0.624832],[0.930858,0.642118],[0.948144,0.659403],[0.965429,0.676688],[0.982715,0.693974],[1,0.711259]] color=dodgerblue3 isColorExplicitlySet=true fillStyle=solid lineStyle=solid pointStyle=none lineWidth=1,class=Drawable name=Unnamed implementation=class=Curve name=Unnamed derived from class=DrawableImplementation name=Unnamed legend=f2 data=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=100 dimension=2 data=[[-0.0629516,-1],[-0.0522147,-0.989263],[-0.0414779,-0.978526],[-0.030741,-0.967789],[-0.0200041,-0.957052],[-0.0092672,-0.946316],[0.00146969,-0.935579],[0.0122066,-0.924842],[0.0229435,-0.914105],[0.0336803,-0.903368],[0.0444172,-0.892631],[0.0551541,-0.881894],[0.065891,-0.871157],[0.0766279,-0.86042],[0.0873648,-0.849684],[0.0981017,-0.838947],[0.108839,-0.82821],[0.119575,-0.817473],[0.130312,-0.806736],[0.141049,-0.795999],[0.151786,-0.785262],[0.162523,-0.774525],[0.17326,-0.763789],[0.183997,-0.753052],[0.194734,-0.742315],[0.205471,-0.731578],[0.216207,-0.720841],[0.226944,-0.710104],[0.237681,-0.699367],[0.248418,-0.68863],[0.259155,-0.677893],[0.269892,-0.667157],[0.280629,-0.65642],[0.291366,-0.645683],[0.302102,-0.634946],[0.312839,-0.624209],[0.323576,-0.613472],[0.334313,-0.602735],[0.34505,-0.591998],[0.355787,-0.581261],[0.366524,-0.570525],[0.377261,-0.559788],[0.387998,-0.549051],[0.398734,-0.538314],[0.409471,-0.527577],[0.420208,-0.51684],[0.430945,-0.506103],[0.441682,-0.495366],[0.452419,-0.48463],[0.463156,-0.473893],[0.473893,-0.463156],[0.48463,-0.452419],[0.495366,-0.441682],[0.506103,-0.430945],[0.51684,-0.420208],[0.527577,-0.409471],[0.538314,-0.398734],[0.549051,-0.387998],[0.559788,-0.377261],[0.570525,-0.366524],[0.581261,-0.355787],[0.591998,-0.34505],[0.602735,-0.334313],[0.613472,-0.323576],[0.624209,-0.312839],[0.634946,-0.302102],[0.645683,-0.291366],[0.65642,-0.280629],[0.667157,-0.269892],[0.677893,-0.259155],[0.68863,-0.248418],[0.699367,-0.237681],[0.710104,-0.226944],[0.720841,-0.216207],[0.731578,-0.205471],[0.742315,-0.194734],[0.753052,-0.183997],[0.763789,-0.17326],[0.774525,-0.162523],[0.785262,-0.151786],[0.795999,-0.141049],[0.806736,-0.130312],[0.817473,-0.119575],[0.82821,-0.108839],[0.838947,-0.0981017],[0.849684,-0.0873648],[0.86042,-0.0766279],[0.871157,-0.065891],[0.881894,-0.0551541],[0.892631,-0.0444172],[0.903368,-0.0336803],[0.914105,-0.0229435],[0.924842,-0.0122066],[0.935579,-0.00146969],[0.946316,0.0092672],[0.957052,0.0200041],[0.967789,0.030741],[0.978526,0.0414779],[0.989263,0.0522147],[1,0.0629516]] color=darkorange1 isColorExplicitlySet=true fillStyle=solid lineStyle=solid pointStyle=none lineWidth=1,class=Drawable name=Unnamed implementation=class=Curve name=Unnamed derived from class=DrawableImplementation name=Unnamed legend=f3 data=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=100 dimension=2 data=[[0.335534,-1],[0.342246,-0.993288],[0.348957,-0.986576],[0.355669,-0.979865],[0.362381,-0.973153],[0.369093,-0.966441],[0.375805,-0.959729],[0.382516,-0.953018],[0.389228,-0.946306],[0.39594,-0.939594],[0.402652,-0.932882],[0.409363,-0.92617],[0.416075,-0.919459],[0.422787,-0.912747],[0.429499,-0.906035],[0.436211,-0.899323],[0.442922,-0.892612],[0.449634,-0.8859],[0.456346,-0.879188],[0.463058,-0.872476],[0.469769,-0.865764],[0.476481,-0.859053],[0.483193,-0.852341],[0.489905,-0.845629],[0.496617,-0.838917],[0.503328,-0.832206],[0.51004,-0.825494],[0.516752,-0.818782],[0.523464,-0.81207],[0.530175,-0.805358],[0.536887,-0.798647],[0.543599,-0.791935],[0.550311,-0.785223],[0.557023,-0.778511],[0.563734,-0.7718],[0.570446,-0.765088],[0.577158,-0.758376],[0.58387,-0.751664],[0.590581,-0.744952],[0.597293,-0.738241],[0.604005,-0.731529],[0.610717,-0.724817],[0.617429,-0.718105],[0.62414,-0.711394],[0.630852,-0.704682],[0.637564,-0.69797],[0.644276,-0.691258],[0.650988,-0.684546],[0.657699,-0.677835],[0.664411,-0.671123],[0.671123,-0.664411],[0.677835,-0.657699],[0.684546,-0.650988],[0.691258,-0.644276],[0.69797,-0.637564],[0.704682,-0.630852],[0.711394,-0.62414],[0.718105,-0.617429],[0.724817,-0.610717],[0.731529,-0.604005],[0.738241,-0.597293],[0.744952,-0.590581],[0.751664,-0.58387],[0.758376,-0.577158],[0.765088,-0.570446],[0.7718,-0.563734],[0.778511,-0.557023],[0.785223,-0.550311],[0.791935,-0.543599],[0.798647,-0.536887],[0.805358,-0.530175],[0.81207,-0.523464],[0.818782,-0.516752],[0.825494,-0.51004],[0.832206,-0.503328],[0.838917,-0.496617],[0.845629,-0.489905],[0.852341,-0.483193],[0.859053,-0.476481],[0.865764,-0.469769],[0.872476,-0.463058],[0.879188,-0.456346],[0.8859,-0.449634],[0.892612,-0.442922],[0.899323,-0.436211],[0.906035,-0.429499],[0.912747,-0.422787],[0.919459,-0.416075],[0.92617,-0.409363],[0.932882,-0.402652],[0.939594,-0.39594],[0.946306,-0.389228],[0.953018,-0.382516],[0.959729,-0.375805],[0.966441,-0.369093],[0.973153,-0.362381],[0.979865,-0.355669],[0.986576,-0.348957],[0.993288,-0.342246],[1,-0.335534]] color=forestgreen isColorExplicitlySet=true fillStyle=solid lineStyle=solid pointStyle=none lineWidth=1,class=Drawable name=Unnamed implementation=class=Curve name=Unnamed derived from class=DrawableImplementation name=Unnamed legend=f4 data=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=100 dimension=2 data=[[-1,-0.711259],[-0.982715,-0.693974],[-0.965429,-0.676688],[-0.948144,-0.659403],[-0.930858,-0.642118],[-0.913573,-0.624832],[-0.896287,-0.607547],[-0.879002,-0.590261],[-0.861716,-0.572976],[-0.844431,-0.55569],[-0.827146,-0.538405],[-0.80986,-0.521119],[-0.792575,-0.503834],[-0.775289,-0.486549],[-0.758004,-0.469263],[-0.740718,-0.451978],[-0.723433,-0.434692],[-0.706147,-0.417407],[-0.688862,-0.400121],[-0.671576,-0.382836],[-0.654291,-0.36555],[-0.637006,-0.348265],[-0.61972,-0.33098],[-0.602435,-0.313694],[-0.585149,-0.296409],[-0.567864,-0.279123],[-0.550578,-0.261838],[-0.533293,-0.244552],[-0.516007,-0.227267],[-0.498722,-0.209981],[-0.481437,-0.192696],[-0.464151,-0.17541],[-0.446866,-0.158125],[-0.42958,-0.14084],[-0.412295,-0.123554],[-0.395009,-0.106269],[-0.377724,-0.0889832],[-0.360438,-0.0716978],[-0.343153,-0.0544123],[-0.325868,-0.0371269],[-0.308582,-0.0198415],[-0.291297,-0.002556],[-0.274011,0.0147294],[-0.256726,0.0320149],[-0.23944,0.0493003],[-0.222155,0.0665858],[-0.204869,0.0838712],[-0.187584,0.101157],[-0.170298,0.118442],[-0.153013,0.135728],[-0.135728,0.153013],[-0.118442,0.170298],[-0.101157,0.187584],[-0.0838712,0.204869],[-0.0665858,0.222155],[-0.0493003,0.23944],[-0.0320149,0.256726],[-0.0147294,0.274011],[0.002556,0.291297],[0.0198415,0.308582],[0.0371269,0.325868],[0.0544123,0.343153],[0.0716978,0.360438],[0.0889832,0.377724],[0.106269,0.395009],[0.123554,0.412295],[0.14084,0.42958],[0.158125,0.446866],[0.17541,0.464151],[0.192696,0.481437],[0.209981,0.498722],[0.227267,0.516007],[0.244552,0.533293],[0.261838,0.550578],[0.279123,0.567864],[0.296409,0.585149],[0.313694,0.602435],[0.33098,0.61972],[0.348265,0.637006],[0.36555,0.654291],[0.382836,0.671576],[0.400121,0.688862],[0.417407,0.706147],[0.434692,0.723433],[0.451978,0.740718],[0.469263,0.758004],[0.486549,0.775289],[0.503834,0.792575],[0.521119,0.80986],[0.538405,0.827146],[0.55569,0.844431],[0.572976,0.861716],[0.590261,0.879002],[0.607547,0.896287],[0.624832,0.913573],[0.642118,0.930858],[0.659403,0.948144],[0.676688,0.965429],[0.693974,0.982715],[0.711259,1]] color=firebrick3 isColorExplicitlySet=true fillStyle=solid lineStyle=solid pointStyle=none lineWidth=1,class=Drawable name=Unnamed implementation=class=Curve name=Unnamed derived from class=DrawableImplementation name=Unnamed legend=f5 data=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=100 dimension=2 data=[[-1,-0.0629516],[-0.989263,-0.0522147],[-0.978526,-0.0414779],[-0.967789,-0.030741],[-0.957052,-0.0200041],[-0.946316,-0.0092672],[-0.935579,0.00146969],[-0.924842,0.0122066],[-0.914105,0.0229435],[-0.903368,0.0336803],[-0.892631,0.0444172],[-0.881894,0.0551541],[-0.871157,0.065891],[-0.86042,0.0766279],[-0.849684,0.0873648],[-0.838947,0.0981017],[-0.82821,0.108839],[-0.817473,0.119575],[-0.806736,0.130312],[-0.795999,0.141049],[-0.785262,0.151786],[-0.774525,0.162523],[-0.763789,0.17326],[-0.753052,0.183997],[-0.742315,0.194734],[-0.731578,0.205471],[-0.720841,0.216207],[-0.710104,0.226944],[-0.699367,0.237681],[-0.68863,0.248418],[-0.677893,0.259155],[-0.667157,0.269892],[-0.65642,0.280629],[-0.645683,0.291366],[-0.634946,0.302102],[-0.624209,0.312839],[-0.613472,0.323576],[-0.602735,0.334313],[-0.591998,0.34505],[-0.581261,0.355787],[-0.570525,0.366524],[-0.559788,0.377261],[-0.549051,0.387998],[-0.538314,0.398734],[-0.527577,0.409471],[-0.51684,0.420208],[-0.506103,0.430945],[-0.495366,0.441682],[-0.48463,0.452419],[-0.473893,0.463156],[-0.463156,0.473893],[-0.452419,0.48463],[-0.441682,0.495366],[-0.430945,0.506103],[-0.420208,0.51684],[-0.409471,0.527577],[-0.398734,0.538314],[-0.387998,0.549051],[-0.377261,0.559788],[-0.366524,0.570525],[-0.355787,0.581261],[-0.34505,0.591998],[-0.334313,0.602735],[-0.323576,0.613472],[-0.312839,0.624209],[-0.302102,0.634946],[-0.291366,0.645683],[-0.280629,0.65642],[-0.269892,0.667157],[-0.259155,0.677893],[-0.248418,0.68863],[-0.237681,0.699367],[-0.226944,0.710104],[-0.216207,0.720841],[-0.205471,0.731578],[-0.194734,0.742315],[-0.183997,0.753052],[-0.17326,0.763789],[-0.162523,0.774525],[-0.151786,0.785262],[-0.141049,0.795999],[-0.130312,0.806736],[-0.119575,0.817473],[-0.108839,0.82821],[-0.0981017,0.838947],[-0.0873648,0.849684],[-0.0766279,0.86042],[-0.065891,0.871157],[-0.0551541,0.881894],[-0.0444172,0.892631],[-0.0336803,0.903368],[-0.0229435,0.914105],[-0.0122066,0.924842],[-0.00146969,0.935579],[0.0092672,0.946316],[0.0200041,0.957052],[0.030741,0.967789],[0.0414779,0.978526],[0.0522147,0.989263],[0.0629516,1]] color=mediumpurple3 isColorExplicitlySet=true fillStyle=solid lineStyle=solid pointStyle=none lineWidth=1,class=Drawable name=Unnamed implementation=class=Curve name=Unnamed derived from class=DrawableImplementation name=Unnamed legend=f6 data=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=100 dimension=2 data=[[-1,0.335534],[-0.993288,0.342246],[-0.986576,0.348957],[-0.979865,0.355669],[-0.973153,0.362381],[-0.966441,0.369093],[-0.959729,0.375805],[-0.953018,0.382516],[-0.946306,0.389228],[-0.939594,0.39594],[-0.932882,0.402652],[-0.92617,0.409363],[-0.919459,0.416075],[-0.912747,0.422787],[-0.906035,0.429499],[-0.899323,0.436211],[-0.892612,0.442922],[-0.8859,0.449634],[-0.879188,0.456346],[-0.872476,0.463058],[-0.865764,0.469769],[-0.859053,0.476481],[-0.852341,0.483193],[-0.845629,0.489905],[-0.838917,0.496617],[-0.832206,0.503328],[-0.825494,0.51004],[-0.818782,0.516752],[-0.81207,0.523464],[-0.805358,0.530175],[-0.798647,0.536887],[-0.791935,0.543599],[-0.785223,0.550311],[-0.778511,0.557023],[-0.7718,0.563734],[-0.765088,0.570446],[-0.758376,0.577158],[-0.751664,0.58387],[-0.744952,0.590581],[-0.738241,0.597293],[-0.731529,0.604005],[-0.724817,0.610717],[-0.718105,0.617429],[-0.711394,0.62414],[-0.704682,0.630852],[-0.69797,0.637564],[-0.691258,0.644276],[-0.684546,0.650988],[-0.677835,0.657699],[-0.671123,0.664411],[-0.664411,0.671123],[-0.657699,0.677835],[-0.650988,0.684546],[-0.644276,0.691258],[-0.637564,0.69797],[-0.630852,0.704682],[-0.62414,0.711394],[-0.617429,0.718105],[-0.610717,0.724817],[-0.604005,0.731529],[-0.597293,0.738241],[-0.590581,0.744952],[-0.58387,0.751664],[-0.577158,0.758376],[-0.570446,0.765088],[-0.563734,0.7718],[-0.557023,0.778511],[-0.550311,0.785223],[-0.543599,0.791935],[-0.536887,0.798647],[-0.530175,0.805358],[-0.523464,0.81207],[-0.516752,0.818782],[-0.51004,0.825494],[-0.503328,0.832206],[-0.496617,0.838917],[-0.489905,0.845629],[-0.483193,0.852341],[-0.476481,0.859053],[-0.469769,0.865764],[-0.463058,0.872476],[-0.456346,0.879188],[-0.449634,0.8859],[-0.442922,0.892612],[-0.436211,0.899323],[-0.429499,0.906035],[-0.422787,0.912747],[-0.416075,0.919459],[-0.409363,0.92617],[-0.402652,0.932882],[-0.39594,0.939594],[-0.389228,0.946306],[-0.382516,0.953018],[-0.375805,0.959729],[-0.369093,0.966441],[-0.362381,0.973153],[-0.355669,0.979865],[-0.348957,0.986576],[-0.342246,0.993288],[-0.335534,1]] color=lightsalmon4 isColorExplicitlySet=true fillStyle=solid lineStyle=solid pointStyle=none lineWidth=1,class=Drawable name=Unnamed implementation=class=Cloud name=Unnamed derived from class=DrawableImplementation name=Unnamed legend= data=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=14 dimension=2 data=[[-1,1],[1,0.711259],[1,0.0629516],[1,-0.335534],[-1,-0.711259],[-1,-0.0629516],[-1,0.335534],[0.335534,-1],[-0.711259,-1],[-0.0629516,-1],[-0.335534,1],[0.711259,1],[0.0629516,1],[1,-1]] color=#bcbd22 isColorExplicitlySet=false fillStyle=solid lineStyle=solid pointStyle=plus lineWidth=1,class=Drawable name=Unnamed implementation=class=Text name=Unnamed derived from class=DrawableImplementation name=Unnamed legend= data=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=14 dimension=2 data=[[-1,1],[1,0.711259],[1,0.0629516],[1,-0.335534],[-1,-0.711259],[-1,-0.0629516],[-1,0.335534],[0.335534,-1],[-0.711259,-1],[-0.0629516,-1],[-0.335534,1],[0.711259,1],[0.0629516,1],[1,-1]] color=#17becf isColorExplicitlySet=false fillStyle=solid lineStyle=solid pointStyle=plus lineWidth=1] + + + +.. GENERATED FROM PYTHON SOURCE LINES 300-303 + +The probability is the ratio between the failure domain and the domain itself. +The area of the domain is :math:`2^2`. +The area of each polygon is computed based on the shapely module. + +.. GENERATED FROM PYTHON SOURCE LINES 303-306 + +.. code-block:: Python + + corners = np.array([sample[i] for i in [0, 6, 10]]) + corners + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + array([[-1. , 1. ], + [-1. , 0.33553391], + [-0.33553391, 1. ]]) + + + +.. GENERATED FROM PYTHON SOURCE LINES 307-311 + +.. code-block:: Python + + polygon = Polygon(corners) + area1 = polygon.area + area1 + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + 0.2207575950825023 + + + +.. GENERATED FROM PYTHON SOURCE LINES 312-318 + +.. code-block:: Python + + corners = np.array([sample[i] for i in [4, 11, 12, 5]]) + corners + polygon = Polygon(corners) + area2 = polygon.area + area2 + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + 0.8992712614902384 + + + +.. GENERATED FROM PYTHON SOURCE LINES 319-325 + +.. code-block:: Python + + corners = np.array([sample[i] for i in [8, 9, 2, 1]]) + corners + polygon = Polygon(corners) + area3 = polygon.area + area3 + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + 0.8992712614902386 + + + +.. GENERATED FROM PYTHON SOURCE LINES 326-332 + +.. code-block:: Python + + corners = np.array([sample[i] for i in [7, 13, 3]]) + corners + polygon = Polygon(corners) + area4 = polygon.area + area4 + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + 0.2207575950825023 + + + +.. GENERATED FROM PYTHON SOURCE LINES 333-336 + +.. code-block:: Python + + pf = (area1 + area2 + area3 + area4) / 2.0 ** 2 + pf + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + 0.5600144282863704 + + + +.. GENERATED FROM PYTHON SOURCE LINES 337-339 + +.. code-block:: Python + + print("pf=%.17e" % (pf)) + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + pf=5.60014428286370380e-01 + + + + +.. GENERATED FROM PYTHON SOURCE LINES 340-341 + +.. code-block:: Python + + otv.View.ShowAll() + + + + + + + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 3.643 seconds) + + +.. _sphx_glr_download_auto_examples_reliability_problems_plot_compute_reference_rp55_pf.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: plot_compute_reference_rp55_pf.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: plot_compute_reference_rp55_pf.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: plot_compute_reference_rp55_pf.zip ` diff --git a/otbenchmark/master/_sources/auto_examples/reliability_problems/plot_four_branch_serial_system_waarts.rst b/otbenchmark/master/_sources/auto_examples/reliability_problems/plot_four_branch_serial_system_waarts.rst new file mode 100644 index 00000000000..6358c4ced2e --- /dev/null +++ b/otbenchmark/master/_sources/auto_examples/reliability_problems/plot_four_branch_serial_system_waarts.rst @@ -0,0 +1,261 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "auto_examples/reliability_problems/plot_four_branch_serial_system_waarts.py" +.. LINE NUMBERS ARE GIVEN BELOW. + +.. only:: html + + .. note:: + :class: sphx-glr-download-link-note + + :ref:`Go to the end ` + to download the full example code. + +.. rst-class:: sphx-glr-example-title + +.. _sphx_glr_auto_examples_reliability_problems_plot_four_branch_serial_system_waarts.py: + + +Using the Waarts four-branch serial system +========================================== + +.. GENERATED FROM PYTHON SOURCE LINES 7-19 + +References +---------- + +* Waarts, P.-H. (2000). Structural reliability using finite element + methods: an appraisal of DARS: Directional Adaptive Response Surface + Sampling. Ph. D. thesis, Technical University of Delft, The Netherlands. + Pages 58, 69, 160. + +* Thèse Vincent Dubourg 2011, Méta-modèles adaptatifs pour l’analyse + de fiabilité et l’optimisation sous contrainte fiabiliste, + section "A two-dimensional four-branch serial system", page 182 + + +.. GENERATED FROM PYTHON SOURCE LINES 21-25 + +.. code-block:: Python + + import openturns as ot + import openturns.viewer as otv + import otbenchmark as otb + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 26-28 + +.. code-block:: Python + + problem = otb.FourBranchSerialSystemReliability() + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 29-32 + +.. code-block:: Python + + event = problem.getEvent() + g = event.getFunction() + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 33-36 + +.. code-block:: Python + + inputVector = event.getAntecedent() + distribution = inputVector.getDistribution() + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 37-38 + +Draw isolines + +.. GENERATED FROM PYTHON SOURCE LINES 38-44 + +.. code-block:: Python + + lowerBound = ot.Point([-5.0, -5.0]) + upperBound = ot.Point([5.0, 5.0]) + nbPoints = [100, 100] + _ = otv.View(g.draw(lowerBound, upperBound, nbPoints)) + + + + + +.. image-sg:: /auto_examples/reliability_problems/images/sphx_glr_plot_four_branch_serial_system_waarts_001.png + :alt: y as a function of (x0,x1) + :srcset: /auto_examples/reliability_problems/images/sphx_glr_plot_four_branch_serial_system_waarts_001.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 45-47 + +.. code-block:: Python + + sampleSize = 500 + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 48-50 + +.. code-block:: Python + + drawEvent = otb.DrawEvent(event) + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 51-54 + +.. code-block:: Python + + cloud = drawEvent.drawSampleCrossCut(sampleSize) + _ = otv.View(cloud) + + + + +.. image-sg:: /auto_examples/reliability_problems/images/sphx_glr_plot_four_branch_serial_system_waarts_002.png + :alt: Points X s.t. g(X) < 0.0 + :srcset: /auto_examples/reliability_problems/images/sphx_glr_plot_four_branch_serial_system_waarts_002.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 55-57 + +Draw the limit state surface +---------------------------- + +.. GENERATED FROM PYTHON SOURCE LINES 59-61 + +.. code-block:: Python + + bounds = ot.Interval(lowerBound, upperBound) + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 62-66 + +.. code-block:: Python + + graph = drawEvent.drawLimitStateCrossCut(bounds) + graph.add(cloud) + graph + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + class=Graph name=Limit state surface implementation=class=GraphImplementation name=Limit state surface title=Limit state surface xTitle=x0 yTitle=x1 axes=ON grid=ON legendposition= legendFontSize=1 drawables=[class=Drawable name=Unnamed implementation=class=Contour name=Unnamed x=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=52 dimension=1 description=[t] data=[[-5],[-4.80392],[-4.60784],[-4.41176],[-4.21569],[-4.01961],[-3.82353],[-3.62745],[-3.43137],[-3.23529],[-3.03922],[-2.84314],[-2.64706],[-2.45098],[-2.2549],[-2.05882],[-1.86275],[-1.66667],[-1.47059],[-1.27451],[-1.07843],[-0.882353],[-0.686275],[-0.490196],[-0.294118],[-0.0980392],[0.0980392],[0.294118],[0.490196],[0.686275],[0.882353],[1.07843],[1.27451],[1.47059],[1.66667],[1.86275],[2.05882],[2.2549],[2.45098],[2.64706],[2.84314],[3.03922],[3.23529],[3.43137],[3.62745],[3.82353],[4.01961],[4.21569],[4.41176],[4.60784],[4.80392],[5]] y=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=52 dimension=1 description=[t] data=[[-5],[-4.80392],[-4.60784],[-4.41176],[-4.21569],[-4.01961],[-3.82353],[-3.62745],[-3.43137],[-3.23529],[-3.03922],[-2.84314],[-2.64706],[-2.45098],[-2.2549],[-2.05882],[-1.86275],[-1.66667],[-1.47059],[-1.27451],[-1.07843],[-0.882353],[-0.686275],[-0.490196],[-0.294118],[-0.0980392],[0.0980392],[0.294118],[0.490196],[0.686275],[0.882353],[1.07843],[1.27451],[1.47059],[1.66667],[1.86275],[2.05882],[2.2549],[2.45098],[2.64706],[2.84314],[3.03922],[3.23529],[3.43137],[3.62745],[3.82353],[4.01961],[4.21569],[4.41176],[4.60784],[4.80392],[5]] levels=class=Point name=Unnamed dimension=1 values=[0] labels=[0.0] show labels=true isFilled=false colorBarPosition=right isVminUsed=false vmin=0 isVmaxUsed=false vmax=0 colorMap=hsv alpha=1 norm=linear extend=both hatches=[] derived from class=DrawableImplementation name=Unnamed legend= data=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=2704 dimension=1 description=[y] data=[[-4.07107],[-3.92857],[-3.77839],...,[-3.77839],[-3.92857],[-4.07107]] color=#1f77b4 isColorExplicitlySet=true fillStyle=solid lineStyle=solid pointStyle=plus lineWidth=1,class=Drawable name=Out implementation=class=Cloud name=Out derived from class=DrawableImplementation name=Out legend=Out data=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=500 dimension=2 data=[[0.608202,0.189723],[-1.26617,-1.5599],[-0.438266,0.141706],[1.20548,-0.312877],[-2.18139,-1.09669],[0.350042,1.30628],[-0.355007,-0.603543],[1.43725,0.0844715],[0.810668,-1.01157],[0.793156,-0.45413],[-0.470526,0.184323],[0.261018,1.11103],[-2.29006,0.0332655],[-1.28289,-0.402727],[-1.31178,0.812135],[-0.0907838,0.137958],[0.995793,-0.552396],[-0.139453,0.712298],[-0.560206,0.657798],[0.44549,-0.2971],[0.322925,0.288142],[0.445785,-0.843501],[-1.03808,1.4814],[-0.856712,0.904859],[0.473617,0.90054],[-0.125498,0.211378],[0.351418,0.408217],[1.78236,-0.290709],[0.0702074,-1.03768],[-0.781366,0.403674],[-0.721533,-0.0361247],[-0.241223,-0.0439957],[-1.78796,1.57857],[0.40136,1.44503],[1.36783,-0.908343],[1.00434,-1.329],[0.741548,-0.476214],[-0.0436123,1.02238],[0.539345,-1.19788],[0.29995,2.59603],[0.407717,0.149855],[-0.485112,-0.390626],[-0.382992,-0.311655],[-0.752817,-0.451449],[0.257926,0.237096],[1.96876,0.624386],[-0.671291,-0.5553],[1.85579,0.765645],[0.0521593,0.509255],[0.790446,0.416132],[0.716353,-1.42826],[-0.743622,-0.155242],[0.184356,1.19865],[-1.53073,-0.189811],[0.655027,-1.09981],[0.538071,0.727195],[1.73821,0.566469],[-0.958722,-1.437],[0.377922,-0.253593],[-0.181004,0.898235],[1.67297,0.732674],[-1.03896,-0.109548],[-0.353552,-0.485969],[1.21381,-0.35672],[-0.777033,-1.25939],[-1.36853,0.0349764],[0.103474,-0.409638],[-0.89182,0.795517],[0.905602,-2.10814],[0.334794,-0.914884],[-0.483642,1.09502],[0.677958,-0.0632852],[1.70938,2.00363],[1.07062,-0.124881],[-0.506925,0.0604086],[-1.66086,-0.449676],[2.24623,0.15909],[0.759602,-2.04317],[-0.510764,1.06144],[-0.633066,-1.44415],[-0.957072,0.751101],[0.544047,0.844058],[0.814561,-1.23908],[-0.734708,0.743606],[-0.111461,1.43464],[0.994482,0.0770002],[-0.160625,-2.18739],[-0.938771,0.237613],[-1.96869,0.805032],[-0.657603,0.784197],[0.338751,1.02133],[1.01556,-0.35903],[0.637167,-1.16653],[-0.0899071,1.01787],[-0.855886,0.275839],[1.27128,0.907344],[-0.238253,0.359928],[1.3263,1.17828],[2.11968,1.57853],[-0.901581,2.0749],[-1.51696,0.956583],[-1.29938,-0.55536],[0.230372,0.0325259],[-3.09737,0.14397],[0.01323,0.449597],[-1.25743,0.236913],[1.02776,0.542507],[-0.766431,-0.248289],[0.217512,1.21991],[1.04533,0.619673],[0.331569,-2.66192],[-0.488205,1.16863],[-0.465482,0.116999],[0.332084,1.89271],[-0.167726,-0.140005],[3.01263,1.25032],[0.94204,-0.668092],[0.61189,-1.22571],[0.611715,-0.815251],[-1.5375,0.570898],[-2.4067,0.129027],[0.662936,-1.72668],[-0.65616,-0.0685241],[-0.751611,-0.00709083],[0.438177,0.0930031],[-0.455335,-0.976033],[1.86038,-0.518126],[0.219721,0.634669],[1.72546,-0.947611],[-0.543405,-1.13825],[-0.736749,0.109716],[-0.508206,0.847099],[-2.25867,-1.27154],[-0.5964,-0.790581],[-0.31468,1.58639],[-1.78274,-0.612232],[-0.684734,1.83936],[0.0611157,-0.291354],[0.87372,-0.600684],[-1.46295,-0.617409],[-0.318786,1.28646],[1.26314,0.461285],[-0.426726,0.371324],[-1.89234,1.36731],[-0.514391,-1.76574],[0.647229,1.10117],[0.00370249,0.483567],[0.729688,-1.36501],[-0.247234,0.277923],[0.479191,0.625947],[-0.0336098,1.04781],[-0.0367271,-0.465857],[0.110256,-1.64198],[-0.37687,-0.00722217],[-0.0955894,-0.980624],[0.109122,-1.74047],[-0.198754,-0.604914],[0.47362,-0.552203],[0.161637,-0.615809],[0.384483,-0.412966],[0.116468,0.783906],[-0.10008,0.469195],[1.49156,-0.438862],[1.22301,-0.666051],[0.526646,0.322995],[-0.656923,1.69044],[-0.131228,-0.183697],[-1.45347,0.144119],[1.17414,-0.410668],[0.929395,0.256246],[-0.337113,-1.30079],[0.578688,-0.705789],[-0.582459,-0.736775],[-1.38886,-0.966519],[-0.499748,0.448897],[-1.55516,3.15958],[0.483083,-0.268087],[0.205004,1.55867],[-0.0972525,-1.57912],[0.592563,0.596357],[-0.602044,1.30964],[-1.21009,1.40107],[-0.886698,1.14606],[-0.141114,1.49952],[0.441983,1.05281],[0.519162,0.366115],[-1.51455,0.387863],[-0.676917,-0.171545],[0.667678,0.72591],[-1.40585,-1.11336],[-0.0295335,-1.78119],[-0.631829,0.275363],[-0.342157,0.35883],[2.05339,-0.0622816],[1.1587,2.17952],[-1.45717,0.946577],[-0.844367,0.219922],[-0.28861,-0.0688989],[0.419271,-0.679287],[-0.836064,0.881504],[0.858269,-1.2821],[-0.906566,-1.89151],[-0.91681,0.0229457],[1.16322,-1.04025],[0.301918,1.6379],[0.490331,0.265865],[0.475425,0.115839],[-0.788704,-0.142051],[-0.669449,1.28529],[-0.137928,-0.211133],[-0.971531,-0.00365154],[-1.18784,0.0176549],[1.4282,0.0205178],[-0.58923,-0.200125],[-1.73218,0.0732227],[0.824993,-1.21223],[3.02799,0.640521],[1.6948,-1.36767],[-1.64827,-1.62657],[-0.996469,0.150072],[0.773121,0.777125],[-0.519476,0.254921],[-0.0351973,0.404587],[-0.439866,0.766835],[-0.259332,-0.228239],[-0.875419,-0.976994],[-2.53986,-0.735379],[-0.0566709,-0.139996],[-0.0217279,-0.180377],[0.59922,-1.03657],[0.146868,-0.572504],[-0.74536,-1.06194],[-0.521596,-0.819824],[0.59202,-0.131292],[-0.470039,-1.78361],[-2.17211,-1.42818],[-0.432617,1.79719],[0.26775,0.797027],[-0.36799,-0.752694],[1.14842,-0.304601],[-0.0343283,-2.98535],[0.461082,-0.440445],[-0.622424,-0.379634],[-1.62506,-0.880747],[-0.543099,-0.78405],[-0.269535,0.32233],[0.0208818,-1.87834],[0.623854,0.0932041],[0.767137,-0.673335],[0.888798,-0.686594],[1.48031,-0.448946],[0.661002,0.0370086],[1.40895,-1.38083],[0.576125,-1.10578],[1.89326,-0.0838187],[0.858611,1.44456],[-0.907348,0.26364],[-0.537503,1.37313],[-0.638434,-0.350272],[1.34856,-0.716277],[-2.26608,0.755785],[0.423232,1.11252],[-0.996141,-0.0849831],[-1.08751,0.0596727],[0.11108,-0.610088],[0.677663,-1.78039],[-1.05502,-0.180104],[-0.00409659,-1.00222],[0.562833,1.24665],[-0.029616,0.880421],[0.0702065,-1.55986],[-0.23527,-0.56668],[-1.29031,0.00413372],[-1.01864,0.344952],[-1.71131,0.366119],[0.943326,0.181604],[-0.542319,-1.79365],[-0.999111,-0.425157],[-1.40457,-0.545426],[1.94606,1.26511],[0.779572,-1.11455],[1.13848,-0.862505],[0.711148,-1.38644],[-0.453386,-0.0202795],[0.618319,1.35271],[0.722044,0.387554],[0.660021,-1.00146],[0.465919,0.327404],[-0.40773,-1.28401],[1.45919,0.926177],[-0.411565,1.30532],[0.549439,2.04098],[1.45019,-0.0750692],[-0.327249,-0.530045],[-1.39796,1.18458],[1.30115,0.882481],[-0.485259,0.264546],[-0.272407,0.258397],[-0.338823,-0.0367348],[-0.790757,0.39619],[1.73945,0.656819],[0.935939,1.27211],[1.27511,1.92925],[-0.595004,-0.684228],[-0.0230083,-0.430563],[1.85337,0.583345],[0.356188,0.300444],[-1.31765,-1.1758],[-1.195,0.925424],[-0.443684,-0.285234],[-0.826204,0.359222],[-0.748816,1.45293],[0.434034,-1.14416],[-0.644208,1.16595],[-0.559902,-1.68257],[0.0546682,0.470447],[-0.0564792,0.271949],[0.757535,-0.427255],[-0.663158,-0.516041],[0.683646,2.69399],[0.591043,1.76969],[-2.20872,-0.0576218],[-0.779031,-0.345437],[-0.703086,0.107221],[-0.0566955,0.196768],[0.588101,-0.608494],[0.738839,1.12778],[0.727128,1.37373],[-1.1831,-0.127591],[0.853199,-1.52239],[1.03198,-0.779342],[0.104467,-0.526127],[0.51551,-0.149632],[-1.73251,0.14785],[0.369231,1.3232],[0.667104,0.80155],[-0.51281,-0.0461117],[-0.477754,-1.38829],[1.26264,-0.166558],[1.57846,-0.348754],[1.89005,-1.99535],[0.390297,-0.106102],[0.235759,-1.40924],[0.244948,-0.133374],[0.57169,-0.399985],[-0.420542,-0.8352],[0.553255,0.358075],[-2.19382,1.1198],[0.421279,-0.190371],[0.753758,-1.04782],[-0.512419,-0.0694133],[-0.306225,0.523533],[-1.21103,0.168466],[0.0174802,-1.63371],[-1.16501,0.369257],[0.0643894,0.939056],[0.717609,0.160146],[-0.304268,0.726162],[-0.391375,-0.140481],[0.258215,-0.13074],[-1.49078,0.653628],[1.06182,-0.471399],[0.374969,1.45173],[-0.165467,0.105727],[0.357871,0.502882],[0.885118,-0.897875],[1.7379,0.211164],[-0.713196,-1.27556],[1.70642,-0.638521],[0.428636,0.653143],[-0.277595,-1.95241],[0.411295,-0.379643],[0.370445,-0.635102],[0.187854,-0.915457],[1.43266,0.501596],[-0.416128,0.129344],[-0.122868,0.154907],[0.950488,1.14435],[-0.411128,1.18295],[-0.98049,-1.05283],[0.564196,-1.06946],[-1.55666,1.65237],[0.624888,-0.181665],[1.05797,-0.196739],[-0.769529,-1.17735],[1.54237,-0.881526],[0.374802,-1.0192],[0.506105,-1.27418],[0.419768,0.886718],[1.58128,0.419863],[0.00956375,1.05801],[-0.38302,0.30315],[0.163699,1.43075],[1.2561,-0.548991],[0.00620397,-1.58082],[0.272004,2.0712],[-0.153784,-1.53873],[-0.404166,0.680095],[2.09224,-1.47884],[0.675043,-0.186383],[-0.383208,2.31733],[-0.355239,-0.469879],[-1.3053,-0.801703],[-1.51577,-0.0108486],[0.172158,-0.0553915],[0.57768,-1.7548],[-0.173049,-0.894538],[0.662172,-0.360249],[0.697838,-0.770978],[0.789578,0.55883],[0.479307,1.62925],[-0.449433,1.34049],[1.7657,0.494815],[0.281658,-0.0180664],[0.127981,-0.0365295],[-0.747966,-1.01369],[0.512891,1.03588],[1.08613,-0.12276],[-0.551952,-0.177026],[1.57891,1.4058],[-0.222394,0.0981434],[0.205503,1.01776],[1.33851,0.833219],[0.045253,2.12309],[2.15649,-1.65891],[1.00985,1.91107],[1.18898,-0.499354],[1.28765,-0.707992],[-0.279847,-0.836693],[-0.567342,-0.08448],[0.0789431,-0.0772068],[-0.374098,-0.754153],[0.36891,1.35719],[-0.216249,-0.262538],[-0.964493,0.43282],[1.14255,-1.88328],[0.271953,1.1694],[-0.62676,-0.0711754],[-1.24554,-1.57923],[-0.793869,1.07961],[0.808652,0.818312],[0.551898,-0.769237],[1.26214,-1.63959],[-0.398731,-2.49198],[-2.13505,0.392813],[0.420672,1.54502],[-0.164956,-0.592087],[-1.27789,2.36899],[-0.748335,-0.81979],[0.447628,-0.103824],[1.6065,-0.98551],[-1.23832,0.987314],[-0.857113,-0.346144],[-0.796012,-1.34504],[2.55533,1.07011],[-1.40966,0.927288],[0.161757,-0.155148],[1.07153,-0.461614],[-0.0756152,1.68461],[-0.38581,0.712465],[-0.695899,0.929992],[-0.240171,-0.483778],[0.0140339,-0.174459],[-1.32783,0.662006],[-0.421805,-0.698763],[-1.31457,-0.0269453],[-0.314242,-1.28184],[0.870097,0.386923],[-1.05029,0.152988],[-0.661749,-0.467685],[-0.398957,-0.514194],[-0.306869,0.384462],[2.24097,0.261137],[-1.84225,-0.578211],[-1.12629,-1.33245],[-0.343091,0.864973],[1.35707,0.941687],[-1.14144,0.329529],[0.719911,0.0412185],[0.691288,0.141166],[0.0157415,-0.0393573],[0.897854,0.27118],[-0.0268917,-0.383442],[-1.17253,0.760954],[-1.22323,0.0351336],[1.33729,-0.295452],[-0.412087,0.13985],[1.40508,-0.863809],[0.839941,1.23659],[-0.171826,1.40946],[-0.612136,0.681355],[0.43319,-0.220565],[1.25989,1.25437],[-2.15135,-0.583736],[0.638385,-1.26391],[1.1986,-0.235933],[0.576051,-0.633479],[-2.72106,2.00508],[-0.456634,-1.06159],[0.834452,-0.973466]] color=darkseagreen3 isColorExplicitlySet=true fillStyle=solid lineStyle=solid pointStyle=fsquare lineWidth=1] + + + +.. GENERATED FROM PYTHON SOURCE LINES 67-68 + +Fill the event domain with a color + +.. GENERATED FROM PYTHON SOURCE LINES 68-70 + +.. code-block:: Python + + _ = otv.View(drawEvent.fillEventCrossCut(bounds)) + + + + +.. image-sg:: /auto_examples/reliability_problems/images/sphx_glr_plot_four_branch_serial_system_waarts_003.png + :alt: Domain where g(x) < 0.0 + :srcset: /auto_examples/reliability_problems/images/sphx_glr_plot_four_branch_serial_system_waarts_003.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 71-72 + +.. code-block:: Python + + otv.View.ShowAll() + + + + + + + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 1.951 seconds) + + +.. _sphx_glr_download_auto_examples_reliability_problems_plot_four_branch_serial_system_waarts.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: plot_four_branch_serial_system_waarts.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: plot_four_branch_serial_system_waarts.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: plot_four_branch_serial_system_waarts.zip ` diff --git a/otbenchmark/master/_sources/auto_examples/reliability_problems/plot_print_reliability_benchmark.rst b/otbenchmark/master/_sources/auto_examples/reliability_problems/plot_print_reliability_benchmark.rst new file mode 100644 index 00000000000..dfe4f050657 --- /dev/null +++ b/otbenchmark/master/_sources/auto_examples/reliability_problems/plot_print_reliability_benchmark.rst @@ -0,0 +1,283 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "auto_examples/reliability_problems/plot_print_reliability_benchmark.py" +.. LINE NUMBERS ARE GIVEN BELOW. + +.. only:: html + + .. note:: + :class: sphx-glr-download-link-note + + :ref:`Go to the end ` + to download the full example code. + +.. rst-class:: sphx-glr-example-title + +.. _sphx_glr_auto_examples_reliability_problems_plot_print_reliability_benchmark.py: + + +Print a reliability benchmark problem +===================================== + +.. GENERATED FROM PYTHON SOURCE LINES 7-9 + +.. code-block:: Python + + import otbenchmark as otb + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 10-13 + +.. code-block:: Python + + problem = otb.RminusSReliability() + print(problem) + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + 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 + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 14-16 + +.. code-block:: Python + + print(problem.toFullString()) + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + 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)) + + + + +.. GENERATED FROM PYTHON SOURCE LINES 17-19 + +.. code-block:: Python + + problem.getName() + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + 'R-S' + + + +.. GENERATED FROM PYTHON SOURCE LINES 20-22 + +.. code-block:: Python + + event = problem.getEvent() + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 23-26 + +.. code-block:: Python + + g = event.getFunction() + g + + + + + + +.. raw:: html + +
+ [R,S]->[R - S] +
+
+
+ +.. GENERATED FROM PYTHON SOURCE LINES 27-29 + +.. code-block:: Python + + event.getOperator() + + + + + + +.. raw:: html + +
+

<

+
+
+
+ +.. GENERATED FROM PYTHON SOURCE LINES 30-33 + +.. code-block:: Python + + threshold = event.getThreshold() + threshold + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + 0.0 + + + +.. GENERATED FROM PYTHON SOURCE LINES 34-37 + +.. code-block:: Python + + pf = problem.getProbability() + pf + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + 0.07864960352514257 + + + +.. GENERATED FROM PYTHON SOURCE LINES 38-41 + +.. code-block:: Python + + beta = problem.computeBeta() + beta + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + 1.414213562373095 + + + +.. GENERATED FROM PYTHON SOURCE LINES 42-45 + +.. code-block:: Python + + inputVector = event.getAntecedent() + distribution = inputVector.getDistribution() + distribution + + + + + +.. raw:: html + +
+ JointDistribution +
    +
  • name=JointDistribution
  • +
  • dimension: 2
  • +
  • description=[R,S] +
  • copula: IndependentCopula(dimension = 2)
  • +
+ + + + + + + + + + + + + + + + + +
IndexVariableDistribution
0RNormal(mu = 4, sigma = 1)
1SNormal(mu = 2, sigma = 1)
+ +
+
+
+ + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 0.003 seconds) + + +.. _sphx_glr_download_auto_examples_reliability_problems_plot_print_reliability_benchmark.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: plot_print_reliability_benchmark.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: plot_print_reliability_benchmark.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: plot_print_reliability_benchmark.zip ` diff --git a/otbenchmark/master/_sources/auto_examples/reliability_problems/plot_reliability_benchmark.rst b/otbenchmark/master/_sources/auto_examples/reliability_problems/plot_reliability_benchmark.rst new file mode 100644 index 00000000000..974e65683f8 --- /dev/null +++ b/otbenchmark/master/_sources/auto_examples/reliability_problems/plot_reliability_benchmark.rst @@ -0,0 +1,540 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "auto_examples/reliability_problems/plot_reliability_benchmark.py" +.. LINE NUMBERS ARE GIVEN BELOW. + +.. only:: html + + .. note:: + :class: sphx-glr-download-link-note + + :ref:`Go to the end ` + to download the full example code. + +.. rst-class:: sphx-glr-example-title + +.. _sphx_glr_auto_examples_reliability_problems_plot_reliability_benchmark.py: + + +Benchmark on a given set of problems +==================================== + +.. GENERATED FROM PYTHON SOURCE LINES 7-10 + +In this example, we show how to make a loop over the problems in the benchmark. +We also show how to run various reliability algorithms on a given problem so that +we can score the methods using number of digits or performance. + +.. GENERATED FROM PYTHON SOURCE LINES 12-16 + +.. code-block:: Python + + import openturns as ot + import numpy as np + import otbenchmark as otb + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 17-19 + +Browse the reliability problems +------------------------------- + +.. GENERATED FROM PYTHON SOURCE LINES 21-22 + +We present the BBRC test cases using the otbenchmark module. + +.. GENERATED FROM PYTHON SOURCE LINES 22-27 + +.. code-block:: Python + + benchmarkProblemList = otb.ReliabilityBenchmarkProblemList() + numberOfProblems = len(benchmarkProblemList) + numberOfProblems + + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + 26 + + + +.. GENERATED FROM PYTHON SOURCE LINES 28-39 + +.. code-block:: Python + + for i in range(numberOfProblems): + problem = benchmarkProblemList[i] + name = problem.getName() + pf = problem.getProbability() + event = problem.getEvent() + antecedent = event.getAntecedent() + distribution = antecedent.getDistribution() + dimension = distribution.getDimension() + print("#", i, ":", name, " : pf = ", pf, ", dimension=", dimension) + + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + # 0 : RP8 : pf = 0.0007897927545597477 , dimension= 6 + # 1 : RP14 : pf = 0.00077285 , dimension= 5 + # 2 : RP22 : pf = 0.004207305511299618 , dimension= 2 + # 3 : RP24 : pf = 0.00286 , dimension= 2 + # 4 : RP25 : pf = 4.148566293759747e-05 , dimension= 2 + # 5 : RP28 : pf = 1.4532945550025393e-07 , dimension= 2 + # 6 : RP31 : pf = 0.003226681209587691 , dimension= 2 + # 7 : RP33 : pf = 0.00257 , dimension= 3 + # 8 : RP35 : pf = 0.00347894632 , dimension= 2 + # 9 : RP38 : pf = 0.0081 , dimension= 7 + # 10 : RP53 : pf = 0.0313 , dimension= 2 + # 11 : RP55 : pf = 0.5600144282863704 , dimension= 2 + # 12 : RP54 : pf = 0.000998 , dimension= 20 + # 13 : RP57 : pf = 0.0284 , dimension= 2 + # 14 : RP75 : pf = 0.00981929872154689 , dimension= 2 + # 15 : RP89 : pf = 0.00543 , dimension= 2 + # 16 : RP107 : pf = 2.92e-07 , dimension= 10 + # 17 : RP110 : pf = 3.19e-05 , dimension= 2 + # 18 : RP111 : pf = 7.65e-07 , dimension= 2 + # 19 : RP63 : pf = 0.000379 , dimension= 100 + # 20 : RP91 : pf = 0.000697 , dimension= 5 + # 21 : RP60 : pf = 0.0456 , dimension= 5 + # 22 : RP77 : pf = 2.87e-07 , dimension= 3 + # 23 : Four-branch serial system : pf = 0.0022227950661944398 , dimension= 2 + # 24 : R-S : pf = 0.07864960352514257 , dimension= 2 + # 25 : Axial stressed beam : pf = 0.02919819462483095 , dimension= 2 + + + + +.. GENERATED FROM PYTHON SOURCE LINES 40-52 + +.. code-block:: Python + + maximumEvaluationNumber = 1000 + maximumAbsoluteError = 1.0e-3 + maximumRelativeError = 1.0e-3 + maximumResidualError = 1.0e-3 + maximumConstraintError = 1.0e-3 + nearestPointAlgorithm = ot.AbdoRackwitz() + nearestPointAlgorithm.setMaximumCallsNumber(maximumEvaluationNumber) + nearestPointAlgorithm.setMaximumAbsoluteError(maximumAbsoluteError) + nearestPointAlgorithm.setMaximumRelativeError(maximumRelativeError) + nearestPointAlgorithm.setMaximumResidualError(maximumResidualError) + nearestPointAlgorithm.setMaximumConstraintError(maximumConstraintError) + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 53-55 + +The FORM method +--------------- + +.. GENERATED FROM PYTHON SOURCE LINES 57-59 + +.. code-block:: Python + + problem = otb.ReliabilityProblem8() + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 60-62 + +.. code-block:: Python + + metaAlgorithm = otb.ReliabilityBenchmarkMetaAlgorithm(problem) + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 63-66 + +.. code-block:: Python + + benchmarkResult = metaAlgorithm.runFORM(nearestPointAlgorithm) + benchmarkResult.summary() + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + 'computedProbability = 0.000659887791408224\nexactProbability = 0.0007897927545597477\nabsoluteError = 0.00012990496315152373\nnumberOfCorrectDigits = 0.7838874012130279\nnumberOfFunctionEvaluations = 8\nnumberOfDigitsPerEvaluation = 0.09798592515162849' + + + +.. GENERATED FROM PYTHON SOURCE LINES 67-69 + +The SORM method +--------------- + +.. GENERATED FROM PYTHON SOURCE LINES 71-74 + +.. code-block:: Python + + benchmarkResult = metaAlgorithm.runSORM(nearestPointAlgorithm) + benchmarkResult.summary() + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + 'computedProbability = 0.0007838036444007651\nexactProbability = 0.0007897927545597477\nabsoluteError = 5.989110158982603e-06\nnumberOfCorrectDigits = 2.120150844037516\nnumberOfFunctionEvaluations = 8\nnumberOfDigitsPerEvaluation = 0.2650188555046895' + + + +.. GENERATED FROM PYTHON SOURCE LINES 75-77 + +The LHS method +-------------- + +.. GENERATED FROM PYTHON SOURCE LINES 79-82 + +.. code-block:: Python + + benchmarkResult = metaAlgorithm.runLHS(maximumOuterSampling=10000) + benchmarkResult.summary() + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + 'computedProbability = 0.0006000000000000028\nexactProbability = 0.0007897927545597477\nabsoluteError = 0.00018979275455974492\nnumberOfCorrectDigits = 0.6192335162835474\nnumberOfFunctionEvaluations = 10000\nnumberOfDigitsPerEvaluation = 6.192335162835474e-05' + + + +.. GENERATED FROM PYTHON SOURCE LINES 83-85 + +The MonteCarloSampling method +----------------------------- + +.. GENERATED FROM PYTHON SOURCE LINES 87-90 + +.. code-block:: Python + + benchmarkResult = metaAlgorithm.runMonteCarlo(maximumOuterSampling=10000) + benchmarkResult.summary() + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + 'computedProbability = 0.0009000000000000016\nexactProbability = 0.0007897927545597477\nabsoluteError = 0.00011020724544025392\nnumberOfCorrectDigits = 0.8553029976536688\nnumberOfFunctionEvaluations = 10000\nnumberOfDigitsPerEvaluation = 8.553029976536688e-05' + + + +.. GENERATED FROM PYTHON SOURCE LINES 91-93 + +The FORM - Importance Sampling method +------------------------------------- + +.. GENERATED FROM PYTHON SOURCE LINES 95-98 + +.. code-block:: Python + + benchmarkResult = metaAlgorithm.runFORMImportanceSampling(nearestPointAlgorithm) + benchmarkResult.summary() + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + 'computedProbability = 0.0007421082279222962\nexactProbability = 0.0007897927545597477\nabsoluteError = 4.7684526637451516e-05\nnumberOfCorrectDigits = 1.2191356694999265\nnumberOfFunctionEvaluations = 433\nnumberOfDigitsPerEvaluation = 0.0028155558187065275' + + + +.. GENERATED FROM PYTHON SOURCE LINES 99-101 + +The Subset method +----------------- + +.. GENERATED FROM PYTHON SOURCE LINES 103-106 + +.. code-block:: Python + + benchmarkResult = metaAlgorithm.runSubsetSampling() + benchmarkResult.summary() + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + 'computedProbability = 0.0006360000000000005\nexactProbability = 0.0007897927545597477\nabsoluteError = 0.00015379275455974718\nnumberOfCorrectDigits = 0.7105772696763941\nnumberOfFunctionEvaluations = 4000\nnumberOfDigitsPerEvaluation = 0.00017764431741909854' + + + +.. GENERATED FROM PYTHON SOURCE LINES 107-112 + +The following function computes the number of correct base-10 digits +in the computed result compared to the exact result. +The `CompareMethods` function takes as a parameter a problem +and it returns the probabilities estimated by each method. +In addition, it returns the performance of these methods. + +.. GENERATED FROM PYTHON SOURCE LINES 114-132 + +.. code-block:: Python + + + + def PrintResults(name, benchmarkResult): + print("------------------------------------------------------------------") + print(name) + numberOfDigitsPerEvaluation = ( + benchmarkResult.numberOfCorrectDigits + / benchmarkResult.numberOfFunctionEvaluations + ) + print("Estimated probability:", benchmarkResult.computedProbability) + print("Number of function calls:", benchmarkResult.numberOfFunctionEvaluations) + print("Number of correct digits=%.1f" % (benchmarkResult.numberOfCorrectDigits)) + print( + "Performance=%.2e (correct digits/evaluation)" % (numberOfDigitsPerEvaluation) + ) + return [name, benchmarkResult.numberOfCorrectDigits, numberOfDigitsPerEvaluation] + + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 133-192 + +.. code-block:: Python + + + + def CompareMethods(problem, nearestPointAlgorithm, maximumOuterSampling=10000): + """ + Runs various algorithms on a given problem. + """ + summaryList = [] + pfReference = problem.getProbability() + print("Exact probability:", pfReference) + metaAlgorithm = otb.ReliabilityBenchmarkMetaAlgorithm(problem) + # SubsetSampling + benchmarkResult = metaAlgorithm.runSubsetSampling() + summaryList.append(PrintResults("SubsetSampling", benchmarkResult)) + # FORM + benchmarkResult = metaAlgorithm.runFORM(nearestPointAlgorithm) + summaryList.append(PrintResults("FORM", benchmarkResult)) + # SORM + benchmarkResult = metaAlgorithm.runSORM(nearestPointAlgorithm) + summaryList.append(PrintResults("SORM", benchmarkResult)) + # FORM - ImportanceSampling + benchmarkResult = metaAlgorithm.runFORMImportanceSampling( + nearestPointAlgorithm, maximumOuterSampling=maximumOuterSampling + ) + summaryList.append(PrintResults("FORM-IS", benchmarkResult)) + # MonteCarloSampling + benchmarkResult = metaAlgorithm.runMonteCarlo( + maximumOuterSampling=maximumOuterSampling + ) + summaryList.append(PrintResults("MonteCarloSampling", benchmarkResult)) + # LHS + benchmarkResult = metaAlgorithm.runLHS() + summaryList.append(PrintResults("LHS", benchmarkResult)) + # Gather results + numberOfMethods = len(summaryList) + correctDigitsList = [] + performanceList = [] + algorithmNames = [] + for i in range(numberOfMethods): + [name, numberOfCorrectDigits, numberOfDigitsPerEvaluation] = summaryList[i] + algorithmNames.append(name) + correctDigitsList.append(numberOfCorrectDigits) + performanceList.append(numberOfDigitsPerEvaluation) + print("------------------------------------------------------------------------") + print("Scoring by number of correct digits") + indices = np.argsort(correctDigitsList) + rank = list(indices) + for i in range(numberOfMethods): + j = rank[i] + print("%d : %s (%.1f)" % (j, algorithmNames[j], correctDigitsList[j])) + print("------------------------------------------------------------------------") + print("Scoring by performance (digits/evaluation)") + indices = np.argsort(performanceList) + rank = list(indices) + for i in range(len(indices)): + j = rank[i] + print("%d : %s (%.1e)" % (j, algorithmNames[j], performanceList[j])) + return correctDigitsList, performanceList + + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 193-196 + +.. code-block:: Python + + problem = otb.ReliabilityProblem8() + _ = CompareMethods(problem, nearestPointAlgorithm) + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + Exact probability: 0.0007897927545597477 + ------------------------------------------------------------------ + SubsetSampling + Estimated probability: 0.0008869999999999994 + Number of function calls: 4000 + Number of correct digits=0.9 + Performance=2.27e-04 (correct digits/evaluation) + ------------------------------------------------------------------ + FORM + Estimated probability: 0.000659887791408224 + Number of function calls: 8 + Number of correct digits=0.8 + Performance=9.80e-02 (correct digits/evaluation) + ------------------------------------------------------------------ + SORM + Estimated probability: 0.0007838036444007651 + Number of function calls: 8 + Number of correct digits=2.1 + Performance=2.65e-01 (correct digits/evaluation) + ------------------------------------------------------------------ + FORM-IS + Estimated probability: 0.0009082511797072755 + Number of function calls: 450 + Number of correct digits=0.8 + Performance=1.83e-03 (correct digits/evaluation) + ------------------------------------------------------------------ + MonteCarloSampling + Estimated probability: 0.0007999999999999957 + Number of function calls: 10000 + Number of correct digits=1.9 + Performance=1.89e-04 (correct digits/evaluation) + ------------------------------------------------------------------ + LHS + Estimated probability: 0.0 + Number of function calls: 1000 + Number of correct digits=0.0 + Performance=0.00e+00 (correct digits/evaluation) + ------------------------------------------------------------------------ + Scoring by number of correct digits + 5 : LHS (0.0) + 1 : FORM (0.8) + 3 : FORM-IS (0.8) + 0 : SubsetSampling (0.9) + 4 : MonteCarloSampling (1.9) + 2 : SORM (2.1) + ------------------------------------------------------------------------ + Scoring by performance (digits/evaluation) + 5 : LHS (0.0e+00) + 4 : MonteCarloSampling (1.9e-04) + 0 : SubsetSampling (2.3e-04) + 3 : FORM-IS (1.8e-03) + 1 : FORM (9.8e-02) + 2 : SORM (2.7e-01) + + + + +.. GENERATED FROM PYTHON SOURCE LINES 197-205 + +Remarks +------- + +* We note that the FORM and SORM methods are faster, but, they do not converge to the exact proba. +* We also notice the effectiveness of the FORM-ImportanceSampling method (inexpensive method, and converges). +* The convergence of the MonteCarlo method requires a large number of simulations. +* SubsetSampling converges even if the probability is very low. + + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 1.500 seconds) + + +.. _sphx_glr_download_auto_examples_reliability_problems_plot_reliability_benchmark.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: plot_reliability_benchmark.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: plot_reliability_benchmark.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: plot_reliability_benchmark.zip ` diff --git a/otbenchmark/master/_sources/auto_examples/reliability_problems/plot_reliability_benchmark_table.rst b/otbenchmark/master/_sources/auto_examples/reliability_problems/plot_reliability_benchmark_table.rst new file mode 100644 index 00000000000..7cb40a4c93b --- /dev/null +++ b/otbenchmark/master/_sources/auto_examples/reliability_problems/plot_reliability_benchmark_table.rst @@ -0,0 +1,982 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "auto_examples/reliability_problems/plot_reliability_benchmark_table.py" +.. LINE NUMBERS ARE GIVEN BELOW. + +.. only:: html + + .. note:: + :class: sphx-glr-download-link-note + + :ref:`Go to the end ` + to download the full example code. + +.. rst-class:: sphx-glr-example-title + +.. _sphx_glr_auto_examples_reliability_problems_plot_reliability_benchmark_table.py: + + +Benchmark the reliability solvers on the problems +================================================= + +.. GENERATED FROM PYTHON SOURCE LINES 7-8 + +In this example, we show how to run all the methods on all the problems and get the computed probability. + +.. GENERATED FROM PYTHON SOURCE LINES 10-16 + +.. code-block:: Python + + import openturns as ot + import numpy as np + import otbenchmark as otb + import pandas as pd + from tqdm import tqdm + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 17-19 + +.. code-block:: Python + + ot.Log.Show(ot.Log.NONE) + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 20-21 + +We import the list of reliability problems. + +.. GENERATED FROM PYTHON SOURCE LINES 21-25 + +.. code-block:: Python + + benchmarkProblemList = otb.ReliabilityBenchmarkProblemList() + numberOfProblems = len(benchmarkProblemList) + numberOfProblems + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + 26 + + + +.. GENERATED FROM PYTHON SOURCE LINES 26-27 + +For each problem in the benchmark, print the problem name and the exact failure probability. + +.. GENERATED FROM PYTHON SOURCE LINES 27-33 + +.. code-block:: Python + + for i in range(numberOfProblems): + problem = benchmarkProblemList[i] + name = problem.getName() + pf = problem.getProbability() + print("#", i, " : ", name, ", exact PF : ", pf) + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + # 0 : RP8 , exact PF : 0.0007897927545597477 + # 1 : RP14 , exact PF : 0.00077285 + # 2 : RP22 , exact PF : 0.004207305511299618 + # 3 : RP24 , exact PF : 0.00286 + # 4 : RP25 , exact PF : 4.148566293759747e-05 + # 5 : RP28 , exact PF : 1.4532945550025393e-07 + # 6 : RP31 , exact PF : 0.003226681209587691 + # 7 : RP33 , exact PF : 0.00257 + # 8 : RP35 , exact PF : 0.00347894632 + # 9 : RP38 , exact PF : 0.0081 + # 10 : RP53 , exact PF : 0.0313 + # 11 : RP55 , exact PF : 0.5600144282863704 + # 12 : RP54 , exact PF : 0.000998 + # 13 : RP57 , exact PF : 0.0284 + # 14 : RP75 , exact PF : 0.00981929872154689 + # 15 : RP89 , exact PF : 0.00543 + # 16 : RP107 , exact PF : 2.92e-07 + # 17 : RP110 , exact PF : 3.19e-05 + # 18 : RP111 , exact PF : 7.65e-07 + # 19 : RP63 , exact PF : 0.000379 + # 20 : RP91 , exact PF : 0.000697 + # 21 : RP60 , exact PF : 0.0456 + # 22 : RP77 , exact PF : 2.87e-07 + # 23 : Four-branch serial system , exact PF : 0.0022227950661944398 + # 24 : R-S , exact PF : 0.07864960352514257 + # 25 : Axial stressed beam , exact PF : 0.02919819462483095 + + + + +.. GENERATED FROM PYTHON SOURCE LINES 34-36 + +Run several algorithms on a single problem +------------------------------------------ + +.. GENERATED FROM PYTHON SOURCE LINES 38-40 + +We want to run several algorithms on a single problem. +We set the parameters of the algorithms and run them on a single problem. + +.. GENERATED FROM PYTHON SOURCE LINES 40-53 + +.. code-block:: Python + + maximumEvaluationNumber = 1000 + maximumAbsoluteError = 1.0e-3 + maximumRelativeError = 1.0e-3 + maximumResidualError = 1.0e-3 + maximumConstraintError = 1.0e-3 + nearestPointAlgorithm = ot.AbdoRackwitz() + nearestPointAlgorithm.setMaximumCallsNumber(maximumEvaluationNumber) + nearestPointAlgorithm.setMaximumAbsoluteError(maximumAbsoluteError) + nearestPointAlgorithm.setMaximumRelativeError(maximumRelativeError) + nearestPointAlgorithm.setMaximumResidualError(maximumResidualError) + nearestPointAlgorithm.setMaximumConstraintError(maximumConstraintError) + + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 54-58 + +.. code-block:: Python + + i = 3 + problem = benchmarkProblemList[i] + metaAlgorithm = otb.ReliabilityBenchmarkMetaAlgorithm(problem) + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 59-60 + +We try the FORM algorithm. + +.. GENERATED FROM PYTHON SOURCE LINES 60-64 + +.. code-block:: Python + + benchmarkFORM = metaAlgorithm.runFORM(nearestPointAlgorithm) + s1 = benchmarkFORM.summary() + print(s1) + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + computedProbability = 0.006209245091320793 + exactProbability = 0.00286 + absoluteError = 0.003349245091320793 + numberOfCorrectDigits = 0.0 + numberOfFunctionEvaluations = 6 + numberOfDigitsPerEvaluation = 0.0 + + + + +.. GENERATED FROM PYTHON SOURCE LINES 65-66 + +Then the SORM algorithm. + +.. GENERATED FROM PYTHON SOURCE LINES 66-70 + +.. code-block:: Python + + benchmarkSORM = metaAlgorithm.runSORM(nearestPointAlgorithm) + s2 = benchmarkSORM.summary() + print(s2) + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + computedProbability = 0.006209245091320793 + exactProbability = 0.00286 + absoluteError = 0.003349245091320793 + numberOfCorrectDigits = 0.0 + numberOfFunctionEvaluations = 6 + numberOfDigitsPerEvaluation = 0.0 + + + + +.. GENERATED FROM PYTHON SOURCE LINES 71-77 + +.. code-block:: Python + + benchmarkMC = metaAlgorithm.runMonteCarlo( + maximumOuterSampling=1000000, coefficientOfVariation=0.1, blockSize=1, + ) + s3 = benchmarkMC.summary() + print(s3) + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + computedProbability = 0.0030347171643602777 + exactProbability = 0.00286 + absoluteError = 0.00017471716436027757 + numberOfCorrectDigits = 1.2140304605972891 + numberOfFunctionEvaluations = 32952 + numberOfDigitsPerEvaluation = 3.684239076830812e-05 + + + + +.. GENERATED FROM PYTHON SOURCE LINES 78-87 + +.. code-block:: Python + + benchmarkFORMIS = metaAlgorithm.runFORMImportanceSampling( + nearestPointAlgorithm, + maximumOuterSampling=1000, + coefficientOfVariation=0.1, + blockSize=1, + ) + s4 = benchmarkFORMIS.summary() + print(s4) + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + computedProbability = 0.0025644014068043094 + exactProbability = 0.00286 + absoluteError = 0.0002955985931956907 + numberOfCorrectDigits = 0.9856636702831238 + numberOfFunctionEvaluations = 641 + numberOfDigitsPerEvaluation = 0.0015376968335150138 + + + + +.. GENERATED FROM PYTHON SOURCE LINES 88-94 + +.. code-block:: Python + + benchmarkSS = metaAlgorithm.runSubsetSampling( + maximumOuterSampling=5000, coefficientOfVariation=0.1, blockSize=1, + ) + s5 = benchmarkSS.summary() + print(s5) + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + computedProbability = 0.002371248 + exactProbability = 0.00286 + absoluteError = 0.0004887520000000003 + numberOfCorrectDigits = 0.7672774855646353 + numberOfFunctionEvaluations = 15000 + numberOfDigitsPerEvaluation = 5.1151832370975685e-05 + + + + +.. GENERATED FROM PYTHON SOURCE LINES 95-99 + +Run all algorithms on all problems and produce a single result table +-------------------------------------------------------------------- + +For several algorithms and all the reliability problems, we want to estimate the failure probability and compare them. + +.. GENERATED FROM PYTHON SOURCE LINES 101-102 + +We create a list of problem names. + +.. GENERATED FROM PYTHON SOURCE LINES 102-109 + +.. code-block:: Python + + problem_names = [] + for i in range(numberOfProblems): + problem = benchmarkProblemList[i] + name = problem.getName() + problem_names.append(name) + + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 110-155 + +.. code-block:: Python + + metrics = [ + "Exact", + "FORM", + "SORM", + "Monte Carlo", + "FORM-IS", + "Subset", + ] + results = np.zeros((numberOfProblems, len(metrics))) + maximumOuterSampling = 10 ** 2 + blockSize = 10 ** 2 + coefficientOfVariation = 0.0 + + for i in tqdm(range(numberOfProblems)): + problem = benchmarkProblemList[i] + results[i][0] = problem.getProbability() + metaAlgorithm = otb.ReliabilityBenchmarkMetaAlgorithm(problem) + benchmarkResult = metaAlgorithm.runFORM(nearestPointAlgorithm) + results[i][1] = benchmarkResult.computedProbability + benchmarkResult = metaAlgorithm.runSORM(nearestPointAlgorithm) + results[i][2] = benchmarkResult.computedProbability + benchmarkResult = metaAlgorithm.runMonteCarlo( + maximumOuterSampling=maximumOuterSampling, + coefficientOfVariation=coefficientOfVariation, + blockSize=blockSize, + ) + results[i][3] = benchmarkResult.computedProbability + benchmarkResult = metaAlgorithm.runFORMImportanceSampling( + nearestPointAlgorithm, + maximumOuterSampling=maximumOuterSampling, + coefficientOfVariation=coefficientOfVariation, + blockSize=blockSize, + ) + results[i][4] = benchmarkResult.computedProbability + benchmarkResult = metaAlgorithm.runSubsetSampling( + maximumOuterSampling=maximumOuterSampling, + coefficientOfVariation=coefficientOfVariation, + blockSize=blockSize, + ) + results[i][5] = benchmarkResult.computedProbability + + df = pd.DataFrame(results, index=problem_names, columns=metrics) + df.to_csv("reliability_benchmark_table-output.csv") + df + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + 0%| | 0/26 [00:00 +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ExactFORMSORMMonte CarloFORM-ISSubset
RP87.897928e-046.598878e-047.838036e-040.00057.990000e-047.909000e-04
RP147.728500e-047.003011e-046.995436e-040.00067.842576e-049.103000e-04
RP224.207306e-036.209672e-034.390902e-030.00464.307892e-034.106889e-03
RP242.860000e-036.209245e-036.209245e-030.00292.901293e-032.855000e-03
RP254.148566e-050.000000e+000.000000e+000.00010.000000e+004.317010e-05
RP281.453295e-072.850470e-080.000000e+000.00001.048441e-071.372115e-07
RP313.226681e-032.275013e-022.275013e-020.00313.206435e-033.327000e-03
RP332.570000e-031.349898e-031.349898e-030.00162.377337e-032.678319e-03
RP353.478946e-031.349898e-032.134376e-030.00322.622543e-032.918000e-03
RP388.100000e-037.902212e-038.029356e-030.00818.069335e-037.528000e-03
RP533.130000e-021.180398e-012.986164e-020.03093.178620e-023.357000e-02
RP555.600144e-010.000000e+000.000000e+000.55510.000000e+005.569000e-01
RP549.980000e-045.555704e-023.554811e-030.00109.599121e-049.770000e-04
RP572.840000e-020.000000e+000.000000e+000.02760.000000e+002.825000e-02
RP759.819299e-030.000000e+000.000000e+000.01020.000000e+009.126000e-03
RP895.430000e-032.008594e-092.008594e-090.00512.314635e-055.763000e-03
RP1072.920000e-072.866516e-072.866516e-070.00002.847271e-072.693000e-07
RP1103.190000e-053.167124e-053.167124e-050.00013.087490e-052.104893e-05
RP1117.650000e-070.000000e+000.000000e+000.00000.000000e+008.707284e-07
RP633.790000e-049.999966e-010.000000e+000.00060.000000e+004.549446e-04
RP916.970000e-046.994296e-047.011592e-040.00047.060608e-047.802000e-04
RP604.560000e-024.483968e-024.483968e-020.04704.511535e-024.284000e-02
RP772.870000e-070.000000e+000.000000e+000.00000.000000e+003.559129e-07
Four-branch serial system2.222795e-030.000000e+000.000000e+000.00200.000000e+002.109000e-03
R-S7.864960e-027.864960e-027.864960e-020.07727.594840e-027.715000e-02
Axial stressed beam2.919819e-022.998280e-022.933256e-020.02702.849808e-022.792000e-02
+
+
+
+
+ +.. GENERATED FROM PYTHON SOURCE LINES 156-160 + +Run several algorithms on all problems and get detailed statistics +------------------------------------------------------------------ + +Run several algorithms on all reliability benchmark problems: print statistics on each problem. + +.. GENERATED FROM PYTHON SOURCE LINES 162-177 + +.. code-block:: Python + + + + def FormatRow(benchmarkResult): + """Format a single row of the benchmark table""" + result = [ + benchmarkResult.exactProbability, + benchmarkResult.computedProbability, + benchmarkResult.absoluteError, + benchmarkResult.numberOfCorrectDigits, + benchmarkResult.numberOfFunctionEvaluations, + benchmarkResult.numberOfDigitsPerEvaluation, + ] + return result + + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 178-242 + +.. code-block:: Python + + method_names = ["Monte-Carlo", "FORM", "SORM", "FORM-IS", "SUBSET"] + + maximumOuterSampling = 10 ** 2 + blockSize = 10 ** 2 + coefficientOfVariation = 0.0 + + result = dict() + for i in range(numberOfProblems): + problem = benchmarkProblemList[i] + name = problem_names[i] + exact_pf_name = "%10s" % ("Exact PF " + name[0:10]) + metrics = [ + exact_pf_name, + "Estimated PF", + "Absolute Error", + "Correct Digits", + "Function Calls", + "Digits / Evaluation", + ] + results = np.zeros((len(method_names), len(metrics))) + metaAlgorithm = otb.ReliabilityBenchmarkMetaAlgorithm(problem) + # Monte-Carlo + benchmarkResult = metaAlgorithm.runMonteCarlo( + maximumOuterSampling=maximumOuterSampling, + coefficientOfVariation=coefficientOfVariation, + blockSize=blockSize, + ) + results[0, :] = FormatRow(benchmarkResult) + # FORM + benchmarkResult = metaAlgorithm.runFORM(nearestPointAlgorithm) + results[1, :] = FormatRow(benchmarkResult) + # SORM + benchmarkResult = metaAlgorithm.runSORM(nearestPointAlgorithm) + results[2, :] = FormatRow(benchmarkResult) + # FORM-IS + benchmarkResult = metaAlgorithm.runFORMImportanceSampling( + nearestPointAlgorithm, + maximumOuterSampling=maximumOuterSampling, + coefficientOfVariation=coefficientOfVariation, + blockSize=blockSize, + ) + results[3, :] = FormatRow(benchmarkResult) + # Subset + benchmarkResult = metaAlgorithm.runSubsetSampling( + maximumOuterSampling=maximumOuterSampling, + coefficientOfVariation=coefficientOfVariation, + blockSize=blockSize, + ) + results[4, :] = FormatRow(benchmarkResult) + # Gather statistics and print them + df = pd.DataFrame(results, index=method_names, columns=metrics,) + # Format the columns for readability + s = df.style.format( + { + exact_pf_name: lambda x: "{:.3e}".format(x), + "Estimated PF": lambda x: "{:.3e}".format(x), + "Absolute Error": lambda x: "{:.3e}".format(x), + "Correct Digits": lambda x: "{:.1f}".format(x), + "Function Calls": lambda x: "{:d}".format(int(x)), + "Digits / Evaluation": lambda x: "{:.1f}".format(x), + } + ) + result[name] = s + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 243-245 + +.. code-block:: Python + + result["RP33"] + + + + + + +.. raw:: html + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 Exact PF RP33Estimated PFAbsolute ErrorCorrect DigitsFunction CallsDigits / Evaluation
Monte-Carlo2.570e-032.800e-032.300e-041.0100000.0
FORM2.570e-031.350e-031.220e-030.3260.0
SORM2.570e-031.350e-031.220e-030.3510.0
FORM-IS2.570e-034.220e-031.650e-030.2100260.0
SUBSET2.570e-032.848e-032.780e-041.0300000.0
+ +
+
+
+ +.. GENERATED FROM PYTHON SOURCE LINES 246-247 + +.. code-block:: Python + + result["RP35"] + + + + + +.. raw:: html + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 Exact PF RP35Estimated PFAbsolute ErrorCorrect DigitsFunction CallsDigits / Evaluation
Monte-Carlo3.479e-033.700e-032.211e-041.2100000.0
FORM3.479e-031.350e-032.129e-030.2200.0
SORM3.479e-032.134e-031.345e-030.4330.0
FORM-IS3.479e-032.781e-036.984e-040.7100200.0
SUBSET3.479e-033.269e-032.099e-041.2300000.0
+ +
+
+
+ + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 14.618 seconds) + + +.. _sphx_glr_download_auto_examples_reliability_problems_plot_reliability_benchmark_table.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: plot_reliability_benchmark_table.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: plot_reliability_benchmark_table.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: plot_reliability_benchmark_table.zip ` diff --git a/otbenchmark/master/_sources/auto_examples/reliability_problems/plot_reliability_compute_reference_proba.rst b/otbenchmark/master/_sources/auto_examples/reliability_problems/plot_reliability_compute_reference_proba.rst new file mode 100644 index 00000000000..2e163d27a89 --- /dev/null +++ b/otbenchmark/master/_sources/auto_examples/reliability_problems/plot_reliability_compute_reference_proba.rst @@ -0,0 +1,560 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "auto_examples/reliability_problems/plot_reliability_compute_reference_proba.py" +.. LINE NUMBERS ARE GIVEN BELOW. + +.. only:: html + + .. note:: + :class: sphx-glr-download-link-note + + :ref:`Go to the end ` + to download the full example code. + +.. rst-class:: sphx-glr-example-title + +.. _sphx_glr_auto_examples_reliability_problems_plot_reliability_compute_reference_proba.py: + + +Compute reference probabilities with Monte-Carlo +================================================ + +.. GENERATED FROM PYTHON SOURCE LINES 7-10 + +In this example, we perform a reliability benchmark based on a large Monte-Carlo sample. +In order to limit the elapsed time, we consider a limited elapsed time for each problem. +In order to get the best possible accuracy within this time limit, we set the coefficient of variation to zero. + +.. GENERATED FROM PYTHON SOURCE LINES 12-19 + +.. code-block:: Python + + import otbenchmark as otb + import pandas as pd + import numpy as np + from tqdm import tqdm + import time + + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 20-25 + +.. code-block:: Python + + problemslist = otb.ReliabilityBenchmarkProblemList() + numberOfProblems = len(problemslist) + numberOfProblems + + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + 26 + + + +.. GENERATED FROM PYTHON SOURCE LINES 26-31 + +.. code-block:: Python + + coefficientOfVariation = 0.0 + maximumOuterSampling = 10 ** 4 # 10 ** 6 for real + blockSize = 10 ** 0 # 10 ** 4 for real simulations + blockSize + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + 1 + + + +.. GENERATED FROM PYTHON SOURCE LINES 32-35 + +.. code-block:: Python + + confidenceLevel = 0.95 + maximumDurationSeconds = 5 * 60.0 + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 36-39 + +.. code-block:: Python + + totalDurationMinutes = numberOfProblems * maximumDurationSeconds / 60.0 + totalDurationMinutes + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + 130.0 + + + +.. GENERATED FROM PYTHON SOURCE LINES 40-79 + +.. code-block:: Python + + model_names = [problemslist[i].getName() for i in range(numberOfProblems)] + metrics = ["PF", "N. function calls", "PMin", "PMax", "C.O.V.", "Digits", "Time (s)"] + resultArray = np.zeros((numberOfProblems, len(metrics))) + for i in tqdm(range(numberOfProblems)): + startTime = time.time() + problem = problemslist[i] + name = problem.getName() + event = problem.getEvent() + g = event.getFunction() + factory = otb.ProbabilitySimulationAlgorithmFactory() + algo = factory.buildMonteCarlo(problem) + algo.setMaximumOuterSampling(maximumOuterSampling) + algo.setBlockSize(blockSize) + algo.setMaximumCoefficientOfVariation(coefficientOfVariation) + algo.setMaximumTimeDuration(maximumDurationSeconds) + initialNumberOfCall = g.getEvaluationCallsNumber() + algo.run() + result = algo.getResult() + numberOfFunctionEvaluations = g.getEvaluationCallsNumber() - initialNumberOfCall + computedProbability = result.getProbabilityEstimate() + confidenceLength = result.getConfidenceLength(confidenceLevel) + pmin = computedProbability - 0.5 * confidenceLength + pmax = computedProbability + 0.5 * confidenceLength + cov = result.getCoefficientOfVariation() + if cov > 0.0: + expectedDigits = -np.log10(cov) - 1.0 + else: + expectedDigits = 0.0 + stopTime = time.time() + elapsedTime = stopTime - startTime + resultArray[i][0] = computedProbability + resultArray[i][1] = numberOfFunctionEvaluations + resultArray[i][2] = pmin + resultArray[i][3] = pmax + resultArray[i][4] = cov + resultArray[i][5] = expectedDigits + resultArray[i][6] = elapsedTime + + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + 0%| | 0/26 [00:00 +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PFN. function callsPMinPMaxC.O.V.DigitsTime (s)
RP80.000710000.00.0001820.0012180.377832-0.5772990.652181
RP140.000910000.00.0003120.0014880.333183-0.5226830.189734
RP220.003110000.00.0020100.0041900.179327-0.2536450.051208
RP240.003010000.00.0019280.0040720.182300-0.2607870.054883
RP250.000010000.00.0000000.000000-1.0000000.0000000.059412
RP280.000010000.00.0000000.000000-1.0000000.0000000.058447
RP310.003210000.00.0020930.0043070.176494-0.2467290.054910
RP330.002810000.00.0017640.0038360.188717-0.2758120.054384
RP350.003410000.00.0022590.0045410.171207-0.2335210.044850
RP380.008210000.00.0064320.0099680.109978-0.0413050.090779
RP530.033910000.00.0303530.0374470.0533840.2725890.055494
RP550.558810000.00.5490680.5685320.0088861.0513100.055751
RP540.000910000.00.0003120.0014880.333183-0.5226830.186060
RP570.028310000.00.0250500.0315500.0585970.2321270.056069
RP750.009410000.00.0075090.0112910.102656-0.0113850.054269
RP890.005510000.00.0040500.0069500.134469-0.1286210.055397
RP1070.000010000.00.0000000.000000-1.0000000.0000000.136680
RP1100.000010000.00.0000000.000000-1.0000000.0000000.056107
RP1110.000010000.00.0000000.000000-1.0000000.0000000.046841
RP630.000510000.00.0000620.0009380.447102-0.6504061.001051
RP910.000810000.00.0002460.0013540.353412-0.5482810.070034
RP600.043910000.00.0398850.0479150.0466680.3309810.563308
RP770.000010000.00.0000000.000000-1.0000000.0000000.064567
Four-branch serial system0.002810000.00.0017640.0038360.188717-0.2758120.052443
R-S0.077010000.00.0717750.0822250.0346220.4606450.050569
Axial stressed beam0.031310000.00.0278870.0347130.0556320.2546780.050478
+
+ +
+
+ +.. GENERATED FROM PYTHON SOURCE LINES 85-127 + +The problems with higher failture probabilities are obviously solved with more accuracy with the Monte-Carlo method. +For example, the RP55 problem which has the highest probability equal to 0.560 has more than 3 significant digits. +On the opposite side, the problems with probabilities close to zero are much more difficult to solve. +The RP28 with a probability close to :math:`10^{-7}` has no significant digit. + +These previous results are consistent with the distribution of the Monte-Carlo estimator. +The properties of the binomial distribution imply that its variance is: + +.. math:: + \sigma_{p_f}^2 = \frac{p_f (1-p_f)}{n} + +where :math:`n` is the sample size and :math:`p_f` is the failure probability. +The coefficient of variation is: + +.. math:: + CV = \frac{\sigma_{p_f}}{p_f}. + +Since we do not know the exact value of :math:`p_f`, we use is approximation :math:`\tilde{p_f}` instead +(this turns rigorous equations into approximate ones, but does not change the outcome). +This implies: + +.. math:: + CV = \sqrt{\frac{1 - p_f}{p_f n}}. + +When :math:`p_f\rightarrow 0`, we have :math:`p_f \rightarrow 0` which implies: + +.. math:: + CV \rightarrow \sqrt{\frac{1}{p_f n}}. + +Inverting the previous equation, we get the sample size given the coefficient of variation: + +.. math:: + n \approx \frac{1}{p_f CV^2}. + +This leads to the rule of thumb that, in order to estimate the probability :math:`p_f = 10^{-m}`, +where :math:`m` is an integer, we need a sample size equal to: + +.. math:: + n \approx \frac{1}{10^{-m} 10^{-2}} = 10^{m+2}. + +For example, estimating the probability of the RP28 problem with just one single digit leads to +a sample size equal to :math:`n=10^9`, since the exact :math:`p_f \approx 10^{-7}`. + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 4.315 seconds) + + +.. _sphx_glr_download_auto_examples_reliability_problems_plot_reliability_compute_reference_proba.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: plot_reliability_compute_reference_proba.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: plot_reliability_compute_reference_proba.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: plot_reliability_compute_reference_proba.zip ` diff --git a/otbenchmark/master/_sources/auto_examples/reliability_problems/plot_rp110.rst b/otbenchmark/master/_sources/auto_examples/reliability_problems/plot_rp110.rst new file mode 100644 index 00000000000..f87e2b6947e --- /dev/null +++ b/otbenchmark/master/_sources/auto_examples/reliability_problems/plot_rp110.rst @@ -0,0 +1,404 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "auto_examples/reliability_problems/plot_rp110.py" +.. LINE NUMBERS ARE GIVEN BELOW. + +.. only:: html + + .. note:: + :class: sphx-glr-download-link-note + + :ref:`Go to the end ` + to download the full example code. + +.. rst-class:: sphx-glr-example-title + +.. _sphx_glr_auto_examples_reliability_problems_plot_rp110.py: + + +RP110 analysis and 2D graphics +============================== + +.. GENERATED FROM PYTHON SOURCE LINES 7-9 + +The objective of this example is to present problem 110 of the BBRC. +We also present graphic elements for the visualization of the limit state surface in 2 dimensions. + +.. GENERATED FROM PYTHON SOURCE LINES 11-15 + +.. code-block:: Python + + import openturns as ot + import openturns.viewer as otv + import otbenchmark as otb + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 16-19 + +.. code-block:: Python + + problem = otb.ReliabilityProblem110() + print(problem) + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + name = RP110 + event = class=ThresholdEventImplementation antecedent=class=CompositeRandomVector function=class=Function name=Unnamed implementation=class=FunctionImplementation name=Unnamed description=[x0,x1,gsys] evaluationImplementation=class=SymbolicEvaluation name=Unnamed inputVariablesNames=[x0,x1] outputVariablesNames=[gsys] formulas=[if (x0 <= 3.5) + var g1 := 0.85 - 0.1 * x0; + else + g1 := 4 - x0; + if (x1 <= 2.0) + var g2 := 2.3 - x1; + else + g2 := 0.5 - 0.1 * x1; + gsys := min(g1, g2);] gradientImplementation=class=SymbolicGradient name=Unnamed evaluation=class=SymbolicEvaluation name=Unnamed inputVariablesNames=[x0,x1] outputVariablesNames=[gsys] formulas=[if (x0 <= 3.5) + var g1 := 0.85 - 0.1 * x0; + else + g1 := 4 - x0; + if (x1 <= 2.0) + var g2 := 2.3 - x1; + else + g2 := 0.5 - 0.1 * x1; + gsys := min(g1, g2);] hessianImplementation=class=SymbolicHessian name=Unnamed evaluation=class=SymbolicEvaluation name=Unnamed inputVariablesNames=[x0,x1] outputVariablesNames=[gsys] formulas=[if (x0 <= 3.5) + var g1 := 0.85 - 0.1 * x0; + else + g1 := 4 - x0; + if (x1 <= 2.0) + var g2 := 2.3 - x1; + else + g2 := 0.5 - 0.1 * x1; + gsys := min(g1, g2);] 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=[0] 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=[0] 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 = 3.19e-05 + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 20-23 + +.. code-block:: Python + + event = problem.getEvent() + g = event.getFunction() + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 24-26 + +.. code-block:: Python + + problem.getProbability() + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + 3.19e-05 + + + +.. GENERATED FROM PYTHON SOURCE LINES 27-28 + +Create the Monte-Carlo algorithm + +.. GENERATED FROM PYTHON SOURCE LINES 28-33 + +.. code-block:: Python + + algoProb = ot.ProbabilitySimulationAlgorithm(event) + algoProb.setMaximumOuterSampling(1000) + algoProb.setMaximumCoefficientOfVariation(0.01) + algoProb.run() + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 34-35 + +Get the results + +.. GENERATED FROM PYTHON SOURCE LINES 35-47 + +.. code-block:: Python + + resultAlgo = algoProb.getResult() + neval = g.getEvaluationCallsNumber() + print("Number of function calls = %d" % (neval)) + pf = resultAlgo.getProbabilityEstimate() + print("Failure Probability = %.4f" % (pf)) + level = 0.95 + c95 = resultAlgo.getConfidenceLength(level) + pmin = pf - 0.5 * c95 + pmax = pf + 0.5 * c95 + print("%.1f %% confidence interval :[%.4f,%.4f] " % (level * 100, pmin, pmax)) + + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + Number of function calls = 1000 + Failure Probability = 0.0000 + 95.0 % confidence interval :[0.0000,0.0000] + + + + +.. GENERATED FROM PYTHON SOURCE LINES 48-50 + +Compute the bounds of the domain +-------------------------------- + +.. GENERATED FROM PYTHON SOURCE LINES 53-66 + +.. code-block:: Python + + inputVector = event.getAntecedent() + distribution = inputVector.getDistribution() + X1 = distribution.getMarginal(0) + X2 = distribution.getMarginal(1) + alphaMin = 0.0000001 + alphaMax = 1 - alphaMin + lowerBound = ot.Point( + [X1.computeQuantile(alphaMin)[0], X2.computeQuantile(alphaMin)[0]] + ) + upperBound = ot.Point( + [X1.computeQuantile(alphaMax)[0], X2.computeQuantile(alphaMax)[0]] + ) + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 67-72 + +.. code-block:: Python + + nbPoints = [100, 100] + figure = g.draw(lowerBound, upperBound, nbPoints) + figure.setTitle(" Iso-values of limit state function") + figure + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + class=Graph name=gsys as a function of (x0,x1) implementation=class=GraphImplementation name=gsys as a function of (x0,x1) title= Iso-values of limit state function xTitle=x0 yTitle=x1 axes=ON grid=ON legendposition=upper left legendFontSize=1 drawables=[class=Drawable name=Unnamed implementation=class=Contour name=Unnamed x=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=100 dimension=1 data=[[-5.19934],[-5.0943],[-4.98926],[-4.88423],[-4.77919],[-4.67415],[-4.56911],[-4.46408],[-4.35904],[-4.254],[-4.14897],[-4.04393],[-3.93889],[-3.83385],[-3.72882],[-3.62378],[-3.51874],[-3.41371],[-3.30867],[-3.20363],[-3.0986],[-2.99356],[-2.88852],[-2.78348],[-2.67845],[-2.57341],[-2.46837],[-2.36334],[-2.2583],[-2.15326],[-2.04822],[-1.94319],[-1.83815],[-1.73311],[-1.62808],[-1.52304],[-1.418],[-1.31296],[-1.20793],[-1.10289],[-0.997853],[-0.892816],[-0.787778],[-0.682741],[-0.577704],[-0.472667],[-0.36763],[-0.262593],[-0.157556],[-0.0525186],[0.0525186],[0.157556],[0.262593],[0.36763],[0.472667],[0.577704],[0.682741],[0.787778],[0.892816],[0.997853],[1.10289],[1.20793],[1.31296],[1.418],[1.52304],[1.62808],[1.73311],[1.83815],[1.94319],[2.04822],[2.15326],[2.2583],[2.36334],[2.46837],[2.57341],[2.67845],[2.78348],[2.88852],[2.99356],[3.0986],[3.20363],[3.30867],[3.41371],[3.51874],[3.62378],[3.72882],[3.83385],[3.93889],[4.04393],[4.14897],[4.254],[4.35904],[4.46408],[4.56911],[4.67415],[4.77919],[4.88423],[4.98926],[5.0943],[5.19934]] y=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=100 dimension=1 data=[[-5.19934],[-5.0943],[-4.98926],[-4.88423],[-4.77919],[-4.67415],[-4.56911],[-4.46408],[-4.35904],[-4.254],[-4.14897],[-4.04393],[-3.93889],[-3.83385],[-3.72882],[-3.62378],[-3.51874],[-3.41371],[-3.30867],[-3.20363],[-3.0986],[-2.99356],[-2.88852],[-2.78348],[-2.67845],[-2.57341],[-2.46837],[-2.36334],[-2.2583],[-2.15326],[-2.04822],[-1.94319],[-1.83815],[-1.73311],[-1.62808],[-1.52304],[-1.418],[-1.31296],[-1.20793],[-1.10289],[-0.997853],[-0.892816],[-0.787778],[-0.682741],[-0.577704],[-0.472667],[-0.36763],[-0.262593],[-0.157556],[-0.0525186],[0.0525186],[0.157556],[0.262593],[0.36763],[0.472667],[0.577704],[0.682741],[0.787778],[0.892816],[0.997853],[1.10289],[1.20793],[1.31296],[1.418],[1.52304],[1.62808],[1.73311],[1.83815],[1.94319],[2.04822],[2.15326],[2.2583],[2.36334],[2.46837],[2.57341],[2.67845],[2.78348],[2.88852],[2.99356],[3.0986],[3.20363],[3.30867],[3.41371],[3.51874],[3.62378],[3.72882],[3.83385],[3.93889],[4.04393],[4.14897],[4.254],[4.35904],[4.46408],[4.56911],[4.67415],[4.77919],[4.88423],[4.98926],[5.0943],[5.19934]] levels=class=Point name=Unnamed dimension=10 values=[-0.674152,0.0115774,0.116615,0.232155,0.508629,0.655681,0.802733,0.960289,1.11784,1.2859] labels=[-0.674152,0.0115774,0.116615,0.232155,0.508629,0.655681,0.802733,0.960289,1.11784,1.2859] show labels=false isFilled=false colorBarPosition=right isVminUsed=false vmin=0 isVmaxUsed=false vmax=0 colorMap=hsv alpha=1 norm=linear extend=both hatches=[] derived from class=DrawableImplementation name=Unnamed legend= data=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=10000 dimension=1 description=[gsys] data=[[1.36993],[1.35943],[1.34893],...,[-0.989263],[-1.0943],[-1.19934]] color=#1f77b4 isColorExplicitlySet=true fillStyle=solid lineStyle=solid pointStyle=plus lineWidth=1] + + + +.. GENERATED FROM PYTHON SOURCE LINES 73-75 + +Print the iso-values of the distribution +---------------------------------------- + +.. GENERATED FROM PYTHON SOURCE LINES 77-79 + +.. code-block:: Python + + _ = otv.View(distribution.drawPDF()) + + + + +.. image-sg:: /auto_examples/reliability_problems/images/sphx_glr_plot_rp110_001.png + :alt: [X1,X2] iso-PDF + :srcset: /auto_examples/reliability_problems/images/sphx_glr_plot_rp110_001.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 80-83 + +.. code-block:: Python + + sampleSize = 10000 + drawEvent = otb.DrawEvent(event) + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 84-87 + +.. code-block:: Python + + cloud = drawEvent.drawSampleCrossCut(sampleSize) + _ = otv.View(cloud) + + + + +.. image-sg:: /auto_examples/reliability_problems/images/sphx_glr_plot_rp110_002.png + :alt: Points X s.t. g(X) < 0.0 + :srcset: /auto_examples/reliability_problems/images/sphx_glr_plot_rp110_002.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 88-90 + +Draw the limit state surface +---------------------------- + +.. GENERATED FROM PYTHON SOURCE LINES 92-95 + +.. code-block:: Python + + bounds = ot.Interval(lowerBound, upperBound) + bounds + + + + + + +.. raw:: html + +
+ class=Interval name=Unnamed dimension=2 lower bound=class=Point name=Unnamed dimension=2 values=[-5.19934,-5.19934] upper bound=class=Point name=Unnamed dimension=2 values=[5.19934,5.19934] finite lower bound=[1,1] finite upper bound=[1,1] +
+
+
+ +.. GENERATED FROM PYTHON SOURCE LINES 96-100 + +.. code-block:: Python + + graph = drawEvent.drawLimitStateCrossCut(bounds) + graph.add(cloud) + graph + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + class=Graph name=Limit state surface implementation=class=GraphImplementation name=Limit state surface title=Limit state surface xTitle=x0 yTitle=x1 axes=ON grid=ON legendposition= legendFontSize=1 drawables=[class=Drawable name=Unnamed implementation=class=Contour name=Unnamed x=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=52 dimension=1 description=[t] data=[[-5.19934],[-4.99544],[-4.79155],[-4.58765],[-4.38376],[-4.17986],[-3.97596],[-3.77207],[-3.56817],[-3.36428],[-3.16038],[-2.95649],[-2.75259],[-2.54869],[-2.3448],[-2.1409],[-1.93701],[-1.73311],[-1.52922],[-1.32532],[-1.12143],[-0.91753],[-0.713635],[-0.509739],[-0.305843],[-0.101948],[0.101948],[0.305843],[0.509739],[0.713635],[0.91753],[1.12143],[1.32532],[1.52922],[1.73311],[1.93701],[2.1409],[2.3448],[2.54869],[2.75259],[2.95649],[3.16038],[3.36428],[3.56817],[3.77207],[3.97596],[4.17986],[4.38376],[4.58765],[4.79155],[4.99544],[5.19934]] y=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=52 dimension=1 description=[t] data=[[-5.19934],[-4.99544],[-4.79155],[-4.58765],[-4.38376],[-4.17986],[-3.97596],[-3.77207],[-3.56817],[-3.36428],[-3.16038],[-2.95649],[-2.75259],[-2.54869],[-2.3448],[-2.1409],[-1.93701],[-1.73311],[-1.52922],[-1.32532],[-1.12143],[-0.91753],[-0.713635],[-0.509739],[-0.305843],[-0.101948],[0.101948],[0.305843],[0.509739],[0.713635],[0.91753],[1.12143],[1.32532],[1.52922],[1.73311],[1.93701],[2.1409],[2.3448],[2.54869],[2.75259],[2.95649],[3.16038],[3.36428],[3.56817],[3.77207],[3.97596],[4.17986],[4.38376],[4.58765],[4.79155],[4.99544],[5.19934]] levels=class=Point name=Unnamed dimension=1 values=[0] labels=[0.0] show labels=true isFilled=false colorBarPosition=right isVminUsed=false vmin=0 isVmaxUsed=false vmax=0 colorMap=hsv alpha=1 norm=linear extend=both hatches=[] derived from class=DrawableImplementation name=Unnamed legend= data=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=2704 dimension=1 description=[gsys] data=[[1.36993],[1.34954],[1.32915],...,[-0.791546],[-0.995442],[-1.19934]] color=#1f77b4 isColorExplicitlySet=true fillStyle=solid lineStyle=solid pointStyle=plus lineWidth=1,class=Drawable name=Out implementation=class=Cloud name=Out derived from class=DrawableImplementation name=Out legend=Out data=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=10000 dimension=2 data=[[-0.0842713,-0.480831],[-0.718841,0.284243],[0.680408,-0.981697],...,[0.456822,-0.454216],[-0.837537,-0.354749],[1.48608,-1.06395]] color=darkseagreen3 isColorExplicitlySet=true fillStyle=solid lineStyle=solid pointStyle=fsquare lineWidth=1] + + + +.. GENERATED FROM PYTHON SOURCE LINES 101-104 + +.. code-block:: Python + + domain = drawEvent.fillEventCrossCut(bounds) + _ = otv.View(domain) + + + + +.. image-sg:: /auto_examples/reliability_problems/images/sphx_glr_plot_rp110_003.png + :alt: Domain where g(x) < 0.0 + :srcset: /auto_examples/reliability_problems/images/sphx_glr_plot_rp110_003.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 105-108 + +.. code-block:: Python + + domain.add(cloud) + _ = otv.View(domain) + + + + +.. image-sg:: /auto_examples/reliability_problems/images/sphx_glr_plot_rp110_004.png + :alt: Domain where g(x) < 0.0 + :srcset: /auto_examples/reliability_problems/images/sphx_glr_plot_rp110_004.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 109-110 + +.. code-block:: Python + + otv.View.ShowAll() + + + + + + + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 1.677 seconds) + + +.. _sphx_glr_download_auto_examples_reliability_problems_plot_rp110.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: plot_rp110.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: plot_rp110.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: plot_rp110.zip ` diff --git a/otbenchmark/master/_sources/auto_examples/reliability_problems/plot_rp111.rst b/otbenchmark/master/_sources/auto_examples/reliability_problems/plot_rp111.rst new file mode 100644 index 00000000000..da4a0ec7459 --- /dev/null +++ b/otbenchmark/master/_sources/auto_examples/reliability_problems/plot_rp111.rst @@ -0,0 +1,366 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "auto_examples/reliability_problems/plot_rp111.py" +.. LINE NUMBERS ARE GIVEN BELOW. + +.. only:: html + + .. note:: + :class: sphx-glr-download-link-note + + :ref:`Go to the end ` + to download the full example code. + +.. rst-class:: sphx-glr-example-title + +.. _sphx_glr_auto_examples_reliability_problems_plot_rp111.py: + + +RP111 analysis and 2D graphics +============================== + +.. GENERATED FROM PYTHON SOURCE LINES 7-9 + +The objective of this example is to present problem 111 of the BBRC. +We also present graphic elements for the visualization of the limit state surface in 2 dimensions. + +.. GENERATED FROM PYTHON SOURCE LINES 11-15 + +.. code-block:: Python + + import openturns as ot + import openturns.viewer as otv + import otbenchmark as otb + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 16-19 + +.. code-block:: Python + + problem = otb.ReliabilityProblem111() + print(problem) + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + name = RP111 + event = class=ThresholdEventImplementation antecedent=class=CompositeRandomVector function=class=Function name=Unnamed implementation=class=FunctionImplementation name=Unnamed description=[x1,x2,y0] evaluationImplementation=class=SymbolicEvaluation name=Unnamed inputVariablesNames=[x1,x2] outputVariablesNames=[y0] formulas=[12.5 - abs(x1 * x2)] gradientImplementation=class=SymbolicGradient name=Unnamed evaluation=class=SymbolicEvaluation name=Unnamed inputVariablesNames=[x1,x2] outputVariablesNames=[y0] formulas=[12.5 - abs(x1 * x2)] hessianImplementation=class=SymbolicHessian name=Unnamed evaluation=class=SymbolicEvaluation name=Unnamed inputVariablesNames=[x1,x2] outputVariablesNames=[y0] formulas=[12.5 - abs(x1 * x2)] 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=[0] 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=[0] 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 = 7.65e-07 + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 20-23 + +.. code-block:: Python + + event = problem.getEvent() + g = event.getFunction() + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 24-26 + +.. code-block:: Python + + problem.getProbability() + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + 7.65e-07 + + + +.. GENERATED FROM PYTHON SOURCE LINES 27-28 + +Create the Monte-Carlo algorithm + +.. GENERATED FROM PYTHON SOURCE LINES 28-33 + +.. code-block:: Python + + algoProb = ot.ProbabilitySimulationAlgorithm(event) + algoProb.setMaximumOuterSampling(1000) + algoProb.setMaximumCoefficientOfVariation(0.01) + algoProb.run() + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 34-35 + +Get the results + +.. GENERATED FROM PYTHON SOURCE LINES 35-46 + +.. code-block:: Python + + resultAlgo = algoProb.getResult() + neval = g.getEvaluationCallsNumber() + print("Number of function calls = %d" % (neval)) + pf = resultAlgo.getProbabilityEstimate() + print("Failure Probability = %.4f" % (pf)) + level = 0.95 + c95 = resultAlgo.getConfidenceLength(level) + pmin = pf - 0.5 * c95 + pmax = pf + 0.5 * c95 + print("%.1f %% confidence interval :[%.4f,%.4f] " % (level * 100, pmin, pmax)) + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + Number of function calls = 1000 + Failure Probability = 0.0000 + 95.0 % confidence interval :[0.0000,0.0000] + + + + +.. GENERATED FROM PYTHON SOURCE LINES 47-48 + +Compute the bounds of the domain + +.. GENERATED FROM PYTHON SOURCE LINES 48-61 + +.. code-block:: Python + + inputVector = event.getAntecedent() + distribution = inputVector.getDistribution() + X1 = distribution.getMarginal(0) + X2 = distribution.getMarginal(1) + alphaMin = 0.00001 + alphaMax = 1 - alphaMin + lowerBound = ot.Point( + [X1.computeQuantile(alphaMin)[0], X2.computeQuantile(alphaMin)[0]] + ) + upperBound = ot.Point( + [X1.computeQuantile(alphaMax)[0], X2.computeQuantile(alphaMax)[0]] + ) + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 62-67 + +.. code-block:: Python + + nbPoints = [100, 100] + figure = g.draw(lowerBound, upperBound, nbPoints) + figure.setTitle(" Iso-values of limit state function") + figure + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + class=Graph name=y0 as a function of (x1,x2) implementation=class=GraphImplementation name=y0 as a function of (x1,x2) title= Iso-values of limit state function xTitle=x1 yTitle=x2 axes=ON grid=ON legendposition=upper left legendFontSize=1 drawables=[class=Drawable name=Unnamed implementation=class=Contour name=Unnamed x=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=100 dimension=1 data=[[-4.26489],[-4.17873],[-4.09257],[-4.00641],[-3.92025],[-3.83409],[-3.74793],[-3.66177],[-3.57562],[-3.48946],[-3.4033],[-3.31714],[-3.23098],[-3.14482],[-3.05866],[-2.9725],[-2.88634],[-2.80018],[-2.71402],[-2.62786],[-2.5417],[-2.45554],[-2.36938],[-2.28322],[-2.19706],[-2.11091],[-2.02475],[-1.93859],[-1.85243],[-1.76627],[-1.68011],[-1.59395],[-1.50779],[-1.42163],[-1.33547],[-1.24931],[-1.16315],[-1.07699],[-0.990833],[-0.904674],[-0.818514],[-0.732355],[-0.646196],[-0.560036],[-0.473877],[-0.387717],[-0.301558],[-0.215399],[-0.129239],[-0.0430797],[0.0430797],[0.129239],[0.215399],[0.301558],[0.387717],[0.473877],[0.560036],[0.646196],[0.732355],[0.818514],[0.904674],[0.990833],[1.07699],[1.16315],[1.24931],[1.33547],[1.42163],[1.50779],[1.59395],[1.68011],[1.76627],[1.85243],[1.93859],[2.02475],[2.11091],[2.19706],[2.28322],[2.36938],[2.45554],[2.5417],[2.62786],[2.71402],[2.80018],[2.88634],[2.9725],[3.05866],[3.14482],[3.23098],[3.31714],[3.4033],[3.48946],[3.57562],[3.66177],[3.74793],[3.83409],[3.92025],[4.00641],[4.09257],[4.17873],[4.26489]] y=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=100 dimension=1 data=[[-4.26489],[-4.17873],[-4.09257],[-4.00641],[-3.92025],[-3.83409],[-3.74793],[-3.66177],[-3.57562],[-3.48946],[-3.4033],[-3.31714],[-3.23098],[-3.14482],[-3.05866],[-2.9725],[-2.88634],[-2.80018],[-2.71402],[-2.62786],[-2.5417],[-2.45554],[-2.36938],[-2.28322],[-2.19706],[-2.11091],[-2.02475],[-1.93859],[-1.85243],[-1.76627],[-1.68011],[-1.59395],[-1.50779],[-1.42163],[-1.33547],[-1.24931],[-1.16315],[-1.07699],[-0.990833],[-0.904674],[-0.818514],[-0.732355],[-0.646196],[-0.560036],[-0.473877],[-0.387717],[-0.301558],[-0.215399],[-0.129239],[-0.0430797],[0.0430797],[0.129239],[0.215399],[0.301558],[0.387717],[0.473877],[0.560036],[0.646196],[0.732355],[0.818514],[0.904674],[0.990833],[1.07699],[1.16315],[1.24931],[1.33547],[1.42163],[1.50779],[1.59395],[1.68011],[1.76627],[1.85243],[1.93859],[2.02475],[2.11091],[2.19706],[2.28322],[2.36938],[2.45554],[2.5417],[2.62786],[2.71402],[2.80018],[2.88634],[2.9725],[3.05866],[3.14482],[3.23098],[3.31714],[3.4033],[3.48946],[3.57562],[3.66177],[3.74793],[3.83409],[3.92025],[4.00641],[4.09257],[4.17873],[4.26489]] levels=class=Point name=Unnamed dimension=10 values=[-0.544847,3.15203,5.40133,7.10501,8.44866,9.56588,10.4901,11.2473,11.8634,12.346] labels=[-0.544847,3.15203,5.40133,7.10501,8.44866,9.56588,10.4901,11.2473,11.8634,12.346] show labels=false isFilled=false colorBarPosition=right isVminUsed=false vmin=0 isVmaxUsed=false vmax=0 colorMap=hsv alpha=1 norm=linear extend=both hatches=[] derived from class=DrawableImplementation name=Unnamed legend= data=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=10000 dimension=1 description=[y0] data=[[-5.68929],[-5.32183],[-4.95437],...,[-4.95437],[-5.32183],[-5.68929]] color=#1f77b4 isColorExplicitlySet=true fillStyle=solid lineStyle=solid pointStyle=plus lineWidth=1] + + + +.. GENERATED FROM PYTHON SOURCE LINES 68-70 + +.. code-block:: Python + + _ = otv.View(distribution.drawPDF()) + + + + +.. image-sg:: /auto_examples/reliability_problems/images/sphx_glr_plot_rp111_001.png + :alt: [X1,X2] iso-PDF + :srcset: /auto_examples/reliability_problems/images/sphx_glr_plot_rp111_001.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 71-74 + +.. code-block:: Python + + sampleSize = 100000 + drawEvent = otb.DrawEvent(event) + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 75-78 + +.. code-block:: Python + + cloud = drawEvent.drawSampleCrossCut(sampleSize) + _ = otv.View(cloud) + + + + +.. image-sg:: /auto_examples/reliability_problems/images/sphx_glr_plot_rp111_002.png + :alt: Points X s.t. g(X) < 0.0 + :srcset: /auto_examples/reliability_problems/images/sphx_glr_plot_rp111_002.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 79-81 + +Draw the limit state surface +---------------------------- + +.. GENERATED FROM PYTHON SOURCE LINES 83-85 + +.. code-block:: Python + + bounds = ot.Interval(lowerBound, upperBound) + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 86-90 + +.. code-block:: Python + + graph = drawEvent.drawLimitStateCrossCut(bounds) + graph.add(cloud) + graph + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + class=Graph name=Limit state surface implementation=class=GraphImplementation name=Limit state surface title=Limit state surface xTitle=x1 yTitle=x2 axes=ON grid=ON legendposition= legendFontSize=1 drawables=[class=Drawable name=Unnamed implementation=class=Contour name=Unnamed x=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=52 dimension=1 description=[t] data=[[-4.26489],[-4.09764],[-3.93039],[-3.76314],[-3.59589],[-3.42864],[-3.26139],[-3.09414],[-2.92689],[-2.75964],[-2.59238],[-2.42513],[-2.25788],[-2.09063],[-1.92338],[-1.75613],[-1.58888],[-1.42163],[-1.25438],[-1.08713],[-0.919878],[-0.752628],[-0.585377],[-0.418127],[-0.250876],[-0.0836253],[0.0836253],[0.250876],[0.418127],[0.585377],[0.752628],[0.919878],[1.08713],[1.25438],[1.42163],[1.58888],[1.75613],[1.92338],[2.09063],[2.25788],[2.42513],[2.59238],[2.75964],[2.92689],[3.09414],[3.26139],[3.42864],[3.59589],[3.76314],[3.93039],[4.09764],[4.26489]] y=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=52 dimension=1 description=[t] data=[[-4.26489],[-4.09764],[-3.93039],[-3.76314],[-3.59589],[-3.42864],[-3.26139],[-3.09414],[-2.92689],[-2.75964],[-2.59238],[-2.42513],[-2.25788],[-2.09063],[-1.92338],[-1.75613],[-1.58888],[-1.42163],[-1.25438],[-1.08713],[-0.919878],[-0.752628],[-0.585377],[-0.418127],[-0.250876],[-0.0836253],[0.0836253],[0.250876],[0.418127],[0.585377],[0.752628],[0.919878],[1.08713],[1.25438],[1.42163],[1.58888],[1.75613],[1.92338],[2.09063],[2.25788],[2.42513],[2.59238],[2.75964],[2.92689],[3.09414],[3.26139],[3.42864],[3.59589],[3.76314],[3.93039],[4.09764],[4.26489]] levels=class=Point name=Unnamed dimension=1 values=[0] labels=[0.0] show labels=true isFilled=false colorBarPosition=right isVminUsed=false vmin=0 isVmaxUsed=false vmax=0 colorMap=hsv alpha=1 norm=linear extend=both hatches=[] derived from class=DrawableImplementation name=Unnamed legend= data=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=2704 dimension=1 description=[y0] data=[[-5.68929],[-4.97599],[-4.26268],...,[-4.26268],[-4.97599],[-5.68929]] color=#1f77b4 isColorExplicitlySet=true fillStyle=solid lineStyle=solid pointStyle=plus lineWidth=1,class=Drawable name=Out implementation=class=Cloud name=Out derived from class=DrawableImplementation name=Out legend=Out data=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=100000 dimension=2 data=[[-0.015366,-1.52659],[-0.178562,-0.0085137],[-0.452535,0.597502],...,[1.29186,-0.557726],[0.405743,0.909538],[0.622,0.48255]] color=darkseagreen3 isColorExplicitlySet=true fillStyle=solid lineStyle=solid pointStyle=fsquare lineWidth=1] + + + +.. GENERATED FROM PYTHON SOURCE LINES 91-94 + +.. code-block:: Python + + domain = drawEvent.fillEventCrossCut(bounds) + _ = otv.View(domain) + + + + +.. image-sg:: /auto_examples/reliability_problems/images/sphx_glr_plot_rp111_003.png + :alt: Domain where g(x) < 0.0 + :srcset: /auto_examples/reliability_problems/images/sphx_glr_plot_rp111_003.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 95-98 + +.. code-block:: Python + + domain.add(cloud) + _ = otv.View(domain) + + + + +.. image-sg:: /auto_examples/reliability_problems/images/sphx_glr_plot_rp111_004.png + :alt: Domain where g(x) < 0.0 + :srcset: /auto_examples/reliability_problems/images/sphx_glr_plot_rp111_004.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 99-100 + +.. code-block:: Python + + otv.View.ShowAll() + + + + + + + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 5.585 seconds) + + +.. _sphx_glr_download_auto_examples_reliability_problems_plot_rp111.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: plot_rp111.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: plot_rp111.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: plot_rp111.zip ` diff --git a/otbenchmark/master/_sources/auto_examples/reliability_problems/plot_rp22.rst b/otbenchmark/master/_sources/auto_examples/reliability_problems/plot_rp22.rst new file mode 100644 index 00000000000..f07d1a8ed37 --- /dev/null +++ b/otbenchmark/master/_sources/auto_examples/reliability_problems/plot_rp22.rst @@ -0,0 +1,380 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "auto_examples/reliability_problems/plot_rp22.py" +.. LINE NUMBERS ARE GIVEN BELOW. + +.. only:: html + + .. note:: + :class: sphx-glr-download-link-note + + :ref:`Go to the end ` + to download the full example code. + +.. rst-class:: sphx-glr-example-title + +.. _sphx_glr_auto_examples_reliability_problems_plot_rp22.py: + + +RP22 analysis and 2D graphics +============================= + +.. GENERATED FROM PYTHON SOURCE LINES 7-9 + +The objective of this example is to present problem 22 of the BBRC. +We also present graphic elements for the visualization of the limit state surface in 2 dimensions. + +.. GENERATED FROM PYTHON SOURCE LINES 11-16 + +.. code-block:: Python + + import openturns as ot + import openturns.viewer as otv + import otbenchmark as otb + + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 17-20 + +.. code-block:: Python + + problem = otb.ReliabilityProblem22() + print(problem) + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + name = RP22 + event = class=ThresholdEventImplementation antecedent=class=CompositeRandomVector function=class=Function name=Unnamed implementation=class=FunctionImplementation name=Unnamed description=[x1,x2,y0] evaluationImplementation=class=SymbolicEvaluation name=Unnamed inputVariablesNames=[x1,x2] outputVariablesNames=[y0] formulas=[2.5 - 1 / sqrt(2) * (x1 + x2) + 0.1 * (x1 - x2) ^2] gradientImplementation=class=SymbolicGradient name=Unnamed evaluation=class=SymbolicEvaluation name=Unnamed inputVariablesNames=[x1,x2] outputVariablesNames=[y0] formulas=[2.5 - 1 / sqrt(2) * (x1 + x2) + 0.1 * (x1 - x2) ^2] hessianImplementation=class=SymbolicHessian name=Unnamed evaluation=class=SymbolicEvaluation name=Unnamed inputVariablesNames=[x1,x2] outputVariablesNames=[y0] formulas=[2.5 - 1 / sqrt(2) * (x1 + x2) + 0.1 * (x1 - x2) ^2] 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=[0] 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=[0] 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.004207305511299618 + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 21-24 + +.. code-block:: Python + + event = problem.getEvent() + g = event.getFunction() + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 25-28 + +.. code-block:: Python + + problem.getProbability() + + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + 0.004207305511299618 + + + +.. GENERATED FROM PYTHON SOURCE LINES 29-30 + +Create the Monte-Carlo algorithm + +.. GENERATED FROM PYTHON SOURCE LINES 30-36 + +.. code-block:: Python + + algoProb = ot.ProbabilitySimulationAlgorithm(event) + algoProb.setMaximumOuterSampling(1000) + algoProb.setMaximumCoefficientOfVariation(0.01) + algoProb.run() + + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 37-38 + +Get the results + +.. GENERATED FROM PYTHON SOURCE LINES 38-49 + +.. code-block:: Python + + resultAlgo = algoProb.getResult() + neval = g.getEvaluationCallsNumber() + print("Number of function calls = %d" % (neval)) + pf = resultAlgo.getProbabilityEstimate() + print("Failure Probability = %.4f" % (pf)) + level = 0.95 + c95 = resultAlgo.getConfidenceLength(level) + pmin = pf - 0.5 * c95 + pmax = pf + 0.5 * c95 + print("%.1f %% confidence interval :[%.4f,%.4f] " % (level * 100, pmin, pmax)) + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + Number of function calls = 1000 + Failure Probability = 0.0070 + 95.0 % confidence interval :[0.0018,0.0122] + + + + +.. GENERATED FROM PYTHON SOURCE LINES 50-52 + +Compute the bounds of the domain +-------------------------------- + +.. GENERATED FROM PYTHON SOURCE LINES 54-68 + +.. code-block:: Python + + inputVector = event.getAntecedent() + distribution = inputVector.getDistribution() + X1 = distribution.getMarginal(0) + X2 = distribution.getMarginal(1) + alphaMin = 0.00001 + alphaMax = 1 - alphaMin + lowerBound = ot.Point( + [X1.computeQuantile(alphaMin)[0], X2.computeQuantile(alphaMin)[0]] + ) + upperBound = ot.Point( + [X1.computeQuantile(alphaMax)[0], X2.computeQuantile(alphaMax)[0]] + ) + + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 69-74 + +.. code-block:: Python + + nbPoints = [100, 100] + figure = g.draw(lowerBound, upperBound, nbPoints) + figure.setTitle(" Iso-values of limit state function") + figure + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + class=Graph name=y0 as a function of (x1,x2) implementation=class=GraphImplementation name=y0 as a function of (x1,x2) title= Iso-values of limit state function xTitle=x1 yTitle=x2 axes=ON grid=ON legendposition=upper left legendFontSize=1 drawables=[class=Drawable name=Unnamed implementation=class=Contour name=Unnamed x=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=100 dimension=1 data=[[-4.26489],[-4.17873],[-4.09257],[-4.00641],[-3.92025],[-3.83409],[-3.74793],[-3.66177],[-3.57562],[-3.48946],[-3.4033],[-3.31714],[-3.23098],[-3.14482],[-3.05866],[-2.9725],[-2.88634],[-2.80018],[-2.71402],[-2.62786],[-2.5417],[-2.45554],[-2.36938],[-2.28322],[-2.19706],[-2.11091],[-2.02475],[-1.93859],[-1.85243],[-1.76627],[-1.68011],[-1.59395],[-1.50779],[-1.42163],[-1.33547],[-1.24931],[-1.16315],[-1.07699],[-0.990833],[-0.904674],[-0.818514],[-0.732355],[-0.646196],[-0.560036],[-0.473877],[-0.387717],[-0.301558],[-0.215399],[-0.129239],[-0.0430797],[0.0430797],[0.129239],[0.215399],[0.301558],[0.387717],[0.473877],[0.560036],[0.646196],[0.732355],[0.818514],[0.904674],[0.990833],[1.07699],[1.16315],[1.24931],[1.33547],[1.42163],[1.50779],[1.59395],[1.68011],[1.76627],[1.85243],[1.93859],[2.02475],[2.11091],[2.19706],[2.28322],[2.36938],[2.45554],[2.5417],[2.62786],[2.71402],[2.80018],[2.88634],[2.9725],[3.05866],[3.14482],[3.23098],[3.31714],[3.4033],[3.48946],[3.57562],[3.66177],[3.74793],[3.83409],[3.92025],[4.00641],[4.09257],[4.17873],[4.26489]] y=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=100 dimension=1 data=[[-4.26489],[-4.17873],[-4.09257],[-4.00641],[-3.92025],[-3.83409],[-3.74793],[-3.66177],[-3.57562],[-3.48946],[-3.4033],[-3.31714],[-3.23098],[-3.14482],[-3.05866],[-2.9725],[-2.88634],[-2.80018],[-2.71402],[-2.62786],[-2.5417],[-2.45554],[-2.36938],[-2.28322],[-2.19706],[-2.11091],[-2.02475],[-1.93859],[-1.85243],[-1.76627],[-1.68011],[-1.59395],[-1.50779],[-1.42163],[-1.33547],[-1.24931],[-1.16315],[-1.07699],[-0.990833],[-0.904674],[-0.818514],[-0.732355],[-0.646196],[-0.560036],[-0.473877],[-0.387717],[-0.301558],[-0.215399],[-0.129239],[-0.0430797],[0.0430797],[0.129239],[0.215399],[0.301558],[0.387717],[0.473877],[0.560036],[0.646196],[0.732355],[0.818514],[0.904674],[0.990833],[1.07699],[1.16315],[1.24931],[1.33547],[1.42163],[1.50779],[1.59395],[1.68011],[1.76627],[1.85243],[1.93859],[2.02475],[2.11091],[2.19706],[2.28322],[2.36938],[2.45554],[2.5417],[2.62786],[2.71402],[2.80018],[2.88634],[2.9725],[3.05866],[3.14482],[3.23098],[3.31714],[3.4033],[3.48946],[3.57562],[3.66177],[3.74793],[3.83409],[3.92025],[4.00641],[4.09257],[4.17873],[4.26489]] levels=class=Point name=Unnamed dimension=10 values=[-1.46085,0.307482,1.58535,2.67652,3.64934,4.53414,5.35832,6.13861,6.88313,7.7004] labels=[-1.46085,0.307482,1.58535,2.67652,3.64934,4.53414,5.35832,6.13861,6.88313,7.7004] show labels=false isFilled=false colorBarPosition=right isVminUsed=false vmin=0 isVmaxUsed=false vmax=0 colorMap=hsv alpha=1 norm=linear extend=both hatches=[] derived from class=DrawableImplementation name=Unnamed legend= data=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=10000 dimension=1 description=[y0] data=[[8.53147],[8.47128],[8.41259],...,[-3.40665],[-3.4698],[-3.53147]] color=#1f77b4 isColorExplicitlySet=true fillStyle=solid lineStyle=solid pointStyle=plus lineWidth=1] + + + +.. GENERATED FROM PYTHON SOURCE LINES 75-77 + +Print the iso-values of the distribution +---------------------------------------- + +.. GENERATED FROM PYTHON SOURCE LINES 79-82 + +.. code-block:: Python + + _ = otv.View(distribution.drawPDF()) + + + + + +.. image-sg:: /auto_examples/reliability_problems/images/sphx_glr_plot_rp22_001.png + :alt: [X1,X2] iso-PDF + :srcset: /auto_examples/reliability_problems/images/sphx_glr_plot_rp22_001.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 83-87 + +.. code-block:: Python + + sampleSize = 5000 + drawEvent = otb.DrawEvent(event) + + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 88-91 + +.. code-block:: Python + + cloud = drawEvent.drawSampleCrossCut(sampleSize) + _ = otv.View(cloud) + + + + +.. image-sg:: /auto_examples/reliability_problems/images/sphx_glr_plot_rp22_002.png + :alt: Points X s.t. g(X) < 0.0 + :srcset: /auto_examples/reliability_problems/images/sphx_glr_plot_rp22_002.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 92-94 + +Draw the limit state surface +---------------------------- + +.. GENERATED FROM PYTHON SOURCE LINES 96-99 + +.. code-block:: Python + + bounds = ot.Interval(lowerBound, upperBound) + + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 100-105 + +.. code-block:: Python + + graph = drawEvent.drawLimitStateCrossCut(bounds) + graph.add(cloud) + graph + + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + class=Graph name=Limit state surface implementation=class=GraphImplementation name=Limit state surface title=Limit state surface xTitle=x1 yTitle=x2 axes=ON grid=ON legendposition= legendFontSize=1 drawables=[class=Drawable name=Unnamed implementation=class=Contour name=Unnamed x=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=52 dimension=1 description=[t] data=[[-4.26489],[-4.09764],[-3.93039],[-3.76314],[-3.59589],[-3.42864],[-3.26139],[-3.09414],[-2.92689],[-2.75964],[-2.59238],[-2.42513],[-2.25788],[-2.09063],[-1.92338],[-1.75613],[-1.58888],[-1.42163],[-1.25438],[-1.08713],[-0.919878],[-0.752628],[-0.585377],[-0.418127],[-0.250876],[-0.0836253],[0.0836253],[0.250876],[0.418127],[0.585377],[0.752628],[0.919878],[1.08713],[1.25438],[1.42163],[1.58888],[1.75613],[1.92338],[2.09063],[2.25788],[2.42513],[2.59238],[2.75964],[2.92689],[3.09414],[3.26139],[3.42864],[3.59589],[3.76314],[3.93039],[4.09764],[4.26489]] y=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=52 dimension=1 description=[t] data=[[-4.26489],[-4.09764],[-3.93039],[-3.76314],[-3.59589],[-3.42864],[-3.26139],[-3.09414],[-2.92689],[-2.75964],[-2.59238],[-2.42513],[-2.25788],[-2.09063],[-1.92338],[-1.75613],[-1.58888],[-1.42163],[-1.25438],[-1.08713],[-0.919878],[-0.752628],[-0.585377],[-0.418127],[-0.250876],[-0.0836253],[0.0836253],[0.250876],[0.418127],[0.585377],[0.752628],[0.919878],[1.08713],[1.25438],[1.42163],[1.58888],[1.75613],[1.92338],[2.09063],[2.25788],[2.42513],[2.59238],[2.75964],[2.92689],[3.09414],[3.26139],[3.42864],[3.59589],[3.76314],[3.93039],[4.09764],[4.26489]] levels=class=Point name=Unnamed dimension=1 values=[0] labels=[0.0] show labels=true isFilled=false colorBarPosition=right isVminUsed=false vmin=0 isVmaxUsed=false vmax=0 colorMap=hsv alpha=1 norm=linear extend=both hatches=[] derived from class=DrawableImplementation name=Unnamed legend= data=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=2704 dimension=1 description=[y0] data=[[8.53147],[8.416],[8.30613],...,[-3.28375],[-3.41041],[-3.53147]] color=#1f77b4 isColorExplicitlySet=true fillStyle=solid lineStyle=solid pointStyle=plus lineWidth=1,class=Drawable name=In implementation=class=Cloud name=In derived from class=DrawableImplementation name=In legend=In data=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=18 dimension=2 data=[[2.55106,2.335],[2.26354,1.68422],[1.85718,1.86893],[3.25151,1.00939],[1.64181,2.22221],[1.82606,2.55234],[1.87508,1.80736],[3.46405,0.998641],[3.03158,1.07894],[2.23911,1.5503],[1.46652,2.54656],[2.65954,1.86819],[2.52863,1.65251],[1.46582,3.57161],[2.03961,2.00758],[1.51609,2.29829],[1.58028,2.26913],[1.11217,3.05425]] color=lightsalmon3 isColorExplicitlySet=true fillStyle=solid lineStyle=solid pointStyle=fsquare lineWidth=1,class=Drawable name=Out implementation=class=Cloud name=Out derived from class=DrawableImplementation name=Out legend=Out data=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=4982 dimension=2 data=[[0.208268,0.646994],[-0.0901889,-1.3603],[0.899293,-0.699214],...,[1.23774,-1.91818],[1.18838,0.0894389],[-0.687324,1.80595]] color=darkseagreen3 isColorExplicitlySet=true fillStyle=solid lineStyle=solid pointStyle=fsquare lineWidth=1] + + + +.. GENERATED FROM PYTHON SOURCE LINES 106-109 + +.. code-block:: Python + + domain = drawEvent.fillEventCrossCut(bounds) + _ = otv.View(domain) + + + + +.. image-sg:: /auto_examples/reliability_problems/images/sphx_glr_plot_rp22_003.png + :alt: Domain where g(x) < 0.0 + :srcset: /auto_examples/reliability_problems/images/sphx_glr_plot_rp22_003.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 110-113 + +.. code-block:: Python + + domain.add(cloud) + _ = otv.View(domain) + + + + +.. image-sg:: /auto_examples/reliability_problems/images/sphx_glr_plot_rp22_004.png + :alt: Domain where g(x) < 0.0 + :srcset: /auto_examples/reliability_problems/images/sphx_glr_plot_rp22_004.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 114-115 + +.. code-block:: Python + + otv.View.ShowAll() + + + + + + + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 1.558 seconds) + + +.. _sphx_glr_download_auto_examples_reliability_problems_plot_rp22.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: plot_rp22.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: plot_rp22.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: plot_rp22.zip ` diff --git a/otbenchmark/master/_sources/auto_examples/reliability_problems/plot_rp24.rst b/otbenchmark/master/_sources/auto_examples/reliability_problems/plot_rp24.rst new file mode 100644 index 00000000000..91b83c48b04 --- /dev/null +++ b/otbenchmark/master/_sources/auto_examples/reliability_problems/plot_rp24.rst @@ -0,0 +1,385 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "auto_examples/reliability_problems/plot_rp24.py" +.. LINE NUMBERS ARE GIVEN BELOW. + +.. only:: html + + .. note:: + :class: sphx-glr-download-link-note + + :ref:`Go to the end ` + to download the full example code. + +.. rst-class:: sphx-glr-example-title + +.. _sphx_glr_auto_examples_reliability_problems_plot_rp24.py: + + +RP24 analysis and 2D graphics +============================= + +.. GENERATED FROM PYTHON SOURCE LINES 7-9 + +The objective of this example is to present problem 24 of the BBRC. +We also present graphic elements for the visualization of the limit state surface in 2 dimensions. + +.. GENERATED FROM PYTHON SOURCE LINES 11-15 + +.. code-block:: Python + + import openturns as ot + import openturns.viewer as otv + import otbenchmark as otb + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 16-18 + +.. code-block:: Python + + problem = otb.ReliabilityProblem24() + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 19-21 + +.. code-block:: Python + + print(problem) + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + name = RP24 + event = class=ThresholdEventImplementation antecedent=class=CompositeRandomVector function=class=Function name=Unnamed implementation=class=FunctionImplementation name=Unnamed description=[x1,x2,y0] evaluationImplementation=class=SymbolicEvaluation name=Unnamed inputVariablesNames=[x1,x2] outputVariablesNames=[y0] formulas=[2.5 - 0.2357 * (x1 - x2) + 0.00463 * (x1 + x2 - 20)^4] gradientImplementation=class=SymbolicGradient name=Unnamed evaluation=class=SymbolicEvaluation name=Unnamed inputVariablesNames=[x1,x2] outputVariablesNames=[y0] formulas=[2.5 - 0.2357 * (x1 - x2) + 0.00463 * (x1 + x2 - 20)^4] hessianImplementation=class=SymbolicHessian name=Unnamed evaluation=class=SymbolicEvaluation name=Unnamed inputVariablesNames=[x1,x2] outputVariablesNames=[y0] formulas=[2.5 - 0.2357 * (x1 - x2) + 0.00463 * (x1 + x2 - 20)^4] 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=[10] sigma=class=Point name=Unnamed dimension=1 values=[3] 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=[10] sigma=class=Point name=Unnamed dimension=1 values=[3] 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.00286 + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 22-25 + +.. code-block:: Python + + event = problem.getEvent() + g = event.getFunction() + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 26-28 + +.. code-block:: Python + + problem.getProbability() + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + 0.00286 + + + +.. GENERATED FROM PYTHON SOURCE LINES 29-30 + +Create the Monte-Carlo algorithm + +.. GENERATED FROM PYTHON SOURCE LINES 30-35 + +.. code-block:: Python + + algoProb = ot.ProbabilitySimulationAlgorithm(event) + algoProb.setMaximumOuterSampling(1000) + algoProb.setMaximumCoefficientOfVariation(0.01) + algoProb.run() + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 36-37 + +Get the results + +.. GENERATED FROM PYTHON SOURCE LINES 37-48 + +.. code-block:: Python + + resultAlgo = algoProb.getResult() + neval = g.getEvaluationCallsNumber() + print("Number of function calls = %d" % (neval)) + pf = resultAlgo.getProbabilityEstimate() + print("Failure Probability = %.4f" % (pf)) + level = 0.95 + c95 = resultAlgo.getConfidenceLength(level) + pmin = pf - 0.5 * c95 + pmax = pf + 0.5 * c95 + print("%.1f %% confidence interval :[%.4f,%.4f] " % (level * 100, pmin, pmax)) + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + Number of function calls = 1000 + Failure Probability = 0.0030 + 95.0 % confidence interval :[-0.0004,0.0064] + + + + +.. GENERATED FROM PYTHON SOURCE LINES 49-51 + +Compute the bounds of the domain +-------------------------------- + +.. GENERATED FROM PYTHON SOURCE LINES 53-66 + +.. code-block:: Python + + inputVector = event.getAntecedent() + distribution = inputVector.getDistribution() + X1 = distribution.getMarginal(0) + X2 = distribution.getMarginal(1) + alphaMin = 0.00001 + alphaMax = 1 - alphaMin + lowerBound = ot.Point( + [X1.computeQuantile(alphaMin)[0], X2.computeQuantile(alphaMin)[0]] + ) + upperBound = ot.Point( + [X1.computeQuantile(alphaMax)[0], X2.computeQuantile(alphaMax)[0]] + ) + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 67-72 + +.. code-block:: Python + + nbPoints = [100, 100] + figure = g.draw(lowerBound, upperBound, nbPoints) + figure.setTitle(" Iso-values of limit state function") + figure + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + class=Graph name=y0 as a function of (x1,x2) implementation=class=GraphImplementation name=y0 as a function of (x1,x2) title= Iso-values of limit state function xTitle=x1 yTitle=x2 axes=ON grid=ON legendposition=upper left legendFontSize=1 drawables=[class=Drawable name=Unnamed implementation=class=Contour name=Unnamed x=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=100 dimension=1 data=[[-2.79467],[-2.53619],[-2.27772],[-2.01924],[-1.76076],[-1.50228],[-1.2438],[-0.985325],[-0.726847],[-0.468368],[-0.20989],[0.0485881],[0.307066],[0.565545],[0.824023],[1.0825],[1.34098],[1.59946],[1.85794],[2.11641],[2.37489],[2.63337],[2.89185],[3.15033],[3.40881],[3.66728],[3.92576],[4.18424],[4.44272],[4.7012],[4.95967],[5.21815],[5.47663],[5.73511],[5.99359],[6.25207],[6.51054],[6.76902],[7.0275],[7.28598],[7.54446],[7.80294],[8.06141],[8.31989],[8.57837],[8.83685],[9.09533],[9.3538],[9.61228],[9.87076],[10.1292],[10.3877],[10.6462],[10.9047],[11.1632],[11.4216],[11.6801],[11.9386],[12.1971],[12.4555],[12.714],[12.9725],[13.231],[13.4895],[13.7479],[14.0064],[14.2649],[14.5234],[14.7818],[15.0403],[15.2988],[15.5573],[15.8158],[16.0742],[16.3327],[16.5912],[16.8497],[17.1082],[17.3666],[17.6251],[17.8836],[18.1421],[18.4005],[18.659],[18.9175],[19.176],[19.4345],[19.6929],[19.9514],[20.2099],[20.4684],[20.7268],[20.9853],[21.2438],[21.5023],[21.7608],[22.0192],[22.2777],[22.5362],[22.7947]] y=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=100 dimension=1 data=[[-2.79467],[-2.53619],[-2.27772],[-2.01924],[-1.76076],[-1.50228],[-1.2438],[-0.985325],[-0.726847],[-0.468368],[-0.20989],[0.0485881],[0.307066],[0.565545],[0.824023],[1.0825],[1.34098],[1.59946],[1.85794],[2.11641],[2.37489],[2.63337],[2.89185],[3.15033],[3.40881],[3.66728],[3.92576],[4.18424],[4.44272],[4.7012],[4.95967],[5.21815],[5.47663],[5.73511],[5.99359],[6.25207],[6.51054],[6.76902],[7.0275],[7.28598],[7.54446],[7.80294],[8.06141],[8.31989],[8.57837],[8.83685],[9.09533],[9.3538],[9.61228],[9.87076],[10.1292],[10.3877],[10.6462],[10.9047],[11.1632],[11.4216],[11.6801],[11.9386],[12.1971],[12.4555],[12.714],[12.9725],[13.231],[13.4895],[13.7479],[14.0064],[14.2649],[14.5234],[14.7818],[15.0403],[15.2988],[15.5573],[15.8158],[16.0742],[16.3327],[16.5912],[16.8497],[17.1082],[17.3666],[17.6251],[17.8836],[18.1421],[18.4005],[18.659],[18.9175],[19.176],[19.4345],[19.6929],[19.9514],[20.2099],[20.4684],[20.7268],[20.9853],[21.2438],[21.5023],[21.7608],[22.0192],[22.2777],[22.5362],[22.7947]] levels=class=Point name=Unnamed dimension=10 values=[-0.93067,2.19571,4.85231,7.28318,12.096,26.9124,59.8033,131.73,289.992,766.575] labels=[-0.93067,2.19571,4.85231,7.28318,12.096,26.9124,59.8033,131.73,289.992,766.575] show labels=false isFilled=false colorBarPosition=right isVminUsed=false vmin=0 isVmaxUsed=false vmax=0 colorMap=hsv alpha=1 norm=linear extend=both hatches=[] derived from class=DrawableImplementation name=Unnamed legend= data=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=10000 dimension=1 description=[y0] data=[[1987.76],[1908.69],[1832.01],...,[1832.25],[1908.82],[1987.76]] color=#1f77b4 isColorExplicitlySet=true fillStyle=solid lineStyle=solid pointStyle=plus lineWidth=1] + + + +.. GENERATED FROM PYTHON SOURCE LINES 73-75 + +Print the iso-values of the distribution +---------------------------------------- + +.. GENERATED FROM PYTHON SOURCE LINES 77-79 + +.. code-block:: Python + + _ = otv.View(distribution.drawPDF()) + + + + +.. image-sg:: /auto_examples/reliability_problems/images/sphx_glr_plot_rp24_001.png + :alt: [X1,X2] iso-PDF + :srcset: /auto_examples/reliability_problems/images/sphx_glr_plot_rp24_001.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 80-83 + +.. code-block:: Python + + sampleSize = 5000 + drawEvent = otb.DrawEvent(event) + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 84-87 + +.. code-block:: Python + + cloud = drawEvent.drawSampleCrossCut(sampleSize) + _ = otv.View(cloud) + + + + +.. image-sg:: /auto_examples/reliability_problems/images/sphx_glr_plot_rp24_002.png + :alt: Points X s.t. g(X) < 0.0 + :srcset: /auto_examples/reliability_problems/images/sphx_glr_plot_rp24_002.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 88-90 + +Draw the limit state surface +---------------------------- + +.. GENERATED FROM PYTHON SOURCE LINES 92-94 + +.. code-block:: Python + + bounds = ot.Interval(lowerBound, upperBound) + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 95-100 + +.. code-block:: Python + + graph = drawEvent.drawLimitStateCrossCut(bounds) + graph.add(cloud) + graph + + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + class=Graph name=Limit state surface implementation=class=GraphImplementation name=Limit state surface title=Limit state surface xTitle=x1 yTitle=x2 axes=ON grid=ON legendposition= legendFontSize=1 drawables=[class=Drawable name=Unnamed implementation=class=Contour name=Unnamed x=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=52 dimension=1 description=[t] data=[[-2.79467],[-2.29292],[-1.79117],[-1.28942],[-0.787665],[-0.285913],[0.215839],[0.717591],[1.21934],[1.72109],[2.22285],[2.7246],[3.22635],[3.7281],[4.22985],[4.73161],[5.23336],[5.73511],[6.23686],[6.73861],[7.24036],[7.74212],[8.24387],[8.74562],[9.24737],[9.74912],[10.2509],[10.7526],[11.2544],[11.7561],[12.2579],[12.7596],[13.2614],[13.7631],[14.2649],[14.7666],[15.2684],[15.7701],[16.2719],[16.7737],[17.2754],[17.7772],[18.2789],[18.7807],[19.2824],[19.7842],[20.2859],[20.7877],[21.2894],[21.7912],[22.2929],[22.7947]] y=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=52 dimension=1 description=[t] data=[[-2.79467],[-2.29292],[-1.79117],[-1.28942],[-0.787665],[-0.285913],[0.215839],[0.717591],[1.21934],[1.72109],[2.22285],[2.7246],[3.22635],[3.7281],[4.22985],[4.73161],[5.23336],[5.73511],[6.23686],[6.73861],[7.24036],[7.74212],[8.24387],[8.74562],[9.24737],[9.74912],[10.2509],[10.7526],[11.2544],[11.7561],[12.2579],[12.7596],[13.2614],[13.7631],[14.2649],[14.7666],[15.2684],[15.7701],[16.2719],[16.7737],[17.2754],[17.7772],[18.2789],[18.7807],[19.2824],[19.7842],[20.2859],[20.7877],[21.2894],[21.7912],[22.2929],[22.7947]] levels=class=Point name=Unnamed dimension=1 values=[0] labels=[0.0] show labels=true isFilled=false colorBarPosition=right isVminUsed=false vmin=0 isVmaxUsed=false vmax=0 colorMap=hsv alpha=1 norm=linear extend=both hatches=[] derived from class=DrawableImplementation name=Unnamed legend= data=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=2704 dimension=1 description=[y0] data=[[1987.76],[1836.46],[1693.96],...,[1694.43],[1836.69],[1987.76]] color=#1f77b4 isColorExplicitlySet=true fillStyle=solid lineStyle=solid pointStyle=plus lineWidth=1,class=Drawable name=In implementation=class=Cloud name=In derived from class=DrawableImplementation name=In legend=In data=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=18 dimension=2 data=[[15.3356,3.52012],[16.8028,3.11638],[15.2491,3.88749],[16.5516,1.2734],[16.0898,5.34619],[15.6402,3.42184],[16.3791,4.95877],[17.2414,5.2654],[15.0317,3.78886],[14.7084,2.94601],[16.2233,4.31004],[16.2236,4.65955],[17.2613,4.39141],[16.6125,5.34148],[16.5419,5.44253],[15.4235,4.14551],[17.5321,3.71912],[14.6057,3.73177]] color=lightsalmon3 isColorExplicitlySet=true fillStyle=solid lineStyle=solid pointStyle=fsquare lineWidth=1,class=Drawable name=Out implementation=class=Cloud name=Out derived from class=DrawableImplementation name=Out legend=Out data=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=4982 dimension=2 data=[[10.5269,6.67314],[13.0189,8.74192],[7.82765,11.9677],...,[9.49685,8.92528],[14.3645,11.1986],[7.13341,9.5637]] color=darkseagreen3 isColorExplicitlySet=true fillStyle=solid lineStyle=solid pointStyle=fsquare lineWidth=1] + + + +.. GENERATED FROM PYTHON SOURCE LINES 101-104 + +.. code-block:: Python + + domain = drawEvent.fillEventCrossCut(bounds) + _ = otv.View(domain) + + + + +.. image-sg:: /auto_examples/reliability_problems/images/sphx_glr_plot_rp24_003.png + :alt: Domain where g(x) < 0.0 + :srcset: /auto_examples/reliability_problems/images/sphx_glr_plot_rp24_003.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 105-108 + +.. code-block:: Python + + domain.add(cloud) + _ = otv.View(domain) + + + + +.. image-sg:: /auto_examples/reliability_problems/images/sphx_glr_plot_rp24_004.png + :alt: Domain where g(x) < 0.0 + :srcset: /auto_examples/reliability_problems/images/sphx_glr_plot_rp24_004.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 109-110 + +.. code-block:: Python + + otv.View.ShowAll() + + + + + + + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 1.554 seconds) + + +.. _sphx_glr_download_auto_examples_reliability_problems_plot_rp24.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: plot_rp24.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: plot_rp24.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: plot_rp24.zip ` diff --git a/otbenchmark/master/_sources/auto_examples/reliability_problems/plot_rp25.rst b/otbenchmark/master/_sources/auto_examples/reliability_problems/plot_rp25.rst new file mode 100644 index 00000000000..16e4cf0fc43 --- /dev/null +++ b/otbenchmark/master/_sources/auto_examples/reliability_problems/plot_rp25.rst @@ -0,0 +1,370 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "auto_examples/reliability_problems/plot_rp25.py" +.. LINE NUMBERS ARE GIVEN BELOW. + +.. only:: html + + .. note:: + :class: sphx-glr-download-link-note + + :ref:`Go to the end ` + to download the full example code. + +.. rst-class:: sphx-glr-example-title + +.. _sphx_glr_auto_examples_reliability_problems_plot_rp25.py: + + +RP25 analysis and 2D graphics +============================= + +.. GENERATED FROM PYTHON SOURCE LINES 7-9 + +The objective of this example is to present problem 25 of the BBRC. +We also present graphic elements for the visualization of the limit state surface in 2 dimensions. + +.. GENERATED FROM PYTHON SOURCE LINES 11-15 + +.. code-block:: Python + + import openturns as ot + import openturns.viewer as otv + import otbenchmark as otb + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 16-19 + +.. code-block:: Python + + problem = otb.ReliabilityProblem25() + print(problem) + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + name = RP25 + event = class=ThresholdEventImplementation antecedent=class=CompositeRandomVector function=class=Function name=Unnamed implementation=class=FunctionImplementation name=Unnamed description=[x1,x2,gsys] evaluationImplementation=class=SymbolicEvaluation name=Unnamed inputVariablesNames=[x1,x2] outputVariablesNames=[gsys] formulas=[var g1 := x1^2 -8 * x2 + 16;var g2 := -16 * x1 + x2 + 32;gsys := max(g1, g2)] gradientImplementation=class=SymbolicGradient name=Unnamed evaluation=class=SymbolicEvaluation name=Unnamed inputVariablesNames=[x1,x2] outputVariablesNames=[gsys] formulas=[var g1 := x1^2 -8 * x2 + 16;var g2 := -16 * x1 + x2 + 32;gsys := max(g1, g2)] hessianImplementation=class=SymbolicHessian name=Unnamed evaluation=class=SymbolicEvaluation name=Unnamed inputVariablesNames=[x1,x2] outputVariablesNames=[gsys] formulas=[var g1 := x1^2 -8 * x2 + 16;var g2 := -16 * x1 + x2 + 32;gsys := max(g1, g2)] 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=[0] 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=[0] 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 = 4.148566293759747e-05 + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 20-23 + +.. code-block:: Python + + event = problem.getEvent() + g = event.getFunction() + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 24-26 + +.. code-block:: Python + + problem.getProbability() + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + 4.148566293759747e-05 + + + +.. GENERATED FROM PYTHON SOURCE LINES 27-28 + +Create the Monte-Carlo algorithm + +.. GENERATED FROM PYTHON SOURCE LINES 28-33 + +.. code-block:: Python + + algoProb = ot.ProbabilitySimulationAlgorithm(event) + algoProb.setMaximumOuterSampling(100000) + algoProb.setMaximumCoefficientOfVariation(0.01) + algoProb.run() + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 34-35 + +Get the results + +.. GENERATED FROM PYTHON SOURCE LINES 35-46 + +.. code-block:: Python + + resultAlgo = algoProb.getResult() + neval = g.getEvaluationCallsNumber() + print("Number of function calls = %d" % (neval)) + pf = resultAlgo.getProbabilityEstimate() + print("Failure Probability = %.4f" % (pf)) + level = 0.95 + c95 = resultAlgo.getConfidenceLength(level) + pmin = pf - 0.5 * c95 + pmax = pf + 0.5 * c95 + print("%.1f %% confidence interval :[%.4f,%.4f] " % (level * 100, pmin, pmax)) + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + Number of function calls = 100000 + Failure Probability = 0.0001 + 95.0 % confidence interval :[0.0000,0.0001] + + + + +.. GENERATED FROM PYTHON SOURCE LINES 47-48 + +Compute the bounds of the domain + +.. GENERATED FROM PYTHON SOURCE LINES 48-61 + +.. code-block:: Python + + inputVector = event.getAntecedent() + distribution = inputVector.getDistribution() + X1 = distribution.getMarginal(0) + X2 = distribution.getMarginal(1) + alphaMin = 0.00001 + alphaMax = 1 - alphaMin + lowerBound = ot.Point( + [X1.computeQuantile(alphaMin)[0], X2.computeQuantile(alphaMin)[0]] + ) + upperBound = ot.Point( + [X1.computeQuantile(alphaMax)[0], X2.computeQuantile(alphaMax)[0]] + ) + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 62-67 + +.. code-block:: Python + + nbPoints = [100, 100] + figure = g.draw(lowerBound, upperBound, nbPoints) + figure.setTitle(" Iso-values of limit state function") + figure + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + class=Graph name=gsys as a function of (x1,x2) implementation=class=GraphImplementation name=gsys as a function of (x1,x2) title= Iso-values of limit state function xTitle=x1 yTitle=x2 axes=ON grid=ON legendposition=upper left legendFontSize=1 drawables=[class=Drawable name=Unnamed implementation=class=Contour name=Unnamed x=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=100 dimension=1 data=[[-4.26489],[-4.17873],[-4.09257],[-4.00641],[-3.92025],[-3.83409],[-3.74793],[-3.66177],[-3.57562],[-3.48946],[-3.4033],[-3.31714],[-3.23098],[-3.14482],[-3.05866],[-2.9725],[-2.88634],[-2.80018],[-2.71402],[-2.62786],[-2.5417],[-2.45554],[-2.36938],[-2.28322],[-2.19706],[-2.11091],[-2.02475],[-1.93859],[-1.85243],[-1.76627],[-1.68011],[-1.59395],[-1.50779],[-1.42163],[-1.33547],[-1.24931],[-1.16315],[-1.07699],[-0.990833],[-0.904674],[-0.818514],[-0.732355],[-0.646196],[-0.560036],[-0.473877],[-0.387717],[-0.301558],[-0.215399],[-0.129239],[-0.0430797],[0.0430797],[0.129239],[0.215399],[0.301558],[0.387717],[0.473877],[0.560036],[0.646196],[0.732355],[0.818514],[0.904674],[0.990833],[1.07699],[1.16315],[1.24931],[1.33547],[1.42163],[1.50779],[1.59395],[1.68011],[1.76627],[1.85243],[1.93859],[2.02475],[2.11091],[2.19706],[2.28322],[2.36938],[2.45554],[2.5417],[2.62786],[2.71402],[2.80018],[2.88634],[2.9725],[3.05866],[3.14482],[3.23098],[3.31714],[3.4033],[3.48946],[3.57562],[3.66177],[3.74793],[3.83409],[3.92025],[4.00641],[4.09257],[4.17873],[4.26489]] y=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=100 dimension=1 data=[[-4.26489],[-4.17873],[-4.09257],[-4.00641],[-3.92025],[-3.83409],[-3.74793],[-3.66177],[-3.57562],[-3.48946],[-3.4033],[-3.31714],[-3.23098],[-3.14482],[-3.05866],[-2.9725],[-2.88634],[-2.80018],[-2.71402],[-2.62786],[-2.5417],[-2.45554],[-2.36938],[-2.28322],[-2.19706],[-2.11091],[-2.02475],[-1.93859],[-1.85243],[-1.76627],[-1.68011],[-1.59395],[-1.50779],[-1.42163],[-1.33547],[-1.24931],[-1.16315],[-1.07699],[-0.990833],[-0.904674],[-0.818514],[-0.732355],[-0.646196],[-0.560036],[-0.473877],[-0.387717],[-0.301558],[-0.215399],[-0.129239],[-0.0430797],[0.0430797],[0.129239],[0.215399],[0.301558],[0.387717],[0.473877],[0.560036],[0.646196],[0.732355],[0.818514],[0.904674],[0.990833],[1.07699],[1.16315],[1.24931],[1.33547],[1.42163],[1.50779],[1.59395],[1.68011],[1.76627],[1.85243],[1.93859],[2.02475],[2.11091],[2.19706],[2.28322],[2.36938],[2.45554],[2.5417],[2.62786],[2.71402],[2.80018],[2.88634],[2.9725],[3.05866],[3.14482],[3.23098],[3.31714],[3.4033],[3.48946],[3.57562],[3.66177],[3.74793],[3.83409],[3.92025],[4.00641],[4.09257],[4.17873],[4.26489]] levels=class=Point name=Unnamed dimension=10 values=[4.21359,17.134,26.6689,34.6606,41.7791,48.2016,55.5646,66.593,80.2923,94.0779] labels=[4.21359,17.134,26.6689,34.6606,41.7791,48.2016,55.5646,66.593,80.2923,94.0779] show labels=false isFilled=false colorBarPosition=right isVminUsed=false vmin=0 isVmaxUsed=false vmax=0 colorMap=hsv alpha=1 norm=linear extend=both hatches=[] derived from class=DrawableImplementation name=Unnamed legend= data=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=10000 dimension=1 description=[gsys] data=[[95.9734],[94.5948],[93.2163],...,[-1.36998],[-0.65733],[0.0701671]] color=#1f77b4 isColorExplicitlySet=true fillStyle=solid lineStyle=solid pointStyle=plus lineWidth=1] + + + +.. GENERATED FROM PYTHON SOURCE LINES 68-69 + +Print the iso-values of the distribution + +.. GENERATED FROM PYTHON SOURCE LINES 69-71 + +.. code-block:: Python + + _ = otv.View(distribution.drawPDF()) + + + + +.. image-sg:: /auto_examples/reliability_problems/images/sphx_glr_plot_rp25_001.png + :alt: [X1,X2] iso-PDF + :srcset: /auto_examples/reliability_problems/images/sphx_glr_plot_rp25_001.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 72-75 + +.. code-block:: Python + + sampleSize = 1000000 + drawEvent = otb.DrawEvent(event) + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 76-79 + +.. code-block:: Python + + cloud = drawEvent.drawSampleCrossCut(sampleSize) + _ = otv.View(cloud) + + + + +.. image-sg:: /auto_examples/reliability_problems/images/sphx_glr_plot_rp25_002.png + :alt: Points X s.t. g(X) < 0.0 + :srcset: /auto_examples/reliability_problems/images/sphx_glr_plot_rp25_002.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 80-82 + +Draw the limit state surface +---------------------------- + +.. GENERATED FROM PYTHON SOURCE LINES 84-86 + +.. code-block:: Python + + bounds = ot.Interval(lowerBound, upperBound) + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 87-91 + +.. code-block:: Python + + graph = drawEvent.drawLimitStateCrossCut(bounds) + graph.add(cloud) + graph + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + class=Graph name=Limit state surface implementation=class=GraphImplementation name=Limit state surface title=Limit state surface xTitle=x1 yTitle=x2 axes=ON grid=ON legendposition= legendFontSize=1 drawables=[class=Drawable name=Unnamed implementation=class=Contour name=Unnamed x=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=52 dimension=1 description=[t] data=[[-4.26489],[-4.09764],[-3.93039],[-3.76314],[-3.59589],[-3.42864],[-3.26139],[-3.09414],[-2.92689],[-2.75964],[-2.59238],[-2.42513],[-2.25788],[-2.09063],[-1.92338],[-1.75613],[-1.58888],[-1.42163],[-1.25438],[-1.08713],[-0.919878],[-0.752628],[-0.585377],[-0.418127],[-0.250876],[-0.0836253],[0.0836253],[0.250876],[0.418127],[0.585377],[0.752628],[0.919878],[1.08713],[1.25438],[1.42163],[1.58888],[1.75613],[1.92338],[2.09063],[2.25788],[2.42513],[2.59238],[2.75964],[2.92689],[3.09414],[3.26139],[3.42864],[3.59589],[3.76314],[3.93039],[4.09764],[4.26489]] y=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=52 dimension=1 description=[t] data=[[-4.26489],[-4.09764],[-3.93039],[-3.76314],[-3.59589],[-3.42864],[-3.26139],[-3.09414],[-2.92689],[-2.75964],[-2.59238],[-2.42513],[-2.25788],[-2.09063],[-1.92338],[-1.75613],[-1.58888],[-1.42163],[-1.25438],[-1.08713],[-0.919878],[-0.752628],[-0.585377],[-0.418127],[-0.250876],[-0.0836253],[0.0836253],[0.250876],[0.418127],[0.585377],[0.752628],[0.919878],[1.08713],[1.25438],[1.42163],[1.58888],[1.75613],[1.92338],[2.09063],[2.25788],[2.42513],[2.59238],[2.75964],[2.92689],[3.09414],[3.26139],[3.42864],[3.59589],[3.76314],[3.93039],[4.09764],[4.26489]] levels=class=Point name=Unnamed dimension=1 values=[0] labels=[0.0] show labels=true isFilled=false colorBarPosition=right isVminUsed=false vmin=0 isVmaxUsed=false vmax=0 colorMap=hsv alpha=1 norm=linear extend=both hatches=[] derived from class=DrawableImplementation name=Unnamed legend= data=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=2704 dimension=1 description=[gsys] data=[[95.9734],[93.2974],[90.6213],...,[-2.67116],[-1.32847],[0.0701671]] color=#1f77b4 isColorExplicitlySet=true fillStyle=solid lineStyle=solid pointStyle=plus lineWidth=1,class=Drawable name=In implementation=class=Cloud name=In derived from class=DrawableImplementation name=In legend=In data=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=39 dimension=2 data=[[2.51404,2.93869],[2.20519,2.71985],[2.7188,3.6008],[2.27325,2.82249],[2.61502,2.95809],[2.16582,2.63147],[2.44896,2.99703],[2.44421,3.08732],[2.61548,3.00322],[2.29695,3.11679],[2.27894,2.79781],[2.20525,2.9803],[2.20461,2.65359],[2.55206,2.89895],[2.17765,2.76151],[2.23265,3.0087],[2.46053,2.78],[2.25038,2.66258],[2.43232,2.79593],[2.29091,2.87734],[2.60997,3.0887],[2.28093,2.917],[2.59635,2.99382],[2.57509,3.25377],[2.19751,2.7913],[2.40467,2.88887],[2.24624,2.72401],[2.23563,2.9178],[2.74749,3.6979],[2.65121,3.28599],[2.21487,2.6475],[2.27881,3.57678],[2.2825,2.77635],[2.23503,2.77288],[2.27829,2.69216],[2.47832,2.79843],[2.18244,2.67321],[2.45426,3.1858],[2.24333,2.94962]] color=lightsalmon3 isColorExplicitlySet=true fillStyle=solid lineStyle=solid pointStyle=fsquare lineWidth=1,class=Drawable name=Out implementation=class=Cloud name=Out derived from class=DrawableImplementation name=Out legend=Out data=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=999961 dimension=2 data=[[-0.0257403,-0.0949253],[0.726754,2.35513],[0.0499315,-0.543347],...,[1.06638,-1.19497],[-3.05504,-1.53601],[-0.262816,-0.15206]] color=darkseagreen3 isColorExplicitlySet=true fillStyle=solid lineStyle=solid pointStyle=fsquare lineWidth=1] + + + +.. GENERATED FROM PYTHON SOURCE LINES 92-95 + +.. code-block:: Python + + domain = drawEvent.fillEventCrossCut(bounds) + _ = otv.View(domain) + + + + +.. image-sg:: /auto_examples/reliability_problems/images/sphx_glr_plot_rp25_003.png + :alt: Domain where g(x) < 0.0 + :srcset: /auto_examples/reliability_problems/images/sphx_glr_plot_rp25_003.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 96-99 + +.. code-block:: Python + + domain.add(cloud) + _ = otv.View(domain) + + + + +.. image-sg:: /auto_examples/reliability_problems/images/sphx_glr_plot_rp25_004.png + :alt: Domain where g(x) < 0.0 + :srcset: /auto_examples/reliability_problems/images/sphx_glr_plot_rp25_004.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 100-101 + +.. code-block:: Python + + otv.View.ShowAll() + + + + + + + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 30.020 seconds) + + +.. _sphx_glr_download_auto_examples_reliability_problems_plot_rp25.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: plot_rp25.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: plot_rp25.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: plot_rp25.zip ` diff --git a/otbenchmark/master/_sources/auto_examples/reliability_problems/plot_rp28.rst b/otbenchmark/master/_sources/auto_examples/reliability_problems/plot_rp28.rst new file mode 100644 index 00000000000..345f32970e4 --- /dev/null +++ b/otbenchmark/master/_sources/auto_examples/reliability_problems/plot_rp28.rst @@ -0,0 +1,396 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "auto_examples/reliability_problems/plot_rp28.py" +.. LINE NUMBERS ARE GIVEN BELOW. + +.. only:: html + + .. note:: + :class: sphx-glr-download-link-note + + :ref:`Go to the end ` + to download the full example code. + +.. rst-class:: sphx-glr-example-title + +.. _sphx_glr_auto_examples_reliability_problems_plot_rp28.py: + + +RP28 analysis and 2D graphics +============================= + +.. GENERATED FROM PYTHON SOURCE LINES 7-9 + +The objective of this example is to present problem 28 of the BBRC. +We also present graphic elements for the visualization of the limit state surface in 2 dimensions. + +.. GENERATED FROM PYTHON SOURCE LINES 11-16 + +.. code-block:: Python + + import openturns as ot + import openturns.viewer as otv + import otbenchmark as otb + + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 17-20 + +.. code-block:: Python + + problem = otb.ReliabilityProblem28() + + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 21-24 + +.. code-block:: Python + + print(problem) + + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + name = RP28 + event = class=ThresholdEventImplementation antecedent=class=CompositeRandomVector function=class=Function name=Unnamed implementation=class=FunctionImplementation name=Unnamed description=[x1,x2,y0] evaluationImplementation=class=SymbolicEvaluation name=Unnamed inputVariablesNames=[x1,x2] outputVariablesNames=[y0] formulas=[x1 * x2] gradientImplementation=class=SymbolicGradient name=Unnamed evaluation=class=SymbolicEvaluation name=Unnamed inputVariablesNames=[x1,x2] outputVariablesNames=[y0] formulas=[x1 * x2] hessianImplementation=class=SymbolicHessian name=Unnamed evaluation=class=SymbolicEvaluation name=Unnamed inputVariablesNames=[x1,x2] outputVariablesNames=[y0] formulas=[x1 * x2] 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=[78064] sigma=class=Point name=Unnamed dimension=1 values=[11710] 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=[0.0104] sigma=class=Point name=Unnamed dimension=1 values=[0.00156] correlationMatrix=class=CorrelationMatrix dimension=1 implementation=class=MatrixImplementation name=Unnamed rows=1 columns=1 values=[1] operator=class=Less name=Unnamed threshold=146.14 + probability = 1.4532945550025393e-07 + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 25-29 + +.. code-block:: Python + + event = problem.getEvent() + g = event.getFunction() + + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 30-33 + +.. code-block:: Python + + problem.getProbability() + + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + 1.4532945550025393e-07 + + + +.. GENERATED FROM PYTHON SOURCE LINES 34-35 + +Create the Monte-Carlo algorithm + +.. GENERATED FROM PYTHON SOURCE LINES 35-42 + +.. code-block:: Python + + algoProb = ot.ProbabilitySimulationAlgorithm(event) + algoProb.setMaximumOuterSampling(10000) + algoProb.setBlockSize(128) + algoProb.setMaximumCoefficientOfVariation(0.01) + algoProb.run() + + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 43-44 + +Get the results + +.. GENERATED FROM PYTHON SOURCE LINES 44-58 + +.. code-block:: Python + + resultAlgo = algoProb.getResult() + neval = g.getEvaluationCallsNumber() + print("Number of function calls = %d" % (neval)) + pf = resultAlgo.getProbabilityEstimate() + print("Failure Probability = %.4f (* 1.e-7)" % (pf * 1.0e7)) + level = 0.95 + c95 = resultAlgo.getConfidenceLength(level) + pmin = pf - 0.5 * c95 + pmax = pf + 0.5 * c95 + print( + "%.1f %% confidence interval :[%.4f,%.4f] * 1.e-7 " + % (level * 100, pmin * 1.0e7, pmax * 1.0e7) + ) + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + Number of function calls = 1280000 + Failure Probability = 0.0000 (* 1.e-7) + 95.0 % confidence interval :[0.0000,0.0000] * 1.e-7 + + + + +.. GENERATED FROM PYTHON SOURCE LINES 59-61 + +Compute the bounds of the domain +-------------------------------- + +.. GENERATED FROM PYTHON SOURCE LINES 63-77 + +.. code-block:: Python + + inputVector = event.getAntecedent() + distribution = inputVector.getDistribution() + X1 = distribution.getMarginal(0) + X2 = distribution.getMarginal(1) + alphaMin = 1.0e-8 + alphaMax = 1.0 - alphaMin + lowerBound = ot.Point( + [X1.computeQuantile(alphaMin)[0], X2.computeQuantile(alphaMin)[0]] + ) + upperBound = ot.Point( + [X1.computeQuantile(alphaMax)[0], X2.computeQuantile(alphaMax)[0]] + ) + + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 78-83 + +.. code-block:: Python + + nbPoints = [100, 100] + figure = g.draw(lowerBound, upperBound, nbPoints) + figure.setTitle(" Iso-values of limit state function") + figure + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + class=Graph name=y0 as a function of (x1,x2) implementation=class=GraphImplementation name=y0 as a function of (x1,x2) title= Iso-values of limit state function xTitle=x1 yTitle=x2 axes=ON grid=ON legendposition=upper left legendFontSize=1 drawables=[class=Drawable name=Unnamed implementation=class=Contour name=Unnamed x=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=100 dimension=1 data=[[12347.5],[13675.1],[15002.7],[16330.3],[17657.9],[18985.5],[20313.1],[21640.7],[22968.3],[24295.9],[25623.5],[26951.1],[28278.7],[29606.4],[30934],[32261.6],[33589.2],[34916.8],[36244.4],[37572],[38899.6],[40227.2],[41554.8],[42882.4],[44210],[45537.6],[46865.2],[48192.8],[49520.5],[50848.1],[52175.7],[53503.3],[54830.9],[56158.5],[57486.1],[58813.7],[60141.3],[61468.9],[62796.5],[64124.1],[65451.7],[66779.3],[68106.9],[69434.6],[70762.2],[72089.8],[73417.4],[74745],[76072.6],[77400.2],[78727.8],[80055.4],[81383],[82710.6],[84038.2],[85365.8],[86693.4],[88021.1],[89348.7],[90676.3],[92003.9],[93331.5],[94659.1],[95986.7],[97314.3],[98641.9],[99969.5],[101297],[102625],[103952],[105280],[106608],[107935],[109263],[110590],[111918],[113246],[114573],[115901],[117228],[118556],[119884],[121211],[122539],[123866],[125194],[126522],[127849],[129177],[130504],[131832],[133160],[134487],[135815],[137143],[138470],[139798],[141125],[142453],[143781]] y=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=100 dimension=1 data=[[0.00164528],[0.00182214],[0.001999],[0.00217587],[0.00235273],[0.00252959],[0.00270646],[0.00288332],[0.00306018],[0.00323705],[0.00341391],[0.00359077],[0.00376763],[0.0039445],[0.00412136],[0.00429822],[0.00447509],[0.00465195],[0.00482881],[0.00500568],[0.00518254],[0.0053594],[0.00553627],[0.00571313],[0.00588999],[0.00606685],[0.00624372],[0.00642058],[0.00659744],[0.00677431],[0.00695117],[0.00712803],[0.0073049],[0.00748176],[0.00765862],[0.00783549],[0.00801235],[0.00818921],[0.00836607],[0.00854294],[0.0087198],[0.00889666],[0.00907353],[0.00925039],[0.00942725],[0.00960412],[0.00978098],[0.00995784],[0.0101347],[0.0103116],[0.0104884],[0.0106653],[0.0108422],[0.011019],[0.0111959],[0.0113727],[0.0115496],[0.0117265],[0.0119033],[0.0120802],[0.0122571],[0.0124339],[0.0126108],[0.0127877],[0.0129645],[0.0131414],[0.0133182],[0.0134951],[0.013672],[0.0138488],[0.0140257],[0.0142026],[0.0143794],[0.0145563],[0.0147331],[0.01491],[0.0150869],[0.0152637],[0.0154406],[0.0156175],[0.0157943],[0.0159712],[0.016148],[0.0163249],[0.0165018],[0.0166786],[0.0168555],[0.0170324],[0.0172092],[0.0173861],[0.017563],[0.0177398],[0.0179167],[0.0180935],[0.0182704],[0.0184473],[0.0186241],[0.018801],[0.0189779],[0.0191547]] levels=class=Point name=Unnamed dimension=10 values=[116.403,222.633,322.994,440.998,580.019,742.567,938.836,1182.22,1505.14,2015.06] labels=[116.403,222.633,322.994,440.998,580.019,742.567,938.836,1182.22,1505.14,2015.06] show labels=false isFilled=false colorBarPosition=right isVminUsed=false vmin=0 isVmaxUsed=false vmax=0 colorMap=hsv alpha=1 norm=linear extend=both hatches=[] derived from class=DrawableImplementation name=Unnamed legend= data=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=10000 dimension=1 description=[y0] data=[[20.315],[22.4993],[24.6836],...,[2703.22],[2728.65],[2754.08]] color=#1f77b4 isColorExplicitlySet=true fillStyle=solid lineStyle=solid pointStyle=plus lineWidth=1] + + + +.. GENERATED FROM PYTHON SOURCE LINES 84-86 + +Print the iso-values of the distribution +---------------------------------------- + +.. GENERATED FROM PYTHON SOURCE LINES 88-91 + +.. code-block:: Python + + _ = otv.View(distribution.drawPDF()) + + + + + +.. image-sg:: /auto_examples/reliability_problems/images/sphx_glr_plot_rp28_001.png + :alt: [X1,X2] iso-PDF + :srcset: /auto_examples/reliability_problems/images/sphx_glr_plot_rp28_001.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 92-95 + +.. code-block:: Python + + sampleSize = 100000 + drawEvent = otb.DrawEvent(event) + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 96-99 + +.. code-block:: Python + + cloud = drawEvent.drawSampleCrossCut(sampleSize) + _ = otv.View(cloud) + + + + +.. image-sg:: /auto_examples/reliability_problems/images/sphx_glr_plot_rp28_002.png + :alt: Points X s.t. g(X) < 146.14 + :srcset: /auto_examples/reliability_problems/images/sphx_glr_plot_rp28_002.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 100-102 + +Draw the limit state surface +---------------------------- + +.. GENERATED FROM PYTHON SOURCE LINES 104-106 + +.. code-block:: Python + + bounds = ot.Interval(lowerBound, upperBound) + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 107-111 + +.. code-block:: Python + + graph = drawEvent.drawLimitStateCrossCut(bounds) + graph.add(cloud) + graph + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + class=Graph name=Limit state surface implementation=class=GraphImplementation name=Limit state surface title=Limit state surface xTitle=x1 yTitle=x2 axes=ON grid=ON legendposition= legendFontSize=1 drawables=[class=Drawable name=Unnamed implementation=class=Contour name=Unnamed x=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=52 dimension=1 description=[t] data=[[12347.5],[14924.6],[17501.7],[20078.8],[22655.9],[25233.1],[27810.2],[30387.3],[32964.4],[35541.5],[38118.7],[40695.8],[43272.9],[45850],[48427.1],[51004.3],[53581.4],[56158.5],[58735.6],[61312.7],[63889.8],[66467],[69044.1],[71621.2],[74198.3],[76775.4],[79352.6],[81929.7],[84506.8],[87083.9],[89661],[92238.2],[94815.3],[97392.4],[99969.5],[102547],[105124],[107701],[110278],[112855],[115432],[118009],[120586],[123164],[125741],[128318],[130895],[133472],[136049],[138626],[141203],[143781]] y=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=52 dimension=1 description=[t] data=[[0.00164528],[0.0019886],[0.00233192],[0.00267525],[0.00301857],[0.00336189],[0.00370521],[0.00404854],[0.00439186],[0.00473518],[0.0050785],[0.00542182],[0.00576515],[0.00610847],[0.00645179],[0.00679511],[0.00713844],[0.00748176],[0.00782508],[0.0081684],[0.00851173],[0.00885505],[0.00919837],[0.00954169],[0.00988502],[0.0102283],[0.0105717],[0.010915],[0.0112583],[0.0116016],[0.011945],[0.0122883],[0.0126316],[0.0129749],[0.0133182],[0.0136616],[0.0140049],[0.0143482],[0.0146915],[0.0150349],[0.0153782],[0.0157215],[0.0160648],[0.0164081],[0.0167515],[0.0170948],[0.0174381],[0.0177814],[0.0181248],[0.0184681],[0.0188114],[0.0191547]] levels=class=Point name=Unnamed dimension=1 values=[146.14] labels=[146.14] show labels=true isFilled=false colorBarPosition=right isVminUsed=false vmin=0 isVmaxUsed=false vmax=0 colorMap=hsv alpha=1 norm=linear extend=both hatches=[] derived from class=DrawableImplementation name=Unnamed legend= data=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=2704 dimension=1 description=[y0] data=[[20.315],[24.5551],[28.7952],...,[2655.35],[2704.71],[2754.08]] color=#1f77b4 isColorExplicitlySet=true fillStyle=solid lineStyle=solid pointStyle=plus lineWidth=1,class=Drawable name=Out implementation=class=Cloud name=Out derived from class=DrawableImplementation name=Out legend=Out data=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=100000 dimension=2 data=[[75403.2,0.0114914],[72903.9,0.0154601],[75252,0.0103507],...,[79392.3,0.00761748],[71504,0.00828923],[76385.8,0.00631019]] color=darkseagreen3 isColorExplicitlySet=true fillStyle=solid lineStyle=solid pointStyle=fsquare lineWidth=1] + + + +.. GENERATED FROM PYTHON SOURCE LINES 112-115 + +.. code-block:: Python + + domain = drawEvent.fillEventCrossCut(bounds) + _ = otv.View(domain) + + + + +.. image-sg:: /auto_examples/reliability_problems/images/sphx_glr_plot_rp28_003.png + :alt: Domain where g(x) < 146.14 + :srcset: /auto_examples/reliability_problems/images/sphx_glr_plot_rp28_003.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 116-119 + +.. code-block:: Python + + domain.add(cloud) + _ = otv.View(domain) + + + + +.. image-sg:: /auto_examples/reliability_problems/images/sphx_glr_plot_rp28_004.png + :alt: Domain where g(x) < 146.14 + :srcset: /auto_examples/reliability_problems/images/sphx_glr_plot_rp28_004.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 120-121 + +.. code-block:: Python + + otv.View.ShowAll() + + + + + + + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 3.823 seconds) + + +.. _sphx_glr_download_auto_examples_reliability_problems_plot_rp28.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: plot_rp28.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: plot_rp28.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: plot_rp28.zip ` diff --git a/otbenchmark/master/_sources/auto_examples/reliability_problems/plot_rp31.rst b/otbenchmark/master/_sources/auto_examples/reliability_problems/plot_rp31.rst new file mode 100644 index 00000000000..f16c8d1b56f --- /dev/null +++ b/otbenchmark/master/_sources/auto_examples/reliability_problems/plot_rp31.rst @@ -0,0 +1,369 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "auto_examples/reliability_problems/plot_rp31.py" +.. LINE NUMBERS ARE GIVEN BELOW. + +.. only:: html + + .. note:: + :class: sphx-glr-download-link-note + + :ref:`Go to the end ` + to download the full example code. + +.. rst-class:: sphx-glr-example-title + +.. _sphx_glr_auto_examples_reliability_problems_plot_rp31.py: + + +RP31 analysis and 2D graphics +============================= + +.. GENERATED FROM PYTHON SOURCE LINES 7-9 + +The objective of this example is to present problem 31 of the BBRC. +We also present graphic elements for the visualization of the limit state surface in 2 dimensions. + +.. GENERATED FROM PYTHON SOURCE LINES 11-15 + +.. code-block:: Python + + import openturns as ot + import openturns.viewer as otv + import otbenchmark as otb + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 16-19 + +.. code-block:: Python + + problem = otb.ReliabilityProblem31() + print(problem) + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + name = RP31 + event = class=ThresholdEventImplementation antecedent=class=CompositeRandomVector function=class=Function name=Unnamed implementation=class=FunctionImplementation name=Unnamed description=[x1,x2,y0] evaluationImplementation=class=SymbolicEvaluation name=Unnamed inputVariablesNames=[x1,x2] outputVariablesNames=[y0] formulas=[2 - x2 + 256 * x1^4] gradientImplementation=class=SymbolicGradient name=Unnamed evaluation=class=SymbolicEvaluation name=Unnamed inputVariablesNames=[x1,x2] outputVariablesNames=[y0] formulas=[2 - x2 + 256 * x1^4] hessianImplementation=class=SymbolicHessian name=Unnamed evaluation=class=SymbolicEvaluation name=Unnamed inputVariablesNames=[x1,x2] outputVariablesNames=[y0] formulas=[2 - x2 + 256 * x1^4] 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=[0] 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=[0] 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.003226681209587691 + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 20-23 + +.. code-block:: Python + + event = problem.getEvent() + g = event.getFunction() + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 24-26 + +.. code-block:: Python + + problem.getProbability() + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + 0.003226681209587691 + + + +.. GENERATED FROM PYTHON SOURCE LINES 27-28 + +Create the Monte-Carlo algorithm + +.. GENERATED FROM PYTHON SOURCE LINES 28-33 + +.. code-block:: Python + + algoProb = ot.ProbabilitySimulationAlgorithm(event) + algoProb.setMaximumOuterSampling(1000) + algoProb.setMaximumCoefficientOfVariation(0.01) + algoProb.run() + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 34-35 + +Get the results + +.. GENERATED FROM PYTHON SOURCE LINES 35-46 + +.. code-block:: Python + + resultAlgo = algoProb.getResult() + neval = g.getEvaluationCallsNumber() + print("Number of function calls = %d" % (neval)) + pf = resultAlgo.getProbabilityEstimate() + print("Failure Probability = %.4f" % (pf)) + level = 0.95 + c95 = resultAlgo.getConfidenceLength(level) + pmin = pf - 0.5 * c95 + pmax = pf + 0.5 * c95 + print("%.1f %% confidence interval :[%.4f,%.4f] " % (level * 100, pmin, pmax)) + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + Number of function calls = 1000 + Failure Probability = 0.0000 + 95.0 % confidence interval :[0.0000,0.0000] + + + + +.. GENERATED FROM PYTHON SOURCE LINES 47-48 + +Compute the bounds of the domain + +.. GENERATED FROM PYTHON SOURCE LINES 48-61 + +.. code-block:: Python + + inputVector = event.getAntecedent() + distribution = inputVector.getDistribution() + X1 = distribution.getMarginal(0) + X2 = distribution.getMarginal(1) + alphaMin = 0.00001 + alphaMax = 1 - alphaMin + lowerBound = ot.Point( + [X1.computeQuantile(alphaMin)[0], X2.computeQuantile(alphaMin)[0]] + ) + upperBound = ot.Point( + [X1.computeQuantile(alphaMax)[0], X2.computeQuantile(alphaMax)[0]] + ) + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 62-67 + +.. code-block:: Python + + nbPoints = [100, 100] + graph = g.draw(lowerBound, upperBound, nbPoints) + graph.setTitle(" Iso-values of limit state function") + _ = otv.View(graph) + + + + +.. image-sg:: /auto_examples/reliability_problems/images/sphx_glr_plot_rp31_001.png + :alt: Iso-values of limit state function + :srcset: /auto_examples/reliability_problems/images/sphx_glr_plot_rp31_001.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 68-69 + +Plot the iso-values of the distribution + +.. GENERATED FROM PYTHON SOURCE LINES 69-71 + +.. code-block:: Python + + _ = otv.View(distribution.drawPDF()) + + + + +.. image-sg:: /auto_examples/reliability_problems/images/sphx_glr_plot_rp31_002.png + :alt: [X1,X2] iso-PDF + :srcset: /auto_examples/reliability_problems/images/sphx_glr_plot_rp31_002.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 72-75 + +.. code-block:: Python + + sampleSize = 10000 + drawEvent = otb.DrawEvent(event) + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 76-79 + +.. code-block:: Python + + cloud = drawEvent.drawSampleCrossCut(sampleSize) + _ = otv.View(cloud) + + + + +.. image-sg:: /auto_examples/reliability_problems/images/sphx_glr_plot_rp31_003.png + :alt: Points X s.t. g(X) < 0.0 + :srcset: /auto_examples/reliability_problems/images/sphx_glr_plot_rp31_003.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 80-82 + +Draw the limit state surface +---------------------------- + +.. GENERATED FROM PYTHON SOURCE LINES 84-86 + +.. code-block:: Python + + bounds = ot.Interval(lowerBound, upperBound) + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 87-91 + +.. code-block:: Python + + graph = drawEvent.drawLimitStateCrossCut(bounds) + graph.add(cloud) + graph + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + class=Graph name=Limit state surface implementation=class=GraphImplementation name=Limit state surface title=Limit state surface xTitle=x1 yTitle=x2 axes=ON grid=ON legendposition= legendFontSize=1 drawables=[class=Drawable name=Unnamed implementation=class=Contour name=Unnamed x=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=52 dimension=1 description=[t] data=[[-4.26489],[-4.09764],[-3.93039],[-3.76314],[-3.59589],[-3.42864],[-3.26139],[-3.09414],[-2.92689],[-2.75964],[-2.59238],[-2.42513],[-2.25788],[-2.09063],[-1.92338],[-1.75613],[-1.58888],[-1.42163],[-1.25438],[-1.08713],[-0.919878],[-0.752628],[-0.585377],[-0.418127],[-0.250876],[-0.0836253],[0.0836253],[0.250876],[0.418127],[0.585377],[0.752628],[0.919878],[1.08713],[1.25438],[1.42163],[1.58888],[1.75613],[1.92338],[2.09063],[2.25788],[2.42513],[2.59238],[2.75964],[2.92689],[3.09414],[3.26139],[3.42864],[3.59589],[3.76314],[3.93039],[4.09764],[4.26489]] y=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=52 dimension=1 description=[t] data=[[-4.26489],[-4.09764],[-3.93039],[-3.76314],[-3.59589],[-3.42864],[-3.26139],[-3.09414],[-2.92689],[-2.75964],[-2.59238],[-2.42513],[-2.25788],[-2.09063],[-1.92338],[-1.75613],[-1.58888],[-1.42163],[-1.25438],[-1.08713],[-0.919878],[-0.752628],[-0.585377],[-0.418127],[-0.250876],[-0.0836253],[0.0836253],[0.250876],[0.418127],[0.585377],[0.752628],[0.919878],[1.08713],[1.25438],[1.42163],[1.58888],[1.75613],[1.92338],[2.09063],[2.25788],[2.42513],[2.59238],[2.75964],[2.92689],[3.09414],[3.26139],[3.42864],[3.59589],[3.76314],[3.93039],[4.09764],[4.26489]] levels=class=Point name=Unnamed dimension=1 values=[0] labels=[0.0] show labels=true isFilled=false colorBarPosition=right isVminUsed=false vmin=0 isVmaxUsed=false vmax=0 colorMap=hsv alpha=1 norm=linear extend=both hatches=[] derived from class=DrawableImplementation name=Unnamed legend= data=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=2704 dimension=1 description=[y0] data=[[84704],[72179.3],[61098],...,[61089.5],[72170.8],[84695.4]] color=#1f77b4 isColorExplicitlySet=true fillStyle=solid lineStyle=solid pointStyle=plus lineWidth=1,class=Drawable name=In implementation=class=Cloud name=In derived from class=DrawableImplementation name=In legend=In data=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=30 dimension=2 data=[[0.00401381,2.05973],[-0.0708179,2.10997],[-0.0386716,2.02335],[0.107377,2.06684],[0.0289191,2.59518],[0.00769713,2.47395],[0.041789,2.22251],[-0.162326,2.42449],[0.171955,2.36896],[0.0866334,2.94822],[-0.0834063,2.44107],[0.233719,2.80992],[0.0464717,2.48185],[0.0469922,2.14525],[0.22383,2.75541],[0.0616218,2.39035],[0.0943006,2.31183],[-0.0946742,2.40708],[-0.141894,2.76224],[0.0192969,2.65544],[-0.0444933,2.3254],[0.0964199,2.06633],[0.0849382,2.77879],[0.108445,2.12584],[-0.0738871,2.13135],[0.104042,2.52887],[0.124864,2.50377],[0.0212843,2.30934],[0.0962009,3.05289],[-0.167942,2.68273]] color=lightsalmon3 isColorExplicitlySet=true fillStyle=solid lineStyle=solid pointStyle=fsquare lineWidth=1,class=Drawable name=Out implementation=class=Cloud name=Out derived from class=DrawableImplementation name=Out legend=Out data=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=9970 dimension=2 data=[[0.330963,-0.427136],[-0.926174,-0.302073],[-0.635215,-0.0147503],...,[-0.195117,-0.466988],[0.35291,-1.19866],[-0.975663,-0.896251]] color=darkseagreen3 isColorExplicitlySet=true fillStyle=solid lineStyle=solid pointStyle=fsquare lineWidth=1] + + + +.. GENERATED FROM PYTHON SOURCE LINES 92-95 + +.. code-block:: Python + + domain = drawEvent.fillEventCrossCut(bounds) + _ = otv.View(domain) + + + + +.. image-sg:: /auto_examples/reliability_problems/images/sphx_glr_plot_rp31_004.png + :alt: Domain where g(x) < 0.0 + :srcset: /auto_examples/reliability_problems/images/sphx_glr_plot_rp31_004.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 96-99 + +.. code-block:: Python + + domain.add(cloud) + _ = otv.View(domain) + + + + +.. image-sg:: /auto_examples/reliability_problems/images/sphx_glr_plot_rp31_005.png + :alt: Domain where g(x) < 0.0 + :srcset: /auto_examples/reliability_problems/images/sphx_glr_plot_rp31_005.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 100-101 + +.. code-block:: Python + + otv.View.ShowAll() + + + + + + + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 2.902 seconds) + + +.. _sphx_glr_download_auto_examples_reliability_problems_plot_rp31.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: plot_rp31.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: plot_rp31.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: plot_rp31.zip ` diff --git a/otbenchmark/master/_sources/auto_examples/reliability_problems/plot_rp35.rst b/otbenchmark/master/_sources/auto_examples/reliability_problems/plot_rp35.rst new file mode 100644 index 00000000000..e525f731967 --- /dev/null +++ b/otbenchmark/master/_sources/auto_examples/reliability_problems/plot_rp35.rst @@ -0,0 +1,375 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "auto_examples/reliability_problems/plot_rp35.py" +.. LINE NUMBERS ARE GIVEN BELOW. + +.. only:: html + + .. note:: + :class: sphx-glr-download-link-note + + :ref:`Go to the end ` + to download the full example code. + +.. rst-class:: sphx-glr-example-title + +.. _sphx_glr_auto_examples_reliability_problems_plot_rp35.py: + + +RP35 analysis and 2D graphics +============================= + +.. GENERATED FROM PYTHON SOURCE LINES 7-9 + +The objective of this example is to present problem 35 of the BBRC. +We also present graphic elements for the visualization of the limit state surface in 2 dimensions. + +.. GENERATED FROM PYTHON SOURCE LINES 11-15 + +.. code-block:: Python + + import openturns as ot + import openturns.viewer as otv + import otbenchmark as otb + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 16-19 + +.. code-block:: Python + + problem = otb.ReliabilityProblem35() + print(problem) + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + name = RP35 + event = class=ThresholdEventImplementation antecedent=class=CompositeRandomVector function=class=Function name=Unnamed implementation=class=FunctionImplementation name=Unnamed description=[x1,x2,gsys] evaluationImplementation=class=SymbolicEvaluation name=Unnamed inputVariablesNames=[x1,x2] outputVariablesNames=[gsys] formulas=[var g1 := 2 - x2 + exp(-0.1 * x1^2) + (0.2 * x1) ^ 4;var g2 := 4.5 - x1 * x2;gsys := min(g1, g2)] gradientImplementation=class=SymbolicGradient name=Unnamed evaluation=class=SymbolicEvaluation name=Unnamed inputVariablesNames=[x1,x2] outputVariablesNames=[gsys] formulas=[var g1 := 2 - x2 + exp(-0.1 * x1^2) + (0.2 * x1) ^ 4;var g2 := 4.5 - x1 * x2;gsys := min(g1, g2)] hessianImplementation=class=SymbolicHessian name=Unnamed evaluation=class=SymbolicEvaluation name=Unnamed inputVariablesNames=[x1,x2] outputVariablesNames=[gsys] formulas=[var g1 := 2 - x2 + exp(-0.1 * x1^2) + (0.2 * x1) ^ 4;var g2 := 4.5 - x1 * x2;gsys := min(g1, g2)] 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=[0] 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=[0] 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.00347894632 + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 20-23 + +.. code-block:: Python + + event = problem.getEvent() + g = event.getFunction() + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 24-26 + +.. code-block:: Python + + problem.getProbability() + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + 0.00347894632 + + + +.. GENERATED FROM PYTHON SOURCE LINES 27-28 + +Create the Monte-Carlo algorithm + +.. GENERATED FROM PYTHON SOURCE LINES 28-33 + +.. code-block:: Python + + algoProb = ot.ProbabilitySimulationAlgorithm(event) + algoProb.setMaximumOuterSampling(1000) + algoProb.setMaximumCoefficientOfVariation(0.01) + algoProb.run() + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 34-35 + +Get the results + +.. GENERATED FROM PYTHON SOURCE LINES 35-46 + +.. code-block:: Python + + resultAlgo = algoProb.getResult() + neval = g.getEvaluationCallsNumber() + print("Number of function calls = %d" % (neval)) + pf = resultAlgo.getProbabilityEstimate() + print("Failure Probability = %.4f" % (pf)) + level = 0.95 + c95 = resultAlgo.getConfidenceLength(level) + pmin = pf - 0.5 * c95 + pmax = pf + 0.5 * c95 + print("%.1f %% confidence interval :[%.4f,%.4f] " % (level * 100, pmin, pmax)) + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + Number of function calls = 1000 + Failure Probability = 0.0070 + 95.0 % confidence interval :[0.0018,0.0122] + + + + +.. GENERATED FROM PYTHON SOURCE LINES 47-49 + +Compute the bounds of the domain +-------------------------------- + +.. GENERATED FROM PYTHON SOURCE LINES 51-65 + +.. code-block:: Python + + inputVector = event.getAntecedent() + distribution = inputVector.getDistribution() + X1 = distribution.getMarginal(0) + X2 = distribution.getMarginal(1) + alphaMin = 0.00001 + alphaMax = 1 - alphaMin + lowerBound = ot.Point( + [X1.computeQuantile(alphaMin)[0], X2.computeQuantile(alphaMin)[0]] + ) + upperBound = ot.Point( + [X1.computeQuantile(alphaMax)[0], X2.computeQuantile(alphaMax)[0]] + ) + + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 66-71 + +.. code-block:: Python + + nbPoints = [100, 100] + figure = g.draw(lowerBound, upperBound, nbPoints) + figure.setTitle(" Iso-values of limit state function") + figure + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + class=Graph name=gsys as a function of (x1,x2) implementation=class=GraphImplementation name=gsys as a function of (x1,x2) title= Iso-values of limit state function xTitle=x1 yTitle=x2 axes=ON grid=ON legendposition=upper left legendFontSize=1 drawables=[class=Drawable name=Unnamed implementation=class=Contour name=Unnamed x=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=100 dimension=1 data=[[-4.26489],[-4.17873],[-4.09257],[-4.00641],[-3.92025],[-3.83409],[-3.74793],[-3.66177],[-3.57562],[-3.48946],[-3.4033],[-3.31714],[-3.23098],[-3.14482],[-3.05866],[-2.9725],[-2.88634],[-2.80018],[-2.71402],[-2.62786],[-2.5417],[-2.45554],[-2.36938],[-2.28322],[-2.19706],[-2.11091],[-2.02475],[-1.93859],[-1.85243],[-1.76627],[-1.68011],[-1.59395],[-1.50779],[-1.42163],[-1.33547],[-1.24931],[-1.16315],[-1.07699],[-0.990833],[-0.904674],[-0.818514],[-0.732355],[-0.646196],[-0.560036],[-0.473877],[-0.387717],[-0.301558],[-0.215399],[-0.129239],[-0.0430797],[0.0430797],[0.129239],[0.215399],[0.301558],[0.387717],[0.473877],[0.560036],[0.646196],[0.732355],[0.818514],[0.904674],[0.990833],[1.07699],[1.16315],[1.24931],[1.33547],[1.42163],[1.50779],[1.59395],[1.68011],[1.76627],[1.85243],[1.93859],[2.02475],[2.11091],[2.19706],[2.28322],[2.36938],[2.45554],[2.5417],[2.62786],[2.71402],[2.80018],[2.88634],[2.9725],[3.05866],[3.14482],[3.23098],[3.31714],[3.4033],[3.48946],[3.57562],[3.66177],[3.74793],[3.83409],[3.92025],[4.00641],[4.09257],[4.17873],[4.26489]] y=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=100 dimension=1 data=[[-4.26489],[-4.17873],[-4.09257],[-4.00641],[-3.92025],[-3.83409],[-3.74793],[-3.66177],[-3.57562],[-3.48946],[-3.4033],[-3.31714],[-3.23098],[-3.14482],[-3.05866],[-2.9725],[-2.88634],[-2.80018],[-2.71402],[-2.62786],[-2.5417],[-2.45554],[-2.36938],[-2.28322],[-2.19706],[-2.11091],[-2.02475],[-1.93859],[-1.85243],[-1.76627],[-1.68011],[-1.59395],[-1.50779],[-1.42163],[-1.33547],[-1.24931],[-1.16315],[-1.07699],[-0.990833],[-0.904674],[-0.818514],[-0.732355],[-0.646196],[-0.560036],[-0.473877],[-0.387717],[-0.301558],[-0.215399],[-0.129239],[-0.0430797],[0.0430797],[0.129239],[0.215399],[0.301558],[0.387717],[0.473877],[0.560036],[0.646196],[0.732355],[0.818514],[0.904674],[0.990833],[1.07699],[1.16315],[1.24931],[1.33547],[1.42163],[1.50779],[1.59395],[1.68011],[1.76627],[1.85243],[1.93859],[2.02475],[2.11091],[2.19706],[2.28322],[2.36938],[2.45554],[2.5417],[2.62786],[2.71402],[2.80018],[2.88634],[2.9725],[3.05866],[3.14482],[3.23098],[3.31714],[3.4033],[3.48946],[3.57562],[3.66177],[3.74793],[3.83409],[3.92025],[4.00641],[4.09257],[4.17873],[4.26489]] levels=class=Point name=Unnamed dimension=10 values=[-6.38462,-1.72641,-0.650014,0.248222,1.10934,1.89202,2.59032,3.33638,4.45603,6.04551] labels=[-6.38462,-1.72641,-0.650014,0.248222,1.10934,1.89202,2.59032,3.33638,4.45603,6.04551] show labels=false isFilled=false colorBarPosition=right isVminUsed=false vmin=0 isVmaxUsed=false vmax=0 colorMap=hsv alpha=1 norm=linear extend=both hatches=[] derived from class=DrawableImplementation name=Unnamed legend= data=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=10000 dimension=1 description=[gsys] data=[[-13.6893],[-13.3218],[-12.9544],...,[-12.9544],[-13.3218],[-13.6893]] color=#1f77b4 isColorExplicitlySet=true fillStyle=solid lineStyle=solid pointStyle=plus lineWidth=1] + + + +.. GENERATED FROM PYTHON SOURCE LINES 72-74 + +Print the iso-values of the distribution +---------------------------------------- + +.. GENERATED FROM PYTHON SOURCE LINES 76-79 + +.. code-block:: Python + + _ = otv.View(distribution.drawPDF()) + + + + + +.. image-sg:: /auto_examples/reliability_problems/images/sphx_glr_plot_rp35_001.png + :alt: [X1,X2] iso-PDF + :srcset: /auto_examples/reliability_problems/images/sphx_glr_plot_rp35_001.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 80-84 + +.. code-block:: Python + + sampleSize = 10000 + drawEvent = otb.DrawEvent(event) + + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 85-88 + +.. code-block:: Python + + cloud = drawEvent.drawSampleCrossCut(sampleSize) + _ = otv.View(cloud) + + + + +.. image-sg:: /auto_examples/reliability_problems/images/sphx_glr_plot_rp35_002.png + :alt: Points X s.t. g(X) < 0.0 + :srcset: /auto_examples/reliability_problems/images/sphx_glr_plot_rp35_002.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 89-91 + +Draw the limit state surface +---------------------------- + +.. GENERATED FROM PYTHON SOURCE LINES 93-95 + +.. code-block:: Python + + bounds = ot.Interval(lowerBound, upperBound) + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 96-100 + +.. code-block:: Python + + graph = drawEvent.drawLimitStateCrossCut(bounds) + graph.add(cloud) + graph + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + class=Graph name=Limit state surface implementation=class=GraphImplementation name=Limit state surface title=Limit state surface xTitle=x1 yTitle=x2 axes=ON grid=ON legendposition= legendFontSize=1 drawables=[class=Drawable name=Unnamed implementation=class=Contour name=Unnamed x=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=52 dimension=1 description=[t] data=[[-4.26489],[-4.09764],[-3.93039],[-3.76314],[-3.59589],[-3.42864],[-3.26139],[-3.09414],[-2.92689],[-2.75964],[-2.59238],[-2.42513],[-2.25788],[-2.09063],[-1.92338],[-1.75613],[-1.58888],[-1.42163],[-1.25438],[-1.08713],[-0.919878],[-0.752628],[-0.585377],[-0.418127],[-0.250876],[-0.0836253],[0.0836253],[0.250876],[0.418127],[0.585377],[0.752628],[0.919878],[1.08713],[1.25438],[1.42163],[1.58888],[1.75613],[1.92338],[2.09063],[2.25788],[2.42513],[2.59238],[2.75964],[2.92689],[3.09414],[3.26139],[3.42864],[3.59589],[3.76314],[3.93039],[4.09764],[4.26489]] y=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=52 dimension=1 description=[t] data=[[-4.26489],[-4.09764],[-3.93039],[-3.76314],[-3.59589],[-3.42864],[-3.26139],[-3.09414],[-2.92689],[-2.75964],[-2.59238],[-2.42513],[-2.25788],[-2.09063],[-1.92338],[-1.75613],[-1.58888],[-1.42163],[-1.25438],[-1.08713],[-0.919878],[-0.752628],[-0.585377],[-0.418127],[-0.250876],[-0.0836253],[0.0836253],[0.250876],[0.418127],[0.585377],[0.752628],[0.919878],[1.08713],[1.25438],[1.42163],[1.58888],[1.75613],[1.92338],[2.09063],[2.25788],[2.42513],[2.59238],[2.75964],[2.92689],[3.09414],[3.26139],[3.42864],[3.59589],[3.76314],[3.93039],[4.09764],[4.26489]] levels=class=Point name=Unnamed dimension=1 values=[0] labels=[0.0] show labels=true isFilled=false colorBarPosition=right isVminUsed=false vmin=0 isVmaxUsed=false vmax=0 colorMap=hsv alpha=1 norm=linear extend=both hatches=[] derived from class=DrawableImplementation name=Unnamed legend= data=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=2704 dimension=1 description=[gsys] data=[[-13.6893],[-12.976],[-12.2627],...,[-12.2627],[-12.976],[-13.6893]] color=#1f77b4 isColorExplicitlySet=true fillStyle=solid lineStyle=solid pointStyle=plus lineWidth=1,class=Drawable name=In implementation=class=Cloud name=In derived from class=DrawableImplementation name=In legend=In data=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=42 dimension=2 data=[[-3.09292,-2.01757],[-1.27589,3.03909],[2.16755,2.13238],[0.983371,3.12819],[-1.85418,2.7321],[-0.0455248,3.11108],[-2.21846,-2.17965],[-2.82699,-1.772],[-2.28259,-3.7113],[0.272455,3.20339],[-0.794928,3.03409],[2.44718,1.83996],[2.28696,2.20469],[-0.698681,2.98226],[-0.00167198,3.61269],[-1.74756,2.87955],[-2.03012,-2.58123],[-3.78062,-1.71989],[2.18843,2.82046],[-3.02847,-1.61878],[-0.849186,3.02558],[0.130302,3.30776],[-2.52316,-1.98518],[3.01499,1.71614],[-2.32989,3.38728],[-2.15052,-2.11624],[0.0295931,3.02206],[1.25795,2.93152],[-2.44408,-2.33259],[-2.51539,-1.8491],[-1.32548,3.0584],[0.0565726,3.46062],[2.50773,2.02334],[2.17238,2.26588],[0.824487,3.51105],[-1.74516,2.9226],[-2.40767,-2.7838],[-2.13773,-2.36091],[-2.24882,-2.07209],[0.720497,3.00877],[0.530205,3.26717],[0.786335,3.37042]] color=lightsalmon3 isColorExplicitlySet=true fillStyle=solid lineStyle=solid pointStyle=fsquare lineWidth=1,class=Drawable name=Out implementation=class=Cloud name=Out derived from class=DrawableImplementation name=Out legend=Out data=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=9958 dimension=2 data=[[0.578628,-1.34237],[1.13419,-0.824176],[-0.869062,-0.620174],...,[-1.57582,-0.236957],[0.498649,-0.345989],[-1.15011,-0.203678]] color=darkseagreen3 isColorExplicitlySet=true fillStyle=solid lineStyle=solid pointStyle=fsquare lineWidth=1] + + + +.. GENERATED FROM PYTHON SOURCE LINES 101-104 + +.. code-block:: Python + + domain = drawEvent.fillEventCrossCut(bounds) + _ = otv.View(domain) + + + + +.. image-sg:: /auto_examples/reliability_problems/images/sphx_glr_plot_rp35_003.png + :alt: Domain where g(x) < 0.0 + :srcset: /auto_examples/reliability_problems/images/sphx_glr_plot_rp35_003.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 105-108 + +.. code-block:: Python + + domain.add(cloud) + _ = otv.View(domain) + + + + +.. image-sg:: /auto_examples/reliability_problems/images/sphx_glr_plot_rp35_004.png + :alt: Domain where g(x) < 0.0 + :srcset: /auto_examples/reliability_problems/images/sphx_glr_plot_rp35_004.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 109-110 + +.. code-block:: Python + + otv.View.ShowAll() + + + + + + + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 1.680 seconds) + + +.. _sphx_glr_download_auto_examples_reliability_problems_plot_rp35.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: plot_rp35.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: plot_rp35.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: plot_rp35.zip ` diff --git a/otbenchmark/master/_sources/auto_examples/reliability_problems/plot_rp53.rst b/otbenchmark/master/_sources/auto_examples/reliability_problems/plot_rp53.rst new file mode 100644 index 00000000000..9f5c0fc4398 --- /dev/null +++ b/otbenchmark/master/_sources/auto_examples/reliability_problems/plot_rp53.rst @@ -0,0 +1,342 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "auto_examples/reliability_problems/plot_rp53.py" +.. LINE NUMBERS ARE GIVEN BELOW. + +.. only:: html + + .. note:: + :class: sphx-glr-download-link-note + + :ref:`Go to the end ` + to download the full example code. + +.. rst-class:: sphx-glr-example-title + +.. _sphx_glr_auto_examples_reliability_problems_plot_rp53.py: + + +RP53 analysis and 2D graphics +============================= + +.. GENERATED FROM PYTHON SOURCE LINES 7-9 + +The objective of this example is to present problem 53 of the BBRC. +We also present graphic elements for the visualization of the limit state surface in 2 dimensions. + +.. GENERATED FROM PYTHON SOURCE LINES 11-16 + +.. code-block:: Python + + import openturns as ot + import openturns.viewer as otv + import otbenchmark as otb + + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 17-19 + +.. code-block:: Python + + problem = otb.ReliabilityProblem53() + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 20-23 + +.. code-block:: Python + + event = problem.getEvent() + g = event.getFunction() + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 24-26 + +.. code-block:: Python + + problem.getProbability() + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + 0.0313 + + + +.. GENERATED FROM PYTHON SOURCE LINES 27-28 + +Create the Monte-Carlo algorithm + +.. GENERATED FROM PYTHON SOURCE LINES 28-33 + +.. code-block:: Python + + algoProb = ot.ProbabilitySimulationAlgorithm(event) + algoProb.setMaximumOuterSampling(1000) + algoProb.setMaximumCoefficientOfVariation(0.01) + algoProb.run() + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 34-35 + +Get the results + +.. GENERATED FROM PYTHON SOURCE LINES 35-46 + +.. code-block:: Python + + resultAlgo = algoProb.getResult() + neval = g.getEvaluationCallsNumber() + print("Number of function calls = %d" % (neval)) + pf = resultAlgo.getProbabilityEstimate() + print("Failure Probability = %.4f" % (pf)) + level = 0.95 + c95 = resultAlgo.getConfidenceLength(level) + pmin = pf - 0.5 * c95 + pmax = pf + 0.5 * c95 + print("%.1f %% confidence interval :[%.4f,%.4f] " % (level * 100, pmin, pmax)) + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + Number of function calls = 1000 + Failure Probability = 0.0280 + 95.0 % confidence interval :[0.0178,0.0382] + + + + +.. GENERATED FROM PYTHON SOURCE LINES 47-57 + +.. code-block:: Python + + inputVector = event.getAntecedent() + distribution = inputVector.getDistribution() + X1 = distribution.getMarginal(0) + X2 = distribution.getMarginal(0) + alpha = 1 - 1.0e-4 + bounds, marginalProb = distribution.computeMinimumVolumeIntervalWithMarginalProbability( + alpha + ) + + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 58-60 + +.. code-block:: Python + + _ = otv.View(X1.drawPDF()) + + + + +.. image-sg:: /auto_examples/reliability_problems/images/sphx_glr_plot_rp53_001.png + :alt: plot rp53 + :srcset: /auto_examples/reliability_problems/images/sphx_glr_plot_rp53_001.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 61-63 + +Print the iso-values of the distribution +---------------------------------------- + +.. GENERATED FROM PYTHON SOURCE LINES 65-68 + +.. code-block:: Python + + _ = otv.View(distribution.drawPDF()) + + + + + +.. image-sg:: /auto_examples/reliability_problems/images/sphx_glr_plot_rp53_002.png + :alt: [X1,X2] iso-PDF + :srcset: /auto_examples/reliability_problems/images/sphx_glr_plot_rp53_002.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 69-73 + +.. code-block:: Python + + sampleSize = 5000 + drawEvent = otb.DrawEvent(event) + + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 74-77 + +.. code-block:: Python + + cloud = drawEvent.drawSampleCrossCut(sampleSize) + _ = otv.View(cloud) + + + + +.. image-sg:: /auto_examples/reliability_problems/images/sphx_glr_plot_rp53_003.png + :alt: Points X s.t. g(X) < 0.0 + :srcset: /auto_examples/reliability_problems/images/sphx_glr_plot_rp53_003.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 78-80 + +Draw the limit state surface +---------------------------- + +.. GENERATED FROM PYTHON SOURCE LINES 82-87 + +.. code-block:: Python + + graph = drawEvent.drawLimitStateCrossCut(bounds) + graph.add(cloud) + graph + + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + class=Graph name=Limit state surface implementation=class=GraphImplementation name=Limit state surface title=Limit state surface xTitle=x1 yTitle=x2 axes=ON grid=ON legendposition= legendFontSize=1 drawables=[class=Drawable name=Unnamed implementation=class=Contour name=Unnamed x=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=52 dimension=1 description=[t] data=[[-2.55562],[-2.39658],[-2.23753],[-2.07849],[-1.91945],[-1.7604],[-1.60136],[-1.44231],[-1.28327],[-1.12423],[-0.965181],[-0.806138],[-0.647094],[-0.48805],[-0.329006],[-0.169962],[-0.0109177],[0.148126],[0.30717],[0.466214],[0.625258],[0.784302],[0.943346],[1.10239],[1.26143],[1.42048],[1.57952],[1.73857],[1.89761],[2.05665],[2.2157],[2.37474],[2.53379],[2.69283],[2.85187],[3.01092],[3.16996],[3.32901],[3.48805],[3.64709],[3.80614],[3.96518],[4.12423],[4.28327],[4.44231],[4.60136],[4.7604],[4.91945],[5.07849],[5.23753],[5.39658],[5.55562]] y=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=52 dimension=1 description=[t] data=[[-1.55562],[-1.39658],[-1.23753],[-1.07849],[-0.919445],[-0.760401],[-0.601357],[-0.442313],[-0.283269],[-0.124225],[0.0348185],[0.193862],[0.352906],[0.51195],[0.670994],[0.830038],[0.989082],[1.14813],[1.30717],[1.46621],[1.62526],[1.7843],[1.94335],[2.10239],[2.26143],[2.42048],[2.57952],[2.73857],[2.89761],[3.05665],[3.2157],[3.37474],[3.53379],[3.69283],[3.85187],[4.01092],[4.16996],[4.32901],[4.48805],[4.64709],[4.80614],[4.96518],[5.12423],[5.28327],[5.44231],[5.60136],[5.7604],[5.91945],[6.07849],[6.23753],[6.39658],[6.55562]] levels=class=Point name=Unnamed dimension=1 values=[0] labels=[0.0] show labels=true isFilled=false colorBarPosition=right isVminUsed=false vmin=0 isVmaxUsed=false vmax=0 colorMap=hsv alpha=1 norm=linear extend=both hatches=[] derived from class=DrawableImplementation name=Unnamed legend= data=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=2704 dimension=1 description=[y0] data=[[3.24002],[3.53267],[3.7869],...,[-6.2278],[-6.40229],[-6.71544]] color=#1f77b4 isColorExplicitlySet=true fillStyle=solid lineStyle=solid pointStyle=plus lineWidth=1,class=Drawable name=In implementation=class=Cloud name=In derived from class=DrawableImplementation name=In legend=In data=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=157 dimension=2 data=[[1.81743,3.87483],[1.75608,4.12538],[1.74131,4.11419],[1.95455,3.68208],[2.09455,4.2206],[1.86453,3.99757],[1.89634,3.68961],[1.88845,3.74845],[2.40327,4.77522],[1.76872,4.28131],[2.08997,3.93034],[1.97516,3.72885],[2.08355,4.23936],[1.62469,4.64448],[2.03869,4.13083],[1.89358,3.80019],[1.93552,3.60695],[2.0052,3.61016],[2.02739,4.18276],[2.12339,3.80077],[1.97915,3.72173],[1.77578,3.91802],[4.01312,3.20266],[2.23736,4.13514],[1.85226,4.27454],[1.52071,5.49664],[3.45283,4.46156],[4.38249,2.02716],[1.96507,3.65992],[1.67939,5.20169],[3.69752,3.54822],[1.98418,4.18815],[2.05311,3.77574],[2.17374,5.23856],[4.39181,2.69166],[1.99447,4.43024],[2.31587,4.50532],[4.12858,2.92604],[1.83536,3.89734],[1.90521,4.52534],[1.93875,4.31028],[2.14442,3.92582],[4.6594,4.61892],[2.26924,4.16848],[1.95023,3.73793],[1.87581,3.80662],[1.76514,4.97128],[2.22303,4.53389],[2.08736,5.22768],[3.9837,2.94672],[1.75874,4.11277],[1.90658,3.95664],[3.93468,3.76671],[1.91355,4.3162],[1.73656,4.62676],[2.04966,3.77582],[4.06153,2.99404],[1.85787,3.79925],[3.9668,3.57586],[1.74533,4.61946],[1.88917,3.7556],[1.92338,3.99228],[3.9554,3.35163],[4.3718,3.74542],[4.51619,3.32563],[1.82443,3.91636],[3.7452,4.23174],[2.14206,3.80414],[1.74487,4.22914],[2.00153,4.6939],[3.58587,4.2527],[2.03426,3.9416],[2.02164,4.35293],[2.15291,3.88556],[2.09161,4.5208],[4.15903,2.57774],[2.02716,4.10576],[2.06593,4.27596],[1.98504,4.35804],[1.6599,5.20614],[3.55331,4.53257],[2.1595,5.1943],[1.9567,4.13467],[3.77977,3.19613],[3.92426,3.09671],[1.82256,4.93183],[3.69928,3.76031],[1.98932,5.5019],[3.74729,3.75099],[1.94925,4.03651],[2.16835,3.86369],[2.1798,4.00998],[1.81269,4.29334],[2.13131,4.02678],[1.83852,3.74919],[2.11621,3.88332],[1.81558,4.00912],[1.99256,4.32307],[1.66707,4.52886],[1.96266,4.39922],[3.97225,3.38492],[1.65223,5.06795],[4.29057,4.75009],[2.20411,4.14333],[2.17586,4.40367],[3.90231,3.60225],[3.92909,3.8869],[1.70315,4.81818],[2.24425,4.09978],[1.90814,3.63785],[3.47425,4.59311],[3.73113,3.55807],[1.91698,3.77111],[1.81938,3.84056],[1.76361,4.15872],[1.87965,4.78159],[2.09657,3.97079],[1.95035,3.62374],[2.00272,3.78734],[1.81893,4.39918],[2.38622,5.27566],[3.80242,3.31876],[1.81735,4.26504],[1.98203,4.37816],[4.0835,3.15604],[2.11292,3.96548],[1.80881,4.46105],[1.78193,3.99837],[4.27866,3.65668],[2.01838,3.70152],[2.0522,5.91617],[2.0571,4.17637],[4.37215,2.3797],[4.3756,2.8619],[1.9237,3.62198],[1.91684,4.18848],[2.24574,4.38093],[4.08802,2.56542],[1.89337,3.97565],[2.34922,4.3789],[1.84492,4.01561],[2.01531,4.67593],[1.59523,5.2275],[2.10014,3.96242],[2.08421,4.69198],[1.51404,6.09305],[4.06521,2.31225],[2.20556,4.17818],[4.30611,2.48487],[2.00192,3.85128],[2.03614,4.07442],[1.80466,4.02198],[1.91203,4.12527],[1.80386,4.04376],[1.91082,4.02008],[2.40305,5.29279],[1.88667,3.98411]] color=lightsalmon3 isColorExplicitlySet=true fillStyle=solid lineStyle=solid pointStyle=fsquare lineWidth=1,class=Drawable name=Out implementation=class=Cloud name=Out derived from class=DrawableImplementation name=Out legend=Out data=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=4843 dimension=2 data=[[2.00388,1.72029],[2.65555,3.35714],[1.04485,0.644341],...,[0.454129,2.46771],[3.02361,2.97294],[0.380889,2.30563]] color=darkseagreen3 isColorExplicitlySet=true fillStyle=solid lineStyle=solid pointStyle=fsquare lineWidth=1] + + + +.. GENERATED FROM PYTHON SOURCE LINES 88-92 + +.. code-block:: Python + + domain = drawEvent.fillEventCrossCut(bounds) + _ = otv.View(domain) + + + + + +.. image-sg:: /auto_examples/reliability_problems/images/sphx_glr_plot_rp53_004.png + :alt: Domain where g(x) < 0.0 + :srcset: /auto_examples/reliability_problems/images/sphx_glr_plot_rp53_004.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 93-96 + +.. code-block:: Python + + domain.add(cloud) + _ = otv.View(domain) + + + + +.. image-sg:: /auto_examples/reliability_problems/images/sphx_glr_plot_rp53_005.png + :alt: Domain where g(x) < 0.0 + :srcset: /auto_examples/reliability_problems/images/sphx_glr_plot_rp53_005.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 97-98 + +.. code-block:: Python + + otv.View.ShowAll() + + + + + + + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 2.872 seconds) + + +.. _sphx_glr_download_auto_examples_reliability_problems_plot_rp53.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: plot_rp53.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: plot_rp53.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: plot_rp53.zip ` diff --git a/otbenchmark/master/_sources/auto_examples/reliability_problems/plot_rp55.rst b/otbenchmark/master/_sources/auto_examples/reliability_problems/plot_rp55.rst new file mode 100644 index 00000000000..1104a30b23e --- /dev/null +++ b/otbenchmark/master/_sources/auto_examples/reliability_problems/plot_rp55.rst @@ -0,0 +1,547 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "auto_examples/reliability_problems/plot_rp55.py" +.. LINE NUMBERS ARE GIVEN BELOW. + +.. only:: html + + .. note:: + :class: sphx-glr-download-link-note + + :ref:`Go to the end ` + to download the full example code. + +.. rst-class:: sphx-glr-example-title + +.. _sphx_glr_auto_examples_reliability_problems_plot_rp55.py: + + +RP55 analysis and 2D graphics +============================= + +.. GENERATED FROM PYTHON SOURCE LINES 7-17 + +The objective of this example is to present problem 55 of the BBRC. +We also present graphic elements for the visualization of the limit state surface in 2 dimensions. + +The dimension is equal to 2 and the probability is close to $10^{-2}$. +This makes this problem relatively easy to solve. +The distribution is uniform in the square $[-1,1]^2$. +The failure domain is made of 5 diagonal bands. +Capturing these bands is relatively easy and a Monte-Carlo simulation perform well in this case. +The FORM method cannot perform correctly, since the failure domain cannot be linearized in the gaussian space. +Hence, the SORM or FORM-IS methods do not perform satisfactorily. + +.. GENERATED FROM PYTHON SOURCE LINES 19-23 + +.. code-block:: Python + + import openturns as ot + import otbenchmark as otb + import openturns.viewer as otv + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 24-25 + +Disable warnings + +.. GENERATED FROM PYTHON SOURCE LINES 25-27 + +.. code-block:: Python + + ot.Log.Show(ot.Log.NONE) + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 28-31 + +.. code-block:: Python + + problem = otb.ReliabilityProblem55() + print(problem) + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + name = RP55 + event = class=ThresholdEventImplementation antecedent=class=CompositeRandomVector function=class=Function name=Unnamed implementation=class=FunctionImplementation name=Unnamed description=[x1,x2,gsys] evaluationImplementation=class=SymbolicEvaluation name=Unnamed inputVariablesNames=[x1,x2] outputVariablesNames=[gsys] formulas=[var g1 := 0.2 + 0.6 * (x1 - x2)^4 - (x1 - x2) / sqrt(2);var g2 := 0.2 + 0.6 * (x1 - x2)^4 + (x1 - x2) / sqrt(2);var g3 := (x1 - x2) + 5 / sqrt(2) - 2.2;var g4 := (x2 - x1) + 5 / sqrt(2) - 2.2;gsys := min(g1, g2, g3, g4)] gradientImplementation=class=SymbolicGradient name=Unnamed evaluation=class=SymbolicEvaluation name=Unnamed inputVariablesNames=[x1,x2] outputVariablesNames=[gsys] formulas=[var g1 := 0.2 + 0.6 * (x1 - x2)^4 - (x1 - x2) / sqrt(2);var g2 := 0.2 + 0.6 * (x1 - x2)^4 + (x1 - x2) / sqrt(2);var g3 := (x1 - x2) + 5 / sqrt(2) - 2.2;var g4 := (x2 - x1) + 5 / sqrt(2) - 2.2;gsys := min(g1, g2, g3, g4)] hessianImplementation=class=SymbolicHessian name=Unnamed evaluation=class=SymbolicEvaluation name=Unnamed inputVariablesNames=[x1,x2] outputVariablesNames=[gsys] formulas=[var g1 := 0.2 + 0.6 * (x1 - x2)^4 - (x1 - x2) / sqrt(2);var g2 := 0.2 + 0.6 * (x1 - x2)^4 + (x1 - x2) / sqrt(2);var g3 := (x1 - x2) + 5 / sqrt(2) - 2.2;var g4 := (x2 - x1) + 5 / sqrt(2) - 2.2;gsys := min(g1, g2, g3, g4)] antecedent=class=UsualRandomVector distribution=class=JointDistribution name=JointDistribution dimension=2 copula=class=IndependentCopula name=IndependentCopula dimension=2 marginal[0]=class=Uniform name=Uniform dimension=1 a=-1 b=1 marginal[1]=class=Uniform name=Uniform dimension=1 a=-1 b=1 operator=class=Less name=Unnamed threshold=0 + probability = 0.5600144282863704 + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 32-35 + +.. code-block:: Python + + event = problem.getEvent() + g = event.getFunction() + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 36-38 + +.. code-block:: Python + + problem.getProbability() + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + 0.5600144282863704 + + + +.. GENERATED FROM PYTHON SOURCE LINES 39-41 + +Compute the bounds of the domain +-------------------------------- + +.. GENERATED FROM PYTHON SOURCE LINES 43-57 + +.. code-block:: Python + + inputVector = event.getAntecedent() + distribution = inputVector.getDistribution() + X1 = distribution.getMarginal(0) + X2 = distribution.getMarginal(1) + alphaMin = 0.00001 + alphaMax = 1 - alphaMin + lowerBound = ot.Point( + [X1.computeQuantile(alphaMin)[0], X2.computeQuantile(alphaMin)[0]] + ) + upperBound = ot.Point( + [X1.computeQuantile(alphaMax)[0], X2.computeQuantile(alphaMax)[0]] + ) + + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 58-63 + +.. code-block:: Python + + nbPoints = [100, 100] + figure = g.draw(lowerBound, upperBound, nbPoints) + figure.setTitle(" Iso-values of limit state function") + figure + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + class=Graph name=gsys as a function of (x1,x2) implementation=class=GraphImplementation name=gsys as a function of (x1,x2) title= Iso-values of limit state function xTitle=x1 yTitle=x2 axes=ON grid=ON legendposition=upper left legendFontSize=1 drawables=[class=Drawable name=Unnamed implementation=class=Contour name=Unnamed x=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=100 dimension=1 data=[[-0.99998],[-0.979778],[-0.959577],[-0.939375],[-0.919174],[-0.898972],[-0.87877],[-0.858569],[-0.838367],[-0.818165],[-0.797964],[-0.777762],[-0.757561],[-0.737359],[-0.717157],[-0.696956],[-0.676754],[-0.656553],[-0.636351],[-0.616149],[-0.595948],[-0.575746],[-0.555544],[-0.535343],[-0.515141],[-0.49494],[-0.474738],[-0.454536],[-0.434335],[-0.414133],[-0.393932],[-0.37373],[-0.353528],[-0.333327],[-0.313125],[-0.292923],[-0.272722],[-0.25252],[-0.232319],[-0.212117],[-0.191915],[-0.171714],[-0.151512],[-0.131311],[-0.111109],[-0.0909073],[-0.0707057],[-0.050504],[-0.0303024],[-0.0101008],[0.0101008],[0.0303024],[0.050504],[0.0707057],[0.0909073],[0.111109],[0.131311],[0.151512],[0.171714],[0.191915],[0.212117],[0.232319],[0.25252],[0.272722],[0.292923],[0.313125],[0.333327],[0.353528],[0.37373],[0.393932],[0.414133],[0.434335],[0.454536],[0.474738],[0.49494],[0.515141],[0.535343],[0.555544],[0.575746],[0.595948],[0.616149],[0.636351],[0.656553],[0.676754],[0.696956],[0.717157],[0.737359],[0.757561],[0.777762],[0.797964],[0.818165],[0.838367],[0.858569],[0.87877],[0.898972],[0.919174],[0.939375],[0.959577],[0.979778],[0.99998]] y=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=100 dimension=1 data=[[-0.99998],[-0.979778],[-0.959577],[-0.939375],[-0.919174],[-0.898972],[-0.87877],[-0.858569],[-0.838367],[-0.818165],[-0.797964],[-0.777762],[-0.757561],[-0.737359],[-0.717157],[-0.696956],[-0.676754],[-0.656553],[-0.636351],[-0.616149],[-0.595948],[-0.575746],[-0.555544],[-0.535343],[-0.515141],[-0.49494],[-0.474738],[-0.454536],[-0.434335],[-0.414133],[-0.393932],[-0.37373],[-0.353528],[-0.333327],[-0.313125],[-0.292923],[-0.272722],[-0.25252],[-0.232319],[-0.212117],[-0.191915],[-0.171714],[-0.151512],[-0.131311],[-0.111109],[-0.0909073],[-0.0707057],[-0.050504],[-0.0303024],[-0.0101008],[0.0101008],[0.0303024],[0.050504],[0.0707057],[0.0909073],[0.111109],[0.131311],[0.151512],[0.171714],[0.191915],[0.212117],[0.232319],[0.25252],[0.272722],[0.292923],[0.313125],[0.333327],[0.353528],[0.37373],[0.393932],[0.414133],[0.434335],[0.454536],[0.474738],[0.49494],[0.515141],[0.535343],[0.555544],[0.575746],[0.595948],[0.616149],[0.636351],[0.656553],[0.676754],[0.696956],[0.717157],[0.737359],[0.757561],[0.777762],[0.797964],[0.818165],[0.838367],[0.858569],[0.87877],[0.898972],[0.919174],[0.939375],[0.959577],[0.979778],[0.99998]] levels=class=Point name=Unnamed dimension=10 values=[-0.240192,-0.147598,-0.125737,-0.0908542,-0.0539797,-0.00921154,0.0443314,0.100247,0.142887,0.187845] labels=[-0.240192,-0.147598,-0.125737,-0.0908542,-0.0539797,-0.00921154,0.0443314,0.100247,0.142887,0.187845] show labels=false isFilled=false colorBarPosition=right isVminUsed=false vmin=0 isVmaxUsed=false vmax=0 colorMap=hsv alpha=1 norm=linear extend=both hatches=[] derived from class=DrawableImplementation name=Unnamed legend= data=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=10000 dimension=1 description=[gsys] data=[[0.2],[0.185715],[0.171432],...,[0.171432],[0.185715],[0.2]] color=#1f77b4 isColorExplicitlySet=true fillStyle=solid lineStyle=solid pointStyle=plus lineWidth=1] + + + +.. GENERATED FROM PYTHON SOURCE LINES 64-66 + +Print the iso-values of the distribution +---------------------------------------- + +.. GENERATED FROM PYTHON SOURCE LINES 68-71 + +.. code-block:: Python + + _ = otv.View(distribution.drawPDF()) + + + + + +.. image-sg:: /auto_examples/reliability_problems/images/sphx_glr_plot_rp55_001.png + :alt: [X1,X2] iso-PDF + :srcset: /auto_examples/reliability_problems/images/sphx_glr_plot_rp55_001.png + :class: sphx-glr-single-img + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + /opt/hostedtoolcache/Python/3.9.20/x64/lib/python3.9/site-packages/openturns/viewer.py:679: UserWarning: No contour levels were found within the data range. + contourset = self._ax[0].contour(X, Y, Z, **contour_kw) + + + + +.. GENERATED FROM PYTHON SOURCE LINES 72-78 + +.. code-block:: Python + + sampleSize = 5000 + sampleInput = inputVector.getSample(sampleSize) + sampleOutput = g(sampleInput) + drawEvent = otb.DrawEvent(event) + + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 79-82 + +.. code-block:: Python + + cloud = drawEvent.drawSampleCrossCut(sampleSize) + cloud + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + class=Graph name=Points X s.t. g(X) < 0.0 implementation=class=GraphImplementation name=Points X s.t. g(X) < 0.0 title=Points X s.t. g(X) < 0.0 xTitle=x1 yTitle=x2 axes=ON grid=ON legendposition=topright legendFontSize=1 drawables=[class=Drawable name=In implementation=class=Cloud name=In derived from class=DrawableImplementation name=In legend=In data=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=2748 dimension=2 data=[[0.46739,-0.40988],[0.194657,-0.704384],[-0.728671,-0.170987],...,[0.491564,0.989857],[-0.783436,0.65081],[-0.433348,0.502216]] color=lightsalmon3 isColorExplicitlySet=true fillStyle=solid lineStyle=solid pointStyle=fsquare lineWidth=1,class=Drawable name=Out implementation=class=Cloud name=Out derived from class=DrawableImplementation name=Out legend=Out data=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=2252 dimension=2 data=[[-0.244978,-0.30424],[0.785526,0.822337],[0.398177,0.686246],...,[-0.816386,-0.648148],[-0.864446,0.0840484],[-0.206094,-0.379788]] color=darkseagreen3 isColorExplicitlySet=true fillStyle=solid lineStyle=solid pointStyle=fsquare lineWidth=1] + + + +.. GENERATED FROM PYTHON SOURCE LINES 83-84 + +## Draw the limit state surface + +.. GENERATED FROM PYTHON SOURCE LINES 86-90 + +.. code-block:: Python + + bounds = ot.Interval(lowerBound, upperBound) + bounds + + + + + + + +.. raw:: html + +
+ class=Interval name=Unnamed dimension=2 lower bound=class=Point name=Unnamed dimension=2 values=[-0.99998,-0.99998] upper bound=class=Point name=Unnamed dimension=2 values=[0.99998,0.99998] finite lower bound=[1,1] finite upper bound=[1,1] +
+
+
+ +.. GENERATED FROM PYTHON SOURCE LINES 91-96 + +.. code-block:: Python + + graph = drawEvent.drawLimitStateCrossCut(bounds) + graph.add(cloud) + graph + + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + class=Graph name=Limit state surface implementation=class=GraphImplementation name=Limit state surface title=Limit state surface xTitle=x1 yTitle=x2 axes=ON grid=ON legendposition= legendFontSize=1 drawables=[class=Drawable name=Unnamed implementation=class=Contour name=Unnamed x=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=52 dimension=1 description=[t] data=[[-0.99998],[-0.960765],[-0.92155],[-0.882335],[-0.84312],[-0.803905],[-0.764691],[-0.725476],[-0.686261],[-0.647046],[-0.607831],[-0.568616],[-0.529401],[-0.490186],[-0.450971],[-0.411756],[-0.372542],[-0.333327],[-0.294112],[-0.254897],[-0.215682],[-0.176467],[-0.137252],[-0.0980373],[-0.0588224],[-0.0196075],[0.0196075],[0.0588224],[0.0980373],[0.137252],[0.176467],[0.215682],[0.254897],[0.294112],[0.333327],[0.372542],[0.411756],[0.450971],[0.490186],[0.529401],[0.568616],[0.607831],[0.647046],[0.686261],[0.725476],[0.764691],[0.803905],[0.84312],[0.882335],[0.92155],[0.960765],[0.99998]] y=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=52 dimension=1 description=[t] data=[[-0.99998],[-0.960765],[-0.92155],[-0.882335],[-0.84312],[-0.803905],[-0.764691],[-0.725476],[-0.686261],[-0.647046],[-0.607831],[-0.568616],[-0.529401],[-0.490186],[-0.450971],[-0.411756],[-0.372542],[-0.333327],[-0.294112],[-0.254897],[-0.215682],[-0.176467],[-0.137252],[-0.0980373],[-0.0588224],[-0.0196075],[0.0196075],[0.0588224],[0.0980373],[0.137252],[0.176467],[0.215682],[0.254897],[0.294112],[0.333327],[0.372542],[0.411756],[0.450971],[0.490186],[0.529401],[0.568616],[0.607831],[0.647046],[0.686261],[0.725476],[0.764691],[0.803905],[0.84312],[0.882335],[0.92155],[0.960765],[0.99998]] levels=class=Point name=Unnamed dimension=1 values=[0] labels=[0.0] show labels=true isFilled=false colorBarPosition=right isVminUsed=false vmin=0 isVmaxUsed=false vmax=0 colorMap=hsv alpha=1 norm=linear extend=both hatches=[] derived from class=DrawableImplementation name=Unnamed legend= data=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=2704 dimension=1 description=[gsys] data=[[0.2],[0.172272],[0.144564],...,[0.144564],[0.172272],[0.2]] color=#1f77b4 isColorExplicitlySet=true fillStyle=solid lineStyle=solid pointStyle=plus lineWidth=1,class=Drawable name=In implementation=class=Cloud name=In derived from class=DrawableImplementation name=In legend=In data=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=2748 dimension=2 data=[[0.46739,-0.40988],[0.194657,-0.704384],[-0.728671,-0.170987],...,[0.491564,0.989857],[-0.783436,0.65081],[-0.433348,0.502216]] color=lightsalmon3 isColorExplicitlySet=true fillStyle=solid lineStyle=solid pointStyle=fsquare lineWidth=1,class=Drawable name=Out implementation=class=Cloud name=Out derived from class=DrawableImplementation name=Out legend=Out data=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=2252 dimension=2 data=[[-0.244978,-0.30424],[0.785526,0.822337],[0.398177,0.686246],...,[-0.816386,-0.648148],[-0.864446,0.0840484],[-0.206094,-0.379788]] color=darkseagreen3 isColorExplicitlySet=true fillStyle=solid lineStyle=solid pointStyle=fsquare lineWidth=1] + + + +.. GENERATED FROM PYTHON SOURCE LINES 97-101 + +.. code-block:: Python + + domain = drawEvent.fillEventCrossCut(bounds) + _ = otv.View(domain) + + + + + +.. image-sg:: /auto_examples/reliability_problems/images/sphx_glr_plot_rp55_002.png + :alt: Domain where g(x) < 0.0 + :srcset: /auto_examples/reliability_problems/images/sphx_glr_plot_rp55_002.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 102-105 + +.. code-block:: Python + + domain.add(cloud) + _ = otv.View(domain) + + + + +.. image-sg:: /auto_examples/reliability_problems/images/sphx_glr_plot_rp55_003.png + :alt: Domain where g(x) < 0.0 + :srcset: /auto_examples/reliability_problems/images/sphx_glr_plot_rp55_003.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 106-108 + +Perform Monte-Carlo simulation +------------------------------ + +.. GENERATED FROM PYTHON SOURCE LINES 110-116 + +.. code-block:: Python + + algoProb = ot.ProbabilitySimulationAlgorithm(event) + algoProb.setMaximumOuterSampling(1000) + algoProb.setMaximumCoefficientOfVariation(0.01) + algoProb.run() + + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 117-128 + +.. code-block:: Python + + resultAlgo = algoProb.getResult() + neval = g.getEvaluationCallsNumber() + print("Number of function calls = %d" % (neval)) + pf = resultAlgo.getProbabilityEstimate() + print("Failure Probability = %.4f" % (pf)) + level = 0.95 + c95 = resultAlgo.getConfidenceLength(level) + pmin = pf - 0.5 * c95 + pmax = pf + 0.5 * c95 + print("%.1f %% confidence interval :[%.4f,%.4f] " % (level * 100, pmin, pmax)) + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + Number of function calls = 43704 + Failure Probability = 0.5370 + 95.0 % confidence interval :[0.5061,0.5679] + + + + +.. GENERATED FROM PYTHON SOURCE LINES 129-131 + +With FORM-IS +------------ + +.. GENERATED FROM PYTHON SOURCE LINES 133-146 + +.. code-block:: Python + + maximumEvaluationNumber = 1000 + maximumAbsoluteError = 1.0e-3 + maximumRelativeError = 1.0e-3 + maximumResidualError = 1.0e-3 + maximumConstraintError = 1.0e-3 + nearestPointAlgorithm = ot.AbdoRackwitz() + nearestPointAlgorithm.setMaximumCallsNumber(maximumEvaluationNumber) + nearestPointAlgorithm.setMaximumAbsoluteError(maximumAbsoluteError) + nearestPointAlgorithm.setMaximumRelativeError(maximumRelativeError) + nearestPointAlgorithm.setMaximumResidualError(maximumResidualError) + nearestPointAlgorithm.setMaximumConstraintError(maximumConstraintError) + + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 147-153 + +.. code-block:: Python + + metaAlgorithm = otb.ReliabilityBenchmarkMetaAlgorithm(problem) + benchmarkResult = metaAlgorithm.runFORMImportanceSampling( + nearestPointAlgorithm, maximumOuterSampling=10 ** 5, coefficientOfVariation=0.0 + ) + + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 154-156 + +.. code-block:: Python + + print(benchmarkResult.summary()) + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + computedProbability = 0.0 + exactProbability = 0.5600144282863704 + absoluteError = 0.5600144282863704 + numberOfCorrectDigits = 0.0 + numberOfFunctionEvaluations = 1006 + numberOfDigitsPerEvaluation = 0.0 + + + + +.. GENERATED FROM PYTHON SOURCE LINES 157-159 + +With Quasi-Monte-Carlo +---------------------- + +.. GENERATED FROM PYTHON SOURCE LINES 161-166 + +.. code-block:: Python + + sequence = ot.SobolSequence() + experiment = ot.LowDiscrepancyExperiment(sequence, 1) + experiment.setRandomize(False) + + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 167-174 + +.. code-block:: Python + + algo = ot.ProbabilitySimulationAlgorithm(event, experiment) + algo.setMaximumOuterSampling(10 ** 3) + algo.setMaximumCoefficientOfVariation(0.0) + algo.setBlockSize(10 ** 3) + algo.run() + + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 175-179 + +.. code-block:: Python + + result = algo.getResult() + probability = result.getProbabilityEstimate() + print("Pf=", probability) + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + Pf= 0.5593869999999994 + + + + +.. GENERATED FROM PYTHON SOURCE LINES 180-181 + +.. code-block:: Python + + otv.View.ShowAll() + + + + + + + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 1.906 seconds) + + +.. _sphx_glr_download_auto_examples_reliability_problems_plot_rp55.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: plot_rp55.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: plot_rp55.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: plot_rp55.zip ` diff --git a/otbenchmark/master/_sources/auto_examples/reliability_problems/plot_rp57.rst b/otbenchmark/master/_sources/auto_examples/reliability_problems/plot_rp57.rst new file mode 100644 index 00000000000..146cd859c61 --- /dev/null +++ b/otbenchmark/master/_sources/auto_examples/reliability_problems/plot_rp57.rst @@ -0,0 +1,377 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "auto_examples/reliability_problems/plot_rp57.py" +.. LINE NUMBERS ARE GIVEN BELOW. + +.. only:: html + + .. note:: + :class: sphx-glr-download-link-note + + :ref:`Go to the end ` + to download the full example code. + +.. rst-class:: sphx-glr-example-title + +.. _sphx_glr_auto_examples_reliability_problems_plot_rp57.py: + + +RP57 analysis and 2D graphics +============================= + +.. GENERATED FROM PYTHON SOURCE LINES 7-9 + +The objective of this example is to present problem 57 of the BBRC. +We also present graphic elements for the visualization of the limit state surface in 2 dimensions. + +.. GENERATED FROM PYTHON SOURCE LINES 11-15 + +.. code-block:: Python + + import openturns as ot + import openturns.viewer as otv + import otbenchmark as otb + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 16-19 + +.. code-block:: Python + + problem = otb.ReliabilityProblem57() + print(problem) + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + name = RP57 + event = class=ThresholdEventImplementation antecedent=class=CompositeRandomVector function=class=Function name=Unnamed implementation=class=FunctionImplementation name=Unnamed description=[x1,x2,gsys] evaluationImplementation=class=SymbolicEvaluation name=Unnamed inputVariablesNames=[x1,x2] outputVariablesNames=[gsys] formulas=[var g1 := -x1^2 + x2^3 + 3;var g2 := 2 - x1 - 8 * x2;var g3 := (x1 + 3)^2 + (x2 + 3)^2 - 4;gsys := min(max(g1, g2), g3) ] gradientImplementation=class=SymbolicGradient name=Unnamed evaluation=class=SymbolicEvaluation name=Unnamed inputVariablesNames=[x1,x2] outputVariablesNames=[gsys] formulas=[var g1 := -x1^2 + x2^3 + 3;var g2 := 2 - x1 - 8 * x2;var g3 := (x1 + 3)^2 + (x2 + 3)^2 - 4;gsys := min(max(g1, g2), g3) ] hessianImplementation=class=SymbolicHessian name=Unnamed evaluation=class=SymbolicEvaluation name=Unnamed inputVariablesNames=[x1,x2] outputVariablesNames=[gsys] formulas=[var g1 := -x1^2 + x2^3 + 3;var g2 := 2 - x1 - 8 * x2;var g3 := (x1 + 3)^2 + (x2 + 3)^2 - 4;gsys := min(max(g1, g2), g3) ] 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=[0] 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=[0] 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.0284 + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 20-23 + +.. code-block:: Python + + event = problem.getEvent() + g = event.getFunction() + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 24-26 + +.. code-block:: Python + + problem.getProbability() + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + 0.0284 + + + +.. GENERATED FROM PYTHON SOURCE LINES 27-28 + +Create the Monte-Carlo algorithm + +.. GENERATED FROM PYTHON SOURCE LINES 28-33 + +.. code-block:: Python + + algoProb = ot.ProbabilitySimulationAlgorithm(event) + algoProb.setMaximumOuterSampling(1000) + algoProb.setMaximumCoefficientOfVariation(0.01) + algoProb.run() + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 34-35 + +Get the results + +.. GENERATED FROM PYTHON SOURCE LINES 35-46 + +.. code-block:: Python + + resultAlgo = algoProb.getResult() + neval = g.getEvaluationCallsNumber() + print("Number of function calls = %d" % (neval)) + pf = resultAlgo.getProbabilityEstimate() + print("Failure Probability = %.4f" % (pf)) + level = 0.95 + c95 = resultAlgo.getConfidenceLength(level) + pmin = pf - 0.5 * c95 + pmax = pf + 0.5 * c95 + print("%.1f %% confidence interval :[%.4f,%.4f] " % (level * 100, pmin, pmax)) + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + Number of function calls = 1000 + Failure Probability = 0.0240 + 95.0 % confidence interval :[0.0145,0.0335] + + + + +.. GENERATED FROM PYTHON SOURCE LINES 47-48 + +Compute the bounds of the domain + +.. GENERATED FROM PYTHON SOURCE LINES 48-61 + +.. code-block:: Python + + inputVector = event.getAntecedent() + distribution = inputVector.getDistribution() + X1 = distribution.getMarginal(0) + X2 = distribution.getMarginal(1) + alphaMin = 0.00001 + alphaMax = 1 - alphaMin + lowerBound = ot.Point( + [X1.computeQuantile(alphaMin)[0], X2.computeQuantile(alphaMin)[0]] + ) + upperBound = ot.Point( + [X1.computeQuantile(alphaMax)[0], X2.computeQuantile(alphaMax)[0]] + ) + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 62-67 + +.. code-block:: Python + + nbPoints = [100, 100] + graph = g.draw(lowerBound, upperBound, nbPoints) + graph.setTitle("Iso-values of limit state function") + _ = otv.View(graph) + + + + +.. image-sg:: /auto_examples/reliability_problems/images/sphx_glr_plot_rp57_001.png + :alt: Iso-values of limit state function + :srcset: /auto_examples/reliability_problems/images/sphx_glr_plot_rp57_001.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 68-69 + +Print the iso-values of the distribution + +.. GENERATED FROM PYTHON SOURCE LINES 69-71 + +.. code-block:: Python + + distribution.drawPDF() + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + class=Graph name=pdf as a function of (X1,X2) implementation=class=GraphImplementation name=pdf as a function of (X1,X2) title=[X1,X2] iso-PDF xTitle=X1 yTitle=X2 axes=ON grid=ON legendposition=upper left legendFontSize=1 drawables=[class=Drawable name=Unnamed implementation=class=Contour name=Unnamed x=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=129 dimension=1 data=[[-3.73116],[-3.67286],[-3.61456],[-3.55626],[-3.49796],[-3.43966],[-3.38136],[-3.32306],[-3.26477],[-3.20647],[-3.14817],[-3.08987],[-3.03157],[-2.97327],[-2.91497],[-2.85667],[-2.79837],[-2.74007],[-2.68177],[-2.62347],[-2.56517],[-2.50687],[-2.44857],[-2.39027],[-2.33198],[-2.27368],[-2.21538],[-2.15708],[-2.09878],[-2.04048],[-1.98218],[-1.92388],[-1.86558],[-1.80728],[-1.74898],[-1.69068],[-1.63238],[-1.57408],[-1.51578],[-1.45748],[-1.39919],[-1.34089],[-1.28259],[-1.22429],[-1.16599],[-1.10769],[-1.04939],[-0.991089],[-0.93279],[-0.874491],[-0.816191],[-0.757892],[-0.699593],[-0.641293],[-0.582994],[-0.524694],[-0.466395],[-0.408096],[-0.349796],[-0.291497],[-0.233198],[-0.174898],[-0.116599],[-0.0582994],[0],[0.0582994],[0.116599],[0.174898],[0.233198],[0.291497],[0.349796],[0.408096],[0.466395],[0.524694],[0.582994],[0.641293],[0.699593],[0.757892],[0.816191],[0.874491],[0.93279],[0.991089],[1.04939],[1.10769],[1.16599],[1.22429],[1.28259],[1.34089],[1.39919],[1.45748],[1.51578],[1.57408],[1.63238],[1.69068],[1.74898],[1.80728],[1.86558],[1.92388],[1.98218],[2.04048],[2.09878],[2.15708],[2.21538],[2.27368],[2.33198],[2.39027],[2.44857],[2.50687],[2.56517],[2.62347],[2.68177],[2.74007],[2.79837],[2.85667],[2.91497],[2.97327],[3.03157],[3.08987],[3.14817],[3.20647],[3.26477],[3.32306],[3.38136],[3.43966],[3.49796],[3.55626],[3.61456],[3.67286],[3.73116]] y=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=129 dimension=1 data=[[-3.73116],[-3.67286],[-3.61456],[-3.55626],[-3.49796],[-3.43966],[-3.38136],[-3.32306],[-3.26477],[-3.20647],[-3.14817],[-3.08987],[-3.03157],[-2.97327],[-2.91497],[-2.85667],[-2.79837],[-2.74007],[-2.68177],[-2.62347],[-2.56517],[-2.50687],[-2.44857],[-2.39027],[-2.33198],[-2.27368],[-2.21538],[-2.15708],[-2.09878],[-2.04048],[-1.98218],[-1.92388],[-1.86558],[-1.80728],[-1.74898],[-1.69068],[-1.63238],[-1.57408],[-1.51578],[-1.45748],[-1.39919],[-1.34089],[-1.28259],[-1.22429],[-1.16599],[-1.10769],[-1.04939],[-0.991089],[-0.93279],[-0.874491],[-0.816191],[-0.757892],[-0.699593],[-0.641293],[-0.582994],[-0.524694],[-0.466395],[-0.408096],[-0.349796],[-0.291497],[-0.233198],[-0.174898],[-0.116599],[-0.0582994],[0],[0.0582994],[0.116599],[0.174898],[0.233198],[0.291497],[0.349796],[0.408096],[0.466395],[0.524694],[0.582994],[0.641293],[0.699593],[0.757892],[0.816191],[0.874491],[0.93279],[0.991089],[1.04939],[1.10769],[1.16599],[1.22429],[1.28259],[1.34089],[1.39919],[1.45748],[1.51578],[1.57408],[1.63238],[1.69068],[1.74898],[1.80728],[1.86558],[1.92388],[1.98218],[2.04048],[2.09878],[2.15708],[2.21538],[2.27368],[2.33198],[2.39027],[2.44857],[2.50687],[2.56517],[2.62347],[2.68177],[2.74007],[2.79837],[2.85667],[2.91497],[2.97327],[3.03157],[3.08987],[3.14817],[3.20647],[3.26477],[3.32306],[3.38136],[3.43966],[3.49796],[3.55626],[3.61456],[3.67286],[3.73116]] levels=class=Point name=Unnamed dimension=10 values=[6.35446e-06,6.13238e-05,0.000186025,0.000456309,0.0011193,0.0027643,0.00682692,0.0168316,0.041287,0.101447] labels=[6.35446e-06,6.13238e-05,0.000186025,0.000456309,0.0011193,0.0027643,0.00682692,0.0168316,0.041287,0.101447] show labels=false isFilled=false colorBarPosition=right isVminUsed=false vmin=0 isVmaxUsed=false vmax=0 colorMap=hsv alpha=1 norm=linear extend=both hatches=[] derived from class=DrawableImplementation name=Unnamed legend= data=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=16641 dimension=1 data=[[1.43141e-07],[1.77622e-07],[2.19661e-07],...,[2.19661e-07],[1.77622e-07],[1.43141e-07]] color=#1f77b4 isColorExplicitlySet=true fillStyle=solid lineStyle=solid pointStyle=plus lineWidth=1] + + + +.. GENERATED FROM PYTHON SOURCE LINES 72-75 + +.. code-block:: Python + + sampleSize = 5000 + drawEvent = otb.DrawEvent(event) + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 76-79 + +.. code-block:: Python + + cloud = drawEvent.drawSampleCrossCut(sampleSize) + _ = otv.View(cloud) + + + + +.. image-sg:: /auto_examples/reliability_problems/images/sphx_glr_plot_rp57_002.png + :alt: Points X s.t. g(X) < 0.0 + :srcset: /auto_examples/reliability_problems/images/sphx_glr_plot_rp57_002.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 80-82 + +Draw the limit state surface +---------------------------- + +.. GENERATED FROM PYTHON SOURCE LINES 84-87 + +.. code-block:: Python + + bounds = ot.Interval(lowerBound, upperBound) + bounds + + + + + + +.. raw:: html + +
+ class=Interval name=Unnamed dimension=2 lower bound=class=Point name=Unnamed dimension=2 values=[-4.26489,-4.26489] upper bound=class=Point name=Unnamed dimension=2 values=[4.26489,4.26489] finite lower bound=[1,1] finite upper bound=[1,1] +
+
+
+ +.. GENERATED FROM PYTHON SOURCE LINES 88-92 + +.. code-block:: Python + + graph = drawEvent.drawLimitStateCrossCut(bounds) + graph.add(cloud) + graph + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + class=Graph name=Limit state surface implementation=class=GraphImplementation name=Limit state surface title=Limit state surface xTitle=x1 yTitle=x2 axes=ON grid=ON legendposition= legendFontSize=1 drawables=[class=Drawable name=Unnamed implementation=class=Contour name=Unnamed x=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=52 dimension=1 description=[t] data=[[-4.26489],[-4.09764],[-3.93039],[-3.76314],[-3.59589],[-3.42864],[-3.26139],[-3.09414],[-2.92689],[-2.75964],[-2.59238],[-2.42513],[-2.25788],[-2.09063],[-1.92338],[-1.75613],[-1.58888],[-1.42163],[-1.25438],[-1.08713],[-0.919878],[-0.752628],[-0.585377],[-0.418127],[-0.250876],[-0.0836253],[0.0836253],[0.250876],[0.418127],[0.585377],[0.752628],[0.919878],[1.08713],[1.25438],[1.42163],[1.58888],[1.75613],[1.92338],[2.09063],[2.25788],[2.42513],[2.59238],[2.75964],[2.92689],[3.09414],[3.26139],[3.42864],[3.59589],[3.76314],[3.93039],[4.09764],[4.26489]] y=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=52 dimension=1 description=[t] data=[[-4.26489],[-4.09764],[-3.93039],[-3.76314],[-3.59589],[-3.42864],[-3.26139],[-3.09414],[-2.92689],[-2.75964],[-2.59238],[-2.42513],[-2.25788],[-2.09063],[-1.92338],[-1.75613],[-1.58888],[-1.42163],[-1.25438],[-1.08713],[-0.919878],[-0.752628],[-0.585377],[-0.418127],[-0.250876],[-0.0836253],[0.0836253],[0.250876],[0.418127],[0.585377],[0.752628],[0.919878],[1.08713],[1.25438],[1.42163],[1.58888],[1.75613],[1.92338],[2.09063],[2.25788],[2.42513],[2.59238],[2.75964],[2.92689],[3.09414],[3.26139],[3.42864],[3.59589],[3.76314],[3.93039],[4.09764],[4.26489]] levels=class=Point name=Unnamed dimension=1 values=[0] labels=[0.0] show labels=true isFilled=false colorBarPosition=right isVminUsed=false vmin=0 isVmaxUsed=false vmax=0 colorMap=hsv alpha=1 norm=linear extend=both hatches=[] derived from class=DrawableImplementation name=Unnamed legend= data=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=2704 dimension=1 description=[gsys] data=[[-0.800103],[-1.19524],[-1.53443],...,[65.1274],[63.7847],[62.3861]] color=#1f77b4 isColorExplicitlySet=true fillStyle=solid lineStyle=solid pointStyle=plus lineWidth=1,class=Drawable name=In implementation=class=Cloud name=In derived from class=DrawableImplementation name=In legend=In data=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=153 dimension=2 data=[[-2.28791,1.28156],[-2.44603,0.911344],[1.79118,0.568947],[-2.48494,1.25917],[2.61997,0.264749],[-2.50986,-1.5891],[1.75045,0.113072],[1.86661,0.18449],[-1.43471,-1.93141],[2.59764,0.601136],[2.05468,0.0491266],[-2.30763,-1.16983],[-1.22258,-2.18234],[1.90805,0.189891],[-3.39855,1.5308],[2.53897,0.446932],[-3.34217,-1.14585],[2.89876,0.669813],[-1.43512,-2.56997],[-1.78486,-1.92782],[3.43183,-0.0153627],[-2.84172,-1.30179],[1.84998,0.448213],[3.28698,0.025267],[-2.07219,0.981452],[2.48993,0.814592],[2.32593,0.288883],[1.76561,0.181697],[-2.36999,-1.66699],[1.94221,0.589529],[1.75971,0.0328827],[-1.87425,-1.44037],[-2.69943,-3.51875],[-2.45987,0.817579],[2.01284,0.154447],[-2.25962,-1.19596],[-2.06256,1.03864],[1.98658,0.443383],[-1.93188,0.63735],[2.30667,0.87774],[-2.64585,-2.01285],[1.74472,0.228517],[-2.08975,-1.22297],[2.04668,0.996457],[-2.21881,0.581562],[1.96792,0.355213],[2.62061,0.501501],[2.13927,0.0990782],[2.37788,1.15185],[2.44355,1.34633],[1.90441,0.0569733],[-2.13939,-1.35465],[-2.13305,-1.57999],[1.73529,0.0992603],[-1.49528,-2.01366],[-1.70505,-1.67782],[1.94906,0.161161],[1.93818,0.332426],[-2.42661,-1.46371],[1.80448,0.18754],[-2.78883,-1.61613],[2.03146,0.558342],[-1.31587,-2.27635],[2.02166,0.142337],[-1.93326,0.580894],[-1.95679,0.806757],[2.06957,0.677111],[1.8177,0.12177],[-1.9372,0.528204],[-1.86121,0.737663],[-2.57335,1.13107],[2.33803,0.219885],[-1.61624,-1.87536],[-1.71069,-1.74517],[2.10517,0.261609],[1.96642,0.176872],[-1.85016,-1.63139],[2.41408,0.376807],[-2.33414,-1.25624],[1.9608,0.36038],[2.90174,1.08475],[1.87706,0.524813],[-2.38648,-1.21555],[-2.56818,-1.11633],[1.97245,0.715638],[-2.30963,-1.86914],[2.19285,0.350211],[-2.23851,-1.31872],[2.04195,0.783889],[1.96622,0.0338754],[-2.75824,-1.66467],[-1.41829,-3.39548],[-2.07893,0.978973],[-3.54118,1.18693],[1.99677,0.259443],[-1.9164,-1.75293],[1.8585,0.542414],[-2.46096,-1.55631],[1.93943,0.614643],[-2.48543,0.874383],[-1.89245,-2.53596],[2.63199,0.0225212],[-1.9612,0.81658],[2.1365,0.0350634],[-2.47736,0.924404],[2.46227,0.346259],[-1.98785,0.7039],[1.96468,0.930406],[-1.89192,-1.8089],[-1.95783,-2.90396],[-1.19301,-2.16592],[-1.89045,-1.8582],[1.78722,0.0320467],[2.20578,0.867757],[1.87373,0.208803],[2.36215,0.616565],[1.75925,0.136651],[-2.02926,0.763102],[-1.20775,-2.38018],[2.13307,0.0651385],[-2.16394,-1.40496],[1.84672,0.636878],[2.08937,0.28269],[-1.35852,-2.11152],[-2.01704,0.653207],[-2.45342,0.896794],[2.56422,0.829947],[-2.17204,0.970906],[3.1746,0.159928],[-3.04417,-1.97098],[3.28539,0.270938],[2.99396,-0.0359328],[2.00885,0.0761205],[-2.18425,0.998445],[2.31402,0.716111],[3.23297,-0.141738],[1.84192,0.482231],[2.40716,0.11055],[-1.0799,-2.44138],[2.25472,0.172189],[-2.66957,0.785676],[1.76578,0.0362215],[-1.14327,-2.79561],[1.98123,0.955865],[2.15328,0.356835],[-2.59124,-1.28917],[3.26278,-0.112768],[2.4157,1.25435],[-1.05826,-3.11584],[1.88664,0.182766],[-1.89768,0.717307],[-1.43293,-1.79707],[-2.04311,0.644712]] color=lightsalmon3 isColorExplicitlySet=true fillStyle=solid lineStyle=solid pointStyle=fsquare lineWidth=1,class=Drawable name=Out implementation=class=Cloud name=Out derived from class=DrawableImplementation name=Out legend=Out data=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=4847 dimension=2 data=[[-0.28013,-1.06094],[0.0311988,-0.879487],[-1.42375,-0.469779],...,[2.38897,-1.7434],[-1.14918,-0.0407649],[1.24856,-0.767747]] color=darkseagreen3 isColorExplicitlySet=true fillStyle=solid lineStyle=solid pointStyle=fsquare lineWidth=1] + + + +.. GENERATED FROM PYTHON SOURCE LINES 93-96 + +.. code-block:: Python + + domain = drawEvent.fillEventCrossCut(bounds) + _ = otv.View(domain) + + + + +.. image-sg:: /auto_examples/reliability_problems/images/sphx_glr_plot_rp57_003.png + :alt: Domain where g(x) < 0.0 + :srcset: /auto_examples/reliability_problems/images/sphx_glr_plot_rp57_003.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 97-100 + +.. code-block:: Python + + domain.add(cloud) + _ = otv.View(domain) + + + + +.. image-sg:: /auto_examples/reliability_problems/images/sphx_glr_plot_rp57_004.png + :alt: Domain where g(x) < 0.0 + :srcset: /auto_examples/reliability_problems/images/sphx_glr_plot_rp57_004.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 101-102 + +.. code-block:: Python + + otv.View.ShowAll() + + + + + + + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 2.644 seconds) + + +.. _sphx_glr_download_auto_examples_reliability_problems_plot_rp57.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: plot_rp57.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: plot_rp57.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: plot_rp57.zip ` diff --git a/otbenchmark/master/_sources/auto_examples/reliability_problems/plot_rp75.rst b/otbenchmark/master/_sources/auto_examples/reliability_problems/plot_rp75.rst new file mode 100644 index 00000000000..208c23d9f61 --- /dev/null +++ b/otbenchmark/master/_sources/auto_examples/reliability_problems/plot_rp75.rst @@ -0,0 +1,554 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "auto_examples/reliability_problems/plot_rp75.py" +.. LINE NUMBERS ARE GIVEN BELOW. + +.. only:: html + + .. note:: + :class: sphx-glr-download-link-note + + :ref:`Go to the end ` + to download the full example code. + +.. rst-class:: sphx-glr-example-title + +.. _sphx_glr_auto_examples_reliability_problems_plot_rp75.py: + + +RP75 analysis and 2D graphics +============================= + +.. GENERATED FROM PYTHON SOURCE LINES 7-15 + +The objective of this example is to present problem 75 of the BBRC. +We also present graphic elements for the visualization of the limit state surface in 2 dimensions. + +This problem has two dimension and a reference probability approximately equal to $10^{-2}$. +Hence, the problem should be relatively easy to solve. +The failure domain is made of two separate sub-domains, leading to two different design points. +Hence, the FORM approximation cannot be accurate, because it systematically ignores one of them, +no matter what point is found by the optimization algorithm. + +.. GENERATED FROM PYTHON SOURCE LINES 17-21 + +.. code-block:: Python + + import openturns as ot + import openturns.viewer as otv + import otbenchmark as otb + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 22-25 + +.. code-block:: Python + + problem = otb.ReliabilityProblem75() + print(problem) + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + name = RP75 + event = class=ThresholdEventImplementation antecedent=class=CompositeRandomVector function=class=Function name=Unnamed implementation=class=FunctionImplementation name=Unnamed description=[x1,x2,y0] evaluationImplementation=class=SymbolicEvaluation name=Unnamed inputVariablesNames=[x1,x2] outputVariablesNames=[y0] formulas=[3 - x1 * x2] gradientImplementation=class=SymbolicGradient name=Unnamed evaluation=class=SymbolicEvaluation name=Unnamed inputVariablesNames=[x1,x2] outputVariablesNames=[y0] formulas=[3 - x1 * x2] hessianImplementation=class=SymbolicHessian name=Unnamed evaluation=class=SymbolicEvaluation name=Unnamed inputVariablesNames=[x1,x2] outputVariablesNames=[y0] formulas=[3 - x1 * x2] 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=[0] 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=[0] 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.00981929872154689 + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 26-29 + +.. code-block:: Python + + event = problem.getEvent() + g = event.getFunction() + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 30-32 + +.. code-block:: Python + + problem.getProbability() + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + 0.00981929872154689 + + + +.. GENERATED FROM PYTHON SOURCE LINES 33-34 + +Create the Monte-Carlo algorithm + +.. GENERATED FROM PYTHON SOURCE LINES 34-39 + +.. code-block:: Python + + algoProb = ot.ProbabilitySimulationAlgorithm(event) + algoProb.setMaximumOuterSampling(1000) + algoProb.setMaximumCoefficientOfVariation(0.01) + algoProb.run() + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 40-41 + +Get the results + +.. GENERATED FROM PYTHON SOURCE LINES 41-52 + +.. code-block:: Python + + resultAlgo = algoProb.getResult() + neval = g.getEvaluationCallsNumber() + print("Number of function calls = %d" % (neval)) + pf = resultAlgo.getProbabilityEstimate() + print("Failure Probability = %.4f" % (pf)) + level = 0.95 + c95 = resultAlgo.getConfidenceLength(level) + pmin = pf - 0.5 * c95 + pmax = pf + 0.5 * c95 + print("%.1f %% confidence interval :[%.4f,%.4f] " % (level * 100, pmin, pmax)) + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + Number of function calls = 1000 + Failure Probability = 0.0080 + 95.0 % confidence interval :[0.0025,0.0135] + + + + +.. GENERATED FROM PYTHON SOURCE LINES 53-55 + +Compute the bounds of the domain +-------------------------------- + +.. GENERATED FROM PYTHON SOURCE LINES 57-70 + +.. code-block:: Python + + inputVector = event.getAntecedent() + distribution = inputVector.getDistribution() + X1 = distribution.getMarginal(0) + X2 = distribution.getMarginal(1) + alphaMin = 0.00001 + alphaMax = 1 - alphaMin + lowerBound = ot.Point( + [X1.computeQuantile(alphaMin)[0], X2.computeQuantile(alphaMin)[0]] + ) + upperBound = ot.Point( + [X1.computeQuantile(alphaMax)[0], X2.computeQuantile(alphaMax)[0]] + ) + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 71-76 + +.. code-block:: Python + + nbPoints = [100, 100] + figure = g.draw(lowerBound, upperBound, nbPoints) + figure.setTitle(" Iso-values of limit state function") + figure + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + class=Graph name=y0 as a function of (x1,x2) implementation=class=GraphImplementation name=y0 as a function of (x1,x2) title= Iso-values of limit state function xTitle=x1 yTitle=x2 axes=ON grid=ON legendposition=upper left legendFontSize=1 drawables=[class=Drawable name=Unnamed implementation=class=Contour name=Unnamed x=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=100 dimension=1 data=[[-4.26489],[-4.17873],[-4.09257],[-4.00641],[-3.92025],[-3.83409],[-3.74793],[-3.66177],[-3.57562],[-3.48946],[-3.4033],[-3.31714],[-3.23098],[-3.14482],[-3.05866],[-2.9725],[-2.88634],[-2.80018],[-2.71402],[-2.62786],[-2.5417],[-2.45554],[-2.36938],[-2.28322],[-2.19706],[-2.11091],[-2.02475],[-1.93859],[-1.85243],[-1.76627],[-1.68011],[-1.59395],[-1.50779],[-1.42163],[-1.33547],[-1.24931],[-1.16315],[-1.07699],[-0.990833],[-0.904674],[-0.818514],[-0.732355],[-0.646196],[-0.560036],[-0.473877],[-0.387717],[-0.301558],[-0.215399],[-0.129239],[-0.0430797],[0.0430797],[0.129239],[0.215399],[0.301558],[0.387717],[0.473877],[0.560036],[0.646196],[0.732355],[0.818514],[0.904674],[0.990833],[1.07699],[1.16315],[1.24931],[1.33547],[1.42163],[1.50779],[1.59395],[1.68011],[1.76627],[1.85243],[1.93859],[2.02475],[2.11091],[2.19706],[2.28322],[2.36938],[2.45554],[2.5417],[2.62786],[2.71402],[2.80018],[2.88634],[2.9725],[3.05866],[3.14482],[3.23098],[3.31714],[3.4033],[3.48946],[3.57562],[3.66177],[3.74793],[3.83409],[3.92025],[4.00641],[4.09257],[4.17873],[4.26489]] y=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=100 dimension=1 data=[[-4.26489],[-4.17873],[-4.09257],[-4.00641],[-3.92025],[-3.83409],[-3.74793],[-3.66177],[-3.57562],[-3.48946],[-3.4033],[-3.31714],[-3.23098],[-3.14482],[-3.05866],[-2.9725],[-2.88634],[-2.80018],[-2.71402],[-2.62786],[-2.5417],[-2.45554],[-2.36938],[-2.28322],[-2.19706],[-2.11091],[-2.02475],[-1.93859],[-1.85243],[-1.76627],[-1.68011],[-1.59395],[-1.50779],[-1.42163],[-1.33547],[-1.24931],[-1.16315],[-1.07699],[-0.990833],[-0.904674],[-0.818514],[-0.732355],[-0.646196],[-0.560036],[-0.473877],[-0.387717],[-0.301558],[-0.215399],[-0.129239],[-0.0430797],[0.0430797],[0.129239],[0.215399],[0.301558],[0.387717],[0.473877],[0.560036],[0.646196],[0.732355],[0.818514],[0.904674],[0.990833],[1.07699],[1.16315],[1.24931],[1.33547],[1.42163],[1.50779],[1.59395],[1.68011],[1.76627],[1.85243],[1.93859],[2.02475],[2.11091],[2.19706],[2.28322],[2.36938],[2.45554],[2.5417],[2.62786],[2.71402],[2.80018],[2.88634],[2.9725],[3.05866],[3.14482],[3.23098],[3.31714],[3.4033],[3.48946],[3.57562],[3.66177],[3.74793],[3.83409],[3.92025],[4.00641],[4.09257],[4.17873],[4.26489]] levels=class=Point name=Unnamed dimension=10 values=[-7.88462,-3.19301,-0.457469,1.38355,2.61584,3.38416,4.61645,6.4686,9.19301,13.9366] labels=[-7.88462,-3.19301,-0.457469,1.38355,2.61584,3.38416,4.61645,6.4686,9.19301,13.9366] show labels=false isFilled=false colorBarPosition=right isVminUsed=false vmin=0 isVmaxUsed=false vmax=0 colorMap=hsv alpha=1 norm=linear extend=both hatches=[] derived from class=DrawableImplementation name=Unnamed legend= data=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=10000 dimension=1 description=[y0] data=[[-15.1893],[-14.8218],[-14.4544],...,[-14.4544],[-14.8218],[-15.1893]] color=#1f77b4 isColorExplicitlySet=true fillStyle=solid lineStyle=solid pointStyle=plus lineWidth=1] + + + +.. GENERATED FROM PYTHON SOURCE LINES 77-79 + +Print the iso-values of the distribution +---------------------------------------- + +.. GENERATED FROM PYTHON SOURCE LINES 81-83 + +.. code-block:: Python + + _ = otv.View(distribution.drawPDF()) + + + + +.. image-sg:: /auto_examples/reliability_problems/images/sphx_glr_plot_rp75_001.png + :alt: [X1,X2] iso-PDF + :srcset: /auto_examples/reliability_problems/images/sphx_glr_plot_rp75_001.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 84-87 + +.. code-block:: Python + + sampleSize = 5000 + drawEvent = otb.DrawEvent(event) + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 88-91 + +.. code-block:: Python + + cloud = drawEvent.drawSampleCrossCut(sampleSize) + _ = otv.View(cloud) + + + + +.. image-sg:: /auto_examples/reliability_problems/images/sphx_glr_plot_rp75_002.png + :alt: Points X s.t. g(X) < 0.0 + :srcset: /auto_examples/reliability_problems/images/sphx_glr_plot_rp75_002.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 92-94 + +Draw the limit state surface +---------------------------- + +.. GENERATED FROM PYTHON SOURCE LINES 96-99 + +.. code-block:: Python + + bounds = ot.Interval(lowerBound, upperBound) + bounds + + + + + + +.. raw:: html + +
+ class=Interval name=Unnamed dimension=2 lower bound=class=Point name=Unnamed dimension=2 values=[-4.26489,-4.26489] upper bound=class=Point name=Unnamed dimension=2 values=[4.26489,4.26489] finite lower bound=[1,1] finite upper bound=[1,1] +
+
+
+ +.. GENERATED FROM PYTHON SOURCE LINES 100-104 + +.. code-block:: Python + + graph = drawEvent.drawLimitStateCrossCut(bounds) + graph.add(cloud) + graph + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + class=Graph name=Limit state surface implementation=class=GraphImplementation name=Limit state surface title=Limit state surface xTitle=x1 yTitle=x2 axes=ON grid=ON legendposition= legendFontSize=1 drawables=[class=Drawable name=Unnamed implementation=class=Contour name=Unnamed x=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=52 dimension=1 description=[t] data=[[-4.26489],[-4.09764],[-3.93039],[-3.76314],[-3.59589],[-3.42864],[-3.26139],[-3.09414],[-2.92689],[-2.75964],[-2.59238],[-2.42513],[-2.25788],[-2.09063],[-1.92338],[-1.75613],[-1.58888],[-1.42163],[-1.25438],[-1.08713],[-0.919878],[-0.752628],[-0.585377],[-0.418127],[-0.250876],[-0.0836253],[0.0836253],[0.250876],[0.418127],[0.585377],[0.752628],[0.919878],[1.08713],[1.25438],[1.42163],[1.58888],[1.75613],[1.92338],[2.09063],[2.25788],[2.42513],[2.59238],[2.75964],[2.92689],[3.09414],[3.26139],[3.42864],[3.59589],[3.76314],[3.93039],[4.09764],[4.26489]] y=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=52 dimension=1 description=[t] data=[[-4.26489],[-4.09764],[-3.93039],[-3.76314],[-3.59589],[-3.42864],[-3.26139],[-3.09414],[-2.92689],[-2.75964],[-2.59238],[-2.42513],[-2.25788],[-2.09063],[-1.92338],[-1.75613],[-1.58888],[-1.42163],[-1.25438],[-1.08713],[-0.919878],[-0.752628],[-0.585377],[-0.418127],[-0.250876],[-0.0836253],[0.0836253],[0.250876],[0.418127],[0.585377],[0.752628],[0.919878],[1.08713],[1.25438],[1.42163],[1.58888],[1.75613],[1.92338],[2.09063],[2.25788],[2.42513],[2.59238],[2.75964],[2.92689],[3.09414],[3.26139],[3.42864],[3.59589],[3.76314],[3.93039],[4.09764],[4.26489]] levels=class=Point name=Unnamed dimension=1 values=[0] labels=[0.0] show labels=true isFilled=false colorBarPosition=right isVminUsed=false vmin=0 isVmaxUsed=false vmax=0 colorMap=hsv alpha=1 norm=linear extend=both hatches=[] derived from class=DrawableImplementation name=Unnamed legend= data=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=2704 dimension=1 description=[y0] data=[[-15.1893],[-14.476],[-13.7627],...,[-13.7627],[-14.476],[-15.1893]] color=#1f77b4 isColorExplicitlySet=true fillStyle=solid lineStyle=solid pointStyle=plus lineWidth=1,class=Drawable name=In implementation=class=Cloud name=In derived from class=DrawableImplementation name=In legend=In data=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=42 dimension=2 data=[[-2.11927,-2.69481],[1.27024,2.59556],[0.890382,3.90003],[-2.24392,-1.43379],[-1.65457,-2.11737],[-2.6403,-1.85726],[-1.70953,-1.94936],[-2.95714,-1.66348],[-2.15335,-1.97217],[-2.74349,-1.43291],[1.35844,2.24681],[1.87966,1.61928],[1.12457,2.72543],[1.54277,2.2525],[-1.82718,-1.67409],[-1.88413,-1.95091],[2.32555,1.77279],[-2.08129,-2.35742],[-2.59326,-2.45499],[2.11761,1.51643],[2.59664,1.48946],[2.68126,2.34219],[-1.84181,-1.72817],[2.22321,1.75373],[-2.50048,-1.98235],[-2.83852,-1.35115],[-2.304,-1.71732],[-1.92264,-1.73971],[-1.11715,-2.78917],[-1.78152,-2.53055],[-2.0728,-1.48516],[1.77318,2.14881],[1.73621,1.9113],[-2.23364,-1.49027],[1.37681,2.24069],[0.998112,3.14432],[1.41874,2.7568],[1.79042,2.19791],[-2.45849,-1.38704],[-2.17646,-1.86282],[2.17781,2.02611],[-2.2543,-2.02605]] color=lightsalmon3 isColorExplicitlySet=true fillStyle=solid lineStyle=solid pointStyle=fsquare lineWidth=1,class=Drawable name=Out implementation=class=Cloud name=Out derived from class=DrawableImplementation name=Out legend=Out data=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=4958 dimension=2 data=[[0.868716,-1.0587],[-0.592679,-1.81369],[0.790569,1.37279],...,[1.38034,-0.559268],[-0.700298,0.0715357],[-0.351488,0.886471]] color=darkseagreen3 isColorExplicitlySet=true fillStyle=solid lineStyle=solid pointStyle=fsquare lineWidth=1] + + + +.. GENERATED FROM PYTHON SOURCE LINES 105-108 + +.. code-block:: Python + + domain = drawEvent.fillEventCrossCut(bounds) + _ = otv.View(domain) + + + + +.. image-sg:: /auto_examples/reliability_problems/images/sphx_glr_plot_rp75_003.png + :alt: Domain where g(x) < 0.0 + :srcset: /auto_examples/reliability_problems/images/sphx_glr_plot_rp75_003.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 109-112 + +.. code-block:: Python + + domain.add(cloud) + _ = otv.View(domain) + + + + +.. image-sg:: /auto_examples/reliability_problems/images/sphx_glr_plot_rp75_004.png + :alt: Domain where g(x) < 0.0 + :srcset: /auto_examples/reliability_problems/images/sphx_glr_plot_rp75_004.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 113-115 + +Test with FORM method +--------------------- + +.. GENERATED FROM PYTHON SOURCE LINES 117-118 + +We create a NearestPoint algorithm + +.. GENERATED FROM PYTHON SOURCE LINES 118-127 + +.. code-block:: Python + + nearestPointAlgorithm = ot.Cobyla() + # Resolution options: + eps = 1e-3 + nearestPointAlgorithm.setMaximumCallsNumber(1000) + nearestPointAlgorithm.setMaximumAbsoluteError(eps) + nearestPointAlgorithm.setMaximumRelativeError(eps) + nearestPointAlgorithm.setMaximumResidualError(eps) + nearestPointAlgorithm.setMaximumConstraintError(eps) + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 128-138 + +.. code-block:: Python + + initialNumberOfCall = g.getEvaluationCallsNumber() + mean = distribution.getMean() + algoFORM = ot.FORM(nearestPointAlgorithm, event, mean) + algoFORM.run() + resultFORM = algoFORM.getResult() + numberOfFunctionEvaluationsFORM = g.getEvaluationCallsNumber() - initialNumberOfCall + probabilityFORM = resultFORM.getEventProbability() + print("Number of calls to the limit state =", numberOfFunctionEvaluationsFORM) + print("Pf =", probabilityFORM) + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + Number of calls to the limit state = 155 + Pf = 0.007161044716104123 + + + + +.. GENERATED FROM PYTHON SOURCE LINES 139-140 + +We create a NearestPoint algorithm + +.. GENERATED FROM PYTHON SOURCE LINES 140-149 + +.. code-block:: Python + + nearestPointAlgorithm = ot.AbdoRackwitz() + # Resolution options: + eps = 1e-3 + nearestPointAlgorithm.setMaximumCallsNumber(100) + nearestPointAlgorithm.setMaximumAbsoluteError(eps) + nearestPointAlgorithm.setMaximumRelativeError(eps) + nearestPointAlgorithm.setMaximumResidualError(eps) + nearestPointAlgorithm.setMaximumConstraintError(eps) + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 150-155 + +If the mean point is used as a starting point with the `AbdoRackwitz` class, then the algorithm fails with: +``` +RuntimeError: InternalException : Error in Abdo Rackwitz algorithm: the gradient of the level function is zero ... +``` +In order to fix this, we just use a different starting point. + +.. GENERATED FROM PYTHON SOURCE LINES 157-159 + +.. code-block:: Python + + startingPoint = mean + [1.0e-3] * 2 + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 160-170 + +.. code-block:: Python + + initialNumberOfCall = g.getEvaluationCallsNumber() + mean = distribution.getMean() + algoFORM = ot.FORM(nearestPointAlgorithm, event, startingPoint) + algoFORM.run() + resultFORM = algoFORM.getResult() + numberOfFunctionEvaluationsFORM = g.getEvaluationCallsNumber() - initialNumberOfCall + probabilityFORM = resultFORM.getEventProbability() + print("Number of calls to the limit state =", numberOfFunctionEvaluationsFORM) + print("Pf =", probabilityFORM) + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + Number of calls to the limit state = 16 + Pf = 0.007148267752544499 + + + + +.. GENERATED FROM PYTHON SOURCE LINES 171-173 + +.. code-block:: Python + + mean + + + + + + +.. raw:: html + +
+ class=Point name=Unnamed dimension=2 values=[0,0] +
+
+
+ +.. GENERATED FROM PYTHON SOURCE LINES 174-176 + +.. code-block:: Python + + g.gradient(mean) + + + + + + +.. raw:: html + +
+

[[ -0 ]
+ [ -0 ]]

+
+
+
+ +.. GENERATED FROM PYTHON SOURCE LINES 177-178 + +.. code-block:: Python + + otv.View.ShowAll() + + + + + + + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 2.634 seconds) + + +.. _sphx_glr_download_auto_examples_reliability_problems_plot_rp75.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: plot_rp75.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: plot_rp75.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: plot_rp75.zip ` diff --git a/otbenchmark/master/_sources/auto_examples/reliability_problems/plot_rp89.rst b/otbenchmark/master/_sources/auto_examples/reliability_problems/plot_rp89.rst new file mode 100644 index 00000000000..ed19429cac9 --- /dev/null +++ b/otbenchmark/master/_sources/auto_examples/reliability_problems/plot_rp89.rst @@ -0,0 +1,378 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "auto_examples/reliability_problems/plot_rp89.py" +.. LINE NUMBERS ARE GIVEN BELOW. + +.. only:: html + + .. note:: + :class: sphx-glr-download-link-note + + :ref:`Go to the end ` + to download the full example code. + +.. rst-class:: sphx-glr-example-title + +.. _sphx_glr_auto_examples_reliability_problems_plot_rp89.py: + + +RP89 analysis and 2D graphics +============================= + +.. GENERATED FROM PYTHON SOURCE LINES 7-9 + +The objective of this example is to present problem 89 of the BBRC. +We also present graphic elements for the visualization of the limit state surface in 2 dimensions. + +.. GENERATED FROM PYTHON SOURCE LINES 11-15 + +.. code-block:: Python + + import openturns as ot + import openturns.viewer as otv + import otbenchmark as otb + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 16-19 + +.. code-block:: Python + + problem = otb.ReliabilityProblem89() + print(problem) + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + name = RP89 + event = class=ThresholdEventImplementation antecedent=class=CompositeRandomVector function=class=Function name=Unnamed implementation=class=FunctionImplementation name=Unnamed description=[x1,x2,gsys] evaluationImplementation=class=SymbolicEvaluation name=Unnamed inputVariablesNames=[x1,x2] outputVariablesNames=[gsys] formulas=[var g1 := -x1^2 - x2 + 8;var g2 := -x1 / 5 - x2 + 6;gsys := min(g1, g2)] gradientImplementation=class=SymbolicGradient name=Unnamed evaluation=class=SymbolicEvaluation name=Unnamed inputVariablesNames=[x1,x2] outputVariablesNames=[gsys] formulas=[var g1 := -x1^2 - x2 + 8;var g2 := -x1 / 5 - x2 + 6;gsys := min(g1, g2)] hessianImplementation=class=SymbolicHessian name=Unnamed evaluation=class=SymbolicEvaluation name=Unnamed inputVariablesNames=[x1,x2] outputVariablesNames=[gsys] formulas=[var g1 := -x1^2 - x2 + 8;var g2 := -x1 / 5 - x2 + 6;gsys := min(g1, g2)] 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=[0] 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=[0] 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.00543 + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 20-23 + +.. code-block:: Python + + event = problem.getEvent() + g = event.getFunction() + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 24-26 + +.. code-block:: Python + + problem.getProbability() + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + 0.00543 + + + +.. GENERATED FROM PYTHON SOURCE LINES 27-28 + +Create the Monte-Carlo algorithm + +.. GENERATED FROM PYTHON SOURCE LINES 28-33 + +.. code-block:: Python + + algoProb = ot.ProbabilitySimulationAlgorithm(event) + algoProb.setMaximumOuterSampling(1000) + algoProb.setMaximumCoefficientOfVariation(0.01) + algoProb.run() + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 34-35 + +Get the results + +.. GENERATED FROM PYTHON SOURCE LINES 35-46 + +.. code-block:: Python + + resultAlgo = algoProb.getResult() + neval = g.getEvaluationCallsNumber() + print("Number of function calls = %d" % (neval)) + pf = resultAlgo.getProbabilityEstimate() + print("Failure Probability = %.4f" % (pf)) + level = 0.95 + c95 = resultAlgo.getConfidenceLength(level) + pmin = pf - 0.5 * c95 + pmax = pf + 0.5 * c95 + print("%.1f %% confidence interval :[%.4f,%.4f] " % (level * 100, pmin, pmax)) + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + Number of function calls = 1000 + Failure Probability = 0.0040 + 95.0 % confidence interval :[0.0001,0.0079] + + + + +.. GENERATED FROM PYTHON SOURCE LINES 47-49 + +Compute the bounds of the domain +-------------------------------- + +.. GENERATED FROM PYTHON SOURCE LINES 51-64 + +.. code-block:: Python + + inputVector = event.getAntecedent() + distribution = inputVector.getDistribution() + X1 = distribution.getMarginal(0) + X2 = distribution.getMarginal(1) + alphaMin = 0.00001 + alphaMax = 1 - alphaMin + lowerBound = ot.Point( + [X1.computeQuantile(alphaMin)[0], X2.computeQuantile(alphaMin)[0]] + ) + upperBound = ot.Point( + [X1.computeQuantile(alphaMax)[0], X2.computeQuantile(alphaMax)[0]] + ) + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 65-70 + +.. code-block:: Python + + nbPoints = [100, 100] + figure = g.draw(lowerBound, upperBound, nbPoints) + figure.setTitle(" Iso-values of limit state function") + figure + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + class=Graph name=gsys as a function of (x1,x2) implementation=class=GraphImplementation name=gsys as a function of (x1,x2) title= Iso-values of limit state function xTitle=x1 yTitle=x2 axes=ON grid=ON legendposition=upper left legendFontSize=1 drawables=[class=Drawable name=Unnamed implementation=class=Contour name=Unnamed x=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=100 dimension=1 data=[[-4.26489],[-4.17873],[-4.09257],[-4.00641],[-3.92025],[-3.83409],[-3.74793],[-3.66177],[-3.57562],[-3.48946],[-3.4033],[-3.31714],[-3.23098],[-3.14482],[-3.05866],[-2.9725],[-2.88634],[-2.80018],[-2.71402],[-2.62786],[-2.5417],[-2.45554],[-2.36938],[-2.28322],[-2.19706],[-2.11091],[-2.02475],[-1.93859],[-1.85243],[-1.76627],[-1.68011],[-1.59395],[-1.50779],[-1.42163],[-1.33547],[-1.24931],[-1.16315],[-1.07699],[-0.990833],[-0.904674],[-0.818514],[-0.732355],[-0.646196],[-0.560036],[-0.473877],[-0.387717],[-0.301558],[-0.215399],[-0.129239],[-0.0430797],[0.0430797],[0.129239],[0.215399],[0.301558],[0.387717],[0.473877],[0.560036],[0.646196],[0.732355],[0.818514],[0.904674],[0.990833],[1.07699],[1.16315],[1.24931],[1.33547],[1.42163],[1.50779],[1.59395],[1.68011],[1.76627],[1.85243],[1.93859],[2.02475],[2.11091],[2.19706],[2.28322],[2.36938],[2.45554],[2.5417],[2.62786],[2.71402],[2.80018],[2.88634],[2.9725],[3.05866],[3.14482],[3.23098],[3.31714],[3.4033],[3.48946],[3.57562],[3.66177],[3.74793],[3.83409],[3.92025],[4.00641],[4.09257],[4.17873],[4.26489]] y=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=100 dimension=1 data=[[-4.26489],[-4.17873],[-4.09257],[-4.00641],[-3.92025],[-3.83409],[-3.74793],[-3.66177],[-3.57562],[-3.48946],[-3.4033],[-3.31714],[-3.23098],[-3.14482],[-3.05866],[-2.9725],[-2.88634],[-2.80018],[-2.71402],[-2.62786],[-2.5417],[-2.45554],[-2.36938],[-2.28322],[-2.19706],[-2.11091],[-2.02475],[-1.93859],[-1.85243],[-1.76627],[-1.68011],[-1.59395],[-1.50779],[-1.42163],[-1.33547],[-1.24931],[-1.16315],[-1.07699],[-0.990833],[-0.904674],[-0.818514],[-0.732355],[-0.646196],[-0.560036],[-0.473877],[-0.387717],[-0.301558],[-0.215399],[-0.129239],[-0.0430797],[0.0430797],[0.129239],[0.215399],[0.301558],[0.387717],[0.473877],[0.560036],[0.646196],[0.732355],[0.818514],[0.904674],[0.990833],[1.07699],[1.16315],[1.24931],[1.33547],[1.42163],[1.50779],[1.59395],[1.68011],[1.76627],[1.85243],[1.93859],[2.02475],[2.11091],[2.19706],[2.28322],[2.36938],[2.45554],[2.5417],[2.62786],[2.71402],[2.80018],[2.88634],[2.9725],[3.05866],[3.14482],[3.23098],[3.31714],[3.4033],[3.48946],[3.57562],[3.66177],[3.74793],[3.83409],[3.92025],[4.00641],[4.09257],[4.17873],[4.26489]] levels=class=Point name=Unnamed dimension=10 values=[-9.36415,-5.51817,-2.5916,-0.0315377,1.92526,3.10504,4.3802,5.75875,7.3037,9.1362] labels=[-9.36415,-5.51817,-2.5916,-0.0315377,1.92526,3.10504,4.3802,5.75875,7.3037,9.1362] show labels=false isFilled=false colorBarPosition=right isVminUsed=false vmin=0 isVmaxUsed=false vmax=0 colorMap=hsv alpha=1 norm=linear extend=both hatches=[] derived from class=DrawableImplementation name=Unnamed legend= data=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=10000 dimension=1 description=[gsys] data=[[-5.9244],[-5.19691],[-4.48425],...,[-13.014],[-13.7267],[-14.4542]] color=#1f77b4 isColorExplicitlySet=true fillStyle=solid lineStyle=solid pointStyle=plus lineWidth=1] + + + +.. GENERATED FROM PYTHON SOURCE LINES 71-73 + +Print the iso-values of the distribution +---------------------------------------- + +.. GENERATED FROM PYTHON SOURCE LINES 75-77 + +.. code-block:: Python + + _ = otv.View(distribution.drawPDF()) + + + + +.. image-sg:: /auto_examples/reliability_problems/images/sphx_glr_plot_rp89_001.png + :alt: [X1,X2] iso-PDF + :srcset: /auto_examples/reliability_problems/images/sphx_glr_plot_rp89_001.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 78-81 + +.. code-block:: Python + + sampleSize = 5000 + drawEvent = otb.DrawEvent(event) + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 82-85 + +.. code-block:: Python + + cloud = drawEvent.drawSampleCrossCut(sampleSize) + _ = otv.View(cloud) + + + + +.. image-sg:: /auto_examples/reliability_problems/images/sphx_glr_plot_rp89_002.png + :alt: Points X s.t. g(X) < 0.0 + :srcset: /auto_examples/reliability_problems/images/sphx_glr_plot_rp89_002.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 86-87 + +## Draw the limit state surface + +.. GENERATED FROM PYTHON SOURCE LINES 89-92 + +.. code-block:: Python + + bounds = ot.Interval(lowerBound, upperBound) + bounds + + + + + + +.. raw:: html + +
+ class=Interval name=Unnamed dimension=2 lower bound=class=Point name=Unnamed dimension=2 values=[-4.26489,-4.26489] upper bound=class=Point name=Unnamed dimension=2 values=[4.26489,4.26489] finite lower bound=[1,1] finite upper bound=[1,1] +
+
+
+ +.. GENERATED FROM PYTHON SOURCE LINES 93-97 + +.. code-block:: Python + + graph = drawEvent.drawLimitStateCrossCut(bounds) + graph.add(cloud) + graph + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + class=Graph name=Limit state surface implementation=class=GraphImplementation name=Limit state surface title=Limit state surface xTitle=x1 yTitle=x2 axes=ON grid=ON legendposition= legendFontSize=1 drawables=[class=Drawable name=Unnamed implementation=class=Contour name=Unnamed x=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=52 dimension=1 description=[t] data=[[-4.26489],[-4.09764],[-3.93039],[-3.76314],[-3.59589],[-3.42864],[-3.26139],[-3.09414],[-2.92689],[-2.75964],[-2.59238],[-2.42513],[-2.25788],[-2.09063],[-1.92338],[-1.75613],[-1.58888],[-1.42163],[-1.25438],[-1.08713],[-0.919878],[-0.752628],[-0.585377],[-0.418127],[-0.250876],[-0.0836253],[0.0836253],[0.250876],[0.418127],[0.585377],[0.752628],[0.919878],[1.08713],[1.25438],[1.42163],[1.58888],[1.75613],[1.92338],[2.09063],[2.25788],[2.42513],[2.59238],[2.75964],[2.92689],[3.09414],[3.26139],[3.42864],[3.59589],[3.76314],[3.93039],[4.09764],[4.26489]] y=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=52 dimension=1 description=[t] data=[[-4.26489],[-4.09764],[-3.93039],[-3.76314],[-3.59589],[-3.42864],[-3.26139],[-3.09414],[-2.92689],[-2.75964],[-2.59238],[-2.42513],[-2.25788],[-2.09063],[-1.92338],[-1.75613],[-1.58888],[-1.42163],[-1.25438],[-1.08713],[-0.919878],[-0.752628],[-0.585377],[-0.418127],[-0.250876],[-0.0836253],[0.0836253],[0.250876],[0.418127],[0.585377],[0.752628],[0.919878],[1.08713],[1.25438],[1.42163],[1.58888],[1.75613],[1.92338],[2.09063],[2.25788],[2.42513],[2.59238],[2.75964],[2.92689],[3.09414],[3.26139],[3.42864],[3.59589],[3.76314],[3.93039],[4.09764],[4.26489]] levels=class=Point name=Unnamed dimension=1 values=[0] labels=[0.0] show labels=true isFilled=false colorBarPosition=right isVminUsed=false vmin=0 isVmaxUsed=false vmax=0 colorMap=hsv alpha=1 norm=linear extend=both hatches=[] derived from class=DrawableImplementation name=Unnamed legend= data=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=2704 dimension=1 description=[gsys] data=[[-5.9244],[-4.52576],[-3.18307],...,[-11.7129],[-13.0555],[-14.4542]] color=#1f77b4 isColorExplicitlySet=true fillStyle=solid lineStyle=solid pointStyle=plus lineWidth=1,class=Drawable name=In implementation=class=Cloud name=In derived from class=DrawableImplementation name=In legend=In data=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=31 dimension=2 data=[[-3.01352,0.112633],[-3.37246,1.09885],[3.22392,0.539051],[-3.15091,0.467179],[3.53407,-1.32581],[3.18117,1.25944],[-3.43093,1.36363],[3.05948,1.38356],[2.41312,2.34129],[-2.87282,1.09854],[2.71642,2.03062],[3.69471,1.62344],[-3.0748,1.0553],[-3.01572,-0.165082],[3.18576,-1.33188],[-2.88973,0.210602],[2.85923,1.1158],[2.84719,2.45006],[-3.39305,0.212335],[3.10625,1.05095],[-3.15804,1.06164],[-2.52566,1.8857],[-3.10066,-0.875235],[-2.91842,0.361803],[3.15473,0.655098],[2.44915,2.76482],[-3.70165,0.567222],[3.46328,-0.0809341],[2.73285,1.24075],[3.17768,0.436789],[3.11773,-0.598048]] color=lightsalmon3 isColorExplicitlySet=true fillStyle=solid lineStyle=solid pointStyle=fsquare lineWidth=1,class=Drawable name=Out implementation=class=Cloud name=Out derived from class=DrawableImplementation name=Out legend=Out data=class=Sample name=Unnamed implementation=class=SampleImplementation name=Unnamed size=4969 dimension=2 data=[[-1.91606,0.236422],[1.25164,0.102166],[-1.33097,-0.400035],...,[0.698094,0.667918],[0.377201,-1.25336],[-0.0275436,-0.765434]] color=darkseagreen3 isColorExplicitlySet=true fillStyle=solid lineStyle=solid pointStyle=fsquare lineWidth=1] + + + +.. GENERATED FROM PYTHON SOURCE LINES 98-101 + +.. code-block:: Python + + domain = drawEvent.fillEventCrossCut(bounds) + _ = otv.View(domain) + + + + +.. image-sg:: /auto_examples/reliability_problems/images/sphx_glr_plot_rp89_003.png + :alt: Domain where g(x) < 0.0 + :srcset: /auto_examples/reliability_problems/images/sphx_glr_plot_rp89_003.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 102-105 + +.. code-block:: Python + + domain.add(cloud) + _ = otv.View(domain) + + + + +.. image-sg:: /auto_examples/reliability_problems/images/sphx_glr_plot_rp89_004.png + :alt: Domain where g(x) < 0.0 + :srcset: /auto_examples/reliability_problems/images/sphx_glr_plot_rp89_004.png + :class: sphx-glr-single-img + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 106-107 + +.. code-block:: Python + + otv.View.ShowAll() + + + + + + + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 1.621 seconds) + + +.. _sphx_glr_download_auto_examples_reliability_problems_plot_rp89.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: plot_rp89.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: plot_rp89.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: plot_rp89.zip ` diff --git a/otbenchmark/master/_sources/auto_examples/reliability_problems/sg_execution_times.rst b/otbenchmark/master/_sources/auto_examples/reliability_problems/sg_execution_times.rst new file mode 100644 index 00000000000..c23e5907c1e --- /dev/null +++ b/otbenchmark/master/_sources/auto_examples/reliability_problems/sg_execution_times.rst @@ -0,0 +1,94 @@ + +:orphan: + +.. _sphx_glr_auto_examples_reliability_problems_sg_execution_times: + + +Computation times +================= +**01:28.141** total execution time for 20 files **from auto_examples/reliability_problems**: + +.. container:: + + .. raw:: html + + + + + + + + .. list-table:: + :header-rows: 1 + :class: table table-striped sg-datatable + + * - Example + - Time + - Mem (MB) + * - :ref:`sphx_glr_auto_examples_reliability_problems_plot_rp25.py` (``plot_rp25.py``) + - 00:30.020 + - 0.0 + * - :ref:`sphx_glr_auto_examples_reliability_problems_plot_reliability_benchmark_table.py` (``plot_reliability_benchmark_table.py``) + - 00:14.618 + - 0.0 + * - :ref:`sphx_glr_auto_examples_reliability_problems_plot_rp111.py` (``plot_rp111.py``) + - 00:05.585 + - 0.0 + * - :ref:`sphx_glr_auto_examples_reliability_problems_plot_reliability_compute_reference_proba.py` (``plot_reliability_compute_reference_proba.py``) + - 00:04.315 + - 0.0 + * - :ref:`sphx_glr_auto_examples_reliability_problems_plot_rp28.py` (``plot_rp28.py``) + - 00:03.823 + - 0.0 + * - :ref:`sphx_glr_auto_examples_reliability_problems_plot_compute_reference_rp55_pf.py` (``plot_compute_reference_rp55_pf.py``) + - 00:03.643 + - 0.0 + * - :ref:`sphx_glr_auto_examples_reliability_problems_plot_rp31.py` (``plot_rp31.py``) + - 00:02.902 + - 0.0 + * - :ref:`sphx_glr_auto_examples_reliability_problems_plot_rp53.py` (``plot_rp53.py``) + - 00:02.872 + - 0.0 + * - :ref:`sphx_glr_auto_examples_reliability_problems_plot_rp57.py` (``plot_rp57.py``) + - 00:02.644 + - 0.0 + * - :ref:`sphx_glr_auto_examples_reliability_problems_plot_rp75.py` (``plot_rp75.py``) + - 00:02.634 + - 0.0 + * - :ref:`sphx_glr_auto_examples_reliability_problems_plot_four_branch_serial_system_waarts.py` (``plot_four_branch_serial_system_waarts.py``) + - 00:01.951 + - 0.0 + * - :ref:`sphx_glr_auto_examples_reliability_problems_plot_rp55.py` (``plot_rp55.py``) + - 00:01.906 + - 0.0 + * - :ref:`sphx_glr_auto_examples_reliability_problems_plot_rp35.py` (``plot_rp35.py``) + - 00:01.680 + - 0.0 + * - :ref:`sphx_glr_auto_examples_reliability_problems_plot_rp110.py` (``plot_rp110.py``) + - 00:01.677 + - 0.0 + * - :ref:`sphx_glr_auto_examples_reliability_problems_plot_case_rs.py` (``plot_case_rs.py``) + - 00:01.635 + - 0.0 + * - :ref:`sphx_glr_auto_examples_reliability_problems_plot_rp89.py` (``plot_rp89.py``) + - 00:01.621 + - 0.0 + * - :ref:`sphx_glr_auto_examples_reliability_problems_plot_rp22.py` (``plot_rp22.py``) + - 00:01.558 + - 0.0 + * - :ref:`sphx_glr_auto_examples_reliability_problems_plot_rp24.py` (``plot_rp24.py``) + - 00:01.554 + - 0.0 + * - :ref:`sphx_glr_auto_examples_reliability_problems_plot_reliability_benchmark.py` (``plot_reliability_benchmark.py``) + - 00:01.500 + - 0.0 + * - :ref:`sphx_glr_auto_examples_reliability_problems_plot_print_reliability_benchmark.py` (``plot_print_reliability_benchmark.py``) + - 00:00.003 + - 0.0 diff --git a/otbenchmark/master/_sources/auto_examples/sensitivity_problems/index.rst b/otbenchmark/master/_sources/auto_examples/sensitivity_problems/index.rst index 1cc1b1cd3ef..d5cb62a822c 100644 --- a/otbenchmark/master/_sources/auto_examples/sensitivity_problems/index.rst +++ b/otbenchmark/master/_sources/auto_examples/sensitivity_problems/index.rst @@ -30,6 +30,23 @@ Sensitivity examples +.. raw:: html + +
+ +.. only:: html + + .. image:: /auto_examples/sensitivity_problems/images/thumb/sphx_glr_plot_sensitivity_distribution_ishigami_thumb.png + :alt: + + :ref:`sphx_glr_auto_examples_sensitivity_problems_plot_sensitivity_distribution_ishigami.py` + +.. raw:: html + +
Distribution of the Sobol' indices on Ishigami function
+
+ + .. raw:: html
@@ -262,6 +279,7 @@ Sensitivity examples :hidden: /auto_examples/sensitivity_problems/plot_print_problems + /auto_examples/sensitivity_problems/plot_sensitivity_distribution_ishigami /auto_examples/sensitivity_problems/plot_flood_sensitivity /auto_examples/sensitivity_problems/plot_borgonovo_sensitivity /auto_examples/sensitivity_problems/plot_ishigami_sensitivity diff --git a/otbenchmark/master/_sources/auto_examples/sensitivity_problems/plot_benchmark_sensitivity_methods.rst b/otbenchmark/master/_sources/auto_examples/sensitivity_problems/plot_benchmark_sensitivity_methods.rst index e7958717c8a..9ee300da702 100644 --- a/otbenchmark/master/_sources/auto_examples/sensitivity_problems/plot_benchmark_sensitivity_methods.rst +++ b/otbenchmark/master/_sources/auto_examples/sensitivity_problems/plot_benchmark_sensitivity_methods.rst @@ -172,9 +172,9 @@ Compare with exact results .. code-block:: none Sample size : 10000 - Computed first order = [0.18553,0.173199,0.637105] + Computed first order = [0.149254,0.150909,0.6324] Exact first order = [0.157895,0.157895,0.631579] - Computed total order = [0.203344,0.210474,0.620406] + Computed total order = [0.206705,0.20729,0.634047] Exact total order = [0.210526,0.210526,0.631579] @@ -274,9 +274,9 @@ Compare with exact results .. code-block:: none Sample size : 500 - Computed first order = [0.18553,0.173199,0.637105] + Computed first order = [0.149254,0.150909,0.6324] Exact first order = [0.157895,0.157895,0.631579] - Computed total order = [0.203344,0.210474,0.620406] + Computed total order = [0.206705,0.20729,0.634047] Exact total order = [0.210526,0.210526,0.631579] @@ -352,17 +352,17 @@ Loop over the estimators Monte-Carlo sampling SaltelliSensitivityAlgorithm - S = [0.199997,0.180685,0.664071] - T = [0.223721,0.228732,0.6502] + S = [0.192492,0.117965,0.595832] + T = [0.19446,0.209448,0.65512] MartinezSensitivityAlgorithm - S = [0.191903,0.173622,0.638601] - T = [0.2242,0.207898,0.591462] + S = [0.170306,0.211477,0.70868] + T = [0.220431,0.197453,0.646255] JansenSensitivityAlgorithm - S = [0.0952801,0.125079,0.615803] - T = [0.253686,0.237742,0.592254] + S = [0.225202,0.227714,0.653031] + T = [0.234667,0.23139,0.526858] MauntzKucherenkoSensitivityAlgorithm - S = [0.205369,0.314775,0.698245] - T = [0.220371,0.172107,0.567821] + S = [0.22815,0.243767,0.640389] + T = [0.198879,0.148292,0.602978] @@ -554,7 +554,7 @@ The digit per point ratio measure the number of digits relatively to the sample .. rst-class:: sphx-glr-timing - **Total running time of the script:** (0 minutes 0.034 seconds) + **Total running time of the script:** (0 minutes 0.026 seconds) .. _sphx_glr_download_auto_examples_sensitivity_problems_plot_benchmark_sensitivity_methods.py: diff --git a/otbenchmark/master/_sources/auto_examples/sensitivity_problems/plot_borehole_sensitivity.rst b/otbenchmark/master/_sources/auto_examples/sensitivity_problems/plot_borehole_sensitivity.rst index 60250c68e5f..96a65f57ff5 100644 --- a/otbenchmark/master/_sources/auto_examples/sensitivity_problems/plot_borehole_sensitivity.rst +++ b/otbenchmark/master/_sources/auto_examples/sensitivity_problems/plot_borehole_sensitivity.rst @@ -318,7 +318,7 @@ Compare with exact results .. rst-class:: sphx-glr-timing - **Total running time of the script:** (0 minutes 3.696 seconds) + **Total running time of the script:** (0 minutes 2.472 seconds) .. _sphx_glr_download_auto_examples_sensitivity_problems_plot_borehole_sensitivity.py: diff --git a/otbenchmark/master/_sources/auto_examples/sensitivity_problems/plot_borgonovo_sensitivity.rst b/otbenchmark/master/_sources/auto_examples/sensitivity_problems/plot_borgonovo_sensitivity.rst index b356b8c58bb..a1656e54da5 100644 --- a/otbenchmark/master/_sources/auto_examples/sensitivity_problems/plot_borgonovo_sensitivity.rst +++ b/otbenchmark/master/_sources/auto_examples/sensitivity_problems/plot_borgonovo_sensitivity.rst @@ -318,7 +318,7 @@ Compare with exact results .. rst-class:: sphx-glr-timing - **Total running time of the script:** (0 minutes 1.145 seconds) + **Total running time of the script:** (0 minutes 1.087 seconds) .. _sphx_glr_download_auto_examples_sensitivity_problems_plot_borgonovo_sensitivity.py: diff --git a/otbenchmark/master/_sources/auto_examples/sensitivity_problems/plot_convergence_ishigami.rst b/otbenchmark/master/_sources/auto_examples/sensitivity_problems/plot_convergence_ishigami.rst index ceea9c95a27..af258a29c88 100644 --- a/otbenchmark/master/_sources/auto_examples/sensitivity_problems/plot_convergence_ishigami.rst +++ b/otbenchmark/master/_sources/auto_examples/sensitivity_problems/plot_convergence_ishigami.rst @@ -463,7 +463,7 @@ Use polynomial chaos. Elapsed = 0.1 (s), Sample size = 160 Elapsed = 0.6 (s), Sample size = 320 Elapsed = 3.1 (s), Sample size = 640 - Elapsed = 18.70 (s) + Elapsed = 18.66 (s) @@ -483,7 +483,7 @@ Use polynomial chaos. .. rst-class:: sphx-glr-timing - **Total running time of the script:** (0 minutes 45.054 seconds) + **Total running time of the script:** (0 minutes 51.212 seconds) .. _sphx_glr_download_auto_examples_sensitivity_problems_plot_convergence_ishigami.py: diff --git a/otbenchmark/master/_sources/auto_examples/sensitivity_problems/plot_dirichlet_sensitivity.rst b/otbenchmark/master/_sources/auto_examples/sensitivity_problems/plot_dirichlet_sensitivity.rst index e108acad3cb..797127a070f 100644 --- a/otbenchmark/master/_sources/auto_examples/sensitivity_problems/plot_dirichlet_sensitivity.rst +++ b/otbenchmark/master/_sources/auto_examples/sensitivity_problems/plot_dirichlet_sensitivity.rst @@ -318,7 +318,7 @@ Compare with exact results .. rst-class:: sphx-glr-timing - **Total running time of the script:** (0 minutes 2.273 seconds) + **Total running time of the script:** (0 minutes 2.227 seconds) .. _sphx_glr_download_auto_examples_sensitivity_problems_plot_dirichlet_sensitivity.py: diff --git a/otbenchmark/master/_sources/auto_examples/sensitivity_problems/plot_flood_sensitivity.rst b/otbenchmark/master/_sources/auto_examples/sensitivity_problems/plot_flood_sensitivity.rst index 91a7016915e..3e6c67d8b9a 100644 --- a/otbenchmark/master/_sources/auto_examples/sensitivity_problems/plot_flood_sensitivity.rst +++ b/otbenchmark/master/_sources/auto_examples/sensitivity_problems/plot_flood_sensitivity.rst @@ -328,7 +328,7 @@ Compare with exact results .. rst-class:: sphx-glr-timing - **Total running time of the script:** (0 minutes 2.451 seconds) + **Total running time of the script:** (0 minutes 2.555 seconds) .. _sphx_glr_download_auto_examples_sensitivity_problems_plot_flood_sensitivity.py: diff --git a/otbenchmark/master/_sources/auto_examples/sensitivity_problems/plot_gaussian_product_sensitivity.rst b/otbenchmark/master/_sources/auto_examples/sensitivity_problems/plot_gaussian_product_sensitivity.rst index 00565812625..afc9432496c 100644 --- a/otbenchmark/master/_sources/auto_examples/sensitivity_problems/plot_gaussian_product_sensitivity.rst +++ b/otbenchmark/master/_sources/auto_examples/sensitivity_problems/plot_gaussian_product_sensitivity.rst @@ -330,7 +330,7 @@ Compare with exact results .. rst-class:: sphx-glr-timing - **Total running time of the script:** (0 minutes 1.658 seconds) + **Total running time of the script:** (0 minutes 1.206 seconds) .. _sphx_glr_download_auto_examples_sensitivity_problems_plot_gaussian_product_sensitivity.py: diff --git a/otbenchmark/master/_sources/auto_examples/sensitivity_problems/plot_gaussian_sum.rst b/otbenchmark/master/_sources/auto_examples/sensitivity_problems/plot_gaussian_sum.rst index 80defe138fd..f0d021abf2b 100644 --- a/otbenchmark/master/_sources/auto_examples/sensitivity_problems/plot_gaussian_sum.rst +++ b/otbenchmark/master/_sources/auto_examples/sensitivity_problems/plot_gaussian_sum.rst @@ -330,7 +330,7 @@ Compare with exact results .. rst-class:: sphx-glr-timing - **Total running time of the script:** (0 minutes 1.770 seconds) + **Total running time of the script:** (0 minutes 1.212 seconds) .. _sphx_glr_download_auto_examples_sensitivity_problems_plot_gaussian_sum.py: diff --git a/otbenchmark/master/_sources/auto_examples/sensitivity_problems/plot_gsobol_sensitivity.rst b/otbenchmark/master/_sources/auto_examples/sensitivity_problems/plot_gsobol_sensitivity.rst index eada954f850..7632bf04947 100644 --- a/otbenchmark/master/_sources/auto_examples/sensitivity_problems/plot_gsobol_sensitivity.rst +++ b/otbenchmark/master/_sources/auto_examples/sensitivity_problems/plot_gsobol_sensitivity.rst @@ -339,7 +339,7 @@ Compare with exact results .. rst-class:: sphx-glr-timing - **Total running time of the script:** (0 minutes 2.334 seconds) + **Total running time of the script:** (0 minutes 2.509 seconds) .. _sphx_glr_download_auto_examples_sensitivity_problems_plot_gsobol_sensitivity.py: diff --git a/otbenchmark/master/_sources/auto_examples/sensitivity_problems/plot_ishigami_sensitivity.rst b/otbenchmark/master/_sources/auto_examples/sensitivity_problems/plot_ishigami_sensitivity.rst index 0ce0ecddc29..7410e472523 100644 --- a/otbenchmark/master/_sources/auto_examples/sensitivity_problems/plot_ishigami_sensitivity.rst +++ b/otbenchmark/master/_sources/auto_examples/sensitivity_problems/plot_ishigami_sensitivity.rst @@ -330,7 +330,7 @@ Compare with exact results .. rst-class:: sphx-glr-timing - **Total running time of the script:** (0 minutes 1.187 seconds) + **Total running time of the script:** (0 minutes 1.100 seconds) .. _sphx_glr_download_auto_examples_sensitivity_problems_plot_ishigami_sensitivity.py: diff --git a/otbenchmark/master/_sources/auto_examples/sensitivity_problems/plot_morris_sensitivity.rst b/otbenchmark/master/_sources/auto_examples/sensitivity_problems/plot_morris_sensitivity.rst index 3bc2afd5873..b8ad07e75cd 100644 --- a/otbenchmark/master/_sources/auto_examples/sensitivity_problems/plot_morris_sensitivity.rst +++ b/otbenchmark/master/_sources/auto_examples/sensitivity_problems/plot_morris_sensitivity.rst @@ -308,7 +308,7 @@ Compare with exact results .. rst-class:: sphx-glr-timing - **Total running time of the script:** (0 minutes 16.944 seconds) + **Total running time of the script:** (0 minutes 16.298 seconds) .. _sphx_glr_download_auto_examples_sensitivity_problems_plot_morris_sensitivity.py: diff --git a/otbenchmark/master/_sources/auto_examples/sensitivity_problems/plot_nloscillator_sensitivity.rst b/otbenchmark/master/_sources/auto_examples/sensitivity_problems/plot_nloscillator_sensitivity.rst index a5b1eb10717..c2c3fe9a2e7 100644 --- a/otbenchmark/master/_sources/auto_examples/sensitivity_problems/plot_nloscillator_sensitivity.rst +++ b/otbenchmark/master/_sources/auto_examples/sensitivity_problems/plot_nloscillator_sensitivity.rst @@ -318,7 +318,7 @@ Compare with exact results .. rst-class:: sphx-glr-timing - **Total running time of the script:** (0 minutes 3.807 seconds) + **Total running time of the script:** (0 minutes 6.260 seconds) .. _sphx_glr_download_auto_examples_sensitivity_problems_plot_nloscillator_sensitivity.py: diff --git a/otbenchmark/master/_sources/auto_examples/sensitivity_problems/plot_oakleyohagan_sensitivity.rst b/otbenchmark/master/_sources/auto_examples/sensitivity_problems/plot_oakleyohagan_sensitivity.rst index fde2ab72657..d7afa0ae756 100644 --- a/otbenchmark/master/_sources/auto_examples/sensitivity_problems/plot_oakleyohagan_sensitivity.rst +++ b/otbenchmark/master/_sources/auto_examples/sensitivity_problems/plot_oakleyohagan_sensitivity.rst @@ -308,7 +308,7 @@ Compare with exact results .. rst-class:: sphx-glr-timing - **Total running time of the script:** (0 minutes 1.088 seconds) + **Total running time of the script:** (0 minutes 1.788 seconds) .. _sphx_glr_download_auto_examples_sensitivity_problems_plot_oakleyohagan_sensitivity.py: diff --git a/otbenchmark/master/_sources/auto_examples/sensitivity_problems/plot_print_problems.rst b/otbenchmark/master/_sources/auto_examples/sensitivity_problems/plot_print_problems.rst index 1cf29e6d0cc..a32ba730fa0 100644 --- a/otbenchmark/master/_sources/auto_examples/sensitivity_problems/plot_print_problems.rst +++ b/otbenchmark/master/_sources/auto_examples/sensitivity_problems/plot_print_problems.rst @@ -178,7 +178,7 @@ For each problem in the benchmark, print the problem name and the exact Sobol' i .. rst-class:: sphx-glr-timing - **Total running time of the script:** (0 minutes 0.252 seconds) + **Total running time of the script:** (0 minutes 0.225 seconds) .. _sphx_glr_download_auto_examples_sensitivity_problems_plot_print_problems.py: diff --git a/otbenchmark/master/_sources/auto_examples/sensitivity_problems/plot_sensitivity_distribution_ishigami.rst b/otbenchmark/master/_sources/auto_examples/sensitivity_problems/plot_sensitivity_distribution_ishigami.rst new file mode 100644 index 00000000000..426f69a70c3 --- /dev/null +++ b/otbenchmark/master/_sources/auto_examples/sensitivity_problems/plot_sensitivity_distribution_ishigami.rst @@ -0,0 +1,501 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "auto_examples/sensitivity_problems/plot_sensitivity_distribution_ishigami.py" +.. LINE NUMBERS ARE GIVEN BELOW. + +.. only:: html + + .. note:: + :class: sphx-glr-download-link-note + + :ref:`Go to the end ` + to download the full example code. + +.. rst-class:: sphx-glr-example-title + +.. _sphx_glr_auto_examples_sensitivity_problems_plot_sensitivity_distribution_ishigami.py: + + +Distribution of the Sobol' indices on Ishigami function +======================================================= + +.. GENERATED FROM PYTHON SOURCE LINES 7-16 + +In this document, we consider the Ishigami function and check the distribution of the sensitivity indices. +We check that it is consistent with the actual distribution of the estimator. + +The problem is that the exact distribution of the estimator is unknown in general. +The asymptotic distribution is known, but this may not reflect the true distribution +when the sample size is not large enough. +In order to get a reference distribution of the estimator, we generate a Monte-Carlo sample of the Sobol' indices, +but repeating the estimation of the Sobol' indices on indepedent sub-samples. +Then we use kernel smoothing to approximate the actual distribution of the Sobol' indices. + +.. GENERATED FROM PYTHON SOURCE LINES 18-23 + +.. code-block:: Python + + import openturns as ot + import otbenchmark as otb + import openturns.viewer as otv + import pylab as pl + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 24-30 + +When we estimate Sobol' indices, we may encounter the following warning messages: +``` +WRN - The estimated first order Sobol index (2) is greater than its total order index ... +WRN - The estimated total order Sobol index (2) is lesser than first order index ... +``` +Lots of these messages are printed in the current Notebook. This is why we disable them with: + +.. GENERATED FROM PYTHON SOURCE LINES 30-32 + +.. code-block:: Python + + ot.Log.Show(ot.Log.NONE) + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 33-36 + +.. code-block:: Python + + problem = otb.IshigamiSensitivity() + print(problem) + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + name = Ishigami + distribution = ComposedDistribution(Uniform(a = -3.14159, b = 3.14159), Uniform(a = -3.14159, b = 3.14159), Uniform(a = -3.14159, b = 3.14159), IndependentCopula(dimension = 3)) + function = ParametricEvaluation([X1,X2,X3,a,b]->[sin(X1) + a * sin(X2)^2 + b * X3^4 * sin(X1)], parameters positions=[3,4], parameters=[a : 7, b : 0.1], input positions=[0,1,2]) + firstOrderIndices = [0.313905,0.442411,0] + totalOrderIndices = [0.557589,0.442411,0.243684] + + + + +.. GENERATED FROM PYTHON SOURCE LINES 37-67 + +In the following loop, we compare the distribution of the sensitivity indices computed and the actual distribution +of the estimator computed by Monte-Carlo sampling (using kernel smoothing). +The distribution of the sensitivity indices can be computed either from bootstrap +(using kernel smoothing to approximate the distribution) +or from asymptotic analysis (using a Gaussian distribution). + +In both cases, the distribution is estimated using one sample only. +On the contrary, the actual distribution of the estimator (i.e. the reference distribution) is computed +by generating independent realizations of the estimator. +Hence, it is expected that the distribution computed is not centered on the true value of the sensitivity indices. +Instead, the distribution based on the sample of estimators must be centered on the true value of the index, +since these estimators are consistent, converge to the true value when the sample size increase +and have no observable bias (although this is not proven by theory). + +The two essential parameters in the script are the following: + +- `sampleSize` is the size of the sample used to estimated on set of sensitivity + indices (the number of sensitivity indices is equal to twice, because of first and total order Sobol' indices, + the product of the number of input variables), +- `numberOfRepetitions` is the size of the Monte-Carlo sample of sensitivity indices. + +We do not necessarily want to use a large value of `sampleSize`. +This may be required, however, if we want to check the asymptotic distribution computed, +because the asymptotic regime may not be reached for small values and the code cannot be blamed for that. +This is why the asymptotic option may fail if `sampleSize` is not large enough. +The bootstrap option may fail too, because the sample size may be so small that re-sampling +in the basic sample may not provide enough variability. + +The value of `numberOfRepetitions` must be as large as possible because it ensures that +the reference distribution used for this verification is accurate enough. + +.. GENERATED FROM PYTHON SOURCE LINES 69-109 + +.. code-block:: Python + + numberOfRepetitions = 100 # Larger is better + problem = otb.IshigamiSensitivity() + metaSAAlgorithm = otb.SensitivityBenchmarkMetaAlgorithm(problem) + for sampleSize in [100, 200, 400, 800]: + print("sampleSize=", sampleSize) + for useAsymptotic in [False, True]: + if useAsymptotic: + label = "Asymptotic" + else: + label = "Bootstrap" + print(label) + ot.ResourceMap.SetAsBool( + "SobolIndicesAlgorithm-DefaultUseAsymptoticDistribution", useAsymptotic + ) + for estimator in ["Saltelli", "Martinez", "Jansen", "MauntzKucherenko"]: + print("Estimator:", estimator) + benchmark = otb.SensitivityDistribution( + problem, + metaSAAlgorithm, + sampleSize, + numberOfRepetitions=numberOfRepetitions, + estimator=estimator, + ) + grid = benchmark.draw() + view = otv.View(grid) + figure = view.getFigure() + _ = figure.suptitle( + "n = %d, %s, %s. %s." + % (sampleSize, problem.getName(), estimator, label) + ) + _ = figure.set_figwidth(8.0) + _ = figure.set_figheight(6.0) + _ = figure.subplots_adjust(wspace=0.4, hspace=0.4) + # Customize legends + ax = figure.get_axes() + for i in range(len(ax) - 1): + _ = ax[i].legend("") + _ = ax[-1].legend(bbox_to_anchor=(1.0, 1.0)) + _ = pl.show() + + + + +.. rst-class:: sphx-glr-horizontal + + + * + + .. image-sg:: /auto_examples/sensitivity_problems/images/sphx_glr_plot_sensitivity_distribution_ishigami_001.png + :alt: n = 100, Ishigami, Saltelli. Bootstrap. + :srcset: /auto_examples/sensitivity_problems/images/sphx_glr_plot_sensitivity_distribution_ishigami_001.png + :class: sphx-glr-multi-img + + * + + .. image-sg:: /auto_examples/sensitivity_problems/images/sphx_glr_plot_sensitivity_distribution_ishigami_002.png + :alt: n = 100, Ishigami, Martinez. Bootstrap. + :srcset: /auto_examples/sensitivity_problems/images/sphx_glr_plot_sensitivity_distribution_ishigami_002.png + :class: sphx-glr-multi-img + + * + + .. image-sg:: /auto_examples/sensitivity_problems/images/sphx_glr_plot_sensitivity_distribution_ishigami_003.png + :alt: n = 100, Ishigami, Jansen. Bootstrap. + :srcset: /auto_examples/sensitivity_problems/images/sphx_glr_plot_sensitivity_distribution_ishigami_003.png + :class: sphx-glr-multi-img + + * + + .. image-sg:: /auto_examples/sensitivity_problems/images/sphx_glr_plot_sensitivity_distribution_ishigami_004.png + :alt: n = 100, Ishigami, MauntzKucherenko. Bootstrap. + :srcset: /auto_examples/sensitivity_problems/images/sphx_glr_plot_sensitivity_distribution_ishigami_004.png + :class: sphx-glr-multi-img + + * + + .. image-sg:: /auto_examples/sensitivity_problems/images/sphx_glr_plot_sensitivity_distribution_ishigami_005.png + :alt: n = 100, Ishigami, Saltelli. Asymptotic. + :srcset: /auto_examples/sensitivity_problems/images/sphx_glr_plot_sensitivity_distribution_ishigami_005.png + :class: sphx-glr-multi-img + + * + + .. image-sg:: /auto_examples/sensitivity_problems/images/sphx_glr_plot_sensitivity_distribution_ishigami_006.png + :alt: n = 100, Ishigami, Martinez. Asymptotic. + :srcset: /auto_examples/sensitivity_problems/images/sphx_glr_plot_sensitivity_distribution_ishigami_006.png + :class: sphx-glr-multi-img + + * + + .. image-sg:: /auto_examples/sensitivity_problems/images/sphx_glr_plot_sensitivity_distribution_ishigami_007.png + :alt: n = 100, Ishigami, Jansen. Asymptotic. + :srcset: /auto_examples/sensitivity_problems/images/sphx_glr_plot_sensitivity_distribution_ishigami_007.png + :class: sphx-glr-multi-img + + * + + .. image-sg:: /auto_examples/sensitivity_problems/images/sphx_glr_plot_sensitivity_distribution_ishigami_008.png + :alt: n = 100, Ishigami, MauntzKucherenko. Asymptotic. + :srcset: /auto_examples/sensitivity_problems/images/sphx_glr_plot_sensitivity_distribution_ishigami_008.png + :class: sphx-glr-multi-img + + * + + .. image-sg:: /auto_examples/sensitivity_problems/images/sphx_glr_plot_sensitivity_distribution_ishigami_009.png + :alt: n = 200, Ishigami, Saltelli. Bootstrap. + :srcset: /auto_examples/sensitivity_problems/images/sphx_glr_plot_sensitivity_distribution_ishigami_009.png + :class: sphx-glr-multi-img + + * + + .. image-sg:: /auto_examples/sensitivity_problems/images/sphx_glr_plot_sensitivity_distribution_ishigami_010.png + :alt: n = 200, Ishigami, Martinez. Bootstrap. + :srcset: /auto_examples/sensitivity_problems/images/sphx_glr_plot_sensitivity_distribution_ishigami_010.png + :class: sphx-glr-multi-img + + * + + .. image-sg:: /auto_examples/sensitivity_problems/images/sphx_glr_plot_sensitivity_distribution_ishigami_011.png + :alt: n = 200, Ishigami, Jansen. Bootstrap. + :srcset: /auto_examples/sensitivity_problems/images/sphx_glr_plot_sensitivity_distribution_ishigami_011.png + :class: sphx-glr-multi-img + + * + + .. image-sg:: /auto_examples/sensitivity_problems/images/sphx_glr_plot_sensitivity_distribution_ishigami_012.png + :alt: n = 200, Ishigami, MauntzKucherenko. Bootstrap. + :srcset: /auto_examples/sensitivity_problems/images/sphx_glr_plot_sensitivity_distribution_ishigami_012.png + :class: sphx-glr-multi-img + + * + + .. image-sg:: /auto_examples/sensitivity_problems/images/sphx_glr_plot_sensitivity_distribution_ishigami_013.png + :alt: n = 200, Ishigami, Saltelli. Asymptotic. + :srcset: /auto_examples/sensitivity_problems/images/sphx_glr_plot_sensitivity_distribution_ishigami_013.png + :class: sphx-glr-multi-img + + * + + .. image-sg:: /auto_examples/sensitivity_problems/images/sphx_glr_plot_sensitivity_distribution_ishigami_014.png + :alt: n = 200, Ishigami, Martinez. Asymptotic. + :srcset: /auto_examples/sensitivity_problems/images/sphx_glr_plot_sensitivity_distribution_ishigami_014.png + :class: sphx-glr-multi-img + + * + + .. image-sg:: /auto_examples/sensitivity_problems/images/sphx_glr_plot_sensitivity_distribution_ishigami_015.png + :alt: n = 200, Ishigami, Jansen. Asymptotic. + :srcset: /auto_examples/sensitivity_problems/images/sphx_glr_plot_sensitivity_distribution_ishigami_015.png + :class: sphx-glr-multi-img + + * + + .. image-sg:: /auto_examples/sensitivity_problems/images/sphx_glr_plot_sensitivity_distribution_ishigami_016.png + :alt: n = 200, Ishigami, MauntzKucherenko. Asymptotic. + :srcset: /auto_examples/sensitivity_problems/images/sphx_glr_plot_sensitivity_distribution_ishigami_016.png + :class: sphx-glr-multi-img + + * + + .. image-sg:: /auto_examples/sensitivity_problems/images/sphx_glr_plot_sensitivity_distribution_ishigami_017.png + :alt: n = 400, Ishigami, Saltelli. Bootstrap. + :srcset: /auto_examples/sensitivity_problems/images/sphx_glr_plot_sensitivity_distribution_ishigami_017.png + :class: sphx-glr-multi-img + + * + + .. image-sg:: /auto_examples/sensitivity_problems/images/sphx_glr_plot_sensitivity_distribution_ishigami_018.png + :alt: n = 400, Ishigami, Martinez. Bootstrap. + :srcset: /auto_examples/sensitivity_problems/images/sphx_glr_plot_sensitivity_distribution_ishigami_018.png + :class: sphx-glr-multi-img + + * + + .. image-sg:: /auto_examples/sensitivity_problems/images/sphx_glr_plot_sensitivity_distribution_ishigami_019.png + :alt: n = 400, Ishigami, Jansen. Bootstrap. + :srcset: /auto_examples/sensitivity_problems/images/sphx_glr_plot_sensitivity_distribution_ishigami_019.png + :class: sphx-glr-multi-img + + * + + .. image-sg:: /auto_examples/sensitivity_problems/images/sphx_glr_plot_sensitivity_distribution_ishigami_020.png + :alt: n = 400, Ishigami, MauntzKucherenko. Bootstrap. + :srcset: /auto_examples/sensitivity_problems/images/sphx_glr_plot_sensitivity_distribution_ishigami_020.png + :class: sphx-glr-multi-img + + * + + .. image-sg:: /auto_examples/sensitivity_problems/images/sphx_glr_plot_sensitivity_distribution_ishigami_021.png + :alt: n = 400, Ishigami, Saltelli. Asymptotic. + :srcset: /auto_examples/sensitivity_problems/images/sphx_glr_plot_sensitivity_distribution_ishigami_021.png + :class: sphx-glr-multi-img + + * + + .. image-sg:: /auto_examples/sensitivity_problems/images/sphx_glr_plot_sensitivity_distribution_ishigami_022.png + :alt: n = 400, Ishigami, Martinez. Asymptotic. + :srcset: /auto_examples/sensitivity_problems/images/sphx_glr_plot_sensitivity_distribution_ishigami_022.png + :class: sphx-glr-multi-img + + * + + .. image-sg:: /auto_examples/sensitivity_problems/images/sphx_glr_plot_sensitivity_distribution_ishigami_023.png + :alt: n = 400, Ishigami, Jansen. Asymptotic. + :srcset: /auto_examples/sensitivity_problems/images/sphx_glr_plot_sensitivity_distribution_ishigami_023.png + :class: sphx-glr-multi-img + + * + + .. image-sg:: /auto_examples/sensitivity_problems/images/sphx_glr_plot_sensitivity_distribution_ishigami_024.png + :alt: n = 400, Ishigami, MauntzKucherenko. Asymptotic. + :srcset: /auto_examples/sensitivity_problems/images/sphx_glr_plot_sensitivity_distribution_ishigami_024.png + :class: sphx-glr-multi-img + + * + + .. image-sg:: /auto_examples/sensitivity_problems/images/sphx_glr_plot_sensitivity_distribution_ishigami_025.png + :alt: n = 800, Ishigami, Saltelli. Bootstrap. + :srcset: /auto_examples/sensitivity_problems/images/sphx_glr_plot_sensitivity_distribution_ishigami_025.png + :class: sphx-glr-multi-img + + * + + .. image-sg:: /auto_examples/sensitivity_problems/images/sphx_glr_plot_sensitivity_distribution_ishigami_026.png + :alt: n = 800, Ishigami, Martinez. Bootstrap. + :srcset: /auto_examples/sensitivity_problems/images/sphx_glr_plot_sensitivity_distribution_ishigami_026.png + :class: sphx-glr-multi-img + + * + + .. image-sg:: /auto_examples/sensitivity_problems/images/sphx_glr_plot_sensitivity_distribution_ishigami_027.png + :alt: n = 800, Ishigami, Jansen. Bootstrap. + :srcset: /auto_examples/sensitivity_problems/images/sphx_glr_plot_sensitivity_distribution_ishigami_027.png + :class: sphx-glr-multi-img + + * + + .. image-sg:: /auto_examples/sensitivity_problems/images/sphx_glr_plot_sensitivity_distribution_ishigami_028.png + :alt: n = 800, Ishigami, MauntzKucherenko. Bootstrap. + :srcset: /auto_examples/sensitivity_problems/images/sphx_glr_plot_sensitivity_distribution_ishigami_028.png + :class: sphx-glr-multi-img + + * + + .. image-sg:: /auto_examples/sensitivity_problems/images/sphx_glr_plot_sensitivity_distribution_ishigami_029.png + :alt: n = 800, Ishigami, Saltelli. Asymptotic. + :srcset: /auto_examples/sensitivity_problems/images/sphx_glr_plot_sensitivity_distribution_ishigami_029.png + :class: sphx-glr-multi-img + + * + + .. image-sg:: /auto_examples/sensitivity_problems/images/sphx_glr_plot_sensitivity_distribution_ishigami_030.png + :alt: n = 800, Ishigami, Martinez. Asymptotic. + :srcset: /auto_examples/sensitivity_problems/images/sphx_glr_plot_sensitivity_distribution_ishigami_030.png + :class: sphx-glr-multi-img + + * + + .. image-sg:: /auto_examples/sensitivity_problems/images/sphx_glr_plot_sensitivity_distribution_ishigami_031.png + :alt: n = 800, Ishigami, Jansen. Asymptotic. + :srcset: /auto_examples/sensitivity_problems/images/sphx_glr_plot_sensitivity_distribution_ishigami_031.png + :class: sphx-glr-multi-img + + * + + .. image-sg:: /auto_examples/sensitivity_problems/images/sphx_glr_plot_sensitivity_distribution_ishigami_032.png + :alt: n = 800, Ishigami, MauntzKucherenko. Asymptotic. + :srcset: /auto_examples/sensitivity_problems/images/sphx_glr_plot_sensitivity_distribution_ishigami_032.png + :class: sphx-glr-multi-img + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + sampleSize= 100 + Bootstrap + Estimator: Saltelli + Estimator: Martinez + Estimator: Jansen + Estimator: MauntzKucherenko + Asymptotic + Estimator: Saltelli + Estimator: Martinez + Estimator: Jansen + Estimator: MauntzKucherenko + sampleSize= 200 + Bootstrap + Estimator: Saltelli + Estimator: Martinez + Estimator: Jansen + Estimator: MauntzKucherenko + Asymptotic + Estimator: Saltelli + Estimator: Martinez + Estimator: Jansen + Estimator: MauntzKucherenko + sampleSize= 400 + Bootstrap + Estimator: Saltelli + Estimator: Martinez + Estimator: Jansen + Estimator: MauntzKucherenko + Asymptotic + Estimator: Saltelli + /opt/hostedtoolcache/Python/3.9.20/x64/lib/python3.9/site-packages/openturns/viewer.py:282: RuntimeWarning: More than 20 figures have been opened. Figures created through the pyplot interface (`matplotlib.pyplot.figure`) are retained until explicitly closed and may consume too much memory. (To control this warning, see the rcParam `figure.max_open_warning`). + self._fig = plt.figure(**figure_kw) + Estimator: Martinez + Estimator: Jansen + Estimator: MauntzKucherenko + sampleSize= 800 + Bootstrap + Estimator: Saltelli + Estimator: Martinez + Estimator: Jansen + Estimator: MauntzKucherenko + Asymptotic + Estimator: Saltelli + Estimator: Martinez + Estimator: Jansen + Estimator: MauntzKucherenko + + + + +.. GENERATED FROM PYTHON SOURCE LINES 110-126 + +The plot compare two distributions. + +- The "Computed" distribution is the one computed by OpenTURNS. +- The "Sample" distribution is the one generated by Monte-Carlo sampling. + +The fact that the "Computed" distribution is not centered on the true value is an +expected property of the way the distribution is computed. +What must be checked, instead, is the the variance of the distribution. +More precisely, we check that the asymptotic covariance is correctly computed by the library. +In other words, we focus on the spread of the distribution and check that it is consistent with the actual spread. +This comparison is, however, restricted by the fact that the re-sampling size has a limited size +equal to the `numberOfRepetitions` parameter. Increasing this parameter allows the check to be more accurate, +but increases the simulation elapsed time. + +We see that these distributions are never far away from each other. +This proves that the computation of the distribution is correct, for both the asymptotic and bootstrap options. + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** (0 minutes 17.456 seconds) + + +.. _sphx_glr_download_auto_examples_sensitivity_problems_plot_sensitivity_distribution_ishigami.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: plot_sensitivity_distribution_ishigami.ipynb ` + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: plot_sensitivity_distribution_ishigami.py ` + + .. container:: sphx-glr-download sphx-glr-download-zip + + :download:`Download zipped: plot_sensitivity_distribution_ishigami.zip ` diff --git a/otbenchmark/master/_sources/auto_examples/sensitivity_problems/sg_execution_times.rst b/otbenchmark/master/_sources/auto_examples/sensitivity_problems/sg_execution_times.rst index 3608e6f635a..bda5273e27d 100644 --- a/otbenchmark/master/_sources/auto_examples/sensitivity_problems/sg_execution_times.rst +++ b/otbenchmark/master/_sources/auto_examples/sensitivity_problems/sg_execution_times.rst @@ -6,7 +6,7 @@ Computation times ================= -**01:23.694** total execution time for 14 files **from auto_examples/sensitivity_problems**: +**01:47.634** total execution time for 15 files **from auto_examples/sensitivity_problems**: .. container:: @@ -33,44 +33,47 @@ Computation times - Time - Mem (MB) * - :ref:`sphx_glr_auto_examples_sensitivity_problems_plot_convergence_ishigami.py` (``plot_convergence_ishigami.py``) - - 00:45.054 + - 00:51.212 + - 0.0 + * - :ref:`sphx_glr_auto_examples_sensitivity_problems_plot_sensitivity_distribution_ishigami.py` (``plot_sensitivity_distribution_ishigami.py``) + - 00:17.456 - 0.0 * - :ref:`sphx_glr_auto_examples_sensitivity_problems_plot_morris_sensitivity.py` (``plot_morris_sensitivity.py``) - - 00:16.944 + - 00:16.298 - 0.0 * - :ref:`sphx_glr_auto_examples_sensitivity_problems_plot_nloscillator_sensitivity.py` (``plot_nloscillator_sensitivity.py``) - - 00:03.807 - - 0.0 - * - :ref:`sphx_glr_auto_examples_sensitivity_problems_plot_borehole_sensitivity.py` (``plot_borehole_sensitivity.py``) - - 00:03.696 + - 00:06.260 - 0.0 * - :ref:`sphx_glr_auto_examples_sensitivity_problems_plot_flood_sensitivity.py` (``plot_flood_sensitivity.py``) - - 00:02.451 + - 00:02.555 - 0.0 * - :ref:`sphx_glr_auto_examples_sensitivity_problems_plot_gsobol_sensitivity.py` (``plot_gsobol_sensitivity.py``) - - 00:02.334 + - 00:02.509 + - 0.0 + * - :ref:`sphx_glr_auto_examples_sensitivity_problems_plot_borehole_sensitivity.py` (``plot_borehole_sensitivity.py``) + - 00:02.472 - 0.0 * - :ref:`sphx_glr_auto_examples_sensitivity_problems_plot_dirichlet_sensitivity.py` (``plot_dirichlet_sensitivity.py``) - - 00:02.273 + - 00:02.227 + - 0.0 + * - :ref:`sphx_glr_auto_examples_sensitivity_problems_plot_oakleyohagan_sensitivity.py` (``plot_oakleyohagan_sensitivity.py``) + - 00:01.788 - 0.0 * - :ref:`sphx_glr_auto_examples_sensitivity_problems_plot_gaussian_sum.py` (``plot_gaussian_sum.py``) - - 00:01.770 + - 00:01.212 - 0.0 * - :ref:`sphx_glr_auto_examples_sensitivity_problems_plot_gaussian_product_sensitivity.py` (``plot_gaussian_product_sensitivity.py``) - - 00:01.658 + - 00:01.206 - 0.0 * - :ref:`sphx_glr_auto_examples_sensitivity_problems_plot_ishigami_sensitivity.py` (``plot_ishigami_sensitivity.py``) - - 00:01.187 + - 00:01.100 - 0.0 * - :ref:`sphx_glr_auto_examples_sensitivity_problems_plot_borgonovo_sensitivity.py` (``plot_borgonovo_sensitivity.py``) - - 00:01.145 - - 0.0 - * - :ref:`sphx_glr_auto_examples_sensitivity_problems_plot_oakleyohagan_sensitivity.py` (``plot_oakleyohagan_sensitivity.py``) - - 00:01.088 + - 00:01.087 - 0.0 * - :ref:`sphx_glr_auto_examples_sensitivity_problems_plot_print_problems.py` (``plot_print_problems.py``) - - 00:00.252 + - 00:00.225 - 0.0 * - :ref:`sphx_glr_auto_examples_sensitivity_problems_plot_benchmark_sensitivity_methods.py` (``plot_benchmark_sensitivity_methods.py``) - - 00:00.034 + - 00:00.026 - 0.0 diff --git a/otbenchmark/master/_sources/auto_examples/sg_execution_times.rst b/otbenchmark/master/_sources/auto_examples/sg_execution_times.rst index f3616dc40f5..1a1cb7ceacc 100644 --- a/otbenchmark/master/_sources/auto_examples/sg_execution_times.rst +++ b/otbenchmark/master/_sources/auto_examples/sg_execution_times.rst @@ -6,7 +6,7 @@ Computation times ================= -**00:23.239** total execution time for 6 files **from auto_examples**: +**00:23.205** total execution time for 6 files **from auto_examples**: .. container:: @@ -33,20 +33,20 @@ Computation times - Time - Mem (MB) * - :ref:`sphx_glr_auto_examples_plot_crosscut_distribution_3d.py` (``plot_crosscut_distribution_3d.py``) - - 00:07.724 + - 00:07.691 - 0.0 * - :ref:`sphx_glr_auto_examples_plot_methodFactory.py` (``plot_methodFactory.py``) - - 00:07.465 + - 00:07.477 - 0.0 * - :ref:`sphx_glr_auto_examples_plot_ConditionalDistribution_Demo.py` (``plot_ConditionalDistribution_Demo.py``) - - 00:02.577 + - 00:02.595 - 0.0 * - :ref:`sphx_glr_auto_examples_plot_convergence_reliability_mc.py` (``plot_convergence_reliability_mc.py``) - - 00:02.177 + - 00:02.194 - 0.0 * - :ref:`sphx_glr_auto_examples_plot_crosscut_distribution_2d.py` (``plot_crosscut_distribution_2d.py``) - - 00:02.066 + - 00:02.064 - 0.0 * - :ref:`sphx_glr_auto_examples_plot_CrossCutFunction_Demo.py` (``plot_CrossCutFunction_Demo.py``) - - 00:01.229 + - 00:01.184 - 0.0 diff --git a/otbenchmark/master/_sources/sg_execution_times.rst b/otbenchmark/master/_sources/sg_execution_times.rst index 2a0d646c170..228cb21fddb 100644 --- a/otbenchmark/master/_sources/sg_execution_times.rst +++ b/otbenchmark/master/_sources/sg_execution_times.rst @@ -6,7 +6,7 @@ Computation times ================= -**01:46.932** total execution time for 20 files **from all galleries**: +**03:38.980** total execution time for 41 files **from all galleries**: .. container:: @@ -33,62 +33,125 @@ Computation times - Time - Mem (MB) * - :ref:`sphx_glr_auto_examples_sensitivity_problems_plot_convergence_ishigami.py` (``examples/sensitivity_problems/plot_convergence_ishigami.py``) - - 00:45.054 + - 00:51.212 + - 0.0 + * - :ref:`sphx_glr_auto_examples_reliability_problems_plot_rp25.py` (``examples/reliability_problems/plot_rp25.py``) + - 00:30.020 + - 0.0 + * - :ref:`sphx_glr_auto_examples_sensitivity_problems_plot_sensitivity_distribution_ishigami.py` (``examples/sensitivity_problems/plot_sensitivity_distribution_ishigami.py``) + - 00:17.456 - 0.0 * - :ref:`sphx_glr_auto_examples_sensitivity_problems_plot_morris_sensitivity.py` (``examples/sensitivity_problems/plot_morris_sensitivity.py``) - - 00:16.944 + - 00:16.298 + - 0.0 + * - :ref:`sphx_glr_auto_examples_reliability_problems_plot_reliability_benchmark_table.py` (``examples/reliability_problems/plot_reliability_benchmark_table.py``) + - 00:14.618 - 0.0 * - :ref:`sphx_glr_auto_examples_plot_crosscut_distribution_3d.py` (``examples/plot_crosscut_distribution_3d.py``) - - 00:07.724 + - 00:07.691 - 0.0 * - :ref:`sphx_glr_auto_examples_plot_methodFactory.py` (``examples/plot_methodFactory.py``) - - 00:07.465 + - 00:07.477 - 0.0 * - :ref:`sphx_glr_auto_examples_sensitivity_problems_plot_nloscillator_sensitivity.py` (``examples/sensitivity_problems/plot_nloscillator_sensitivity.py``) - - 00:03.807 + - 00:06.260 - 0.0 - * - :ref:`sphx_glr_auto_examples_sensitivity_problems_plot_borehole_sensitivity.py` (``examples/sensitivity_problems/plot_borehole_sensitivity.py``) - - 00:03.696 + * - :ref:`sphx_glr_auto_examples_reliability_problems_plot_rp111.py` (``examples/reliability_problems/plot_rp111.py``) + - 00:05.585 + - 0.0 + * - :ref:`sphx_glr_auto_examples_reliability_problems_plot_reliability_compute_reference_proba.py` (``examples/reliability_problems/plot_reliability_compute_reference_proba.py``) + - 00:04.315 + - 0.0 + * - :ref:`sphx_glr_auto_examples_reliability_problems_plot_rp28.py` (``examples/reliability_problems/plot_rp28.py``) + - 00:03.823 + - 0.0 + * - :ref:`sphx_glr_auto_examples_reliability_problems_plot_compute_reference_rp55_pf.py` (``examples/reliability_problems/plot_compute_reference_rp55_pf.py``) + - 00:03.643 + - 0.0 + * - :ref:`sphx_glr_auto_examples_reliability_problems_plot_rp31.py` (``examples/reliability_problems/plot_rp31.py``) + - 00:02.902 + - 0.0 + * - :ref:`sphx_glr_auto_examples_reliability_problems_plot_rp53.py` (``examples/reliability_problems/plot_rp53.py``) + - 00:02.872 + - 0.0 + * - :ref:`sphx_glr_auto_examples_reliability_problems_plot_rp57.py` (``examples/reliability_problems/plot_rp57.py``) + - 00:02.644 + - 0.0 + * - :ref:`sphx_glr_auto_examples_reliability_problems_plot_rp75.py` (``examples/reliability_problems/plot_rp75.py``) + - 00:02.634 - 0.0 * - :ref:`sphx_glr_auto_examples_plot_ConditionalDistribution_Demo.py` (``examples/plot_ConditionalDistribution_Demo.py``) - - 00:02.577 + - 00:02.595 - 0.0 * - :ref:`sphx_glr_auto_examples_sensitivity_problems_plot_flood_sensitivity.py` (``examples/sensitivity_problems/plot_flood_sensitivity.py``) - - 00:02.451 + - 00:02.555 - 0.0 * - :ref:`sphx_glr_auto_examples_sensitivity_problems_plot_gsobol_sensitivity.py` (``examples/sensitivity_problems/plot_gsobol_sensitivity.py``) - - 00:02.334 + - 00:02.509 + - 0.0 + * - :ref:`sphx_glr_auto_examples_sensitivity_problems_plot_borehole_sensitivity.py` (``examples/sensitivity_problems/plot_borehole_sensitivity.py``) + - 00:02.472 - 0.0 * - :ref:`sphx_glr_auto_examples_sensitivity_problems_plot_dirichlet_sensitivity.py` (``examples/sensitivity_problems/plot_dirichlet_sensitivity.py``) - - 00:02.273 + - 00:02.227 - 0.0 * - :ref:`sphx_glr_auto_examples_plot_convergence_reliability_mc.py` (``examples/plot_convergence_reliability_mc.py``) - - 00:02.177 + - 00:02.194 - 0.0 * - :ref:`sphx_glr_auto_examples_plot_crosscut_distribution_2d.py` (``examples/plot_crosscut_distribution_2d.py``) - - 00:02.066 + - 00:02.064 + - 0.0 + * - :ref:`sphx_glr_auto_examples_reliability_problems_plot_four_branch_serial_system_waarts.py` (``examples/reliability_problems/plot_four_branch_serial_system_waarts.py``) + - 00:01.951 + - 0.0 + * - :ref:`sphx_glr_auto_examples_reliability_problems_plot_rp55.py` (``examples/reliability_problems/plot_rp55.py``) + - 00:01.906 + - 0.0 + * - :ref:`sphx_glr_auto_examples_sensitivity_problems_plot_oakleyohagan_sensitivity.py` (``examples/sensitivity_problems/plot_oakleyohagan_sensitivity.py``) + - 00:01.788 + - 0.0 + * - :ref:`sphx_glr_auto_examples_reliability_problems_plot_rp35.py` (``examples/reliability_problems/plot_rp35.py``) + - 00:01.680 + - 0.0 + * - :ref:`sphx_glr_auto_examples_reliability_problems_plot_rp110.py` (``examples/reliability_problems/plot_rp110.py``) + - 00:01.677 + - 0.0 + * - :ref:`sphx_glr_auto_examples_reliability_problems_plot_case_rs.py` (``examples/reliability_problems/plot_case_rs.py``) + - 00:01.635 + - 0.0 + * - :ref:`sphx_glr_auto_examples_reliability_problems_plot_rp89.py` (``examples/reliability_problems/plot_rp89.py``) + - 00:01.621 + - 0.0 + * - :ref:`sphx_glr_auto_examples_reliability_problems_plot_rp22.py` (``examples/reliability_problems/plot_rp22.py``) + - 00:01.558 + - 0.0 + * - :ref:`sphx_glr_auto_examples_reliability_problems_plot_rp24.py` (``examples/reliability_problems/plot_rp24.py``) + - 00:01.554 + - 0.0 + * - :ref:`sphx_glr_auto_examples_reliability_problems_plot_reliability_benchmark.py` (``examples/reliability_problems/plot_reliability_benchmark.py``) + - 00:01.500 - 0.0 * - :ref:`sphx_glr_auto_examples_sensitivity_problems_plot_gaussian_sum.py` (``examples/sensitivity_problems/plot_gaussian_sum.py``) - - 00:01.770 + - 00:01.212 - 0.0 * - :ref:`sphx_glr_auto_examples_sensitivity_problems_plot_gaussian_product_sensitivity.py` (``examples/sensitivity_problems/plot_gaussian_product_sensitivity.py``) - - 00:01.658 + - 00:01.206 - 0.0 * - :ref:`sphx_glr_auto_examples_plot_CrossCutFunction_Demo.py` (``examples/plot_CrossCutFunction_Demo.py``) - - 00:01.229 + - 00:01.184 - 0.0 * - :ref:`sphx_glr_auto_examples_sensitivity_problems_plot_ishigami_sensitivity.py` (``examples/sensitivity_problems/plot_ishigami_sensitivity.py``) - - 00:01.187 + - 00:01.100 - 0.0 * - :ref:`sphx_glr_auto_examples_sensitivity_problems_plot_borgonovo_sensitivity.py` (``examples/sensitivity_problems/plot_borgonovo_sensitivity.py``) - - 00:01.145 - - 0.0 - * - :ref:`sphx_glr_auto_examples_sensitivity_problems_plot_oakleyohagan_sensitivity.py` (``examples/sensitivity_problems/plot_oakleyohagan_sensitivity.py``) - - 00:01.088 + - 00:01.087 - 0.0 * - :ref:`sphx_glr_auto_examples_sensitivity_problems_plot_print_problems.py` (``examples/sensitivity_problems/plot_print_problems.py``) - - 00:00.252 + - 00:00.225 - 0.0 * - :ref:`sphx_glr_auto_examples_sensitivity_problems_plot_benchmark_sensitivity_methods.py` (``examples/sensitivity_problems/plot_benchmark_sensitivity_methods.py``) - - 00:00.034 + - 00:00.026 + - 0.0 + * - :ref:`sphx_glr_auto_examples_reliability_problems_plot_print_reliability_benchmark.py` (``examples/reliability_problems/plot_print_reliability_benchmark.py``) + - 00:00.003 - 0.0 diff --git a/otbenchmark/master/auto_examples/index.html b/otbenchmark/master/auto_examples/index.html index 333a577beb1..61b9a827870 100644 --- a/otbenchmark/master/auto_examples/index.html +++ b/otbenchmark/master/auto_examples/index.html @@ -71,7 +71,9 @@

Table of Contents

  • Convergence of Monte-Carlo to estimate the probability in a reliability problem
  • +
  • Reliability examples
  • Sensitivity examples
  • @@ -135,11 +137,77 @@

    Examples

    +
    +

    Reliability examples

    +
    +

    Print a reliability benchmark problem

    +
    Print a reliability benchmark problem
    +
    +

    Using the Waarts four-branch serial system

    +
    Using the Waarts four-branch serial system
    +
    +

    RP53 analysis and 2D graphics

    +
    RP53 analysis and 2D graphics
    +
    +

    R-S analysis and 2D graphics

    +
    R-S analysis and 2D graphics
    +
    +

    RP24 analysis and 2D graphics

    +
    RP24 analysis and 2D graphics
    +
    +

    RP57 analysis and 2D graphics

    +
    RP57 analysis and 2D graphics
    +
    +

    RP111 analysis and 2D graphics

    +
    RP111 analysis and 2D graphics
    +
    +

    RP35 analysis and 2D graphics

    +
    RP35 analysis and 2D graphics
    +
    +

    RP25 analysis and 2D graphics

    +
    RP25 analysis and 2D graphics
    +
    +

    RP89 analysis and 2D graphics

    +
    RP89 analysis and 2D graphics
    +
    +

    RP22 analysis and 2D graphics

    +
    RP22 analysis and 2D graphics
    +
    +

    RP110 analysis and 2D graphics

    +
    RP110 analysis and 2D graphics
    +
    +

    RP31 analysis and 2D graphics

    +
    RP31 analysis and 2D graphics
    +
    +

    RP28 analysis and 2D graphics

    +
    RP28 analysis and 2D graphics
    +
    +

    Compute reference probabilities with Monte-Carlo

    +
    Compute reference probabilities with Monte-Carlo
    +
    +

    RP55 analysis and 2D graphics

    +
    RP55 analysis and 2D graphics
    +
    +

    RP75 analysis and 2D graphics

    +
    RP75 analysis and 2D graphics
    +
    +

    Benchmark on a given set of problems

    +
    Benchmark on a given set of problems
    +
    +

    Compute reference probability for RP55

    +
    Compute reference probability for RP55
    +
    +

    Benchmark the reliability solvers on the problems

    +
    Benchmark the reliability solvers on the problems
    +

    Sensitivity examples

    Print the sensitivity analysis problems

    Print the sensitivity analysis problems
    +
    +

    Distribution of the Sobol’ indices on Ishigami function

    +
    Distribution of the Sobol' indices on Ishigami function

    Benchmark the Flooding test function

    Benchmark the Flooding test function
    diff --git a/otbenchmark/master/auto_examples/plot_ConditionalDistribution_Demo.html b/otbenchmark/master/auto_examples/plot_ConditionalDistribution_Demo.html index 1237c052d02..9b6fba9396e 100644 --- a/otbenchmark/master/auto_examples/plot_ConditionalDistribution_Demo.html +++ b/otbenchmark/master/auto_examples/plot_ConditionalDistribution_Demo.html @@ -72,6 +72,7 @@

    Table of Contents

  • Convergence of Monte-Carlo to estimate the probability in a reliability problem
  • +
  • Reliability examples
  • Sensitivity examples
  • @@ -188,7 +189,7 @@

    Conditional distribution of a three dimensional mixture
    otv.View.ShowAll()
     
    -

    Total running time of the script: (0 minutes 2.577 seconds)

    +

    Total running time of the script: (0 minutes 2.595 seconds)

  • Convergence of Monte-Carlo to estimate the probability in a reliability problem
  • +
  • Reliability examples
  • Sensitivity examples
  • @@ -82,8 +83,8 @@

    Previous topic

    This Page

    @@ -363,7 +364,7 @@

    Quick search

    print("Elapsed = %.2f (s)" % (elapsedTime))
    -
    Elapsed = 1.74 (s)
    +
    Elapsed = 1.73 (s)
     
    sampleSizeArray = [int(n) for n in np.logspace(0.0, 5.0)]
    @@ -386,7 +387,7 @@ 

    Quick search

    Convergence of Monte-Carlo method - problem = R-S
    otv.View.ShowAll()
     
    -

    Total running time of the script: (0 minutes 2.177 seconds)

    +

    Total running time of the script: (0 minutes 2.194 seconds)

    -Iso-values of marginal PDF

    Total running time of the script: (0 minutes 7.724 seconds)

    +Iso-values of marginal PDF

    Total running time of the script: (0 minutes 7.691 seconds)

    -

    Total running time of the script: (0 minutes 0.252 seconds)

    +

    Total running time of the script: (0 minutes 0.225 seconds)