Chapter 1 Modeling With Linear Programming
Chapter 1 Modeling With Linear Programming
IE University
1 Motivation
2 Standard form
3 Applications
1 Motivation
2 Standard form
3 Applications
A company produces two products, P1 and P2 , using two raw materials, M1 and M2 .
The following table provides the basic data of the problem:
Tons of Mj per ton of Maximum daily
P1 P2 availability (tons)
M1 6 4 24
M2 1 2 6
Profit/ton (e) 5 4
Further demands:
• The daily production of P2 cannot exceed that for P1 by more than 1 ton.
• The maximum daily production for P2 is 2 tons.
What is the best product mix of P1 and P2 that maximizes the total daily profit?
We need to determine the daily amounts of P1 and P2 produced daily. Thus, the
decision variables of the problem are
By definition, x1 ≥ 0, x2 ≥ 0.
Letting z represent the total daily profit (in e), the objective of the company is
Because the daily availabilities of M1 and M2 are limited to 24 and 6 tons, respectively,
the associated constraints are given as
x2
x1
x2
x1
x2
x1
x2
The feasible solution space of the problem represents the area in which all the constraints
are satisfied simultaneously.
z = 5x1 + 4x2
z
increases (recall that we are maxi-
=
mizing z).
10
15
20
x1
x2
(x1 , x2 ) z
(0, 0) 0
(4, 0) 20 x1
(3, 3/2) 21
This is true even if the objective function happens to
(2, 2) 18
be parallel to a constraint:
(1, 2) 13
(0, 1) 4 • If z = 6x1 + 4x2 (parallel to one of the con-
straints), the optimum occurs at the two cor-
ners (any point in this line is an alternative op-
timum).
1 Motivation
2 Standard form
3 Applications
For example:
minimize z = c1 x1 + c2 x2 + · · · + cn xn
minimize z = c⊤ x
x
subject to Ax = b,
x ≥ 0n ,
X
n
cj xj .
j=1
z ′ = c⊤ x + k → z = c⊤ x
maximize z ′ = c′⊤ x
x ∈ Rn
rewrite it as
minimize z = c⊤ x
x ∈ Rn
xj = xj+ − xj−
where xj+ , xj− ≥ 0, and replacing xj by xj+ − xj− whenever it occurs in the
objective function and the constraints.
7 Extend c to include zero elements cn+i for the slack and surplus variables xn+i . If
necessary and if desired, renumber the variables.
Exercise
The canonical form provides a general method for solving linear programming models.
However, in some cases, it is useful to relax this equality to an inequality.
minimize z = c⊤ x
subject to Ax ≥ b,
x ≥ 0n .
maximize z = c⊤ x
subject to Ax ≤ b,
x ≥ 0n .
Thanks to the previous procedure, we can transform any LP problem into another
equivalent problem in canonical or standard form.
S = {x ∈ Rn : Ax = b, x ≥ 0n }
minimize z = c⊤ x
is called feasible solution space.
subject to Ax = b, • The points from the feasible solution space S are called
x ≥ 0n . feasible solutions.
• The value of c⊤ x, where x ∈ S, is called objective func-
tion value.
• A solution x∗ is optimal if it is feasible and c⊤ x∗ ≤ c⊤ x
for every x ∈ S.
• Two LP problems P1 and P2 are said to be equivalent if
they have the same feasible solution space.
Solution types
x2
2x1 + x2 = 6
minimize z = x1 + x2
7
x1 + x2 = 2
subject to 2x1 + x2 ≥ 6,
2x1 + 5x2 ≥ 10,
x1 , x2 ≥ 0.
2x1 + 5x2 = 10
x1
x2
−x1 + 2x2 = 6
2x1 + 3x2 = 18
maximize z = 2x1 + x2
subject to − x1 + 2x2 ≤ 6,
2x1 + x2 = 14
2x1 + 3x2 ≤ 18,
2x1 + x2 ≤ 14,
x1 , x2 ≥ 0.
x1
x2
2x1 + x2 = 6
maximize z = x1 + x2
subject to 2x1 + x2 ≥ 6,
2x1 + 5x2 ≥ 10, x1 + x2 = 12
x1 , x2 ≥ 0.
2x1 + 5x2 = 10
x1
x2
x1
1 Motivation
2 Standard form
3 Applications
X
n X
m
minimize cij xij D1 d1
i=1 j=1 c11
X
m
xij ≤ si , i = 1, . . . , n. D2 d2
j=1
c22 c13
• The demand is met at each Dj : s2 S2
c23
X
n
xij ≥ dj , j = 1, . . . , m. D3 d3
i=1
xij ≥ 0, i = 1, . . . , n, j = 1, . . . , m.
yb = β0 + β1 x ,
The problem
X
n
minimize |β0 + β1 xi − yi |
β0 , β 1 ∈ R i=1
is equivalent to y
X
n
minimize zi
i=1
yi − ybi
subject to |β0 + β1 xi − yi | ≤ zi , i = 1, . . . , n,
zi ≥ 0, i = 1, . . . , n,
β0 , β1 ∈ R.
β0 + β1 xi − yi ≤ zi
yi − β0 − β1 xi − ≤ zi
We aim to minimize the production and inventory schedule costs over 12 months.
x1 x2 xi xi+1 x12
d1 d2 di di+1 d12
Taha, H. A. (2007). Operations research: An introduction (8th ed.). Upper Saddle River,
New Jersey: Prentice Hall.
Winston, W. L. (2004). Operations research: Applications and algorithms (4th ed.).
Thomson Learning, Inc.
Bertsimas, D., & Tsitsiklis, J. (1997). Introduction to linear optimization (1st ed.).
Athena Scientific.