pympcc.SensitivityResult¶
- class pympcc.SensitivityResult(dx_dp, dlam_dp, active_row_labels, rank_deficit=0, used_pseudoinverse=False, kkt_condition=None, skipped_reason=None)[source]¶
Bases:
objectResult of a parametric sensitivity solve.
- Parameters:
- dx_dp¶
Parametric derivative of the primal solution. Shape
(n, 0)when the check was skipped.- Type:
ndarray, shape (n, n_p)
- dlam_dp¶
Parametric derivative of the Lagrange multipliers on the active constraint rows, in the order described by
active_row_labels.- Type:
ndarray, shape (n_active, n_p)
- active_row_labels¶
Per-row labels for the active constraint Jacobian. Each entry is one of
("h", k),("G", i),("H", i),("g", j),("xL", j), or("xU", j). The caller’sdc_dprows must match this order.
- rank_deficit¶
0when the KKT matrix is non-singular. Positive only when the regularised lstsq fallback was used.- Type:
- used_pseudoinverse¶
Truewhen the densesolvefailed andlstsqwith Tikhonov regularisation was used instead.- Type:
- kkt_condition¶
np.linalg.condof the KKT matrix;Nonewhen the matrix was empty or the check was skipped.- Type:
float or None
- skipped_reason¶
Set when prerequisites for IFT were not met:
"not_converged"(result.successwasFalse);"biactive_pairs"(I_00 ≠ ∅— IFT requires LICQ);"no_hessian_callable_and_fd_failed"(FD fallback raised).- Type:
str or None
- __init__(dx_dp, dlam_dp, active_row_labels, rank_deficit=0, used_pseudoinverse=False, kkt_condition=None, skipped_reason=None)¶
Methods
__init__(dx_dp, dlam_dp, active_row_labels)Attributes