pystra.mc.DistributionAnalysis#
- class DistributionAnalysis(analysis_options=None, limit_state=None, stochastic_model=None)[source]#
Bases:
MonteCarlo
Distribution Analysis
To analyze the random variables, used in the limit state function, a numerical distribution analysis based on Monte Carlo simulation can be performed.
- Attributes:
analysis_option (AnalysisOption): Option for the structural analysis
limit_state (LimitState): Information about the limit state
stochastic_model (StochasticModel): Information about the model
Methods
Compute beta value
Return an optimal amount of bins for a histogram
Compute Coefficient of Variation
Update data
Compute data for the distributions
Compute probability of failure
Evaluate limit-state function
Compute percent done
Compute random numbers
Collect result of sampling
Update summation
Compute transformation from u to x space
Returns the beta value
Returns the amount on bins
Returns data for the failure
Returns the probability of failure
Derived classes call this at top of their run()
Initialization of the simulation variables
run
Set design point
Show results and plots
- computeBeta()#
Compute beta value
- computeBins(samples)#
Return an optimal amount of bins for a histogram
- Returns:
bins (int): Returns amount on bins
- computeCoefficientOfVariation()#
Compute Coefficient of Variation
- computeFailureProbability()#
Compute probability of failure
- computeLimitState()#
Evaluate limit-state function
- computePercentDone()#
Compute percent done
- computeRandomNumbers()#
Compute random numbers
- computeResults()#
Collect result of sampling
- computeSumUpdate()#
Update summation
- computeTransformation()#
Compute transformation from u to x space
Note
TODO: this method takes a lot of time, find some better solution.
- getBeta()#
Returns the beta value
- Returns:
beta (float): Returns the beta value
- getBins()#
Returns the amount on bins
- Returns:
bins (int): Returns the amount on bins (histogram)
- getDistributionData()#
Returns data for the failure
- Returns:
all_G (float): Returns data from the distribution
- getFailure()#
Returns the probability of failure
- Returns:
Pf (float): Returns the probability of failure
- init_run()#
Derived classes call this at top of their run()
- setPoint(point=None)#
Set design point