Vous êtes sur la page 1sur 21

Chapters 1& 2

CHAPTER 3

Introduction to
Linear Programming

Chapter 3: Linear Programming

Introduction

 LP uses a mathematical model to describe the problem of concern.

 The word Linear indicates that all the mathematical functions are linear (forms
like x1x2 or √x are not allowed).

 The word Programming refers to the word planning


Linear programming thus involves planning of activities using
a mathematical model that incorporates linear functions to achieve an optimal
value for a measure of performance given some conditions on the
resources.

Chapters 1& 2 1
Chapters 1& 2

Chapter 3: Linear Programming

The Standard LP Model


With n = number of activities and m = the number of resources:

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

Chapter 3: Linear Programming

The Standard LP Model


 Where:
Z = objective function value
xj = level of activity j (decision variables)
cj = contribution of activity j to Z (profit coefficient)
aij = amount of resource i consumed by each unit of
activity j.
bi = amount of resource i available
i = 1, 2, …, m resources
j = 1, 2, …, n activities

• cj , bi , aij are the parameters of the model.


4

Chapters 1& 2 2
Chapters 1& 2

Chapter 3: Linear Programming

The Standard LP Model


A Product Mix Problem
The WYNDOR GLASS CO. produces high-quality glass products,
including windows and doors. It has 3 plants. Aluminum frames and
hardware are made in plant 1, wood frames in plant 2, and plant 3
produces the glass and assembles the products. Because of declining
earnings, top management has decided to revamp the company’s
product line. Unprofitable products are being discontinued, releasing
production capacity to launch 2 new potentially profitable products.
Product 1 requires some of the production
capacity of plants 1 and 3.
Product 2 needs only plants 2 Production time Production
and 3. The company could sell per batch (hrs) time
Plant available
as much of either product as Product Product per week
could be produced, however 1 2 (hrs)
because both products would
1 1 --- 4
be competing for the production
capacity of plant 3, it is not 2 --- 2 12
clear which mix of the 2 3 3 2 18
products would be most Profit/
$3,000 $5,000
profitable. batch 5

Chapter 3: Linear Programming

The Standard LP Model

 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

Chapter 3: Linear Programming

The Standard LP Model

 The Mathematical Model

Maximize: Z = 3 x1 + 5 x2

Subject to:
x1 ≤ 4 …………(1)
2x2 ≤ 12 …………(2)
3x1 + 2x2 ≤ 18 …………(3)

and x1 and x2 ≥ 0 ……..(4), (5)

Chapter 3: Linear Programming

The Standard LP Model


 Assumptions

- Proportionality: Z and the left-hand sides of the functional


constraints are proportional to the activity levels.
violations: start-up costs, increasing or decreasing marginal
return:x12 - nonlinear programming

- Additivity: All the functions are sums of the individual contributions


of the respective activities.
violations: complementary or competitive activities (marketing and
production): x1x2 - nonlinear programming
8

Chapters 1& 2 4
Chapters 1& 2

Chapter 3: Linear Programming

The Standard LP Model


 Acceptable Alterations

- Minimize Z rather than maximize it


Z represents cost rather than profit

- Greater-than-or-equal-to inequality constraints


a11x1 + a12x2 + . . . + a1nxn ≥ b1

- Equality constraints
a11x1 + a12x2 + . . . + a1nxn = b1

- Deleting some non-negativity constraints


for some j, xj is unrestricted in sign
9

Chapter 3: Linear Programming

Formulation Examples
A Blending Problem

A company sells mixed nuts of two quality levels. The expensive


mix should not contain more than 25% peanuts nor less than 40%
cashews. The cheap mix should not have more than 60% peanuts
and no less than 20% cashews. Cashews cost 50 cents a pound and
peanuts cost 20 cents a pound. The expensive mix sells for 80 cents a
pound and the cheap mix for 40 cents a pound. What should the
blend of each mix be in order to maximize profit. The company
has $100 a day with which it can purchase nuts.

10

Chapters 1& 2 5
Chapters 1& 2

Chapter 3: Linear Programming

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

Chapter 3: Linear Programming

Formulation Examples
A Blending Problem

 Functional Constraints
Cost: 0.5 (x11 + x21) +0.2 (x12 + x22 ) ≤ 100
Cashews Peanuts

Peanuts: x12 / (x11+x12) ≤ 0.25 x22/(x21 + x22) ≤ 0.60

Mix 1 Mix 2

Cashews: x11 / (x11+x12) ≥ 0.40 x21/(x21 + x22) ≥ 0.20

12

Chapters 1& 2 6
Chapters 1& 2

Chapter 3: Linear Programming

Formulation Examples
A Blending Problem

 The Mathematical Model

Maximize: Z = 0.3x11 + 0.6x12 - 0.1x21 + 0.2x22


Subject to:
0.50x11 + 0.20x12 +0.50x21 +0.20 x22 ≤ 100 …(1)
-0.25x11 + 0.75x12 ≤0 …(2)
-0.60x21 + 0.40x22 ≤0 …(3)
0.60x11 - 0.40x12 ≥0 …(4)
0.80x21 - 0.20x22 ≥0 …(5)

and x11, x12 , x21, x22 ≥0 …(6 – 9)


13

Chapter 3: Linear Programming

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

Chapter 3: Linear Programming

Formulation Examples
A Trim-Loss Problem

Let xj = the number of rolls to cut according to setting j

• The Mathematical Model


Minimize: Z = 0x1 + 0x2 + x3 + 0x4 + 1x5 + 0.5x6

Subject to:
6x1 + x2 + 2x3 + 3x5 + 4x6 ≥ 500

2x3 + 2x4 + x6 ≥ 2000

2x2 + x4 + x5 ≥ 1500
and
xj ≥ 0, j = 1,2,….,6 15

Chapter 3: Linear Programming

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

needed at different times of the 10 am to noon 65 Noon to 8pm $175


4pm to
day are as shown in the table. Noon to 2 pm 87 $180
midnight
The union indicated that agents 2 to 4 pm 64 10pm to 6 am $195
can only work in the following 4 to 6 pm 73
shifts with the determined 6 to 8 pm 82
rates. The problem is to 8 to 10 pm 43
determine how many 10 to midnight 52
agents should be hired for Midnight to 6
15
each shift to minimize the am

total personnel cost. 16

Chapters 1& 2 8
Chapters 1& 2

Chapter 3: Linear Programming

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

Chapter 3: Linear Programming

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

Chapter 3: Linear Programming

Formulation Examples
Personnel Scheduling Problem

 The Mathematical Model


Minimize: Z = 170x1 + 160x2 + 175x3 + 180x4 + 195x5
Subject to:
x1 ≥ 48 …(1)
x1 + x2 ≥ 79 …(2)
x1 + x2 ≥ 65 …(3)
x1 + x2 + x3 ≥ 87 …(4)
x2 + x3 ≥ 64 …(5)
x3 + x4 ≥ 73 …(6)
x3 + x4 ≥ 82 …(7)
x4 ≥ 43 …(8)
x4 + x5 ≥ 52 …(9)
x5 ≥ 15 …(10)
and x1, x2 , x3, x4, x5 ≥0 …(11 – 15) 19

Chapter 3: Linear Programming

Formulation Examples
A Feed-Mix Problem

Dwight is an elementary school teacher who also raises cows for


supplemental income. He is trying to decide what to feed his cows. He is
considering using a combination of cow feeds available from local suppliers. He
would like to feed the cows at minimum cost while also making sure each
cow receives an adequate supply of calories and vitamins. The cost, calorie
content, and vitamin content of each feed are given in the table below.
Contents Feed Type A Feed Type B

Calories (per pound) 800 1,000

Vitamins (per pound) 140 units 70 units

Cost (per pound) $0.40 $0.80

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

Chapter 3: Linear Programming

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

Chapter 3: Linear Programming

Formulation Examples
A Feed-Mix Problem

 The Mathematical Model

Minimize: Z = 0.4 x1 + 0.8 x2

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

Chapter 3: Linear Programming

Solution Procedures

 Graphical: Two or three variables only

The idea is to graph the constraints on a two-dimensional


graph to see which points (x1, x2) satisfy all of the constraints. This
set of points is labeled the feasible region. Then we find which
point in the feasible region provides the best objective function
value.

 Algebraic: Solve system of equations for corner feasible points

 Simplex algorithm
(Next Chapter)
Numerical, iterative approach
23

Chapter 3: Linear Programming

Graphical Solution
Chemical Company Example

A Chemical Company manufactures three chemicals: Chemical A,


Chemical B, and Chemical C. Two different production processes
can be used to produce these chemicals: Process 1 and Process 2.
Each production process has an hourly cost, and each produces a
different chemical mix per hour. Each day, the company must
produce at least 10 units of Chemical A, 5 units of Chemical B, and 3
units of Chemical C.
Each hour of Process 1 costs $4 and yields 3 units of Chemical A,
1 unit of Chemical B, and 1 unit of Chemical C. Each hour of Process
2 costs $1 and yields 1 unit of Chemical A and 1 unit of Chemical B.

24

Chapters 1& 2 12
Chapters 1& 2

Chapter 3: Linear Programming

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

 The Mathematical Mode:

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)

and x1, x2 ≥ 0 …(4, 5)


25

Chapter 3: Linear Programming

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

Chapter 3: Linear Programming

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

Chapter 3: Linear Programming

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

Chapter 3: Linear Programming

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

Chapter 3: Linear Programming

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

Chapter 3: Linear Programming

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

Chapter 3: Linear Programming

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

Chapter 3: Linear Programming

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

Chapter 3: Linear Programming

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

Chapter 3: Linear Programming

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)

How to find Z optimum?

 Draw the isocost line (isoprofit if maximization):


1. Find the least common multiple of c1 and c2
2. Assign it as the objective value (or Z-value)
3. Graph the objective function line

35

Chapter 3: Linear Programming

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

Chapter 3: Linear Programming

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

Use point (0,0) 8


to determine the
direction of
minimization
6

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

Chapter 3: Linear Programming

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

Chapter 3: Linear Programming

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

Chapter 3: Linear Programming

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

Chapter 3: Linear Programming

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

Vous aimerez peut-être aussi