Calculator Inputs
Example Data Table
| Case | Objective | Constraint | Initial Guess | Expected Boundary Point | Approximate Objective |
|---|---|---|---|---|---|
| Default sample | 0.5x² + 0.5y² - 4x - 2y | x + y - 3 ≤ 0 | (0, 0) | (2.5, 0.5) | -7.750000 |
| Feasible interior trial | 0.5x² + 0.5y² - 2x - y | x + y - 5 ≤ 0 | (1, 1) | (2, 1) | -2.500000 |
Formula Used
Objective function: f(x, y) = 0.5Ax² + 0.5By² + Cxy + Dx + Ey + F
Inequality constraint: g(x, y) = Px + Qy - R ≤ 0
Augmented Lagrangian: Lρ(x, y, λ) = f(x, y) + ( max(0, λ + ρg(x, y))² - λ² ) / (2ρ)
Multiplier update: λk+1 = max(0, λk + ρg(xk+1, yk+1))
Stopping idea: The script checks feasibility, complementarity, and stationarity. Small values suggest a valid KKT point for the constrained problem.
How to Use This Calculator
- Enter the quadratic objective coefficients A, B, C, D, E, and F.
- Enter P, Q, and R for the inequality Px + Qy - R ≤ 0.
- Choose initial values for x, y, λ, penalty ρ, step size, and limits.
- Press Calculate to run the augmented Lagrangian iterations.
- Read the result summary first. Then inspect the iteration table.
- Download the table as CSV or PDF for reports or study notes.
- If convergence is weak, lower the step size or increase iteration counts.
Augmented Lagrangian Method for Inequality Constraints
What This Calculator Does
This calculator helps solve constrained optimization problems with one inequality condition. It is useful in maths, operations research, and numerical methods. You enter a quadratic objective function in two variables. You also enter one linear inequality constraint. The tool then applies an augmented Lagrangian method with iterative updates. It estimates the decision variables, objective value, multiplier, feasibility gap, and convergence progress. This makes the method easier to study. It also helps students compare penalty behavior and constraint activity during each iteration.
Why The Augmented Lagrangian Method Works
The augmented Lagrangian method combines a Lagrange multiplier term with a penalty term. This improves stability compared with a basic penalty method. It also avoids sensitivity that appears when penalty values become very large. For inequality constraints, the multiplier is projected to remain nonnegative. The method updates the multiplier after solving an inner minimization step. That update reflects whether the constraint is active, violated, or inactive. In practice, this approach gives better progress toward feasibility and stationarity than a quadratic penalty model.
How To Read The Output
The result area shows estimates for x and y. It also reports the objective value and the inequality function value. A negative constraint value means the point is feasible. A value near zero suggests an active boundary solution. The multiplier indicates how the constraint influences the optimum. The iteration table shows penalty growth, multiplier updates, feasibility, and gradient behavior. These numbers help you judge convergence. Small feasibility error, small complementarity, and low stationarity residual usually indicate that the method is approaching a Karush-Kuhn-Tucker solution.
When To Use This Calculator
Use this calculator when you want a transparent example of constrained optimization. It is well suited for classroom exercises, method comparisons, and sensitivity checks. Because the model uses a quadratic objective and one linear inequality, the results remain interpretable. You can test starting points, penalty values, and step sizes without changing the page structure. That makes experimentation simple. If the method converges slowly, reduce the step size or increase inner iterations. If feasibility remains poor, try a larger penalty growth factor and review the entered coefficients carefully.
FAQs
1. What does this calculator optimize?
It minimizes a quadratic objective in two variables while enforcing one linear inequality. The solver updates both the decision variables and the nonnegative multiplier.
2. Why is the multiplier forced to stay nonnegative?
For inequality constraints of the form g(x) ≤ 0, KKT conditions require a nonnegative multiplier. The projection step preserves that condition during iterations.
3. What does a positive feasibility gap mean?
A positive feasibility gap means the current point violates the inequality. Zero means the point is feasible or exactly on the active boundary.
4. Why can convergence be slow?
Slow convergence often comes from a large step size, a weak starting penalty, too few inner iterations, or coefficients that create a difficult landscape.
5. When is the constraint active?
The constraint is usually active when g(x, y) is close to zero at the solution. In that case, the multiplier often stays positive.
6. Can I study sensitivity with this tool?
Yes. Change the starting point, penalty, or coefficients and compare the iteration table. That reveals how the method reacts to different settings.
7. What does the stationarity residual show?
It measures how close the current point is to satisfying the gradient part of the KKT conditions. Smaller values indicate better first order optimality.
8. Is this a symbolic solver?
No. It is a numerical iterative solver. It approximates a constrained optimum and helps you inspect the path toward convergence.