View
223
Download
2
Tags:
Embed Size (px)
Citation preview
1
Lecture 11 Resource Allocation Part1
(involving Continuous Variables-
Linear Programming)
1.040/1.401/ESD.018Project Management
Samuel Labi and Fred Moavenzadeh
Massachusetts Institute of Technology
April 2, 2007
2
Linear Programming
This Lecture
Part 1: Basics of Linear Programming
Part 2: Methods for Linear Programming
Part 3: Linear Programming Applications
3
Linear Programming
Part 1: Basics of Linear Programming
- The link to resource allocation in project management
- What is a “feasible region”?
- How to sketch a feasible region on a 2-D Cartesian axis
- Vertices of a feasible region
- Some standard terminology
4
The link to resource allocation in project management
Project output = f(Resource 1, Resource 2, Resource 3, … Resource n)
The goal is to determine the levels of each resource that would maximize project output.
Assume only 1 resource variable: X
Project output
Amount of Resource X
5
The link to resource allocation in project management
Project output = f(Resource 1, Resource 2, Resource 3, … Resource n)
The goal is to determine the levels of each resource that would maximize project output.
Assume only 2 resources: X and Y
Linear Programming
WW
W
X
XX
YY
Y
Examples of W =f(X,Y) response surfaces
6
The link to resource allocation in project management
Project output = f(Resource 1, Resource 2, Resource 3, … Resource n)
The goal is to determine the levels of each resource that would maximize project output.
Assume only 2 resources: X and Y (consider simplified cross section of response surface)
Resource Y
Output, W
Resource X
Linear Programming
7
The link to resource allocation in project management
Project output = f(Resource 1, Resource 2, Resource 3, … Resource n)
The goal is to determine the levels of each resource that would maximize project output.
Assume only 2 resources: X and Y
Resource Y
Output, W
Resource X
Linear Programming
Local space
8
The link to resource allocation in project management
Project output = f(Resource 1, Resource 2, Resource 3, … Resource n)
The goal is to determine the levels of each resource that would maximize project output.
Assume only 2 resources: X and Y
Resource Y
Output, W
Resource X
Linear Programming
Local space
Local maximum
9
The link to resource allocation in project management
Project output = f(Resource 1, Resource 2, Resource 3, … Resource n)
The goal is to determine the levels of each resource that would maximize project output.
Assume only 2 resources: X and Y
Resource Y
Output, W
Resource X
Linear Programming
Global Space
Local maximum
Local space
Global Maximum
10
The link to resource allocation in project management
Project output = f(Resource 1, Resource 2, Resource 3, … Resource n)
The goal is to determine the levels of each resource that would maximize project output.
Assume only 2 resources: X and Y
Resource YOutput, W
Resource X
Linear Programming
Local space
Local maximum
11
In the real world, there are more than 2 resource types (variables)- equipment types- labor types or crew types- money
Therefore, in project management, resource allocation can be a multi-dimensional linear programming problem.
Linear Programming
12
Linear Programming
Example 1: Sketch the following region:y – 2 > 0
SolutionFirst, make y the subjectWrite the equation of the critical boundarySketch the critical boundaryIndicate the region of interest
13
Linear Programming
Sketch of the region: y > 2
2
- 1
1
3
4
5
- 2
y = 2
x
y
Critical Boundary
14
Linear Programming
Example 2: Sketch of the region: x - 5 < 0
21 3 4 5
x = 5
x
y
(Critical Boundary)
15
Linear Programming
Linear Programming
Example 3: Sketch of the region: y > 2
2
- 1
1
3
4
5
- 2
y = 1
x
y
(Critical Boundary)
16
Linear Programming
Example 4: Sketch of the region: 1 – x ≤ 0
21 3 4 5
x = 1
x
y
(Critical Boundary)
17
Linear Programming
Example 5: Sketch of the region: y > 0
2
- 1
1
3
4
5
- 2
x axis, or y = 0
y
(Critical Boundary)
18
Linear Programming
Example 6: Sketch of the region: y - 3 ≤ 0
2
- 1
1
3
4
5
- 2
x axis
y
(Critical Boundary)
y = 3
19
Mean and Variance
Linear Programming
Example 7: Sketch of the region: x + 1 ≤ 0
21-1-2-3
x = -1
x
y
(Critical Boundary)
3
20
Linear Programming
Mean and Variance
Linear Programming
Example 8: Sketch of the region: 2 - x ≤ 0
21-1-2-3
x = -2
x
y
(Critical Boundary)
3
21
Linear Programming
How to Sketch a Region whose Critical Boundary is a bi-variate Function
First, make y the subject of the inequality
Write the equation of the critical boundary
Sketch the critical boundary (often a sloping line)
Indicate the region of interest
Note that …
- the sign < means the region below the sloping line- the sign > means the region above the sloping line)
22
Linear Programming
Example 9: Sketch of the region: y ≤ x
y = x
x
y (Critical Boundary)y x
Thus, the critical boundary is:
y = x
23
Linear Programming
Example 10: Sketch of the region: y < x
y = x
x
y (Critical Boundary)y < x
Thus, the critical boundary is:
y = x
24
Linear Programming
Linear Programming
Example 11: Sketch of the region: x – y ≤ 0
y = x
x
y
(Critical Boundary)
x – y ≤ 0
Making y the subject yields:
y x
Thus, the critical boundary is:
y = x
25
Linear Programming
Linear Programming
Example 12: Sketch of the region: y > 2x + 1
y = 2x+1
x
y
(Critical Boundary)
y > 2x +1
Thus, the critical boundary is:
y = 2x+1
When x = 0, y = -0.5
CB passes thru (0,-0.5)
When y = 0, x = 1
CB passes thru (1,0)
1
-3
26
Linear Programming
Example 13: Sketch of the region: y < 4x - 3
y = 4x- 3
x
y
(Critical Boundary)y < 4x - 3
Thus, the critical boundary is:
y = 4x - 3
When x = 0, y = -3
CB passes thru (0, -3)
When y = 0, x = 3/4
CB passes thru (0.75, 0)
0.75
-3
27
Linear Programming
Example 14: Sketch of the region: y ≤ -3.8x + 13
y = 4x- 3
x
y
(Critical Boundary)
y < -3.8x + 3
Thus, the critical boundary is:
y = - 3.8x +3
When x = 0, y = 13
CB passes thru (0, 13)
When y = 0, x = 13/3.8
CB passes thru (13/3.8, 0)
13/3.8
13
28
How to sketch a region bounded by two or more critical boundaries
First make y the subject of each inequality
Write the equation of the critical boundary
Sketch the critical boundaries for each inequality
Indicate the overlapping region of interest
Linear Programming
29
Linear Programming
Example 15: Sketch the region bounded (or constrained) by the following functions
y > 0x > 0y < -3.5x + 5
y=0
y
(Critical Boundary)
y > 0
Its critical boundary is:
y = 0
30
Linear Programming
Example 15: Sketch the region bounded (or constrained) by the following functions
y > 0x > 0y < -3.5x + 5
y=0
y
(Critical Boundary)
x > 0
Its critical boundary is:
x = 0
x=0
(Critical Boundary)
31
Linear Programming
Example 15: Sketch the region bounded (or constrained) by the following functions
y > 0x > 0y < -3x + 5
y=0
y
(Critical Boundary)
y < -3x + 5
Thus, the critical boundary is:y = -3x + 5When x = 0, y = 5CB passes thru (0, 5)
When y = 0, x = 5/3CB passes thru (5/3, 0)
x=0
(Critical Boundary)
(Critical Boundary)
y= -3x + 5
32
Linear Programming
Example 15: Sketch the region bounded (or constrained) by the following functions
y > 0x > 0y < -3x + 5
y=0
y
(Critical Boundary)
This is the FEASIBLE region.
All points in this region satisfy all the three constraining functions.
x=0
(Critical Boundary)
(Critical Boundary)
y= -3x + 5
Feasible Region
33
Linear Programming
Example 16: Sketch the region bounded (or constrained) by the following functions
y > 0y> - 0.2x + 5y < -0.5x + 5
x
y
34
Linear Programming
Example 16: Sketch the region bounded (or constrained) by the following functions
y > 0y> - 0.2x + 5y < -0.5x + 5
y=0
y
(Critical Boundary)
This is the FEASIBLE region.
All points in this region satisfy all the three constraining functions.
(Critical Boundary)
y = -0.2x + 5y= -0.5x + 5
(Critical Boundary)
Feasible Region
35
Linear Programming
Example 17: Sketch the region bounded (or constrained) by the following functions
y > 3y < -2x + 6y < x + 1
y
x
36
Linear Programming
Example 17: Sketch the region bounded (or constrained) by the following functions
y > 3y < -2x + 6y < x + 1
y=3
y
(Critical Boundary)
This is the FEASIBLE region.
All points in this region satisfy all the three constraining functions.
(Critical Boundary)
y = -0.2x + 6
y= x + 1
(Critical Boundary)
Feasible Region
x3-1
6
37
Linear Programming
Example 18: Sketch the region bounded (or constrained) by the following functions
y > 0x > 0y < -x + 5y < x+2
y
x
38
Linear Programming
Example 18: Sketch the region bounded (or constrained) by the following functions
y > 0x > 0y < -x + 5y < x+2
y=3
x=0
(Critical Boundary)
This is the FEASIBLE region.
All points in this region satisfy all the three constraining functions.
(Critical Boundary)
y = -x + 5y= x + 2
(Critical Boundary)
Feasible Region
y=03-2
5
39
Linear Programming
Example 19: Sketch the region bounded (or constrained) by the following functions
y > 0x > 0y < -0.33x + 1y > 2x - 5
y
x
40
Linear Programming
Example 19: Sketch the region bounded (or constrained) by the following functions
y > 0x > 0y < -0.33x + 1y > 2x - 5
y=3
y
(Critical Boundary)
This is the FEASIBLE region.
All points in this region satisfy all the three constraining functions.
(Critical Boundary)
y = 2x - 5
y= 0.33x + 1
(Critical Boundary)
Feasible Region
x
5/2
1
(Critical Boundary)
(Critical Boundary)
41
What are the “vertices” of a feasible region?
Simply refers to the corner points
How do we determine the vertices of a feasible region?- Plot the boundary conditions carefully on a graph sheet and read off the values at the corners, OR- Solve the equations simultaneously
Linear Programming
42
Linear Programming
Example 19: Sketch the region bounded (or constrained) by the following functions
y > 0x > 0y < -0.33x + 1y > 2x - 5
y=3
y
(Critical Boundary)
This is the FEASIBLE region.
All points in this region satisfy all the three constraining functions.
(Critical Boundary)
y = 2x - 5
y= 0.33x + 1
(Critical Boundary)
Feasible Region
x
(0, 1)
(3.6, 2.2)
(0, 0)(2.5, 0)
(Critical Boundary)
(Critical Boundary)
43
Why are vertices important?
They often represent points at which certain combinations of X and Y is either a maximum or minimum.
Certain combination … ? Yes!For example: W = x + y
W = 2x + 3y W = x2 + y W = x0.5 + 3y2 W = (x + y)2
etc., etc.So we typically seek to optimize (maximize or minimize) the value
of W. In other words, W is the objective function.
Linear Programming
44
W is also referred to as the OBJECTIVE
FUNCTION or project performance output.
(It is our objective to maximize or minimize W
x and y can be referred to as Project CONTROL VARIABLES or DECISION VARIABLES
Linear Programming
45
Symbols for decision variables
In some books, (x1, x2) is used instead of (x,y)
(x1, x2, x3) is used instead of (x, y, z)
(x1, x2, x3 , x4) is used instead of (x, y, z, v) etc.
x1
x2
x3
x2
x1
Linear Programming
46
Dimensionality of Optimization Problems
An optimization problem with n decision variables n-dimensional
Linear Programming
W=f(x1)
1 Decision Variable
x1
1-dimensional
47
Dimensionality of Optimization Problems
An optimization problem with n decision variables n-dimensional
x1
x2
2-dimensional
2 Decision Variables
Intersecting lines yield vertices (problem solutions)
Linear Programming
W=f(x1 , x2)W=f(x1)
1 Decision Variable
x1
1-dimensional
48
Dimensionality of Optimization Problems
An optimization problem with n decision variables n-dimensional
x1
x2
x2
x1
2-dimensional 3-dimensional
2 Decision Variables 3 Decision Variables
Intersecting lines yield vertices (problem solutions)
Intersecting planes yield vertices (problem solutions)
x3
Linear Programming
W=f(x1 , x2)W=f(x1) W=f(x1 , x2, x3)
1 Decision Variable
x1
1-dimensional
49
Dimensionality of Optimization Problems
An optimization problem with n decision variables n-dimensional
x1
x2
x2
x1
2-dimensional 3-dimensional
2 Decision Variables 3 Decision Variables
n-dimensional
n Decision Variables
Sorry! Cannot
be visualize
d
Intersecting lines yield vertices (problem solutions)
Intersecting planes yield vertices (problem solutions)
Intersecting objects yield vertices (problem solutions)
x3
Linear Programming
W=f(x1 , x2)W=f(x1) W=f(x1 , x2, x3) W=f(x1 , x2, …, xn)
1 Decision Variable
x1
1-dimensional
50
Example of 2-dimensional problem
Given that W = 8x + 5y
Find the maximum value of Z subject to the following:
y > 0
x > 0
y < -0.33x + 1
y < 2x - 5
Linear Programming
51
Solution
The objective function is: W = 8x + 5y
The constraints are:y > 0x > 0y < -0.33x + 1y < 2x – 5
The control values are x and y.
Linear Programming
52
Linear Programming
y=3
y
(Critical Boundary)
(Critical Boundary)
y = 2x - 5y= 0.33x + 1
(Critical Boundary)
Feasible Region
x
(0, 1)
(3.6, 2.2)
(0, 0)(2.5, 0)
Vertices of Feasible Region
x y W = 8x+5y
(0, 0) 0 0 = 8(0) + 5(0) = 0
(0, 1) 0 1 = 8(0) + 5(1) = 5
(2.5, 0) 2.5 0 = 8(2.5) + 5(0) = 20
(3.6, 2.2) 3.6 2.2 = 8(3.6) + 5(2.2) = 36
Solution (cont’d)
53
Solution (continued)
Therefore, the maximum value of W is 36,And this happens when x = 3.6 and y = 2.2
That is: Wopt = 36 units
yopt = 3.6 units
xopt = 2.2 units
This set of answers represents the “optimal solution”.
Linear Programming
54
What if there are several variables and constraints?
- In project management resource allocation, a typical problem may have tens, hundreds, or even thousands of variables and several constraints.
- Solutions methods - Graphical method- Simultaneous equations- Vector algebra (matrices)- Software packages
Linear Programming
55
Next Lecture
Common Methods for Solving Linear Programming Problems
Graphical Methods- The “Z-substitution” Method- The “Z-vector” Method
Various Software Programs: - GAMS- CPLEX- SOLVER
Linear Programming
56
Questions?
Linear Programming