AI Glossary / Mathematics and optimization / Advanced

Constrained optimization

Definition

Constrained optimization seeks the best value of an objective while restricting decisions to an allowed set. It covers minimization and maximization, continuous and discrete decisions, and many different solution methods. The constraints specify what is permissible; the objective specifies what counts as better among permissible choices. It is a problem formulation, not the name of one algorithm.

What it means

Suppose an AI system recommends which jobs to schedule. Its preferred schedule must fit available capacity, obey dependencies and use valid assignment choices. Optimizing a performance score without these requirements solves a different problem.
The word “best” is therefore conditional: best for the selected objective, supplied data and stated restrictions. A mathematically optimal recommendation can still disappoint if the objective omits something important or the inputs are wrong. Review the model as well as the calculation.

How it works

Choose decision variables and their domains, such as continuous quantities or binary yes/no selections. Write the objective and express the restrictions as equations, inequalities or other allowable relationships. Check that feasible decisions exist, then select an algorithm suited to the resulting structure.
A linear objective with linear restrictions and continuous variables is a linear program. Adding integer requirements changes the problem class. Smooth nonlinear problems may use gradient-based methods; discrete problems may require combinatorial search. After solving, verify feasibility and distinguish a proven optimum from a candidate without such a guarantee. Maximizing a score can be rewritten as minimizing its negative while leaving the feasible choices unchanged.

Three practical examples

  • A content team chooses which editorial projects to commission under a limited production budget. Each project is indivisible, so the model uses yes/no decisions rather than fractions of completed articles.
  • A warehouse assigns deliveries to vehicles with capacity restrictions. Minimizing travel distance must also respect which customers each vehicle can serve and when deliveries are allowed.
  • A learning system fits parameters while limiting a model-size measure. The restriction can express a resource budget, but a training constraint alone does not prove that the deployed model meets a wall-clock latency target on different hardware.

Think of it this way

Think of comparing shopping baskets that must fit both a budget and a set of rules. The basket with the largest advertised benefit is irrelevant if it exceeds the budget. Looking only at each item's individual value also misses combinations that use the available resources more effectively.

Worked example

Consider an original project-selection problem. Projects A, B and C require six, five and four units of capacity, respectively. Their assigned benefit scores are thirteen, ten and eight. Capacity is nine, and each project can be selected at most once. Let a, b and c be binary variables. Maximize 13a + 10b + 8c subject to 6a + 5b + 4c ≤ 9.
The feasible selections are none, A alone, B alone, C alone and B with C. Their scores are zero, thirteen, ten, eight and eighteen. A with B requires eleven units; A with C requires ten; all three require fifteen. Checking all eight possibilities proves that selecting B and C is optimal, with score eighteen.
Now temporarily allow fractions between zero and one. Selecting all of A and three-fifths of B uses nine units and scores nineteen. This is optimal for the relaxed problem: the score equals twice the used capacity plus a, so it cannot exceed 2 × 9 + 1 = 19.
The fractional result is not an allowable project plan. Rounding B upward exceeds capacity; rounding it downward leaves A alone with score thirteen, below the true discrete optimum of eighteen. A useful bound and a usable decision are different outputs.

Illustrative case study

In a fictional editorial studio, the team initially recommends projects B and C using the preceding model. A production review reveals that both require the same specialist during an overlapping fixed time slot. They cannot be commissioned together within this planning period.
The studio adds b + c ≤ 1. Under the revised requirements, the best feasible choice is A alone, with score thirteen. The old score of eighteen remains the answer to the old model, but no longer describes an executable plan. An earlier shortlist that called A inferior would therefore need revision.
The studio records the specialist conflict and the revised feasible set with the recommendation. It also explains that the benefit scores are stipulated planning inputs, not guaranteed revenue. This case illustrates how a missing restriction can matter more than a more sophisticated solver.

Common misconceptions and mistakes

Constrained optimization is not limited to minimizing cost. It can maximize utility, throughput or another specified score. It is also distinct from merely finding any feasible solution: optimization compares feasible alternatives.
Do not assume that a continuous relaxation can be rounded safely. Nor should every preference become a mandatory restriction; conflicting hard requirements can make the feasible set empty. Conversely, replacing a mandatory rule with an arbitrary penalty can allow violations. Local optimality and global optimality must also be distinguished when the problem structure does not justify treating them as equivalent.

Business use

This framework helps turn vague requests such as “choose the best plan” into reviewable decisions. Identify the owner of each restriction, its unit of measurement and whether it can legitimately be changed. Report the recommended variables, objective value and relevant limitations together. When a resource estimate or business rule changes, recheck feasibility before relying on a previous recommendation.

People also ask

Does adding a restriction improve the optimum?

Restricting the feasible set cannot improve the best achievable value of the same objective, although it can make recommendations more realistic.

Is a feasible answer always optimal?

No. In the example, A alone is feasible but inferior until the additional conflict is imposed.

Can constraints include whole-number decisions?

Yes. Integrality and binary selection requirements are central in many planning problems.

Check your understanding

Why does the largest single project score fail to identify the original optimum?

Answer: The B - C combination scores more while fitting capacity.

What does the relaxed score of nineteen establish?

Answer: An upper bound for the binary maximization problem, not a feasible binary plan.

Why does the studio switch to A?

Answer: The newly included specialist restriction makes B with C infeasible.

Related terms

  • Constrained minimization
  • Objective function
  • Linear programming
  • Constraint satisfaction
  • feasible set
  • integer programming
  • relaxation
  • optimality gap

Learn next

Compare constraint satisfaction with optimization. Then study continuous relaxations, branch-and-bound and the meaning of a reported optimality gap. Practice expressing an operational rule in variables before choosing software.

  • Constraint satisfaction

More in Mathematics and optimization

  • Absolute error loss - Absolute error loss measures a numerical prediction's error as the absolute difference between its predicted and reference values: L(y,y-hat)=|y-y-hat|.
  • Active-set method - An active-set method is an optimization approach that works with a changing subset of constraints believed to be tight at the solution.
  • Adjoint state method - The adjoint state method computes how a chosen objective changes when the parameters of a mathematical model change.
  • Σ-algebra
  • Algebraic connectivity - Algebraic connectivity is the second-smallest eigenvalue of a graph's Laplacian matrix.
  • Algorithm IMED - Algorithm IMED, short for Indexed Minimum Empirical Divergence, is a method for choosing actions in a stochastic multi-armed bandit problem.

Sources

AIMA glossary, constrained optimization: the general objective-plus-restrictions definition. https://github.com/aimacode/aima-glossary/blob/master/glossary.md Stephen Boyd and Lieven Vandenberghe, Convex Optimization slides, chapter 4: formulation, feasibility and optimality. https://web.stanford.edu/~boyd/cvxbook/bv_cvxslides.pdf SciPy Optimization tutorial, mixed integer linear programming: binary decisions, capacity constraints and the limits of rounding relaxations. https://docs.scipy.org/doc/scipy/tutorial/optimize.html The project calculations and fictional studio case are original illustrations.

Previous: Constrained mixture model Next: Constrained optimization problem

  • Home
  • Daily AI Updates
  • Blog
  • AIFBL Academy
  • AI Glossary
  • Products and Tools
  • Store
  • Free CFO AI Prompt Pack
  • About Shihan Sheriff
  • Privacy Policy
  • Terms of Use
  • Refund Policy
  • Cookie Policy
  • Earnings Disclaimer