Академический Документы
Профессиональный Документы
Культура Документы
Data
Construct
a Model
Implement 2
the Solution
4 Model
Procedure
Find
a Solution
Establish
a Procedure
3
Test the Model
and the Solution Solution Tools
2
Formulate the
Problem
Situation Problem
Statement
Data
3
Most of the deterministic OR models can be formulated as
mathematical programs.
Mathematical Program
Maximize / Minimize z = f (x1,x2,…,xn)
Subject to gi(x1,x2,…,xn)
{}
=
bi , i =1,…,m
xj ≥ 0, j = 1,…,n
4
• xj are called decision variables. These are
things that you control
• gi(x1,x2,…,xn)
{}
=
bi are called structural
5
( )
x1
.
.
• A feasible solution x = . satisfies all the
xn
constraints (both structural and nonnegativity)
6
Problem must be translated
Problem
from verbal, qualitative terms to Situation
statement
logical, quantitative terms Formulate the
Problem
Data
A logical model is a series of
rules, usually embodied in a Construct
computer program a Model
Model
• A mathematical model is a collection of
functional relationships by which
allowable actions are delimited and
evaluated.
7
A linear program is a special case of a mathematical
program where f(x) and g1(x) ,…, gm(x) are linear
functions
Linear Program:
xj uj, j = 1,…,n
{}
=
bi , i = 1,…,m
xj 0, j = 1,…,n
8
xj uj are called simple bound constraints
9
(i) proportionality
(ii) Additivity
linearity
(iii) divisibility
(iv) certainty
10
M achines A,B,C,D
Available time: P Q R
2400 min/week Revenue: Revenue: Revenue:
$90/unit $100/unit $70/unit
Operating expenses: M ax sales: M ax sales: M ax sales:
$6000/week 100 units/week 40 units/week 60 units/week
Purchased D D C
part: 10 min/unit 15 min/unit 16 min/unit
$5/unit
C C B
9 min/unit 6 min/unit 16 min/unit
A B A
20 min/unit 12 min/unit 10 min/unit
RM 1 RM 2 RM 3
$20/unit $20/unit $20/unit
Product data
P Q R
Revenue per unit $90 100 $70
Material cost per unit $45 $40 $20
Profit per unit $45 $60 $50
Maximum sales 100 40 60
12
P Q R
Data Summary
Selling price/unit 90 100 70
Raw Material cost/unit 45 40 20
Maximum sales 100 40 60
Minutes/unit on A 20 10 10
B 12 28 16
C 15 6 16
D 10 15 0
xP 0, xQ 0, xR 0 nonnegativity
Are we done?
Are the LP assumptions valid for this problem?
14
• Optimal objective value is $7,663.50 but
when we subtract the weekly operating
expenses of $6,000 we obtain a weekly
profit of $1,663.50.
15
Ace Novelty wishes to produce two types of
souvenirs: type-A will result in a profit of $1.00,
and type-B in a profit of $1.20.
To manufacture a type-A souvenir requires 2
minutes on machine I and 1 minute on machine II.
A type-B souvenir requires 1 minute on machine I
and 3 minutes on machine II.
There are 3 hours available on machine I and 5
hours available on machine II.
How many souvenirs of each type should Ace make
in order to maximize its profit?
16
Solution
Let’s first tabulate the given information:
Let
x be the number of type-A souvenirs and y the
number of type-B souvenirs to be made.
17
Solution
18
Solution
2 x y 180
19
Solution
x 3 y 300
20
Solution
21
Solution
In short, we want to maximize the objective
function
P = x 1.2 y
subject to the system of inequalities
2 x y 180
x 3 y 300
x0
y0
***But, NOT YET SOLVE optimal solution!
22
A nutritionist advises an individual who is suffering
from iron and vitamin B deficiency to take at least
2400 milligrams (mg) of iron, 2100 mg of vitamin B1,
and 1500 mg of vitamin B2 over a period of time.
Two vitamin pills are suitable, brand-A and brand-B.
Each brand-A pill costs 6 cents and contains 40 mg
of iron, 10 mg of vitamin B1, and 5 mg of vitamin B2.
Each brand-B pill costs 8 cents and contains 10 mg
of iron and 15 mg each of vitamins B1 and B2.
What combination of pills should the individual
purchase in order to meet the minimum iron and
vitamin requirements at the lowest cost?
23
Solution
Let’s first tabulate the given information:
Let
x be the number of brand-A pills and y the
number of brand-B pills to be purchased.
24
Solution
Brand-A Brand-B Minimum Requirement
Cost/Pill 6¢ 8¢
Iron 40 mg 10 mg 2400 mg
Vitamin B1 10 mg 15 mg 2100 mg
Vitamin B2 5mg 15 mg 1500 mg
25
Solution
Brand-A Brand-B Minimum Requirement
Cost/Pill 6¢ 8¢
Iron 40 mg 10 mg 2400 mg
Vitamin B1 10 mg 15 mg 2100 mg
Vitamin B2 5mg 15 mg 1500 mg
40 x 10 y 2400
26
Solution
10 x 15 y 2100
27
Solution
5x 15 y 1500
28
Solution
In short, we want to minimize the objective
function
C = 6x 8 y
subject to the system of inequalities
40 x 10 y 2400
10 x 15 y 2100
5x 15 y 1500
x0
y0
***But, NOT YET SOLVE optimal solution!
29
Many tools are available
Model as discussed in this
course
Find a
solution Some lead to “optimal”
solutions
Others only evaluate
candidates trial and
Solution Tools error to find “best”
course of action
30
A Graphical Solution Procedure (LPs with 2 decision variables
can be solved this way.)
31
max z = 45 xP + 60 xQ + 3000 Objective Function
xP 0, xQ 0 nonnegativity
32
P max z = 45 xP + 60 xQ + 3000
s.t. 20 xP + 10 xQ 1800
240 Max Q 12 xP + 28 xQ 1440
15 xP + 6 xQ 2040
200 10 xP + 15 xQ 2400
D
160 xP 100, xQ 40
xP 0, xQ 0
120 Max P
80 A
40
B C
0
0 40 80 120 160 200 240 280 320 360 Q
33
P
Unique Optimal Solution
120 Optimal solution = (16.36, 81.82)
100 M ax Q
80
A
60
40 Z = $4664
20
B Z = $3600
0
0 10 20 30 40 50 60 Q
34
Determine the solution set for the inequality
2x + 3y 6.
Solution
Replacing the inequality with an equality =, we obtain
the equation 2x + 3y = 6, whose graph is:
y
7
2x + 3y = 6 3
1
x
–5 –3 –1 1 3 5
–1
35
Determine the solution set for the inequality 2x + 3y 6.
Solution
Picking the origin as a test point, we find
2(0) + 3(0) 6, or 0 6, which is false.
Thus, the solution set is:
y
7
2x + 3y 6
2x + 3y = 6 3
1
(0, 0)
–5 –3 –1 1 3 5 x
–1
36
Graph x – 3y > 0.
Solution
Replacing the inequality > with an equality =, we
obtain the equation x – 3y = 0, whose graph is:
y
3
x – 3y = 0
1
–5 –3 1 3 5
x
–1
–3
37
Graph x – 3y > 0.
Solution
We use a dashed line to indicate the line itself will
not be part of the solution, since we are dealing
with a strict inequality >.
y
3
x – 3y = 0
1
–5 –3 1 3 5
x
–1
–3
38
Graph x – 3y > 0.
Solution
Since the origin lies on the line, we cannot use
the origin as a testing point:
y
3
x – 3y = 0
1
(0, 0)
–5 –3 1 3 5
x
–1
–3
39
Graph x – 3y > 0.
Solution
Picking instead (3, 0) as a test point, we find
(3) – 2(0) > 0, or 3 > 0, which is true.
Thus, the solution set is:
y
3
x – 3y = 0
1
(3, 0)
x
–5 –3 1 3 5
–1
x – 3y > 0
–3
40
Determine the solution set for the system
4 x 3 y 12
x y 0
Solution
The intersection of the solution regions of the two
inequalities represents the solution to the system:
y
4x + 3y = 12
4
3 4x + 3y 12
x
–1 1 2 3
41
Determine the solution set for the system
4 x 3 y 12
x y 0
Solution
The intersection of the solution regions of the two
inequalities represents the solution to the system:
y
4
x–y0 x–y=0
3
x
–1 1 2 3
42
Determine the solution set for the system
4 x 3 y 12
x y 0
Solution
The intersection of the solution regions of the two
inequalities represents the solution to the system:
y
4x + 3y = 12
4 4 x 3 y 12
x y 0 x–y=0
3
2
P( 127 , 127 )
1
x
–1 1 2 3
43
Determine the solution set for the system
x y 6 0 2x y 8 0 x 0 y 0
Solution
The intersection of the solution regions of the four
inequalities represents the solution to the system:
y
7 2x y 8 = 0
5
P(2,4)
3
x y 6 = 0
1
x
–1 1 3 5 9
44
1. Graph the feasible set (follow steps in slide 31).
2. Find the coordinates of all corner points
(vertices) of the feasible set.
3. Evaluate the objective function at each corner
point.
4. Find the vertex that renders the objective
function a maximum or a minimum.
If there is only one such vertex, it constitutes a
unique solution to the problem.
If there are two such adjacent vertices, there are
infinitely many optimal solutions given by the points
on the line segment determined by these vertices.
45
RecallLP Example 1, which required us to find
the optimal quantities to produce of type-A and
type-B souvenirs in order to maximize profits.
We restated the problem as a linear
programming problem in which we wanted to
maximize the objective function
P = x 1.2 y
y
200 (0, 180)
100 2 x y 180
(90, 0)
x
100 200 300
2 x y = 180
47
We first graph the feasible set S for the problem.
Graph the solution for the inequality
x 3 y 300
considering only positive values for x and y:
y
200
(0, 100)
100 x 3 y 300
x 3 y = 300
(300, 0)
x
100 200 300
48
We first graph the feasible set S for the problem.
Graph the intersection of the solutions to the
inequalities, yielding the feasible set S.
(Note that the feasible set S is bounded)
y
200
100
S x 3 y = 300
x
100 200 300
2 x y = 180
49
Next, find the corners of the feasible set S.
The vertices are A(0, 0), B(90, 0), C(48, 84), and
D(0, 100).
y
200
D(0, 100)
100 C(48, 84)
S x 3 y = 300
A(0, 0) B(90, 0)
x
100 200 300
2 x y = 180
50
Now, find the values of P at the corners and
tabulate them.
Finally, identify the corner with the highest value
for P:
We can see that P is maximized at the vertex C(48, 84)
and has a value of 148.8.
y Corners P = x + 1.2 y
200
A(0, 0) 0
D(0, 100) B(90, 0) 90
100 C(48, 84) C(48, 84) 148.8
S x 3 y = 300 D(0, 100) 120
A(0, 0) B(90, 0)
x
100 200 300
2 x y = 180
51
Recall LP Example 2, to determine the optimal
combination of pills to be purchased in order to meet
the minimum iron and vitamin requirements at the
lowest cost.
We restated the problem as a linear programming
problem in which we wanted to minimize the
objective function
C = 6x 8 y
subject to the system of inequalities
40 x 10 y 2400
10 x 15 y 2100
5x 15 y 1500
x, y 0
52
We first graph the feasible set S for the problem.
Graph the solution for the inequality
40 x 10 y 2400
considering only positive values for x and y:
y
40 x 10 y = 2400
(0, 240)
200
100
(60, 0)
x
100 200 300
53
We first graph the feasible set S for the problem.
Graph the solution for the inequality
10 x 15 y 2100
considering only positive values for x and y:
y
200
10 x 15 y = 2100
(0, 140)
100
(210, 0)
x
100 200 300
54
We first graph the feasible set S for the problem.
Graph the solution for the inequality
5x 15 y 1500
considering only positive values for x and y:
y
200
5x 15 y = 1500
(0, 100)
100
(300, 0)
x
100 200 300
55
We first graph the feasible set S for the problem.
Graph the intersection of the solutions to the
inequalities, yielding the feasible set S.
(Note that the feasible set S is unbounded)
y
40 x 10 y = 2400
200
10 x 15 y = 2100 S
5x 15 y = 1500
100
x
100 200 300
56
Next, find the vertices of the feasible set S.
The vertices are A(0, 240), B(30, 120), C(120, 60),
and D(300, 0).
C is minimized at the vertex B(30, 120) and has a
value of 1140 Vertex C = 6x + 8y
y A(0, 240) 1920
40 x 10 y = 2400 B(30, 120) 1140
A(0, 240)
C(120, 60) 1200
200
10 x 15 y = 2100 D(300, 0) 1800
S
B(30, 120)
5x 15 y = 1500
100
C(120, 60)
D(300, 0)
x
100 200 300
57
1. Multiple optimal solutions : Max 3x1 + 3x2
s.t. x1+ x2 1
x1, x2 0
Note: multiple optimal solutions occur in many practical (real-world) LPs.
58
x2
z1 z2 z3
Maximize z = 3x1 – x2
4
subject to 15x1 – 5x2 30
3
10x1 + 30x2 120
2
1 x1 0, x2 0
0
0 1 2 3 4 x1
59
x2 z3 Maximize z = –x1 + x2
z2
subject to –x1 + 4x2 10
z1
4
–3x1 + 2x2 2
3
x1 0, x2 0
2
1 Unbound
region
0
0 1 2 3 4 x1
60
x2
Inconsistent constraint system
Maximize z = x1 + x2
4
3 subject to 3x1 + x2 6
2
3x1 + x2 3
1
0
x1
x1 0, x2 0
0 1 2 3 4
?
subject to x1 – 2x2 0
? –x1 +x2 1
?
x1 0, x2 0
x2
61
62
Sensitivity analysis helps to test the sensitivity of
the optimum solution with respect to changes of
the coefficients in the objective function,
coefficients in the constraints inequalities, or the
constant terms in the constraints.
64
Changes in revenue units will
change the slope of Z
65