Sunteți pe pagina 1din 34

Chapter 3 - Introduction to Linear Programming

Order of coverage

3.1, 3.4 through 3.12, 3.2 and 3.3

Definition: A Linear Programming (LP) problem is an


optimization problem where we have limited resources
to allocate across competing activities.
LPs have the following 3 characteristics:
1. Decision variables.
2. A linear objective function which is to be either
maximized or minimized.
3. A set of linear constraints, where each constraint must
be either a linear equation or a linear inequality.
A function f(x1, x2, ... , xn) of x1, x2, ..., xn is a linear
function if and only if for some set of constants c1, c2, ...
, cn, f(x1, x2, ... , xn) = c1x1 + c2x2 + ... + cnxn
ex.

f(x1, x2) = 3x1 - 5x2 is linear


f(x1, x2) = x12 + 8x1x2 - x3 is not linear

Chap 3 - 1

Example: Determining the product mix for


Whirlpool dishwashers.
Washer Type
Standard
Deluxe
Super Deluxe

Profit
20
40
60

Labor Time
10
12
15

Decision - Choose product mix of the three


washer models. Variables - x1, x2, x3
Objective - Maximize Profit.
Constraints - Total labor hours available.

Chap 3 - 2

Steps to formulate a LP problem.


Step 1 Read the problem through once
quickly.
Step 2 Define the decision variables.
Step 3 Write down what we know.
Step 4 What is the objective (in sentence
form)? Max or min? Of what?
Step 5 Write the objective function.
Step 6 What are the constraints (in sentence
form)?
Step 7 Write the constraints.
Step 8 Verify.

Chap 3 - 3

Ex. Problem 1, Section 3.1, pg. 56


Step 1
Read the problem through once quickly.
Step 2

Step 3

Step 4
Step 5

Chap 3 - 4

Step 6

Step 7

Step 8

Chap 3 - 5

Assumptions for an LP to be an appropriate


representation of a real-life problem
(1) The Proportionality and Additivity
Assumptions
Objective Function
1. The contribution to the objective function
from each decision variable is
proportional to the value of the decision
variable.
ex. $10 profit/unit sale
selling 2 units yields twice as much
profit as selling 1 unit
2. The contribution to the objective function
for any variable is independent of the
values of the other decision variables.
ex. corn $3/bushel x1
wheat $4/bushel x2
regardless of the x1 value, x2 will
contribute $4/bushel
Constraints
Both assumptions hold similarly.

Chap 3 - 6

(2)The Divisibility Assumption


Each decision variable can assume
fractional values (otherwise Integer
Programming - Chapter 9)
(3) The Certainty Assumption
The objective function coefficients,
technological coefficients, and RHS
parameters are known with certainty.

Chap 3 - 7

Feasible and Optimal Solutions


The feasible region for an LP is the set of all
points satisfying the constraints.
ex. (1) x1
(2)

x2
x2

x1 = 5 and x2 = 2
is feasible
(1) 7 6
(2) 2 3

6
3
x1 = 1 and x2 = 6
is not feasible
(1) 7 6
(2) 6 3

For a maximization/minimization problem, an


optimal solution to an LP is the point in the
feasible region with the largest/smallest
objective function value.

Chap 3 - 8

Formulating LPs
Read the examples carefully in 3.4 - 3.12.
Some of the common problems are:
1. The Diet Problem
2. The Production Scheduling and Inventory Control
Problem
3. The Blending Problem
4. The Routing and Assignment Problem
In each of these problems, often the most difficult and
important step is defining the decision variables. These
variables represent the decisions that need to be made.
We can also think of them as being the independent
vs. dependent variables.
If we know the values of the decision variables we
have the information we need to implement a plan of
action.
Remember, there can be more than one correct way to
formulate the problem.
Be careful to make sure that the units of measure match!
Ex: In constraints.
The Heart Valve Problem - Problem 2, pg. 73, Section 3.4

Chap 3 - 9

Step 1
Read the problem through once quickly.
Step 2

Step 3

Step 4
Step 5
Step 6

Chap 3 - 10

Step 7

Step 8
Verify.

Chap 3 - 11

Automobile product mix problem. Additional problem 1.


Step 1
Read the problem through once quickly.
Step 2

Step 3

Step 4
Step 5
Step 6

Chap 3 - 12

Step 7

Step 8
Verify.

Chap 3 - 13

Staff Scheduling Problem - Problem 5 pg. 76, Section 3.5


Step 1
Read the problem through once quickly.
Step 2

Step 3

Chap 3 - 14

Step 4
Step 5
Step 6
Step 7

Step 8
Verify.

Chap 3 - 15

Multiperiod Inventory Problem - Problem 3 pg. 103, Section 3.10


Step 1
Read the problem through once quickly.
Step 2

Step 3

Step 4

Chap 3 - 16

Step 5

Step 6

Step 7

Step 8
Verify.

Chap 3 - 17

The Blending Problem - Problem 54, pg 121


Step 1
Read the problem through once quickly.
Step 2
Let HO =
G
=
J
=
C1 =
C2 =
HO1 =
HO2 =
NJ =
NG =
DO1 =
DO2 =
CO1G=
CO2G=
CO1J =
CO2J =

barrels of heating oil sold


barrels of gasoline sold
barrels of jet fuel sold
barrels of crude 1 purchased
barrels of crude 2 purchased
barrels of distilled 1 used for heating oil
barrels of distilled 2 used for heating oil
barrels of naptha used for jet fuel
barrels of naptha used for gasoline
barrels of distilled 1 sent through cracker
barrels of distilled 2 sent through cracker
barrels of cracked oil 1 used for gasoline
barrels of cracked oil 2 used for gasoline
barrels of cracked oil 1 used for jet fuel
barrels of cracked oil 2 used for jet fuel

Chap 3 - 18

Step 3 - See Diagram

Chap 3 - 19

Step 4
maximize Oles daily profit
Step 5
max z = 18G + 16J + 14HO - 12.1C1 - 10.1C2 - 0.15DO1
- 0.15DO2
Step 6
Amount of crude oil purchased.
Amount of oil which can be distilled.
Cracker capacity.
Octane levels of heating oil, gasoline, and jet fuel.
Demand for heating oil, gasoline, and jet fuel

Chap 3 - 20

Step 7
C1 10,000
C2 10,000
C1 + C2 15,000
DO1 + DO2 5,000
4HO1 + 5HO2 4.5HO
8NG + 9CO1G + 6CO2G 8.5G
8NJ + 9CO1J + 6CO2J 7J
HO 3000
G 3000
J 3000
All variables 0

Crude 1 Purchased
Crude 2 Purchased
Distillation Capacity
Cracker Capacity
Heating Oil Octane
Gasoline Octane
Jet Fuel Octane
Heating Oil Demand
Gasoline Demand
Jet Fuel Demand
Sign restriction

Balancing or Conservation Constraints


0.6C1 + 0.4C2 = NJ + NG
Naptha Production
0.3C1 + 0.2C2 = HO1 + DO1
Distilled Oil 1 Production
0.1C1 + 0.4C2 = HO2 + DO2
Distilled Oil 2 Production
0.8DO1 + 0.7DO2 = CO1G + CO1J
Cracked 1 Production
0.2DO1 + 0.3DO2 = CO2G + CO2J
Cracked 2 Production
HO1 + HO2 = HO
Heating Oil Production
NG + CO1G + CO2G = G
Gasoline Production
NJ + CO1J + CO2J = J
Jet Fuel Production
Step 8
Verify.

Chap 3 - 21

Graphical Solutions to a Two-Variable LP


Problem
Ex. problem 1, section 3.2, pg. 64
From previous notes:
max z
st

30x1
4x1
x1
10x1
x1

+
+
+

100x2
10x2
x2

x2

40
7
30
0
0

(1)
(2)
(3)
(4)
(5)

Find the feasible region.

Chap 3 - 22

Now find the optimal solution.


This is the point within the feasible region
with the largest value of z, where:
z = 30x1 + 100x2
To do this, graph a line on which all points
have the same z value.
In a maximization problem, this line is
called an isoprofit line.
In a minimization problem, this line is called
an isocost line.
To do this, pick a point in the feasible region
and calculate z.
Next, make z equal to this value and
calculate the slope of the isoprofit/isocost
line.

Chap 3 - 23

Ex. of Isoprofit Line


select (4, 1)
z = 30x1 + 100x2
z = 30(4) + 100(1)
z = 220
220 = 30x1 + 100x2
100x2 = 220 - 30 x1
x2 =

220
30

x1
100 100

This is equivalent to: y = mx + b


where

m = slope = -30/100
b = y-intercept = 220/100

All other isoprofit/isocost lines will lie parallel to this line.


Push the line in the northeast direction to maximize, or in
the southwest direction to minimize.
The point where the isoprofit/isocost line last intersects the
feasible region is the optimal point.
Find the most northeastern point.

Chap 3 - 24

Is point B the most northeastern point?


It occurs at the intersection of constraints (1) and (2). To
find x1 and x2, solve these equations simultaneously.
4x1 +
x1 +

10x2 =
x2 =

40 (1)
7
(2)

(2) x1 = 7 - x2
(1) 4(7 - x2) + 10x2 = 40
28 - 4x2 + 10x2 = 40
6x2 = 12
x2 = 2
(2) x1 = 7 - 2
x1 = 5
The z value at x1 = 5, x2 = 2 is:
z = 30(5) + 100(2)
z = 350

Chap 3 - 25

Is point A the most northeastern point?


It occurs at the intersection of constraints (2) and (4). To
find x1 and x2, solve these equations simultaneously.
x1

x2
x2

=
=

7
0

(2)
(4)

(2) 0 + x1 = 7
x1 = 7
The z value at x1=7, x2=0 is:
z = 30(7) + 100(0)
z = 210
Point B has a z value of 350, so eliminate point A from
further consideration.

Chap 3 - 26

Is point C the most northeastern point?


It occurs at the intersection of constraints (1) and (3). To
find x1 and x2, solve these equations simultaneously.
4x1 +
10x1

10x2 =
=

40 (1)
30 (3)

(3) x1 = 3
(1) 4(3) + 10x2 = 40
10x2 = 28
x2 = 2.8
The z value at x1 =3, x2 = 2.8 is:
z = 30(3) + 100(2.8)
z = 370
Therefore, point C is optimal.

Chap 3 - 27

Binding and Nonbinding Constraints


A constraint is binding if the LHS and the
RHS are equal when the optimal values of
the decision variables are substituted into the
constraint.
Otherwise the constraint is nonbinding.
This idea is important for sensitivity analysis.
In our example at the optimal point C, (3, 2.8):
(1)
(2)
(3)
(4)
(5)

4x1
x1
10x1
x1

+
+

10x2
x2

x2

40
7
30
0
0

40 40
5.8 7
30 30
30
2.8 0

binding
nonbind.
binding
nonbind.
nonbind.

You can see this visually on the graph.


Note - The feasible region contains an
infinite number of points. Why did we only
look at points A, B, and C?

Chap 3 - 28

Convex Sets and Extreme Points


A set of points S is a convex set if the line
segment joining any pair of points in S is
wholly contained in S.
ex.

convex

nonconvex

For any convex set S, a point P in S is an


extreme point (or a corner point) if each line
segment that lies completely in S and
contains the point P has P as an endpoint of
the line segment.
ex.
A, B, C, D are extreme points
E
is not an extreme point

Chap 3 - 29

LP Optimal Solutions
It can be shown that if an LP has an optimal
solution, it will occur at an extreme point.
Hence, only these points need to be
evaluated.
Return to graph.
Special Cases of LPs
(1) No feasible solutions - infeasible.
(2) Infinite number of optimal solutions multiple or alternative.
(3)Unbounded - usually due to an error in
the model formulation.

Chap 3 - 30

Infeasible Solution
Problem 1, Section 3.3, pg 69
max z
st

x1
x1
x1
x1

+
+
-

x2
x2
x2
x2

4
5
0
0

(1)
(2)
(3)
(4)

Chap 3 - 31

Infinite Number of Optimal Solutions


This occurs when the isoprofit/isocost line
intersects with a line segment corresponding
to a binding constraint.
Problem 2, Section 3.3, pg 69
max z
st

4x1 +
8x1 +
5x1 +
x1

x2
2x2
2x2

x2

16
12
0
0

(1)
(2)
(3)
(4)

Chap 3 - 32

Unbounded Solution
Problem 3, Section 3.3, pg 70
max z = -x1 +
st
x1 x1 +
x1

3x2
x2
2x2

x2

4
4
0
0

(1)
(2)
(3)
(4)

Chap 3 - 33

In conclusion, graphical solutions are nice


and give useful insights into how we solve
LPs. However, most real-life LP problems
have more than two variables, thus the
graphical method becomes impractical.

Chap 3 - 34

S-ar putea să vă placă și