Operation Research Notes
Operation Research Notes
JANE ADUDA
November 6, 2013
Contents
LIST OF FIGURES v
1 Introduction 1
2 Linear programming 11
i
Operations Research Jane Akinyi Aduda
3 Solving LP Problems 22
ii
Operations Research Jane Akinyi Aduda
4 Inventory Models 68
iii
Operations Research Jane Akinyi Aduda
iv
List of Figures
v
List of Tables
3.12 Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
vii
Operations Research Jane Akinyi Aduda
viii
Operations Research Jane Akinyi Aduda
OBJECTIVES: At the end of this course the students should be able to:-
• Linear Programming
Week 5-10
• CAT I
• Inventory models
• Network models
Week 11-14
• CAT II
• Game theory
x
Operations Research Jane Akinyi Aduda
(ii) SADDLE
(iii) Dominance
(i) Lectures
(iv) Tutorials
REFERENCES:
xi
Chapter 1
Introduction
It tries to avoid the dangers from taking decisions merely by guessing or by using thumb
1
Operations Research Jane Akinyi Aduda
The general approach is to analyse the problem in economic terms and then implement
the solution if it is not aggressive or does not impact negatively on other aspects like
humanity, social and political factors.
• It is interdisciplinary approach for solving problems and it uses the knowledge and
experience of experts in various fields.
• While analysing the problems all aspects are considered and examined and analysed
scientifically for finding the optimal solution for the problem on hand.
• Operations research provides a scientific base for decision-making and provides sci-
entific substitute for judgement and intuition.
In other words, operations research can be said to have the following characteristics
2
Operations Research Jane Akinyi Aduda
Since the advent of the industrial revolution, the world has seen a remarkable growth in
the size and complexity of organizations. The artisans small shops of an earlier era have
evolved into the billion-dollar corporations of today. An integral part of this revolutionary
change has been a tremendous increase in the division of labour and segmentation of
management responsibilities in these organizations. The results have been spectacular.
However, along with its blessings, this increasing specialization has created new prob-
lems, problems that are still occurring in many organizations. One problem is a tendency
for the many components of an organization to grow into relatively autonomous empires
with their own goals and value systems, thereby losing sight of how their activities and
objectives mesh with those of the overall organization. What is best for one component
frequently is detrimental to another, so the components may end up working at cross
purposes.
The roots of OR can be traced back many decades, when early attempts were made
to use a scientific approach in the management of organizations. However, the beginning
of the activity called operations research has generally been attributed to the military
services early in World War II. Because of the war effort, there was an urgent need to
allocate scarce resources to the various military operations and to the activities within
each operation in an effective manner. Therefore, the British and then the U.S. military
management called upon a large number of scientists to apply a scientific approach to
dealing with this and other strategic and tactical problems. In effect, they were asked
to do research on (military) operations. These teams of scientists were the first OR
3
Operations Research Jane Akinyi Aduda
teams. By developing effective methods of using the new tool of radar, these teams were
instrumental in winning the Air Battle of Britain. Through their research on how to
better manage convoy and antisubmarine operations, they also played a major role in
winning the Battle of the North Atlantic. Similar efforts assisted the Island Campaign in
the Pacific. When the war ended, the success of OR in the war effort spurred interest in
applying OR outside the military as well. As the industrial boom following the war was
running its course, the problems caused by the increasing complexity and specialization in
organizations were again coming to the forefront. It was becoming apparent to a growing
number of people, including business consultants who had served on or with the OR teams
during the war, that these were basically the same problems that had been faced by the
military but in a different context. By the early 1950s, these individuals had introduced
the use of OR to a variety of organizations in business, industry, and government. The
rapid spread of OR soon followed.
As its name implies, operations research involves research on operations. Thus, opera-
tions research is applied to problems that concern how to conduct and coordinate the
operations (i.e., the activities) within an organization. The nature of the organization is
essentially immaterial, and, in fact, OR has been applied extensively in such diverse areas
as manufacturing, transportation, construction, telecommunications, financial planning,
health care, the military, and public services, to name just a few. Therefore, the breadth
of application is unusually wide.
The research part of the name means that operations research uses an approach that
resembles the way research is conducted in established scientific fields.
4
Operations Research Jane Akinyi Aduda
The next step is to construct a scientific (typically mathematical) model that attempts
to abstract the essence of the real problem. It is then hypothesized that this model is
a sufficiently precise representation of the essential features of the situation that the
conclusions (solutions) obtained from the model are also valid for the real problem.
Next, suitable experiments are conducted to test this hypothesis, modify it as needed,
and eventually verify some form of the hypothesis. (This step is frequently referred to as
model validation.) Thus, in a certain sense, operations research involves creative scientific
research into the fundamental properties of operations. However, there is more to it than
this. Specifically, OR is also concerned with the practical management of the organization.
Therefore, to be successful, OR must also provide positive, understandable conclusions to
the decision maker(s) when they are needed.
One way of summarizing the usual (overlapping) phases of an OR study is the follow-
ing:
3. Develop a computer-based procedure for deriving solutions to the problem from the
model.
6. Implement.
5
Operations Research Jane Akinyi Aduda
“The objective of Operations Research is to provide a scientific basis to the decision maker
for solving the problems involving the interaction of various components of an organization
by employing a team of scientists from various disciplines, all working together towards
finding a solution which is in the best interest of the organization as a whole. The best
solution thus obtained is known as optimal decision”.
Imagine that you have a 5-week business commitment between Nairobi (NBI) and
Kisumu (KSM). You fly out of Nairobi on Mondays and return on Wednesdays. A regular
round-trip ticket costs shs.8,000, but a 20% discount is granted if the dates on the ticket
span a weekend. A one-way ticket in either direction costs 75% of the regular price. How
should you buy the tickets for the 5-week period?
Consider this situation as a decision-making problem. Solving this requires the answer
to the following three questions:
1. Buy five regular NBI-KSM-NBI for departure on Monday and return on Wednesday
of the same week.
2. Buy one NBI-KSM, four KSM-NBI-KSM that span weekends and one KSM-NBI.
3. Buy one NBI-KSM-NBI to cover Monday of the first week and Wednesday of the
last week and four KSM-NBI-KSM to cover the remaining legs. All tickets in this
alternative span at least one weekend.
6
Operations Research Jane Akinyi Aduda
The restriction on these options is that you should be able to leave NBI on Monday and
return on Wednesday of the same week.
An obvious objective criterion for evaluating the proposed alternative is the price of
the tickets. The alternative that yields the smallest cost would be the best. Specifically,
we have
Although this example illustrates the three main components of an OR model, situa-
tions differ in the details of how each component is developed and constructed.
2(l + w) = L
l ≥ 0, w ≥ 0
7
Operations Research Jane Akinyi Aduda
Finally, the objective of the problem is maximization of the area of the rectangle. If we
let z to be the area of the rectangle, then, the complete model becomes
maximize z = lw
subject to
2(l + w) = L
and
l, w ≥ 0
subject to
Constraints
A solution of the model is feasible if it satisfies all the constraints, and optimal if, in
addition yo being feasible, it yields the best (maximum or minimum) value of the objective
function.
Generally, the type and complexity of the mathematical model dictates the nature of the
solution method. The following are some of the tools that can be used.
(i) Linear Programming Model- This model is used for resource allocation when the
resources are limited and there are number of competing candidates for the use of
resources. The model may be used to maximize the returns or minimize the costs.
Consider the following situations:
8
Operations Research Jane Akinyi Aduda
• When a company has number of orders on its schedule, which are to be pro-
cessed on the same machines and the processing time, is known, then we have
to allocate the jobs or orders to the machines, so as to complete all the jobs in
minimum time. This we can also solve using the Assignment model.
(ii) Sequencing Model- When a manufacturing firm has some job orders, which can
be processed on two or more machines and the processing times of each job on each
machine is known, then the problem of processing in a sequence to minimize the
cost or time is known as Sequencing model.
(iii) Waiting Line Model or Queuing Model-A model used for solving a problem
where certain service facilities have to provide service to its customers, so as to avoid
lengthy waiting line or queue, so that customers will get satisfaction from effective
service and idle time of service facilities are minimized is waiting line model or
queuing model.
9
Operations Research Jane Akinyi Aduda
(iv) Replacement Model-Any capital item, which is continuously used for providing
service or for producing the product is subjected to wear and tear due to usage,
and its efficiency goes on reducing. This reduction in efficiency can be predicted
by the increasing number of breakdowns or reduced productivity. The worn out
parts or components are to be replaced to bring the machine back to work through
maintenance. A time is reached when even the maintenance cost becomes too high
and the manager feels replacement of the old machine by new one is the best thing
to do. These type of problems and can be solved using replacement models.
(v) Inventory Models-Any manufacturing firm has to maintain stock of materials for
its use. This stock of materials, which are maintained in stores, is known as in-
ventory. Inventory is one form of capital or money. The company has to maintain
inventory at optimal cost. There are different types of inventory problems, depend-
ing the availability and demand pattern of the materials. These can be solved by
the application of inventory models.
10
Chapter 2
Linear programming
A model, which is used for optimum allocation of scarce or limited resources to competing
products or activities under such assumptions as certainty, linearity, fixed technology, and
constant profit per unit, is a linear programming model.
Linear Programming is one of the most versatile, powerful and useful techniques for
making managerial decisions
3. The problem must permit a choice or choices between alternative courses of action.
Below are some of the important assumptions made when formulating a linear program-
ming model:
1. The decision maker here is completely certain (i.e., deterministic conditions) regard-
ing all aspects of the situation, such as availability of resources, profit contributions,
technology, courses of action and their consequences etc.
2. The relationship between variables in the problem and the resources available is lin-
ear. Here the term linearity implies proportionality and additivity. This assumption
is very useful as it simplifies modelling of the problem.
3. We assume here fixed technology i.e., production requirements are fixed during the
planning period and don’t change in the period.
5. The decision variables are continuous meaning companies can manufacture products
in fractional units e.g. 2.5 vehicles, 3.2 barrels of oil etc. This is referred to as the
assumption of perfect divisibility.
6. Only one decision is required for the planning period. This condition shows that the
linear programming model is a static model, implying that the linear programming
12
Operations Research Jane Akinyi Aduda
7. All variables are restricted to non-negative values (i.e., their numerical value will be
≥ 0).
1. Study the given situation, find the key decision to be made. Hence, identify the
decision variables(issues or factors in the problem whose values are to be determined)
in the problem, specifying their units of measurement.
3. Formulate the constraints of the problem (these are imposed by resource availability)
and express them as linear equalities or inequalities in terms of the decision variables.
These are restrictions on the decision variables which arise due to limited resources.
The objective function, the set of constraints and the non-negativity restrictions together
form the LP model.
13
Operations Research Jane Akinyi Aduda
Optimize z = c1 x1 + c2 x2 + . . . + cn xn
and x1 , x2 , . . . , xn ≥ 0
and xj ≥ 0, j = 1, 2, . . . , n
where xj s are the decision variables and aij s, bi s and cj s are constants.
14
Operations Research Jane Akinyi Aduda
Here we mainly seek to maximize profits, revenue or output from a production process.
Example 2.1 (Marangi Paint Problem). The Marangi Paint company produces both
interior and exterior paints from two raw materials, M 1 and M 2. The following table
provides the basic data for the problem:
A market survey indicates that, the daily demand for interior paint cannot exceed that
of exterior paint by more than 1 ton. Also the maximum daily demand for interior paint
is 2 tons. Marangi paint company wants to determine the optimum (best) product mix
for interior and exterior paints that maximizes the daily profits.
Solution:
Step 1. Identify the decision variables. These are the amounts of exterior and interior
paints that need to be produced. Let x1 and x2 represent the tons of exterior and
interior paints to be produced daily respectively.
Step 2. Formulate the objective function. The company wants to maximize profits.
Letting z represent the total daily profit (in thousands of dollars), the objective
function can be given as,
Step 3. Formulate the constraints that restrict raw material usage and express the
demand. For raw material usage we have:-
For the demand restrictions we have the first one saying that the difference between
the daily production of interior and exterior paints, x2 − x1 , does not exceed 1 ton.
This translate to x2 − x1 ≤ 1. The second restriction stipulates that the maximum
daily demand for interior paint is limited to two tons, which translates to x2 ≤ 2.
subject to
6x1 + 4x2 ≤ 24
x1 + 2x2 ≤ 6
−x1 + x2 ≤ 1
x2 ≤ 2
and
x1 , x2 ≥ 0
Example 2.2 (KICOMI Garment Problem). The KICOMI retail store stocks two
types of shirts A and B, These are packed in attractive cardboard boxes. In one week the
store can sell a maximum of 400 shirts of type A and a maximum of 300 shirts of type B.
The storage capacity, however, is limited to a maximum of 600 of both types combined.
16
Operations Research Jane Akinyi Aduda
Type A shirt fetches a profit of Kshs. 20/- per unit and type B a profit of Kshs. 50/- per
unit. The store wants to establish how many of each type of shirt they need to stock per
week in order to maximize their total profit. Formulate a mathematical model for this
problem.
Solution:
Step 1. We require the decision variables with regard to the quantities we need to
stock weekly. Let x1 and x2 represent the numbers of shirts A and B to be stocked
weekly respectively
Step 2. The store is seeking to maximize weekly profits. The profit contributions for
types A and B are 20/- and 50/- per unit respectively, so if z represents the weekly
profits for KICOMI store, then the objective function becomes
z = 20x1 + 50x2
Step 3. We are limited by the sales and storage capacities so we consider the maximum
sales and the maximum storage. The sales and storage constraints are given as
x1 ≤ 400
x2 ≤ 300
x1 + x2 ≤ 600
Step 4. Finally
x1 , x2 ≥ 0
subject to x1 ≤ 400
x2 ≤ 300
x1 + x2 ≤ 600
and x1 , x2 ≥ 0
17
Operations Research Jane Akinyi Aduda
For minimization we are interested in minimizing costs be they production, storage etc
as well as time spent on production or deliveries and so on.
Solution:
Step 1. Let x1 and x2 represent the quantities of Tonic I and II that can be purchased
Step 2. Let the total cost of purchasing these tonics be z. The objective function
considering the costs becomes
Step 3. We are limited by the proportion of each vitamin in the tonics and their mini-
18
Operations Research Jane Akinyi Aduda
Step 4. Finally
x1 , x2 ≥ 0
3x1 + 2x2 ≥ 50
and x1 , x2 ≥ 0
Example 2.4 (Diet Problem). Polly wonders how much money she must spend on food
in order to get all the energy (2,000 kcal), protein (55 g), and calcium (800 mg) that she
needs every day. She chooses six foods that seem to be cheap sources of the nutrients and
collects her data in the following table of nutritive value per serving. She also decides to
impose servings-per-day limits on all foods. Present this problem in standard form.
Solution:
To design the most economical menu, she speculates about some as yet unspecified menu,
19
Operations Research Jane Akinyi Aduda
subject to 0 ≤ x1 ≤ 4
0 ≤ x2 ≤ 3
0 ≤ x3 ≤ 2
0 ≤ x4 ≤ 8
0 ≤ x5 ≤ 2
0 ≤ x6 ≤ 2
and x1 , x2 , . . . , x6 ≥ 0
Linear Programming, is a method of solving the types of problems in which two or more
candidates or activities compete to utilize the available limited resources, with a view of
optimizing the objective function of the problem. The objective may be to maximize the
returns or to minimize the costs. The various methods available to solve the problem are:
1. The Graphical Method:This method limits us to problems that have two decision
variables in the problem. (To deal with more decision variables by the graphical
method will become complicated, because we would have to deal with planes instead
of straight lines).
2. The Systematic Trial and Error method, where we go on giving various values
20
Operations Research Jane Akinyi Aduda
to variables until we get optimal solution. This method takes too much of time and
laborious.
4. The Simplex method. When the problem is having more than two decision vari-
ables, simplex method is the most powerful method to solve the problem. It has a
systematic algorithm used to solve the problem.
In linear programming (and its extensions) any specification of values for the decision
variables (x1 , x2 , . . . , xn ) is called a solution, regardless of whether it is a desirable or
even an allowable choice. Different types of solutions are then identified by using an
appropriate adjective.
• A feasible solution is a solution for which all the constraints are satisfied.
• The feasible region is the collection of all feasible solutions. However we can note
that it is possible for a problem to have no feasible solutions.
• An optimal solution is a feasible solution that has the most favourable value of the
objective function. Most problems will have just one optimal solution. However, it
is possible to have more than one. Another possibility is that of having no optimal
solutions.
Solving LP Problems
Linear programming problems with two variables can be represented and solved graphi-
cally with ease. Though in real-life, the two variable problems are practised very little,
the interpretation of this method will help to understand the simplex method. The non
negativity constraint implies the decision variables must have positive values and always
lie in first quadrant of the graph. In graphical method, the inequalities (structural con-
straints) are considered to be equations. Consider the Marangi Paint Problem which was
summarized as
x1 + 2x2 ≤ 6
−x1 + x2 ≤ 1
x2 ≤ 2
and x1 , x2 ≥ 0
• Plot the inequalities as equalities and shade off the unwanted region (use broken
lines for strict inequalities and bold lines for those “greater than or equal to”, or
“less than or equal to” situations.)
• Identify all the corner points, pick their coordinates and plug them into the objective
function.
• Pick the pair of points that give the optimal value of the objective function.
From this graph, we obtain the results as shown in table 3.1. From these results we see
that Marangi will maximize profits ($ 21,000) if they produce 3 tons of exterior paint and
1.5 tons of interior paint.
Example 3.1. A company manufactures two products, X and Y by using three machines
A, B, and C. Machine A has 4 hours of capacity available during the coming week.
Similarly, the available capacity of machines B and C during the coming week is 24 hours
and 35 hours respectively. One unit of product X requires one hour of Machine A, 3
hours of machine B and 10 hours of machine C. Similarly one unit of product Y requires
1 hour, 8 hour and 7 hours of machines A, B and C respectively. When one unit of X is
sold in the market, it yields a profit of shs.50/- per product and that of Y is shs.70/- per
unit. Solve the problem by using graphical method to find the optimal product mix.
The details given in the problem is given in table 3.2:
Let x and y be the units of X and Y to be produced by the company. The L.P. model is
then given by
subject to x + y ≤ 4
3x + 8y ≤ 24
10x + 7y ≤ 35
and x, y ≥ 0
The plot is as shown in figure 3.3.
The results are as shown in table 3.3 indicating they should produce 1.6 units of X
and 2.4 units of Y so as to maximize profits(shs.248) .
24
Operations Research Jane Akinyi Aduda
For minimization, Consider the problem below (The Chicken Diet Problem).
On a chicken farm, the poultry is given a healthy diet to gain weight. The chicken
have to consume a minimum of 15 units of Substance A and another 15 units of Substance
B. In the market there are only two classes of compounds: Type X, with a composition
of one unit of A to five units of B, and another type, Y, with a composition of five units
of A to one of B. The price of Type X is $10 and Type Y, $30. What are the quantities
of each type of compound that have to be purchased to cover the needs of the diet with
a minimal cost?
25
Operations Research Jane Akinyi Aduda
respectively.
subject to x1 + 5x2 ≥ 15
5x1 + x2 ≥ 15
and x1 , x2 ≥ 0
This is a very straight forward problem with only two constraints and thus the solution
is at the intersection. The farm should purchase 2.5 units of each compounds at a cost of
$100 as shown in figure 3.3.
Example 3.2. Ozark farm uses at least 800 lb of special feed every day. This special
feed is a mixture of corn and soyabean meal with the following compositions: The dietary
requirements of the special feed are at least 30% protein and at most 5% fibre. Ozark
Farm wishes to to determine the daily minimum-cost feed mix.
26
Operations Research Jane Akinyi Aduda
Let x1 and x2 represent the lb of corn and soyabean meal in the daily mix respectively.
The objective function seeks to minimize the total daily costs i.e.
Because Ozark Farm needs at least 800 lb of feed everyday, the associated constraint can
be expressed as
x1 + x2 ≥ 800
As for the protein and fibre dietary constraints we need at least 30% and 5% of the total
feed mix (x1 + x2 )lb, that is
subject to x1 + x2 ≥ 800
0.21x1 − 0.30x2 ≤ 0
0.03x1 − 0.01x2 ≥ 0
and x1 , x2 ≥ 0
This is the graphical representation and the results are at point C which is the optimal
(cost minimizing) mix as seen in figure 3.4 as well as table 3.5
1. All constraints (with the exception of the non negativity of the variables) are equa-
tions with a non-negative right hand side.
• In (≤) constraints, the RHS represents a limit on the resource availability while the
LHS represents the usage of resources by the activities of the model. RHS-LHS=
unused or slack resources. To convert (≤) to =, add a slack variable to the LHS e.g.
in the Marangi problem, the inequality
• (≥) constraints set a lower limit on the activities of the LP model so that LHS-
RHS=surplus. The conversion of (≥) to = is achieved by subtracting a surplus
amount from the LHS of the inequality .e.g in the vitamin deficiency problem, the
28
Operations Research Jane Akinyi Aduda
inequality
In a set of m × n equations with m < n, we set n − m variables equal to zero and solve
the remaining equations for the remaining m variables. The resulting solution, if unique,
is a basic solution and must conform to one of the corner points of the solution space.
This means the maximum number of corner points is
n!
Cmn =
m!(n − m)!
subject to 2x1 + x2 ≤ 4
x1 + 2x2 ≤ 5
and x1 , x2 ≥ 0
subject to 2x1 + x2 + s1 = 4
x1 + 2x2 + s2 = 5
and x1 , x2 , s1 , s2 ≥ 0
Rather than enumerate all the corner points as above, the simplex method only investi-
gates a select few. It focuses solely on CPF solutions. For any problem with at least one
optimal solution, finding one requires only finding a best CPF solution. Normally, the
simplex method starts from the origin and seeks to find the next variable that gives the
largest improvement to the objective function. The design of the simplex method calls
for increasing one variable at a time.
It deals with iterative process, which consists of first designing a Basic Feasible
Solution or a Programme and proceed towards the OPTIMAL SOLUTION and testing
each feasible solution for Optimality to know whether the solution on hand is optimal or
not. If not an optimal solution, redesign the programme, and test for optimality until the
30
Operations Research Jane Akinyi Aduda
test confirms OPTIMALITY. Hence we can say that the Simplex Method depends on two
concepts known as Feasibility and optimality. The iterative steps of the simplex method
are repeated until a finite optimal solution, if exists, is found. If no optimal solution, the
method indicates that no finite solution exists.
Step 2: Select the entering variable using the optimality condition. This condition
states that the entering variable in a maximization (minimization) problem is the
non basic variable having the most negative (positive) coefficient in the z-row. Ties
are broken arbitrarily. The optimum is reached at the iteration where all the z- row
coefficients of the non-basic variables are non-negative (negative).
Step 3: Select the leaving variable using the feasibility condition. For both maxi-
mization and minimization problems, this condition states that the leaving variable
is the basic variable associated with the smallest non-negative ratio (intercept i.e.
ratio of the solution column to the constraint coefficients under the entering variable
(pivot column)). Ties are broken arbitrarily.
Step 4: Determine the new basic solution by using the appropriate Gauss- Jordan
Computations and go to step two.
1. Pivot row:
(a) Replace the leaving variable in the Basic column with the entering variable.
(b) New pivot row=Current pivot row ÷ pivot element (the element at the inter-
section of the pivot row and pivot column)
2. All other rows, including z: New row = (Current row) - (pivot column coefficient)
× (New pivot row)
31
Operations Research Jane Akinyi Aduda
MAXIMIZATION CASE
Let us refer to the Marangi paint problem once again. We express the problem in this
form.
x1 + 2x2 + s2 =6
−x1 + x2 + s3 =1
x2 + s4 = 2
and x1 , x2 , s1 , s2 , s3 , s4 ≥ 0
z − 5x1 − 4x2 = 0
This way the initial simplex tableau can be given as:- The first iteration starts at the
origin (where x1 = x2 = 0), leaving us with only the slack variables as basic. This tableau
is not optimal and can be improved by increasing either x1 or x2 . Since in this tableau,
we have expressed out objective function as
z − 5x1 − 4x2 = 0
we pick the variable with the most negative coefficient as the next entering variable
(optimality condition), which in this case is x1 . The column corresponding to the entering
variable is called the pivot column.
32
Operations Research Jane Akinyi Aduda
To identify the leaving variable, we compute the intercepts (ratios) and pick the vari-
able with the minimum non-negative ratio. This identifies s1 as the leaving variable as
shown in table 3.8
So for the next tableau, we swap x1 with s1 using the Gauss- Jordan operations.
1. Replace s1 in the basic column with x1 and calculate the coefficients of the new x1
as follows:
New x1 -row= Current s1 -row ÷6
1 2 1
= (0, 6, 4, 1, 0, 0, 0, 24) = (0, 1, , , 0, 0, 0, 4)
6 3 6
2 1 2 5
(1, −5, −4, 0, 0, 0, 0, 0) − (−5) × (0, 1, , , 0, 0, 0, 4) = (1, 0, − , , 0, 0, 0, 20)
3 6 3 6
2 1 4 1
(0, 1, 2, 0, 1, 0, 0, 6) − (1) × (0, 1, , , 0, 0, 0, 4) = (0, 0, , − , 1, 0, 0, 2)
3 6 3 6
2 1 5 1
(0, −1, 1, 0, 0, 1, 0, 1) − (−1) × (0, 1, , , 0, 0, 0, 4) = (0, 0, , , 0, 1, 0, 5)
3 6 3 6
33
Operations Research Jane Akinyi Aduda
2 1
(0, 0, 1, 0, 0, 0, 1, 2) − (0) × (0, 1, , , 0, 0, 0, 4) = (0, 0, 1, 0, 0, 0, 1, 2)
3 6
This yields the second simplex tableau as shown in table 3.9 We can see that this tableau
is not optimal as the objective function can still be improved. The next entering variable
is x2 and using the feasibility condition we can identify the leaving variable to be s2 as
shown in table 3.10 So we repeat the Gauss- Jordan row operations and they produce the
Based on the optimality condition, none of the z-row coefficients associated with the non
basic variables s1 and s2 are negative, hence this last tableau is optimal and the solution
is interpreted as in table 3.12
Therefore in summary, to solve a linear programming problem in standard form, use the
following steps.
3. Locate the most negative entry in the z row. The column for this entry is called
the entering column. (If ties occur, any of the tied entries can be used to determine
the entering column.)
4. Form the ratios of the entries in the solution-column with their corresponding posi-
tive entries in the entering column. The departing row corresponds to the smallest
35
Operations Research Jane Akinyi Aduda
non-negative ratio (If all entries in the entering column are 0 or negative, then there
is no maximum solution. For ties, choose either entry.) The entry in the departing
row and the entering column is called the pivot element.
5. Use elementary row operations so that the pivot element is 1, and all other entries
in the entering column are 0. This process is called pivoting.
6. If all entries in the bottom row are zero or positive, this is the final tableau. If not,
go back to Step 3.
7. If you obtain a final tableau, then the linear programming problem has a maximum
solution, which is given by the entry in the lower-right corner of the tableau.
MINIMIZATION CASE
12x1 + 6x2 ≥ 36
10x1 + 30x2 ≥ 90
and x1 , x2 ≥ 0
The basic procedure used to solve such a problem is to convert it to a maximization
problem in standard form, and then apply the simplex method.
The first step in converting this problem to a maximization problem is to form the
augmented matrix for this system of inequalities. To this augmented matrix we add a
last row that represents the coefficients of the objective function, as follows.
..
60 60 . 300
..
12 6 . 36
..
10 30 . 90
... ... ... ...
..
0.12 0.15 . 0
36
Operations Research Jane Akinyi Aduda
Next, we form the transpose of this matrix by interchanging its rows and columns.
..
60 12 10 . 0.12
..
60 6 30 . 0.15
... ... ... ... ...
..
300 36 90 . 0
Note that the rows of this matrix are the columns of the first matrix, and vice versa.
Finally, we interpret the new matrix as a maximization problem as follows. (To do this,
we introduce new variables, y1 , y2 , and y3 .) We call this corresponding maximization
problem the DUAL of the original minimization problem.
and y1 , y2 , y3 ≥ 0
As it turns out, the solution of the original minimization problem can be found by applying
the simplex method to the new dual problem, as follows.
and y1 , y2 , y3 , s1 , s2 ≥ 0
Thus, the solution of the dual maximization problem is Z = 0.66. This is the same
value obtained by the graphical solution. The x-values corresponding to this optimal
37
Operations Research Jane Akinyi Aduda
solution are obtained from the entries in the z-row corresponding to slack variable columns.
In other words, the optimal solution occurs when x1 = 3 and x2 = 2.
38
Operations Research Jane Akinyi Aduda
The fact that a dual maximization problem has the same solution as its original
minimization problem is stated formally in a result called the von Neumann Duality
Principle, after the American mathematician John von Neumann (1903-1957).
These problems can be solved by the simplex method; however, specialized algorithms
have been developed which offer greater efficiency. The transportation problem has the
following characteristics:-
1. There is a set of m supply points from which goods are shipped. Supply point i can
supply at most si units. This is the amount of supply at source i
2. There is a set of n demand points to which the good is shipped. Demand point j
must receive at least dj units of the shipped good. This is the amount of demand
39
Operations Research Jane Akinyi Aduda
at destination j
3. Each unit produced at supply point i and shipped to demand point j incurs a
variable cost of cij .
The sources and destinations are represented by nodes. The routes linking the sources
and destinations are denoted by arcs. Arc (i, j) joining source i to destination j caries
two pieces of information.
The objective of the model is to determine the unknowns xij that will minimize the total
transportation cost while satisfying all the supply and demand restrictions.
Example 3.3. Powerco has three electric power plants that supply the electric needs of
four cities.
• The associated supply of each plant and demand of each city is given in the table
3.17.
• The cost of sending 1 million kwh of electricity from a plant to a city depends on
the distance the electricity must travel.
A transportation problem is specified by the supply, the demand, and the shipping
costs. So the relevant data can be summarized in a transportation tableau. The trans-
portation tableau implicitly expresses the supply and demand constraints and the shipping
cost between each demand and supply point.
1. Decision Variable:
Since we have to determine how much electricity is sent from each plant to each
40
Operations Research Jane Akinyi Aduda
Table 3.17: Shipping costs, Supply, and Demand for Powerco Example
From Destination Supply
City 1 City 2 City 3 City 4 (Million kwh)
Plant 1 $8 $6 $10 $9 35
Plant 2 $9 $12 $13 $7 50
Plant 3 $14 $9 $16 $5 40
Demand 45 20 30 30
(Million kwh)
city;
xij = Amount of electricity produced at plant i and sent to city j
x14 = Amount of electricity produced at plant 1 and sent to city 4
2. Objective function
Since we want to minimize the total cost of shipping from plants to cities;
Minimize Z = 8x11 + 6x12 + 10x13 + 9x14 + 9x21 + 12x22 + 13x23 + 7x24 + 14x31 +
9x32 + 16x33 + 5x34
3. Supply Constraints:
Since each supply point has a limited production capacity;
4. Demand Constraints:
41
Operations Research Jane Akinyi Aduda
5. Sign Constraints:
Since a negative amount of electricity can not be shipped all xij ’s must be non
negative;
xij ≥ 0, (i = 1, 2, 3; j = 1, 2, 3, 4)
and xij ≥ 0, i = 1, 2, . . . , m; j = 1, 2, . . . , n
If Total supply equals to total demand, the problem is said to be a balanced transportation
problem:
m
X n
X
si = dj
i=1 j=1
• Simplex pivots do not involve multiplication, they reduce to additions and subtrac-
tions
42
Operations Research Jane Akinyi Aduda
If total supply exceeds total demand, we can balance the problem by adding a dummy
demand point. Since shipments to the dummy demand point are not real, they are
assigned a cost of zero.
If a transportation problem has a total supply that is strictly less than total demand the
problem has no feasible solution.
3. Vogel’s Method
To find the bfs by the NWC method; Begin in the upper left (north-west) corner of the
transportation tableau and set x11 as large as possible (here the limitations for setting x11
to a larger number, will be the demand of demand point 1 and the supply of supply point
1. Your x11 value can not be greater than minimum of this 2 values).
1. Allocate as much as possible to the selected cell, and adjust the associated amount
of supply and demand by subtracting the allocated amount.
2. Cross out the row or column with zero supply or demand to indicate that no further
assignments can be made in that row or column. If both row and column are net
to zero simultaneously, cross out only one, and leave a zero supply (demand) in the
uncrossed out row (column)
3. If exactly one row or column is left uncrossed out, stop. Otherwise move to the cell
to the right if a column has just been crossed out, or below if a row has been crossed
out. Go to step 1. This is shown in figure 3.18
Z = 35 × 8 + 10 × 9 + 12 × 20 + 13 × 20 + 16 × 10 + 5 × 30
= 1, 180
Note: The total number of allocations must be equal to m + n − 1, where m is the number
of rows and n is the number of columns, otherwise the solution will be degenerate.
44
Operations Research Jane Akinyi Aduda
The Northwest Corner Method dos not utilize shipping costs. It can yield an initial bfs
easily but the total shipping cost may be very high. The minimum cost method uses
shipping costs in order come up with a bfs that has a lower cost.
To begin the minimum cost method, first we find the decision variable with the smallest
shipping cost (xij ). Then assign xij its largest possible value, which is the minimum of
si and dj . After that, as in the Northwest Corner Method we should cross out row i and
column j and reduce the supply or demand of the non-crossed-out row or column by the
value of xij .
Then we will choose the cell with the minimum cost of shipping from the cells that do
not lie in a crossed-out row or column and we will repeat the procedure. This is shown
in figure 3.19 This gives a starting basic solution of
Z = 30 × 5 + 20 × 6 + 15 × 8 + 30 × 9 + 20 × 13 + 10 × 16
= 1, 080
45
Operations Research Jane Akinyi Aduda
VAM is an improved version of the Least-Cost Method, that generally, but not always,
produces better starting solutions.
1. Start by computing each row and column a penalty. The penalty will be equal to
the difference between the two smallest shipping costs in the row or column.
2. Identify the row or column with the largest penalty. Find the first basic variable
which has the smallest shipping cost in that row or column.
3. Then assign the highest possible value to that variable, and cross-out the row or
column as in the previous methods. Compute new penalties and use the same
procedure. If a row and a column are satisfied simultaneously, only one of the two
is crossed out, and the remaining row or column is assigned zero supply or demand.
If exactly one row or column with zero supply or demand remains uncrossed-out stop. If
one row (column) with positive supply (demand) remains uncrossed out, determine the
basic variables in the row (column) by the least cost method. Stop. This is shown in
figure 3.20. This gives a starting solution of
46
Operations Research Jane Akinyi Aduda
Z = 30 × 5 + 10 × 9 + 10 × 6 + 45 × 9 + 25 × 10 + 5 × 13
= 1, 020
After determining the starting solution (using any of the three methods discussed above),
we use the following algorithm to determine the optimal solution.
1. Use the simplex optimality condition to determine the entering variable as the cur-
rent non-basic variable that can improve the solution. If the optimality condition is
satisfied, stop, otherwise go to step 2.
47
Operations Research Jane Akinyi Aduda
2. Determine the leaving variable using the simplex feasibility condition. Change the
basis and return to step 1.
The determination of the entering variable from among the current non-basic variables
(those that are not part of the starting basic solution) is done by computing the non-basic
coefficients in the Z-row using the method of multipliers.
In the method of multipliers, we associate the multipliers ui and vj with row i and
column j of the transportation tableau. For each current basic variable xij ,
Using the NWC starting solution, the initial basic feasible solution has 6 basic variables,
leading to 6 equations with 7 unknowns. To solve these equations, the method of multi-
pliers calls for arbitrary setting any u1 = 0 and then solving the remaining variables as
shown in table 3.21
To summarize, we have
u1 = 0, u2 = 1, u3 = 4, v1 = 8, v2 = 11, v3 = 12, v4 = 1
The results of this evaluation are shown in table 3.22 The preceding information, together
48
Operations Research Jane Akinyi Aduda
with the fact that ui +vj −cij = 0 for each basic xij , is actually equivalent to computing the
Z-row of the simplex tableau as the following summary shows. Because the transportation
seeks to minimize costs, the entering variable is the one having the most positive coefficient
in the z-row. Thus x32 is the entering variable. On the transportation tableau, these
operations are shown as in table 3.24
Having identified x32 as the entering variable, we need to determine the leaving vari-
able. It means we want to ship through x32 to reduce the shipping costs. From table
49
Operations Research Jane Akinyi Aduda
3.24, if we ship θ though x32 , then the maximum value of θ is determined based on two
conditions.
These two conditions determine the maximum value of θ and the leaving variable in the
following manner.
1. Construct a closed loop that starts and ends in the entering variable cell (3, 2). The
loop consists of connected horizontal and vertical segments only (no diagonals are
allowed). Except for the entering variable cell, each corner of the closed loop must
coincide with a basic variable. Exactly one loop exists for a given entering variable.
2. Next, assign the amount (the maximum value) θ to the entering variable cell (3, 2).
For the supply and demand limits to remain satisfied, we must alternate between
subtracting and adding the amount θ at the successive corners of the loop. (It
doesn’t matter whether the loop is traced in a clockwise or anti clockwise direction).
For θ to remain non-negative, the new values of the variables then remain non-
negative if
x21 = 20 − θ ≥ 0
x33 = 10 − θ ≥ 0
So we add 10 to cell (3, 2), subtract 10 from cell (3, 3), add 10 to cell (2, 3) and subtract
10 from cell (2, 2) and get back to cell (3, 2). The closed loop runs through
We can see that the leaving variable is x33 and the new allocation then becomes The new
cost then becomes
Z = 35 × 8 + 10 × 9 + 12 × 10 + 13 × 30 + 9 × 10 + 5 × 30
= 1, 120
However, this table is not optimal. This gives the new entering variable as x12 . Again For
θ to remain non-negative, the new values of the variables then remain nonnegative if
x11 = 35 − θ ≥ 0
x22 = 10 − θ ≥ 0
51
Operations Research Jane Akinyi Aduda
So we add 10 to cell (1, 2), subtract 10 from cell (1, 1), add 10 to cell (2, 1) and subtract
10 from cell (2, 2) and get back to cell (1, 2). The closed loop runs through
.This should reduce the transport costs by 5 × 10 = 50 and x22 leaves. This gives table
3.27 The new cost then becomes
Z = 25 × 8 + 10 × 6 + 20 × 9 + 30 × 13 + 9 × 10 + 5 × 30
= 1, 070
However, this table is still not optimal. This gives the new entering variable as x13 . Again
For θ to remain non-negative, the new values of the variables then remain non-negative if
x11 = 25 − θ ≥ 0
x23 = 30 − θ ≥ 0
So we add 25 to cell (1, 3), subtract 25 from cell (1, 1), add 25 to cell (2, 1) and subtract
25 from cell (2, 3) and get back to cell (1, 3). The closed loop runs through
.This should reduce the transport costs by 2 × 25 = 50 x11 leaves. This gives table 3.28
This table is optimal as there is no positive coefficient and the new and optimal cost then
becomes
Z = 10 × 6 + 10 × 25 + 9 × 45 + 5 × 13 + 10 × 9 + 5 × 30
= 1, 020
Note: This is similar to the solution obtained by VAM. In all cases VAM gives the best
starting solution, and in most cases, this result is always the optimal.
Example 3.4.
The Hard-rock Concrete Company has plants in three locations and is currently working
on four major construction projects, each located at a different site. The shipping cost
per truckload of concrete in dollars, daily plant capacities, and daily project requirements
are provided in the accompanying table.
53
Operations Research Jane Akinyi Aduda
HH
H To
HH Project A Project B Project C Project D Plant Capacities
From H
HH
H
Plant 1 10 4 12 15 90
Plant 2 12 5 8 25 55
Plant 3 9 7 6 10 35
Project
Requirements 40 45 65 30 180
solution Draw the cost matrix and calculate the row and column penalties at each
level as shown below. the penalties have been put in the last column and the last rows.
allocate the most at the cheapest route corresponding to the row or column with the
largest penalty and keep repeating the procedure until all allocations are made.
10 4 12 15 6 10 4 12 15 2
45 90 45 - 90
12 5 8 25 3 12 5 8 25 4
- 55 - - 55
9 7 6 10 1 9 7 6 10 3
- 35 - 30 35
40 45 65 30 180 40 45 65 30 180
1 1 2 5 1 - 2 5
In the first table, we allocate the most (45) in cell (1,2) and cross out the second column
and in the second table we allocate the most (30) in cell (3,4) and cross out the fourth
column.
Next we allocate the most (55) in cell (2,3) and cross out row two and then in the next
table allocate the most (5) in cell (3,3) and cross out row three. After this we are left
with only cell (1,1) and (1,3) and by the least cost method, we allocate (40) in (1,1) and
(5) in (1,3) and this completes the allocation.
54
Operations Research Jane Akinyi Aduda
10 4 12 15 2 10 4 12 15 2
45 - 90 40 45 5 - 90
12 5 8 25 4 12 5 8 25 -
- - 55 - 55 - - 55 - 55
9 7 6 10 3 9 7 6 10 3
- 30 35 - - 5 30 35
40 45 65 30 180 40 45 65 30 180
1 - 2 - 1 - 6 -
The next step is to check for optimality of this allocation using MODI method (also
known as the method of multipliers). So we calculate the ui ’s and vj ’s and the coefficients
for the non-basic variables.
v1 = 10 v2 = 4 v3 = 12 v4 = 16 Capacities
10 4 12 15
u1 = 0
40 45 5 -1 90
12 5 8 25
u2 = −4
-6 -5 55 -23 55
9 7 6 10
u3 = −6
-5 -9 5 30 35
Requirements 40 45 65 30 180
The optimal solution is such that x11 = 40, x12 = 45, x13 = 5, x23 = 55, x33 = 5 and
x34 = 30 and the total cost is (40×10)+(45×4)+(5×12)+(55×8)+(5×6)+(30×10) =
$1, 410
For this, the problem has to be converted to a minimisation problem first. This is achieved
by subtracting the largest value of the matrix from all the other values in the matrix and
solving using the modified matrix
55
Operations Research Jane Akinyi Aduda
The assignment model is a special form of a linear programming model that is similar
to the transportation model. There are differences, however. It involves assignment of
people to projects, jobs to machines, workers to jobs and teachers to classes etc., while
minimizing the total assignment costs. One of the important characteristics of assignment
problem is that only one job (or worker) is assigned to one machine (or project). Hence
the number of sources are equal the number of destinations and each requirement and
capacity value is exactly one unit.
The assignment problem finds applicability in various diverse business situations such as:-
In order to use this method, one needs to know only the cost of making all the possible
assignments. Each assignment problem has a matrix (table) associated with it. Normally,
the objects (or people) one wishes to assign are expressed in rows, whereas the columns
represent the tasks (or things) assigned to them. The number in the table would then be
the costs associated with each particular assignment. It may be noted that the assignment
problem is a variation of transportation problem with two characteristics.
56
Operations Research Jane Akinyi Aduda
2. the optimum solution for the problem would be such that there would be only one
assignment in a row or column of the cost matrix .
An assignment problem is a special type of linear programming problem where the ob-
jective is to minimize the cost or time of completing a number of jobs by a number of
persons. Furthermore, the structure of an assignment problem is identical to that of a
transportation problem. This problem can be expressed as in table 3.29 Where Cij is the
cost of performing the j th job by the ith worker and xij is the ith individual assigned to
j th job. The total cost is therefore
57
Operations Research Jane Akinyi Aduda
n X
X n
minimize Z = xij cij
i=1 j=1
Xn
subject to xij = 1, ∀ i
j=1
Xm
xij = 1 ∀ j
i=1
and xij = 0 or 1
1. Enumeration method
2. Simplex method
3. Transportation method
4. Hungarian method
There are various ways to solve assignment problems. Certainly it can be formulated as
a linear program (as we saw above), and the simplex method can be used to solve it. In
addition, since it can be formulated as a network problem, the network simplex method
may solve it quickly. However, sometimes the simplex method is inefficient for assignment
problems (particularly problems with a high degree of degeneracy).
Enumeration method
In this method, a list of all possible assignments among the given resources and activities is
prepared. Then an assignment involving the minimum cost, time or distance or maximum
profits is selected. If two or more assignments have the same minimum cost, time or
distance, the problem has multiple optimal solutions. This method can be used only
if the number of assignments is less. It becomes unsuitable for manual calculations if
number of assignments is large.
58
Operations Research Jane Akinyi Aduda
Although assignment problem can be solved using either the techniques of Linear Pro-
gramming or the transportation method, the assignment method is much faster and ef-
ficient. This method was developed by D. Konig, a Hungarian mathematician and is
therefore known as the Hungarian method of assignment problem.
The Hungarian Algorithm has been used with a good deal of success on many problems
and is summarized as follows.
(ii) If the no. of sources is not equal to the no. of destination, go to step2.
Step 2. Add a dummy source or dummy destination, so that the cost table becomes a
square matrix. The cost entries of the dummy source/destinations are always zero.
Step 3. Locate the smallest element in each row of the given cost matrix and then sub-
tract the same from each element of the row. These computations are referred to
as row reductions. In other words, the best course of action is determined for each
row, and the penalty or “lost opportunity” is developed for all other row values.
Step 4. In the reduced matrix obtained in the step 3, locate the smallest element of
each column and then subtract the same from each element of that column. Each
column and row now have at least one zero. These computations are called column
reductions.
Step 5. In the modified matrix obtained in the step 4, search for the optimal assignment
as follows:
(a) Examine the rows successively until a row with a single zero is found. Enclose
this value in a and cross off (X) all other zeros in its column. Continue in
this manner until all the rows have been taken care of.
59
Operations Research Jane Akinyi Aduda
(b) Repeat the procedure for each column of the reduced matrix.
(c) If a row and/or column has two or more zeros and one cannot be chosen by
inspection then assign arbitrarily any one of these zeros and cross off all other
zeros of that row / column.
(d) Repeat (a) through (c) above successively until the chain of assigning or
cross (X) ends.
Step 6. If the number of assignment is equal to n (the order of the cost matrix), an
optimum solution is reached. If the number of assignment is less than n(the order
of the matrix), go to the next step.
Step 7. Draw the minimum number of horizontal and/or vertical lines to cover all the
zeros of the reduced matrix.
(a) Find the smallest element of the reduced matrix not covered by any of the lines.
(b) Subtract this element from all uncovered elements and add the same to all the
elements laying at the intersection of any two lines.
Step 9. Go to step 6 and repeat the procedure until an optimum solution is attained.
Example 3.5. The Kenya premier league has four football games on a particular night.
Their office wants to assign four teams of officials to the four games in a way that will
minimize the total distance travelled by the officials. The distances in miles for each team
of officials to each game location are shown in Table 3.30
The supply is always one team of officials, and the demand is for only one team of officials
at each game.
Obtain the first and second reduced cost matrices by performing row and column reduc-
tions as shown in the table below.
60
Operations Research Jane Akinyi Aduda
Notice that as can be seen from the second matrix, the assignment of team A to Site II
means that no other team of officials can be assigned to that game. Once this assignment
is made, the zero in row B is infeasible, which indicates that there is not a unique optimal
assignment for team B. Therefore, Table does not contain an optimal solution.
Next, draw the minimum number of horizontal or vertical lines necessary to cross out
all zeros through the rows and columns of the table. The three lines indicate that there are
only three unique assignments, whereas four are required for an optimal solution. (Note
that even if the three lines could have been drawn differently, the subsequent solution
method would not be affected.)
Next, subtract the minimum value that is not crossed out (15) in Table 3.31 from
all values not crossed out. Then, add this minimum value to those cells where two lines
61
Operations Research Jane Akinyi Aduda
intersect. All the others remain unchanged. The second iteration for this model with the
appropriate changes is shown in Table 3.32.
No matter how the lines are drawn in Table 3.32, at least four are required to cross
out all the zeros as shown in table 3.33). This indicates that four unique assignments can
be made and that an optimal solution has been reached. First, team A can be assigned
to either the Game Site II or IV. The assignments can then be made as follows
These assignments and their respective distances are summarized as shown in tables 3.34
and 3.35
62
Operations Research Jane Akinyi Aduda
Example 3.6. A plant has four operators to be assigned to four machines. The time
(minutes) required by each worker to produce a product on each machine is shown in the
following table. Determine the optimal assignment and compute total minimum time.
Example 3.7. Carolina Airlines, a small commuter airline in North Carolina, has six
flight attendants whom it wants to assign to six monthly flight schedules in a way that
will minimize the number of nights they will be away from their homes. The numbers
of nights each attendant must be away from home with each schedule are given in the
following table. Identify the optimal assignments that will minimize the total number of
nights the attendants will be away from home.
Example 3.8.
The department of Commerce and Economics Studies plans to hold seminars on four con-
63
Operations Research Jane Akinyi Aduda
Topic
Day Leasing Portfolio Mergers & Derivatives
Management Acquisitions
Monday 50 40 60 20
Tuesday 40 30 40 30
Wednesday 60 20 30 20
Thursday 30 30 20 30
Friday 10 20 10 30
Find an optimal schedule of the seminars and the total number of students who unfortu-
nately will miss at least one seminar.
solution
This is an unbalanced minimization assignment problem. We first balance it by adding a
dummy topic.
64
Operations Research Jane Akinyi Aduda
Topic
Day Leasing Portfolio Mergers & Derivatives Dummy
Management Acquisitions 0
Monday 50 40 60 20 0
Tuesday 40 30 40 30 0
Wednesday 60 20 30 20 0
Thursday 30 30 20 30 0
Friday 10 20 10 30 0
Then obtain the second reduced cost matrix as the first one would look exactly like the
original cost matrix since each row now has a zero.
We have only 4 lines and we need 5 assignments so this is not optimal. Subtract the
minimum uncovered element(10) from all uncovered elements and add it to all the elements
lying in the intersections of any two lines. All the others remain unchanged. We obtain
the matrix below and draw the minimum number of lines covering the zeros again as
shown below.
30 10 40 0 0
30 10 40 0 0
20 0 20 10 0
20 0 20 10 0
50 0 20 10 10
50 0 20 10 10
10 0 0 10 0
10 0 0 10 0
0 0 0 20 10
0 0 0 20 10
We now have 5 lines and we need five assignments, so we start our assignment in row 3
as this is the first instance with only one zero and proceed to completion. The optimal
schedule is shown below.
65
Operations Research Jane Akinyi Aduda
For this, the problem has to be converted to a minimisation problem first. This is achieved
by subtracting the largest value of the matrix from all the other values in the matrix and
solving using the modified matrix
Example 3.9. The Kenya Navy wishes to assign four ships to patrol four sectors of the
Indian ocean. In some areas ships are to be on the outlook for illegal fishing boats, and
in other sectors to watch for enemy submarines, so the commander rates each ship in
terms of its profitable efficiency in each sector. These relative efficiencies are illustrated
in the table below. On the basis of the ratings shown, what patrol assignments should
the commander use to produce the greatest overall efficiencies.
Sector
Ship A B C D
1 20 60 50 55
2 60 30 80 75
3 80 100 90 80
4 65 80 75 70
solution
We first compute the opportunity costs (by subtracting all the values in the matrix from
the largest value in the matrix) to convert this problem to a minimization problem and
them minimize the opportunity costs and in so doing we will be maximizing the efficiencies.
66
Operations Research Jane Akinyi Aduda
The minimum number of straight lines needed to cover all zeros in this total opportunity
cost matrix is four. Hence an optimal assignment can be made. The optimal assignment
is ship 1 to sector D, ship 2 to sector C, ship 3 to sector B, and ship 4 to sector A.
The overall efficiency, computed from the original efficiency data is therefore
Assignment Efficiency
Ship 1 to sector D 55
Ship 2 to sector C 80
Ship 3 to sector B 100
Ship 4 to sector A 65
Total efficiency 300
67
Chapter 4
Inventory Models
Inventories are materials stored, waiting for processing, or experiencing processing. They
are ubiquitous throughout all sectors of the economy. Observation of almost any company
balance sheet, for example, reveals that a significant portion of its assets comprises inven-
tories of raw materials, components and sub-assemblies within the production process,
and finished goods. Most managers don’t like inventories because they are like money
placed in a drawer, assets tied up in investments that are not producing any return and, in
fact, incurring a borrowing cost. They also incur costs for the care of the stored material
and are subject to spoilage and obsolescence.
The purpose of inventory theory is to determine rules that management can use to
minimize the costs associated with maintaining inventory and meeting customer demand.
Inventory models answer the following questions
• Economies of scale Usually, placing an order has a certain cost that is independent
of the quantities ordered. Thus, more frequent orders incur higher costs of ordering
68
Operations Research Jane Akinyi Aduda
paper work. This may even cause higher transportation costs because the cost of
transportation per unit is often smaller for larger orders. Economies of scale also
play an important role in those cases where buying in large quantities results in a
reduction of the unit price.
• Customer service levels While variabilities in demand and supply are inevitable, in-
ventories help buffer against these variations and ensure product availability. Con-
sequently, delays in satisfying customer demand are reduced (when out of stock)
and unnecessary loss of revenue is avoided while improving customer satisfaction.
2. Many products have limited life cycles after which they become obsolete. When
the product is perishable (e.g., fresh food items), excess inventories may have to be
thrown out after expiry. Even if the product is not perishable, markdowns may be
required to dispose of excess inventory, leading to lower revenues or losses.
Virtually all businesses hold inventory and inventory management remains one of the
biggest business challenges. Many consider it to be a necessary evil; it helps ensure product
availability for customers but consumes valuable resources to procure and maintain.
69
Operations Research Jane Akinyi Aduda
For production systems there is a need for basically three types of inventories. These
are inventories of raw material, finished products, and work-in-process. Any of these
inventory systems could exist at any stage of the path of a product from its origin until
it reaches the hands of the final users. Note that if various stages of production are
performed at different locations, or sometimes even by different companies, work finished
in one location could be considered the final product for that location and raw material
for the next location downstream.
• Inventory of raw materials: The need for keeping an inventory of raw materials
arises because of several factors. As mentioned in the above example, it is often
not possible or economical to procure raw materials exactly when the need for them
arises. The cost factors involved include the cost of paperwork, transportation
costs, economies of scale, and unforeseeable events. Unpredictable events such as
international shortage of certain goods, a strike at the supplying plant, a dry season,
and the like, may interrupt the production process if a sufficient inventory of raw
materials is not on hand.
• Inventory of the finished product: The inventory of the final product involves
even more variability than is experienced with raw material. The demand for the
final product is often uncertain, and the manufacturer has little control over it.
Another factor, which is important when considering final product inventories, is
70
Operations Research Jane Akinyi Aduda
the cost involved in producing various sized lots. This sometimes favours production
of larger than demanded lot sizes because of potential savings in the unit costs.
This is sometimes known as Always Better Control. This system of control is also known
as Selective Approach System. In ABC system of inventory control, the materials are
classified depending on their turnover and annual consumption cost.
These items are less in number, but consume a large portion of the total inventory in-
vestment. Here, the annual consumption cost is more important than the unit cost of
the material. For example let us consider, two materials X and Y . The unit cost of X
is shs.1/- and annual consumption is 1000 units. The unit cost of Y is shs.200 and the
annual consumption is 3 units. Then annual consumption cost of X is shs.1000/- and
that of Y is shs.600/-. Here X is considered as high consumption cost material than Y .
Such items which consume nearly 70% of inventory cost are classified as ‘A’ -class items.
There will be certain materials, whose total annual consumption cost will be somewhere
between 20 to 25% of total inventory investment. These items are labelled as ‘B’ -class
items. These items will form 60% of the number of items stored.
71
Operations Research Jane Akinyi Aduda
The last class of items which are labelled as ‘C’ -class items, will be large in number may
be 30 to 35% of total number of items stored, but consumes only 5 to 10% total inventory
investment.
Hence we can say that ‘A’-Class items are less in number and consumes more money,
‘B’- Class items are medium in number and consumes 20 to 25% inventory investment and
‘C’-Class items are large in number and consumes only 5 to 10% of inventory investment.
1. List out all items in stores along with their unit price and annual consumption.
2. Calculate the annual consumption cost of each item, which is given by multiplying
the quantity consumed in the time period and the unit cost. If ‘q’ is the quantity
consumed in the time period and ‘p’ is the unit price, then annual consumption
value q × p = qp.
3. Rearrange the list in the descending order of the annual consumption cost. i.e.
highest cost at the top and next highest is the second and so on and the last item
is the lowest consumption value item.
5. Find the parentage of each cumulative value with respect to the total cost of inven-
tory.
6. Mark a line at 70%, 90% and at 100%. All the items covered by 70% line are ‘A’
class items, those which are covered between 70% line and 90% line are ‘B’ class
items and those are covered by 90% and 100% are ‘C’ class items.
Example 4.1. The details of material stocked in a company are given below with the
unit cost and the annual consumption in shs.. Classify the material in to A class, B class
and C class by ABC analysis.
72
Operations Research Jane Akinyi Aduda
S.No. Item Code No. Annual consumption in shs. Unit price in shs..
1 501 30,000 10
2 502 280,000 15
3 503 3,000 10
4 504 110,000 5
5 505 4,000 5
6 506 220,000 10
7 507 15,000 5
8 508 80,000 5
9 509 60,000 15
10 510 8,000 10
Solution
First we find the annual usage value for each item (unit price×annual usage) and rank
them in descending order.
Then we list the items in their descending order of annual consumption value, find the
cumulative value of annual consumption value and find the percentage of cumulative value
with respect to total inventory value. Draw lines at 70%, 90% and at 100%.
73
Operations Research Jane Akinyi Aduda
So In A class we have 2 items consuming 73% of the amount and in B class, we have 4
items consuming 25% of the amount and in C class, we have 4 items consuming about
2% of the inventory investment. This is shown in the graph in figure 4.1
analysis.png
Inventory models involve some or all of the following variables: We list the factors that
are important in making decisions related to inventories.
74
Operations Research Jane Akinyi Aduda
1. Ordering cost (c(z)) This is the cost of placing an order to an outside supplier
or releasing a production order to a manufacturing shop. The amount ordered is z
and the function c(z) is often non-linear.
2. Set-up cost (K) A common assumption is that the ordering cost consists of a fixed
cost, that is independent of the amount ordered, and a variable cost that depends
on the amount ordered. The fixed cost is called the set-up cost.
3. Product cost (c) This is the unit cost of purchasing the product as part of an
order. If the cost is independent of the amount ordered, the total cost is cz, where
c is the unit cost and z is the amount ordered. Alternatively, the product cost may
be a decreasing function of the amount ordered.
4. Holding cost (h) This is the cost of holding an item in inventory for some given unit
of time. It usually includes the lost investment income caused by having the asset
tied up in inventory. This is not a real cash flow, but it is an important component
of the cost of inventory. If c is the unit cost of the product, this component of the
cost is cα , where α is the discount or interest rate. The holding cost may also
include the cost of storage, insurance, and other factors that are proportional to the
amount stored in inventory.
5. Shortage cost (p) When a customer seeks the product and finds the inventory
empty, the demand can either go unfulfilled or be satisfied later when the product
becomes available. The former case is called a lost sale, and the latter is called a
backorder. Although lost sales are often important in inventory analysis, they are
not considered in this section, so no notation is assigned to it. The total backorder
cost is assumed to be proportional to the number of units back-ordered and the
time the customer must wait. The constant of proportionality is p, the per unit
backorder cost per unit of time.
6. Demand rate (d) This is the constant rate at which the product is withdrawn
from inventory. (units /time)
75
Operations Research Jane Akinyi Aduda
7. Lot/Order Size (Q) This is the fixed quantity received at each inventory replen-
ishment.
8. Order level (S) The maximum level reached by the inventory is the order level.
When back-orders are not allowed, this quantity is the same as Q. When back-orders
are allowed, it is less than Q.
9. Cycle time (τ ) The time between consecutive inventory replenishments is the cycle
time. For the models of this section τ = Q/d
10. Cost per time (T ) This is the total of all costs related to the inventory system
that are affected by the decision under consideration.
11. Optimal Quantities (Q∗ , S ∗ , τ ∗ , T ∗ ) The quantities defined above that maximize
profit or minimize cost for a given model are the optimal solution.
3. Constant Lead Time: The lead time for each order is a known constant, L. By
the lead time we mean the length of time between the instant when an order is
placed and the instant at which the order arrives.
76
Operations Research Jane Akinyi Aduda
For the basic EOQ model to hold, certain assumptions are required:
2. In an order of any size (say q units is placed, an ordering and set-up cost K is
incurred.
3. The lead time for each order is zero. This means orders arrive on time.
5. The cost per unit-year of holding inventory is h. This implies that if I units are
held for T years, a holding cost of IT h is incurred.
Given these assumptions, the EOQ model determines an ordering policy that minimizes
the yearly sum of ordering cost, purchasing cost, and holding cost.
• We should never place an order when I, the inventory level, is greater than zero; if
we place an order then the we are incurring an unnecessary holding cost.
• Each time an order is placed (when I = 0) we should order the same quantity, Q.
• T C(Q)= annual cost of placing orders + annual purchasing cost + annual holding
cost.
77
Operations Research Jane Akinyi Aduda
• To determine the annual holding cost, we need to examine the behaviour of I over
time.
• Definition: Any interval of time that begins with the arrival of an order and ends
the instant before the next order is received is called a cycle.
• The average inventory during any cycle is simply half of the maximum inventory
level attained during the cycle.
• This result will hold in any model for which demand occurs at a constant rate.
T c(Q) = unit cost (by the number of orders)+unit cost (total amount)+Holding Cost
d hQ
=K + pd +
Q 2
(4.1)
The economic order quantity, or EOQ, minimizes T c(Q) thus, Q∗ does indeed minimize
total annual cost. Substituting the EOQ into the total cost expression gives
√
r r
hKd hKd
T∗ = + pd + = pd + 2hKd (4.3)
2 2
Example 4.2. Braneast Airlines uses 500 tail lights per year. Each time an order for
tail lights is placed, an ordering cost of $5 is incurred. Each light cost 40 cents, and the
holding cost is 8 cents/light/year. Assume that demand occurs at a constant rate and
shortages are not allowed. What is the EOQ? How many orders will be placed each year?
How much time will elapse between the placement of orders?
solution
We are given that K = $5, h = 0.08/light/year, and d = 500 lights/year. The EOQ is
r r
2Kd 2 × 5 × 500
Q∗ = = = 250
h 0.08
Hence, the airline should place an order for 250 tail lights each time that inventory reaches
zero.
The time between placement (or arrival) of orders is simply the length of a cycle. Since
the length of each cycle is , τ = Q∗ /d, the time between orders will be
Q∗ 250 1
τ= = = per year
d 500 2
Example 4.3. Paul Peterson is the inventory manager for Office Supplies, Inc., a large
office supply warehouse. The annual demand for paper punches is 20,000 units. The
ordering cost is $100 per order, and the carrying (holding) cost is $5 per unit per year.
Determine the EOQ
solution r r
∗ 2Kd 2 × 100 × 20, 000
Q = = = 894
h 5
79
Chapter 5
One of the most exciting developments in operations research (OR) in recent years has
been the unusually rapid advance in both the methodology and application of network
optimization models. A number of algorithmic breakthroughs have had a major impact,
as have ideas from computer science concerning data structures and efficient data manip-
ulation. Consequently, algorithms and software now are available and are being used to
solve huge problems on a routine basis that would have been completely intractable two
or three decades ago.
Many network optimization models actually are special types of linear programming
problems. For example, both the transportation problem and the assignment problem
have network representations.
80
Operations Research Jane Akinyi Aduda
5. Determining the minimum cost flow schedule from oil fields to refineries through a
pipeline network.
In this section, we discuss four important kinds of network problems and some basic ideas
of how to solve them. These are:-
Each of the first three types have a very specific structure that arises frequently in appli-
cations. The fourth type provides a unified approach to many other applications because
of its far more general structure.
A network consists of a set of nodes linked by arcs or branches and the notation used is
(N,A) where N is the set of nodes and A is the set of arcs.
81
Operations Research Jane Akinyi Aduda
G
3 5
E F
1 C H
D
2 4
Where N = {1, 2, 3, 4, 5}
and A = {(1, 2), (1, 3), (2, 3), (2, 4)(2, 5), (3, 4), (3, 5), (4, 5)}
Arcs are labeled by naming the nodes at either end; for example, AB is the arc between
nodes A and B where in our case A could be 1 and B could be 2.
Associated with each network is a flow of some type through the arcs.
A directed arc is one which allows positive flow only in one direction and zero flow
in the opposite directione.g a one way street.
An undirected arc is one which allows flow in either direction e.g. a pipeline.
A path between two nodes is a sequence of distinct arcs connecting these nodes
through other nodes regardless of thedirection of the flow in ach arc.
A path forms a cycle or a loop if it connects a node to itself through other nodes.
Two nodes are said to be connected if the network contains at least one undirected
path between them. (Note that the path does not need to be directed even if the network
is directed.) A connected network is a network where every pair of nodes is connected.
82
Operations Research Jane Akinyi Aduda
A tree is a cycle free connected network comprised of a subset of all the nodes.
A spanning tree is one that connects all nodes in the network. If a connected net-
work has n nodes, every spanning tree has exactly n − 1 arcs
3 5
2 4
The example below will be used subsequently to illustrate the approach to the first three
of these problems.
Nairobi National Park has recently been set aside for a limited amount of sight-
seeing and backpack hiking. Cars are not allowed into the park, but there is a narrow,
winding road system for trams and for jeeps driven by the park rangers. This road system
is shown in the Figure below, where location O is the entrance into the park; other letters
designate the locations of ranger stations (and other limited facilities). The numbers give
the distances of these winding roads in miles. The park contains a scenic wonder at sta-
tion T. A small number of trams are used to transport sightseers from the park entrance
to station T and back. The park management currently faces three problems.
1. To determine which route from the park entrance to station T has the smallest
83
Operations Research Jane Akinyi Aduda
total distance for the operation of the trams.(This is an example of the shortest-
path problem)
2. Telephone lines must be installed under the roads to establish telephone communi-
cation among all the stations (including the park entrance). Because the installation
is both expensive and disruptive to the natural environment, lines will be installed
under just enough roads to provide some connection between every pair of stations.
The question is where the lines should be laid to accomplish this with a minimum
total number of miles of line installed. (This is an example of the minimum spanning
tree problem)
3. More people want to take the tram ride from the park entrance to station T than
can be accommodated during the peak season. To avoid unduly disturbing the
ecology and wildlife of the region, a strict ration has been placed on the number of
tram trips that can be made on each of the roads per day. (These limits differ for
the different roads, as we shall see later) Therefore, during the peak season, various
routes might be followed regardless of distance to increase the number of tram trips
that can be made each day. The question pertains to how to route the various trips
to maximize the number of trips that can be made per day without violating the
limits on any individual road. (This is an example of the maximum flow problem)
2 2 7
5 4 5
O B D T
4 3 7
1 1
4
C E
84
Operations Research Jane Akinyi Aduda
Consider an undirected and connected network with two special nodes called the origin
and the destination. Associated with each of the links (undirected arcs) is a non-negative
distance. The objective is to find the shortest path (the path with the minimum total
distance) from the origin to the destination. The essence of this procedure is that it fans
out from the origin, successively identifying the shortest path to each of the nodes of
the network in the ascending order of their (shortest) distances from the origin, thereby
solving the problem when the destination node is reached. As a linear program, the
problem is given as:-
85
Operations Research Jane Akinyi Aduda
It deals with linking nodes of a network directly or indirectly using the shortest total
length of connecting branches, e.g. the construction of paved roads between two towns
may pass through one or more other towns. The most economical design of the road
system would call for minimizing the total miles of paved roeds.
For the minimum spanning tree problem, if we consider the problem of the Nairobi
National Park, the required property is that the chosen links must provide a path between
each pair of nodes.
1. You are given the nodes of a network but not the links. Instead, you are given the
potential links and the positive length for each if it is inserted into the network.
86
Operations Research Jane Akinyi Aduda
(Alternative measures for the length of a link include distance, cost, and time.)
2. You wish to design the network by inserting enough links to satisfy the requirement
that there be a path between every pair of nodes.
3. The objective is to satisfy this requirement in a way that minimizes the total length
of the links inserted into the network.
A network with n nodes requires only (n − 1) links to provide a path between each pair of
nodes. No extra links should be used, since this would needlessly increase the total length
of the chosen links. The (n − 1) links need to be chosen in such a way that the resulting
network (with just the chosen links) forms a spanning tree. Therefore, the problem is to
find the spanning tree with a minimum total length of the links. So the figure belows
illustrates this concept of a spanning tree for the Nairobi National Park problem. This
network is a feasible solution (with a value of 24 miles for the total length of the links)
2 2
4 5
O B D T
4 7
C E
Now recall that the third problem facing the Nairobi National Park management during
the peak season is to determine how to route the various tram trips from the park entrance
(station O) to the scenic wonder (station T) to maximize the number of trips per day.
87
Operations Research Jane Akinyi Aduda
(Each tram will return by the same route it took on the outgoing trip, so the analysis
focuses on outgoing trips only.) To avoid unduly disturbing the ecology and wildlife of
the region, strict upper limits have been imposed on the number of outgoing trips allowed
per day in the outbound direction on each individual road. For each road, the direction
of travel for outgoing trips is indicated by an arrow in the figue below. The number on
the arrow gives the upper limit on the number of outgoing trips allowed per day.
5 1 3
7 4 9
O B D T
4 5 1 6
2
4
C E
Given the limits, one feasible solution is to send 7 trams per day, with 5 using the route
O → B → E → T , 1 using O → B → C → E → T and 1 using O → B → C → E →
D → T . However, because this solution blocks the use of any routes starting with O → C
(because the E → T and E → D capacities are fully used), it is easy to find better feasible
solutions. Many combinations of routes (and the number of trips to assign to each one)
need to be considered to find the one(s) maximizing the number of trips made per day.
This kind of problem is called a maximum flow problem.
1. All flow through a directed and connected network originates at one node, called the
source, and terminates at one other node, called the sink. (The source and sink in
88
Operations Research Jane Akinyi Aduda
the Nairobi National Park problem are the park entrance at node O and the scenic
wonder at node T, respectively.)
2. All the remaining nodes are transshipment nodes. (These are nodes A, B, C, D,
and E in the Seervada Park problem.)
3. Flow through an arc is allowed only in the direction indicated by the arrowhead,
where the maximum amount of flow is given by the capacity of that arc. At the
source, all arcs point away from the node. At the sink, all arcs point into the node.
4. The objective is to maximize the total amount of flow from the source to the sink.
This amount is measured in either of two equivalent ways, namely, either the amount
leaving the source or the amount entering the sink.
The minimum cost flow problem holds a central position among network optimization
models, both because it encompasses such a broad class of applications and because it
can be solved extremely efficiently. Like the maximum flow problem, it considers flow
through a network with limited arc capacities. Like the shortest-path problem, it con-
siders a cost (or distance) for flow through an arc. Like the transportation problem or
assignment problem, it can consider multiple sources (supply nodes) and multiple desti-
nations (demand nodes) for the flow, again with associated costs. In fact, all four of these
previously studied problems are special cases of the minimum cost flow problem, as we
will demonstrate shortly. The reason that the minimum cost flow problem can be solved
so efficiently is that it can be formulated as a linear programming problem so it can be
solved by a streamlined version of the simplex method called the network simplex method.
5. Flow through an arc is allowed only in the direction indicated by the arrowhead,
where the maximum amount of flow is given by the capacity of that arc. (If flow
can occur in both directions, this would be represented by a pair of arcs pointing in
opposite directions.)
6. The network has enough arcs with sufficient capacity to enable all the flow generated
at the supply nodes to reach all the demand nodes.
7. The cost of the flow through each arc is proportional to the amount of that flow,
where the cost per unit flow is known.
8. The cost of the flow through each arc is proportional to the amount of that flow,
where the cost per unit flow is known.
9. The objective is to minimize the total cost of sending the available supply through
the network to satisfy the given demand. (An alternative objective is to maximize
the total profit from doing this.)
A project such as construction of a bridge, highway, power plant, repair and maintenance
of an oil refinery or an air plane design, development and marketing a new product, re-
search and development etc., may be defined as a collection of interrelated activities (or
tasks) which must be completed in a specified time according to a specified sequence and
require resources such as personnel, money, materials, facilities etc.
90
Operations Research Jane Akinyi Aduda
The growing complexities of todays projects had demanded more systematic and more
effective planning techniques with the objective of optimizing the efficiency of executing
the project. Efficiency here implies effecting the utmost reduction in the time required
to complete the project while accounting for the economic feasibility of using available
resources.
Project management has evolved as a new field with the development of two ana-
lytic techniques for planning, scheduling and controlling projects. These are the Critical
Path Method (CPM) and the Project Evaluation and Review Technique (PERT). PERT
and CPM are basically time-oriented methods in the sense that they both lead to the
determination of a time schedule.
Though there are no essential differences between PERT and CPM as both of them
share in common the determination of a critical path and are based on the network
representation of activities and their scheduling that determines the most critical activities
to be controlled so as to meet the completion date of the project.
1. Since PERT was developed in connection with R and D work, it had to cope with the
uncertainties associated with R and D activities. In PERT, total project duration is
regarded as a random variable and therefore associated probabilities are calculated
so as to characterise it.
91
Operations Research Jane Akinyi Aduda
4. It helps in pin pointing critical areas in a project so that necessary adjustment can
be made to meet the scheduled completion date of the project.
1. Since CPM was developed in connection with a construction project which consisted
of routine tasks whose resource requirements and duration was known with certainty,
it is basically deterministic.
2. CPM is suitable for establishing a tradeoff for optimum balancing between schedule
time and cost of the project.
Events: which are points in time that signifiy the completion of some activities and the
beginning of new ones. The beginning and end points of an activity is thus described
by 2 events usually known as the Tail and head events. Events are commonly
represented by nodes in the network diagram. They do not consume time and
Resource.
Events in the network diagram are identified by numbers. Numbers are given to events
such that arc head number must be greater than arc tail number. Activities are identified
by the numbers of their starting (tail) event and ending (head) event. An arc (i, j) extends
between two events, the tail event i representing the start and the head event j represents
the completion of the activity as shown below.
Activity
I J
The figure below shows another example, where activities (1, 3) and (2, 3) must be com-
pleted before activity (3, 4) can start.
3 4
1. Each activity is represented by one and only one arrow in the network.
2. No two activities can be identified by the same head and tail events.
3. To ensure the correct precedence relationship in the arrow diagram, the following
questions must be answered as every activity is added to the network:
(a) What activities must be completed immediately before these activity can start
?
Example 5.1. VIVA company is planning to move their operations from Nairobi to
Kisumu. The manager in charge of planning the move, wants to ensure that everything
comes off according to plan, and making sure that the deadline is met. Table 5.2 shows
a list of all the activities the manager plans.
NOTE The numbers assigned to the nodes are arbitrary. They are simply used to iden-
tify events and do not imply anything about precedence relationships. In the network
diagram each activity must start at the node in which its immediate predecessors ended.
Dummy activities can also be included to avoid problems of hanging events when drawing
the network diagram. A dummy activity in a project network analysis has zero duration.
8 9
C [3]
B [5] plan
I [5] fin. arrgt.
The application of PERT/CPM should ultimately yield a schedule specifying the start
and completion time of each activity. The arc diagram is the first step towards achieving
that goal. The start and completion times are calculated directly on the arc diagrams
using simple arithmetic. The end result is to classify the activities as critical or non
critical. An activity is said to be critical if a delay in the start of that course makes a
delay in the completion time of the entire project. A noncritical activity is such that
the time between its earliest start and its latest completion time is longer than its actual
duration. A noncritical activity is said to have a slack or float time.
A critical path defines a chain of critical activities that connects the start and end events
of the arc diagram. In other words, the critical path identifies all the critical activities of
the project. The critical path calculations include two phases.
95
Operations Research Jane Akinyi Aduda
The first phase is called the Forward Pass where all calculations begin from the start
node and move to the end node. At each node a number is computed representing the
earliest occurrence time of the corresponding event. These numbers are shown in squares
. In forward pass we note the number of heads joining the event. We take the maximum
earliest timing through these heads.
The second phase called the Backwards Pass, begins calculations from the “end”node
and moves to the “start”node. The number computed at each node is shown in a triangle
near end point which represent the latest occurrence time of the corresponding event.
Let ESi be the earliest start time of all the activities emanating from event i, i.e.
ESi represents the earliest occurrence time of event i, if i = 1 is the “start”event then
conventionally, for the critical path calculations, ESi = 0. If Dij be the duration of the
activity (i, j). Then the forward pass calculations are given by the formula:
for all defined (i, j) activities with ESi = 0. Thus in order to compute ESj for event j,
ESi for the tail events of all the incoming activities (i, j) must be computed first. With
the computation of all ESj , the forward pass calculations are completed.
The backward pass starts from the “end”event. The objective of this phase to calculate
LCi , the latest completion time for all the activities coming into the event i. Thus if i = n
is the end event LCn = ESn initiates the backward pass. In general for any node i,
for all defined activities are calculated, which ends the calculation of backward pass.
The critical path activities can now be identified by using the results of the forward
96
Operations Research Jane Akinyi Aduda
and backward passes. An activity (i, j) lies on the critical path if it satisfies the following
conditions.
1. ESi = LCi
2. ESj = LCj
These conditions actually indicate that there is no float or slack time between the earliest
stand and the latest start of the activity. Thus the activity must critical.
Example 5.2. Consider a network which stands from node 1 and terminate at node 6,
the time required to perform each activity is indicated on the arcs.
2 7 5
3 6
1 2 dummy 5 6
3 3 2
Let us consider the end 3, since there is only one incoming activity (2, 3) to event 3, with
D23 = 3
To obtain ES4 , since there are two activities (3, 4) and (2, 4) to the event 4 with D24 = 2
and D34 = 0.
= max {3 + 2, 6 + 0} = 6
LC6 = 19 = ES6
LC5 = 19 − 6 = 13
LC3 = 6, LC2 = 3 and LC1 = 0 and hence activities (1, 2), (2, 3) (3, 4) (4, 5) (5, 6) are
critical and (2, 4) (4, 6), (3, 6), are non-critical. Thus the activities (1, 2), (2, 3) (3, 4) (4, 5)
(5, 6) define the critical path which is the longest possible time to complete the project.
The analysis in CPM does not take into the case where time estimates for the different
activities are probabilistic. Also it does not consider explicitly the cost of schedules. Here
we will consider both probability and cost aspects in project scheduling. Probability
considerations are incorporated in project scheduling by assuming that the time estimate
for each activity is based on 3 different values. They are:-
a= The optimistsic time, which will be required if the execution of the project goes
extremely well.
a + b + 4m
D̄ =
6
This estimate can be used to study the single estimate D in the critical path calculation.
The variance of each activity denoted by V is defined by
2
b−a
V =
6
The earliest expected times for the node i denoted by E(µi ) for each node i is obtained by
taking the sum of expected times of all activities leading to the node i, when more than
one activity leads to a node i, then greatest of all E(µi ) is chosen. Let µi be the earliest
occurrence time of the event i, we can consider µi as a random variable. Assuming that
all activities of the network are statistically independent, we can calculate the mean and
X
the variance of the µi as follows:- E[µi ] = ESi and V ar[µi ] = Vk , Where K defines the
k
activities along the largest path leading to i. For the latest expected time, we consider
the last node.
Note: The probability distribution of times for completing an event can be approxi-
mated by the normal distribution due to central limit theorem. Since µi represents the
earliest occurrence time, event will meet a certain schedule time STi (specified by an
analyst) with probability
µi − E[µi ] STi − E[µi ]
prob (µi ≤ STi ) = prob √ ≤ √
Vi Vi
= prob (Z ≤ Ki )
where
STi − E[µi ]
Z ∼ N (0, 1) and Ki = √
Vi
99
Chapter 6
Here customer or element represents a person or machine or any other thing, which is in
need of some service from servicing point and service represents any type of attention to
the customer to satisfy his need. For example,
1. Person going to hospital to get medical advice from the doctor is an element or a
customer,
2. A person going to railway station or a bus station to purchase a ticket for the journey
is a customer or an element,
6. A machine break down and waiting for the attention of a maintenance crew.
In general we can say that a flow of customers from infinite or finite population towards
the service facility forms a queue or waiting line on account of lack of capability to serve
them all at once.
Queues or waiting lines stand for the number of customers waiting to be served.
Queue does not include the customer being served. The process or system that performs
the services to the customer is termed as service channel or service facility.
When we speak of queue, we have to deal with two elements, i.e. Arrivals and Service
facility. the entire queuing system can be completely described by:
101
Operations Research Jane Akinyi Aduda
Components of the queuing system are arrivals, the element waiting in the queue, the
unit being served, the service facility and the unit leaving the queue after service.
This describes the way in which the customers arrive and join the system. In general
customer arrival will be in random fashion, which cannot be predicted, because the cus-
tomer is an independent individual and the service organization has no control over the
customer.
Size of arrivals: This greatly depends on the nature of size of the population, which may
be infinite or finite. The arrival pattern can be more clearly described in terms of
probabilities and consequently the probability distribution for inter-arrival times i.e.
the time between two successive arrivals or the distribution of number of customers
arriving in unit time must be defined. Here we assume that customers arrive in
Poisson or Completely random fashion.
Inter-arrival time: The period between the arrival of individual customers may be con-
stant or may be scattered in some distribution fashion. Most queuing models assume
that the some inter-arrival time distraction applies for all customers throughout the
period of study. Here we assume distribution of service time follows a negative
exponential distribution
Capacity of the service system: In queuing context the capacity refers to the space
available for the arrivals to wait before taken to service. The space available may
be limited or unlimited. When the space is limited, length of waiting line crosses a
certain limit; no further units or arrivals are permitted to enter the system till some
waiting space becomes vacant.
Customer behaviour: The length of the queue or the waiting time of a customer or the
102
Operations Research Jane Akinyi Aduda
idle time of the service facility mostly depends on the behaviour of the customer.
Here the behaviour refers to the impatience of a customer during the stay in the
line. Customer behaviour can be classified as:
(i) Balking: This behaviour signifies that the customer does not like to join the
queue seeing the long length of it. This behaviour may effect in loosing a
customer by the organization. Always a lengthy queue indicates insufficient
service facility and customer may not turn out next time.
(ii) Reneging: In this case the customer joins the queue and after waiting for some
time looses his patience and leaves the queue. This behaviour of the customer
may also cause loss of customer to the organization.
(iii) Collusion: In this case several customers may collaborate and only one of
them may stand in the queue. One customer represents a group of customer.
Here the queue length may be small but service time for an individual will be
more. This may break the patience of the other customers in the waiting line
and situation may lead to any type of worst episode.
(iv) Jockeying: If there are number of waiting lines depending on the number of
service stations, for example gas stations, Cinema theatres, etc. A customer in
one of the queue after seeing the other queue length, which is shorter, with a
hope of getting the service, may leave the present queue and join the shorter
queue. Perhaps the situation may be that other queue which is shorter may be
having more number of Collaborated customers. In such case the probability
of getting service to the customer who has changed the queue may be very
less. Because of this character of the customer, the queue lengths may goes on
changing from time to time.
Service facilities are arranged to serve the arriving customer or a customer in the waiting
line is known as service mechanism. We consider
103
Operations Research Jane Akinyi Aduda
Service facility design: Arriving customers maybe asked to form a single line (Single
queue) or multi line (multi queue) depending on the service need. When they stand
in single line it is known as Single channel facility when they stand in multi lines it
is known as multi channel facility.
(i) Single channel queues: Only one unit can be served at a time, hence arriving
customers form a queue near the facility. The next element is drawn into
service only when the service of the previous customer is over.
(ii) Multi Channel queues: When the input rates increases, and the demand for
the service increases, the management will provide additional service facilities
to reduce the rush of customers or waiting time of customers. In such cases,
different queues will be formed in front of different service facilities.
Queue discipline or Service discipline: When the customers are standing in a queue,
they are called to service depending on the nature of the customer. The order in
which they are called is known as Service discipline. There are various ways in which
the customer called to serve. They are:
(i) First In First Out (FIFO) or First Come First Served (FCFS). We are quite
aware that when we are in a queue, we wish that the element which comes
should be served first, so that every element has a fair chance of getting service.
Moreover it is understood that it gives a good morale and discipline in the
queue.
(ii) Last in first out (LIFO) or Last Come First Served (LCFS). In this system, the
element that arrived last will have a chance of getting service first. In general,
this does not happen in a system where human beings are involved. But this is
quite common in Inventory system. This can also be written as First In Last
Out (FILO).
(iii) Service In Random Order (SIRO). In this case the items are called for service
in a random order. The element might have come first or last does not bother;
the servicing facility calls the element in random order without considering the
104
Operations Research Jane Akinyi Aduda
order of arrival. This may happen in some religious organizations but generally
it does not followed in an industrial / business system.
(iv) Service By Priority. Priority disciplines are those where any arrival is chosen
for service ahead of some other customers already in queue. As an example,
in a doctors clinic, when the doctor is treating a patient with stomach pain,
suddenly a patient with heart stroke enters the clinic, the doctor asks the
patient with stomach pain to wait for some time and give attention to heart
patient. This is the rule of priority.
The most important information required to solve a waiting line problem is the nature
and probability distribution of arrivals and service pattern. The answer to any waiting
line problem depends on finding:
1. Queue length: The probability distribution of queue length or the number of persons
in the system at any point of time. Further we can estimate the probability that
there is no queue.
(d) The nature and magnitude of service being given to the element being served.
105
Operations Research Jane Akinyi Aduda
4. Average idle time or Busy time distribution: The average time for which the system
remains idle. We can estimate the probability distribution of busy periods. If we
suppose that the server is idle initially and the customer arrives, he will be provided
service immediately. During his service time some more customers will arrive and
will be served in their turn according to the system discipline. This process will
continue in this way until no customer is left unattended to and the server becomes
free again after serving all the customers. At this stage we can conclude, that the
busy period is over.
A: Arrival pattern of the units, given by the probability distribution of inter-arrival time
of units. For example, Poisson distribution, and inter arrival time is 1 minute or 10
units arrive in 30 minutes etc.
B: The probability distribution of service time of individual being actually served. For
example the service time follows negative exponential distribution and 10 units are
served in 10 minutes or the service time is 3 minutes, etc.
S: The number of service channels in the system. For example the item is served at one
service facility or the person will receive service at 3 facilities etc.
d: Capacity of the system. That is the maximum number of units the system can accom-
modate at any time. For example, the system has limited capacity of 40 units or
the system has infinite capacity etc.
f : The manner or order in which the arriving units are taken into service i.e. FIFO /
LIFO / SIRO /Priority.
106
Operations Research Jane Akinyi Aduda
6.3.1 Notations
w: The waiting time for any customer before it is taken into service.
n: Number of customers in the system, (in the waiting line) at any time, including the
number of customers being served.
En : Some state of the system at a time when there are n units in the system.
λn : Average number of customers arriving per unit of time, when there are already n
units in the system.
µn : Average number of customers being served per unit of time when there are already
n units in the system.
107
Operations Research Jane Akinyi Aduda
λ
ρ= : System utility or traffic intensity which tells us how much time the system was
µ
3
utilized in a given time. For example given time is 8 hours and if ρ = , it means
8
to say that out of 8 hours the system is used for 3 hours and (8-3=5) 5 hours the
system is idle.
Formulae used
108
Operations Research Jane Akinyi Aduda
Example 6.1. A T.V. Repairman finds that the time spent on his jobs have an expo-
nential distribution with mean of 30 minutes. If he repairs sets in the order in which they
come in, and if the arrival of sets is approximately Poisson with an average rate of 10 per
8 hour day, what is repairman’s expected idle time each day? How many jobs are ahead
of the average set just brought in?
Solution
Number of sets ahead of the set just entered = Average number of sets in system
λ ρ 0.625 5
= = = = ahead of jobs just came in.
(µ − λ) (1 − ρ) 1 − 0.625 3
Example 6.2. The arrivals at a telephone booth are considered to be following Poisson
distribution with an average time of 10 minutes between one arrival and the next. Length
of the phone call is assumed to be distributed exponentially with a mean of 3 minutes.
1. What is the probability that a person arriving at the booth will have to wait?
2. What is the average length of queue that forms from time to time?
Solution
1
Data: Time interval between two arrivals = 10 minutes = , Length of phone call
λ
1 1 1
= 3 minutes = . Hence λ = = 0.1 per minute and µ = = 0.33 per minute, and
µ 10 3
109
Operations Research Jane Akinyi Aduda
λ 0.10
ρ= = = 0.3.
µ 0.33
1. Any person who is coming to booth has to wait when there is somebody in the
queue. He need not wait when there is nobody in the queue i.e. the queue is empty.
Hence the probability of that an arrival does not wait = p0 = (1 − ρ).
Hence the probability that an arrival has to wait = 1-The probability that an arrival
does not wait =(1 − p0 )1 − (1 − ρ) = ρ = 0.3. That means 30% of the time the fresh
arrival has to wait. That means that 70% of the time the system is idle.
2. Average length of non-empty queue from time to time = (Average length of the
1
waiting line with the condition that it is always greater than zero) = = 1.43
1 − 0.3
persons.
Example 6.3. In a departmental store one cashier is there to serve the customers. And
the customers pick up their needs by themselves. The arrival rate is 9 customers for every
5 minutes and the cashier can serve 10 customers in 5 minutes. Assuming Poisson arrival
rate and exponential distribution for service rate, find:
9 10
Data: Arrival rate is λ = = 1.8 customers per minute. Service rate µ = = 2
5 5
λ 1.8
customers per minute. Hence ρ = = = 0.9
µ 2
ρ 0.9 0.9
1. Average number of customers in the system E(n) = = = =9
1−ρ 1 − 0.9 0.1
customers.
1 1
2. Average time a customer spends in the system = E(v) = = = 5
µ−λ 2 − 1.8
minutes.
110
Operations Research Jane Akinyi Aduda
λ2 λ
3. Average number of customers in the queue = E(L) = = (ρ) × =
µ(µ − λ) (µ − λ)
1.8
0.9 × = 8.1 customers.
2 − 1.8
ρ λ 0.9
4. Average time a customer spends in the queue = = = =
µ(1 − ρ) µ(µ − λ) 2(1 − 0.9)
0.9
= 4.5 minutes.
0.2
Example 6.4. A branch of a bank has only one typist. Since typing work varies in length
(number of pages to be typed), the typing rate is randomly distributed approximating a
Poisson distribution with a mean service rate of 8 letters per hour. The letter arrives at
a rate of 5 per hour during the entire 8-hour workday. If the typist is valued at shs.. 150
per hour, determine:
1. Equipment utilization,
Example 6.5. A product manufacturing plant at a city distributes its products by trucks,
loaded at the factory warehouse. It has its own fleet of trucks plus trucks of a private
transport company. This transport company has complained that sometimes its trucks
have to wait in line and thus the company loses money paid for a truck and driver of
waiting truck. The company has asked the plant manager either to go in for a second
warehouse or discount prices equivalent to the waiting time. The data available is:
The transport company has provided 40% of the total number of trucks. Assuming
that these rates are random according to Poisson distribution, determine:
112