Вы находитесь на странице: 1из 65

Topics

 General optimization model


 LP model and assumptions
 LP examples
 Characteristics of solutions
 Sensitivity analysis
Formulate the
1
Problem
Situation Problem
Implement a Solution Statement

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

• Describe system  Define variables


• Define boundaries  Define constraints
• State assumptions  Identify data requirements
• Select performance
measures

3
Most of the deterministic OR models can be formulated as
mathematical programs.

"Program" in this context, has to do with a “plan” and not a


computer program.

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

(or functional or technological) constraints

• xj ≥ 0 are nonnegativity constraints

• f (x1,x2,…,xn) is the objective function

5
( )
x1
.
.
• A feasible solution x = . satisfies all the
xn
constraints (both structural and nonnegativity)

• The objective function ranks the feasible solutions;


call them x1, x2, . . . , xk. The optimal solution is the
best among these.

• For a minimization objective, we have z* = min{ f (x1),


f (x2), . . . , f (xk) }.

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:

Maximize/Minimize z = c1x1 + c2x2 + • • • + cnxn

Subject to ai1x1 + ai2x2 + • • • + ainxn

xj  uj, j = 1,…,n
{}


=
bi , i = 1,…,m

xj  0, j = 1,…,n

8
xj  uj are called simple bound constraints

x = decision vector = "activity levels"

aij , cj , bi , uj are all known data

 goal is to find x = (x1,x2,…,xn)T


(the symbol “ T ” means transpose)

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

Component 1 Component 2 Component 3


11
Machine data
Unit processing times Availability
(min) (min)
Machine \ Product P Q R
A 20 10 10 2400
B 12 28 16 2400
C 15 6 16 2400
D 10 15 0 2400
Total processing time 57 59 42

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

Machine Availability: 2400 min/wk Structural


coefficients

Operating Expenses = $6,000/wk (fixed cost)


Decision Variables
xP = # of units of product P to produce per week
xQ = # of units of product Q to produce per week
xR = # of units of product R to produce per week
13
max z = 45 xP + 60 xQ + 50 xR – 6000 Objective Function

Subject 20 xP + 10 xQ + 10 xR  2400 Structural


to 12 xP + 28 xQ + 16 xR  2400 constraints
15 xP + 6 xQ + 16 xR  2400
10 xP + 15 xQ + 0 xR  2400

xP  100, xQ  40, xR  60 demand

xP  0, xQ  0, xR  0 nonnegativity

Are we done?
Are the LP assumptions valid for this problem?

Optimal solution: x * = 81.82, x *


Q = 16.36, x *R = 60
P

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.

• Machines A & B are being used at


maximum level and are bottlenecks.

• There is slack production capacity in


Machines C & D.

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:

Type-A Type-B Time Available


Profit/Unit $1.00 $1.20
Machine I 2 min 1 min 180 min
Machine II 1 min 3 min 300 min

 Let
x be the number of type-A souvenirs and y the
number of type-B souvenirs to be made.

17
Solution

Type-A Type-B Time Available


Profit/Unit $1.00 $1.20
Machine I 2 min 1 min 180 min
Machine II 1 min 3 min 300 min

 Then, the total profit (in dollars) is given by


P = x  1.2 y
which is the objective function to be maximized.

18
Solution

Type-A Type-B Time Available


Profit/Unit $1.00 $1.20
Machine I 2 min 1 min 180 min
Machine II 1 min 3 min 300 min

 The total amount of time that machine I is used is


2x  y
and must not exceed 180 minutes.
 Thus, we have the inequality

2 x  y  180
19
Solution

Type-A Type-B Time Available


Profit/Unit $1.00 $1.20
Machine I 2 min 1 min 180 min
Machine II 1 min 3 min 300 min

 The total amount of time that machine II is used is


x  3y
and must not exceed 300 minutes.
 Thus, we have the inequality

x  3 y  300
20
Solution

Type-A Type-B Time Available


Profit/Unit $1.00 $1.20
Machine I 2 min 1 min 180 min
Machine II 1 min 3 min 300 min

 Finally, neither x nor y can be negative, so


x0
y0

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
x0
y0
***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:

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

 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

 The cost C (in cents) is given by


C = 6x  8 y
and is the objective function to be minimized.

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

 The amount of iron contained in x brand-A pills


and y brand-B pills is given by 40x + 10y mg, and
this must be greater than or equal to 2400 mg.
 This translates into the inequality

40 x  10 y  2400
26
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

 The amount of vitamin B1 contained in x brand-A


pills and y brand-B pills is given by 10x + 15y mg,
and this must be greater or equal to 2100 mg.
 This translates into the inequality

10 x  15 y  2100
27
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

 The amount of vitamin B2 contained in x brand-A


pills and y brand-B pills is given by 5x + 15y mg,
and this must be greater or equal to 1500 mg.
 This translates into the inequality

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
x0
y0
***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.)

1. Plot each constraint as an equation and then decide which


side of the line is feasible (if it’s an inequality).
2. Find the feasible region.
3. Plot the objective function (Z) line.
4. Imagine sliding the objective function line in the improving
direction. The “last point touched” as the objective function
line leaves the feasible region region is optimal.

31
max z = 45 xP + 60 xQ + 3000 Objective Function

s.t. 20 xP + 10 xQ  1800 Structural


12 xP + 28 xQ  1440 constraints
15 xP + 6 xQ  2040
10 xP + 15 xQ  2400
xP  100, xQ  40 demand

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–y0 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

subject to the system of inequalities


2 x  y  180
x  3 y  300
x0
y0
46
 We first graph the feasible set S for the problem.
 Graph the solution for the inequality
2 x  y  180
considering only positive values for x and 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.

2. Infeasible solutions: feasible region is empty; e.g., if the


constraints include
x1+ x2  6 and x1+ x2  7

3. Unbounded solutions: Max 15x1+ 7x2


(no finite optimal
s.t. x1 + x2  1
solution)
x1, x2  0

4. Redundant constraints: one or more constraints that do not


affect the feasible region

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

Constraint system allowing only nonpositive values for x1 and x2


x1 ? ? ? ? 0
0 Maximize z = x1 + x2
?

?
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.

1. Changes in the availability of resources


Constraint function changes with unit increase in
RHS, all other coefficients held constant

2. Objective Function Coefficient Ranging


Allowable increase & decrease for which current
optimal solution is valid
63
Resource is increased from 8 to 9,
new optimum move to point G

64
Changes in revenue units will
change the slope of Z

65

Вам также может понравиться