pympcc.TNLPResult

class pympcc.TNLPResult(x, obj, status, message, success, mult_comp_G, mult_comp_H, mult_ineq, mult_eq, kkt_residual, stationarity, n_iter, solve_time, active_set, n_violations=0)[source]

Bases: object

Result of a TNLP active-set refinement re-solve (§2.6).

Parameters:
x

Solution of the tightened NLP.

Type:

ndarray

obj

Objective value at x.

Type:

float

status

IPOPT exit code (0 = Solve_Succeeded, 1 = Acceptable, etc.).

Type:

int

message

Human-readable IPOPT status string.

Type:

str

success

True when status {0, 1, 3}.

Type:

bool

mult_comp_G

MPCC multipliers μ_G = −λ_G (literature sign convention). Non-negative at S-stationary points for pairs with G_i = 0.

Type:

ndarray, shape (n_comp,)

mult_comp_H

MPCC multipliers μ_H = −λ_H. Non-negative at S-stationary points for pairs with H_i = 0.

Type:

ndarray, shape (n_comp,)

mult_ineq

Inequality-constraint multipliers (IPOPT sign convention, ≤ 0).

Type:

ndarray or None

mult_eq

Equality-constraint multipliers (IPOPT sign convention, free).

Type:

ndarray or None

kkt_residual

∞-norm of the MPCC stationarity residual ‖∇f + Jᵀμ‖ at the TNLP solution.

Type:

float or None

stationarity

Stationarity classification at the TNLP solution.

Type:

str

n_iter

IPOPT iterations in the TNLP solve.

Type:

int

solve_time

Wall-clock seconds for the TNLP solve.

Type:

float

active_set

(I_G_active, I_H_active) — integer index arrays of comp pairs with G_i pinned to 0 and H_i pinned to 0 respectively.

Type:

tuple

n_violations

Number of pairs whose equality-side MPCC multiplier was negative (< -1e-6) in the final TNLP solve. Zero at an S-stationary point. Non-zero indicates pairs where the active-set assignment was wrong (typically from a poorly converged relaxation iterate).

Type:

int

__init__(x, obj, status, message, success, mult_comp_G, mult_comp_H, mult_ineq, mult_eq, kkt_residual, stationarity, n_iter, solve_time, active_set, n_violations=0)
Parameters:
Return type:

None

Methods

__init__(x, obj, status, message, success, ...)

Attributes

x: ndarray
obj: float
status: int
message: str
success: bool
mult_comp_G: ndarray
mult_comp_H: ndarray
mult_ineq: ndarray | None
mult_eq: ndarray | None
kkt_residual: float | None
stationarity: str
n_iter: int
solve_time: float
active_set: tuple
n_violations: int = 0