pystra.calibration.Calibration#
- class Calibration(loadcombobj, target_beta, dict_nom_vals, calib_var, calib_method='optimize', est_method='matrix', print_output=False)[source]#
Bases:
object
Class for calibrating partial and combination factors.
The factors are: \(\\phi\), \(\\gamma\), and \(\\psi\) factors for a given load combination instance and target reliability.
- betaT#
Target reliability index
- Type:
float
- calib_method#
The calibration algorithm to use
- Type:
str
- cvar#
The label of the calibration variable.
- Type:
str
- df_nom#
A dataframe of nominal values
- Type:
DataFrame
- df_Xstar#
A dataframe of design point values
- Type:
DataFrame
- df_phi#
A dataframe of partial factors for resistances
- Type:
DataFrame
- df_gamma#
A dataframe of partial factors for loads
- Type:
DataFrame
- df_psi#
A dataframe of load combination factors
- Type:
DataFrame
- dict_nom#
Dictionary of nominal values
- Type:
dict
- est_method#
The estimation method
- Type:
str
- label_comb_vrs#
Labels of combination variables
- Type:
str
- label_comb_cases#
Labels of combination load variables
- Type:
str
- label_R#
Labels of resistance variables
- Type:
str
- label_other#
Labels of other load variables
- Type:
str
- label_all#
Labels of all variables including design parameter
- Type:
str
- loadCombObj#
LoadCombination object
- Type:
- print_output#
Whether or not to print output to the console
- Type:
bool
Initialize class instance.
- Parameters:
loadcombobj (Class object) – Class LoadCombination object.
target_beta (Float) – Target reliability index for calibration.
dict_nom_vals (Dictionary) – Dictionary of nominal values.
calib_var (String) – Label of calibration variable in the LSF.
calib_method (String, optional) – Calibration method for the analysis: “optimize” or “alpha”. The default is “optimize”.
est_method (String, optional) – Estimation method for the factors: “matrix” or “coeff”. The default is “matrix”.
print_output (Boolean, optional) – Boolean flag for printing analysis output. The default is False.
- Return type:
None.
Methods
Calculate the design point DataFrame divided by the nominal values per load case and adjust for \(\psi\) factors for combination load variables.
Calculate reliabilities based on given design parameter for resistance for all load combination cases.
Calculate design parameter for resistance from design points.
Calculate the DataFrame of all resistance and load variables nominal values multiplied by their respective factors, \(\phi\), \(\gamma\), and \(\psi\), for all load cases.
Get LHS for matrix estimation method, \(\gamma_j~S_j\).
Calculate Load factors \(\gamma\) from a dataframe of design points factored by the nominal values.
Calculate the LSF evaluation of a Dataframe elements.
Calculate \(\phi\), \(\gamma\), and \(\psi\) for the given set of design points and nominals using comparison of design pt coefficients approach.
Calculate \(\phi\), \(\gamma\), and \(\psi\) for the given set of design points and nominals using the Matrix approach.
Calculate resistance factors \(\phi\) from a dataframe of design points factored by the nominal values.
Get RHS for matrix estimation method, \(\phi~R~z-\gamma_g~G-\gamma_i~S_i\)
Estimate the resistance design parameter for a given set of safety and combination factors, and nominals.
get_phi_min
Get \(\psi\) dataframe corresponding to maximum estimates of dfpsi.
Print detailed outputs for Pystra Calibration, including calculations from intermediate steps.
Run calibration analysis to estimate \(\phi\), \(\gamma\), and \(\psi\) factors, and set class dataframe attributes corresponding to each factor.
- calc_lsf_eval_df(df, ret_abs=True)[source]#
Calculate the LSF evaluation of a Dataframe elements.
Pass each dataframe value to the LSF and get corresponding LSF evaluation.
The columns of the dataframe must be a subset of LSF arguments.
- Parameters:
df (Dataframe) – Dataframe for element-wise LSF evaluation. len(df.index) can be greater-than or equal to 1
ret_abs (Bool, optional) – Return abs of LSF evaluation. The default is True.
- Returns:
df_lsf – Dataframe containing element-wise LSF evaluation of passed df.
- Return type:
Dataframe
- calc_design_param_Xst(dfXst)[source]#
Calculate design parameter for resistance from design points.
- Parameters:
dfXst (Dataframe) – Dataframe containing design points. Note: len(dfXst.index) = 1
- Returns:
z – design parameter for resistance corresponding to the design pt.
- Return type:
Float
- run(est_method=None, set_max=False)[source]#
Run calibration analysis to estimate \(\phi\), \(\gamma\), and \(\psi\) factors, and set class dataframe attributes corresponding to each factor.
- Parameters:
est_method (String, optional) – Calibration method override. The default is “matrix”.
- Return type:
None.
- get_psi_max(dfpsi)[source]#
Get \(\psi\) dataframe corresponding to maximum estimates of dfpsi.
- Parameters:
dfpsi (DataFrame) – Dataframe of \(\psi\) per load case.
- Returns:
df_psi_max – Dataframe of \(\psi\) corresponding to maximum of each load effect.
- Return type:
DataFrame
- calc_pg_coeff(dfXst, print_output=False)[source]#
Calculate \(\phi\), \(\gamma\), and \(\psi\) for the given set of design points and nominals using comparison of design pt coefficients approach.
- Parameters:
dfXst (Dataframe) – Dataframe containing all design points at target reliability.
print_output (Boolean, optional) – print_output flag for displaying intermediate and final output of function. The default is False.
- Returns:
df_phi (Dataframe) – Dataframe containing \(\phi\) estimates for resistance variables per load case.
df_gamma (Dataframe) – Dataframe containing \(\gamma\) estimates for all static and combination load variables per load case.
df_psi (Dataframe) – Dataframe containing \(\psi\) estimates for all static and combination load variables per load case.
- calc_Xst_nom(dfXstar)[source]#
Calculate the design point DataFrame divided by the nominal values per load case and adjust for \(\psi\) factors for combination load variables.
- Parameters:
dfXstar (DataFrame) – DataFrame containing all design points at target reliability for all load cases.
- Returns:
df_Xst_nom – Design point DataFrame factored by the nominal values per load case.
- Return type:
DataFrame
- calc_phi(dfXstnom)[source]#
Calculate resistance factors \(\phi\) from a dataframe of design points factored by the nominal values.
- Parameters:
dfXstnom (DataFrame) – Design point DataFrame factored by the nominal values per load case.
set_max (Boolean, optional) – Set \(\phi\) estimates to their corresponding max values. The default is False.
- Returns:
df_phi – Resistance factors \(\phi\) for resistance variables per load case.
- Return type:
DataFrame
- calc_gamma(dfXstnom)[source]#
Calculate Load factors \(\gamma\) from a dataframe of design points factored by the nominal values.
- Parameters:
dfXstnom (DataFrame) – Design point DataFrame factored by the nominal values per load case.
- Returns:
dfgamma_static (DataFrame) – Load factors for static variables per load case.
dfgamma_comb (DataFrame) – Load factors for combination variables per load case.
- calc_pg_matrix(dfXst, print_output=False)[source]#
Calculate \(\phi\), \(\gamma\), and \(\psi\) for the given set of design points and nominals using the Matrix approach.
- Parameters:
dfXst (Dataframe) – Dataframe containing all design points at target reliability.
print_output (Boolean, optional) – print_output flag for displaying intermediate and final output of function. The default is False.
- Returns:
df_phi (Dataframe) – Dataframe containing \(\phi\) estimates for resistance variables per load case.
df_gamma (Dataframe) – Dataframe containing \(\gamma\) estimates for all static and combination load variables per load case.
df_psi (Dataframe) – Dataframe containing \(\psi\) estimates for all static and combination load variables per load case.
- calc_phiRz_egS_vect(dfXstar)[source]#
Get RHS for matrix estimation method, \(\phi~R~z-\gamma_g~G-\gamma_i~S_i\)
- Parameters:
dfXstar (Dataframe) – Dataframe containing all design points at target reliability.
- Returns:
phiRz_egS_vect – RHS for matrix estimation method as 1D Array.
- Return type:
Array
- calc_epgS_mat(dfgammanom)[source]#
Get LHS for matrix estimation method, \(\gamma_j~S_j\). The LHS is evaluated by evaluating the LSF with appropriate random variables to account for any constant multipliers. The implementation works for both, linear and non-linear LSFs. For more algorithmic details, ref to Appendix A, Caprani and Khan, Structural Safety, 2023.
- Parameters:
dfgammanom (Dataframe) – Dataframe containing product of nominal values and safety factors, along with calibrated z values.
- Returns:
epgS_mat – LHS for matrix estimation method as 2D Array.
- Return type:
Array
- calc_beta_design_param(design_z)[source]#
Calculate reliabilities based on given design parameter for resistance for all load combination cases.
- Parameters:
design_z (Float) – design parameter for resistance
- Returns:
arr_beta – Array containing reliability indices corresponding to design_z for each load combination case.
- Return type:
Array
- calc_df_pgRS(min_phi, max_psi)[source]#
Calculate the DataFrame of all resistance and load variables nominal values multiplied by their respective factors, \(\phi\), \(\gamma\), and \(\psi\), for all load cases.
- Returns:
df_pgRS
- Return type:
DataFrame