Skip to content

Commit

Permalink
GitHub Actions build openturns/otbenchmark 10972290247
Browse files Browse the repository at this point in the history
  • Loading branch information
GitHub Actions committed Sep 22, 2024
1 parent d9105bd commit d900686
Show file tree
Hide file tree
Showing 489 changed files with 26,546 additions and 3,430 deletions.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@
},
"outputs": [],
"source": [
"nbPoints = [100, 100]\nfigure = g.draw(lowerBound, upperBound, nbPoints)\nfigure.setTitle(\" Iso-values of limit state function\")\nfigure"
"nbPoints = [100, 100]\nfigure = g.draw(lowerBound, upperBound, nbPoints)\nfigure.setTitle(\"Iso-values of limit state function\")\n_ = otv.View(figure)"
]
},
{
Expand Down Expand Up @@ -189,7 +189,7 @@
},
"outputs": [],
"source": [
"graph = drawEvent.drawLimitStateCrossCut(bounds)\ngraph.add(cloud)\ngraph"
"graph = drawEvent.drawLimitStateCrossCut(bounds)\ngraph.add(cloud)\n_ = otv.View(graph)"
]
},
{
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
"""
RP33 analysis and 2D graphics
=============================
"""

# %%
# The objective of this example is to present problem 33 of the BBRC.

# %%
import otbenchmark as otb

# %%
problem = otb.ReliabilityProblem33()
print(problem)


# %%
event = problem.getEvent()
g = event.getFunction()


# %%
problem.getProbability()


# %%
inputVector = event.getAntecedent()
distribution = inputVector.getDistribution()


# %%
inputDimension = distribution.getDimension()
inputDimension


# %%
alpha = 1 - 0.00001
bounds, marginalProb = distribution.computeMinimumVolumeIntervalWithMarginalProbability(
alpha
)

# %%
referencePoint = distribution.getMean()
referencePoint

# %%
crossCut = otb.CrossCutFunction(g, referencePoint)
_ = crossCut.draw(bounds)

# %%
# Plot cross-cuts of the distribution
# -----------------------------------

# %%
crossCut = otb.CrossCutDistribution(distribution)

# %%
_ = crossCut.drawMarginalPDF()

# %%
inputVector = event.getAntecedent()
event = problem.getEvent()
g = event.getFunction()

# %%
sampleSize = 5000
sampleInput = inputVector.getSample(sampleSize)
sampleOutput = g(sampleInput)
drawEvent = otb.DrawEvent(event)

# %%
_ = drawEvent.drawLimitState(bounds)

# %%
sampleSize = 500
_ = drawEvent.drawSample(sampleSize)

# %%
_ = drawEvent.fillEvent(bounds)
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@
},
"outputs": [],
"source": [
"nbPoints = [100, 100]\nfigure = g.draw(lowerBound, upperBound, nbPoints)\nfigure.setTitle(\" Iso-values of limit state function\")\nfigure"
"nbPoints = [100, 100]\nfigure = g.draw(lowerBound, upperBound, nbPoints)\nfigure.setTitle(\" Iso-values of limit state function\")\n_ = otv.View(figure)"
]
},
{
Expand Down Expand Up @@ -200,7 +200,7 @@
},
"outputs": [],
"source": [
"graph = drawEvent.drawLimitStateCrossCut(bounds)\ngraph.add(cloud)\ngraph"
"graph = drawEvent.drawLimitStateCrossCut(bounds)\ngraph.add(cloud)\n_ = otv.View(graph)"
]
},
{
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@
},
"outputs": [],
"source": [
"nbPoints = [100, 100]\nfigure = g.draw(lowerBound, upperBound, nbPoints)\nfigure.setTitle(\" Iso-values of limit state function\")\nfigure"
"nbPoints = [100, 100]\nfigure = g.draw(lowerBound, upperBound, nbPoints)\nfigure.setTitle(\"Iso-values of limit state function\")\n_ = otv.View(figure)"
]
},
{
Expand Down Expand Up @@ -200,7 +200,7 @@
},
"outputs": [],
"source": [
"graph = drawEvent.drawLimitStateCrossCut(bounds)\ngraph.add(cloud)\ngraph"
"graph = drawEvent.drawLimitStateCrossCut(bounds)\ngraph.add(cloud)\n_ = otv.View(graph)"
]
},
{
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@
results[i][5] = benchmarkResult.computedProbability

df = pd.DataFrame(results, index=problem_names, columns=metrics)
df.to_csv("reliability_benchmark_table-output.csv")
# df.to_csv("reliability_benchmark_table-output.csv")
df

# %%
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@
# %%
nbPoints = [100, 100]
figure = g.draw(lowerBound, upperBound, nbPoints)
figure.setTitle(" Iso-values of limit state function")
figure
figure.setTitle("Iso-values of limit state function")
_ = otv.View(figure)

# %%
# Print the iso-values of the distribution
Expand Down Expand Up @@ -99,7 +99,7 @@
# %%
graph = drawEvent.drawLimitStateCrossCut(bounds)
graph.add(cloud)
graph
_ = otv.View(graph)

# %%
domain = drawEvent.fillEventCrossCut(bounds)
Expand Down
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@
},
"outputs": [],
"source": [
"nbPoints = [100, 100]\nfigure = g.draw(lowerBound, upperBound, nbPoints)\nfigure.setTitle(\" Iso-values of limit state function\")\nfigure"
"nbPoints = [100, 100]\nfigure = g.draw(lowerBound, upperBound, nbPoints)\nfigure.setTitle(\" Iso-values of limit state function\")\n_ = otv.View(figure)"
]
},
{
Expand Down Expand Up @@ -189,7 +189,7 @@
},
"outputs": [],
"source": [
"graph = drawEvent.drawLimitStateCrossCut(bounds)\ngraph.add(cloud)\ngraph"
"graph = drawEvent.drawLimitStateCrossCut(bounds)\ngraph.add(cloud)\n_ = otv.View(graph)"
]
},
{
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@
},
"outputs": [],
"source": [
"nbPoints = [100, 100]\nfigure = g.draw(lowerBound, upperBound, nbPoints)\nfigure.setTitle(\" Iso-values of limit state function\")\nfigure"
"nbPoints = [100, 100]\nfigure = g.draw(lowerBound, upperBound, nbPoints)\nfigure.setTitle(\" Iso-values of limit state function\")\n_ = otv.View(figure)"
]
},
{
Expand Down Expand Up @@ -189,7 +189,7 @@
},
"outputs": [],
"source": [
"graph = drawEvent.drawLimitStateCrossCut(bounds)\ngraph.add(cloud)\ngraph"
"graph = drawEvent.drawLimitStateCrossCut(bounds)\ngraph.add(cloud)\n_ = otv.View(graph)"
]
},
{
Expand Down
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@
},
"outputs": [],
"source": [
"graph = drawEvent.drawLimitStateCrossCut(bounds)\ngraph.add(cloud)\ngraph"
"graph = drawEvent.drawLimitStateCrossCut(bounds)\ngraph.add(cloud)\n_ = otv.View(graph)"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@
},
"outputs": [],
"source": [
"nbPoints = [100, 100]\nfigure = g.draw(lowerBound, upperBound, nbPoints)\nfigure.setTitle(\" Iso-values of limit state function\")\nfigure"
"nbPoints = [100, 100]\nfigure = g.draw(lowerBound, upperBound, nbPoints)\nfigure.setTitle(\" Iso-values of limit state function\")\n_ = otv.View(figure)"
]
},
{
Expand Down Expand Up @@ -182,7 +182,7 @@
},
"outputs": [],
"source": [
"graph = drawEvent.drawLimitStateCrossCut(bounds)\ngraph.add(cloud)\ngraph"
"graph = drawEvent.drawLimitStateCrossCut(bounds)\ngraph.add(cloud)\n_ = otv.View(graph)"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
nbPoints = [100, 100]
figure = g.draw(lowerBound, upperBound, nbPoints)
figure.setTitle(" Iso-values of limit state function")
figure
_ = otv.View(figure)

# %%
# Print the iso-values of the distribution
Expand Down Expand Up @@ -95,7 +95,7 @@
# %%
graph = drawEvent.drawLimitStateCrossCut(bounds)
graph.add(cloud)
graph
_ = otv.View(graph)

# %%
domain = drawEvent.fillEventCrossCut(bounds)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@
},
"outputs": [],
"source": [
"nbPoints = [100, 100]\nfigure = g.draw(lowerBound, upperBound, nbPoints)\nfigure.setTitle(\" Iso-values of limit state function\")\nfigure"
"nbPoints = [100, 100]\nfigure = g.draw(lowerBound, upperBound, nbPoints)\nfigure.setTitle(\"Iso-values of limit state function\")\n_ = otv.View(figure)"
]
},
{
Expand Down Expand Up @@ -189,7 +189,7 @@
},
"outputs": [],
"source": [
"graph = drawEvent.drawLimitStateCrossCut(bounds)\ngraph.add(cloud)\ngraph"
"graph = drawEvent.drawLimitStateCrossCut(bounds)\ngraph.add(cloud)\n_ = otv.View(graph)"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
nbPoints = [100, 100]
figure = g.draw(lowerBound, upperBound, nbPoints)
figure.setTitle(" Iso-values of limit state function")
figure
_ = otv.View(figure)

# %%
# Print the iso-values of the distribution
Expand All @@ -86,7 +86,7 @@
# %%
graph = drawEvent.drawLimitStateCrossCut(bounds)
graph.add(cloud)
graph
_ = otv.View(graph)

# %%
domain = drawEvent.fillEventCrossCut(bounds)
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@
},
"outputs": [],
"source": [
"graph = drawEvent.drawLimitStateCrossCut(bounds)\ngraph.add(cloud)\ngraph"
"graph = drawEvent.drawLimitStateCrossCut(bounds)\ngraph.add(cloud)\n_ = otv.View(graph)"
]
},
{
Expand Down
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
# %%
graph = drawEvent.drawLimitStateCrossCut(bounds)
graph.add(cloud)
graph
_ = otv.View(graph)

# %%
domain = drawEvent.fillEventCrossCut(bounds)
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@
},
"outputs": [],
"source": [
"cloud = drawEvent.drawSampleCrossCut(sampleSize)\ncloud"
"cloud = drawEvent.drawSampleCrossCut(sampleSize)\n_ = otv.View(cloud)"
]
},
{
Expand Down Expand Up @@ -251,7 +251,7 @@
},
"outputs": [],
"source": [
"graph = drawEvent.drawLimitStateCrossCut(bounds)\ngraph.add(cloud)\ngraph"
"graph = drawEvent.drawLimitStateCrossCut(bounds)\ngraph.add(cloud)\n_ = otv.View(graph)"
]
},
{
Expand Down
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
# %%
graph = drawEvent.drawLimitStateCrossCut(bounds)
graph.add(cloud)
graph
_ = otv.View(graph)

# %%
domain = drawEvent.fillEventCrossCut(bounds)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,13 @@
# %%
graph = drawEvent.drawLimitStateCrossCut(bounds)
graph.add(cloud)
graph
_ = otv.View(graph)


# %%
domain = drawEvent.fillEventCrossCut(bounds)
_ = otv.View(domain)


# %%
domain.add(cloud)
_ = otv.View(domain)
Expand Down
Loading

0 comments on commit d900686

Please sign in to comment.