Worked examples and validation¶
Running example¶
Take and
with
. Then
With and
,
and . The canonical problem
optimizes over
while integrating over the fixed
standard normal. The variance is
Normal mean and variance¶
The validation test compares the canonical measure with a freshly
parameterized distribution for the normal, uniform, gamma, beta, lognormal,
exponential, Gumbel, logistic, Weibull minimum and triangular families. The
mean and the variance agree to and the
quantile
agrees to
. A correlated bivariate normal is checked
for the mean and the variance to
.
Uniform worst case¶
For and
, the worst case over the support is
At the value is
, and at
it is
.
The canonical worst-case measure reproduces these values to
through the standard fast path.
Student scale¶
For a one-dimensional Student distribution with scale parameter
, the generic path is expected to fail until the OpenTURNS
defects tracked by issues #3418–#3424 and PR #3422 are fixed. The mean of a
linear function is preserved, but the validation records:
variance: canonical
versus fresh
;
quantile: canonical
versus fresh
;
joint chance: canonical
versus fresh
;
bivariate elliptical variance: canonical
versus fresh
.
These checks are explicit xfails in the test suite. The test fails if one of them starts passing, so that the xfails are removed when the OpenTURNS fixes are available.
Chance constraint with a linear limit state¶
Minimize subject to
with
,
,
and
. The constraint is
The optimal value is . The deterministic solver
returns
,
and the optimal
value
. The parameter
is not unique because the
reduced objective depends only on
; the test checks the
invariant
. With the lower
bound
, the optimal value becomes
. The frozen-parameter canonical problem
reproduces the direct solution of the original problem to
.
The validation is implemented in
python/test/t_RobustOptimizationProblemCanonicalizer_validation_std.py
and is registered with IGNOREOUT. The cached transformation is about four
times faster than rebuilding it at each evaluation in the validation run.
Two closed-form benchmarks¶
Two further problems have a closed-form solution and are used to validate the
parameter-dependent construction end to end. They are implemented in
python/test/t_RobustOptimizationProblemCanonicalizer_benchmarks_std.py and
are also the two gallery examples plot_canonical_correlated_normal.py and
plot_canonical_uniform_bound.py, so the figures and the test exercise the
same construction.
Uniform distribution with a moving support¶
Let and let
be a decision
variable. The problem is
with and
. This is the non-regular
case: the support moves with the parameter. The canonicalizer selects the
standard normal reference
and the transport
, so the moving support becomes the fixed reference
range.
The constraint is , hence
, and the
objective is
, minimized at
. The
solution is therefore
,
, with objective
and probability exactly
. The test checks
the objective and the constraint to
and verifies the moving
support sensitivity
which a sensitivity evaluated at a fixed support would miss. At
the flux is
, while a fixed-support
evaluation would return zero.
otrobopt