pystra.reliability.line_sampling.LineSampling#
Use it: User guide · Worked example · Theory
- class LineSampling(model, limit_state, *, options=None, form=None, rng=None)[source]#
Bases:
_FORMReuse,AnalysisObjectLine Sampling (LS) reliability analysis.
Line Sampling exploits the important direction \(\boldsymbol{\alpha}\) obtained from FORM. For each of N random samples drawn uniformly in the (n-1)-dimensional hyperplane perpendicular to \(\boldsymbol{\alpha}\), a one-dimensional root-finding problem locates the limit-state surface along the parallel line.
The failure-probability estimate is
\[\hat{p}_f = \frac{1}{N} \sum_{i=1}^{N} \Phi(-c_i)\]where \(c_i\) is the signed distance from the foot-point of sample i to the limit-state surface along \(\boldsymbol{\alpha}\), and \(\Phi\) is the standard normal CDF.
- Parameters:
model (
StochasticModel)limit_state (
LimitState)options (
SimulationOptions|None) –n_samplesis the number of lines.form (
FORM|None) – A completed FORM analysis. IfNone,run()first runs FORM, with this analysis’s block size and transformation, to obtain the important direction \(\boldsymbol{\alpha}\) and the initial guess for the root search.rng (
int|integer|Sequence[int] |ndarray|SeedSequence|BitGenerator|Generator|None) – Random source; NumPy’s global generator is not used. A seed recreates the same stream on every run, a generator advances its own state, and None draws fresh entropy.
Notes
run()returns aSimulationResult; its diagnostics include the importantdirection. The line search is restricted to normal coordinates in [-37, 37], including correlated marginal coordinates for Nataf transformations. If that restriction truncates the scan and no crossing is found, an AnalysisError is raised; crossings beyond the representable scan are not assigned a probability.References
Koutsourelakis, P. S., Pradlwarter, H. J., & Schuëller, G. I. (2004). Reliability of structures in high dimensions, Part I: algorithms and applications. Probabilistic Engineering Mechanics, 19(4), 409–417.
Methods
Initialize the model's isoprobabilistic transformation.
Run line sampling and return a
SimulationResult.- init_run()#
Initialize the model’s isoprobabilistic transformation.
Uses the explicit copula or calibrates the legacy Gaussian Nataf correlation. Must be called at the start of every
run()method in subclasses.- Return type:
None