Operation Research Lecture Notes
Operation Research Lecture Notes
Osinuga
Recommended Texts
1.
2.
3.
4.
5.
6.
7.
Apply Mathematics for Business, Economics and the Social Sciences (4 th Edition)
F.s. Budnik
Inventory Problem
Game Theory
Formulation
Dynamic Programming
Solving an LPM
Integer Programming
Graphical method
Decision Theory
Simplex Method
Transportation Problem
Assignment Problem
2.
3.
4.
5.
(objective)
s.t.
g1 (x1, xn) b1
x1, x2, , xn 0.
i = 1, 2, m
constraints
In addition to mathematical model, simulation and heuristic models are used. Simulation
models initiate the behavior of the system over a period of time. This is achieved by
specifying a number of events that are points in time whose occurrence signifies that
important information pertaining to the behaviour of the system can be gathered.
Dress
Suite
Material
Cotton
16
Silk
11
Wool
15
Profit
N30
N50
Material
(b)
(c)
(d)
And finally, at worst the tailor would make no garment implies that x1, x2 0
z = 30x1 + 50x2
(objective function)
s.t.
2x1 + x2 16
(cotton constraint)
x1 + 2x2 111
(silk constraint)
x1 + 3x2 15
(wool constraints)
x1 , x 2 0
(ii)
(iii)
(iv)
(b)
(c)
(d)
(e)
10
9
8
7
6
Series1
Series2
4
3
2
1
0
0
Figure 1
If a point is in the region, it satisfies all of the constraints and is called feasible, if it is not
in the region; it violates at least one of them and is called infeasible.
Different points in the infeasible region give different values of the objective
function. For example, the region (0, 0) is feasible and gives a profit 2 (0) 0 = 0.
Similarly, (1, 5) is feasible and gives profit of 2 (1) + 5 = 7, which is better than 0, we
seek the point or points of the feasible region that yield the maximal profit.
Corresponding to a fixed value of z, the set of solutions to the equation z = 2x + y
is the line (called the objective line) with the slope -2 and y intercept z. In other words, all
points along the line y = -2x + z correspond to the same z value. Remember that we are
interested only in those points that lie in the feasible region, and we want z to be as large
as possible (fig. 2)
15
14
13
12
11
10
9
Series1
8
7
Series2
6
5
Series4
Series3
4
3
2
1
0
0
Figure 2
2.0
programming problems that are too large to be solved graphically. At this time, the
simplex method is by far the most widely used algebraic procedure for solving LPP.
Computer programs based on this method can routinely solve LPP with thousands of
variables and constraints.
2.1
Lowtech industries import electronic components that are used to assemble two different
models of personal computers. One model is called the LT Deskpro computer and the
other model is called LT portable computer. Lowtech management is currently interest in
developing a weekly production schedule for both products.
The Deskpro generates a profit contribution of N50 per unit, and the portable
generates a profit contribution of N40 per unit. For next weeks production, a maximum
of 150 hours of assembly time can be made available. Each unit of the Deskpro requires 3
hours of assembly time, and each unit of the portable requires 5 hours of assembly time.
In addition, Lowtech currently has only 20 portable display components in inventory;
thus no more than 20 units of the portable may be assembled. Finally, only 300 square
feet of warehouse space can be made available for new production. Assembly of each
Deskpro requires 8 square feet of warehouse space; similarly, each portable requires 5
square feet.
Let x1 = no of units of the Deskpro assembled
x2 = no of units of the Portable assembled
The complete mathematical model for this problem is presented below:
Max 50x1 + 40x2
s.t
3x1 + 5x2 150
Assembly Time
1x2 20
Portable display
Warehouse capacity
Adding a slack variable to each of the constraints permits us to write the problem in
standard form.
Max 50x1 + 40x2 + 0s1 + 0s2 + 0s3
s.t.
3x1 + 5x2 + s1
150
1x2
20
8x1 + 5x2 + s3
300
2.2
Basic Solution
To determine a basic solution, set n-m of the variables equal to zero, and solve the
m linear constraints equations for the remaining m variables. We shall refer to the n-m
variables set equal to zero as the non basic variables and the remaining m variables
allowed (to be non zero) as the basic variables.
A basic solution can either be feasible or infeasible. A basic infeasible solution is a
basic solution that also satisfies the non negativity condition otherwise it is infeasible.
For example, if we set x2 = 0 and s1 = 0 we obtain the following solution to the
three-equation, five variable set of linear equation determined by the Lowtech
constraints.
x1 = 50
s1 = 0
s3 = -100
x2 = 0
s2 = 20
The above solution is referred to as a basic solution for the Lowtech LPP but the
basic solution is not a feasible solution because s3 = -100. However, suppose we had
chosen to make x1 and x2 non basic variables by setting x1 = 0 and x2 = 0. Then the
complete solution corresponding to x1 = 0 and x2 = 0 is:
x1 = 0, x2 = 0, s1 = 150, s2 = 20, s3 = 300.
This solution is a basic solution since it was obtained by setting two of the
variables equal to zero and solving for the other three variables. Moreover, it is a basic
feasible solution since all of the variables are greater than or equal to zero.
2.3
simplex solution procedure, we will first develop what is referred to as the initial simplex
tableau.
We adopt the general notation below in the tableau for representation of a linear
program.
cj = objective function coefficient for variable j
bi = right hand side value for constraint i
aij = coefficient associated with variable j in constraint i
We can show this portion of the initial simplex tableau as follows:
Table 2
(a)
(b)
c1
c2
...
cn
c row
a11
a12
ain
b1
a21
a22
a2n
b2
Matrix
Column
am1
am2
amn
bm
Thus for the Lowtech problem, we obtain the following partial initial simplex tableau
Table 3
x1
x2
s1
s2
s3
50
40
150
20
300
2.4
new basic feasible solution (extreme point) that yields a better value for the objective
functions. To do so require changing the set of basic variables and the simplex methods
provides an easy way to carry out this change of variables. For computational
convenience, we will add two new columns to the present form of the simplex tableau
and two rows to the bottom of the tableau.
Table 4
x1
x2
s1
s2
s3
Basis
CB
50
40
s1
150
s2
20
s3
300
zj
cj zj
50
40
Profit
Table 5
Entering
Variable
Leaving
Variable
x1
x2
s1
s2
s3
bi/aij
Basis
CB
50
40
s1
150
150/3 = 50
s2
20
20/0 = (ignore)
s3
300
300/8 = 37.5
zj
cj zj
50
40
Adopting the usual programming terminology refer to this squared element as the pivot
element. The column and the row containing pivot element are called the pivot column
and pivot row respectively
Table 6
x1
x2
s1
s2
s3
Basis
CB
50
40
s1
25/8
-3/8
75/2
s2
20
x1
50
5/8
1/8
75/2
zj
cj zj
1875
Profit
x2
s1
s2
s3
Basis
CB
50
40
s1
25/8
-3/8
75/2
s2
20
x1
50
5/8
1/8
75/2
50
250/8 0
50/8
1875
70/8
-50/8
zj
cj zj
x2
s1
s2
s3
bi/aij
Basis
CB
50
40
s1
25/8
-3/8
75/2 / 25/8 = 12
s2
20
20/1 = 20
x1
50
5/8
1/8
75/2
75/2 / 5/8 = 60
zj
50
250/8 0
50/8
1875
cj zj
70/8
-50/8
CB
40
0
50
x1
50
0
0
1
50
0
x2
40
1
0
0
40
0
s1
0
8/25
8/25
-5/25
14/5
-14/5
s2
0
0
1
0
0
0
s3
0
-3/25
3/25
5/25
26/5
-26/5
12
8
30
1980
Note that the values of the basic variables are x2 = 12, s2 = 8, and x1 = 30, and the
corresponding profit is 40 (2) + 0 (8) + 50 (30) = 1980.
Optimally Criterion
The optimal solution to a LPP has been reached when all of the entries in the act
evaluation row (cj zj) are zero or negative. In such cases, the optimal solution is the
current basic feasible solution.
Interpreting the optimal solution
The optimal solution of the Lowtech problem, consisting of the basic variables x 1,
x2 and s2 and non basic variables s1 and s3 is written as follows.
x1 = 30, x2 = 12, s1 = 0, s2 = 8, s3 = 0.
Indicating that there are no idle unit of the assembly time constraint and the
warehouse capacity constraint, in other words, these constraints are both binding.
Moreover, if management wants to maximize total profit contribution, Lowtech should
produce 30 units of the Deskpro and 12 units of the portable. Since s2 = 8, management
should note that there will be eight unused portable display units.
SUMMARY OF THE SIMPLEX METHOD
The steps followed to solve a linear program using the simplex method can now be
summarized as follows:
We assume that the problem has all less than or equal to constraints and involves
maximization.
Step:
1.
2.
3.
4.
Choose the non basic variable with the largest entry in the net evaluation row to
bring into the basis. This identifies the pivot column; the column associated with
the incoming variable.
5.
Choose as the pivot row that row with the smallest ratio of b i/ aij for aij > 0 where j
is the pivot column
6.
Perform the necessary elementary row operations to convert the column for the
incoming variable to a unit column with a 1 in the pivot row.
7.
Test for optimally. If cj zj 0 for all columns, we have the optimal solution. If
not, return to Step 4.
Problems
1.
2.
3.
Basis
CB
x1
x2
x3
s1
s2
s3
20
25
40
30
-1/2
15
zj
cj zj
(a)
(b)
(c)
What is the initial basis, does this correspond to the origin? Explain.
(d)
(e)
For the next iteration, what variable should enter the basis, and what variable
should leave the basis?
2.5
(a)
the combined total production for both models would be at least 25 units. That enables us
to add another constraint to the constraint equation i.e. total production constraint. 1x 1 +
1x2 25
Max 50x1 + 40x2
s.t
3x1 + 5x2 150
1x2 20
8x1 + 5x2 300
1x1 + 1x2 25
x1, x2 0.
Standard Form:
Max 50x1 + 40x2 + 0s1 + 0s2 + 0s3 + 0s4
s.t
3x1 + 5x2 + s1 = 150
1x2 + s2 = 20
8x1 + 5x2 + s3 = 300
x1, x2, s1, s2, s3, s4 0
Tableau form:
3x1 + 5x2 + s1 = 150
1x2 + s2 = 20
8x1 + 5x2 + s3 = 300
1x1 + 1x2 1s4 + 1a4 = 25
We can write the objective function for the tableau form of the problem as follows:
Equality Constraints
When an equality constraints occurs in a LPP, we need to add an artificial variable
to obtain tableau form and an initial basic feasible solution for example, if the equality
constraint is 6x1 + 4x2 5x3 = 30
With the artificial variable, the above equation becomes
6x1 + 4x2 5x3 + 1a1= 30
(c)
Case 3: Constraints:
Example: Convert the following example problem into tableau form and then set up the
initial simplex tableau:
Max 6x1 + 3x2 + 4x3 + 1x4
s.t
-2x1 1/2x2 + 1x3 6x4 = -60
1x1 + 1x3 + 2/3x4 20
-1x2 5x3 - 50
x1, x2, x3, x4 0
We later obtain the tableau form:
Max 6x1 + 3x2 + 4x3 + 1x4 + 0s2 + 0s3 Ma1 Ma3
s.t.
2x1 + 1/2x2 1x3 + 6x4
1a1 = 60
CB
-M
0
-M
x1
6
2
1
0
-2M
6+2M
x2
3
0
1
-3/2M
3 + 3/2M
x3
4
-1
1
5
-4M
4 + 4M
x4
1
6
2/3
0
-6M
1 + 6M
s2
0
0
1
0
0
0
s3
0
0
0
-1
M
-M
a1
-M
1
0
0
-M
0
a3
-M
0
0
1
-M
0
60
20
50
-110M
Note that the squared element is the pivot element indicating that x4 will enter and a1 will
leave the basis at the first iteration.
2.6
(1)
Reverse the maximization rule i.e. select the variable with the most negative cj zj
as the one to introduce into solution. In this case, optimal solution is reached when
every value in the cj zj row is non-negative
(2)
1x1 125
1x1 + 1x2 250
2x1 + 1x2 600
x1, x2 0.
The tableau form for this problem is as follows:
Max -2x1 3x2 + 0s1 + 0s2 + 0s3 Ma1 Ma2
s.t
1x1 1s1 + 1a1 = 125
1x1 + 1x2 1s2 + 1a2 = 350
2x1 + 1x2 + 1s3 = 600
x1, x2, s1, s2, s3, a1, a2 0
The initial simplex tableau is shown below:
Table 11
x1
x2
s1
Basis CB
-2
-3
0
a1
-M
1
0
-1
s2
-M
1
1
0
a3
0
2
1
0
zj
-2M
-M
M
cj zj
-2+2M
-3+M
-M
At the first iteration, x1 is brought into the basis
s2
0
0
-1
0
M
-M
and a1
s3
a1
0
-M
0
1
0
0
1
0
0
-M
0
0
is eliminated.
a2
-M
0
125
1
350
0
600
-M
-475M
0
After dropping the
a1 column from the tableau, the result of the first iteration is as follows:
Table 12
x1
x2
s1
Basis CB
-2
-3
0
X1
-2
1
0
-1
a2
-M
0
1
1
s3
0
0
1
2
zj
-2
-M
2M
cj zj
0
-3 + M
-2+M
Continuing with two more iterations of the
tableau shown below:
s2
s3
a2
0
0
-M
0
0
0
125
-1 0
1
225
0
1
0
350
M 0
-M
-M 0
0
-250 225M
simplex method provides the final simplex
Table 13
x1
x2
s1
s2
s3
Basis
CB
-2
-3
0
0
0
x1
-2
1
0
0
1
1
250
x2
-3
0
1
0
-2
-1
100
s1
0
0
0
1
1
1
125
zj
-2
-M
2M M
0
cj zj
0
-3 + M
-2+M -M
0
-800
The simplex method provides the optimal solution with x1 = 250, x2 = 100, s1 = 125, s2 =
0, and s3 = 0. Note however that the value of the objective function is -800 in the final
simplex tableau. We must now multiply this value by -1 to obtain the value of the
objective function to the original minimization problem (total cost = 800).
2.7
Special Class
1.
Infeasibility: This occurs when an optimal solution is reach but one or more
artificial variables remained in the solution with a positive value. Degeneracy occurs
whenever there is no solution to the linear program that satisfies all the constraints,
including the non negativity constraints.
2.
Unboundedness: Occurs if the value of the solution may be made infinitely large
occurs whenever the objective function line is parallel to one of the constraint lines. If the
linear programming problem has alternate optimal solution, cj zj will equal zero for one
or more of the variables nor in solution.
4.
Degeneracy: Occurs when one or more of the variables in the basic solution has a
value of zero. This does not create problem when it occurs at optimal solution. But if the
situation occurs at the early stage of iterations, an optimal solution may never be obtained
since each successive iteration will alternative between the same set of non optimal
points.
2.
When the primal has n decision variables, the dual will have n constraints. The
first constraint of the dual is associated with variable x 1 in the primal and so on.
3.
When the primal has m constraints, the dual will have m decision variables. Dual
variable u is associated with the first primal constraint and soon.
4.
The r.h.s of the primal constraints becomes the objective function co-efficient in
the dual.
5.
The objective function co-efficient of the primal become the r.h.s. of the dual
constraints.
The constraint co-efficient of the ith primal variable becomes the co-efficient in the
6.
CB
-M
-M
Zj
cj zj
U1
-150
3
5
-8M
-150 + M
U2
-20
0
1
-M
-20 + M
U3
-300
8
5
-13M
-300 + 13M
S1
0
-1
-1
M
-M
S2
0
0
-1
M
-M
a1
-M
1
0
-M
0
a2
-M
0
1
-M
0
CB
300
-M
Zj
cj zj
U1
-150
3/8
25/8
(-900 25m)
8
(-300+25M)
8
U2
-20
0
1
-M
U3
-300
8
0
-300
-20+M
S1
0
-1/8
5/8
300 5M
8
-300+5M
8
S2
0
0
-1
M
a2
-M
0
1
-M
-M
50/8
70/8
-15,000 70M
8
50
40
-90M
At the second iteration u1 is brought into the basis, and a2 is removed. The third tableau,
with the a2 column removed is:
Table 16
Basis
u3
u1
CB
-300
-150
Zj
cj zj
U1
-150
0
1
-150
0
U2
-20
-3/25
8/25
-12
-8
U3
-300
1
0
-300
0
S1
0
5/25
5/25
30
30
S2
0
3/25
-8/25
12
-12
26/5 = 5.20
14/5 = 2.80
-1980
optimal values of the primal slack variables are given by the negative of the Cj Zj
entries for the Uj variables.
This property enables us to use the final simplex tableau for the dual of the High
Tech problem to determine the optimal solution of x1 = 30 units of the Deskpro and x2 =
12 units of the portable. These optimal values of x 1 and x2 as well as the values for all
primal slack variables are given in the Zj and Cj Zj rows of the final simplex tableau of
the dual problem, which are shown again below.
Table 17
Basis
u3
u1
CB
-300
-150
Zj
cj zj
U1
-150
0
1
-150
0
U2
-20
-3/25
8/25
-12
-8
U3
-300
1
0
-300
0
S1
0
5/25
5/25
30
30
S2
0
3/25
-8/25
12
-12
26/5
14/5
-1980
The optimal solution remains unchanged i.e. the basic variable and their value
remains essentially unchanged.
2.
The basic variables remain the same but their values are changed
3.
Recall the High Tech industries problem, the LPP is restarted below
Max 50x1 + 40x2
s.t.
3x1 + 5x2 150 assembly time
1x2 20 portable display
8x1 + 5x2 300 warehouse space
x1 , x 2 0
The final simplex tableau of the above LPP is reproduced below.
Table 18
X1
X2
S1
S2
S3
Basis
CB
50
40
X2
40
8/25
-3/25
12
S2
-8/25
3/25
X1
50
-5/25
5/25
30
Zj
50
40
14/5
26/5
1980
Cj z j
-14/5
-26/5
The range of optimality for an objective function coefficient, then, is determined by those
coefficient values that maintain
Cj zj 0 for every j
(*)
Thus, to determine the range of optimality for an objective function coefficient, say, ck,
we complete the value of the left-hand-side of inequality (*), using ck as the objective
function coefficient for xk.
Let us compute the range of quantity for c1, the profit contribution per unit of the
Deskpro using c1 (instead of 50) as the objective function coefficient of x 1, the revisd
final simplex tableau is as follows.
Table 19
X1
X2
S1
S2
S3
Basis
CB
50
40
X2
40
8/25
-3/25
12
S2
-8/25
3/25
X1
50
-5/25
5/25
30
C1
40
64 c1
5
C1 24
5
480 + 30c1
C1 64
5
24 c1
5
Zj
Cj z j
The current solution will remain optimal as long as the value of c1 results in Cj zj 0
for the two non-basic variables s1 and s3.
Hence we must have
c1 64 / 5 0 and 24 c1 / 5 0. Using these inequalities,
We obtain c1 64 or 24 c1
(**)
Since c1 must satisfy (**), the range of optimality for c 1 is given by 24 c1 64.
To verify this range, we recomputed the final simplex tableau after reducing the valueo f
c1 to 30.
Table 20
X1
X2
S1
S2
S3
Basis
CB
30
40
X2
40
8/25
S2
-8/25
3/25
X1
50
-5/25
5/25
30
Zj
30
40
34/5
6/5
1380
Cj z j
-34/5
-6/5
0 -3/25
12
Since cj zj 0 for all variable, the original solution is still optimal i.e. the optimal
solution with c1 = 30 is the same as the optimal solution with c1 = 50. Note, however, the
decrease in total profit from N1980 to N1380.
Exercise:
Try and investigate the range of optimality for c1 if the profit contribution per unit were
reduced even further say to N20
LINEAR PROGRAMMING: TRANSPORTATION PROBLEM
This section presents the transportation model and its variants. In the obvious
sense, the model deals with the determination of a minimum-cost plan for transporting a
single commodity from a number of sources (e.g. factories) to a number of destinations
(e.g. warehouses). The model can be applied to a wide variety of problems including
inventory control, employment scheduling, personnel assignment, scheduling dam
reservoir and many others.
It is basically a special type of linear programming problem that can as well be
solved by the regular simplex method. However, its special structure allows the
development of a solution procedure called the transportation technique i.e.
computationally more efficient. The model also can be modified to account for multiple
commodities.
The Transportation Model (definition and application)
The transportation model is formulated for a class problem with the following
unique characteristics:
1.
2.
Each source is able to supply a fixed number of units of the product to each
destination, which has a fixed demand for the product.
Since there is only one commodity a destination can receive its demand from one
or more sources. The objective of the model is to determine the amount to be shipped
from each source to each destination such that the total transportation cost is minimized.
Let xij represents the amount transported from source i to destination j: then the LP
model representing the transportation problem is given generally as
Minimize z = cijxij
s.t.
xij ai
i = 1, 2, , m
Supply
xij bj
j = 1, 2, , n
Demand
Step 2: Determine an entering variable from among the non basic variables. If all such
variables satisfy the optimality condition (of the simplex method), stop; otherwise go to
Step 3.
Step 3: Determine the leaving variable of the current basic solution; then find the new
basic solution. Return to Step 2.
Determination of the Starting Solution
Transportation model are solved within the context of a tableau. When the
transportation tableau is used an initial solution can be found by several alternative
methods, including the North West corner method, the minimum cell cost method (least
cost) and Vogels approximation method.
The steps of the North West corner method can be summarized as:
1.
Allocate as much as possible to the cell in the upper left hand corner subject to
the supply and demand constraints.
2.
3.
Allocate as much as possible to the feasible cell with the minimum transportation
cost.
2.
Determine the penalty cost for each row and column by subtracting the lowest cell
cost in the row or column from the next lowest cell cost in the same row or
column.
2.
3.
Allocate as much as possible to the feasible cell with the lowest transportation cost
in the row or column having the highest penalty cost.
4.
Repeat steps 1, 2, and 3 until all rim requirements have been met.
Once the initial basic feasible solution has been determined by any of the previous
three methods, the next step is to solve the model for the optimal (i.e. minimum cost)
solution. There are two basic solution methods: the stepping stone method and the
modified distribution method (MODI) or method of multipliers. We will illustrate with
the following example.
Example 9
Wheat is harvested in the Midwest and stored in grain elevators in the three cities
Kansas City, Omaha and Desmonies. These grains elevators supply three mills that
produce flour, Chicago, St. Louis and Cincinnati. Grain is shipped to the mills in railroad
can such capable of holding one ton of wheat. Each grain elevator is able to supply the
following number of tons (i.e. railroad cars) of wheat to the mill on the monthly basis.
Table 21
(a)
Grain Warehouse
Supply
1.
Kansas City
100
2.
Omaha
175
3.
Desmoines
275
600 tons
Demand
A.
Kansas City
200
B.
Omaha
100
C.
Desmoines
300
600 tons
The cost of transporting one ton of wheat from each grain elevator (source) to each mill
(destination) differs according to the distance and rail system. These costs are:
Table 22
Mill
Grain Elevator
Chicago
A
6
St. Louis
B
8
Cincinnati
C
10
1.
Kansas City
2.
Omaha
11
11
3.
Desmoins
12
Determine how many tons of wheat to transport from each grain elevator to each mill on
a monthly basis in order to minimize the total cost of transportation.
Solution:
The linear programming model for the problem is formulated as follows
Minimize
s.t.
x1A + x1B + x1C = 150
x2A + x2B + x2C = 175
supply constraints
demand constraints
Table 23
A
1
6
X1A
8
X1B
7
X2A
Demand
10
X1C
11
X2B
Supply
150
11
175
12
275
X2C
5
X3A
X3B
X3C
200
100
300
600
B
6
C
8
Supply
10
1 150
150
7
11
11
175
12
275
3
Demand
200
100
300
600
Table 25
The Second NW corner allocation
A
Supply
10
1 150
150
7
11
11
175
12
275
2 50
3
Demand
200
100
300
600
Table 26
The Third NW corner allocation
A
B
6
C
8
Supply
10
1 15
150
7
2 50
11
11
175
12
275
100
4
3
Demand
200
100
300
600
Table 27
The Initial Solution from NWC is:
A
B
6
C
8
Supply
10
1 150
150
7
2 50
11
100
175
12
275
25
5
3
Demand
11
275
200
100
300
600
The transportation cost of the solution is computed by substituting the cell allocations
(i.e. the amounts transported)
x1A = 150, x2C = 25, x2A = 50, x3C = 275, x2B = 100
Z = 6x1A + 8x1B + 10x1C + 7x2A + 11x2B + 11x2C + 4x3A + 5x3B + 12x3C
Z = 6 (150) + 8 (0) + 10 (0) + 7 (50) + 11 (100) + 11 (25) + 4 (0) + 5 (0) + 12 (275).
= N5,925
Using the minimum cell cost method (least cost rule) and following the steps highlighted
above strictly.
Table 28
The Initial Solution minimum cell cost allocation
A
B
6
C
8
Supply
10
1 150
150
7
2 50
11
100
11
175
12
275
25
5
3 200
Demand
200
100
300
600
Table 29
The second minimum cell cost allocation
A
Supply
10
150
7
11
11
175
12
275
3 200
Demand
75
200
100
300
600
Table 30
The initial Solution from MCC
A
B
6
C
8
10
25
7
150
11
11
175
12
275
175
4
3 200
Demand
Supply
200
5
75
100
300
600
x3A = 200, x3C = 75, x2C = 175, x1B = 25, x1C = 125.
The total cost of this initial solution is N4,550 as compared to the N5,925 total
cost of the NW corner initial solution.
The third method for determining an initial solution, Vogels approximation
method (also called VAM), is based on the concept of penalty cost or regret.
Table 31
The VAM penalty cost
A
Supply
10
150
7
11
11
175
4
12
3
Demand
275
200
100
300
3
600
1
Table 32
The Initial VAM allocations
A
Supply
10
150
7
11
11
2 175
175
4
12
3
Demand
275
200
2
100
300
3
600
2
Table 33
The Second VAM allocation
A
Supply
10
150
7
11
11
2 175
175
4
12
3
Demand
275
200
100
300
600
2
Table 34:
The third VAM allocation
A
B
6
Supply
10
150
7
11
11
2 175
175
4
3 25
Demand
200
12
100
100
275
300
600
2
Table 35
The Initial VAM solution
A
Supply
10
150
7
11
150
11
2 175
175
4
3 25
Demand
200
12
100
150
275
100
300
600
x1C = 150, x2A = 175, x3A = 25, x3B = 100, x3C = 150
The total cost of this initial solution is N5,125 which is not high as the N5,925
obtained by the NWC initial solution or as low as the MCC solution of N4,550. Like the
MCC method, VAM typically results in a lower cost for the initial solution than the NWC
method.
Step 2: Determination of Optimal Solution (Modified Distribution Method [MODI]
or Method of Multipliers)
In order to demonstrate MODI, we will again use the initial solution obtained by
the minimum cell cost method.
Table 36
The minimum cell cost initial solution
V A = VB = VC =
From
To
U1
B
6
Demand
10
150
11
175
11
175
4
U3
Supply
1
7
U2
200
75
200
100
175
12
275
300
600
The extra left hand column with the u1 symbols and the extra row with the vj symbols
represents column and row values that must be computed in MODI. These values are
computed for all cells with allocation by using the following formula: u i + vj = cij
The value of cij is the transportation cost for cell ij. For example, the formula for cell 1B
is u1 + vB = C1B and since CIB = 8
u1 + vB = 8
The formulas for the remaining presently allocated cells are:
x1C: u1 + vc = 10
x2C: u2 + vc = 11
x3A: u3 + vA = 4
x3B: u3 + vB = 5
Thus, if we let u1 = 0, then we can solve for all remaining u i and vj values
vB = 8
x1C: u1 + vc = 10
vc = 10
x2C: u2 + vc = 11
u2 = 1
x3A: u3 + vA = 4
vA = 7
x3B: u3 + vB = 5
u3 = -3
Now, all the ui and vj values can be substituted into our table as shown in Table 2
Table 37
The Initial Solution with all ui and vj values
VA = 7
VB = 8
From
VC = 10
To
U1 = 0
6
1
C
-
25
Demand
11
175
150
11
175
-
U3 = -3
10
125
7
U2 = 1
Supply
200
75
200
100
175
12
275
300
600
Next we use the following formula to evaluate all empty cells (non basic variables) cij
ui vj = kij
Where kij equals the cost increase or decrease that would occur by allocating to a cell.
For the empty cells in (Table 2)
x1A : k1A = c1A
u1 vA = 6 0 7 = -1
u2 vA = 7 1 7 = -1
u2 vB = 11 1 8 = +2
u3 vC = 12 (-3 10) = + 5
This indicates that either cell 1A or 2A will decrease cost by N1 per allocated ton.
We can select either cell 1A or 2A to allocate since they are tied at -1. If cell 1A is
selected as the entering non basic variable, then the stepping stone path (loop) for the cell
must be determine so that we know how much to reallocate.
Table 38
The second iteration of the MOD solution method
V A = VB = VC =
From
To
U1 =
B
+
1 25
U3 =
150
11
175
4
3 175
100
200
100
Demand
10
11
2 175
-
Supply
125
7
U2 =
175
12
275
300
600
The ui and vj values for (table 3) must now be recomputed using our formula for the
allocated cells
Let u1 = 0
x1A : u1 + vA = 6
vA = 6
x1C: u1 + vC = 10
vC = 10
x2C : u2 + vC = 11
u2 = 1
x3A : u3 + vA = 4
u3 = -2
x3b : u3 + vB = 4
vB = 7
Table 39
The new ui and vj values for second iteration
VA = 6
VB = 7
From
VC = 10
To
U1 = 0
1 25
Supply
10
150
125
7
U2 = 1
11
2 175
11
175
U3 = 2
3 175
100
Demand
200
100
175
12
275
300
600
The cost changes for the empty cells are not computed using the formula
cij ui vj = kij
x1B : k1B = c1B
u1 vB = 8 0 7 = -1
u2 vA = 7 1 6 = 0
u2 vB = 11 1 7 = +3
u3 vC = 12 (-2) 10 = + 4
Since none of these values is negative, the solution shown above in (table 39) is optimal.
Thus the optimal solution is calculated as: 6 (25) + 10 (125) + 11 (175) + 4 (175) + 5
(100) = N4,525
Steps of MODI (Methods of Multipliers)
(1)
(2)
Compute u1 and vj values for each row and column by applying the formula ui vj
= cij to each cell that has an allocation
(3)
Compute the cost change, kij, for each allocated cell using the formula c ij ui vj
= kij.
(4)
Allocate as much as possible to the empty cell that will result in the greatest net
decrease in cost (kij). Allocate according to the stepping stone path or the selected
cell.
(5)
Repeat steps 2 through 4 until all kij values are positive or zero.
DEGENERACY
In the entire tableau showing solution to our wheat transportation problem, the
following condition was met. m row + n columns 1 = no of cells with allocation.
For example, in any of the balanced tableau for wheat transportation, the no of
rows are 2 (i.e. m = 3) and the no of columns are 3 (i.e. n = 3), thus:
3 + 3 1 = 5 cells with allocations.
Five cells with allocation always existed for these tableaus thus our condition for
normal solution was met. When this condition is not met and less then m + n 1 cells
have allocations, the tableau is said to be degenerate.
THE ASSIGNMENT MODEL
Consider the situation of assigning m jobs (or workers) to n machines. A job i (=
1, 2, , m) when assigned to machine j (= 1, 2, , n) incurs a cost c ij. The objective is to
assign the jobs to the machines (one job per machine) at the least total cost. The situation
is known as the assignment problem.
Table 40
machine
1
c11
c12
c1n
c21
c22
c2n
cm1
cm2
cmn
i = 1, 2, , m
xij = 1,
j = 1, 2, , n
xij = 0 or 1
0
otherwise
xij =
Perform row reduction by subtracting the minimum value in each row from all
other row values.
(2)
Person column reductions by subtracting the minimum value in each column from
all other column values
(3)
In the completed opportunity cost table, cross out all zeros using the minimum
number of horizontal and/or vertical lines
(4)
If less than m lines are required (where m = the no of rows or columns), subtract
the minimum uncrossed value from all other uncrossed values, and add this same
minimum value to all cells where two lines intersect. All other values are
unchanged.
(5)
If m lines are required, the optimal solution exists and m unique assignments are
made. If less m lines are required, repeat step 4.
14
13
17
14
16
15
16
15
18
14
20
17
20
13
15
18
The table shows the estimates of the no of court days each judge would require in
order to completely process each court docket. The court administrator would like to
assign the four judges so as to minimize the total no of court days needed to process all
four dockets
Table 42
Docket
Judge
Table 43
Docket
Judge
Table 44
Docket
Judge
Table 45
Docket
Judge
Final Assignment
Judge 1 to Docket 1
14
Judge 2 to Docket 4
15
Judge 3 to Docket 2
14
Judge 4 to Docket 3
15
Total days
58
Thus the optimal assignment of the four judges results in 58 judges days to clear the
four dockets.
25
18
23
14
38
15
53
23
15
17
41
30
26
28
36
29
Table 47
Column
W
13
10
30
16
13
23
11
12
12
17
Table 46
~ Row
W
20
13
23
11
12
12
17
Table 49
~
W
20
13
23
11
12
12
17
Table 50
~
W
17
16
10
20
11
14
Table 51
~
W
17
16
10
20
11
14
Table 52
~
W
17
16
10
20
11
14
The assignments
C to Z
20
D to X
28
A to W
25
B to Y
53
136
Unequal sources and destinations
To solve assignment problems in the manner described the matrix must be square
i.e. the supply must equal requirement. Where the supply and requirements are not equal,
an artificial source or destination must be created to square the matrix. The costs/mileage
/ contribution etc. for the fictitious row or column will be zero throughout.
Solution method, having mad the sources equal to the destination, the solution
method will be as normal, treating the fictitious elements as though they are real. The
solution method will automatically assign a source or destination to the fictitious row or
column and the resulting assignment will incur zero or gain zero contribution.
Example:
A foreman has four fitters and has been asked to deal with five jobs. The times or
each job are estimated as follows:
Table 53
Fitters
Job
Alf
Bill
Charlie
Dave
12
20
12
22
18
15
20
12
16
18
15
16
12
20
18
14
10
17
Dummy
12
20
12
22
18
15
20
12
16
18
15
16
12
20
18
14
10
17
Table 55
A
Dummy
15
10
16
10
16
10
12
Table 56
A
Dummy
10
13
10
12
Table 57
A
Dummy
10
13
13
10
12
Definition
Network analysis is a generic term for a family or group of related techniques
developed to aid management to plan and control project.
Background
In the 1950s, a basic form of Network analysis was being used in the UK and
USA in order to reduce project times i.e. the amount of time spent to complete a project.
In 1950, the US Naval Special Projects Office set up a team to devise a means of
controlling the planning of complex projects. The team came up with a network
technique known as PERT i.e. Programme Evaluation and Review Technique. This
technique was used in planning and controlling the development of the Polaris missile
and credited with saving two years in the development of missiles.
Since 1958, the technique has been improved upon and nowadays many variants
exist which handle, in addition to basic time, costs, resources, probabilities and
combination of these factors. Variety of names exists and among the commonly used are:
CPP (Critical Path Planning), CPA (Critical Path Analysis), CPM (Critical Path Method),
PERT etc.
at approximately the same time, although independently during the late 1950s. The fact
that they have been frequently and widely used in such a short of period of time attests to
their value as management science techniques.
The basic difference between them is that CPM is a deterministic technique while
PERT is a probabilistic technique.
2.
i.
Activity: This is a task or job which takes time and resources e.g. Building of
house, construction of bridges etc. It represented in a network by an arrow () in
which the head indicates the end of an activity and the tail indicates the beginning
of an activities.
ii.
Event: It is a point in time and it indicates the start and finish of an activity. It is
represented in a network by a circle or nodes (O). Note that the establishment of
activities automatically determines the event.
iii.
Dummy Activities: This is an activity which does not take time or resources. It is
used merely to show logical dependences or sequences between activities so as not
violate the rules of drawing network. It is represented in a network by a dotted
arrow (
iv.
Design a house
Obtain a finance
Build House
Example of a network;
3.
1.
A complete network must have only one point of entry (start event) and only one
point of exit (finish event).
2.
Every activities must have one preceeding event (tail event) and one succeeding
event (head event).
Note: Many activities may use the same tail event or the same head event. E.g.
Tail event
Head Event
i.e. they cant use the same tail and head event.
3.
4.
An Event is not complete until all activities leading into it are complete
5.
Loops are not allowed i.e. series of activities which leads back to the same event
e.g
6.
All activities must be tied into a network i.e. danglers is not allowed
Note: Danglers are the activities that do not link into the overall network. e.g
Dangling activities
4.
1.
2.
3.
Arrows need to be drawn in the horizontal plane unless totally unavoidable, they
must proceed from left to right.
4.
Activity Identification
Activities can be identified in several ways, typical of the method to be found
includes:
1.
2.
Dummy Activities
Dummy activities are the one that does not consume time or resources but shoe
logical relationship in a network. It is shown on a network by a dotted arrow.
Example: Assume that a car arrive at a service station during which two independent
activities takes place, filling with petrol (A) and topping up with oil (B).
This could be
Car
Arrived
Car
Ready
Which is incorrect because it contradicts the rule that says two or more activities cant
have the same head and tail event?
The correct network is:
Filled
with
Petrol
Car
Arrived
Car
Ready
Preceding Activities
1 2, 3, 4
6 and 2
7 and 8
10
11
12
9, 10, 11
Solution:
5
7
8
6
1
10
12
11
Summary
1.
Network analysis is used for the planning and controlling of large complex
projects.
2.
Network comprises activities which consumes time and resources and also event
which is point in time. Activities is represented by an arrow ( ) while event by a
circle (O) in a network.
3.
Network has one start and one head event. An event is not complete if the activity
leading to it is not complete.
4.
Two or more activities cant have the same head and tail event.
5.
The length of the arrows representing the activities is not important because
networks are not drawn to scale.
6.
They do not consume time or resources. They become necessary as the network is
drawn.
EXERCISE:
1.
23
46
78
13
36
57
80
25
45
58
24
47
67
12
45
79
13
48
14
57
25
58
26
87
35
69
2.
Solution to Exercise
1.
1
4
2.
2
5.
3
Lay
Foundation
3
Design
house
Dummy
0
2
1
Order
Material
Build
House
4
Select
Paint
3
1
Select
Carpet
Finish
Work
1
123467
Duration times 3 + 2 + 0 + 3 + 1 = 9
2.
3
2
0 1
1 1
1234567
Duration times: 3 + 2 + 0 + 1 + 1 + 1 = 8
3.
124567
Duration times: 3 + 1 + 1 + 1 + 1 = 7
4.
12467
Duration times: 3 + 1 + 3 + 1 = 8
The longest duration is 9 months
Therefore, the critical path is 123467
5.2
1.
Earliest Start Time, which is also the forward pass. This is the earliest possible
Latest Start Time, which is also the backward pass. This is the latest possible
time at which a preceding activities can be completed without delaying beyond project
duration time. The formula is:
LTi = max (LTi tij) where j is the ending node number of activities starting at i t ij is the
time for activity i j.
CRITICAL ACTIVITIES
This is the activities that have the same earliest start time and latest start time.
1
ET = 0
LT = 0
ET = 5
LT = 5
ET = 5
LT = 5
ET = 3
LT = 3
ET = 8
LT = 8
3
1
7
1
ET = 9
LT = 9
Project
duration time
ET = 6
LT = 7
Slack of an Activity
This is the time an activity can be delayed without affecting the overall project
duration i.e. extra time available for completing an activities
Slack for activity i j = LTj ETj tij
Where LTj = Latest start time for activity j
ETi = Earliest start time for activity i
tij = Activity time between i and j
Slack of an event
This is difference between the earliest start time and the latest start time of each event.
Note: The activities or event on the critical path does not have activity slack or event
slack.
From the example above, the slack activity for 24 = 5 3 1 = 1 months i.e. there is
extra one month. The slack event for (5); = LT 5 ET5 = 7 6 = 1 month
Note: Events is the only event not on the critical path.
6.
PERT Analysis
In CPM, all the activities time estimate has a single value i.e. we are assuming that
the activity time estimate is known with certainty, but in reality, it is rare that activity
time estimate can be known with certainty. This is true since projects that are networked
tends to be unique as such there is little historical evidence to be used as basis to predict
future occurrence. As an alternative to CPM, PERT (Project Evaluation and Review
Technique) uses probabilistic activity times.
Example 4
Using the example below to demonstrate PERT
A Southern Textile Company has decided to install a new computerized orderprocessing system. In the past, order for the cloth the company produce were processed
manually, which contributes to delay in delivering orders and as a result, lost sales. The
company wants to know how long it will take to install the new system. The network is
given below:
System
Development
Manual Testing
Company Orientation
System Training
System
Changeover
All this state in CPM network, we should assign a single-time estimate to each
network activity. However, in PERT networks we will determine three time estimates for
each activity which will enable us to estimate the mean and variance for a beta
distribution of the activity times.
We assume that the activity time estimate can be described by beta distribution for
several reasons:
1.
The beta distribution mean and variance can be approximated by three estimates
2.
The beta distribution is continuous and has no predetermined shape it will take on
the shape that is indicated by the time estimate given.
3.
The three estimates are (1) most likely time (m) (2) optimistic time (a) (3) pessimistic
time (b)
1.
Most Likely Time (m): Is the time would most frequently occur if the activities
were repeated many times
2.
Optimistic Time (a): Is the shortest possible time that an activity could be
completed assuming everything went right
3.
Pessimistic Time (b): Is the longest possible time required for an activity to
complete if everything went wrong.
These 3 estimates will be determined the mean and variance of beta distribution:
Variance =
The three estimates mean and variance of the southern textile network is given below:
Time estimate (week)
a
m
b
6
8
10
3
6
9
1
3
5
0
0
0
2
4
12
2
3
4
3
4
5
2
2
2
3
7
11
2
4
6
0
0
0
1
4
7
1
10
13
Activities
12
13
14
25
26
35
45
48
57
58
87
69
79
mean time
t
8
6
3
0
5
3
4
2
7
4
0
4
9
Variance
4/9
1
4/9
0
25/9
1/9
1/9
0
16/9
4/9
0
1
1
=8
2
Variance =
ET = 13
LT = 21
t=5
t=6
t=4
t=0
t=8
ET = 6
LT = 6
ET = 9
LT = 9
t=7
ET = 0
LT = 0
t=4
t=3
4
ET = 3
LT = 5
t=4
t=2
t=0
ET = 13
LT = 16
t=9
ET = 16
LT = 16
ET = 25
LT = 25
Variance
13
35
1/9
57
16/9
79
1 + 1/9 + 16/9 + 4
= 62/9 weeks
= 6.9 weeks
PERT also assumes that mean and variance of the network is normally distributed
7.
We can interpret the expected time and variance as mean and variance as mean and
variable of normal distribution.
From above, mean = 25 weeks
Variance 2 = 6.9 weeks
Normal Distribution
z=
Example 5: Suppose the textile company manager told customers the new orderprocessing system would be completely installed in 30 weeks. What is the probability
that it will in fact be ready by that time?
Solution:
x = 30 weeks, = 25 weeks, 2 = 6.9 weeks = 2.63
= 25
x = 30
z=
= 1.90
The z value 1.90 corresponds to 0.4713 on the normal distribution table, this
means there is a possibility 0.5 + 0.4713 = 0.9713 of completing the project in 30 weeks.
Alternatively, suppose one customer is so frustrated with delay order has told the textile
company that if she does not have the new ordering system working in 22 weeks, she will
trade elsewhere.
Solution:
x = 22
z=
The value on the normal table corresponds to 0.3729. This mean the probability of
completing the work in 22 weeks is 0.5 0.3729. 0.1271.
Summary
1.
Basic time analysis is the calculation of critical path which is the shortest time
which the project is completed.
2.
To determine the critical path, calculate the EST and LST for each event and
compare them. The chain activities in which the LST and EST are the same is the
critical path.
3.
4.
Given the 3 time estimates: Optimistic, most likely time, pessimistic the project
time and variance can be computed.
5.
Exercises
a.
Find the critical path of the following network using the EST/LST.
Activity
Preceeding Activity
Duration (Days)
2,6
11
7.8
10
11
12
9, 10, 11
b.
2.
Assuming the variance of the activities on the critical path in question 1 are 1, 4,
ET = 16
LT = 11
2
2
A
ET =
0
1
4
B
ET =
4
F
3
ET = 23
LT = 23
9
ET = 12
LT = 12
7
4
10
ET = 9
LT = 9
ET = 30
LT = 30
11
3
H
ET = 10
LT = 27
12
J
4
ET = 34
LT = 34
Slack Event:
Event C = 16 11 = 5 days
Event E = 18 13 = 5 days
Event H = 22 10 = 17 days
Variance = 1 + 4 + 2.25 + 9 + 6.25 + 9
2 = 31.5
INTEGER PROGRAMMING
In this section, we focus on a class of problems that are modeled as linear
programs with the additional requirement that some requirement that some or all of the
decision variable must be integer. Such problems are called Integer Linear
Programming Problems. The use of integer variables provides additional modeling
flexibility. As a result, the number of practical applications that can be addressed with LP
methodology is enlarged and includes capital budgeting, distribution system Design,
Location problems etc.
j = 1, 2, , m
hi (x) 0,
i = 1, 2, , k
(1)
AX b
(2)
X0
(3)
x1, x 2, , xq , integers
(4)
s.t
If 1 < q < n, the problem is termed a mixed- integer linear programming problem. If
(x1, x2, , xq) is replaced by xj = 0 or 1, i =1, 2..n problem is termed a zero-one
programmed problem.
The Linear programming version of this problem has been solved graphically in (fig 1.0)
it can be been that the optimal solution is
(x1, x2) = (2.44, 3.26)
Z = 14.66
Rounding the decision variable to the nearest integer value yields a solution of x 1 =2 and
x2 = 3 for an objective function value of 13 or #13,000 annual cash flow. In fig 1, we
shows the feasible solution points that provide integer values for x 1 and x2. Is the rounded
solution (x1, x2) = (2, 3) the optimal solution? The answer is no! as can be seen that the
optimal integer solution is x1 = 4 and x2 = 2, with object function value of 14.00 or
#14,000 annual cash flow.
Rounded LP
Solution (2,
3)
4
Opt. LP Relaxation
Solution (2.44,
3.26)
3
Opt. Integer
Solution (4, 2)
(3, 2)
Feasible
region for the
LP relaxation
(2, 2)
Fig (1.0)
Graphical Solution to the LP Relaxation
The branch and bound algorithm was originally developed by A.H. Larid and A.
G. Doig. However, R.J. Dakins modification offers greater computational advantage and
his version will be presented here.
Branch and Bond Solution
BB is currently the most efficient general-purpose solution procedure or integer
linear programs. The BB procedure begins by solving the LP Relaxation of the integer
linear program. The LP Relaxation of the above problem is stated below,
Max 2x1 + 3x2
s.t
x2 = apartment building
funds available
Managers time
x1 4
x1 , x 2 0
UB = 14.66 (X1 = 2, X2 =
3
LB = 13.00 Value = 13)
Note:
1
LPR Value
=14.66
X1 = 2.44
X2 = 3.26
x1 3
x1 2
2
LPR Value
=13.90
X1 = 2
X2 = 3.30
UB = 14.00
LB = 14.00
3
LPR Value
=14.58
X1 = 3
X2 = 2.86
x2 3
Max 2x1 + 3x2
s.t
195x1 + 273x2 1365
4x1 + 40x2 140
x1 4 x1 2
x1, x2, 0
x2 2
4
LPR Value
=14.00
X1 = 4
X2 = 2
Complete BB Solution
5
Infeasible
Solve the LP Relaxation of the IP at node 1 set UB value equal to the value of the
LP Solution
2.
Find n feasible integer solution. Set LB equal to the valueo f the feasible integer
solution
3.
Is UB = LB? If yes, the optimal solution is the feasible solution with value = LB
4.
Otherwise branch from the node with the greatest LP value. Find the variable
(call it xj) that is furthest from being integral. Create two branches and two
descendant nodes; one with xj (xj) and one with xj (kj) + 1.
5.
Solve the LP Relaxation at each of the descendant nodes, and record its LP value
6.
Re compute the upper bound by finding the maximum over all nod from which
there are no branches
7.
Re compute the lower bound as the max value of all feasible integer solution
found to date. Test for 93) and treat the decision arrive at accordingly.
Note:
1
LPR Value
=14.66
X1 = 2.44
X2 = 3.26
x1 3
x1 2
2
LPR Value
=13.90
X1 = 2
X2 = 3.30
Compare
UB = 14.58
UB = 14.58
LB = 14.58
3
LPR Value
=14.58
X1 = 3
X2 = 2.86
From the above, since the upper and lower bound are equal, the optimal solution to
the problem (original) with only x1 required to be integer has been found. It is given by x 1
= 3 and x2 = 2.86, with an objective function value of 14.58
INVENTORY PROBLEMS
INTRODUCTION
An inventory can be defined as any idle resource of an enterprise. An inventory
problem exists when it is necessary to stock physical goods or commodities for the
purpose of satisfying demand over a specified time horizon (finite or infinite). Almost
every business must stock goods to ensure smooth and efficient running of its operation.
Decisions regarding how much and when to order are typical of every inventory problem.
The required demand maybe satisfied by stocking once for the entire time horizon or by
stocking separately for every time unit of the horizon. The two extreme situations
(overstocking and under-stocking) are costly. Decisions may thus be based on the
minimization of an appropriate cost function that balances the total costs resulting from
over-stocking and under-stocking.
A GENERALIZED INVENTORY MODEL
The ultimate objective of an inventory model is to answer two questions.
1. How much to order?
2. When to order
The answer to the first question is expressed in terms of what we call the order
quantity and the when-to-order decision is the inventory level at which a new order
should be placed usually expressed in terms of re-order point.
The order quantity and re-order pint are normally determined by minimizing the
total inventory cost that can be expressed as a function of these two variables. We can
summarize the total cost of a general inventory model as a function of its principal
components in the following manner:
(Total inventory cost) =
Definitions:
1. Delivery lags or lead times is the time between the placement of an order and its
receipt and may be deterministic or stochastic.
2. Time Horizon defined the period over which the inventory level will be controlled.
This horizon may be finite or infinite depending on the time period which demand can
be forecast reliably.
3. Stock replacement: Although an inventory system may operate with delivery lags.
The actual replenishment of stock may occur instantaneously or uniformly.
Instantaneous replenishment can occur when the stock is purchased from outside
sources. Uniform replenishment may occur when the product is manufactured locally
within the organization.
DETERMINISTIC MODEL (Single item static model)
The simplest type of inventory model occurs when demand is constant over time
with instantaneous replenishment and no shortages. Typical situations to which this
model may apply are:
1. The use of light bulbs in a building
2. The use of clerical supplies, such as paper, pads and pencil in a large company
3. The consumption of staple food items, such as bread and milk
Fig (1) illustrates the variation of the inventory level. It is assumed that demand occurs at
the rate (per unit time). The highest level of inventory occurs when the inventory level
reaches zero level y/ time units after the order quantity y is received.
y
Inventory
Level
x time
t0 y/
Fig. 1
The smaller the order quantity y, the more frequent will be the placement of new
orders. However, the average level of inventory hold in stock will be reduced. On the
other hand, larger order quantities indicate larger inventory level but less frequent
placement of order (see fig. 2).
Low
Ordering
Frequency
y
Inventory
Level
High
Ordering
Frequency
Fig. 2
x time
Because there are costs associated with placing orders and holding inventory in
stock, the quantity y is selected to allow a compromise between the two types of costs.
This is the basis for formulating the inventory model.
Let K be the set up cost incurred every time an order is placed and assume that the
holding cost per unit inventory per unit time is k. Hence, the total cost per unit time TCU
as a function of y may be written as
TCU (y) = Setup cost/unit time + holding cost/unit time
TCU (y) =
+ h (y/2)
As seen from fig. (1), the length of each inventory cycle is to = y / and the
average inventory in stock is y/2
The optimum value of y is obtained by minimizing TCU (y) with respect to y.
Thus, assuming that y is a continuous variable, we have
= k/y + h/2 = 0
Which yields the optimum order quantity as
y=
(It can be proved that y minimizes TCU(y) by showing that the 2 nd derivates at y is
strictly positive). The order quantity above is usually referred to as Wilsons economic lot
size.
The optimum policy of the model calls for ordering units every to
time units.
= 1000/100 = 10 days
Since the lead time is 12 days add the cycle length is 10 days re-ordering occurs when the
level of inventory is sufficient to satisfy the demand for two (- 12, 10) days. Thus the
quantity y* = 1000 is ordered when the level of inventory reaches 2 * 100 = 200 units.
Notice that the effective lead time is taken equal to 2 days rather than 12 days.
This result occurs because the lead time is longer than t 0*.
EXAMPLE 12:
A manufacturer has to supply his customer with 600 units of his product per year.
Shortages are not allowed and the shortage cost amounts to N0.60 per and per year. The
setup cost per run is N80.00. Find the optimum run size and minimum average yearly
cost.
Solution:
Since = 600 units/year
K = N80.00
h = N0.06
y=
2 * 80 * 600 / 0.06 = 400 units opt. run time
And the minimum average yearly cost = 2kh
= 2 * 80 * 60 * 0.60
= N240.00
EXERCISES
1.
N200 per component and annual inventory holding costs are charged at 20%.
Answer the following inventory policy question for XYZ
a. What is the economic order quantity (EOQ) for this component?
b. What is the length of cycle time in months?
c. What are the total annual inventory building and ordering cost associated with
your recommended EOQ?
2.
The demand for a particular item is 18,000 units per year. The holding cost per
unit is N1.20 per year, and the cost of the replenishment rate is instantaneous.
Determine
a. Optimum order quantity
b. Number of orders per year
c. Time between orders and
d. Total cost per year when the cost of 1 unit is N1.00
GAME THEORY
A game is defined to be a contest between opponents in which each has a no
(finite of infinite) of courses of action, strategies and the outcome of any combination of
strategies is known beforehand.
Definitions:
1.
A two person zero sum game is one played by 2 persons or groups where the
gain of one person will be exactly equal to the loss of the other so that the sum total of
gains and losses will be equal to zero. A 2 person zero-sum game can be formulated in
the form of a matrix payoff matrix shown below:
Player C Strategies
C1
C2
C3
...
C1
R1
a11
a12
a13
...
a1n
Player R
R2
a21
a22
a23
...
a2n
Strategy
R3
a31
a32
a33
...
A3n
.
.
.
.
...
.
.
.
.
.
.
.
.
.
.
.
Rm
am1
am2
am3
...
amn
The player R controls the rows R1, R2, , Rm which represents his strategies while player
C controls the columns C1, C2, Cn which represents his strategies. If player R chooses
be ith strategy and player C the jth strategy then the element aij is assumed to represent
the payoff from player C to player R i.e. if aij is a +ve no, it represents payment of C to R
and if ve it denotes the payment of R to C.
2.
The element aij of the payoff matrix (of order mx n) of a game is called a saddled
point if it is minimum along the ith row elements and the maximum along the jth column
elements. Thus a game is said to be strictly determined, if an only if it has a saddled
value. The value of the game is equal to the saddle point. The optimal strategies for the 2
players are given by the row that contains the saddled point for the player R, and the
column that contains the saddle point for the Player C.
Determination of Saddle Point Minimax (Maximum) Principle
In any game problem, each player is interest in determining his own optimal
strategy. However, because of the lack of information regarding the specific strategies
selected by the other players, optimality has to be based on a conservative principle so,
each player selects his strategy which guarantees a payoff that can never be worse by the
selection of his opponents, this idea is called the Minimax (or Maximum) principle and
is illustrated below.
Example:
Let the payoff matrix of a 2-person zero-sum game be as in the matrix below. Find
the optimal strategies of the players.
Player C Strategies
C1
C2
C3
C4
Row
Minimum
Player R
strategy
R1
R2
R3
-3
-3
Column
Maximum
If player R selects his strategy R1, he may gain 7, 1, 8, 4 depending on the strategy
selected by player C. However, player R is guaranteed a gain of at least 1 = (7, 1, 8, 4)
irrespective of the strategy of C. Similarly R is guaranteed a gain of at least 42min (5, 4,
6 7) if he choose strategy R2 and at least -3 = min (6, 2, -3, 6) if strategy R3 is selected.
Thus if player R wants to maximize his gain irrespective of strategy selected by C, he has
to maximize the minimum gain i.e. max (1, 4, -3) = 4. Thus the strategy R2 is to be
chosen by R based on the maximum principle with 4 as the maximum value of the game.
On the othe hand, if player C chooses strategy C, he loses 7, 5, 6 depending on the
strategy selected by player R. however he can lose no more than 7 = max (7, 5, 6)
regardless of Rs strategies. In similar manner, player C loses no more than 4 = max (1, 4,
2), 8 = max (8, 6, -3) and 7 = max (4, 7, 6) by choosing strategies C 2, C3 and C4
respectively regardless of the strategies selected by R. Thus C selects the particular
strategy which minimizes his maximum losses irrespective of the strategies of R, i.e. min
(7, 4, 8, 7). The minimum of maximum loss is given by strategy C 2 based on minimax
principle.
A game as in the e.g. above, where the minimax value = maximin value the
corresponding pure strategies are called optimal strategies and the game is said to have a
saddle point.
As illustrated below, it is possible to have a situation where there is no saddle
point and hence one cannot find a pure strategy solution consider a game for which the
pay off matrix is as below:
Player C Strategies
Player R
strategy
C1
C2
C3
Row Minimum
R1
R2
R3
Column
Maximum
So, in general maximin value of game minimax value. (3. 27)
As in the last example above, mixed strategies in which both players will search
for a correct strategy mixture to find equilibrium, has to be used. The value of the game
at equilibrium is uniquely determined by the right strategy mixture and satisfies the
inequality (3.27).
The correct strategy mixture for each player is determined by assigning to each
strategy its probability of being chosen. Let r1, r2, .. rn represents the probabilities
with which player C selects the pure strategies R1, R2 . Rm respectively and let
C1, C2 . Cm be the probabilities with which player C selects the pure strategies
respectively. The sum of the probabilities for the strategies of each player may be equal
to one i.e.
m
ri = 1,
ri 0 i = 1, 2, , m
i=1
and
(3.28)
ci = 1,
ci 0 j = 1, 2, , n
j =1
The solution of mixed strategy problems is also based on the minimax principle in
the sense that R selects the values of ri so as to maximize the smallest expected value of
pay off in a column, where as C chooses the values of c j so as to minimize the largest
expected value of pay off in a row.
Thus, the player R finds ri which will
m
maximize
minimize of
i=1
i=1
w.r.t ri with r, 0
m
and ri = 1
(3.29)
i=1
maximize
minimize of
i=1
i=1
w.r.t ci with r, 0
m
and ri = 1
(3.30)
j=1
= aijr ic
(3.31)
i=1 j=1
i=1
ai1 ri, v
i =1
m
ai2 ri, v
(3.32)
i=1
.
.
.
m
ain ri, v
i=1
And ri 0, i = 1, 2, m
Clearly, (3.32) is a LPP, whose solution gives the value of the game. The simplex method
is used to solve the game problem below
Example
There are 2 competing departmental stores R and C in a city. Both the stores
customers are equally divided between the two. Both the store, plan to run annual
discount sales in the last week of December for this they want to attract more number of
customers by using advertisement through newspaper, radio and television. By seeing the
market trend, the store R constructed the following pay off matrix below, where the
number in the matrix includes a gain or loss of customer.
Strategies of Store C
C1
C2
C3
Row Minimum
Strategies
Store C
R1
40
50
-70
-70
R2
10
25
-10
-10
R3
100
30
60
30
Column
100
50
60
Maximum
Assuming that a gain of customers to store R means a loss to C, find the optimal
strategies for both the store along with the value of the gains.
Solution
The minimax and maximin values for this pay off matrix are 50 and 30 respectively and
hence the game does not have saddle point. Now, dividing the constraint in (3.32) by v
we have
Maximize f (r1, r2, rm) = v
m
ai1 ri, 1
i =1
ai2 ri, 1
i=1
(3.33)
.
.
.
m
ain ri, v
i=1
And ri 0, i = 1, 2, m
Defining new variables xi as
xi = ri i = 1, 2, m
v
Note that
Maximum of v = minimum of 1 = minimum of
v
xi
i=1
xi subject to
i=1
m
ai1 xi, 1
i =1
m
ai2 xi, 1
i=1
(3.33)
.
.
.
m
ain xi, v
i=1
And xi 0, i = 1, 2, m
Respectively from (3.30) we have the LPP
Maximize g(y1, y2, ym) =
yj
subject to
j =1
a1j yj, 1
i =1
m
a2j yj, 1
i=1
(3.34)
.
.
.
m
a1j yj, 1
i=1
And yi 0, j = 1, 2, n
Where g = 1 , yj = cj , j = 1, 2, n
v
v
For this example, the problem of store C can state as LPP as follows:
Maximize
g = y1 + y2 + y3 subject to
And
This is restated as
Maximize
f = y1 + y2 + y3 subject to
40y1 + 50y2 70y3 + y4 = 1
10y1 + 25y2 10y3 + y5 = 1
100y1 + 30y2 + 60y3 + y6 = 1
y1 0, i = 1, 2, 3
And
Basis
CB
y2
+1
50
y3
+1
-70
y4
0
1
y5
0
0
y6
0
y1
+1
40
y4
y5
10
25
-10
y6
100
30
60
zj
cj - zj
+1
+1
+1
y1
+1
y2
+1
38
y3
+1
y4
0
y5
0
-94
-16
y6
0
4
10
1
10
Basis
CB
y4
y5
0
0
22
Ratios
1
100
1
40
1
10
smallest value
Ratios
6
10
9
10
6
smallest value
380
9
220
y1
1
zj
3
10
3
10
3
5
3
5
7
10
y1
+1
y2
+1
1
0
cj - zj
Basis
CB
y2
y5
y1
1
zj
cj - zj
Basis
CB
y4
y5
y6
1
zj
cj - zj
y1
+1
94
51
-1460
51
38
51
132
51
-81
51
2
5
-1
100
y3
+1
-47
19
730
19
51
38
43
38
81
38
y4
0
1
38
-11
19
-3
360
7
380
-7
380
y5
0
y6
0
-1
95
5
38
1
76
1
380
-1
380
y2
+1
y3
+1
v* = 1 = 34
g
Thus, the optimum solution for C
v* = - 1 = 34,
g
1
100
1
100
y4
0
1
85
-114
323
-1
170
1
170
-1
170
0
1
0
0
0
y5
0
0
1
0
0
0
y6
0
7
510
-25
102
1
102
2
85
-12
510
1
100
1
100
1
30
Ratios
3
190
21
21
38
1460
1
1
190 255 smallest value
2
95
Ratios
13
510
41
102
1
255
1
34
c2* = y2* v* = 13 * 34 = 13
510
15
c3* = y3* v* = 1 * 34 = 2
510
15
c1 * = 0
The optimal strategy for R is given by
v* = 34,
r1* = x1 *v* = 1 *34 = 1
170
5,
r2* = x2 *v* = 0,
r3* = 2 *34 = 4
85
5
Thus, store R will gain 34 customers from C when both apply the optimal advertising
strategies during the annual reduction sale period.
Exercises
1.
Find the optimal strategies and the value of the 2 games whose payoff matrices are
given below:
C1
C2
C3
C4
R1
-12
R2
-3
R3
-5
-2
10
-3
13
12
R4
-2
-5
P1/P2
T1
T2
T3
T4
S1
12
14
S2
-10
S3
-4
S4
2.
An m x n matrix is called a Latin square if each row and column contains each of
the integers from 1 to m. Show that a game which has this as its payoff matrix has
the value (1 + m)
3.
Two players fight a duel, they face other 2n paces apart and each has a single
bullet in his gun. At a signal each may-fire, if either is hit or if both fire the game
ends. Otherwise both advance one pace and may again fire. The game of course
ends anyway by the time n paces has been taken. The probability of either hitting
his target if he fires after the ith pace forward is 1/n. The payoff is +1 to a player
who survives after his opponent is hit, and 0 if neither or both are hit; the guns are
silent so that neither knows whether or not his opponent has fired.
Show that if n = 4, the strategy shoot after taking two steps is optimal for both but
that if n = 4, a mixed strategy is optimal.
DECISION THEORY
The ultimate purpose of any operations research analysis is to enable operations to
be run efficiently and effectively, and this in turn involves selecting the best of the
alternative ways and means of conducting operations. Fundamental, then, to any
operations research exercise is the final step of making a decision between alternatives,
and the principles underlying such decision making are referred to as Decision Theory
Structuring the Decision Problem
To illustrate the decision analysis approach, let us consider the case of Political
Systems, Inc (PSI), a newly formed computer service from specializing in information
services such as surveys and data analysis for individuals running for political office. The
firm is in the final stages of selecting a computer system for its Midwest branch, located
in Lagos. While PSI has decided on a computer manufacturer, it is currently attempting to
determine the size of the computer system that would be most economical. We will use
decision theory to help PSI make its computer decision.
The first step is to identify the alternatives considered by the decision maker. For
PSI, the final decision will be to select one of the three computer systems, which differ in
size and capacity. The three decision alternatives denoted by D 1, D2, and D3 are as
follows:
D1 large computer system
D2 Medium computer system
D3 Small computer system
The second step is to identify the future events that might occur. There events,
which are not under the control of the decision maker, are referred to as the States of
nature. Thus, the PSI states of nature denoted S1 and S2 are as follows:
S1 high customer acceptance of PSI services
S2 low customer acceptance of PSI services
Given the three decision alternatives and the two states of nature, which
computer system should PSI select? To answer this question, we will need information
on the profit associated with each combination of a decision alternative and a state of
nature.
Payoff Tables
We denote the decision alternatives by D1, D2, , Dm, the states of nature by S1,
S2, Sn; and the return associated with decision Di and state Sj by Vij (I = 1, 2, , m i
j = 1, 2, , n). A process requiring the implementation of just one decision is defined
completely by Table 1. A table of this form is referred as a payoff table. In general,
entries in (a) can be stated in terms of profits, costs etc. Using the best information
available, management has estimated the payoffs or profits for the PSI problem. There
estimates are presented in Table 2
Table 1: States of Nature
S1
S2
Sn
D1
V11
V12
V1n
D2
V21
V22
V2n
Dm
Vm1
Vm2
Vmn
Table 2:
Decision alternatives
High Acceptance S1
Low Acceptance S2
Large system
D1
200,000
20,000
Medium system
D2
150,000
20,000
Small system
D3
100,000
60,000
Decision Trees
A decision tree provides a graphical presentation of the decision-making process.
Figure 1 shows a decision tree for the PSI problem. Note that the three shows the natural
or logical progress that will occur overtime.
Figure 1
High (S2)
200,000
Large (D1)
2
Low (S2)
-20,000
High (S1)
150,000
Medium (D2)
3
Low (S2)
20,000
High (S1)
100,000
Small (D3)
4
Low (S2)
60,000
Using the general terminology associated with decision trees, we will refer to the
intersection or junction points of the tree as nodes and the arcs or connectors between the
nodes as branches. Fig 1 shows the PSI decision tree with the nodes numbered 1 to 4.
When the branches leaving a given node are decision branches, we refer to the nodes as
decision node. Decision nodes are denoted by squares. Similarly, when the branches
leaving a given node are state-of-nature branches, we refer to the node as a state-ofnature node. State-of-nature nodes are denoted by circles. Using the node-labelling
procedure, node 1 is a decision node, where as nodes 2, 3 and 4 are states of nature nodes.
Decision Making without Probabilities
This section consider approaches to decision making that do not require
knowledge of the probabilities of the states of nature
Optimistic Approach
The (~) evaluates each decision alternative in terms of the best payoff that can occur. The
decision alternative that is recommended is the one that provides the best possible payoff.
For a problem in which maximum profit is desired, as it is in the PSI problem, the
optimistic approach would lead the decision maker to choose the alternative
corresponding to the largest profit. For problems involving minimization, this approach
leads to choosing the alternative with the smallest payoff. To illustrate the use of the ~,
we will show how it can be used to develop a recommendation for the PSI problem.
Table 3
Decision alternatives
Maximum Payoff
Large system
D1
200,000
Medium system
D2
150,000
Small system
D3
100,000
Conservative Approach
The conservative approach evaluates each decision alternatives in terms of the
most payoff that can occur. The decision alternative recommended is the one that
provides the best of the worst possible payoffs. For a problem in which the output
measure is profit, as it is in PSI problems. The (~) would lead the decision maker to
chose the alternative that maximizes the minimum possible profit that could be obtained.
For problems involving minimization, this approach identifies the alternative that will
minimize the maximum payoff.
Table 4
Decision alternatives
Maximum Payoff
Large system
D1
-20,000
Medium system
D2
20,000
Small system
D3
60,000
---
(*)
States of Nature
Decision Alternatives
High Acceptance
S1
Low Acceptance
S2
Large System
D1
80,000
Medium System
D2
50,000
40,000
Small System
D3
100,000
Table 6
Decision Alternatives
Large system
D1
80,000
Medium system
D2
Small system
D3
100,000
regret
For the PSI problem, the decision to select a medium-computer system, with a
corresponding regret of N50,000, is the recommended minimax regret decision.
Rank: In cost minimization problems, Vj will be the smallest entry in column j, and
equation (*) must be changed to
Rij = Vij Vj
approach can be used to identify the best decision alternative. The expect value approach
evaluates each decision alternative in terms of its expected value. The recommended
decision alternative is the one that provides the best expected value.
Let
N = the number of states of nature
P (Sj) = the probability of state of nature Sj
P (Sj) 0 for all states of nature
P (Sj) = P (S1) + P (S2) + + P (SN) = 1
Expected Value of Decision Alternative Di
Using the payoff values Vij shown in Tale 1 and supposes that PSI management believes
that S1, the high acceptance state of nature, has a 0.3 probability of occurrence and that
S2, the low-acceptance state of nature, has a 0.7 probability. Thus, P (S1) = 0.3 and P (S2)
= 0.7 and equation (**), expected values for the three decision alternatives can be
calculated:
EV (D1) = 0.3 (200,000) + 0.7 (-20,000) = N46,000
EV (D2) = 0.3 (150,000) + 0.7 (20,000) = N59,000
EV (D3) = 0.3 (100,000) + 0.7 (60,000) = N72,000
Thus, according to the expected value approach, D3 is the recommended decision
since D3 has the highest expected value (N72,000)
3
Low (S2)
20,000
P (S2) = 0.7
High (S1)
100,000
P (S1) = 0.3
4
Low (S2)
60,000
P (S2) = 0.7
Large (D1)
2
Medium (D2)
Sensitivity Analysis
In this section, we consider how changes in the probability estimates for the states
of nature affect or utter the recommended decision. The study of the effect of such
changes is referred to as ~. One approach to ~ is to consider different probabilities for the
states of nature and then recompute the expected value for each decision alternative.
Repeating this several times, we can begin to learn how changes in the probabilities for
the states of nature affect the recommended decision. For example, suppose that we
consider a change in the probabilities for the states of nature such that P (S1) = 0.6 and P
(S2) = 0.4. Using these probabilities and repeating the expected value computations, we
find the following:
EV (D1) = 0.6 (200,000) + 0.4 (-20,000) = N112,000
EV (D2) = 0.6 (150,000) + 0.4 (20,000) = N98,000
EV (D3) = 0.6 (100,000) + 0.4 (60,000) = N84,000
Thus, with these probabilities, the recommended decision alternative is D 1, with an
expected value of N112,000.
The only drawback to this approach is the numerous calculations required to
evaluate the effect of several possible changes in the state-of-nature probabilities.
(1)
x1 , x2 0
to be interpreted as a problem of optimal capacity utilization. x 1 and x2 are quantities
produced per period of two commodities which require 4 and 2 machine hours per unit,
and the right-hand side of the side condition is maximum available machine time per
period, the coefficients in the preference function are unit profits. Solving by the simples
method (or, what is simpler in such a trivial case, geometrically or by numerical
inspection) we get.
x1 =0, x2 =, f = 60
The optimal value of the two decision variables is found simultatiously in the
solution procedure.
An alternative approach is to determine the variable one at a time (sequentially),
decomposing the problem into a series of stages each corresponding to a sub problem in
only one variable, and solving the two single-variable problem (1). This is the basic idea
underlying dynamic programming (DP).
The decomposition of the problem (1) can be illustrated as shown in fig. 8. Let us
assume for convenience that commodity no. 1 is produced first (stage 1). We might as
well have started with the second commodity; the order in which they are arranged is
purely formal in a case like this where the decomposition into stages does not reflect a
sequence in time.
Now, for the production of the first commodity, 12 units of the capacity
factor (machine hours) are available as shown in the flow diagram. If x1 units are
produced, 12 4x1 machine hours are available as input for the second stage. After
producing x2 units of commodity
x1
12
Stage 1
x2
12 4x1
Stage 2
8x1
12 4x1 2x2
10x2
Figure 8
No 2, we are left with 12 4x1 2x2 machine hours, corresponding to the slack variable
in (1) which represents unutilized capacity. The two stages contribute 8x 1 and 10x2
respectively to total profit.
We can now solve the problem backwards, treating x1 as a parameter and
optimizing stage 2 with respect to the variable x2. For parametric x1 = x2 the maximal
capacity left to stage 2 is 12 4x1 machine hours so that the (parametric) subproblem of
stage 2 is
f1 = 10x2 = max
2x2 12 4x1
x2 0
(3)
which is a linear programming problem like the total problem (1), only it is singlevariable problem. The solution is obviously.
x2 = 6 2x1; f1max = 60 20x1
(4)
where x1 is a parameter.
Next we optimize stage 1 with respect to its decision variable, x1. The capacity
available is 12 machine hours. Production of x1 units contributes 8x1 to total profit, but
against this we have to consider that machine hours left over and used by stage 2 also
affect total profit, contributing f1max = 60 20x1 which also depends on x1. The
optimization problem of stage 1 becomes
f2 = 8x1 + f1max = 60 12x1 = max
4x1 12
(5)
x1 0
which is also a linear problem. Because f2 which expresses profit contributed by the
first stage plus the (parametric) maximum profit earned by the second is a decreasing
function of x1, the solution obviously is
x1 = 0; f2max = 60
(6)
Having thus found the optimal value of x1, which is also a parameter in the solution for
x2, we substitute it into (4) to get
x2 = 6 2x1 = 60
(7)
The solutions which we have found for the two variables are seen to agree with (2), and
total profit f = 60 is seen to be equal to f2max as it should be seen f2max was calculated as
the total of stage contributions to profit. What we did in solving (5) was to maximize the
profit of stage 1 a function of x1 plus the maximum profit earned by stage 2 for any
given value of x1.
In this way we have solved an optimization problem in two variables by
transforming it into a series, or sequence, or two single-variable problems. This is an
example of dynamic programming. The subproblems corresponding to the individual
stage are of the same type as the total problem (1) in the present case, a linear
programming problem and they are solved by the same method as that applied in the
simultaneous solving of the total problem (e.g. the simplex method). In other words,
dynamic programming does not refer to a particular class of optimization problems
(e.g. linear programming problems) or to a specific method of solution (like the simplex
method); rather, it indicates a general procedure for decomposing a problem into a series
of subproblems involving fewer variables, and combining their solutions to get the
solution of the original problem.
3. When an optimization problem is formulated as a multistage problem to be
solved by dynamic programming, it is convenient to introduce state variables yn
associated with the individual stages (numbered n = 1, 2, .., n). The production process of
Figure 8 may be thought of as starting in a (given) initial state where y0 = 12 machine
hours are available; this is the input state of stage 1. Producing x1 units of the first
commodity, each of which requires 4 machine hours, changes the state of the system:
available capacity is reduced by 4x1 machine hours so that the output state of stage 1
which is also the input state to stage 2 becomes y1 = y0 4x1 = 12 4x1. Producing x2
units of the second product, available capacity is further reduced to y 2 = y1 2x2 = y0
4x1 2x2, which in this case represents the final state. (y2 0 by definition but otherwise
unknown).
Thus, the input state of stage no. n, yn-1, is transformed into an output state yn, the
change being brought about by the decision variable
x1
y0 = 12
Stage 1
x2
y1 = y0 - 4x1
Stage 2
y2 = y1 2x2
f2 = 10x2
f1 = 8x1
Figure 9
of the stage, xn. The successive changes of the state of the system can formally be
described by transformation equations of the form
yn = tn (yn-1, xn) (n = 1, 2, , n).
(8)
together with the nonnegativity requirement x 1, x2, y1, y2 0 they are equivalent to the
restrictions of the original problem (1), y0 being = 12 and y2 representing the slack
variable.
The stage returns, i.e. the contributions of the individual stages to the preference
function f, will in the general case depend on the input state and the decision variable:
rn = rn (yn 1, xn) (n = 1, 2, , n);
in the present example these return functions are of the simple form
r1 = 8x1
r2 = 10x2
(9)
Introducing these symbols into Fig. 8, the flow diagram of the two-stage problem
has the form of Fig. 9. The backward solution now proceeds as follows.
At the first stage of the calculations corresponding to the last stage in the
production system, n = N = 2 the input style y1 is considered as a parameter, inherited
from the previous stage of the system. The stage is optimized by maximizing its decision
function, f1 here equal to the stage return, r2 (x2) subject to the parametric capacity
restriction 2x2 y11:
f1 = r2 (x2) = 10x2 = max
2x2 y1
x2 0
(10)
(11)
where f1 denotes the maximum value of the stage decision function, F 1 = f1max
At the second stage of the computations (production stage 1) we maximize the
decision function f2 = r1 (x1) + f1 (y1) subject to the capacity limitation 4x1 y0 (i.e., y1 =
(12)
4x1 y0
x1 0.
The solution is
x1 (y0) = 0
f2 (y0) = 5y0
(13)
when F2 = f2max.
The solution to the complete problem (1) called the optimal policy can now be
determined by solving the recursive equation system formed by the parametric optimum
solutions (11) and (13) and the transformation equations (8), starting from the initial state
y0 = 12:
Transformation
Equations
yn = tn (yn-1, xn)
Parametric Optimal
solutions
xn = xn (yn-1)
Maximum of decision
function
y1 = y0 4x1 = 12
x1 (y0) = 0
f2 (y0) = 5y0 = 60
y2 = y1 2x2 = 0
x2 (y1) = 0.5y1 = 6
f1 (y1) = 5y1 = 60
y0 = 12
where the direction of the computations is the opposite of that followed above in the
optimization of stages. The optimal policy emerges as x1 = 0, x2 = 6 and total profit is f =
F2 = 60. If y0 had been a parameter, the solution now parametric would have been x1 =
0, x2 = 0.5y0, f = 5y01.
The decomposition by which we solved problem (1) can be described as follows.
Replacing the side conditions by the equivalent formulation
y1 = y0 4x1, y1 0
y2 = y1 2x1, y2 0,
this together with the nonnegativity requirements implies
0 x1 y0
(14)
0 x2 y1
(15)
x1
x2
subject to (14) (15); clearly this maximization problem can be decomposed into two
single-value problems, corresponding to (10) and (12):
F1 (y1) = max 10x2 (0 x2 y1)
F2 (y0) = max {8x1 + F1 (y1)}
= max {8x1 + F1 (y0 4x1)} (0 x1 y0),
Where fmax = F2 (y0). In a more general formulation the decomposition of a two-stage
problem
Fmax = max [r1 (y0, x1) + r2 (y1, x2)]
can be expressed in the recursion equations
F1 (y1) = max [r2 (y1, x2)]
(16)
(17)
x2
x1
y0
y1 = t1 (y0, x1)
f1 = (y0, x1)
xn
y2
f2 = (y1, x2)
yn-1
xN
yn
yN-1
fn = (yn-1, xn)
yN
fN = (yN-1, xN)
Figure 10
The decision functions of stages N, N 1, , 2, 1 are respectively
f1 = rN (yN 1, xN)
f2 = rN -1 (yN-2, xN-1) + F1 (yN-1) where yN-1 = tN-1 (yN-2, xN-1)
(18)
fN = r1 (y0, x1) + FN-1 (y1)
(19)
which can be sewn together by means of the transformation equations so that we get
the parameters determined. y 0 now determines x1 and together they determine y1; this
gives x2 which with y1 determines y2; and so forth as illustrated by Fig. 11
y0
y1 = t1 (y0, x1)
x1 (y0)
y2 = t2 (y1, x2)
x2 (y1)
x3 (y2)
Figure 11
It follows from (18) that the maximum of fN represents the accumulated value of
the stage returns, e.g. FN = fmax.
If the variables of a DP problem are allowed to take discrete values only, or if the
stage returns and/or the transformation functions are given in tabular form for discrete
values of the variables, the problem will have to be solved by tabular computations.
For example, the decision variables may be required to have integral values (xn =
0, 1, 2, ) because the interpretation of the problem is such that fractional values would
be meaningless. This is so in problem (1): strictly speaking it is impossible to produce a
fractional number of units of a commodity, e.g. x1 = 2.6. Thus, although in this case the
analytical shape of the return functions is known, r1 and r2 are defined only for integral
values of x1 ( 3 ) and x2 ( 6):
x2
x1
r1 (= 8x1)
16
24
r2 (= 10x2)
10
20
30
40
50
60
12
12
______________________________________________________
y2 (= y1 2x2)
y1 \ x2
12
12
10
where y1 is confined to the values 0, 4, 8, and 12 resulting from the first table. The black
cells in the last table correspond to combinations of values of y 1 and x2 which are not
feasible because they would imply a negative value of y2 (cf. the sign restriction y2 = y1
2x2 0).
The solution procedure, using backward recursion, now proceeds as follows. For
the last stage (n = N = 2) we have:
Stage 2
f1 = r2 (x2) (= 10x2)
y1 \ x2
0 1 2 3 4 5 6
F1 (y1)
x2 (y1)
y2 (y1)
0 10 20
20
0 10 20 30 40
40
12
0 10 20 30 40 50 60
60
where the maximal value of the decision function f1 for each of the possible input states
(values of y1) is shown in bold-faced type. This parametric optima and the optimal values
of the decision variable are listed in the F1 and x2 columns to the right. The last column
gives the resulting values of the output state y2, computed from the transformation
function (or table).
For stage 1, we have the decision function f2 = r1 (x1) + F1 (y1) where the
transformation gives y1 for each value of x1; for example, x1 = 2 implies y1 = y0 4x1 = 4,
and the preceding table then gives F1 (y1) = 20. The stage computations are done in the
following table:
Stage 1
f2 = r1 (x1) + F1 (y1)
{ = 8x1 + f1 (y1)}
y0 \ x1
12
F2 (y0)
x1 (y0)
y1 (y0)
60
12
These tables correspond to (10) (11) and (12) (13) respectively, and the
optimal solution can be found similarly, starting with the last table. y0 = 12 gives x1 = 0
(the optimal stage solution) which leads to y1 = 12 (by transformation equation).
Proceeding to the first table, y1 = 12 (as just determined) gives the stage optimum x2 = 6
and the output state y2 = 0. These values are indicated in italics. The maximal total return
is f2 (y0) = 60.
It will now be clear why it was expedient to solve the decomposed version of
problem (1) backwards, starting with the optimization of the last stage. The procedure led
to a recursive system which has the initial state y0 as it starting point as shown in Fig.
11 and it was y0 that was given (y0 = 12). This suggests that problems in which the final
state yN is given may be solved in the opposite direction, proceeding forwards from the
first stage.
To show how this is done, let us redefine the state variables y n in the example so
that the final state y2 now represents total accumulated use of capacity, including idle
capacity; the latter is put first as the input state y 0 of the first stage of the production
system. Then y1 represents the accumulated use of capacity, including capacity not
utilized, after the first commodity has been produced. This leads to the transformations.
y1 = y0 4x1
y2 = y1 2x2
(20)
where y0 0 and y2 = 12. The stage return functions are the same as above, (9).
This dynamic programming problem is another decomposed version of problem
(1). To solve it by forward recursion we reverse the direction
x1
y0 = y1 - 4x1
x2
y1 = y2 - 2x2
Stage 1
Stage 2
y2 = 12
r2 = 10x2
f1 = 8x1
Figure 12
of the system as shown in Fig. 12, where yn is now to be formally treated as the input
state of stage n (n = 1, 2) whereas the yn-1 become output states; we therefore write the
transformation functions (20) in the inverse form
y0 = y1 4x1
y1 = y2 2x2
(21)
(more generally,
yn-1 = tn* (yn, xn)
where tn* is the inverse transformation equation of stage n).
the procedure starts with the optimization of stage 1. The decision function f 1 = r1
(x1) is to be maximized subject to y0 = y1 4x1 0, x1 0, where y1 now the input state
of the stage is a parameter:
f1 = r1 (x1) = 8x1 = max
4x1 y1
(22)
x1 0;
the solution depends on the parameter,
x1 (y1) = 0.25y1
(23)
F1 (y1) = 2y1
where F1 = f1max. At the second stage we have the decision function f2 = r2 (x2) + F1 (y1)
where y1 = y2 2x2 0, x2 0 so that the stage optimization problem becomes
(24)
2x2 y2
x2 0.
The solution is
x2 (y2) = 0.5y2
F2 (y2) = 5y2
(25)
Working backwards from y2 (= 12) through the recursive system (21), (23), (25) we
obtain the optimal solution:
y2 = 12
y1 = y2 2x2 = 0
x2 (y2) = 0.5y2 = 6
y0 = y1 4x1 = 0,
x1 (y1) = 0.25y1 = 0,
(n = 1, 2, , N)
and the inverse transformation equations determine the optimal policy for given y N as
shown in Fig. 13
It is often possible to solve by forward recursion when the initial state y 0 is given,
or to apply backward recursion to DP problems with given final state y N, using a slightly
modified procedure. However, when the order of the stages is arbitrary and the
transformations can be inverted so that we are free to choose the direction, backward
recursion is generally a more efficient procedure for given y0, and forward recursion for
given yN, (which amounts to the same thing, the only difference being the numbering of
stages and variables).
yN
.
xN-1 (yN-1)
Figure 13
In order for an optimization problem to be solvable by dynamic programming, the
technical structure of the problem (as represented by the restrictions) must be such that
it can be described by a series of successive changes of the state of the system, from the
initial state y0 to the final state yN, each change being effected by a particular decision
variable. The two-stage system of Fig. 9 above is an example of this; the transformation
equations (8) together with x1, y1, x2, y2 0 and y0 = 12 are an equivalent reformulation
of the restriction in problem (1), i.e., 4x1 + 2x2 12 and x1, x2 0, so that the set of
feasible solutions is preserved. In some cases the multistage structure represents a
sequence in time hence the name dynamic programming where the stages
correspond to actual processes and the direction indicates the order in which the
transformations take place. This would be so in our example (1) if the two commodities
were produced in separate processes and commodity no. 1 had to be made first. In many
applications, however, the sequence of stages and the order in which the system passes
through them are an artificial device, introduced in order make the problem solvable by
DP methods. In either case we can choose between forward and backward recursion if the
direction is mathematically arbitrary.
Decomposition of a problem also requires that the objective function satisfies
certain conditions. In general, the function to be maximized in some function of the stage
returns rn,
f = {r1 (y0, x1), , rN (yN-1, xN)}.
(26)
C
5
Q
6
12
D
4
4
Figure 14
Assuming that the direction of travel is always from left to right having arrived at,
say, B the driver never travels back to A or D but proceeds to either C or F the number
of possible routes is finite. The problem can therefore be solved by enumerating the
alternative routes and comparing their total lengths.
Any route from P to Q is the result of three successive decisions. Starting at point
P, the driver must decide whether he will go to A or to D. If he chooses to drive to A, say,
he can proceed from A to either B or E, each of which in turn leaves him with two
alternatives, C and F. Having arrived at either C or F, he has no choice but no proceed to
the destination, Q. Since each decision is a choice between two alternatives and there are
three consecutive decisions to be made, there are 23 = 8 possible combinations, i.e. 8
alternative routes. The alternative decisions and the resulting routes can be illustrated
graphically by a decision tree as shown in Fig. 15, where the root represents the starting
point P and the branches are composed of road sections (with lengths indicated).
Comparing the total lengths from root to top, it will be seen that PDBFQ is the shortest
route, the total length being 12 + 2 + 3+ 4 = 21.
Figure 15
x1 = A or D
y0 = p
y1 = x1
y2 = x2
r1 (y0, x1)
x4 = Q
x3 = C or F
x2 = B or E
y3 = x3
r2 (y1, x2)
y4 = Q
r3 (y2, x3)
r4 (y3, x4)
Figure 16
This decision structure clearly represents a multistage decision system. The
drivers geographical position the points on the map represents the state of the
system, which is to be changed from the given initial state P to the given final state Q
through a sequence of stage decisions in such a way as to minimize the total return, i.e.,
the total distance covered. Starting from point P, i.e., the initial state y 0 = P, the two
alternatives open to the driver can be represented by two values of a decision variable x1 :
x1 = A (i.e., drive to point A) and x1 = D (drive to D). If he chooses x1 = A, he will get to
this point so that the output state of the first stage will be y 1 = A and the corresponding
return r1 (P, A) will be the distance PA = 10. Similarly, x1 D leads to y1 = D and the
return will be r1 (P, D) = 12. Proceeding in this fashion, the problem can be represented
by a four-stage decision structure as shown in Fig. 16. There is no choice at stage 4 since
the destination i.e., the final state y4 = Q = is given.
The transformation functions are yn = xn (n = 1, 2, 3, 4). The return functions rn =
rn (yn-1, xn) can be written in tabular form as follows
r1 (y0, x1)
r2 (y1, x2)
r3 (y2, x3)
r4 (y3, x4)
y0 \ x1 A
y1 \ x2 B
y2 \ x3 C
y3 \ x4 Q
12
A
D
7
2
B
E
3
4
C
F
10
6
2
3
6
5
4
Stage 4
y3 \ x4
f1 = r4 (y3, r4)
Q
F1 (y3)
x4 (y3)
y4 (y3)
C
F
5 (= CQ)
4 (= FQ)
5
4
Q
Q
Q
Q
Stage 3
y2 \ x3
F2 (y2)
x3 (y2)
y3 (y2)
B
E
3+5
6+5
7
8
F
F
F
F
Stage 2
y1 \ x2
F3 (y1)
x2 (y1)
y2 (y1)
A
D
6+7
2+7
13
9
B
B
B
B
Stage 1
y0 \ x1
F4 (y0)
x1 (y0)
y1 (y0)
10 + 13
21
3+4
4+4
7+8
2+8
12 + 9
yn
xn
The optimal sequence of states y0, y1, , y4 indicates that the shortest path
through the network is PDBFQ; the total length of this route is F4 (y0) = 21.
This solution procedure can be translated into a graphical method, making use of a
decision tree like that of Fig. 15. After making the three first decisions the driver finds
himself at point C or F. No matter how he got there he will have to proceed to Q, so we
draw the eight top branches of the tree; none of them can be eliminated at this stage since
the preceding decisions have not yet been determined.
Going one stage back, the first two decisions have taken the driver to either B or
E. If he has arrived at B, he can get to his destination Q either through C or F; the best
course is to go to F since BFQ = 3 + 4 = 7 whereas BCQ = 3 + 5 = 8. Therefore, no
matter which way he may have got to B, he will never proceed to C, so the branches from
B to C can be eliminated and we need only draw the branches going from B to F. This is
an application of Bellmans principle of optimality: if the optimal route from P to Q
passes through B, the remaining part of the route (from B to Q) must also be optimal; the
optimal route from P to Q cannot contain BCQ because there is a shorter route from B to
the destination. Similarly, if the driver is at point E after the first two decisions, he will
proceed to F because EFQ = 4 + 4 + 8 < ECQ = 6 + 5 = 11, so ECQ can be eliminated.
Applying a similar reasoning to the state attained after the first decision, it is seen
that the branches AE and DE need not be drawn; the shortest path from A to Q is ABFQ
= 6 + 7 = 13 and the shortest path from D to Q is DBFQ = 2 + 7 = 9. Finally, at the
starting point the choice between PA + ABFQ = 10 + 13 = 23 and PD + DBFQ = 12 + 9
= 21; the latter alternative represents the shortest total route and there is no need to draw
the branch PA.