from pathlib import Path
import pandas as pd
from probabilistic_piping import ProbInput, ProbPipingFixedWaterlevel
Applying various probabilistic methods
In the following, the application of a number of available probabilistic methods is shown using similar input.
Input
= Path("../../../test/data/full_test.xlsx")
data_path = pd.read_excel(data_path, sheet_name="input", index_col=0, header=0)
df_input = ProbPipingFixedWaterlevel(progress=False) prob
FORM Cobyla
= df_input.copy()
df_coby "Rekentechniek", "Waarde"] = "FORM Cobyla"
df_coby.loc[= ProbInput.from_dataframe(df_coby)
inp_coby = prob.fixed_waterlevel_failureprobability(inp_coby, h=6.0, z_type="combi")
_, r_coby
r_coby.prob_cond
0.0006153617612051806
FORM AbdoRackwitz
= df_input.copy()
df_abdo "Rekentechniek", "Waarde"] = "FORM AbdoRackwitz"
df_abdo.loc[= ProbInput.from_dataframe(df_abdo)
inp_abdo = prob.fixed_waterlevel_failureprobability(inp_abdo, h=6.0, z_type="combi")
_, r_abdo
r_abdo.prob_cond
0.0005916558092986312
Monte Carlo
= df_input.copy()
df_mc "Rekentechniek", "Waarde"] = "Monte Carlo"
df_mc.loc[= ProbInput.from_dataframe(df_mc)
inp_mc = prob.fixed_waterlevel_failureprobability(inp_mc, h=6.0, z_type="combi")
_, r_mc
r_mc.prob_cond
0.0005519125683060111
Directional Sampling
= df_input.copy()
df_ds "Rekentechniek", "Waarde"] = "DS MediumSafe OrthogonalDirection"
df_ds.loc["MaximumOuterSampling", "Waarde"] = 10_000
df_ds.loc["BlockSize", "Waarde"] = 1
df_ds.loc[= ProbInput.from_dataframe(df_ds)
inp_ds = prob.fixed_waterlevel_failureprobability(inp_ds, h=6.0, z_type="combi")
_, r_ds
r_ds.prob_cond
0.00092463352990222