Você está na página 1de 50

OPERATIONS RESEARCH

COURSE CODE: CVS 486

LECTURE NOTES

MOI UNIVERSITY

DEPARTMENTS: CIVIL & STRUCTURAL ENGINEERING


COMPUTER ENGINEERING
OPERATIONS RESEARCH

© 2008

LECTURE NOTES 2
OPERATIONS RESEARCH

1.0 INTRODUCTION

1.1 What is Operations Research?


Operations research may be described as a scientific approach to decision making that involves
the operations of organizational systems. Operations Research (OR) has the following
outstanding characteristics:
i) As its name implies, OR involves ‘research on operations’. It is applied to problems
that concern how to conduct and coordinate the operations or activities within an
organization. The approach of OR is that of the scientific approach. In a certain
sense, OR involves creative scientific research into the fundamental properties of
operations. Specifically, it is also concerned with the practical management of the
organization. It involves on operations but without the benefit of an ivory tower.
ii) OR has a broad viewpoint. It adopts an organizational point of view and attempts to
resolve the conflicts of interest among the components of the organization in a way
that is best for the organization as a whole.
iii) It attempts to find the best or optimal solution to the problem under consideration.
iv) It uses a team approach. It requires a group of individuals having diverse
backgrounds and skills. Such an OR team typically needs to include individuals
who collectively are highly trained. The team also needs to have the necessary
experience and variety of skills to give appropriate consideration to the many
ramifications of the problem throughout the organization and to execute all the
activities of the OR study.
In summary OR is concerned with optimal decision making in, and modelling of, deterministic
and probabilistic systems that originate from real life. Its applications are largely characterised
by the need to allocate limited resources.

1.2 Origin of Operations Research


The first formal activities of OR were initiated in England during World War II when a team
of British scientists (Patrick Blackett, Cecil Gordon, C.H. Waddington, Owen Wnasbrough
and Frank Yates) set out to make decisions regarding the best utilization of war material.
Following the end of the war, the ideas advanced in military operations were adapted to
improve efficiency and productivity in the civilian sector. By 1951, OR had already taken hold

LECTURE NOTES 3
OPERATIONS RESEARCH

in Great Britain and was in the process of doing so in the United States. Since then the field
has developed very rapidly. Today, OR is a dominant and indispensable decision-making tool.

1.3 Applications of Operations Research


1) Military services – OR approach is applied to problems of national defence. It involves
tactical planning for requirements and use of weapon systems as well as problems of
allocation and integration of effort.
2) Business and Industry – it has been used successively in the solution of problems
concerned with assignment of personnel, blending of materials, distribution and
transportation, investment portfolios, planning advertising expenditures, distributing
sales effort, production scheduling, traffic congestion, servicing machines subject to
breakdown, determining the level of service of a service force, air traffic scheduling,
design of dams, inventory theory and hospital operation.

1.4 Operations Research Models


A model can be defined as a representation of a system that allows for investigation of the
properties of the system and, in some cases, prediction of future outcomes.

The solution to a decision-making problem requires identifying three components:


i) The decision alternatives.
ii) Restrictions under which the decision is made.
iii) An appropriate objective criterion for evaluating the alternatives.
In general, the first step in any OR model is the definition of the alternatives or the decision
variables of the problem. Next, the decision variables are used to construct the objective
function and the constraints of the model. OR model is usually organised in the following
general format:

Maximise or Minimise objective function


Subject to
Constraints

A solution of the model is feasible if it satisfies all the constraints. It is optimal if, in addition
to being feasible, it yields the best (maximum or minimum) value of the objective function.

LECTURE NOTES 4
OPERATIONS RESEARCH

Though OR models are designed to ‘optimise’ a specific objective criterion subject to a set of
constraints, the quality of the resulting solution depends on the accuracy of the model in
representing the real system. The optimum solution of a model is best only for that model. If
the model happens to represent the system reasonably well, then its solution is optimum also
for the real situation.

1.5 Phases of an Operations Research Study

As a decision-making tool, OR is both a science and an art. It is a science by virtue of the


embodying mathematical techniques it presents, and it is an art because the success of all the
phases that precede and succeed the solution of the mathematical model largely depends on the
creativity and experience of the OR team.

The principal phases for implementing OR in practice include:

1. Definition of the problem


2. Construction of the model
3. Solution of the model
4. Validation of the model
5. Implementation of the solution

Problem definition
This Involves defining the scope of the problem under investigation. The end result of the
investigation is to identify three principal elements of the decision, namely
i) Description of the decision alternatives,
ii) Determination of the objective of the study, and
iii) Specification of the limitations under which the modelled system operates.

Model construction
This entails translating the problem into mathematical relationships.

Model solution

LECTURE NOTES 5
OPERATIONS RESEARCH

Model solution is the simplest of all OR phases because it entails the use of well-defined
optimization algorithms. An important aspect of the model solution phase is sensitivity
analysis, which deals with obtaining additional information about the behaviour of the
optimum solution when the model undergoes some parameter changes.

Model validity
Model validity checks whether or not the proposed model does what it is supposed to do – that
is, does the model predict adequately the behaviour of the system under study? A common
method for checking the validity of a model is to compare its output with historical output
data. The model is valid if, under similar input conditions, it reproduces past performance.

Implementation
Implementation of the solution of a model involves the translation of the results into operating
instructions issued in understandable form to the individuals who will administer the
recommended system. The burden of this task lies primarily with the OR team.

Of all five phases, only phase 3 dealing with model solution is the best defined and the easiest
to implement in an OR study because it deals with mostly precise mathematical models. The
implementation of the remaining phases is more an art than it is a theory.

1.6 Mathematical Methods of Operations Research

In OR, we do not have a single general technique that solves all mathematical models that
arise in practice. Instead, the type and complexity of the mathematical model dictate the nature
of the solution method. Operations research techniques include the following:
i) Linear programming – this is the most prominent OR technique. It is designed for
models in which objective and constraint functions are strictly linear.
ii) Integer programming – in which the variables assume integer values.
iii) Dynamic programming – in which the original model can be decomposed into smaller
sub-problems.
iv) Network programming – in which the problem can be modelled as a network.
v) Nonlinear programming – in which the functions of the model are nonlinear.

LECTURE NOTES 6
OPERATIONS RESEARCH

These techniques are but a partial list of the large number of available OR tools

A peculiarity of most OR techniques is that solutions are not generally obtained in (formula-
like) closed forms. Instead, they are determined by algorithms. An algorithm provides fixed
computational rules that are applied repetitively to the problem with each repetition (called
iteration) moving the solution closer to the optimum.

Some mathematical models may be so complex that it is impossible to solve them by any of
the available optimization algorithms. In such cases, it may be necessary it abandon the search
for the optimal solution and simply seek a good solution using heuristic or rules of thumb.

LECTURE NOTES 7
OPERATIONS RESEARCH

2.0 LINEAR PROGRAMMING


2.1 Basic Concepts

Linear programming (LP) applies to optimization models in which the objective and constraint
functions are strictly linear. The word ‘programming’ does not refer here to computer
programming; rather, it is essentially a synonym for planning. Because of its tremendous
computational efficiency, LP forms the backbone of the solution algorithms for other
operations research models, including integer, stochastic, and nonlinear programming.

2.2 The Linear Programming Model


Suppose that there are any number (call it m ) of limited resources of any kind to be allocated
among any number (call it n ) of competing activities of any kind. Number labels are assigned
to the resources ( 1,2,..., m ) and activities ( 1,2,..., n ). Let x j be the level of activity j (a
decision variable) for j =1,2,... n , and let Z be the chosen overall measure of effectiveness.
Then let c j be the increase in Z that would result from each unit increase in x j (for
j =1,2,..., n ). Next, let bi denote the amount of resource i available for allocation (for
i =1,2,..., m ). Finally, define a ij as the amount of resource i consumed by each unit of
activity j (for i =1,2,..., m and j =1,2,..., n ). This set of data for linear programming
model are summarised in Table 2.1.

Table 2.1: Data for linear programming model


Activity Resource usage/unit
1 2 … n Amount of resource available
Resource

1 a11 a12 … b1
a1n
2
b2
. a 21 a 22 … .
. .
a2n
. .
. . bm
. .
m
. .

a m1 am2 …
a mn
∆Z / unit c1 c2 ...
Level cn
x1 x2 ....
LECTURE NOTES xn
8
OPERATIONS RESEARCH

The mathematical model for this general problem of allocating resources to activities can now
be formulated as follows. Select the values for x1 , x 2 ,..., x n so as to
Maximize Z = c1 x1 + c 2 x 2 + ... + c n x n
subject to
a11 x1 + a12 x 2 + ... + a1n x n ≤ b1

a 21 x 2 + a 22 x 2 +... + a 2 n x n ≤ b2

a m1 x1 + a m 2 x 2 + ... + a mn x n ≤ bm

and
x1 ≥ 0, x 2 ≥ 0,... x n ≥ 0 .

This is the standard form for the linear programming problem. The function being maximised
is called the objective function. The first m restrictions are called functional constraints. The
x j ≥ 0 restrictions are called non-negativity constraints. The x j variables are decision
variables. The input constants - aij , bi and c j - are referred to as parameters of the model.

2.3 Assumptions of Linear Programming


Assumptions of linear programming include the following:
1. Proportionality – the contribution of each decision variable in the objective function
and its requirement in the constraints is directly proportional to the level (value) of the
variables.
2. Additivity - stipulates that the total contribution of all the variables in the objective
function and their requirements in the constraints are the direct sum of the individual
contribution of each variable.
3. Divisibility – activity units can be divided into any fractional levels, so that non-integer
values for the decision variables are permissible.
4. Deterministic – all the parameters of the model are known constants.

LECTURE NOTES 9
OPERATIONS RESEARCH

2.5 Solving Linear Programming Problems


2.5.1 Graphical Solution
Graphical Method is used to solve LP problems with two (and sometimes three) decision
variables. It consists of two phases:
a) Finding the values of the decision variables for which all the
constraints are met (feasible region of the solution space).
b) Determining the optimal solution from all the points in the feasible
region (from our knowledge of the nature of the optimal solution)
In finding the feasible region, the following steps are followed:
i) Use the axis in a 2-dimensional graph to represent the values that the decision
variables can take (constructing a two-dimensional graph with x1 and
x 2 as the axes).

ii) For each constraint, replace the inequalities with equations and graph the resulting
straight line on the 2-dimensional graph.
iii) For the inequality constraints, find the side (half-space) of the graph meeting the
original conditions (evaluate whether the inequality is satisfied at the origin).
iv) Find the intersection of all feasible regions defined by all the
constraints. The resulting region is the (overall) feasible region.

To find the optimal solution, pick out the point in the feasible region that
maximizes (or minimizes) the value of the objective function z. This is
done through trial-and-error procedure which involves constructing a
family of parallel lines containing at least one point in the feasible region
and selecting the line that corresponds to the largest value of z.
Alternatively, rather than draw several parallel lines, it is sufficient to form
a single line with a ruler to establish the slope. Then the ruler is moved
with fixed slope through the feasible region in the direction of improving z
(when the objective is to minimize z, the ruler is moved in the direction
that decreases z). Movement of the ruler is stopped at the last instant that
it still passes through a point in the feasible region.

LECTURE NOTES 10
OPERATIONS RESEARCH

Example 1
A Company is planning to launch two new products. Product 1 is an 8-foot glass door with
aluminum framing and Product 2 a 4x6 foot double-hung wood-framed window.

Aluminum frames are made in Plant 1, wood frames are made in Plant 2, and Plant 3 produces
the glass and assembles the products. Product 1 requires some of the production capacity in
Plants 1 and 3, but none in Plant 2. Product 2 needs only Plants 2 and 3. The marketing
division has concluded that the company could sell as much of either product as could be
processed by these plants. The management of the company wants to determine what mixture
of both products would be the most profitable. Table 2.2 provides the information available.

Table 2.2: Data for the Company problem

Solution
Formulation as a linear programming problem
Decision variables:
x1 = Number of batches of product 1 produced per week

x 2 = Number of batches of product 2 produced per week

Objective function:
z = total profit per (in $1,000) from producing products 1 and 2
Maximize z = 3 x1 + 5 x 2 (in thousands of dollars)

Subject to:
x1 ≤ 4 (Production Available in Plant 1)
2 x 2 ≤ 12 (Production Available in Plant 2)

LECTURE NOTES 11
OPERATIONS RESEARCH

3x1 + 2 x 2 ≤ 18 (Production Available in Plant 3)


x1 , x 2 ≥ 0

Graphical solution of the problem is shown in figure 2.1.

Fig. 2.1: Graphical Solution

This solution indicates that the company should produce products 1 and 2 at the rate of 2
batches per week and 6 batches per week, respectively, with a resulting total profit of $36,000
per week.

Example 2
Alpha ltd. produces two products X and Y each requiring same production capacity. The total
installed production capacity is 9 tones per days. Alpha Ltd is a supplier of Beta Ltd, which
must supply at least 2 tons of X & 3 tons of Y to Beta Ltd every day. The production time for
X and Y is 20 machine hour per unit & 50 machine hour per unit respectively. The daily
maximum possible machine hours are 360. Profit margin for X & Y is Ksh.80 per ton and Ksh.
120 per ton respectively. Formulate as a LP model and use the graphical method of generating
the optimal solution for determining the maximum number of units of X & Y, which can be
produced by Alpha Limited.

LECTURE NOTES 12
OPERATIONS RESEARCH

Solution
Decision variables:
x1 = Number of units (in tones) of Product X.

x 2 = Number of units (in tones) of Product Y.

Objective function:
Maximize (total profit) z = 80 x1 + 120 x 2

Subject to the constraints:


x1 + x 2 ≤ 9 X1 (Supply constraint)
x1 ≥ 2 (Supply constraint)
x2 ≥ 3 (Supply constraint)
20 x1 + 50 x 2 ≤ 360 (Machine hours constraint)
and
x1 , x 2 ≥ 0

Fig. 2.2: Graphical Solution

Hence the company should produce 3 tonnes of product X and 6 tonnes of product Y in order
to achieve a maximum profit of Ksh. 960.

LECTURE NOTES 13
OPERATIONS RESEARCH

Exercise 1
A firm exports two types of machine P and Q. Type P occupies 2m3 of space and type Q, 4
m3. Type P weighs 9kgs and type Q 6kgs. The available shipping space is 1,600m3 and the
total weight of the machines cannot exceed 3,600 kgs. The profit on type P is Ksh.100 and the
profit on type Q is Ksh.80. How many of each machine must be exported to bring a maximum
profit and what is the profit. [Ans: The company should export 200 machines of type P and
300 machines of type Q to get a Maximum profit of Ksh.44,000]

Terminology for Solutions of the Linear Programming Model


Solution refers to any specification of values for the decision variables ( x1 , x 2 ,..., x n ),
regardless of whether it is 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. An infeasible
solution is a solution for which at least one constraint is violated.
The feasible region is a collection of all feasible solutions. It is possible for a problem to have
no feasible solutions. Given that there are feasible solutions, the goal of linear programming is
to find a best feasible solution, as measured by the value of the objective function in the
model.

An optimal solution is a feasible solution that has the most favourable value of the objective
function. The most favourable value is the largest value if the objective function is to be
maximized, whereas it is the smallest value if the objective function is to be minimised. Most
problems will have just one optimal solution. However, it is possible to have more than one.
Any problem having multiple optimal solutions will have an infinite number of them, each
with the same optimal value of the objective function. Another possibility is that a problem has
no optimal solutions. This occurs only if:
i) It has no feasible solutions
ii) The constraints do not prevent improving the value of the objective
function (z) indefinitely in the favourable direction (positive or
negative). This case is referred to as unbounded z.
A corner-point feasible (CPF) solution is a solution that lies at a corner of the feasible region.

LECTURE NOTES 14
OPERATIONS RESEARCH

Relationship between optimal solutions and CPF solutions


Consider any linear programming problem with feasible solutions and a bounded feasible
region. The problem must possess CPF solutions and at least one optimal solution.
Furthermore, the best CPF solution must be an optimal solution. Thus, if a problem has exactly
one optimal solution, it must be a CPF solution. If the problem has multiple optimal solutions,
at least two must be CPF solutions.

2.5.2 The Simplex method

This is a general procedure for solving linear programming problems. It has proved to be a
remarkably efficient method that is used routinely to solve large problems of today’s
computers. Except for use in tiny problems, this method is always executed on a computer.
Dantzig (1947) is credited with the first solutions to linear programming problems using the
Simplex Method.

The simplex method is an algebraic procedure. However, the underlying concepts are
geometric. From the geometric viewpoint, each constraint boundary is a line that forms the
boundary of what is permitted by the corresponding constraint. The points of intersection are
the corner-point solutions of the problem.

For any linear programming problem with n decision variables, two CPF solutions are
adjacent to each other if they share n – 1 constraint boundaries. The two adjacent CPG
solutions are connected by a line segment that lies on these same shared constraint boundaries.
Such a segment is referred to as an edge of the feasible region.

Optimality test: Consider any linear programming problem that possesses at least one optimal
solution. If a CPF solution has no adjacent CPF solutions that are better (as measured by z),
then it must be an optimal solution.

The Key Solution Concepts of the Simplex Method


Solution concept 1: The simplex method focuses solely on CPF solutions. For any problem
with at least one optimal solution, finding one requires only finding a best CPF solution.

LECTURE NOTES 15
OPERATIONS RESEARCH

Solution concept 2: The simplex method is an iterative algorithm (a systematic procedure that
keeps repeating a fixed series of steps, called iteration, until a desired result has been obtained)
with the following structure. This is illustrated in the flow chart in figure 2.3:

Initialization: Set up to start iterations, find an initial CPF solution

Optimality test: Is the current CPF solution optimal?

If no If yes Stop

Iteration: Perform an iteration to find a better CPF solution


Fig. 2.3: Simplex Method: general steps

Solution concept 3: Whenever possible, the initialization of the simplex method chooses the
origin (all decision variables equal to zero) to be the initial CPF solution.

Solution concept 4: Each time the simplex method performs an iteration to move from the
current CPF solution to a better one, it always chooses a CPF solution that is adjacent to the
current one. No other solutions are considered. Consequently, the entire path followed to
eventually reach an optimal solution is along the edges of the feasible region.

Solution concept 5: The simplex method simply identifies the rate of improvement in z that
would be obtained by moving along the edge. It chooses to move along the edge with the
largest rate of improvement in z. The method doesn’t even take time to solve for the adjacent
CPF solution.

Solution concept 6: The optimality test consists simply of checking whether any of the edges
give a positive rate of improvement in z. If none do, then the current CPF solution is optimal.

Algebraic Solution
The graphical ideas lay the foundation for the development of the algebraic simplex method.
The first step in algebraic representation of the LP solution space is to convert the functional
inequality constraints to equivalent equality constraints. The non-negativity constraints are left

LECTURE NOTES 16
OPERATIONS RESEARCH

as inequalities because they are treated separately. This conversion is accomplished by


introducing slack and/or surplus variables. To convert a ( ≤ ) inequality to an equation, a non-
negative slack variable is added to the left-hand side of the inequality. The conversion from (
≥) to ( = ) is achieved by subtracting a non-negative surplus variable from the left-hand of
the inequality.
Upon the introduction of the slack (or surplus) variables for the functional constraints, the
candidates for the optimum solution (i.e. corner points) are determined from the solution of the
simultaneous equations in the following manner: For m simultaneous linear equations and n
non-negative variables (including slack variables), set n − m variables to zero and then solve
for the remaining m variables. The resulting solution, if unique, must correspond to a corner
point of the solution space.
The n − m variables that are set to zero are known as non-basic variables. If the remaining
m variables have a unique solution, they are called basic variables and their solution is
referred to as the basic solution.
Example 3
Solve the following LP problem algebraically:

Maximize z = 2 x1 + 3 x 2
Subject to
2 x1 + x 2 ≤ 4

x1 + 2 x 2 ≤ 5

x1 , x 2 ≥ 0

Solution
Algebraically, the solution space of the LP problem is represented as:

Maximize z = 2 x1 + 3 x 2
Subject to
2 x1 + x 2 + s1 = 4

x1 + 2 x 2 + s 2 = 5

x1 , x 2 , s1 , s 2 ≥ 0

LECTURE NOTES 17
OPERATIONS RESEARCH

m = 2 equations and n = 4 variables. Set n − m = 4 – 2 = 2 variables to zero and then solve


for the remaining m = 2 variables. Thus if x1 , x 2 = 0 , then s1 = 4 and s 2 = 5 . When
s1 , s 2 = 0 , the system yields x1 = 1 and x 2 = 2 . The solution is summarised in table 2.3

Table 2.3: Algebraic solution


Non-basic Basic Basic Feasible? Objective
(zero variables) variables solution value, z
( x1 , x 2 ) ( s1 , s 2 ) (5,4) Yes 0
( x1 , s1 ) ( x2 , s 2 ) (4,-3) No -
( x1 , s 2 ) ( x 2 , s1 ) (2.5,1.5) Yes 7.5
( x2 ,s1 ) ( x1 , s 2 ) (2,3) Yes 4
( x2 , s 2 ) ( x1 , s1 ) (5,-6) No -
( s1 , s 2 ) ( x1 , x 2 ) (1,2) Yes 8 (Optimum)

The simplex method in tabular form


The tabular form of the simplex method uses a simplex tableau to compactly display the
system of equations yielding the current basic feasible solution. The solution process involves
the following:
Initialisation: introduce slack variables. Select the decision variables to be the initial non-basic
variables (set to zero) and the slack variables to be the initial basic variables.
Optimality test: the current basic feasible solution is optimal if and only if every coefficient in
row 0 is non-negative ( ≥ 0 ).
Iteration: step 1- determine the entering basic variable by selecting the non-basic variable
with the ‘most negative’ coefficient. Put a box around the column with this coefficient; this is
the pivot column.
Step 2 – determine the leaving variable by applying the minimum ration test.
Minimum ratio test:
i) Pick out each coefficient in the pivot column that is strictly positive ( ≥ 0).
ii) Divide each of these coefficients into the right side for the same row.
iii) Identify the row that has the smallest of these ratios.
iv) The basic variable for that row is the leaving variable, so replace that variable by the
entering basic variable in the basic variable column of the next simplex tableau. Put a
box around this row and call it the pivot row. Also call the number that is in both boxes
the pivot number.

LECTURE NOTES 18
OPERATIONS RESEARCH

Step 3 - solve for the new basic feasible solution by using elementary row operations to
construct a new simplex tableau, and then return to the optimality test.
Elementary row operations:
i) Divide the pivot row by the pivot number. Use this new pivot row in steps (ii) and
(iii).
ii) For each other row (including row 0) that has a negative coefficient in the pivot
column, add to this row the product of the absolute value of this coefficient and the
new pivot row.
iii) For each other row that has a positive coefficient in the pivot column, subtract from
this row the product of this coefficient and the new pivot row.
Figure 2.4,shows a summary of these steps.
Write standard max
problem in standard form
Initial simplex tableau

Stop!
Negative NO Optimal
indicators? solution

YES
Select pivot column

Stop!
Positive NO
No
elements in pivot
solution
column?
YES

Select pivot number


Perform row operation

Fig. 2.4: Simplex method in tabular form

Example 4
Solve the following LP problem using the simplex method

Maximize z = 300 x1 + 500 x 2

LECTURE NOTES 19
OPERATIONS RESEARCH

Subject to
3x1 + 2 x 2 ≤ 180

x1 ≤ 40

x 2 ≤ 60

and
x1 , x 2 ≥ 0

Solution
Arrange objective function in standard form to perform Simplex tableaus

Maximize z
Subject to
z − 300 x1 − 500 x 2 = 0 [0]
3 x1 + 2 x 2 + s1 = 180 [1]
x1 + s 2 = 40 [2]
x 2 + s 3 = 60 [3]
x1 , x 2 , s1 , s 2 , s 3 ≥ 0

Note: s1 , s 2 , s 3 are slack variables.


The simplex tableau for this problem is shown in table 2.3

LECTURE NOTES 20
OPERATIONS RESEARCH

Table 2.3: Simplex tableau

Coefficient of:
Right
Basic
Iteration Variables Eqn z x1 x2 s1 s2 s3 Side Ratio
Z 0 1 -300 -500 0 0 0 0
0 s1 1 0 3 2 1 0 0 180 90
s2 2 0 1 0 0 1 0 40 -
s3 3 0 0 1 0 0 1 60 60
z 0 1 -300 0 0 0 500 30000
1 s1 1 0 3 0 1 0 -2 60 20
s2 2 0 1 0 0 1 0 40 40
x2 3 0 0 1 0 0 1 60
Z 0 1 0 0 100 0 300 36000
2 x1 1 0 1 0 0.333333 0 -0.66667 20
s2 2 0 0 0 -0.33333 1 0.666667 20
x2 3 0 0 1 0 0 1 60

Therefore the optimal solution is x1 = 20 and x 2 = 60 , and the corresponding value of


z = 36 ,000

Example 5
Solve the following LP using the simplex method

Solution
Arrange objective function in standard form to perform Simplex tableaus

Maximize z
Subject to
z − 3x1 − 2 x 2 = 0

LECTURE NOTES 21
OPERATIONS RESEARCH

Note: s1 , s 2 are slack variables.


The simplex tableau for this problem is shown in table 2.4

Table 2.4: Simple Tableau


Basic Coefficient of:
Iteration Variables Eqn Right
Z x1 x2 s1 s2 Side
Z 0 1 -3 -2 0 0 0
s1 1 0 2 3 1 0 6
0
s2 2 0 4 2 0 1 8
Z 0 1 0 -1/2 0 3/4 6
s1 1 0 0 2 1 -1/2 2
1
X1 2 0 1 1/2 0 1/4 2
Z 0 1 0 0 1/4 5/8 6.5
2 x1 1 0 0 1 1/2 -1/4 1
x2 2 0 1 0 -1/4 3/8 1.5

The solution in this last tableau corresponds to the basis consisting of x1 and x 2 with values
1.5 and 1 respectively with z = 6.5

Applications of Linear Programming


The technique is used in a wide range of applications, including agriculture, industry,
transportation, economics, health systems, behavioural and social sciences, and the military.

LECTURE NOTES 22
OPERATIONS RESEARCH

3.0 NETWORK ANALYSIS


3.1 Terminologies
A network consists of a set of points and a set of lines connecting certain pairs of points. The
points are called nodes (or vertices) while the lines are called arcs (or links or edges or
branches).

The arcs in a network may have flow of some type through them. If flow through an arc is
allowed only in one direction, the arc is said to be a directed arc. The direction is indicated by
adding an arrow at the end of the line representing the arc. If flow through an arc is allowed in
either direction, the arc is said to be an undirected arc.

A network that has only directed arcs is called a directed network. Similarly, if all its arcs are
undirected, the network is said to be an undirected network.

A path between two nodes is a sequence of distinct arcs connecting these nodes. A directed
path from node i to node j is a sequence of connecting arcs whose direction (if any) is
toward node j , so that flow from node i to node j along this path is feasible. An
undirected path from node i to node j is a sequence of connecting arcs whose direction (if
any) can be either toward or away from node j .

The maximum amount of flow that can be carried on a directed arc is referred to as arc
capacity. A supply node (or source node) has the property that the flow out of the node
exceeds the flow into the node. The reverse case is a demand node (or sink node). A
transshipment node (or intermediate node) satisfies conservation of flow, so flow in equals
flow out.

3.2 Network Optimization Problems


The network optimization problems include:
1. The shortest path problem.
2. The minimum spanning tree problem.
3. The maximum flow problem.
4. The minimum cost flow problem.

LECTURE NOTES 23
OPERATIONS RESEARCH

5. The critical path problem.

Example: The shortest path problem.


Figure 3.1 shows a network in which O is the origin and T is the destination. Find the shortest
route from O to T.

A 7
2 2 5 T
4 D
5 B
O
7
1
3
4 1

C 4
E

Fig. 3.1: shortest path problem

Solution
The solution to the problem above is given in table 3.1. The first column indicates the iteration
count. The second column lists the solved nodes for beginning the current iteration after
deleting the irrelevant ones (those not connected directly to any unsolved node). The third
column then gives the candidate for the nth nearest node (the unsolved nodes with the shortest
connecting link to a solved node). The fourth column calculates the distance of the shortest
path from the origin to each of these candidates (namely, the distance to the solved nodes plus
the link distance to the candidate). The candidate with the smallest distance is the nth nearest
node to the origin in the fifth column. The last two columns summarise the information for this
newest solved node that is needed to proceed to subsequent iterations (namely, the distance of
the shortest path from the origin to this node and the last link on this shortest path.

LECTURE NOTES 24
OPERATIONS RESEARCH

Table 3.1: Solution of the shortest path problem


n Selected nodes Closest Total nth Minimum Last
directly connected connected distance nearest distance connection
to unsolved node unsolved involved node
node
1 O A 2 A 2 OA
2,3 O C 4 C 4 OC
A B 2+2=4 B 4 AB
4 A D 2+7=9
B E 4+3=7 E 7 BE
C E 4 + 4 =8
5 A D 2+7=9
B D 4+4=8 D 8 BD
E D 7+1=8 D 8 BD
6 D T 8 + 5 = 13 T 13 DT
E T 7 + = 14

Two alternatives for the shortest path from the origin to the destination have been identified.
There are:
O A B E D T or
O A B D T
The shortest distance is 13 units on either paths.

Network analysis (additional notes and examples)

Network analysis is the general name given to certain specific techniques which can be used
for the planning, management and control of projects. One definition of a project (from the
Project Management Institute) is a project is a temporary endeavour undertaken to create
a "unique" product or service

This definition serves to highlight some essential features of a project

• it is temporary - it has a beginning and an end


• it is "unique" in some way

Typically all projects can be broken down into:

LECTURE NOTES 25
OPERATIONS RESEARCH

• separate activities (tasks/jobs) - where each activity has an associated duration or


completion time (i.e. the time from the start of the activity to its finish)
• precedence relationships - which govern the order in which we may perform the
activities, e.g. in a project concerned with building a house the activity "erect all four
walls" must be finished before the activity "put roof on" can start

Two different techniques for network analysis were developed independently in the late 1950's
- these were:

• PERT (for Program Evaluation and Review Technique); and


• CPM (for Critical Path Management).

Modern commercial software packages tend to blur the distinction between PERT and CPM
and include options for uncertain activity completion times and project completion
time/project cost trade-off analysis. Note here that many such packages exist for doing
network analysis.

There is no clear terminology in the literature and you will see this area referred to by the
phrases: network analysis, PERT, CPM, PERT/CPM, critical path analysis and project
planning.

Network analysis is a vital technique in PROJECT MANAGEMENT. It enables us to take a


systematic quantitative structured approach to the problem of managing a project through to
successful completion

Example

A company intends to carry out a redesign of a product and its associated packaging. The O.R
team intends to test market this redesigned product and then revise it in the light of the test
market results, finally presenting the results to the Board of the company.

The key question is: How long will it take to complete this project?

The O.R team identified the following list of separate activities together with their associated
completion times (assumed known with certainty).

Activity Completion
number time (weeks)
1 Redesign product 6
2 Redesign packaging 2
3 Order and receive components for redesigned product 3
4 Order and receive material for redesigned packaging 2
5 Assemble products 4
6 Make up packaging 1
7 Package redesigned product 1
8 Test market redesigned product 6
9 Revise redesigned product 3
10 Revise redesigned packaging 1
11 Present results to the Board 1

LECTURE NOTES 26
OPERATIONS RESEARCH

Next, the precedence relationships indicating activities which, because of the logic of the
situation, must be finished before other activities can start e.g. in the above list activity number
1 must be finished before activity number 3 can start. It is important to note that, for clarity,
we try to keep this list to a minimum by specifying only immediate relationships, which are
relationships involving activities that "occur near to each other in time".

Activity Activity
number number
1 must be finished before 3 can start
2 4
3 5
4 6
5,6 7
7 8
8 9
8 10
9,10 11

The key to constructing this table is, for each activity in turn, to ask the question:

"What activities must be finished before this activity can start"

Note here that:

• activities 1 and 2 do not appear in the right hand column of the above table, this is
because there are no activities which must finish before they can start, i.e. both
activities 1 and 2 can start immediately
• two activities (5 and 6) must be finished before activity 7 can start
• it is plain from this table that non-immediate precedence relationships (e.g. "activity 1
must be finished before activity 9 can start") need not be included in the list since they
can be deduced from the relationships already in the list.

This can be used to answer the question,

What is the minimum possible time in which we can complete this project?

Network diagram construction

The network diagram we construct is different depending upon whether we are going to use an
activity on node or an activity on arc network.

Network analysis - activity on arc

Each arc represents an activity and is labelled with the activity number and the associated
completion time (shown in brackets after the activity number). This network is an activity on
arc (AOA) network. The nodes of the network represent the start (and end) of activities and are
regarded as events.

LECTURE NOTES 27
OPERATIONS RESEARCH

Dummy activities often have a zero completion time and are used to represent precedence
relationships that cannot be easily (if at all) represented using the actual activities involved in
the project. By convention dummies are always shown as dotted arcs in network
diagrams.

Network analysis - algorithm

Consider the network for the problem above,

LECTURE NOTES 28
OPERATIONS RESEARCH

Earliest time calculation: Let Ei represent the earliest time by which we can reach node i such
that all its preceding activities have been finished. We calculate the values of the Ei
(i=1,2,...,10) by going forward, from left to right, in the network diagram.

To ease the notation let Tij be the activity completion time associated with the arc from node i
to node j (e.g. T56 = 1). Then the Ei are given by:

E1 = 0 (assuming we start at time zero)


E2 = E1 + T12 = 0 + 6 = 6
E3 = E2 + T23 = 6 + 3 = 9
….
E7 = E6 + T67 = 13 + 1 = 14
E8 = E7 + T78 = 14 + 6 = 20

E9 = E8 + T89, but here we have two activities running from node 8 to node 9 (activity 9 of
duration 3 and activity 10 of duration 1) so:

E9 = max[E8 + 3, E8 + 1] = max[20 + 3, 20 + 1] = 23

E10 = E9 + T9,10 = 23 + 1 = 24

Hence E10 = 24 and this represents the earliest time we can reach node 10 with all preceding
activities finished i.e. 24 (weeks) is the minimum time needed to complete all the activities
and hence is the minimum overall project completion time.

Note here that the formal definition of the earliest times is given by:

Ej = max[Ei + Tij | i one of the nodes linked to j by an arc from i to j]

Latest times calculation

Let Li represent the latest time we can leave node i and still complete the project in the
minimum overall completion time. We calculate the values of the Li (i=1,2,...,10) by going
backward, from right to left, in the network diagram. Hence:

L10 = E10 = 24 (the minimum overall completion time)


L9 = L10 - T9,10 = 24 - 1 = 23

L8 = L9 - T89, but here we have two activities running from node 8 to node 9 (activity 9 of
duration 3 and activity 10 of duration 1) so:

L8 = min[L9 - 3, L9 - 1] = min[23 - 3, 23 - 1] = 20
L7 = L8 - T78 = 20 - 6 = 14
L6 = L7 - T67 = 14 - 1 = 13
L5 = L6 - T56 = 13 - 1 = 12
L4 = L5 - T45 = 12 - 2 = 10

LECTURE NOTES 29
OPERATIONS RESEARCH

L3 = L6 - T36 = 13 - 4 = 9
L2 = L3 - T23 = 9 - 3 = 6
L1 = min[L4 - T14, L2 - T12] = min[10 - 2, 6 - 6] = 0

The formal definition of the latest times is given by:

Li = min[Lj - Tij | j one of the nodes linked to i by an arc from i to j]

Note that as a check that we have done both the earliest start times and latest start times
calculations correctly we have:

• all latest start times must be >= 0


• at least one node must have a latest start time of zero

Float

Consider an activity running (in the network diagram) from node i to node j. The earliest we
can start that activity is Ei and since it takes Tij to complete the earliest we can finish it is Ei +
Tij. But Lj is the latest we must leave node j to avoid increasing the overall project completion
time and hence Lj - (Ei + Tij) is the amount of slack or float time available. Formally: Fij = Lj -
(Ei + Tij) = Lj - Ei - Tij is the amount by which we can increase the time taken to complete the
activity represented on the network diagram by the arc from node i to node j without changing
(increasing) the overall project completion time. Hence we can form the table below:

Activity i j Lj Ei Tij Float Fij


1 1 2 6 0 6 0
2 1 4 10 0 2 8
3 2 3 9 6 3 0
4 4 5 12 2 2 8
5 3 6 13 9 4 0
6 5 6 13 4 1 8
7 6 7 14 13 1 0
8 7 8 20 14 6 0
9 8 9 23 20 3 0
10 8 9 23 20 1 2
11 9 10 24 23 1 0

Any activity with a float of zero is critical. Note here that, as a check, all float values should be
>= 0 and that these float values are the same as those derived by the package.

The easiest way to remember how to do the float calculation in AOA networks is by:

Latest time at the activity end node - Earliest time at the activity start node -
Activity time

Note in particular how whether an activity is critical or not CANNOT be reliably deduced
from whether the earliest and latest times coincide at the start and end nodes (unlike AON
networks). For example consider nodes 8 and 9 in the above network - they both have earliest

LECTURE NOTES 30
OPERATIONS RESEARCH

and latest times that are identical, with two activities between them - yet only one of those
activities is critical.

Example 2

The table below defines the activities within a small project.

Activity Start End Completion time


node node (weeks)
1 1 2 2
2 1 3 4
3 2 4 7
4 3 4 3
5 3 5 7
6 4 5 3
7 5 6 4
8 4 6 6
9 6 7 2
10 4 7 7

In addition to the above information, activity five cannot start until three weeks after the end of
activity one.

• Draw the network diagram.


• Calculate the minimum overall project completion time.
• Calculate the float time for each activity and hence identify the critical path.

Comment on the potential effect upon the overall project completion time (and the critical
path) of:

• Cutting the completion time of activity eight by three weeks?


• Increasing the completion time of activity four by two weeks?
• Cutting the completion time of activity seven by two weeks?

Will the project finish on time if at the end of six weeks the status of the project is:

• Finished - activities one, two and four


• In progress - activity three (five weeks to completion) and activity five (four weeks to
completion)

Solution

The network diagram is shown below. Note the introduction of node 8 and the two dummy
activities 11 and 12 to correctly represent the condition that activity five cannot start until 3
weeks after the end of activity one.

LECTURE NOTES 31
OPERATIONS RESEARCH

We then have the following calculation of earliest start times to determine the minimum
overall project completion time.

E1 = 0 (by definition)
E2 = E1 + T12 = 0 + 2 = 2
E3 = E1 + T13 = 0 + 4 = 4
E4 = max[E2 + T24, E3 + T34] = max[2 + 7, 4 + 3] = 9

Now we obviously need to calculate E8

E8 = max[E2 + T28, E3 + T38] = max[2 + 3, 4 + 0] = 5


E5 = max[E4 + T45, E8 + T85] = max[9 + 3, 5 + 7] = 12
E6 = max[E4 + T46, E5 + T56] = max[9 + 6, 12 + 4] = 16
E7 = max[E6 + T67, E4 + T47] = max[16 + 2, 9 + 7] = 18

Hence the minimum overall project completion time is 18 weeks.

To determine the float times and which activities are critical we need to work out the latest
start times.

L7 = 18 (by definition)
L6 = L7 - T67 = 18 - 2 = 16
L5 = L6 - T56 = 16 - 4 = 12
L4 = min[L7 - T47, L6 - T46, L5 - T45] = min[18-7,16-6,12-3] = 9

We now need to calculate L8

L8 = L5 - T85 = 12 - 7 = 5
L3 = min[L4 - T34, L8 - T38] = min[9 - 3, 5 - 0] = 5

LECTURE NOTES 32
OPERATIONS RESEARCH

L2 = min[L4 - T24, L8 - T28] = min[9 - 7, 5 - 3] = 2


L1 = min[L2 - T12, L3 - T13] = min[2 - 2, 5 - 4] = 0

and note that L1 = 0 as required.

To calculate the float times we use the equation Fij = Lj - Ei - Tij to get

Activity i j Lj Ei Tij Fij


1 1 2 2 0 2 0
2 1 3 5 0 4 1
3 2 4 9 2 7 0
4 3 4 9 4 3 2
5 8 5 12 5 7 0
6 4 5 12 9 3 0
7 5 6 16 12 4 0
8 4 6 16 9 6 1
9 6 7 18 16 2 0
10 4 7 18 9 7 2
11 2 8 5 2 3 0
12 3 8 5 4 0 1

Note here that all float times are >= 0 as required.

Hence the critical activities (those with a float of zero) are 1,3,5,6,7,9 and 11. This means that
there are two critical paths, namely 1-11-5-7-9 and 1-3-6-7-9.

• activity eight is not critical, therefore cutting its completion time has no effect upon the
overall project completion time or on the critical paths
• activity four has a float time of 2 weeks so increasing its completion time by 2 weeks
does not effect the overall project completion time. However activity four will then
become critical so the critical paths will be effected.
• activity seven is critical so cutting its completion time by 2 weeks may reduce the
overall project completion time. In fact as activity seven appears in all (both) critical
paths we can be sure that the overall project completion time will be reduced by at
least one time unit (week). The critical paths may, or may not, be effected.

After six weeks the new network diagram is shown below.

LECTURE NOTES 33
OPERATIONS RESEARCH

The earliest start time calculation is

E1 = 0 (by definition)
E4 = E1 + T14 = 0 + 5 = 5
E5 = max[E1 + T15, E4 + T45] = max[0 + 4, 5 + 3] = 8
E6 = max[E5 + T56, E4 + T46] = max[8 + 4, 5 + 6] = 12
E7 = max[E6 + T67, E4 + T47] = max[12 + 2, 5 + 7] = 14

Hence the minimum overall completion time for the remaining part of the project is 14 weeks.

As 6 weeks have already elapsed this means that we cannot finish the complete project before
week 20, i.e. so far we have slipped 2 weeks upon the original completion time of 18 weeks
and there is no possibility of the project finishing upon time.

Example 3 (shortest path/spanning tree)

A company is considering building a gas pipeline to connect 7 wells (A,B,...,G) to a process


plant H. The possible pipelines that they can construct and their costs are listed below.

Pipeline Cost (kshs'0000) Pipeline Cost (kshs'0000)


AB 23 CG 10
AE 17 DE 14
AD 19 DF 20
BC 15 EH 28
BE 30 FG 11
BF 27 FH 35

What pipelines do you suggest be built and what is the total cost of your suggested pipeline
network.

Solution

The graph is shown below.

LECTURE NOTES 34
OPERATIONS RESEARCH

Solving by starting with the shortest (least cost) link, we have:

Link Cost Decision


CG 10 add to tree
FG 11 add to tree
DE 14 add to tree
BC 15 add to tree
AE 17 add to tree
AD 19 reject as forms circuit ADE
DF 20 add to tree
AB 23 reject as forms circuit ABCGFDE
BF 27 reject as forms circuit BFGC
EH 28 add to tree

Stop as 7 links have been added and these are all we need for the SST of a graph with 8 nodes.

Hence the SST has total cost 115 (kshs'000) and is as shown below.

LECTURE NOTES 35
OPERATIONS RESEARCH

5.0 INVENTORY MODELS


The application of operations research in inventory management (sometimes referred to as
scientific inventory management) comprises the following steps:
1. Formulation of a mathematical model.
2. Seeking an optimal inventory policy.
3. Use of a computerised information processing system to maintain a record of the
current inventory.
4. Use of this record of current inventory levels, apply optimal inventory policy to signal
when and how much to replenish inventory.
There are two decisions to be made for every item in the inventory:
a) How much of an item to order when the inventory is to be replenished.
b) When to replenish the inventory of the item.

Components of Inventory Models


Because inventory policies affect profitability, the choice among policies depends on their
relative profitability. Among the relevant factors affecting profitability:
1. cost of ordering or manufacturing,
2. holding cost,
3. shortage cost,
4. revenues,
5. salvage cost and
6. discount rates are the most important
Cost of ordering or manufacturing

The cost of ordering or manufacturing an amount z can be represented by a function c( z ) .


The function c ( z ) may be composed of two parts: a term that is directly proportional to the
amount ordered and a term that is a constant k for z positive and is zero for z = 0 i.e.

 0, z = 0
c( z) = 
 k + c(z) z,  0

LECTURE NOTES 36
OPERATIONS RESEARCH

where k is set-up cost


c is unit cost

Holding (storing cost)

This represents all the costs associated with the storage of the inventory until it is sold or used.
The costs include capital tied up, space, insurance, and taxes. These costs may be a function of
the cumulated excess of supply over the demand of maximum quantity held during the period.

Shortage cost

Shortage cost is incurred when the amount of the commodity required (demand) exceeds the
available stock. If any excess demand over available stock occurs either:
i) The excess demand is met by a priority shipment or
ii) The shortage cost can be viewed as the loss in current revenue from not meeting
the demand plus the cost of losing future business because of lost goodwill.

5.1. 4 Revenue
Revenue may or may not be included in the model. If both the price and the demand for the
product are established by the market and therefore outside the control of the company, the
revenue from sales (assuming demand is met), is independent of the firm’s inventory policy.
However, the loss in revenue must be included in the shortage cost whenever the firm cannot
meet the demand and the sale is lost.

Salvage (value) cost

Salvage value of an item is the value of the leftover item when no further inventory is desired.
This value represents the disposal value of the item. If there is a value associated with the
disposal of an item it is known as salvage cost.

5.1.6 Discount rate


Discount rate takes care of time value of money. When a firm ties up capital in inventory the
firm cannot use this money for alternative purposes.(additional notes, --the order quantity)

LECTURE NOTES 37
OPERATIONS RESEARCH

5.2 Classification of Inventory models


Mathematical inventory models can be classified as:
i) Deterministic models – when demand can be forecast with considerable precision.
ii) Stochastic models – when demand cannot be predicted very well.
Another classification refers to whether the current inventory level is being monitored
continuously or periodically. In continuous review an order is placed as soon as the stock level
falls below the prescribed re-order point, whereas in periodic review the inventory is checked
at discrete intervals e.g. at the end of each week and ordering decisions are made at these times
even if the inventory level falls below the re-order point between the preceding and current re-
order times.

5.3 Basic Economic Order Quantity (EOQ) Model


The basic EOQ model, sometimes referred to as the economic lot-size model, makes the
following assumptions:
1. A known constant demand rate of a units per unit time.
2. The order quantity (Q) to replenish inventory arrives all at once when desired, namely,
when the inventory level drops to 0.
3. Planned shortages are not allowed.
The time between consecutive replenishments of inventory is referred to as a cycle.

For the basic EOQ model to be presented first, the only costs to be considered are:
k = Set-up cost for producing 1 batch
c = Unit cost for producing each unit
h = Holding cost per unit of time held in the inventory,
The objective is to determine when and by how much to replenish inventory so as to minimise
the sum of these costs.

Figure 3.1 depicts the resulting pattern of inventory levels over time when Q units are ordered
at time 0 in order to increase the initial inventory level from 0 to Q and then this process is
repeated each time the inventory level drops back down to 0.

LECTURE NOTES 38
OPERATIONS RESEARCH

Fig. 3.1: Inventory level as a function of time for the basic EOQ model

The total cost per unit time T is obtained from the following components:

Production or ordering cost per cycle = K + cQ


where K – set-up cost for ordering one batch,
c – unit cost for producing or purchasing each unit,
Q – batch size
The average inventory level during a cycle is (Q + 0) / 2 = Q / 2 units and the corresponding
cost is hQ / 2 per unit time. The cycle length is Q / a
where h – holding cost per unit per unit of time held in
inventory,
a - units per unit time
hQ 2
Holding cost per unit cycle =
2a
Therefore,
hQ 2
Total cost per cycle = K + cQ +
2a
So the total cost per unit time is
K + cQ + hQ 2 /( 2a 2 ) aK hQ
T = = + ac +
Q/a Q 2

The value of Q , say Q * , that minimizes T is found by setting the first derivative to

zero (and noting that the second derivative is negative).

LECTURE NOTES 39
OPERATIONS RESEARCH

dT aK h
=− 2 + =0
dQ Q 2

so that
2aK
Q* = ,
h

which is Economic Order Quantity (EOQ) Model. The corresponding cycle time , say t * , is
Q* 2K
t* = =
a ah

Example 5.1
A television manufacturing company produces its own speakers, which are used in the
production of its television sets. The television sets are assembled on a continuous production
line at a rate of 8, 000 per month, with one speaker needed per set. The speakers are produced
in batches because they do not warrant setting up a continuous production line, and relatively
large quantities can be produced in a short time. Therefore, the speakers are placed into
inventory until they are needed for assembly into television sets on the production line. The
company is interested in determining when to produce a batch of speakers and how many per
batch. The costs to be considered are:
1. Each time a batch is produced, a setup cost of 12, 000 is incurred.
2. The unit production cost of a single speaker is 10.
3. The estimated holding cost of keeping a speaker is 0.30 per month.
4. A shortage of speakers occasionally crops up, and it has been estimated that each speaker
that is not available when required costs 1.10 per month.
Determine the value of the inventory level Q = Q* that minimizes the total cost per unit time.

Solution
Derivation of the value of the inventory level Q = Q* that minimizes the total cost per unit
time (given above).

K =12 ,000 , h = 0.30 , a = 8,000

so that

LECTURE NOTES 40
OPERATIONS RESEARCH

(2)( 8,000 )(12 ,000 )


Q* = = 25 .298
0.30
and
25 .298
t* = = 3.2 months
8,000

hence the optimal solution is to set up the production facilities to produce 25.298 speakers
every 3.2 months. (24, 000 speakers every 3 months would be nearly optimal).

Example 5.2
An industry needs 5400 units/year of a bought-out component which will be used in its main
product. The ordering (set-up) cost is Ksh. 250 per order and the carry (holding) cost per unit
per year is Ksh. 30. Find:
i) The economic order quantity.
ii) The number of orders per year.
iii) The time between successive orders.
[Ans: 300 units, 18, 0.0556 year]

6.0 DECISION ANALYSIS

LECTURE NOTES 41
OPERATIONS RESEARCH

Decision analysis provides a framework and methodology for rationale decision making in the
context of the short-term i.e. what to do in the immediate future. However, random factors
exist that create some uncertainty about each of the alternative course of action.

In order to make a decision, one can apply any of the following three methods:
1. The maximum payoff criterion.
2. The maximum likelihood criterion.
3. Baye’s decision rule.
The application of these criteria is illustrated using the following example:

Example 6.1
ABC Company owns a piece of land which is thought to contain oil in a 1 in 4 chance. An oil
company has offered to purchase the land for 90. However, ABC is considering holding the
land in order to drill for oil itself. If oil is found, the company’s expected profit will be 700. A
loss of 100 will be incurred if the land is dry (meaning no oil). This company is operating
without much capital so a loss of 100 will be quite serious. What does the company have to do
to be in better off?

6.1 The Maximum Payoff Criterion


This criterion states that for each of the action, find the minimum payoff over all possible states
of nature. Next, find the maximum of these minimum payoffs. Choose the action whose
minimum payoff gives this maximum. Table 6.1 shows the application of this criterion to the
example.

Since the minimum payoff for action a 2 (90) is larger than that for a1 (-100), action a 2 (sell
the land) will be chosen. This criterion provides the best guarantee of the payoff that will be
obtained.

Table 6.1: Maximum payoff criterion

LECTURE NOTES 42
OPERATIONS RESEARCH

State of nature θ1 θ2
Action Minimum
Oil Dry

a1 : Drill for oil 700 -100 -100


a 2 : Sell the land 90 90 90

Prior probability 0.25 0.75

Regardless of what the true state of nature turns out to be, for example, the payoff from a 2
cannot be less than 90. This criterion is extremely conservative since it assumes that nature is
a conscious component wanting to inflict as much damage as possible. Thus, it is of interest
only to a very cautious decision maker.

6.2 The Maximum Likelihood Criterion


Identify the most likely state of nature (the one with the largest prior probability). For this state
of nature, find the action with the maximum payoff. Choose this action. Table 6.2 shows the
decision analysis using this criterion.

Table 6.2: Maximum likelihood criterion


State of nature θ1 θ2
Action
Oil Dry

a1 : Drill for oil 700 -100


a 2 : Sell the land 90 90

Prior probability 0.25 0.75

State of nature θ2 has the largest prior probability. In this column action a 2 has a maximum
payoff. So the choice is to sell the land.

This action is appealing because the maximum or the most important state of nature is the
most likely one. So the action chosen is the best one for the most important state of nature.

LECTURE NOTES 43
OPERATIONS RESEARCH

Its major drawback is that it completely ignores much relevant information because no state of
nature is considered other than the most likely one.

6.3 Bayes’s Decision Rule


This decision rule states that using the best available estimates of the probabilities of the
respective states of nature, calculate the expected value of the payoff for each of the possible
actions. Choose the action with the maximum expected payoff. The expected payoffs are
calculated as follows:
For action a1 : E [P ( a1 , ө)] = 0.25(700) + 0.75(-100) = 100
For action a 2 : E [P ( a 2 , ө)] = 0.25(90) + 0.75(90) = 90
Since 100 is larger than 90, the action selected is action a1 (drill for oil).

The advantage of this decision rule is that it incorporates all the available information
including all the payoffs and the best available estimates of the probabilities of the respective
states of nature. It is therefore the best approach compared to the other two.

LECTURE NOTES 44
OPERATIONS RESEARCH

7.0 QUEUING THEORY

7.1 Introduction

Queuing theory deals with problems which involve queuing (or waiting). Typical examples
might be:

• banks/supermarkets - waiting for service

• computers - waiting for a response

• failure situations - waiting for a failure to occur e.g. in a piece of machinery

• public transport - waiting for a train or a bus

As we know queues are a common every-day experience. Queues form because resources are
limited. In fact it makes economic sense to have queues. For example how many supermarket
tills you would need to avoid queuing? How many buses or trains would be needed if queues
were to be avoided/eliminated?

In designing queuing systems we need to aim for a balance between service to customers
(short queues implying many servers) and economic considerations (not too many servers).

In essence all queuing systems can be broken down into individual sub-systems consisting of
entities queuing for some activity (as shown below).

Typically we can talk of this individual sub-system as dealing with customers queuing for
service. To analyze this sub-system we need information relating to:

• arrival process:

o how customers arrive e.g. singly or in groups (batch or bulk arrivals)

o how the arrivals are distributed in time (e.g. what is the probability distribution
of time between successive arrivals (the inter-arrival time distribution))

LECTURE NOTES 45
OPERATIONS RESEARCH

o whether there is a finite population of customers or (effectively) an infinite


number

The simplest arrival process is one where we have completely regular arrivals
(i.e. the same constant time interval between successive arrivals). A Poisson
stream of arrivals corresponds to arrivals at random. In a Poisson stream
successive customers arrive after intervals which independently are
exponentially distributed. The Poisson stream is important as it is a convenient
mathematical model of many real life queuing systems and is described by a
single parameter - the average arrival rate. Other important arrival processes are
scheduled arrivals; batch arrivals; and time dependent arrival rates (i.e. the
arrival rate varies according to the time of day).

• service mechanism:

o a description of the resources needed for service to begin

o how long the service will take (the service time distribution)

o the number of servers available

o whether the servers are in series (each server has a separate queue) or in parallel
(one queue for all servers)

o whether pre-emption is allowed (a server can stop processing a customer to deal


with another "emergency" customer)

Assuming that the service times for customers are independent and do not
depend upon the arrival process is common. Another common assumption
about service times is that they are exponentially distributed.

• queue characteristics:

o how, from the set of customers waiting for service, do we choose the one to be
served next (e.g. FIFO (first-in first-out) - also known as FCFS (first-come first
served); LIFO (last-in first-out); randomly) (this is often called the queue
discipline)

o do we have:

LECTURE NOTES 46
OPERATIONS RESEARCH

 balking (customers deciding not to join the queue if it is too long)

 reneging (customers leave the queue if they have waited too long for
service)

 jockeying (customers switch between queues if they think they will get
served faster by so doing)

 a queue of finite capacity or (effectively) of infinite capacity

Changing the queue discipline (the rule by which we select the next customer to
be served) can often reduce congestion. Often the queue discipline "choose the
customer with the lowest service time" results in the smallest value for the time
(on average) a customer spends queuing.

Note here that integral to queuing situations is the idea of uncertainty in, for example, inter-
arrival times and service times. This means that probability and statistics are needed to analyze
queuing situations.

In terms of the analysis of queuing situations the types of questions in which we are interested
are typically concerned with measures of system performance and might include:

• How long does a customer expect to wait in the queue before they are served, and how
long will they have to wait before the service is complete?

• What is the probability of a customer having to wait longer than a given time interval
before they are served?

• What is the average length of the queue?

• What is the probability that the queue will exceed a certain length?

• What is the expected utilisation of the server and the expected time period during
which he will be fully occupied (remember servers cost us money so we need to keep
them busy). In fact if we can assign costs to factors such as customer waiting time and
server idle time then we can investigate how to design a system at minimum total cost.

These are questions that need to be answered so that management can evaluate alternatives in
an attempt to control/improve the situation. Some of the problems that are often investigated in
practice are:

LECTURE NOTES 47
OPERATIONS RESEARCH

• Is it worthwhile to invest effort in reducing the service time?

• How many servers should be employed?

• Should priorities for certain types of customers be introduced?

• Is the waiting area for customers adequate?

In order to get answers to the above questions there are two basic approaches:

• analytic methods or queuing theory (formula based); and

• Simulation (computer based).

The reason for there being two approaches (instead of just one) is that analytic methods are
only available for relatively simple queuing systems. Complex queuing systems are almost
always analyzed using simulation (more technically known as discrete-event simulation).

The simple queuing systems that can be tackled via queuing theory essentially:

• consist of just a single queue; linked systems where customers pass from one queue to
another cannot be tackled via queuing theory

• have distributions for the arrival and service processes that are well defined (e.g.
standard statistical distributions such as Poisson or Normal); systems where these
distributions are derived from observed data, or are time dependent, are difficult to
analyse via queuing theory

The first queuing theory problem was considered by Erlang in 1908 who looked at how large a
telephone exchange needed to be in order to keep to a reasonable value the number of
telephone calls not connected because the exchange was busy (lost calls). Within ten years he
had developed a (complex) formula to solve the problem.

7.2 Queuing Notation and a Simple Example

It is common to use to use the symbols:

• lambda to be the mean (or average) number of arrivals per time period, i.e. the mean
arrival rate

• µ to be the mean (or average) number of customers served per time period, i.e. the
mean service rate

LECTURE NOTES 48
OPERATIONS RESEARCH

N - Number of customers in the system

C - Number of servers in the system

Pn(t) - Probability of having n-customers in the system at time t

Pn - Steady state probability of having n-customers in the system

Po - Probability of having no customers in the system

Lq - Average number of customers waiting in the queue

Ls – Average number of customers waiting in the system

Wq – Average waiting time of customers in the queue

Ws – Average waiting time of customers in the system

λ – Arrival rate of customers

μ – Service rate of server

ρ – Utilization rate of the server defined as a ratio of λ and μ (λ<μ)

M – Poisson arrival

G.D – general discipline for service

There is a standard notation system to classify queuing systems as A/B/C/D/E, where:

• A represents the probability distribution for the arrival process

• B represents the probability distribution for the service process

• C represents the number of channels (servers)

• D represents the maximum number of customers allowed in the queuing system (either
being served or waiting for service)

• E represents the maximum number of customers in total

Common options for A and B are:

• M for a Poisson arrival distribution (exponential inter-arrival distribution) or a


exponential service time distribution

• D for a deterministic or constant value

LECTURE NOTES 49
OPERATIONS RESEARCH

• G for a general distribution (but with a known mean and variance)

If D and E are not specified then it is assumed that they are infinite.

For example the M/M/1 queuing system, the simplest queuing system, has a Poisson arrival
distribution, an exponential service time distribution and a single channel (one server).

Note here that in using this notation it is always assumed that there is just a single queue
(waiting line) and customers move from this single queue to the servers.

7.3 Kendall’s Notation (A/B/C/) :( D/E)

Using Kendall’s notation, the queuing model is defined as above; e.g. (M/M/1) :( ∞/FCFS)
means that arrivals follow Poisson distribution, Poisson Service rate, single server,
system can accommodate infinite number of customers and service discipline is first
come first served.

Simple M/M/1 example

Suppose we have a single server in a shop and customers arrive in the shop with a Poisson
arrival distribution at a mean rate of lambda=0.5 customers per minute, i.e. on average one
customer appears every 1/lambda = 1/0.5 = 2 minutes. This implies that the inter-arrival times
have an exponential distribution with an average inter-arrival time of 2 minutes. The server has
an exponential service time distribution with a mean service rate of 4 customers per minute,
i.e. the service rate µ=4 customers per minute. As we have a Poisson arrival rate/exponential
service time/single server we have a M/M/1 queue in terms of the standard notation.

LECTURE NOTES 50

Você também pode gostar