← Optimization theory
PART 4 · 15 Optimization theory · 01

Introduction to Optimization

Finding the best result within the given conditions

Decision variablesObjective functionConstraintsFeasible solutionOptimal solutionTypes of optimization problems

Possible choicesBest is here!Inside the fence built by constraintsWhat to decide,what to maximize,and what to respect

How do you find the best result within the given conditions? In decision analysis (14), we judged which of several alternatives to choose. Optimization goes one step further: it expresses the values you can choose and the conditions you must meet in mathematical form, and finds the best result among them.

Suppose a company makes products A and B. Production time and raw materials are limited, so making more of A leaves fewer resources for B. You can’t solve this problem just by comparing which product is better. You have to find how to allocate the limited resources so that total profit is as large as possible, and that is the basic purpose of optimization.

SECTION 01

What is optimization?

Optimization is the process of finding, among the many options that satisfy the given conditions, the solution that best fits your goal.

Companies

Maximize profit on a limited budget

Logistics firms

Minimize delivery cost and delivery time

Hospitals

Meet patient demand with limited staff and beds

Investors

Allocate assets weighing risk and return

Researchers

Get the sample you need on a limited survey budget (07 Survey sampling)

Common structure

What to decide, what to make as good as possible, and what to respect

Optimization isn’t simply making a number bigger or smaller. You first have to be clear about what you count as best and which conditions you are choosing within.

SECTION 02

The three elements of an optimization problem

Decision variablesWhat do we decide?x = units of A, y = units of BObjective functionWhat do we make best?max Z = 60x + 100yConstraintsWhat must we respect?2x + y ≤ 100, x, y ≥ 0Optimal solutionBest objective, all constraints met
Figure 1. The three components of an optimization problem

Decision variables

Decision variables are the values we set ourselves. If we are deciding how many units of products A and B to make, the decision variables are x = units of product A produced and y = units of product B produced. These aren’t observed data; they are values the optimization will decide. They may take continuous values, like production quantities; only whole numbers, like the number of employees or vehicles; or only 0 or 1, like whether to install a piece of equipment.

Objective function

The objective function expresses, as a formula, what you want to make as good as possible. If each unit of product A earns a profit of $60 and each unit of B earns $100, it is:

max Z = 60x + 100y
max: maximize · Z: total profit ($)

Some problems maximize something, like profit, output or utility; others minimize something, like cost, travel distance or waiting time. When goals conflict, as when you want to cut costs and raise quality at the same time, you also have to decide which goal comes first or how to judge the balance between them.

Constraints

Constraints are limits or rules that must be respected. If one unit of product A takes 2 hours and one unit of B takes 1 hour, and 100 hours are available in total, then along with the condition that production can’t be negative, the plan must satisfy:

2x + y ≤ 100,   x ≥ 0, y ≥ 0

If raw materials are limited too, you add a separate constraint for them. In this way, constraints set the range of choices that are possible in reality.

SECTION 03

Building an optimization problem from an example

Product A

Profit $60 per unit · 2 hours to make

Product B

Profit $100 per unit · 1 hour to make

Production time available

100 hours in total

If we consider only production time and assume no other factors such as raw materials, demand limits or fixed costs, the model is max Z = 60x + 100y, 2x + y ≤ 100, x, y ≥ 0. Let’s compare a few possible production combinations.

Product A (x)Product B (y)Hours usedTotal profit
000 hours$0
204080 hours$5,200
3040100 hours$5,800
4020100 hours$4,400
500100 hours$3,000
2x + y = 100Z = 3,000Z = 5,800Z = 10,000(0, 0) → $0(20, 40) → $5,200(30, 40) → $5,800(40, 20) → $4,400(50, 0) → $3,000(40, 30) 110 hours → infeasibleOptimal (0, 100) → $10,0000102030405060020406080100Units of product A, xUnits of product B, yBlue area = feasibleDashed = equal-profit lines
Figure 2. Feasible region and iso-profit lines

Among the combinations in the table, 30 of A and 40 of B ($5,800) is best, but comparing just a few combinations can’t tell you whether it is the best overall. If you draw every possible combination (the blue area), as in Figure 2, and push a line joining points of equal profit (an iso-profit line) toward the upper right, the last point that still touches the area is 0 of A and 100 of B ($10,000). B earns more than A and uses only half the time, so if time is the only constraint, making only B is best. Linear programming (Ch. 02) covers how to find optimal solutions systematically like this.

SECTION 04

Feasible and optimal solutions

A feasible solution is a set of values for the decision variables that satisfies every constraint. 30 of A and 40 of B uses 2(30) + 40 = 100 hours and stays within the limit, so it is feasible. 40 of A and 30 of B needs 2(40) + 30 = 110 hours and goes over the limit, so it isn’t allowed, even though its profit ($5,400) looks large.

An optimal solution is the feasible solution that makes the objective function value best. In a maximization problem it is the one with the largest objective value; in a minimization problem, the smallest.

Feasible ≠ good

Feasible only means it respects the conditions.

No violations allowed

If it breaks a constraint, it isn’t a solution, however high its objective value.

What makes it optimal

It must respect every constraint and achieve the goal best.

SECTION 05

Types of optimization problems

TypeFeatureExample uses
Linear programmingLinear objective and constraintsProduction quantities · budget allocation
Integer programmingVariables must be integersNumber of employees · number of vehicles
Mixed-integer programmingUses continuous and integer variables togetherEquipment installation and production quantities
Nonlinear optimizationNonlinear objective or constraintsComplex cost · revenue models
Multi-objective optimizationConsiders several goals togetherBalancing cost and quality
Robust · stochastic optimizationBuilds uncertainty into the modelHandling demand swings · supply risk

These types aren’t mutually exclusive. A problem can include integer variables and consider several goals at once. What matters is not picking a name first, but describing the real situation accurately and then choosing a method that fits its structure.

SECTION 06

An optimal solution doesn’t always exist

No feasible solutionNo overlapx + y ≤ 2 and also x + y ≥ 5Improves without limitGrows forevermax x + y, subject to x ≥ 0, y ≥ 0Optimal solution existsOptimalmax 60x + 100y, 2x + y ≤ 100
Figure 3. Three possible outcomes of an optimization problem

Setting up an optimization problem doesn’t always get you an optimal solution. If the constraints conflict with each other, there is no feasible solution; if there aren’t enough constraints, the objective function improves without limit. If nothing at all limits production and every unit made adds profit, the mathematical model has no finite maximum profit. Even when an optimal solution exists, several solutions may give the same value.

In reality there are limits such as demand, production capacity and funds. Leave these conditions out and the calculation may still run, but the result won’t match reality. In the earlier example, the conclusion that "100 of B only" is optimal also changes if demand for B is under 100 units. When you interpret the results, check not only the computed numbers but also whether the model’s conditions reflect reality properly.

SECTION 07

How does optimization proceed?

1. Define the goalWhat to max · minimize?2. Variables & constraintsExpressed as formulas3. Solve the modelUse algorithms · tools4. Check and interpretIs it realistic?If the result doesn’t fit reality, revise the goal or constraints and solve again
Figure 4. The steps of optimization

Rather than carrying out whatever an optimization tool computes as is, it’s important to review whether the inputs and assumptions are sound and, if needed, revise the conditions and analyze again.

Sample write-up

We built an optimization model with the production quantities of products A and B as decision variables, total profit (60x + 100y, in dollars) as the objective function, and 100 hours of production time (2x + y ≤ 100) plus non-negativity as constraints. With production time as the only constraint, the optimal solution was to produce only product B, 100 units, for a total profit of $10,000; adding demand limits or raw-material constraints could change this result.

✓ KEY TAKEAWAYS

Start by defining what you decide, what counts as best, and what you must respect.


Up next: 02 Linear Programming. We’ll look at how to find the optimal solution systematically when the objective function and constraints are linear.