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

computeBeta

Compute beta value

computeBins

Return an optimal amount of bins for a histogram

computeCoefficientOfVariation

Compute Coefficient of Variation

computeDataUpdate

Update data

computeDistributionData

Compute data for the distributions

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

getBeta

Returns the beta value

getBins

Returns the amount on bins

getDistributionData

Returns data for the failure

getFailure

Returns the probability of failure

init_run

Derived classes call this at top of their run()

initializeVariables

Initialization of the simulation variables

run

setPoint

Set design point

showResults

Show results and plots

initializeVariables()[source]#

Initialization of the simulation variables

computeDataUpdate()[source]#

Update data

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

computeDistributionData()[source]#

Compute data for the distributions

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

showResults()[source]#

Show results and plots