Escolar Documentos
Profissional Documentos
Cultura Documentos
LECTURE NOTES
MOI UNIVERSITY
© 2008
LECTURE NOTES 2
OPERATIONS RESEARCH
1.0 INTRODUCTION
LECTURE NOTES 3
OPERATIONS RESEARCH
in Great Britain and was in the process of doing so in the United States. Since then the field
has developed very rapidly. Today, OR is a dominant and indispensable decision-making tool.
A solution of the model is feasible if it satisfies all the constraints. It is optimal if, in addition
to being feasible, it yields the best (maximum or minimum) value of the objective function.
LECTURE NOTES 4
OPERATIONS RESEARCH
Though OR models are designed to ‘optimise’ a specific objective criterion subject to a set of
constraints, the quality of the resulting solution depends on the accuracy of the model in
representing the real system. The optimum solution of a model is best only for that model. If
the model happens to represent the system reasonably well, then its solution is optimum also
for the real situation.
Problem definition
This Involves defining the scope of the problem under investigation. The end result of the
investigation is to identify three principal elements of the decision, namely
i) Description of the decision alternatives,
ii) Determination of the objective of the study, and
iii) Specification of the limitations under which the modelled system operates.
Model construction
This entails translating the problem into mathematical relationships.
Model solution
LECTURE NOTES 5
OPERATIONS RESEARCH
Model solution is the simplest of all OR phases because it entails the use of well-defined
optimization algorithms. An important aspect of the model solution phase is sensitivity
analysis, which deals with obtaining additional information about the behaviour of the
optimum solution when the model undergoes some parameter changes.
Model validity
Model validity checks whether or not the proposed model does what it is supposed to do – that
is, does the model predict adequately the behaviour of the system under study? A common
method for checking the validity of a model is to compare its output with historical output
data. The model is valid if, under similar input conditions, it reproduces past performance.
Implementation
Implementation of the solution of a model involves the translation of the results into operating
instructions issued in understandable form to the individuals who will administer the
recommended system. The burden of this task lies primarily with the OR team.
Of all five phases, only phase 3 dealing with model solution is the best defined and the easiest
to implement in an OR study because it deals with mostly precise mathematical models. The
implementation of the remaining phases is more an art than it is a theory.
In OR, we do not have a single general technique that solves all mathematical models that
arise in practice. Instead, the type and complexity of the mathematical model dictate the nature
of the solution method. Operations research techniques include the following:
i) Linear programming – this is the most prominent OR technique. It is designed for
models in which objective and constraint functions are strictly linear.
ii) Integer programming – in which the variables assume integer values.
iii) Dynamic programming – in which the original model can be decomposed into smaller
sub-problems.
iv) Network programming – in which the problem can be modelled as a network.
v) Nonlinear programming – in which the functions of the model are nonlinear.
LECTURE NOTES 6
OPERATIONS RESEARCH
These techniques are but a partial list of the large number of available OR tools
A peculiarity of most OR techniques is that solutions are not generally obtained in (formula-
like) closed forms. Instead, they are determined by algorithms. An algorithm provides fixed
computational rules that are applied repetitively to the problem with each repetition (called
iteration) moving the solution closer to the optimum.
Some mathematical models may be so complex that it is impossible to solve them by any of
the available optimization algorithms. In such cases, it may be necessary it abandon the search
for the optimal solution and simply seek a good solution using heuristic or rules of thumb.
LECTURE NOTES 7
OPERATIONS RESEARCH
Linear programming (LP) applies to optimization models in which the objective and constraint
functions are strictly linear. The word ‘programming’ does not refer here to computer
programming; rather, it is essentially a synonym for planning. Because of its tremendous
computational efficiency, LP forms the backbone of the solution algorithms for other
operations research models, including integer, stochastic, and nonlinear programming.
1 a11 a12 … b1
a1n
2
b2
. a 21 a 22 … .
. .
a2n
. .
. . bm
. .
m
. .
a m1 am2 …
a mn
∆Z / unit c1 c2 ...
Level cn
x1 x2 ....
LECTURE NOTES xn
8
OPERATIONS RESEARCH
The mathematical model for this general problem of allocating resources to activities can now
be formulated as follows. Select the values for x1 , x 2 ,..., x n so as to
Maximize Z = c1 x1 + c 2 x 2 + ... + c n x n
subject to
a11 x1 + a12 x 2 + ... + a1n x n ≤ b1
a 21 x 2 + a 22 x 2 +... + a 2 n x n ≤ b2
a m1 x1 + a m 2 x 2 + ... + a mn x n ≤ bm
and
x1 ≥ 0, x 2 ≥ 0,... x n ≥ 0 .
This is the standard form for the linear programming problem. The function being maximised
is called the objective function. The first m restrictions are called functional constraints. The
x j ≥ 0 restrictions are called non-negativity constraints. The x j variables are decision
variables. The input constants - aij , bi and c j - are referred to as parameters of the model.
LECTURE NOTES 9
OPERATIONS RESEARCH
ii) For each constraint, replace the inequalities with equations and graph the resulting
straight line on the 2-dimensional graph.
iii) For the inequality constraints, find the side (half-space) of the graph meeting the
original conditions (evaluate whether the inequality is satisfied at the origin).
iv) Find the intersection of all feasible regions defined by all the
constraints. The resulting region is the (overall) feasible region.
To find the optimal solution, pick out the point in the feasible region that
maximizes (or minimizes) the value of the objective function z. This is
done through trial-and-error procedure which involves constructing a
family of parallel lines containing at least one point in the feasible region
and selecting the line that corresponds to the largest value of z.
Alternatively, rather than draw several parallel lines, it is sufficient to form
a single line with a ruler to establish the slope. Then the ruler is moved
with fixed slope through the feasible region in the direction of improving z
(when the objective is to minimize z, the ruler is moved in the direction
that decreases z). Movement of the ruler is stopped at the last instant that
it still passes through a point in the feasible region.
LECTURE NOTES 10
OPERATIONS RESEARCH
Example 1
A Company is planning to launch two new products. Product 1 is an 8-foot glass door with
aluminum framing and Product 2 a 4x6 foot double-hung wood-framed window.
Aluminum frames are made in Plant 1, wood frames are made in Plant 2, and Plant 3 produces
the glass and assembles the products. Product 1 requires some of the production capacity in
Plants 1 and 3, but none in Plant 2. Product 2 needs only Plants 2 and 3. The marketing
division has concluded that the company could sell as much of either product as could be
processed by these plants. The management of the company wants to determine what mixture
of both products would be the most profitable. Table 2.2 provides the information available.
Solution
Formulation as a linear programming problem
Decision variables:
x1 = Number of batches of product 1 produced per week
Objective function:
z = total profit per (in $1,000) from producing products 1 and 2
Maximize z = 3 x1 + 5 x 2 (in thousands of dollars)
Subject to:
x1 ≤ 4 (Production Available in Plant 1)
2 x 2 ≤ 12 (Production Available in Plant 2)
LECTURE NOTES 11
OPERATIONS RESEARCH
This solution indicates that the company should produce products 1 and 2 at the rate of 2
batches per week and 6 batches per week, respectively, with a resulting total profit of $36,000
per week.
Example 2
Alpha ltd. produces two products X and Y each requiring same production capacity. The total
installed production capacity is 9 tones per days. Alpha Ltd is a supplier of Beta Ltd, which
must supply at least 2 tons of X & 3 tons of Y to Beta Ltd every day. The production time for
X and Y is 20 machine hour per unit & 50 machine hour per unit respectively. The daily
maximum possible machine hours are 360. Profit margin for X & Y is Ksh.80 per ton and Ksh.
120 per ton respectively. Formulate as a LP model and use the graphical method of generating
the optimal solution for determining the maximum number of units of X & Y, which can be
produced by Alpha Limited.
LECTURE NOTES 12
OPERATIONS RESEARCH
Solution
Decision variables:
x1 = Number of units (in tones) of Product X.
Objective function:
Maximize (total profit) z = 80 x1 + 120 x 2
Hence the company should produce 3 tonnes of product X and 6 tonnes of product Y in order
to achieve a maximum profit of Ksh. 960.
LECTURE NOTES 13
OPERATIONS RESEARCH
Exercise 1
A firm exports two types of machine P and Q. Type P occupies 2m3 of space and type Q, 4
m3. Type P weighs 9kgs and type Q 6kgs. The available shipping space is 1,600m3 and the
total weight of the machines cannot exceed 3,600 kgs. The profit on type P is Ksh.100 and the
profit on type Q is Ksh.80. How many of each machine must be exported to bring a maximum
profit and what is the profit. [Ans: The company should export 200 machines of type P and
300 machines of type Q to get a Maximum profit of Ksh.44,000]
A feasible solution is a solution for which all the constraints are satisfied. An infeasible
solution is a solution for which at least one constraint is violated.
The feasible region is a collection of all feasible solutions. It is possible for a problem to have
no feasible solutions. Given that there are feasible solutions, the goal of linear programming is
to find a best feasible solution, as measured by the value of the objective function in the
model.
An optimal solution is a feasible solution that has the most favourable value of the objective
function. The most favourable value is the largest value if the objective function is to be
maximized, whereas it is the smallest value if the objective function is to be minimised. Most
problems will have just one optimal solution. However, it is possible to have more than one.
Any problem having multiple optimal solutions will have an infinite number of them, each
with the same optimal value of the objective function. Another possibility is that a problem has
no optimal solutions. This occurs only if:
i) It has no feasible solutions
ii) The constraints do not prevent improving the value of the objective
function (z) indefinitely in the favourable direction (positive or
negative). This case is referred to as unbounded z.
A corner-point feasible (CPF) solution is a solution that lies at a corner of the feasible region.
LECTURE NOTES 14
OPERATIONS RESEARCH
This is a general procedure for solving linear programming problems. It has proved to be a
remarkably efficient method that is used routinely to solve large problems of today’s
computers. Except for use in tiny problems, this method is always executed on a computer.
Dantzig (1947) is credited with the first solutions to linear programming problems using the
Simplex Method.
The simplex method is an algebraic procedure. However, the underlying concepts are
geometric. From the geometric viewpoint, each constraint boundary is a line that forms the
boundary of what is permitted by the corresponding constraint. The points of intersection are
the corner-point solutions of the problem.
For any linear programming problem with n decision variables, two CPF solutions are
adjacent to each other if they share n – 1 constraint boundaries. The two adjacent CPG
solutions are connected by a line segment that lies on these same shared constraint boundaries.
Such a segment is referred to as an edge of the feasible region.
Optimality test: Consider any linear programming problem that possesses at least one optimal
solution. If a CPF solution has no adjacent CPF solutions that are better (as measured by z),
then it must be an optimal solution.
LECTURE NOTES 15
OPERATIONS RESEARCH
Solution concept 2: The simplex method is an iterative algorithm (a systematic procedure that
keeps repeating a fixed series of steps, called iteration, until a desired result has been obtained)
with the following structure. This is illustrated in the flow chart in figure 2.3:
If no If yes Stop
Solution concept 3: Whenever possible, the initialization of the simplex method chooses the
origin (all decision variables equal to zero) to be the initial CPF solution.
Solution concept 4: Each time the simplex method performs an iteration to move from the
current CPF solution to a better one, it always chooses a CPF solution that is adjacent to the
current one. No other solutions are considered. Consequently, the entire path followed to
eventually reach an optimal solution is along the edges of the feasible region.
Solution concept 5: The simplex method simply identifies the rate of improvement in z that
would be obtained by moving along the edge. It chooses to move along the edge with the
largest rate of improvement in z. The method doesn’t even take time to solve for the adjacent
CPF solution.
Solution concept 6: The optimality test consists simply of checking whether any of the edges
give a positive rate of improvement in z. If none do, then the current CPF solution is optimal.
Algebraic Solution
The graphical ideas lay the foundation for the development of the algebraic simplex method.
The first step in algebraic representation of the LP solution space is to convert the functional
inequality constraints to equivalent equality constraints. The non-negativity constraints are left
LECTURE NOTES 16
OPERATIONS RESEARCH
Maximize z = 2 x1 + 3 x 2
Subject to
2 x1 + x 2 ≤ 4
x1 + 2 x 2 ≤ 5
x1 , x 2 ≥ 0
Solution
Algebraically, the solution space of the LP problem is represented as:
Maximize z = 2 x1 + 3 x 2
Subject to
2 x1 + x 2 + s1 = 4
x1 + 2 x 2 + s 2 = 5
x1 , x 2 , s1 , s 2 ≥ 0
LECTURE NOTES 17
OPERATIONS RESEARCH
LECTURE NOTES 18
OPERATIONS RESEARCH
Step 3 - solve for the new basic feasible solution by using elementary row operations to
construct a new simplex tableau, and then return to the optimality test.
Elementary row operations:
i) Divide the pivot row by the pivot number. Use this new pivot row in steps (ii) and
(iii).
ii) For each other row (including row 0) that has a negative coefficient in the pivot
column, add to this row the product of the absolute value of this coefficient and the
new pivot row.
iii) For each other row that has a positive coefficient in the pivot column, subtract from
this row the product of this coefficient and the new pivot row.
Figure 2.4,shows a summary of these steps.
Write standard max
problem in standard form
Initial simplex tableau
Stop!
Negative NO Optimal
indicators? solution
YES
Select pivot column
Stop!
Positive NO
No
elements in pivot
solution
column?
YES
Example 4
Solve the following LP problem using the simplex method
LECTURE NOTES 19
OPERATIONS RESEARCH
Subject to
3x1 + 2 x 2 ≤ 180
x1 ≤ 40
x 2 ≤ 60
and
x1 , x 2 ≥ 0
Solution
Arrange objective function in standard form to perform Simplex tableaus
Maximize z
Subject to
z − 300 x1 − 500 x 2 = 0 [0]
3 x1 + 2 x 2 + s1 = 180 [1]
x1 + s 2 = 40 [2]
x 2 + s 3 = 60 [3]
x1 , x 2 , s1 , s 2 , s 3 ≥ 0
LECTURE NOTES 20
OPERATIONS RESEARCH
Coefficient of:
Right
Basic
Iteration Variables Eqn z x1 x2 s1 s2 s3 Side Ratio
Z 0 1 -300 -500 0 0 0 0
0 s1 1 0 3 2 1 0 0 180 90
s2 2 0 1 0 0 1 0 40 -
s3 3 0 0 1 0 0 1 60 60
z 0 1 -300 0 0 0 500 30000
1 s1 1 0 3 0 1 0 -2 60 20
s2 2 0 1 0 0 1 0 40 40
x2 3 0 0 1 0 0 1 60
Z 0 1 0 0 100 0 300 36000
2 x1 1 0 1 0 0.333333 0 -0.66667 20
s2 2 0 0 0 -0.33333 1 0.666667 20
x2 3 0 0 1 0 0 1 60
Example 5
Solve the following LP using the simplex method
Solution
Arrange objective function in standard form to perform Simplex tableaus
Maximize z
Subject to
z − 3x1 − 2 x 2 = 0
LECTURE NOTES 21
OPERATIONS RESEARCH
The solution in this last tableau corresponds to the basis consisting of x1 and x 2 with values
1.5 and 1 respectively with z = 6.5
LECTURE NOTES 22
OPERATIONS RESEARCH
The arcs in a network may have flow of some type through them. If flow through an arc is
allowed only in one direction, the arc is said to be a directed arc. The direction is indicated by
adding an arrow at the end of the line representing the arc. If flow through an arc is allowed in
either direction, the arc is said to be an undirected arc.
A network that has only directed arcs is called a directed network. Similarly, if all its arcs are
undirected, the network is said to be an undirected network.
A path between two nodes is a sequence of distinct arcs connecting these nodes. A directed
path from node i to node j is a sequence of connecting arcs whose direction (if any) is
toward node j , so that flow from node i to node j along this path is feasible. An
undirected path from node i to node j is a sequence of connecting arcs whose direction (if
any) can be either toward or away from node j .
The maximum amount of flow that can be carried on a directed arc is referred to as arc
capacity. A supply node (or source node) has the property that the flow out of the node
exceeds the flow into the node. The reverse case is a demand node (or sink node). A
transshipment node (or intermediate node) satisfies conservation of flow, so flow in equals
flow out.
LECTURE NOTES 23
OPERATIONS RESEARCH
A 7
2 2 5 T
4 D
5 B
O
7
1
3
4 1
C 4
E
Solution
The solution to the problem above is given in table 3.1. The first column indicates the iteration
count. The second column lists the solved nodes for beginning the current iteration after
deleting the irrelevant ones (those not connected directly to any unsolved node). The third
column then gives the candidate for the nth nearest node (the unsolved nodes with the shortest
connecting link to a solved node). The fourth column calculates the distance of the shortest
path from the origin to each of these candidates (namely, the distance to the solved nodes plus
the link distance to the candidate). The candidate with the smallest distance is the nth nearest
node to the origin in the fifth column. The last two columns summarise the information for this
newest solved node that is needed to proceed to subsequent iterations (namely, the distance of
the shortest path from the origin to this node and the last link on this shortest path.
LECTURE NOTES 24
OPERATIONS RESEARCH
Two alternatives for the shortest path from the origin to the destination have been identified.
There are:
O A B E D T or
O A B D T
The shortest distance is 13 units on either paths.
Network analysis is the general name given to certain specific techniques which can be used
for the planning, management and control of projects. One definition of a project (from the
Project Management Institute) is a project is a temporary endeavour undertaken to create
a "unique" product or service
LECTURE NOTES 25
OPERATIONS RESEARCH
Two different techniques for network analysis were developed independently in the late 1950's
- these were:
Modern commercial software packages tend to blur the distinction between PERT and CPM
and include options for uncertain activity completion times and project completion
time/project cost trade-off analysis. Note here that many such packages exist for doing
network analysis.
There is no clear terminology in the literature and you will see this area referred to by the
phrases: network analysis, PERT, CPM, PERT/CPM, critical path analysis and project
planning.
Example
A company intends to carry out a redesign of a product and its associated packaging. The O.R
team intends to test market this redesigned product and then revise it in the light of the test
market results, finally presenting the results to the Board of the company.
The key question is: How long will it take to complete this project?
The O.R team identified the following list of separate activities together with their associated
completion times (assumed known with certainty).
Activity Completion
number time (weeks)
1 Redesign product 6
2 Redesign packaging 2
3 Order and receive components for redesigned product 3
4 Order and receive material for redesigned packaging 2
5 Assemble products 4
6 Make up packaging 1
7 Package redesigned product 1
8 Test market redesigned product 6
9 Revise redesigned product 3
10 Revise redesigned packaging 1
11 Present results to the Board 1
LECTURE NOTES 26
OPERATIONS RESEARCH
Next, the precedence relationships indicating activities which, because of the logic of the
situation, must be finished before other activities can start e.g. in the above list activity number
1 must be finished before activity number 3 can start. It is important to note that, for clarity,
we try to keep this list to a minimum by specifying only immediate relationships, which are
relationships involving activities that "occur near to each other in time".
Activity Activity
number number
1 must be finished before 3 can start
2 4
3 5
4 6
5,6 7
7 8
8 9
8 10
9,10 11
The key to constructing this table is, for each activity in turn, to ask the question:
• activities 1 and 2 do not appear in the right hand column of the above table, this is
because there are no activities which must finish before they can start, i.e. both
activities 1 and 2 can start immediately
• two activities (5 and 6) must be finished before activity 7 can start
• it is plain from this table that non-immediate precedence relationships (e.g. "activity 1
must be finished before activity 9 can start") need not be included in the list since they
can be deduced from the relationships already in the list.
What is the minimum possible time in which we can complete this project?
The network diagram we construct is different depending upon whether we are going to use an
activity on node or an activity on arc network.
Each arc represents an activity and is labelled with the activity number and the associated
completion time (shown in brackets after the activity number). This network is an activity on
arc (AOA) network. The nodes of the network represent the start (and end) of activities and are
regarded as events.
LECTURE NOTES 27
OPERATIONS RESEARCH
Dummy activities often have a zero completion time and are used to represent precedence
relationships that cannot be easily (if at all) represented using the actual activities involved in
the project. By convention dummies are always shown as dotted arcs in network
diagrams.
LECTURE NOTES 28
OPERATIONS RESEARCH
Earliest time calculation: Let Ei represent the earliest time by which we can reach node i such
that all its preceding activities have been finished. We calculate the values of the Ei
(i=1,2,...,10) by going forward, from left to right, in the network diagram.
To ease the notation let Tij be the activity completion time associated with the arc from node i
to node j (e.g. T56 = 1). Then the Ei are given by:
E9 = E8 + T89, but here we have two activities running from node 8 to node 9 (activity 9 of
duration 3 and activity 10 of duration 1) so:
E9 = max[E8 + 3, E8 + 1] = max[20 + 3, 20 + 1] = 23
E10 = E9 + T9,10 = 23 + 1 = 24
Hence E10 = 24 and this represents the earliest time we can reach node 10 with all preceding
activities finished i.e. 24 (weeks) is the minimum time needed to complete all the activities
and hence is the minimum overall project completion time.
Note here that the formal definition of the earliest times is given by:
Let Li represent the latest time we can leave node i and still complete the project in the
minimum overall completion time. We calculate the values of the Li (i=1,2,...,10) by going
backward, from right to left, in the network diagram. Hence:
L8 = L9 - T89, but here we have two activities running from node 8 to node 9 (activity 9 of
duration 3 and activity 10 of duration 1) so:
L8 = min[L9 - 3, L9 - 1] = min[23 - 3, 23 - 1] = 20
L7 = L8 - T78 = 20 - 6 = 14
L6 = L7 - T67 = 14 - 1 = 13
L5 = L6 - T56 = 13 - 1 = 12
L4 = L5 - T45 = 12 - 2 = 10
LECTURE NOTES 29
OPERATIONS RESEARCH
L3 = L6 - T36 = 13 - 4 = 9
L2 = L3 - T23 = 9 - 3 = 6
L1 = min[L4 - T14, L2 - T12] = min[10 - 2, 6 - 6] = 0
Note that as a check that we have done both the earliest start times and latest start times
calculations correctly we have:
Float
Consider an activity running (in the network diagram) from node i to node j. The earliest we
can start that activity is Ei and since it takes Tij to complete the earliest we can finish it is Ei +
Tij. But Lj is the latest we must leave node j to avoid increasing the overall project completion
time and hence Lj - (Ei + Tij) is the amount of slack or float time available. Formally: Fij = Lj -
(Ei + Tij) = Lj - Ei - Tij is the amount by which we can increase the time taken to complete the
activity represented on the network diagram by the arc from node i to node j without changing
(increasing) the overall project completion time. Hence we can form the table below:
Any activity with a float of zero is critical. Note here that, as a check, all float values should be
>= 0 and that these float values are the same as those derived by the package.
The easiest way to remember how to do the float calculation in AOA networks is by:
Latest time at the activity end node - Earliest time at the activity start node -
Activity time
Note in particular how whether an activity is critical or not CANNOT be reliably deduced
from whether the earliest and latest times coincide at the start and end nodes (unlike AON
networks). For example consider nodes 8 and 9 in the above network - they both have earliest
LECTURE NOTES 30
OPERATIONS RESEARCH
and latest times that are identical, with two activities between them - yet only one of those
activities is critical.
Example 2
In addition to the above information, activity five cannot start until three weeks after the end of
activity one.
Comment on the potential effect upon the overall project completion time (and the critical
path) of:
Will the project finish on time if at the end of six weeks the status of the project is:
Solution
The network diagram is shown below. Note the introduction of node 8 and the two dummy
activities 11 and 12 to correctly represent the condition that activity five cannot start until 3
weeks after the end of activity one.
LECTURE NOTES 31
OPERATIONS RESEARCH
We then have the following calculation of earliest start times to determine the minimum
overall project completion time.
E1 = 0 (by definition)
E2 = E1 + T12 = 0 + 2 = 2
E3 = E1 + T13 = 0 + 4 = 4
E4 = max[E2 + T24, E3 + T34] = max[2 + 7, 4 + 3] = 9
To determine the float times and which activities are critical we need to work out the latest
start times.
L7 = 18 (by definition)
L6 = L7 - T67 = 18 - 2 = 16
L5 = L6 - T56 = 16 - 4 = 12
L4 = min[L7 - T47, L6 - T46, L5 - T45] = min[18-7,16-6,12-3] = 9
L8 = L5 - T85 = 12 - 7 = 5
L3 = min[L4 - T34, L8 - T38] = min[9 - 3, 5 - 0] = 5
LECTURE NOTES 32
OPERATIONS RESEARCH
To calculate the float times we use the equation Fij = Lj - Ei - Tij to get
Hence the critical activities (those with a float of zero) are 1,3,5,6,7,9 and 11. This means that
there are two critical paths, namely 1-11-5-7-9 and 1-3-6-7-9.
• activity eight is not critical, therefore cutting its completion time has no effect upon the
overall project completion time or on the critical paths
• activity four has a float time of 2 weeks so increasing its completion time by 2 weeks
does not effect the overall project completion time. However activity four will then
become critical so the critical paths will be effected.
• activity seven is critical so cutting its completion time by 2 weeks may reduce the
overall project completion time. In fact as activity seven appears in all (both) critical
paths we can be sure that the overall project completion time will be reduced by at
least one time unit (week). The critical paths may, or may not, be effected.
LECTURE NOTES 33
OPERATIONS RESEARCH
E1 = 0 (by definition)
E4 = E1 + T14 = 0 + 5 = 5
E5 = max[E1 + T15, E4 + T45] = max[0 + 4, 5 + 3] = 8
E6 = max[E5 + T56, E4 + T46] = max[8 + 4, 5 + 6] = 12
E7 = max[E6 + T67, E4 + T47] = max[12 + 2, 5 + 7] = 14
Hence the minimum overall completion time for the remaining part of the project is 14 weeks.
As 6 weeks have already elapsed this means that we cannot finish the complete project before
week 20, i.e. so far we have slipped 2 weeks upon the original completion time of 18 weeks
and there is no possibility of the project finishing upon time.
What pipelines do you suggest be built and what is the total cost of your suggested pipeline
network.
Solution
LECTURE NOTES 34
OPERATIONS RESEARCH
Stop as 7 links have been added and these are all we need for the SST of a graph with 8 nodes.
Hence the SST has total cost 115 (kshs'000) and is as shown below.
LECTURE NOTES 35
OPERATIONS RESEARCH
0, z = 0
c( z) =
k + c(z) z, 0
LECTURE NOTES 36
OPERATIONS RESEARCH
This represents all the costs associated with the storage of the inventory until it is sold or used.
The costs include capital tied up, space, insurance, and taxes. These costs may be a function of
the cumulated excess of supply over the demand of maximum quantity held during the period.
Shortage cost
Shortage cost is incurred when the amount of the commodity required (demand) exceeds the
available stock. If any excess demand over available stock occurs either:
i) The excess demand is met by a priority shipment or
ii) The shortage cost can be viewed as the loss in current revenue from not meeting
the demand plus the cost of losing future business because of lost goodwill.
5.1. 4 Revenue
Revenue may or may not be included in the model. If both the price and the demand for the
product are established by the market and therefore outside the control of the company, the
revenue from sales (assuming demand is met), is independent of the firm’s inventory policy.
However, the loss in revenue must be included in the shortage cost whenever the firm cannot
meet the demand and the sale is lost.
Salvage value of an item is the value of the leftover item when no further inventory is desired.
This value represents the disposal value of the item. If there is a value associated with the
disposal of an item it is known as salvage cost.
LECTURE NOTES 37
OPERATIONS RESEARCH
For the basic EOQ model to be presented first, the only costs to be considered are:
k = Set-up cost for producing 1 batch
c = Unit cost for producing each unit
h = Holding cost per unit of time held in the inventory,
The objective is to determine when and by how much to replenish inventory so as to minimise
the sum of these costs.
Figure 3.1 depicts the resulting pattern of inventory levels over time when Q units are ordered
at time 0 in order to increase the initial inventory level from 0 to Q and then this process is
repeated each time the inventory level drops back down to 0.
LECTURE NOTES 38
OPERATIONS RESEARCH
Fig. 3.1: Inventory level as a function of time for the basic EOQ model
The total cost per unit time T is obtained from the following components:
The value of Q , say Q * , that minimizes T is found by setting the first derivative to
LECTURE NOTES 39
OPERATIONS RESEARCH
dT aK h
=− 2 + =0
dQ Q 2
so that
2aK
Q* = ,
h
which is Economic Order Quantity (EOQ) Model. The corresponding cycle time , say t * , is
Q* 2K
t* = =
a ah
Example 5.1
A television manufacturing company produces its own speakers, which are used in the
production of its television sets. The television sets are assembled on a continuous production
line at a rate of 8, 000 per month, with one speaker needed per set. The speakers are produced
in batches because they do not warrant setting up a continuous production line, and relatively
large quantities can be produced in a short time. Therefore, the speakers are placed into
inventory until they are needed for assembly into television sets on the production line. The
company is interested in determining when to produce a batch of speakers and how many per
batch. The costs to be considered are:
1. Each time a batch is produced, a setup cost of 12, 000 is incurred.
2. The unit production cost of a single speaker is 10.
3. The estimated holding cost of keeping a speaker is 0.30 per month.
4. A shortage of speakers occasionally crops up, and it has been estimated that each speaker
that is not available when required costs 1.10 per month.
Determine the value of the inventory level Q = Q* that minimizes the total cost per unit time.
Solution
Derivation of the value of the inventory level Q = Q* that minimizes the total cost per unit
time (given above).
so that
LECTURE NOTES 40
OPERATIONS RESEARCH
hence the optimal solution is to set up the production facilities to produce 25.298 speakers
every 3.2 months. (24, 000 speakers every 3 months would be nearly optimal).
Example 5.2
An industry needs 5400 units/year of a bought-out component which will be used in its main
product. The ordering (set-up) cost is Ksh. 250 per order and the carry (holding) cost per unit
per year is Ksh. 30. Find:
i) The economic order quantity.
ii) The number of orders per year.
iii) The time between successive orders.
[Ans: 300 units, 18, 0.0556 year]
LECTURE NOTES 41
OPERATIONS RESEARCH
Decision analysis provides a framework and methodology for rationale decision making in the
context of the short-term i.e. what to do in the immediate future. However, random factors
exist that create some uncertainty about each of the alternative course of action.
In order to make a decision, one can apply any of the following three methods:
1. The maximum payoff criterion.
2. The maximum likelihood criterion.
3. Baye’s decision rule.
The application of these criteria is illustrated using the following example:
Example 6.1
ABC Company owns a piece of land which is thought to contain oil in a 1 in 4 chance. An oil
company has offered to purchase the land for 90. However, ABC is considering holding the
land in order to drill for oil itself. If oil is found, the company’s expected profit will be 700. A
loss of 100 will be incurred if the land is dry (meaning no oil). This company is operating
without much capital so a loss of 100 will be quite serious. What does the company have to do
to be in better off?
Since the minimum payoff for action a 2 (90) is larger than that for a1 (-100), action a 2 (sell
the land) will be chosen. This criterion provides the best guarantee of the payoff that will be
obtained.
LECTURE NOTES 42
OPERATIONS RESEARCH
State of nature θ1 θ2
Action Minimum
Oil Dry
Regardless of what the true state of nature turns out to be, for example, the payoff from a 2
cannot be less than 90. This criterion is extremely conservative since it assumes that nature is
a conscious component wanting to inflict as much damage as possible. Thus, it is of interest
only to a very cautious decision maker.
State of nature θ2 has the largest prior probability. In this column action a 2 has a maximum
payoff. So the choice is to sell the land.
This action is appealing because the maximum or the most important state of nature is the
most likely one. So the action chosen is the best one for the most important state of nature.
LECTURE NOTES 43
OPERATIONS RESEARCH
Its major drawback is that it completely ignores much relevant information because no state of
nature is considered other than the most likely one.
The advantage of this decision rule is that it incorporates all the available information
including all the payoffs and the best available estimates of the probabilities of the respective
states of nature. It is therefore the best approach compared to the other two.
LECTURE NOTES 44
OPERATIONS RESEARCH
7.1 Introduction
Queuing theory deals with problems which involve queuing (or waiting). Typical examples
might be:
As we know queues are a common every-day experience. Queues form because resources are
limited. In fact it makes economic sense to have queues. For example how many supermarket
tills you would need to avoid queuing? How many buses or trains would be needed if queues
were to be avoided/eliminated?
In designing queuing systems we need to aim for a balance between service to customers
(short queues implying many servers) and economic considerations (not too many servers).
In essence all queuing systems can be broken down into individual sub-systems consisting of
entities queuing for some activity (as shown below).
Typically we can talk of this individual sub-system as dealing with customers queuing for
service. To analyze this sub-system we need information relating to:
• arrival process:
o how the arrivals are distributed in time (e.g. what is the probability distribution
of time between successive arrivals (the inter-arrival time distribution))
LECTURE NOTES 45
OPERATIONS RESEARCH
The simplest arrival process is one where we have completely regular arrivals
(i.e. the same constant time interval between successive arrivals). A Poisson
stream of arrivals corresponds to arrivals at random. In a Poisson stream
successive customers arrive after intervals which independently are
exponentially distributed. The Poisson stream is important as it is a convenient
mathematical model of many real life queuing systems and is described by a
single parameter - the average arrival rate. Other important arrival processes are
scheduled arrivals; batch arrivals; and time dependent arrival rates (i.e. the
arrival rate varies according to the time of day).
• service mechanism:
o how long the service will take (the service time distribution)
o whether the servers are in series (each server has a separate queue) or in parallel
(one queue for all servers)
Assuming that the service times for customers are independent and do not
depend upon the arrival process is common. Another common assumption
about service times is that they are exponentially distributed.
• queue characteristics:
o how, from the set of customers waiting for service, do we choose the one to be
served next (e.g. FIFO (first-in first-out) - also known as FCFS (first-come first
served); LIFO (last-in first-out); randomly) (this is often called the queue
discipline)
o do we have:
LECTURE NOTES 46
OPERATIONS RESEARCH
reneging (customers leave the queue if they have waited too long for
service)
jockeying (customers switch between queues if they think they will get
served faster by so doing)
Changing the queue discipline (the rule by which we select the next customer to
be served) can often reduce congestion. Often the queue discipline "choose the
customer with the lowest service time" results in the smallest value for the time
(on average) a customer spends queuing.
Note here that integral to queuing situations is the idea of uncertainty in, for example, inter-
arrival times and service times. This means that probability and statistics are needed to analyze
queuing situations.
In terms of the analysis of queuing situations the types of questions in which we are interested
are typically concerned with measures of system performance and might include:
• How long does a customer expect to wait in the queue before they are served, and how
long will they have to wait before the service is complete?
• What is the probability of a customer having to wait longer than a given time interval
before they are served?
• What is the probability that the queue will exceed a certain length?
• What is the expected utilisation of the server and the expected time period during
which he will be fully occupied (remember servers cost us money so we need to keep
them busy). In fact if we can assign costs to factors such as customer waiting time and
server idle time then we can investigate how to design a system at minimum total cost.
These are questions that need to be answered so that management can evaluate alternatives in
an attempt to control/improve the situation. Some of the problems that are often investigated in
practice are:
LECTURE NOTES 47
OPERATIONS RESEARCH
In order to get answers to the above questions there are two basic approaches:
The reason for there being two approaches (instead of just one) is that analytic methods are
only available for relatively simple queuing systems. Complex queuing systems are almost
always analyzed using simulation (more technically known as discrete-event simulation).
The simple queuing systems that can be tackled via queuing theory essentially:
• consist of just a single queue; linked systems where customers pass from one queue to
another cannot be tackled via queuing theory
• have distributions for the arrival and service processes that are well defined (e.g.
standard statistical distributions such as Poisson or Normal); systems where these
distributions are derived from observed data, or are time dependent, are difficult to
analyse via queuing theory
The first queuing theory problem was considered by Erlang in 1908 who looked at how large a
telephone exchange needed to be in order to keep to a reasonable value the number of
telephone calls not connected because the exchange was busy (lost calls). Within ten years he
had developed a (complex) formula to solve the problem.
• lambda to be the mean (or average) number of arrivals per time period, i.e. the mean
arrival rate
• µ to be the mean (or average) number of customers served per time period, i.e. the
mean service rate
LECTURE NOTES 48
OPERATIONS RESEARCH
M – Poisson arrival
• D represents the maximum number of customers allowed in the queuing system (either
being served or waiting for service)
LECTURE NOTES 49
OPERATIONS RESEARCH
If D and E are not specified then it is assumed that they are infinite.
For example the M/M/1 queuing system, the simplest queuing system, has a Poisson arrival
distribution, an exponential service time distribution and a single channel (one server).
Note here that in using this notation it is always assumed that there is just a single queue
(waiting line) and customers move from this single queue to the servers.
Using Kendall’s notation, the queuing model is defined as above; e.g. (M/M/1) :( ∞/FCFS)
means that arrivals follow Poisson distribution, Poisson Service rate, single server,
system can accommodate infinite number of customers and service discipline is first
come first served.
Suppose we have a single server in a shop and customers arrive in the shop with a Poisson
arrival distribution at a mean rate of lambda=0.5 customers per minute, i.e. on average one
customer appears every 1/lambda = 1/0.5 = 2 minutes. This implies that the inter-arrival times
have an exponential distribution with an average inter-arrival time of 2 minutes. The server has
an exponential service time distribution with a mean service rate of 4 customers per minute,
i.e. the service rate µ=4 customers per minute. As we have a Poisson arrival rate/exponential
service time/single server we have a M/M/1 queue in terms of the standard notation.
LECTURE NOTES 50