The browser uses the derived formulas and evaluates residuals. Run the linked Python file to execute SLSQP and compare numerical solver results.
Minimize f=(x−3)²+(y−2)² with x+y≤b and x,y≥0.
| Check | Residual |
|---|
Before changing b, predict which constraints become active. The lower-bound multiplier vector shown at b=0 is one valid choice; multipliers there need not be unique.
Starting at (0,0), choose p=(6,4). The trial point is (6α,4α). Capacity b=3 requires α≤0.3.
This is a manual demonstration, rather than a recorded SLSQP iteration. From (1.8,1.2), the correction (0.2,−0.2) stays on the boundary and reaches (2,1).
q(s)=(s²−1)², s₀=0.3. Raw Newton uses p=−q′/q″. A descent direction requires q′p<0.
A positive directional derivative means sufficiently small positive steps ascend. Reducing the step size alone cannot fix that local direction test.