Active-set clipping in cost-weighted baseline-tolerance allocation (source code)

= Active-set clipping in cost-weighted baseline-tolerance allocation

<Active-set clipping in cost-weighted baseline-tolerance allocation> enforces the reference caps that an interior solution of <cost-weighted allocation of baseline-response tolerances> may violate. Keep the parent's stipulated logarithmic effort model
$$
\min_{0<\delta_j\le\delta_j^{\rm ref}}\sum_j a_j\log\frac{\delta_j^{\rm ref}}{\delta_j},
\qquad \sum_jB_j\delta_j\le E,\quad a_j,B_j,E>0.
$$
Here $B_j\delta_j$ is a physical bias contribution in the common units of $E$. If $E\ge\sum_jB_j\delta_j^{\rm ref}$, no tightening is needed. Otherwise the budget binds, and the <Karush-Kuhn-Tucker conditions> give
$$
\delta_j(\lambda)=\min\!\left(\delta_j^{\rm ref},\frac{a_j}{\lambda B_j}\right),
\qquad \sum_jB_j\delta_j(\lambda)=E.
$$
The positive <Lagrange multiplier> $\lambda$ prices scarce bias budget. For a set $A$ of capped components and remaining free set $F$, stationarity gives
$$
\lambda=\frac{\sum_{j\in F}a_j}{E-\sum_{j\in A}B_j\delta_j^{\rm ref}},
$$
provided the denominator is positive and the resulting choices agree with the proposed capped/free status. The <monotonicity of the multiplier equation for capped tolerances> permits a scalar search; <strict convexity> of the objective gives a unique allocation.

For an original cap-activating version of the parent's apparatus example, let $E=10\,\mathrm{nV}$, $a_1=1$, $a_2=3$, $B_1=0.01\,\mathrm V$, and $B_2=100\,\mathrm{V\,s^{-1}}$. Set reference bias contributions $B_1\delta_1^{\rm ref}=1\,\mathrm{nV}$ and $B_2\delta_2^{\rm ref}=20\,\mathrm{nV}$. The unconstrained shares $2.5$ and $7.5\,\mathrm{nV}$ violate the first cap. Capping it leaves $9\,\mathrm{nV}$ for the second component, so
$$
\delta_1=10^{-7},\qquad\delta_2=9\times10^{-11}\,\mathrm s.
$$
Merely clipping the first share and leaving the second at $7.5\,\mathrm{nV}$ wastes $1.5\,\mathrm{nV}$ of permitted bias and unnecessarily increases the chosen effort. Reallocation lowers that effort by $3\log(9/7.5)\approx0.547$ units.

The physical motivation remains leakage from residual offset and drift in a pulsed-radiometer baseline, documented in NIST's calibration apparatus.<Calibration Service for Low-level Pulsed-Laser Radiometers at 1.06 µm: Pulse Energy and Peak Power by Rodney W. Leonhardt>[§3.5, printed p. 8; §7.2, Leakage Effect]{ref} The logarithmic cost and the numerical caps here are illustrative assumptions, not reported apparatus constants.