Professional Documents
Culture Documents
COURSE
MODELS IN OPERATIONS RESEARCH (OR)
1
1.0. INTRODUCTION
1.1 Origin of Operations Research
The roots of OR can be traced back many decades when early attempts were made to use
scientific approach in management of organizations. However, the beginning of the activity
called OR has generally been attributed to the military service in early World War II. Because of
the war effect, 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 the Americans management called upon a large number of scientists to apply
scientific approach to dealing with this situation. In effect, they were asked to do research on
(military) operations
These teams of scientists were the first Operations Research teams. Their efforts allegedly were
instrumental in winning the Air Battle of Britain, the Island campaign in the Pacific, the battle of
the North Atlantic, etc. Spurred on by the success of OR in the military, industry gradually
became interested in the new field.
Two factors played a key role in the rapid growth of OR during the period:
The substantial progress that was made early in improving the techniques available to OR.
Many of the standard tools for OR e.g. Linear Programming, Dynamic Programming,
Queuing Theory and Inventory Theory were relatively developed.
The onslaught of the computer revolution: the development of the electronic digital
computers with their ability to perform arithmetical calculations thousand times faster than a
human being can, was a tremendous boom to OR.
The approach of OR is that of scientific method. In particular, the process begins by carefully
observing and then constructing 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, so that the conclusions
(solutions) obtained from the model are also valid for the real problem. This hypothesis is then
modified and verified by suitable experimentation. Thus, in a certain sense, OR involves a
creative scientific research into the fundamental properties of operations. Specifically, OR is
concerned with the practical management of organization
An additional characteristics of OR is that it attempts to find the best or optimal solution to the
problem under consideration rather than being content with merely improving the status quo.
The goal is to identify the best possible course of action
2
i. Formulate the problem.
ii. Observe the system
iii. Formulate a mathematical model of the problem
iv. Verify the model and use the model for prediction
v. Select a suitable alternative.
vi. Present the results and conclusions of the study to the organization.
vii. Implement and evaluate the recommendations.
In this essay, I will discuss three linear models. These models are:
Linear Programming Model
Transportion Model
Assignment Model
Linear programming deals with the problem of allocating scarce resources among competing
activities in an optimal manner. This problem of allocation can arise whenever one must select
the level of certain activities which must compete for certain scarce resources necessary to
perform those activities.
Linear Programming (LP) is a widely used mathematical technique designed to help operations
managers plan and make the decision necessary to allocate scarce resources. A few examples
in which LP has been successfully applied in operations management are:
i. Scheduling school buses to minimize the total distance traveled when carrying
students.
ii. Allocating police patrol units to high crime areas in order to minimize the response
time to 9111 calls.
iii. Scheduling tellers at banks so that needs are met during each hour of the day while
minimizing the total cost of labour.
iv. Selecting the product mix in a factory to make the best use of machine and labour
hours available while maximizing the firm’s profit.
v. Picking blends of raw materials in feed mills to produce finished feed combinations at
minimum cost.
vi. Determine the distribution system that will minimize total shipping cost from several
warehouses to various market locations.
vii. Allocating space for a tenant mix in a new shopping mail so as to maximize revenues
to the leasing company.
3
The word linear means that all the mathematical functions in this model are required to be linear
functions. The term programming here does not imply computer programming, rather it implies
planning. Thus, Linear Programming (LP) means planning with a linear model. It refers to
several related mathematical techniques that are used to allocate limited resources among
competing demands in an optimal way.
The objective of LP is to determine the optimal allocation of scarce resources among competing
products or activities. That is, it is concerned with the problem of optimizing (minimizing or
maximizing) a linear function subject to a set of constraints in the form of inequalities. Economic
activities call for optimizing a function subject to several inequality constraints.
For optimization subject to a single inequality constraint, the Lagrangian method is relatively
simple. When more than one inequality constraints are involved, Linear Programming is easier.
If the constraints, however numerous, are limited to two variables, the easiest solution is the
graphical method. If the variables are more than two, then an algebraic method known as the
simplex method is used.
4
The first step in LP is to decide what result is required. This may be to minimize cost / time, or to
maximize profit/contribution. Having decided upon the objective, it is now necessary to state
mathematically the elements involved in achieving this. This is called the objective function as
noted above.
EXAMPLE: A factory can produce two products, A and B. The contribution that can be obtained
from these products are: “A contributes $20 per unit and B contributes $30 per unit” and it is
required to maximize contribution.
Let the decisions be X1 and X2. Then the objective function for the factory can be expressed as:
Z = 20X1+30X2
where
X1 = number of units of A produced.
X2 = number of units of B produced
This problem has two (2) unknowns. These are called decision variables. Note that only a single
objective (in the above example, to maximize contributions) can be dealt with at a time with an
LP problem.
iv. Constraint: A linear inequality defining the limitations on the decisions. Circumstances
always exist which govern the achievement of the objectives. These factors are known as
limitations or constraints. The limitation in any problem must clearly be identified, quantified and
expressed mathematically. To be able to use LP, they must, of course, be linear.
v. Non-negative restriction: Solution algorithms assume that the variables are constrained to
be non-negative ie Xj 0, for j = 1, 2, 3, .., n.
vi. Optimal solution: A feasible solution that maximizes/minimizes the objective function. It is
the solution that has the most favourable value of the objective function.
vii. Alternative optimal solution: If there are more than one optimal solution (with the same
value of Z), the model is said to have alternative optimal solution.
viii. Feasible solutions: The set of points (solutions) satisfying the LP’s constraints.
5
X1 , X2, X3, X4 ,…., X j 0 Non-negative restriction
Example:
1. Minimize: Z = 30X 1+40X2 +20 X3 Objective function
Subject to: 3X1 + 2X2 –X3 6
4X1 + 5X2 –X3 6 Constraints
6X1 + 2X2 –X3 3
Procedure:
Formulating Linear Programming problems means selecting out the important elements from the
problem and defining how these are related. For real -world problems, this is not an easy task.
However, there are some steps that have been found useful in formulating Linear Programming
problems:
i. Identify and define the /unknown variables in the problem. These are the decision
variables.
ii. Summarize all the information needed in the problem in a table
iii. Define the objective that you want to achieve in solving the problem. For example, it
might be to reduce cost (minimization) or increase contribution to profit
(maximization). Select only one objective and state it.
iv. State the constraint inequalities.
Example:
The Shader Electronics Company produces two products: The Shader Walkman, a portable
AM/FM cassette player, and the Shader Watch-TV, a wrist watch-size black-and –white
television. The production process for each product is similar in that both require a certain
number of hours of electronic work and a certain number of labour-hours in the assembly
department.
Each Walkman takes 4 hours of electronic work, and 2 hours in the assemble shop. Each
Watch-TV requires 3 hours in electronics and1 hour in assembly shop. During the current
production period, 240 hours of electronic time are available; 100 hours of assembly department
time are available. Each Walkman sold yields a profit $7and each Watch-TV produced may be
sold for a profit of $5
Step 1: Identify and define the unknown variables(decision variables) in the problem
Let the decision variables be X1 and X2. Then
X1= number of Walkmans to be produced
X2 = number of Watch-TV to be produced
6
Step 2: Summarize the information needed to formulate and solve this problem in a table.
Step3: Define the objective that you want to achieve in solving the problem State the LP
objective function in terms of X1 and X2 as follows:
Maximize profit, P = $7X1 + $5X2
Both of these constraints represent production capacity restrictions and, of course, affect the
total profit. For example, Shader Electronics cannot produce 70 Walkmans during the production
period because if X1 = 70, both constraints will be violated. It also cannot make X1 =50
Walkmans and X2 = 10 Watch –TVs. This constraint brings out another important aspect of linear
programming. That is, certain intersections will exist between variables. The more units of one
product that a firm produces, the fewer it can make of other products.
In this problem there are two unknowns, X1 and X2, and five constraints. All the constraints are
inequalities and they are all linear in the sense that each involves an inequality in some linear
function of the variables. The two constraints, x1 ≥ 0 and x2 ≥ 0, are special. These are called
nonnegativity constraints and are often found in linear programming problems. The other
constraints are called the main constraints. The function to be maximized (or minimized) is
called the objective function.
7
2.4. Assumptions of Linear Programming
1. Proportionality: The contribution of each activity to the value of the objective function Z
is proportional to the level of the activity
2. Additivity: Every function in a linear programming model is the sum of the individual
contributions of the respective activities.
3. Divisibility: Decision variables in a linear programming model are allowed to have any
values including no integer values that satisfy the functional and nonnegative constraints.
These values are not restricted to just integer values. Since each decision variable
represents the level of some activity, it is being assumed that the activities can be run at
fractional levels.
4. Certainty: The value assigned to each parameter of a linear programming model is
assumed to be a known constant
Example 1
Maximize
Z = 3X1 + 4X2
Subject to:
X1 + 2X2 32(Constraint A)
X1 + X2 18(Constraint B)
X1 + 3X2 36(Constraint C)
X1 , X2, 0
Procedure:
Since there are only two variables, we can solve this problem by graphing the set of points in the
plane that satisfies all the constraints (called the constraint set) and then finding which point of
this set maximizes the value of the objective function. Each inequality constraint is satisfied by a
half-plane of points, and the constraint set is the intersection of all the half-planes.
Treat the inequality constraints as equations and find the intersections of each on the axes.
Constraint A : 2X1 + X2 = 32
1. On the X1-axis, X2 = 0
2X1 + 0 = 32
X1 = 16
So coordinate on the X1-axis is (16, 0)
2. On the X2 , X1 = 0
0 + X2 = 32
X2 = 20
8
So coordinate on the X2-axis is (0, 32)
Constraint B: X1 + X2 = 18
1. On the On the X1-axis, X2 = 0
X1 + 0 = 18
X1 = 18
So coordinate on the X1-axis is (18, 0)
2. On the X2 , X1 = 0
X1 + 0 = 18
X2 = 18
So coordinate on the X1-axis is (0, 18)
Constraint C: X1 + 3X2 36
1. On the On the X1-axis, X2 = 0
X1 + 0 = 36
X1= 36
So coordinate on the X1-axis is (36, 0)
2. On the X2 , X1 = 0
0 + 3X2 = 36
X2= 12
So coordinate on the X1-axis is (0, 12)
9
NOTE
i. The shaded area is called the feasible region. It contains all the points that satisfy all
three constraints plus the non-negative constraints.
ii. The variables are called decision variables or structured variables.
iii. Z is maximized at the intersection of the two constraints called an extreme point
iv. The co – ordinate that maximizes the objective function is called feasible solution
Sensitivity analysis, or post optimality analysis, is the study of how sensitive solutions are to
parameter(decision variable) changes. It is an analysis that projects how much a solution might
change if there were changes in the variables or input data.
Illustration
Maximize Z 10 x1 15 x 2
Subject to the constraints:
3 x1 4 x 2 10......Constra int A
x1 4 x 2 4.........Constra int B
The optimum solution is: 3 units of x1 and 0.25 units of x 2 and a profit of $33.75
The objective now is to find how much the profit will increase/decrease if the right-hand –side
values of the constraints change.
Constraint A
Suppose the right-hand –side value of the constraint A changes from 10 to 11, how will the profit
and the decision variables change?
The new LP problem is
Maximize Z 10 x1 15 x 2
Subject to the constraints:
3 x1 4 x 2 11......Constra int A
x1 4 x 2 5.........Constra int B
Solving simultaneously, we have the following (please check): x1 3.5 and x 2 0.125 . Substitute
the values into the objective function
Z 10 x1 15 x 2 10(3.5) 15(0.125) 35 1.875 36.875 36.88
Interpretation
If constraint A is increased by one more unit, 3.5 units of x1 and 0.125 units of x 2 would be
produced in order to make a profit of $36.88. What will management do? Management will
increase Constraint A because this will increase profit from $33.75 to $36.88. However,
management must increase the production of x1 from 3 to 3.5 units and increase that of x 2 from
10
0.25 to 0.125 units. Note that the difference in profit ($36.88- $33.75 = $3.13) is the dual price or
shadow cost of constraint A. Compare these results with those under shadow prices.
Constraint B
Suppose the right-hand –side value of the constraint B changes from 4 to 5, how will the profit
and the decision variables change?
The new LP problem is
Maximize Z 10 x1 15 x 2
Subject to the constraints:
3 x1 4 x 2 10......Constra int A
x1 4 x 2 5.........Constra int B
Solving simultaneously, we have the following (please check): x1 2.5 and x 2 0.625 . Substitute
the values into the objective function
Z 10 x1 15 x 2 10(2.5) 15(0.625) 25 9.375 34.375 34.38
Interpretation
If constraint B is increased by one more unit, 2.5 units of x1 and 0.625 units of x 2 would be
produced in order to make a profit of $34.38.
What will management do? Management will increase Constraint B because this will increase
profit from $33.75 to $34.38. However, management must decrease the production of x1 from 3
to 2.5 units and increase that of x 2 from 0.25 to 0.625 units. Note that the difference in profit
($34.38 - $33.75= $0.63) is the dual price or shadow cost of constraint B. Compare these results
with those under shadow prices.
In order to answer this question, we need to formulate the dual problem. Every maximization
(minimization) problem in Linear Programming has a corresponding minimization (maximization)
problem. The original problem is called the primal and the corresponding problem is called the
dual.
The following are the rules for transforming the primal to obtain the dual:
11
i. Reverse the inequality sign. That is maximization () in the primal becomes
minimization () in the dual and vice versa. The non-negativity constraints on the
decision variables is always maintained.
ii. The rows of the coefficient matrix of the constraints in the primal are transferred to
columns for the coefficient matrix of the constraints in the dual.
iii. The row vector of coefficients in the objective function in the primal is transposed to a
column vector of constraints for the dual constraints.
iv. The column vector of constraints from the primal constraints is transposed to a row
vector of coefficients for the objective function of the dual.
Interpretation: If an extra assembler receives a salary of $5.00 per hour, the firm will lose $4.50
for every hour the new assembler works. So the firm will not be willing to employ additional
assembler at a salary of $5.00.
An algorithm is a set of rules or a systematic procedure for finding the solution to a problem. It s
simply a process where a systematic procedure is repeated(iterated) over and over again until a
desired result is obtained.
The Simplex algorithm is a method (or computational procedure) for determining basic feasible
solutions to a system of equations and testing the solutions for optimality.
12
Maximize:
Z = C1X 1+ C2X2 + C3X3+ C4X4+ ….+ CnXn
Subject to:
a11X1+ a12X2 + a12X3+ a14X4 +…+ a1nXn b1
a21X 1+ a22X2 + a23X3+ a24X4+ ….+ a2nXn b1
..
am1X 1+ a m2X2 + am3X3+ am4X4+ ….+ amnXn bm
X1, X2 …, Xn 0
To develop a general solution method, the LP problem must be put in a common format, which
we will call the standard form. The properties of this form are as follows:
i. All the constraints are equations.
ii. All the variables are nonnegative.
iii. The objective function may be maximization or minimization.
An LP model can now be put in the standard form as follows:
1. Constraints:
i. A constraint of the type () can be converted to an equation by adding a slack
variable to(subtracting a surplus variable from) the left side of the constraint.
For example, in the constraint
X1 + 2X2 6
We add a slack variable S1 0 to the left side to obtain the equation
X1 + 2X2 + S1 6
Now consider the constraint
3X1 + 2X2 –X3 6
Since the left side is not smaller than the right side, we subtract a surplus variable S2 0
from the left hand side to obtain the equation
3X1 + 2X2 –X3 – S2 = 6
ii. The right side of an equation can always be made nonnegative by multiplying both
sides of the equation by –1(negative one).
For example,
3X1 + 2X2 –X3 = -6
is mathematically equivalent to
-3X1 -2X2 +X3 = 6
iii. The direction of an inequality is reversed when both sides are multiplied by –1
(negative one)
For example, whereas 2<4, -2> -4. Thus, the inequality
5X1 + 2X2 –X3 -6
can be replaced by
-5X1 - 2X2 +X3 6
13
Example 1:
Maximize:
Z = 5X 1+3X2
Subject to: 6X1+2X2 36
5X1+5X2 40
2X1+4X2 28
X1, X2 0
Procedure:
1. Initialization step:
a. Express the objective function in the standard form and convert the inequalities to
equations by adding slack variables.
Z -5X1-3X2 = 0
6X1 + 2X2 + S1 =36
5X1 + 5X2 + S2= 40
2X1 + 4X2 + S3 =28
X1
6 2 1 0 0 X2 36
5 5 0 1 0 S1 = 40
2 4 0 0 1 S2 28
S3
c. Set up an initial Simplex Tableau composed of the coefficient matrix of the constraint
equations and the column vector of the constant set above a row of the indicators which
are the coefficients of the objective function in the standard form and a zero coefficient for
each slack variable.
d. Read the first initial basic feasible solution. Select the original variables to be the initial
non-basic variables (set equal to zero) and the slack variables to be the initial basic
variables.
That is:X1= 0 and X2 = 0. Hence S1= 36, S2 = 40 and S3 = 28
2. Iteration step:
a. Determine the entering basic variable by selecting a variable with the negative coefficient
having the largest absolute value. That column becomes the pivot column. In this case,
the number is –5, and X1 becomes the pivot column.
14
b. Determine the leaving basic variable using the minimum ratio test. This is done by using
each coefficient in the pivot column to divide the elements of the constants. The row with
the smallest ratio (called pivot row) determines the variable to leave the basis. The
process of selecting the variable to be included and the variable to be excluded is called
change of basis.. In the current example, 36/6 is the smallest ratio(36/6 < 40/5 >28/2). So
row one(10 is the pivot row. Since the unit vector with one(1) in the first row appears
under S1, S1 leaves the basis.
c. Determine the new basic feasible solution by pivoting.. Pivoting involves converting the
pivot element to one(1) and all the other elements in the pivot column to zero(0).The pivot
number/element is the number at the intersection of the column of the variable entering
the basis(i.e. the element at the intersection of the pivot row and the pivot column) In this
case the number is 6 This is done using Gaussian elimination method. As follows:
i. Multiply the pivot row by the reciprocal of the pivot element. In this case, multiply by 1/6.
Since there is a negative coefficient in equation 1 (the objective function), we continue the
iteration. The only negative indicator is –4/3 in the second column. So X2 is introduced into the
basis column 2 becomes the pivot column. Dividing the constants’ column by the pivot column
shows that the smallest ratio is in the third row. Thus, 10/3 becomes the new pinot element (i.e.
the number at the intersection of the pivot row and pivot column) Converting the pivot element
(10/3) to one and all the other elements in the pivot column to zero(0) as follows:
15
i. Multiply the pivot row by the reciprocal of the pivot element. In this case, multiply by 3/10
Since there are no negatives indicators left in the first row(objective function), this is the optimal
solution. The maximum value of Z is read from the constant column. In this case, it is 34.
There are no slacks in the two constraints, indicating that the first two inputs are all used up.
However, 6 units of the third input remain unused.
16
3.0. TRANSPORTATION MODEL
3.1. Introduction
Transportation prroblem received its name because it arises very naturally in the context
determining optimal shipping parttens. The general transportation problem deals with distributing
any commodity from any group of supply centers called source to any group of receiving centers
called destination in such a way as to minimize total distribution cost.
Thus, in general, source i ( i =1,2,3,..,m ) has supply of si units to distribute and destination j(j=1,
2, 3, …,n) has a demand for dj units to be received from the sources. A basic assumption is that
the cost of distributing units from source i to destination j is directly proportional to the number
distributed, where cij denotes the cost per unit distributed.
m n
For xij(i =1,2,3,..,m; j=1, 2, 3, …,n), we maximize c
i 1 j 1
x
ij ij
x
i 1
ij i , for i =1,2,3,..,m
n
x
j 1
ij j , for j=1, 2, 3, …,n
centres(destination j =1,2,3,..,n ).
3.2. Terminologies
1. Source: A location at which a supply of the commodity is available. The sources are
numbered from 1 to m.
2. Destination: A location at which there is demand for the commodity. The destinations
are numbered from 1 to n
3. Supply (Si): The amount of the commodity required at source i (i = 1, 2, 3, 4, 5, …, m).
4. Demand (dj): The amount of the commodity required at destination j (j = 1, 2,,3, 4, 5,
…, n).
5. Transportation cost (Cij): The cost of transporting a single unit of the product from
source i(i = 1, 2, 3, 4, 5, …, m) to destination j(j = 1, 2,,3, 4, 5, …, n). The unit cost is
independent of the quantity shipped, so total cost function is linear.
6. Distribution variables (Xij): The amount shipped from source i(i = 1, 2, 3, 4, 5, …, m) to
destination j(j = 1, 2,,3, 4, 5, …, n). These are the decision variables of the problem.
7. Transportation Tableau: A table format used for hand calculations to solve the
transportation problem with the simplex method.
17
The figure below depicts the transportation model or network described above.
D1
S1
D2
S2
D3
S3
A source or destination is represented by a node. The arc joining a source and a destination
represents route through which the commodity is transported.
3.3.Transportation Model
A transportation problem is specified by:
The supply
The demand
The shipping cost.
Hence the relevant data for any transportation problem can be summarised in a transportation
tableau as shown below.
TO
FROM
D1 D2 ….. Dn Supply
C11 C12 … C1n
S1 s1
C21 C22 … C2n
S2 s2
C31 C32 … C3n
S3 s3
Cm1 Cm2 … Cmn
Sm sm
Demand D1 D2 ……. Dn
The square or cell in row i and column j of a transportation tableau corresponds to the variable
X ij . If X ij is a basic variable(solution), its value is placed in the center of the Cij cell of the
tableau. The tableau format implicitly expresses the supply and demand constraints through the
fact that the sum of the variables in row i must equal S i and the sum of the variables in column j
must equal D j .
18
ILLUSTRATION: Powerco has 3 electric power plants that supply the power needs of 4 cities.
Each power plant supply the following number of kilowatt-hour (Kwh) of electricity:
Plant 1 = 35million
Plant 2 = 50million
Plant 3 = 40 million
The peak power demands are as follows:
City 2 = 45 million
City 2 = 20 million
City 3 = 30 million
City 4 = 30million
The costs in dollars ($) of sending 1 million Kwh of electricity from plant to city depends on
distance and are shown in the table below:
TO
FROM CITY 1 CITY 2 CITY 3 CITY 4
PLANT 1 8 6 10 9
PLANT 2 9 12 13 7
PLANT 3 14 9 11 5
In the Powerco example, total supply and total demand equal 125, so the Powerco problem is
an example of a balanced transportation problem.
Maximize:
Z= 8X11+6X12+10X13+9X14 + 9X21+12 X22+13 X23+7X24+14X31+9X32+11X33+5X34
Subject to
X11+X12+X13+X14 = 35
19
X21+ X22+X23+X24 =50
X31+X32+X33+X34 = 40
X11+X21+X31 = 45
X12+ X22+X32=20
X13+X23+X33 = 30
X14+X24+X34 = 30
is total supply equal total demand). If this condition exits, the problem is said to be a balanced
transportation problem, otherwise it is unbalanced.
If the problem has physical significance and this condition is not met, it usually means that
either S i or D j actually represents a bound rather than an exact requirement. If this is the case,
a fictitious ‘source’ or ‘destination’ (called the dummy source or the dummy destination) can be
introduced to take up the slack in order to convert the inequalities into equalities and satisfy
feasibility conditions.
1. If total supply exceeds total demand: If this situation occurs, the modification is to add an
extra column (dummy destination) to the tableau with the demand for the dummy
destination equal to the excess supply. In other words, we balance the transportation
problem by creating a dummy demand point that has a demand equal to the amount of
excess supply. Since shipments to the dummy points are not real shipments, they are
assigned a cost of zero (0). Shipments to the dummy demand point indicate unused
supply capacity.
2. If total supply is less than total demand: This requires a dummy source with supply equal
to the excess of demand over supply. In other words, we add a dummy source that will
absorb the difference (excess of supply over demand)
The total transportation cost of any solution is obtained by multiplying each unit cost and
summing overall entries. The object is to find the feasible solution(s) with the lowest total cost.
This is called the optimum solution
20
m n
problem requirements by checking if Si D j . This is done to find out if it is necessary to
i 1 j 1
m n
introduce a dummy. Since S D
i 1
i
j 1
j , there will not be the need for a dummy.
Since (Cij - ui - vj ) is required to be zero if Xij is in a used cell, the dj and Si satisfy the set of
equation Cij = dj + Sj for each (i, j) such that Xij is in a used cell. If (Cij - ui - vj ) 0, then
optimality is reached. Otherwise, we conclude that the current feasible solution is not optimal.
Therefore the transportation simplex method must go to the iteration step to find a better feasible
solution. The example below will be used to illustrate the optimum solution.
The Prblem: A company has three factories (A1, A2, and A3) and four distribution warehouses
(B1, B2, B3, and B4). It is required to schedule factory shipments from factories to warehouses
in such a manner as to minimize the total cost of shipping. Below are the factory capacities and
warehouse requirements.
The per unit costs of transporting from factory to warehouse are also shown below.
DESTINATION
ORIGIN B1 B2 B3 B4
A1 6 16 4 2
A2 2 8 6 10
A3 14 4 2 12
21
Solution:
Step 1. Lay out the problem:
m n
Formalize the problem requirements by checking if si d j . This is done to find out if it is
i 1 j 1
m n
necessary to introduce a dummy. Here, s i 1
i 20+60+70=150, and d
j 1
j =40+10+60+40=150.
m n
Since s d
i 1
i
j 1
j , there is no need to introduce dummy in this example. The balanced
DESTINATION
ORIGIN B1 B2 B3 B4 CAPACITIES
A1 6 16 4 2
20
A2 2 8 6 10
60
A3 14 4 2 12
70
REQUIREMENTS 40 10 60 40 150
Step 2. Find the initial feasible solution: The ‘Least –cost-first’ rule is used.
DESTINATION
ORIGIN B1 B2 B3 B4 CAPACITIES
A1 6 16 4 2
20 20
A2 2 8 6 10
40 20 60
A3 14 4 2 12
10 40 20 70
REQUIREMENTS 40 10 60 40 150
Initial cost = 2 20 2 40 6 20 4 10 2 40 12 20 $600.00
Procedure:
1. Find equations in terms of U’s and V’s using the used cells.
2. Solve for the U’s and V’s. by convention, the dispatch cost from the first is set to zero(U1=
0).
3. Find the difference between the shadow costs and actual costs for the unused cells using
the following formula: C ij (U i V j ) .
Note: The shadow cost is given by U i V j . This is an imputed cost of not using a particular
cell(route).
22
A. Equations in terms of U’s and V’s for the used cells
X14 : U1+V4 = 2……………….(1)
X21 : U2+V1 = 2……………,....(2)
X23 : U2+V3 = 6……………….(3)
X32 : U3+V2 = 4……………….(4)
X33 : U3+V3 = 2……………….(5)
X34 : U3+V4 = 12……………...(6)
Iteration step:
i. Determine the entering basic variable. Select the nonbasic variable Xij having the
largest (in absolute terms) negative value of C ij (U i V j )
ii. Determine the leaving basic variable. Identify the chain reaction required to retain
feasibility when the entering basic variable is increased. From among the donor cells,
select the basic variable having the smallest value.
iii. Determine the new feasible solution. Add the value of the leaving basic variable to the
allocation for each recipient cell. Subtract this value from the allocation for each donor
cell.
Step 1: The entering basic variable. Select the nonbasic variable Xij having the largest (in
absolute terms) negative value of C ij (U i V j ) is X23. It has a value of -6.
23
Part 1: We have to determine an entering basic variable. Since C ij (U i V j ) represents the rate
at which the objective function would change as the nonbasic variable Xi is increased, the
entering basic variable must have a negative C ij (U i V j ) to decrease the total cost Z. In cases
where there are more than one negative values, the value having the largest (in absolute terms)
negative value of C ij (U i V j ) is chosen to be the entering basic variable. In our example, X24
is chosen.
Part 2: Increasing the entering basic variable from zero sets off a chain reaction of
compensating changes in other basic variables (allocations) in order to continue satisfying the
supply and demand constraints. The first basic variable to be decreased to zero first then
becomes the leaving basic variable.
With X24 as the entering basic variable, the chain reaction is relatively a simple one. We shall
always indicate the entering basic variable by placing a + sign in its cell. Thus, increasing X24
requires decreasing X23 by the same amount to restore the supply of 60 in row 2, which in turn
requires increasing X33 by this amount to restore the demand of 60 in column 3., which in turn
requires decreasing X34 by this amount to restore the supply of 70 in row 3. This decrease in X34
successfully completes he chain reaction because it also restores the demand in column 4. The
net result is that cell(2, 4) and cell(3, 30 become recipient cells, each receiving its additional
allocation from the donor cells, (2, 30 and (3, 4). These cells are indicated by the + and – signs.
Each donor cell decreases its allocation by exactly the same amount that the entering basic
variable is increased. Therefore the donor cell that starts with the smallest allocation must reach
a zero allocation first as the entering basic variable X24 is increased. In our example, any of X23
and X34 becomes the leaving basic variable.
In general, there always is just one chain reaction (in either direction) that can be completed
successfully to maintain feasibility when entering basic variables is increased from zero
Part 3: The new basic feasible solution is identified simply by adding the value of the leaving
basic variable (before any change) to the allocation for each recipient cell and subtracting this
same amount from the allocation for each donor cell. In our example, the value of the leaving
basic variable is 20(X34), so this portion of the transportation simplex tableau changes as shown
in the table below for the new solution. Since X34 is nonbasic in the new solution, its new
allocation of zero is no longer shown in the new tableau. Test for optimality, and if the current
solution is optimal, stop. Otherwise, go to the iteration step.
DESTINATION
ORIGIN B1 B2 B3 B4 CAPACITIES
A1 6 16 4 2
20 20
A2 2 8 6 10
40 20(-) (+) 60
A3 14 4 2 12
10 40(+) 20(-) 70
REQUIREMENTS 40 10 60 40 150
24
Step 2
DESTINATION
ORIGIN B1 B2 B3 B4 CAPACITIES
A1 6 16 4 2
20 20
A2 2 8 6 10
40 20(-)20 (+)20 60
A3 14 4 2 12
10 40(+)20 20(-)20 70
REQUIREMENTS 40 10 60 40 150
Step 3
DESTINATION
ORIGIN B1 B2 B3 B4 CAPACITIES
A1 6 16 4 2
20 20
A2 2 8 6 10
40 20 60
A3 14 4 2 12
10 60 70
REQUIREMENTS 40 10 60 40 150
25
4.0. ASSIGNMENT MODEL
4.1. Introduction
The assignment problem is a special case of the transportation problem, but it is one with a
simple structure that it can be solved more efficiently by its own solution procedure. In its most
general form, the assignment problem is as follows: There are a number of agents and a
number of tasks. Any agent can be assigned to perform any task, incurring some cost that may
vary depending on the agent-task assignment. It is required to perform all tasks by assigning
exactly one agent to each task in such a way that the total cost of the assignment is minimized.
In the classical assignment problem, the goal is to find an optimal assignment of agents to tasks
without assigning an agent more than once and ensuring that all tasks are completed. The
objective might be to minimize the total time to complete a set of tasks, or to maximize skill
ratings, or to minimize the cost of the assignments. A feature of the assignment problem
particular is that only one machine is assigned to one and only one job.
Illustration: A certain machine shop has n machines denoted by M1, M2, M3 …, Mn. A group of n
different jobs(J1, J2, J3, …, Jn) is to be assigned to these machines. For each job the machining
cost depends on the machine to which it is assigned. Each machine can work only on one job.
The problem is to assign the jobs to the machines, which will minimize the total cost of
machining.
In order to formúlate the mathematical model, we start by defining the decision variable xij as the
assignment of ith job to jth machine(person), and cij be the time(cost) taken for ith job by the jth
machine(person) to be completed. Wet hen formúlate the the objective function as
m n
Mminimize Z cij xij
i 1 j 1
Row(Job) constraints
x11 + x12 + x13 + x14 + x15= 1 for job 1
x21 + x22 + x23 + x24 + x25 = 1 for job 2
x31 + x32 + x33 + x34 + x35 = 1 for job 3
x41 + x42 + x43 + x44 + x45= 1 for job 4
x51 + x52 + x53 + x54 + x55= 1 for job 5
Column(Machine) constraints
x11 + x21 + x31 + x41 + x51 = 1 for machine 1
x12 + x22 + x32 + x42 + x52 = 1 for machine 2
x13 + x23 + x33 + x43 + x53 = 1 for machine 3
x14 + x24 + x34 + x44 + x54 = 1 for machine 4
x15 + x25 + x35 + x45 + x55 = 1 for machine 5
and xij = 0 or 1. In general, xi1 + xi2 + ... + xin = 1, for i = 1, 2, ..., n, and x1j + x2j + ... + xnj = 1,
for j = 1, 2, ..., n
26
4.2. Minimization Assignment Model
The basic principle is that the optimal assignment is not affected if a constant is added or
subtracted from any row or column of the cost matrix. For example if the cost of doing any job in
machine 3 in the table below is increased by $2 so that the third row of the cost matrix becomes
4, 3, 3, 4, it can be easily verified that the optimal solution is not affected by this change.
J1 J2 J3 J4
M1 10 9 8 7
M2 3 4 5 6
M3 2 1 1 2
M4 4 3 5 6
In essence, the solution procedure is to subtract a sufficiently large cost from the various rows or
columns in such a way that an optimal assignment is found by inspection. We initiate the
algorithm by examining each row (column) of the cost matrix to identify the smallest element.
This quantity is then subtracted from all the elements in that row (column). This produces a cost
matrix containing at least one zero element in each row(column). Now try to make a feasible
assignment using the cells with zero costs. If it is possible then we have an optimal assignment.
Examining the rows first, a reduced cost matrix can be obtained by subtracting:
i. Seven(7) from the first row.
ii. Three(3) from the second row.
iii. One(1) from the third row.
iv. Three(3) from the fourth row.
J1 J2 J3 J4
M1 3 2 1 0
M2 0 1 2 3
M3 1 0 0 1
M4 1 0 2 3
From the above table a feasible assignment using only the cells with zero costs is
M1 J4
M2 J1
M3 J3
M4 J2
Hence this is an optimal solution..
In general, it may not always be possible to find a feasible assignment using cells with zero
costs.
To illustrate this consider the following assignment problem
J1 J2 J3 J4
M1 10 9 7 8
M2 5 8 7 7
M3 5 4 6 5
M4 2 3 4 5
27
The solution is as follows.
First, the minimum element in each row is subtracted from all the elements in that row. This
gives the following reduced-cost matrix.
J1 J2 J3 J4
M1 3 2 0 1
M2 0 3 2 2
M3 1 0 2 1
M4 0 1 2 3
Since both the machines M2 and M4 have a zero cost corresponding to job J1 only, a feasible
assignment using only cells with zero costs is not possible. To get additional zeros subtract the
minimum element in the fourth column from all the elements in that column. The result is shown
in the table below.
J1 J2 J3 J4
M1 3 2 0 0
M2 0 3 2 1
M3 1 0 2 0
M4 0 1 2 2
Only three jobs can be assigned using the zero cells, so a feasible assignment is still not
possible. In such cases, the procedure draws a minimum number of lines through some selected
rows and columns in such a way that all the cells with zero costs are covered by these lines. The
minimum number of lines needed is equal to the maximum number of jobs that can be assigned
using the zero cells.
In the current example, this can be done with three lines as follows.
J1 J2 J3 J4
M1 3 2 0 0
M2 0 3 2 1
M3 1 0 2 0
M4 0 1 2 2
Now select the smallest element, which is not covered by the lines. In the current example, it is
1. Subtract this number from all the elements, which are not covered. Then add this number to
all those covered elements that are at the intersection of two lines. This gives the following
reduced cost matrix.
J1 J2 J3 J4
M1 4 2 0 0
M2 0 2 1 0
M3 2 0 2 0
M4 0 0 1 1
A feasible assignment is now possible and an optimal solution is assigned
M1 J3
M2 J1
28
M3 J4
M4 J2
The total cost is given by: 7 +5+ 5+ 3 = 20
An alternate optimal solution is:
M1 J3
M2 J4
M3 J2
M4 J1
In case a feasible set could not be obtained at this step, one has to repeat the step of drawing
lines to cover the zeros and continue until a feasible assignment is obtained.
Step 1: Reduce each column by the largest figure in that column and ignore the resulting minus
sign. The result is shown in the table below.
W X Y Z
M1 13 10 30 16
M2 0 13 0 7
M3 23 11 12 0
M4 12 0 17 1
Step 2: Reduce each row by the smallest figure in that row. The result is shown in the table
below.
W X Y Z
M1 3 0 20 6
M2 0 13 0 7
M3 23 11 12 0
M4 12 0 17 1
Step 4: If the number of lines equals the number of assignments to be made go to step 6. If less
as in the current example , select the smallest element which is not covered by the lines. In the
29
current example, it is 3. Subtract this number from all the elements which are not covered. Then
add this number to all those covered elements that are at the intersection of two lines. This gives
the following reduced cost matrix
W X Y Z
M1 0 0 17 6
M2 0 16 0 10
M3 20 11 9 0
M4 9 0 14 1
30
REFERENCE
Alpcan, T ; Başar, T. (2011): Network Security : A Decision and Game-theoretic Approach.
Cambridge University Press.
Kamauff, John W. (2010): Manager's Guide to Operations Management In: Briefcase books.
McGraw-Hill Professional
Liu, Sifeng; Lin, Yi. (2006): Grey Information : Theory and Practical ApplicationsIn Advanced
information and knowledge processing. Springer Science & Business Media..
Michaud, R. O.; Michaud, R. O. (2008): Efficient Asset Management : A Practical Guide to Stock
Portfolio Optimization and Asset Allocation. In: Financial Management Association survey and
synthesis series. 2nd ed. Oxford University Press..
Vrakas, D; Vlahavas, I(2008): Artificial Intelligence for Advanced Problem Solving Techniques.
IGI Global
Wellman, M. P.; Greenwald, A; Stone, P. (2007): Autonomous Bidding Agents : Strategies and
Lessons from the Trading Agent Competition. In: Intelligent robotics and autonomous agents.
MIT Press. 2007
Wright, Stephen J.; Nowozin, Sebastian; Sra, Suvrit. (2012): Optimization for Machine Learning.
In: Neural Information Processing Series. MIT Press.
31