Applied concepts
Numerical optimization for manufacturing
Model production choices, check the results, and use them in real planning.
A small production model with a verified optimum
Optimization chooses decisions rather than predicting an outcome. Suppose a hypothetical factory makes products A and B. Let x and y be daily production quantities, initially allowed to be continuous. Each A contributes 30 units of margin and each B contributes 50. Machine time limits production to 2x + y ≤ 100; finishing time requires x + 2y ≤ 80. Nonnegativity requires x ≥ 0 and y ≥ 0. The objective is maximize P = 30x + 50y. Record units, planning horizon, demand assumptions, and whether fractional production is physically meaningful.
This is a linear program because the objective and constraints are linear. At the intersection, 2x + y = 100 and x + 2y = 80 give x = 40 and y = 20. Substitution verifies both capacities: 100 machine units and 80 finishing units. Margin is 30(40) + 50(20) = 2,200. Feasibility alone does not prove optimality, so compare all feasible vertices:
| Vertex (x, y) | Margin | Check |
|---|---|---|
| (0, 0) | 0 | Both capacities slack |
| (50, 0) | 1,500 | Machine capacity binding |
| (0, 40) | 2,000 | Finishing capacity binding |
| (40, 20) | 2,200 | Both binding; best vertex |
The bounded feasible polygon and linear objective guarantee an optimum at a vertex. A second certificate comes from nonnegative resource prices: (10/3)(2x + y) + (70/3)(x + 2y) = 30x + 50y ≤ 2,200. The proposed solution reaches this bound. These are hypothetical economics, not a recommendation for any real facility.
Choose the right mathematical family
If batches are indivisible or a machine has an on/off setup choice, introduce integer or binary variables and use mixed-integer linear programming when expressions remain linear. Rounding an LP solution can violate constraints or destroy good combinations. Here the LP optimum happens to be integral; that coincidence does not make rounding a general algorithm. Nonlinear energy consumption, yield curves, or quadratic penalties lead to nonlinear optimization.
For minimization, a convex objective over a convex feasible region provides strong global guarantees: every local minimum is global. Nonconvex models may have several local optima; the starting point can matter. Verify convexity rather than assuming smoothness implies it. Solver choices follow structure: simplex or interior-point methods for LP, branch-and-bound with cutting planes for MILP, and suitable constrained gradient-based methods for smooth nonlinear problems. A local nonlinear solver is not automatically a global optimizer.
Derivatives, learning rates, and convergence
A derivative describes local sensitivity. For f(q) = (q − 6)², f′(q) = 2(q − 6). Gradient descent minimizes using qₖ₊₁ = qₖ − ηf′(qₖ). Starting at q₀ = 2 with η = 0.25 gives q₁ = 4, q₂ = 5, and q₃ = 5.5; losses fall from 16 to 4, 1, and 0.25. Here qₖ − 6 = (1 − 2η)ᵏ(q₀ − 6), so convergence requires 0 < η < 1. At η = 1 the error oscillates without shrinking; larger values diverge.
Constrained optimization needs more than an unconstrained update: a step can leave the feasible region. Projection, barrier methods, or a constrained solver handle restrictions. KKT conditions express an equilibrium between objective gradients and active constraint forces, together with feasibility, multiplier signs, and complementary slackness. An unused resource has zero marginal price in this interpretation. Under appropriate convexity and regularity conditions these conditions certify global optimality; in nonconvex problems they generally do not.
Treat solver status as evidence to inspect
Scale variables and constraints so that coefficients do not span extreme magnitudes unnecessarily. Expressing one resource in seconds and another in millions of hours can damage numerical conditioning. Set feasibility tolerances in meaningful units and independently recompute constraint residuals from the returned decision. A tiny negative quantity within a numerical tolerance may still require operational handling. Do not silently clip or round values without checking feasibility again.
Distinguish optimal, feasible-but-time-limited, infeasible, unbounded, and numerical-failure statuses. Infeasibility means no decision satisfies all modeled restrictions; inspect inconsistent capacities, minimum orders, units, and data before relaxing requirements. A conflict set can help locate incompatible constraints. For a maximization MILP, an incumbent is a feasible lower bound and a solver bound is an upper bound. Their difference, often reported relatively under a documented convention, is the optimality gap. A small gap is not evidence that input assumptions are accurate.
Sensitivity and uncertainty
The example's finishing shadow price is 70/3 per additional capacity unit while the same basis remains valid. It is a local value, not permission to extrapolate indefinitely. Changed demand, overtime limits, and setup requirements can alter the active constraints. Test sensitivity to margins and capacities; separate reliable improvements from improvements caused by uncertain forecasts. Simulation can stress-test a proposed plan under downtime and yield variation, but it does not itself prove optimality or guarantee future performance.
Follow problem framing with a baseline plan, independently verified constraints, a stakeholder review, and controlled deployment. Connect forecast uncertainty from linear models to scenario analysis rather than treating a point prediction as certain. Use evaluation to report realized margin, service level, overtime, and violations alongside solver runtime.
What if the optimizer recommends an impossible schedule?
Check omitted constraints, units, integrality, stale capacities, and residuals. A mathematically optimal answer solves the supplied model, not necessarily the real process. Correct and revalidate the model before releasing a plan.