MinMapComplementarity#

Source: models/common/MinMapComplementarity.py

KKT complementarity condition enforced with the minimum map.

The complementarity conditions \(a \ge 0, b \ge 0, ab = 0\) are equivalent to the single scalar equation $\(r = \min(a, b) = 0.\)\( The residual is piecewise-linear: it equals whichever of the two arguments is currently smaller, a hard switch that gives semismooth-Newton / active-set behavior and converges robustly in return mapping. The switch is selected per batch entry with ``where`` (no Python branching), so the model lowers through AOTI and runs on GPU; the trade-off is a piecewise-constant Jacobian that is non-smooth at the switch \)a = b$.

The sign of each argument follows its declared inequality: LE enforces \(\le 0\) (coefficient \(-1\)) and GE enforces \(\ge 0\) (coefficient \(+1\)), so the enforced residual is \(r = \min(s_a\, a,\; s_b\, b)\).

Inputs#

ainput · Scalar · required

First condition

binput · Scalar · required

Second condition

Outputs#

complementarityoutput · Scalar · required

The minimum-map complementarity condition

Other options#

a_inequalitystr · default LE

Type of the inequality for the first variable a.

b_inequalitystr · default GE

Type of inequality for the second variable b.