Constrained Optimization
Minimize an objective while respecting equality and inequality constraints, the setting for most real engineering design.
The general problem
Constrained optimization minimizes f(x) subject to equality constraints h_j(x) = 0 and inequality constraints g_i(x) <= 0. The feasible set is the intersection of all constraint surfaces and regions. Almost every real design problem is constrained: budgets, physical laws, safety limits, and geometric bounds all restrict the search.
Optimality
At a constrained optimum the objective cannot improve along any feasible direction. This is formalized by the KKT conditions, which combine stationarity of the Lagrangian, feasibility, nonnegative inequality multipliers, and complementary slackness. For convex problems KKT points are global optima.
Families of methods
- Penalty methods: add a penalty for constraint violation and solve unconstrained subproblems.
- Barrier and interior-point methods: repel iterates from the boundary and follow a central path.
- Augmented Lagrangian: combine penalties with explicit multiplier estimates.
- Sequential quadratic programming: solve a QP approximation at each step.
Sequential quadratic programming
SQP models the objective as a quadratic and the constraints as linear around the current point, solving a quadratic program each iteration to get the step. It converges quickly for smooth nonlinear problems and is a workhorse for engineering design optimization with expensive constraints.
Feasibility and constraint qualifications
Handling constraints correctly requires that they be well behaved near the optimum, formalized by constraint qualifications such as LICQ. Infeasible problems (no point satisfies all constraints) must be detected; solvers report infeasibility rather than a spurious answer. Soft-constraint formulations trade small violations for feasibility when constraints conflict.
from scipy.optimize import minimize
cons = [{'type':'eq','fun':h}, {'type':'ineq','fun':lambda x: -g(x)}]
res = minimize(f, x0, method='SLSQP', constraints=cons)
Constrained optimization frames engineering design directly: minimize an objective subject to physical, geometric, and safety limits that cannot be violated.