Strong Maximum Test#
For worked examples, see Checking a FORM design point; for the derivation, see Strong Maximum Test.
StrongMaximumTest checks for failure points away from a candidate FORM
design point. It is an optional diagnostic: it does not change the FORM
probability, find replacement design points, or certify global optimality.
The method follows Dutfoy and Lebrun [DutfoyLebrun2006], as described in the OpenTURNS theory documentation. PySTRA implements the independent standard normal case using NumPy and SciPy; OpenTURNS is not a runtime dependency.
After FORM#
import numpy as np
import pystra as ra
model = ra.StochasticModel()
model.add_variable(ra.Normal("X", 0.0, 1.0))
model.add_variable(ra.Normal("Y", 0.0, 1.0))
form = ra.FORM(
model,
limit_state=ra.LimitState(lambda X, Y: 3.0 - X),
)
form.run()
check = ra.StrongMaximumTest(
form, importance_level=0.15, accuracy_level=3.0,
confidence_level=0.99, rng=2026,
)
print(check.point_number) # cost is available before run()
check_result = check.run()
print(check_result.has_competing_points) # False for this plane
print(check.confidence_level)
print(check_result.points()) # far failure points, in U-space by default
A converged FORM supplies the model, transformation and design point.
The original limit-state function is evaluated without gradients. The test
uses an independent evaluator and does not overwrite the FORM evaluator’s
last inputs. Keep the stochastic model and limit-state definition unchanged
between FORM and the check. Function evaluation accounting remains cumulative
on the shared model; check_result.n_limit_state_evaluations counts this diagnostic only.
Alternatively, specify a point explicitly:
check = ra.StrongMaximumTest(
model=model,
limit_state=ra.LimitState(lambda X, Y: 9.0 - X**2),
design_point=[3.0, 0.0],
point_number=500, rng=2026,
)
check_result = check.run()
print(check_result.has_competing_points) # True: also fails for X < -3
competing_u = check_result.points("far_failure")
competing_x = check_result.points("far_failure", space="x")
competing_g = check_result.limit_state_values[check_result.regions["far_failure"]]
The explicit point must be a finite vector in the model’s independent
standard normal coordinates. options (FORMOptions) selects its transformation
and, for Rosenblatt, conditioning order. For a non-Gaussian copula, use
Rosenblatt; spherical Student-t Nataf space is rejected.
The test verifies a strictly safe origin and a boundary
residual no greater than options.limit_state_tolerance * abs(g(origin)). It rejects candidates
near the origin and nonconverged FORM inputs. It does not independently solve
the constrained design-point problem for an explicit candidate.
Geometry and sampling#
Let \(u^*\) be the candidate and \(\beta=\|u^*\|\). The standard-normal density ratio at radius \(r\) is \(\exp[-(r^2-\beta^2)/2]\). Setting it to the importance level \(0<\varepsilon<1\) gives
Sample at the larger radius
\(R=\beta(1+\tau\delta_\varepsilon)\), where accuracy_level is
\(\tau>1\). This parameter controls enlargement, not a numerical error
bound. The implementation computes the radius increment without subtracting
nearly equal square roots.
Independent Gaussian vectors are normalized onto this sphere. Each sampled
point is transformed back to physical variables and evaluated in batches.
A point is classified as near the candidate when
\(u^T(u^*/\beta)>\beta\). Failure uses PySTRA’s strict \(g<0\)
convention. The four masks are near_failure, far_failure, near_safe
and far_safe. Points have shape (point_number, nrv) and values have
shape (point_number,). Both U and X coordinates are retained explicitly.
The reference detection cap has angular radius \(\theta=\arccos(R_\varepsilon/R)\). This is different from the vicinity angle \(\arccos(\beta/R)\). For dimension \(d>1\), its surface fraction is the normalized spherical cap area
For one variable the sphere consists of two points and \(p_{\rm cap}=1/2\). Independent samples miss a fixed cap with probability \((1-p_{\rm cap})^N\). For requested nominal confidence \(c\), PySTRA therefore chooses
confidence_level reports \(1-(1-p_{\rm cap})^N\) for the actual count.
Specify either confidence_level or point_number; omitting both selects
0.99. PySTRA rounds the required count upward. The reviewed OpenTURNS
implementation rounds to nearest, which can fall below the requested nominal
confidence. For its two-dimensional reference with
\(\beta=\sqrt{10}-0.3\), \(\varepsilon=0.01\), \(\tau=2\) and
\(c=0.999999\), PySTRA uses 55 sphere points instead of 54. The radius and
vicinity geometry match the published reference.
Cost and interpretation#
max_points defaults to one million sphere evaluations. An oversized test
raises before allocating the sample or calling the model. It does not silently
reduce the confidence. Each successful run also evaluates the origin and
candidate, for point_number + 2 sample-point evaluations in total. Samples
are retained, so storage is proportional to point_number * nrv. An integer
rng reproduces the same sphere sample on every run without changing the
global random stream; a supplied numpy.random.Generator advances with each
run.
For \(\beta=3\), \(\varepsilon=0.15\), \(\tau=3\) and 0.99 nominal confidence, the required counts are 111 in five dimensions, 1297 in ten and 125521 in twenty. The budget should be inspected before calling an expensive structural model.
competing_region_detected means at least one far failure point was found.
Those points are useful starting locations for further design-point searches
or for planning multiple-center importance sampling. They are not themselves
optimized design points. Their raw limit-state magnitudes cannot quantify
importance: multiplying a limit state by a positive constant preserves the
event while changing those magnitudes.
no_competing_region_detected means the sample found none. The nominal
confidence is a cap-detection probability under local-plane and failure-region
extent assumptions. It is neither a posterior probability that FORM is correct
nor a bound on its probability error. A bounded failure island entirely inside
the sampled sphere can be missed. Near safe points can also reveal departure
from the tangent-plane geometry. Inspect the point groups and use simulation
when the geometry is uncertain.
With system reliability#
Run the check separately at each component’s design point, supplying the component limit state and its FORM design point explicitly:
# system_form is a ra.SystemFORM analysis and system_result its run() record
checks = {}
for component in system_form.components:
record = system_result.component_results[component.name]
test = ra.StrongMaximumTest(
model=system_form.model,
limit_state=component.as_limit_state(),
design_point=record.design_point_u,
options=system_form.options,
point_number=1000,
rng=2026,
)
checks[component.name] = test.run()
This tests whether a component may have additional important regions beyond its one tangent plane. It does not validate the whole system probability. Multiple component modes are already intentional in system FORM; applying a single-candidate check to the combined system event will naturally flag them. PySTRA does not run these additional evaluations automatically.
Continue: Checking a FORM design point · Reliability algorithms and results · FORM, SORM and design-point diagnostics