Académique Documents
Professionnel Documents
Culture Documents
CHAPTER 3
Introduction to
Linear Programming
Introduction
The word Linear indicates that all the mathematical functions are linear (forms
like x1x2 or √x are not allowed).
Chapters 1& 2 1
Chapters 1& 2
Maximize Objective
Z = c1 x1 + c2x2 + . . . + cnxn Function
Subject to:
a11x1 + a12x2 + . . . + a1nxn ≤ b1
a21 x1 + a22x2 + . . . + a2nxn ≤ b2 Functional
…………………………………. Constraints
am1x1 + am2x2 + . . . + amnxn ≤ bm
x 1, x 2, . . . x n ≥ 0 Non-Negativity
Constraints 3
Chapters 1& 2 2
Chapters 1& 2
Formulation
Decision Variables:
x1 = number of batches of product 1 produced per week.
x2 = number of batches of product 2 produced per week.
Objective Function:
Z = total profit per week from these two products
= 3000x1 + 5000 x2 = 3 x1 + 5 x2
Functional Constraints:
Plant 1: x1 ≤ 4
Plant 2: 2x2 ≤ 12
Plant 3: 3x1 + 2x2 ≤ 18
6
Chapters 1& 2 3
Chapters 1& 2
Maximize: Z = 3 x1 + 5 x2
Subject to:
x1 ≤ 4 …………(1)
2x2 ≤ 12 …………(2)
3x1 + 2x2 ≤ 18 …………(3)
Chapters 1& 2 4
Chapters 1& 2
- Equality constraints
a11x1 + a12x2 + . . . + a1nxn = b1
Formulation Examples
A Blending Problem
10
Chapters 1& 2 5
Chapters 1& 2
Formulation Examples
A Blending Problem
Formulation
Decision Variables:
x11 = pounds of cashews in expensive mix
x12 = pounds of peanuts in expensive mix
x21 = pounds of cashews in cheap mix
x22 = pounds of peanuts in cheap mix
Objective Function:
Z = total profit from the two mixes
= 0.80 (x11 + x12) + 0.40 (x21 + x22) - 0.5(x11+x21) - 0.2(x21 + x22)
Mix 1 Mix 2 Cashews Peanuts
11
Formulation Examples
A Blending Problem
Functional Constraints
Cost: 0.5 (x11 + x21) +0.2 (x12 + x22 ) ≤ 100
Cashews Peanuts
Mix 1 Mix 2
12
Chapters 1& 2 6
Chapters 1& 2
Formulation Examples
A Blending Problem
Formulation Examples
A Trim-Loss Problem
A Paper Company produces rolls of paper 12 inches wide by 1000 feet in
length. These standard rolls are purchased by many of their customers.
However, some customers prefer to receive special sizes, namely 2-inch, 3.5 inch,
and 5-inch rolls, all 1000 feet long. The special sized rolls are cut from the
standard 12-inch roll. The available knife settings and the quantity required of
each roll size are shown in the following table. Minimize Paper waste.
Knife Size of rolls
settings 2-in 3.5-in 5-in Waste
1 6 0 0 0
2 1 0 2 0
3 2 2 0 1
4 0 2 1 0
5 3 0 1 1
6 4 1 0 0.5
14
Required/mo 500 2000 1500
Chapters 1& 2 7
Chapters 1& 2
Formulation Examples
A Trim-Loss Problem
Subject to:
6x1 + x2 + 2x3 + 3x5 + 4x6 ≥ 500
2x2 + x4 + x5 ≥ 1500
and
xj ≥ 0, j = 1,2,….,6 15
Formulation Examples
Personnel Scheduling Problem
Union Airways needs to hire
Time Min
Shift Rate
customer service agents. An Period Number
6am to 2pm $170
analysis showed that the 6 to 8 am 48
8am to 4pm $160
minimum number of agents 8 to 10 am 79
Chapters 1& 2 8
Chapters 1& 2
Formulation Examples
Personnel Scheduling Problem
Formulation:
Decision Variables
xj = the number of agents hired in shift j
Objective Function
Z = the total personnel cost
= 170x1 + 160x2 + 175x3 + 180x4 + 195x5
17
Formulation Examples
Personnel Scheduling Problem
Functional Constraints:
Time Sh 1 Sh 2 Sh 3 Sh 4 Sh 5 Min
Period 6 -2 8-4 12 - 8 4 - 12 10 - 6 Number
6 to 8 am X 48
8 to 10 am X X 79
10 am to noon X X 65
Noon to 2 pm X X X 87
2 to 4 pm X X 64
4 to 6 pm X X 73
6 to 8 pm X X 82
8 to 10 pm X 43
10 to midnight X X 52
Midnight to 6 am X 15
18
Chapters 1& 2 9
Chapters 1& 2
Formulation Examples
Personnel Scheduling Problem
Formulation Examples
A Feed-Mix Problem
Each cow requires at least 8,000 calories per day and at least 700 units of
vitamins. A further constraint is that no more than one-third of the diet (by
weight) can consist of Feed Type A, since it contains an ingredient which is toxic
if consumed in too large a quantity.
20
Chapters 1& 2 10
Chapters 1& 2
Formulation Examples
A Feed-Mix Problem
Formulation
Decision Variables
x1 = the quantity (pounds) of Feed Type A
x2 = the quantity (pounds) of Feed Type B
Objective Function
Z = the total daily cost of the feed per pig.
= 0.4 x1 + 0.8 x2
Functional Constraints
Calories: 800 x1 + 1000 x2 ≥ 8,000
Vitamins: 140 x1 + 70 x2 ≥ 700
Toxic A: x1 ≤ 1/3 (x1 + x2) 2/3 x1 - 1/3 x2 ≤ 0
21
Formulation Examples
A Feed-Mix Problem
Subject to:
800 x1 + 1000 x2 ≥ 8000
140 x1 + 70 x2 ≥ 700
2/3 x1 - 1/3 x2 ≤ 0
and
x1 ≥ 0, x2 ≥ 0.
22
Chapters 1& 2 11
Chapters 1& 2
Solution Procedures
Simplex algorithm
(Next Chapter)
Numerical, iterative approach
23
Graphical Solution
Chemical Company Example
24
Chapters 1& 2 12
Chapters 1& 2
Graphical Solution
Chemical Company Example
Decision Variables:
x1 = the numbers of hours per day to run Process 1
x2 = the numbers of hours per day to run Process 2
Minimize: Z = 4 x1 + x2 (cost/day)
Subject to:
Chemical A: 3 x1 + x2 ≥ 10 …(1)
Chemical B: x1 + x2 ≥ 5 …(2)
Chemical C: x1 ≥ 3 …(3)
Graphical Solution
Chemical Company Example
x2
Min: Z = 4 x1 + x2
Subject to: 12
3 x1 + x2 ≥ 10 …(1)
x1 + x2 ≥ 5 …(2)
x1 ≥ 3 …(3)
x1, x2 ≥ 0 …(4,5)
10
2
x1
26
2 4 6 8 10
Chapters 1& 2 13
Chapters 1& 2
Graphical Solution
Chemical Company Example
x2
Min: Z = 4 x1 + x2
Subject to: 12
3 x1 + x2 ≥ 10 …(1)
x1 + x2 ≥ 5 …(2) 3 x1 + x2 = 10
x1 ≥ 3 …(3)
x1, x2 ≥ 0 …(4,5)
10
4
Calculate the x1, x2
intercepts of the 2
constraint x1
27
2 4 6 8 10
Graphical Solution
Chemical Company Example
x2
Min: Z = 4 x1 + x2
Subject to: 12
3 x1 + x2 ≥ 10 …(1)
x1 + x2 ≥ 5 …(2) 1
x1 ≥ 3 …(3)
x1, x2 ≥ 0 …(4,5)
10
4
Check point (0,0) to
determine the feasible 2
side x1
28
2 4 6 8 10
Chapters 1& 2 14
Chapters 1& 2
Graphical Solution
Chemical Company Example
x2
Min: Z = 4 x1 + x2
Subject to: 12
3 x1 + x2 ≥ 10 …(1)
x1 + x2 ≥ 5 …(2) 1
x1 ≥ 3 …(3)
x1, x2 ≥ 0 …(4,5)
10
2
2
x1
29
2 4 6 8 10
Graphical Solution
Chemical Company Example
x2
Min: Z = 4 x1 + x2
Subject to: 12
3 x1 + x2 ≥ 10 …(1)
x1 + x2 ≥ 5 …(2) 1
x1 ≥ 3 …(3)
x1, x2 ≥ 0 …(4,5)
10
2
2
x1
30
2 4 6 8 10
Chapters 1& 2 15
Chapters 1& 2
Graphical Solution
Chemical Company Example
x2
3
Min: Z = 4 x1 + x2
Subject to: 12
3 x1 + x2 ≥ 10 …(1)
x1 + x2 ≥ 5 …(2) 1
x1 ≥ 3 …(3)
x1, x2 ≥ 0 …(4,5)
10
2
2
x1
31
2 4 6 8 10
Graphical Solution
Chemical Company Example
x2
3
Min: Z = 4 x1 + x2
Subject to: 12
3 x1 + x2 ≥ 10 …(1)
x1 + x2 ≥ 5 …(2) 1
x1 ≥ 3 …(3)
x1, x2 ≥ 0 …(4,5)
10
2
2
x1
32
2 4 6 8 10
Chapters 1& 2 16
Chapters 1& 2
Graphical Solution
Chemical Company Example
x2
3
Min: Z = 4 x1 + x2
Subject to: 12
3 x1 + x2 ≥ 10 …(1) 4
x1 + x2 ≥ 5 …(2)
x1 ≥ 3 …(3)
x1, x2 ≥ 0 …(4,5)
10
1
8
2
2 5
x1
33
2 4 6 8 10
Graphical Solution
Chemical Company Example
x2
Min: Z = 4 x1 + x2
Subject to: 12
3 x1 + x2 ≥ 10 …(1)
x1 + x2 ≥ 5 …(2) Feasible
x1 ≥ 3 …(3)
10
x1, x2 ≥ 0 …(4,5) Region
8
2
x1
34
2 4 6 8 10
Chapters 1& 2 17
Chapters 1& 2
Graphical Solution
Chemical Company Example
Min: Z = 4 x1 + x2
Subject to:
3 x1 + x2 ≥ 10 …(1)
x1 + x2 ≥ 5 …(2)
x1 ≥ 3 …(3)
x1, x2 ≥ 0 …(4,5)
35
Graphical Solution
Chemical Company Example
x2
Min: Z = 4 x1 + x2
Subject to: 12
3 x1 + x2 ≥ 10 …(1)
x1 + x2 ≥ 5 …(2) Feasible
x1 ≥ 3 …(3)
10
x1, x2 ≥ 0 …(4,5) Region
The least common 8
multiple = 4 x 1 = 4:
So we graph:
6
4x1 + x2 = 4 4
2
x1
36
2 4 6 8 10
Chapters 1& 2 18
Chapters 1& 2
Graphical Solution
Chemical Company Example
x2
Min: Z = 4 x1 + x2
Subject to: 12
3 x1 + x2 ≥ 10 …(1)
x1 + x2 ≥ 5 …(2)
x1 ≥ 3 …(3)
x1, x2 ≥ 0 …(4,5)
10
4
Move the line in the
determined direction 2
till you hit the last point x1
in the FR
37
2 4 6 8 10
Graphical Solution
Chemical Company Example
x2
Min: Z = 4 x1 + x2
Subject to: 12
3 x1 + x2 ≥ 10 …(1)
x1 + x2 ≥ 5 …(2) Feasible
x1 ≥ 3 …(3)
10
x1, x2 ≥ 0 …(4,5) Region
8
2
x1
38
2 4 6 8 10
Chapters 1& 2 19
Chapters 1& 2
Graphical Solution
Chemical Company Example
x2
Min: Z = 4 x1 + x2
Subject to: 12
3 x1 + x2 ≥ 10 …(1)
x1 + x2 ≥ 5 …(2) Feasible
x1 ≥ 3 …(3)
10
x1, x2 ≥ 0 …(4,5) Region
8
2
x1
39
2 4 6 8 10
Graphical Solution
Chemical Company Example
x2
Min: Z = 4 x1 + x2
Subject to: 12
3 x1 + x2 ≥ 10 …(1)
x1 + x2 ≥ 5 …(2) Feasible
x1 ≥ 3 …(3)
10
x1, x2 ≥ 0 …(4,5) Region
8
2
x1
40
2 4 6 8 10
Chapters 1& 2 20
Chapters 1& 2
Graphical Solution
Chemical Company Example
x2
Min: Z = 4 x1 + x2
Subject to: 12
3 x1 + x2 ≥ 10 …(1)
x1 + x2 ≥ 5 …(2) Feasible
x1 ≥ 3 …(3)
10
x1, x2 ≥ 0 …(4,5) Region
8
Optimal Solution: 6
(x1*, x2*) =(3, 2)
Z* = 14 4
2 *
x1
41
2 4 6 8 10
Chapters 1& 2 21