Docstrings

ReliabilityOptimization.ReliabilityOptimization — Module
ReliabilityOptimization

Reliability-based design optimization (RBDO/RBTO) on top of the Nonconvex ecosystem.

A deterministic function f(x, p) of the design variables x and random parameters p is wrapped into a RandomFunction, which returns the first-order Gaussian approximation of the output distribution linearized at the most probable point. The reliability analysis is performed with:

  • FORM first-order reliability methods:
    • RIA — the reliability index approach (Hasofer-Lind), and
    • PMA — the performance measure approach;
  • SORM — the second-order (Breitung curvature-corrected) method.

The reliability index, failure probability, and performance measure are available through reliability_index, failure_probability and performance_measure, and probabilistic constraints can be added to Nonconvex models with reliability_constraint. All first-order quantities are differentiable with respect to the design variables.

Random parameters are handled in standard normal space (u ~ N(0, I)): Gaussian parameters use the exact affine transformation, univariate distributions use their Rosenblatt transformation u = Φ⁻¹(F_X(p)) (the classic textbook table: Normal, Lognormal, Uniform, Exponential, Gumbel, Weibull, Frechet, Gamma, ...), and correlated non-Gaussian parameters use the nataf_transform transformation.

Conventions: the reliability index is independent of the failure-side convention, but the PMA performance measure and reliability_constraint use the margin convention (positive limit-state values safe, g = 0 the failure surface). Limit states may be scalar- or vector-valued for RIA, but must be scalar-valued for PMA and SORM.

Limitations: the output-distribution approximation is first-order; the default Jacobians are finite-difference based (supply a jacobian function for better performance); the inner optimizer must support equality constraints and expose constraint multipliers via result.problem.mult_g (the default IpoptAlg does); SORM indices are not differentiable; the inner problem workspace is not thread-safe.

ReliabilityOptimization.PMA — Type
PMA(; β_target = 3.0, optim_alg = IpoptAlg(), optim_options = ..., nstarts = 1)

Performance measure approach: minimize the limit state g(x, p(u)) subject to ‖u‖² = β_target² in standard normal space. The limit state must be scalar-valued and expressed with the margin convention (positive values safe, g = 0 the failure surface); the performance measure g* = g(x, p(u*)) satisfies g* ≥ 0 whenever the reliability index is at least β_target. See performance_measure and reliability_constraint.

ReliabilityOptimization.RIA — Type
RIA(optim_alg, optim_options; nstarts = 1)

Reliability index approach (Hasofer-Lind): minimize ‖u‖² subject to the limit state g(x, p(u)) = 0 in standard normal space. The reliability index is β = ‖u*‖ and p* = p(u*) is the most probable point (MPP). Supports scalar- and vector-valued limit states.

  • optim_alg: any Nonconvex optimizer supporting equality constraints IpoptAlg.
  • optim_options: options forwarded to the inner solver.
  • nstarts: number of deterministic inner-solve starts (warm start plus nstarts - 1 axis-aligned points); the best feasible MPP is kept.
ReliabilityOptimization.RandomFunction — Type
RandomFunction(f, p; method = FORM(RIA()), jacobian = nothing)
RandomFunction(f, p, method; jacobian = nothing)

Wrap a deterministic function f(x, p) of the design variables x and the random parameters p into a callable that returns the first-order Gaussian approximation of the output distribution:

  • p: the random-parameter distribution (MvNormal, Normal, or any univariate distribution, which is transformed by its Rosenblatt transformation) or a StandardNormalTransform (e.g. nataf_transform for correlated non-Gaussian parameters).
  • method: the reliability method (FORM with RIA or PMA); determines the point around which f is linearized (the MPP for RIA, the minimum-performance point for PMA).
  • jacobian: optional user function (f, x, p) -> J replacing the default central finite-difference Jacobian (e.g. a Zygote-based one).

Calling rf(x) returns MvNormal(muf, covf) with

muf  = f(x, p0) + ∇ₚf(x, p0) (μ − p0)
covf = ∇ₚf(x, p0) Σ ∇ₚf(x, p0)ᵀ

where μ and Σ are the mean and covariance of p and p0 is the point selected by method. The returned object is differentiable w.r.t. x (Zygote/ChainRules).

Note: for PMA methods the linearization point is the performance-measure point on the β_target sphere, not the MPP; use performance_measure/reliability_constraint with PMA and rf(x) with RIA.

ReliabilityOptimization.SORM — Type
SORM(method = FORM(RIA()); hessian = nothing)

Second-order reliability method: Breitung's curvature correction applied to the MPP of the inner first-order method method (an RIA-based FORM). The limit state must be scalar-valued.

  • hessian: optional user function (f, x, p) -> H returning the Hessian of the limit state w.r.t. the parameters (or, for custom StandardNormalTransforms, (f, x, u) -> H in u-space). Defaults to central finite differences.

SORM indices are evaluation-only: differentiating them (e.g. with Zygote) is not supported; use FORM methods inside optimization objectives or constraints.

ReliabilityOptimization.StandardNormalTransform — Type
StandardNormalTransform(from_u, to_u, [n]; μ, Σ)

A custom, possibly non-affine bijection between the standard normal space u ∈ ℝⁿ and the original parameter space: p = from_u(u) and u = to_u(p). Use it to model non-Gaussian parameters, e.g. via a Rosenblatt or Nataf transformation implemented by the user. n defaults to length(μ).

μ and Σ are the mean vector and covariance matrix of the original parameters; they are used only for the first-order linearization of the output distribution returned by RandomFunction and may therefore be approximate.

ReliabilityOptimization.StandardNormalTransform — Method
StandardNormalTransform(d::UnivariateDistribution; μ = [mean(d)], Σ = [var(d);;])

The exact (Rosenblatt) transformation of a univariate distribution d to standard normal space: p = quantile(d, Φ(u)), u = Φ⁻¹(cdf(d, p)). Works for any distribution with cdf and quantile defined (Beta, Gamma, ...).

The classic textbook table (e.g. Nowak & Collins, Reliability of Structures, Table 5.1) is recovered as special cases:

distributiontransformation
Normal(μ, σ)u = (p − μ) / σ
LogNormal(λ, ζ)u = (log p − λ) / ζ
Uniform(a, b)u = Φ⁻¹((p − a) / (b − a))
Exponential(θ)u = Φ⁻¹(1 − exp(−p / θ))
Gumbel(μ, θ) (max)u = Φ⁻¹(exp(−exp(−(p − μ) / θ)))
Weibull(k, λ) (min)u = Φ⁻¹(1 − exp(−(p / λ)^k))
Frechet(α, σ) (max)u = Φ⁻¹(exp(−(p / σ)^(−α)))
Gamma(k, θ)u = Φ⁻¹(γ(k, p/θ) / Γ(k))

Closed-form, Zygote-differentiable transformations are used for LogNormal, Uniform, Exponential, Gumbel, Weibull and Frechet; the generic cdf/quantile form is used otherwise (reliability indices and constraints remain differentiable; only the linearized output distribution of RandomFunction requires the transformation itself to be differentiable).

ReliabilityOptimization.failure_probability — Method
failure_probability(f, x, p; method = FORM(RIA()), jacobian = nothing)

The first-order approximation Φ(−β) of the probability of failure (SORM-corrected with method = SORM(...)). The index is signed: β < 0 when the limit state is negative at the mean point (x, μ) (the mean design lies in the failure region), in which case the failure probability is near 1 and is returned as Φ(β), with a warning. The SORM correction assumes the mean design is in the safe region.

ReliabilityOptimization.getp0 — Method
getp0(rf::RandomFunction, x)
getp0(f, x, p, method = FORM(RIA()); jacobian = nothing)

The most probable point (MPP) p0 in the original parameter space: the point on the limit-state surface closest to the origin of the standard normal space (RIA), or the performance-measure point on the β_target sphere (PMA).

ReliabilityOptimization.nataf_transform — Method
nataf_transform(marginals, ρ; gh_n = 20)

The Nataf transformation of correlated non-Gaussian parameters to standard normal space: the marginal Rosenblatt transformations zᵢ = Φ⁻¹(Fᵢ(pᵢ)) with the equivalent-normal correlation matrix ρ₀ solved from the Nataf integral equation

ρᵢⱼ = ∫∫ ((Fᵢ⁻¹(Φ(zᵢ)) − μᵢ)/σᵢ) ((Fⱼ⁻¹(Φ(zⱼ)) − μⱼ)/σⱼ) φ₂(zᵢ, zⱼ; ρ₀ᵢⱼ) dzᵢ dzⱼ

so that the back-transformed parameters have the target correlation matrix ρ. gh_n is the number of Gauss-Hermite nodes per dimension (20 by default). The mean μ and covariance Σ = D ρ D of the joint parameters (D = diag(σᵢ)) are used for the first-order output linearization of RandomFunction.

ReliabilityOptimization.performance_measure — Method
performance_measure(f, x, p; method = FORM(PMA()), jacobian = nothing)
performance_measure(rf::RandomFunction, x)

The PMA performance measure: the minimum of the limit state over the β_target sphere in standard normal space. The limit state must be scalar-valued and expressed with the margin convention (positive values safe, g = 0 the failure surface); then g* ≥ 0 if and only if the reliability index is at least β_target (for well-behaved limit states).

ReliabilityOptimization.reliability_constraint — Method
reliability_constraint(f, p, β_target; method = nothing, jacobian = nothing)

Return a constraint function x -> c(x) for use with Nonconvex models, with c(x) ≤ 0 if and only if the reliability requirement is satisfied. The limit state must follow the margin convention (positive values safe, g = 0 the failure surface); the requirement is then P(g(x, p) ≥ 0) ≥ Φ(β_target) (failure probability at most Φ(−β_target)).

  • Default (method = nothing): PMA, returning c(x) = −g*(x) with the margin convention (g ≥ 0 safe).
  • method = FORM(RIA(...)): returns c(x) = β_target − β(x) with the signed index convention: β < 0 when the limit state is negative at the mean point (x, μ) (the mean design lies in the failure region), so the requirement is never reported satisfied there.
  • method = FORM(PMA(β_target = ...)): as the default, with custom inner solver settings.

The returned closure keeps a single reusable inner-optimization workspace and is differentiable w.r.t. x (first-order methods).

ReliabilityOptimization.reliability_index — Method
reliability_index(f, x, p; method = FORM(RIA()), jacobian = nothing)
reliability_index(rf::RandomFunction, x)

The first-order reliability index β of the limit state g(x, p) = 0 at the design x: the distance from the origin to the limit-state surface in standard normal space. With method = SORM(...) the second-order (Breitung-corrected) index is returned instead. The index does not depend on which side of the limit state is the failure side.

Documented but unexported types:

ReliabilityOptimization.AbstractTransform — Type
AbstractTransform

Supertype of parameter-space transformations between the original (physical) random-parameter space and the standard normal space u ~ N(0, I). All the reliability methods in this package are formulated in the standard normal space, where the Hasofer-Lind reliability index is simply the Euclidean norm of the most probable point.

ReliabilityOptimization.AffineTransform — Type
AffineTransform(μ, L, Σ; univariate = false)

Affine mapping p = μ + L u with u ~ N(0, I) for Gaussian parameters, where L is the lower-triangular Cholesky factor of the covariance matrix (Σ = L Lᵀ). univariate = true means the original parameter is a scalar (a univariate Normal distribution); from_u then returns a scalar and to_u accepts a scalar.

Constructed automatically from a Distributions.MvNormal or Distributions.Normal; users usually do not need to build one directly.