Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Or H

Download as pdf or txt
Download as pdf or txt
You are on page 1of 136

title_page 2

contents 3
INTRODUCTION & LINEAR PROGRAMMING 7
POSTOPTIMALITY ANALYSIS 53
TRANSPORTATION PROBLEM & THE ASSIGNMENT
PROBLEM 68
SIMULATION 91
NETWORK SCHEDULING 109
INTERGER PROGRAMMING 124
Appendices 133
UNIVERSITY OF MINE AND TECHNOLOGY
TARKWA

FACULTY OF MINERAL RESOURCES TECHNOLOTGY

MINING ENGINEERING DEPARTMENT


BSc PROGRAMME

LECTURE NOTES ON
OPERATIONS RESEARCH
GM/GL/MN/MR/PE/ES/MC/EL/CE/RN 459

By

Assoc Prof V. A. Temeng/ Mr M. O. Tweneboah/ Dr. C. K. Arthur


January 2021
Course Presentation and Student Assimilation

The course is taught through lectures supported with limited hand-outs. The student can
best understand and appreciate the subject by attending all lectures and tutorials, by
reading references and hand-outs, and by completing all assignments and course work on
schedule.

Tutorials, Assignments, Course Work and Examination

Tutorials will be in the form of problem solving and will constitute an integral part of
each lecture; to directly demonstrate the application of each theory or model.

Assignments or quizzes will be given for each topic treated to encourage students to test
and consolidate their understanding of the discipline.

Assessment of Students

The final subject mark will comprise the following:

(i) Continuous Assessment (40%), made up of:


• Quizzes and Assignments 30%
• Attendance 10%

(ii) Final Examination 60%

References

1. James E. Shambin and Steves, G.T., Jr. (1974). Operations Research – A


Fundamental Approach, McGraw Hill, 404 pp., ISBN 0-07-056378-0

2. Ackoff, R.L. and Sasieni, M.W. (1968). Fundamentals of Operations Research, Wiley
& Sons, 445 pp., ISBN 0-471-003344.

3. Hillier and Lieberman (1992). Introduction to Operations Research, Holden-Day Inc.,


Oakland, USA, p. 5.

4. Theifrauf, R.J., Klekamp, R.C. and Rume, M.L. (1985). Management Science: A
Model Formulation Approach with Computer Applications, Bell & Howeell Co., Ohio,
USA, p. 4.

5. Battersby, A. (1979). Network Analysis: for Planning and Scheduling, Macmillan,


London, USA, 316 pp.

6. Smith, D. (1973). Linear Programming Models in Business, Polytech, Stockport, UK,


219 pp.

7. Pegden, C. D., Shannon, R. E. and Sadowski, R. P. (1995), Introduction to Simulation


Using Siman, 2nd Ed., McGraw-Hill, New York, 600 pp.

i
8. Taylor, B. W. (1982), Introduction to Management Science, Wm. C. Brown Company
Publishers, Dubuque, 691 pp.

9. Winston, W. L. (1994), Operations Research – Applications and Algorithms, 3rd Ed.,


Duxbury Press, Belmont, 1318 pp.

10. Krajewski, L. J. and Thompson, H. E. (1981), Management Science: Quantitative


Methods in Context, John Wiley & Sons, New York, 544 pp.

Course Aims and Objectives

The main aims of the course are:

(i) To prepare the student to become a good engineer by equipping him/her with
OR scientific approach in problem-solving and decision making.
(ii) To equip the student with OR skills by which he/she can make objective
managerial decisions in his/her professional life.

The objectives of the course are:

(i) To introduce students to the basic OR concepts and techniques.


(ii) To encourage students to employ OR techniques to solve problems of industry
to arrive at objective decisions.

Expected Outcomes of Course

At the end of the course it is expected that the student will:

• Understand OR concepts and methodologies.


• Be able to analyse problems and solve them by OR methods.

ii
TABLE OF CONTENTS

Page
CHAPTER 1: INTRODUCTION
History of Operations Research 1
The nature of Operations Research 1
Modelling Approach in Operations Research 2

CHAPTER 2: LINEAR PROGRAMMING


Model Formulation 1
General Form of the Linear Programming Model 11
Properties of the General Linear Programming Model 12
Solving Linear Programming Problems 12
Graphical Interpretation of Linear Programming 13
Special Cases of the General Linear Programming Problem 17
The Simplex Method 19
The Simplex Method in Application to a Maximisation Problem 20
The Minimisation Problem 25
A Mixed Constraint Problem 29
Negative Variables 31
Other Complications and their Resolutions 34
The Two Phase Simplex Method 37

CHAPTER THREE: POSTOPTIMALITY ANALYSIS


Duality 1
Economic Interpretation of the Primal 1
Dual Form of a Linear Programming Model 2
Economic Interpretation of the Dual Form 4
Exceptions to the Primal Dual Relationship 6
Sensitivity Analysis 9
Changes in the Right-Hand-Side (bi) Values 9
Changes in Objective Function Coefficients 11
Computer Solution of Linear Programming Problems 13

CHAPTER FOUR: TRANSPORTATION PROBLEM


The Balanced Transportation Problem 1
Northwest Corner Method 4
Vogel’s Approximation Method 4
Determining the Optimal Solution 5
Stepping Stone Method 5
Modified Distribution Method 10
The Unbalanced Transportation Problem 14
Degeneracy 15
A Maximisation Transportation Problem 17

CHAPTER FIVE: THE ASSIGNMENT PROBLEM


The Hungarian Method 1
Unequal Supply and Demand 4

iii
CHAPTER SIX: SIMULATION
Types of Models 1
The Simulation Process 2
Stochastic Simulation 2
Simulation of a Queuing System 4
Generation of Random Variates 6
Generating a Random Variate with a Probability Density Function 9
Determining the Distribution of Various Random Variables (Input Analysis) 12
Analysis of Simulation Output 17
Simulation Languages 19

CHAPTER SEVEN: NETWORK SCHEDULING


Components of CPM/PERT Network and Precedence Relationships 1
Activity Scheduling 4
Uncertainties in Activity Times (PERT) 9
Project Crashing 12

CHAPTER 8: INTERGER PROGRAMMING


Integer programming solution Methods 1
Rounding Approach 1
Ranch and Bound Method 2
Integer Programming Applications 8

iv
Operations Research Introduction

INTRODUCTION

History of Operations Research


The beginning of Operations Research (O.R) is attributed to military services in World
War II. There was the need to allocate scarce resources to the various military operations
and the activities within each operation in an effective manner. The British and American
military management called on a group of scientists to research into (military) operations.
It is claimed that their efforts were instrumental in winning the Air Battle of Britain, the
Island campaign in the Pacific, the Battle of the North Atlantic and others.

The industry became interested in this field as a result of the apparent success of
operations research in the military. The importance of operations research became more
apparent as a result of the industrial boom following the war, and the increasing
complexity of organisations. By 1951 O.R. had taken its hold in Great Britain and was in
the process of doing so in the U.S.

Two of the major factors that contributed to the rapid development of O.R. were: (1) the
substantial progress that was made early in improving the techniques available to
operations research. For instance, many of the standard tools of operations research e.g.
linear programming, dynamic programming, queuing theory, and inventory theory were
relatively well developed by the end of the 1950’s. (2) The development of electronic
computers with their ability to perform arithmetic calculations thousands and even
millions of times faster than a human being.

The Nature of Operations Research


Operations research is concerned with optimal decision making in, and modelling of,
deterministic and probabilistic systems that originate from real life. These applications
that occur in government, business, engineering, economics, and natural science and
social science, are characterised largely by the need to allocate limited resources.

Many industries, including aircraft and missile, automobile, communication computer,


electric power, electronics, food, metallurgy, mining, paper, petroleum, transportation,
financial institutions, governmental agencies and hospitals, have made widespread use of
operations research.

Operations Research techniques can broadly be classified into two main aspects:
1. Mathematical Programming Models
2. Probabilistic Models

Mathematical Programming Comprises:


• Linear programming and extensions
• PERT/CPM.
• Network flow
• Dynamic programming
• Game Theory
• Integer programming
• Non-linear programming

Probabilistic Models Comprise:


• Markov Chains and Markovian Decision Processes

1
Operations Research Introduction

• Queuing Theory and Applications


• Inventory Theory
• Forecasting
• Reliability
• Decision Analysis
• Simulation

What is a Model?
A model is a representation of a group of objects or ideas in some form other than that of
the entity itself. Models are important because they are used to enable one learn
something about a real world system that cannot be observed or experimented with
directly.

A Classification of Models
In terms of their prevalence in practice there are three types of models:
• verbal models
• physical models, and
• mathematical models

Verbal Models
A verbal model expresses all of the functional relationships between the variables in a
word passage. Verbal models are used extensively in the business world (especially in
advertising) and have the advantage of being easy to understand.

The disadvantages are that they cannot be experimented with, they do not indicate how
outcomes or measures of effectiveness change with decision alternatives and it is not easy
to show how the relationships change with decision alternatives.

Verbal models however play an important role in the decision making process. They can
be used to verbalise decision strategies from more sophisticated models.

Physical Models
A physical model takes on the physical appearance of the object of study. It is normally
used to display or test the design of objects like new buildings or new products. For
instance, in the aircraft industry a scale model may be used to test the aerodynamics of
the design in a wind tunnel.

Physical models are advantageous for being usable for experimentation and also lucidly
describe the problem or system under study which may help in generating innovative
design alternatives for solving decision problems. Physical models are however limited to
solving a relatively limited class of problems (mainly design problems). In addition,
physical models do not contain explicit relationships between decision alternatives,
therefore trial-and-error method is used which may make it time consuming and
expensive.

Mathematical Models
A mathematical model expresses its relationship in mathematical symbols. Mathematical
models are therefore abstract as one cannot visualise the system being portrayed.

2
Operations Research Introduction

The main shortcomings of mathematical models are: the degree of abstraction makes it
difficult for managers to accept such models and due to some limitations in mathematical
symbolism some systems (real problems) may be grossly oversimplified.

Mathematical models have the advantage of facilitating experimentation due to explicitly


stated interrelationships between the various variables, the effects of different decision
alternatives can be tested more easily, they can also represent many complex problems
efficiently and concisely and in many cases provide the cheapest way to analyse
problems. Mathematical models are used extensively in operations research.

Modelling Approach in Operations Research


An operations research study normally involves the following phases:
1. Formulating the problem
2. Constructing a mathematical model
3. Deriving a solution from the model
4. Testing the model and the solution
5. Establishing controls over the solution

Formulating the Problem


• Study of the relevant system to develop a well defined statement of the problem to be
considered.
• Study includes determining objectives, constraints on what can be done.
• Study interrelationships between area to be studied and other areas of organisation,
possible alternative courses of action and time limits to make decisions.

Constructing a Mathematical Model


• Constructing a mathematical model that represents the essence of the problem.
• The number of quantifiable decisions to be made should be represented by decision
variables (e.g. x1, x2, xn) whose respective values are to be determined.
• The appropriate measure of performance should also be expressed as a mathematical
function of the decision variables. This function is called an objective function.
• Any restrictions on the values that can be assigned to the decision variables are also
expressed as equations or inequalities - these expressions for restrictions are called
constraints.

Deriving a Solution
• In many cases, this involves the use of one of the standard algorithms applied on a
computer. This may involve the use of a standard software package of the
development of computer codes on the basis of the algorithm.
• In some cases the operations researcher will have to develop his/her own algorithms
and appropriate computer codes for solution.
• Normally an optimal or a good sub-optimal solution is obtained based on time or cost
involved.
• Postoptimality analysis is conducted. This involves analyses of the sensitivity of the
optimal (sub optimal) solution to various sensitive parameters of model. This also
involves obtaining a sequence of solutions that comprises a series of improving
approximations to the ideal course of action.

3
Operations Research Introduction

Testing the Model and Solution


Involves testing the validity of the model as to whether or not it predicts the effects of
alternative courses of action with sufficient accuracy to permit a sound decision.

• Re-examine the model and check for possible errors or oversights. Parameters can be
varied to examine the behaviour of the model.
• Historical data can be used to test the model in retrospect, where applicable. Compare
the solution obtained from such a retrospective case to the actual case to test whether
using the model results in an improvement.

Establishing Control over Solution


• Install a well-documented system for applying an acceptable model. The system
should include the model, solution procedure (including post-optimality analysis) and
operating procedures for implementation.
• A systematic procedure for detecting change and controlling the solution should also
be installed.

Course Presentation and Student Assimilation


The course is taught through lectures supported with limited hand-outs. The student can
best understand and appreciate the subject by attending all lectures and tutorials, by
reading references and hand-outs, and by completing all assignments and course work on
schedule.

Tutorials, Assignments, Course Work and Examination


Tutorials will be in the form of problem solving and will constitute an integral part of
each lecture; to directly demonstrate the application of each theory or model.

Assignments or quizzes will be given for each topic treated to encourage students to test
and consolidate their understanding of the discipline.

Assessment of Students
The final subject mark will comprise the following:

(i) Continuous Assessment 40%


• Quizzes and Assignments 30%
• Attendance 10%

(ii) Final Examination 60%

References
1. James E. Shambling and Steves, G.T., Jr. (1974). Operations Research – A
Fundamental Approach, McGraw Hill, 404 pp., ISBN 0-07-056378-0
2. Ackoff, R.L. and Sasieni, M.W. (1968). Fundamentals of Operations Research, Wiley
& Sons, 445 pp., ISBN 0-471-003344.
3. Hillier and Lieberman (1992). Introduction to Operations Research, Holden-Day Inc.,
Oakland, USA, p. 5.

4
Operations Research Introduction

4. Theifrauf, R.J., Klekamp, R.C. and Rume, M.L. (1985). Management Science: A
Model Formulation Approach with Computer Applications, Bell & Howeell Co., Ohio,
USA, p. 4.
5. Battersby, A. (1979). Network Analysis: for Planning and Scheduling, Macmillan,
London, USA, 316 pp.
6. Smith, D. (1973). Linear Programming Models in Business, Polytech, Stockport, UK,
219 pp.
7. Pegden, C. D., Shannon, R. E. and Sadowski, R. P. (1995), Introduction to Simulation
Using Siman, 2nd Ed., McGraw-Hill, New York, 600 pp.
8. Taylor, B. W. (1982), Introduction to Management Science, Wm. C. Brown Company
Publishers, Dubuque, 691 pp.
9. Winston, W. L. (1994), Operations Research – Applications and Algorithms, 3rd Ed.,
Duxbury Press, Belmont, 1318 pp.
10. Krajewski, L. J. and Thompson, H. E. (1981), Management Science: Quantitative
Methods in Context, John Wiley & Sons, New York, 544 pp.

Course Aims and Objectives


The main aims of the course are:
(i) To prepare the student to become a good engineer by equipping him/her with
OR scientific approach in problem-solving and decision making.
(ii) To equip the student with OR skills by which he/she can make objective
managerial decisions in his/her professional life.

The objectives of the course are:


(i) To introduce students to the basic OR concepts and techniques.
(ii) To encourage students to employ OR techniques to solve problems of industry
to arrive at objective decisions.

Expected Outcomes of Course


At the end of the course, it is expected that the student will:

• Understand OR concepts and methodologies.


• Be able to analyse problems and solve them by OR methods.

5
Operations Research Introduction

TABLE OF CONTENTS

Page
CHAPTER 1: INTRODUCTION
History of Operations Research 1
The nature of Operations Research 1
Modelling Approach in Operations Research 2

CHAPTER 2: LINEAR PROGRAMMING


Model Formulation 1
General Form of the Linear Programming Model 11
Properties of the General Linear Programming Model 12
Solving Linear Programming Problems 12
Graphical Interpretation of Linear Programming 13
Special Cases of the General Linear Programming Problem 17
The Simplex Method 19
The Simplex Method in Application to a Maximisation Problem 20
The Minimisation Problem 25
A Mixed Constraint Problem 29
Negative Variables 31
Other Complications and their Resolutions 34
The Two Phase Simplex Method 37

CHAPTER THREE: POSTOPTIMALITY ANALYSIS


Duality 1
Economic Interpretation of the Primal 1
Dual Form of a Linear Programming Model 2
Economic Interpretation of the Dual Form 4
Exceptions to the Primal Dual Relationship 6
Sensitivity Analysis 9
Changes in the Right-Hand-Side (bi) Values 9
Changes in Objective Function Coefficients 11
Computer Solution of Linear Programming Problems 13

CHAPTER FOUR: TRANSPORTATION PROBLEM


The Balanced Transportation Problem 1
Northwest Corner Method 4
Vogel’s Approximation Method 4
Determining the Optimal Solution 5
Stepping Stone Method 5
Modified Distribution Method 10
The Unbalanced Transportation Problem 14
Degeneracy 15
A Maximisation Transportation Problem 17

CHAPTER FIVE: THE ASSIGNMENT PROBLEM


The Hungarian Method 1
Unequal Supply and Demand 4

6
Operations Research Introduction

CHAPTER SIX: SIMULATION


Types of Models 1
The Simulation Process 2
Stochastic Simulation 2
Simulation of a Queuing System 4
Generation of Random Variates 6
Generating a Random Variate with a Probability Density Function 9
Determining the Distribution of Various Random Variables (Input Analysis) 12
Analysis of Simulation Output 17
Simulation Languages 19

CHAPTER SEVEN: NETWORK SCHEDULING


Components of CPM/PERT Network and Precedence Relationships 1
Activity Scheduling 4
Uncertainties in Activity Times (PERT) 9
Project Crashing 12

CHAPTER 8: INTERGER PROGRAMMING


Integer programming solution Methods 1
Rounding Approach 1
Ranch and Bound Method 2
Integer Programming Applications 8

7
Operations Research Linear Programming

LINEAR PROGRAMMING

Linear programming is perhaps the best known and one of the most widely used
techniques of OR (management science). It is a mathematical method of allocating scarce
resources to competing activities in the best possible (i.e. optimal) way.

Linear programming is very widely applied in government, health sector, military and
industry. In mining, linear programming has been applied in the following areas:
• Transportation, assignment and/or allocation
• Production planning, scheduling and optimum production process
• Product blending
• Facilities Location
• Investment Analysis etc.

MODEL FORMULATION
Once the problem has been identified and the applicability of linear programming
determined, the next step in solving an unstructured real-world problem is the formulation
of a mathematical model. This entails three major steps:

1. Identification of decision variables


2. The development of an objective function that is a linear relationship of the decision
variables, and
3. The determination of system constraints, which are also a linear relationship of the
decision variables that reflect the limited resources of the problem.

Some examples are presented to demonstrate the steps of linear programming problem
formulation.

Example 1
A manufacturing company wishes to determine how many of each of three different
products they should produce, given limited resources, to maximise total profit. The labour
and material requirements and the contribution to profit for each of the three products are
as follows:

Resource Requirement Profit


Labour Materials
hr/unit kg/unit $/unit
Product 1 5 4 3
Product 2 2 6 5
Product 3 4 3 2

There are 240 hours of labour available daily for production. The company is limited to
400 kg per day. The company wants to determine the quantity of each product to produce
to maximise total profit. Formulate the problem as a linear programming model.

Solution:

1
Operations Research Linear Programming

Decision variables:
Let x1 be the quantity of product 1 to be produced on a daily basis. Alternatively, let xi (i =
1, 2, 3) be the quantity of product i to be produced daily.

i.e. x1 = quantity of product 1 produced/day


x2 = quantity of product 2 produced/day
x3 = quantity of product 3 produced/day

Objective function:
• The objective is to maximise total profit.
Total profit is sum of profits gained from each product.
Profit from product 1 is determined by multiplying the unit profit, $3, by the number
of units produced, x1. Profit from products 2 and 3 are determined similarly.

Total profit, Z, can be expressed as

Maximise Z = 3x1 + 5x2 + 2x3


Where;
3x1 = profit from product 1
5x2 = profit from product 2
2x3 = profit from product 3

System Constraints:
In this problem the constraints are the limited amounts of labour and material available for
production. Production for each of the three products requires both labour and material
inputs. For product 1, the labour required to produce each unit is 5 hours. As such, the
labour requirement for product 1 is 5x1 hours. Similarly product 2 requires 2x2 hour of
labour and product 3 requires 4x3 hours.

Total labour hours available for production is 240.

5x1 + 2x2 + 4x3 < 240

Constraint for material requirement is formulated similarly:

4x1 + 6x2 + 3x3 < 400

Each decision variable is also restricted to a positive value since it would be illogical to
produce negative quantities of a product. This is called non-negativity constraints,
expressed mathematically as:

x1 > 0, x2 > 0, x3 > 0 OR xi > 0

The complete linear programming problem can be summarised as a mathematical model:

Maximise Z = 3x1 + 5x2 + 2x3


Subject to

2
Operations Research Linear Programming

5x1 + 2x2 + 4x3  240


4x1 + 6x2 + 3x3  400
x1, x2, x3  0

Example 2
A small mining company operates three mines. The ore from each mine is separated into
two grades before it is shipped. The daily production capacities of the mines and their
respective operating costs are shown in the following table:

High grade Low grade Operating


Ore t/day Ore t/day Cost $1000/day
Mine 1 4000 4000 20
Mine 2 6000 4000 22
Mine 3 1000 6000 18

Given that the company has committed itself to deliver 54000 tonnes of high grade and
65000 tonnes of low grade ore in a given week. Formulate a mathematical model to
determine the number of days each mine should be operated in the week in question if the
company is to fulfil its commitment at minimum total operating cost.

Solution:

Decision Variables:
Let xi (i = 1, 2, 3) be the number of days that the mine i is to be operated per week.

Objective Function:
The objective is to minimise total operating cost. If mine 1 operates for x1, days then the
cost of operating mine 1 is the daily operating cost (20,000) times number of days, x1 (=
20, 000 x1).
 Total operating cost for the three mines is: 20,000 x1 + 22000 x2 + 18000 x3
Since total cost is to be minimised, the objective function, Z, is given as:

Minimise Z = 20000x1 + 22000x2 + 18000x3

System Constraints:
1. High grade ore requirement:
For mine 1, if it operates x1, days then its production of high grade ore is 4000x1.
Similarly mines 2 and 3 can produce 6000x2 and 1000x3 tonnes of high grade ore
respectively. Total production of high grade ore is given as:

4000 x1 + 6000 x2 + 1000 x3

Since the company has committed itself to deliver 54000 tonnes of high grade ore it
means it should at least meet that commitment.
 4000x1 + 6000x2 + 1000x3  54000

2 Low grade ore requirement:


Similarly the low grade ore requirement constraint is:

3
Operations Research Linear Programming

4000x1 + 4000x2 + 6000x3  65000

3 Number of operating days per week:


Given that there are seven days in a week the number of days x1 that can be used for
production in each mine should be included.

x1  7
x2  7
x3  7

4 Non-negativity
No mine may operate a negative number of days.

X1 0
x2  0
x3  0

The linear programming model is given as follows:

Minimise Z = 20000x1 + 22000x2 + 18000x3

Subject to:
4000x1 + 6000x2 + 1000x3  54000
4000x1 + 4000x2 + 6000x3  65000
x1  7
x2  7
x3  7
x1, x2, x3  0

Example 3:
A refinery blends four petroleum components into three grades of gasoline- regular,
premium, and low lead. Management wishes to determine the optimal mix of the four
components that will maximise profit. The maximum quantities available of each
component and the cost per barrel are as follows:

Component Maximum Barrels Cost/Barrel


Available/Day $/Barrel
1 5000 9
2 2100 7
3 4000 12
4 1500 6

In order to ensure the proper blend for each gasoline grade, maximum or minimum
percentages of the components in each blend have been determined. The blends as well as
the selling price of each grade are given:

Grade Components Selling Price/

4
Operations Research Linear Programming

Specifications Barrel ($/barrel)

Regular Not less than 40% of 1 12.00


Not more than 20% of 2
Not less than 30% of 3
Premium Not less than 40% of 3 18.00
Low lead Not more than 50% of 2 10.00
Not less than 10% of 1

Decision Variables:
Company wants to know two main things:
• What number of barrels of each grade should be produced?
• How many barrels of each component should be blended to produce each grade

As such, the decision variables should reflect the quantity of each component that should
be used in each grade.

Let xij (i = 1,2,3,4, components, and j = R (regular), P (premium), and L (low lead) OR j =
1,2,3 grades where 1 = regular, 2 = premium and 3 = low lead) be barrels of component i
used in gasoline grade j per day.

This results in twelve decision variables.


Example x3p (x32) represents the barrels of component 3 in producing premium gasoline
grade per day. The amount of each grade of gasoline produced is actually made up of the
sum of the four components used in each grade as follows:

Regular: x11 + x21 + x31 + x41

Premium: x12 + x22 + x32 + x42

Low lead: x13 + x23 + x33 + x43

Objective Function:
The objective of the company is to maximise profit by blending optimally. In this case
both cost price and selling price are given. The selling price of regular, $12/barrel, should
be multiplied by the total number of barrels of regular grade produced, x11 + x21 + x31 +
x41. On the other hand the cost of component 1 is found by multiplying the number of
barrels of component 1 used for making the three grades of gasoline, x11 + x12 + x13, by the
cost/barrel of component 1, $ 9/barrel.

The profit is given by: Selling price - cost price.


Objective function, Z, is given by:
Maximise Z = 12 (x11 + x21 + x31 + x41) + 18 (x11 + x22 + x32 + x42)
+ 10 (x13 + x23 + x33 + x43) - 9 (x11 + x12 + x13)
- 7 (x21 + x22 + x23) - 12 (x31 + x32 + x33)
- 6 (x41 + x42 + x43)

Combining terms, the objective function reduces to:

5
Operations Research Linear Programming

Maximise Z = 3x11 + 5x21 + 6x41 + 9x12 + 11x22 + 6x32 + 12x42 + x13 + 3x23 - 2x33 + 4x43

System Constraints:
The two main sets of constraints are the available number of barrels of each component
and the blend requirements of each grade.

1. Maximum barrels of each component available per day:


3
x11 + x12 + x13  5000 or x
j =1
1j  5000
3
x21 + x22 + x23  2400 or x
j =1
2j  2400
3
x31 + x32 + x33  4000 or x
j =1
3j  4000
3
x41 + x42 + x43  1500 or x
j =1
4j  1500

2. Blending requirements for various grades:


For the regular grade the blending requirement is as follows:

x11
 0.4
x11 + x21 + x 31 + x 41

In a more proper LP form the expression becomes:

x11  0.4(x11 + x21 + x31 + x41)

0.6x11 - 0.4x21- 0.4x31- 0.4x41  0 (a)

x 21
 0.2
x11 + x21 + x 31 + x 41

- 0.2x11 + 0.8x21 - 0.2x31 - 0.2x41  0 (b)

x 31
 0.30
x11 + x 21 + x 31 + x 41

- 0.3x11 - 0.3x21 + 0.7x31 - 0.3x41  0 (c)

For the premium grade the blending requirement is as follows:

x 32
 0.4
x12 + x 22 + x32 + x 42

- 0.4x12 - 0.4x22 + 0.6x32 - 0.4x42  0 (d)

6
Operations Research Linear Programming

For low lead grade there are two blend requirements:

x 23
 0.5
x13 + x23 + x 33 + x 43

- 0.5x13 + 0.5x23 - 0.5x33 - 0.5x43  0 (e)

x13
 01
.
x13 + x 23 + x 33 + x 43

0.9x13 - 0.1x23 - 0.1x33 - 0.1x43  0 (f)

The complete LP model for the blend problem is summarised as:

Maximise Z = 3x11 + 5x21 + 6x41 + 9x12 + 11x22 + 6x32 + 12x42 + x13 + 3x23 - 2x33 + 4x43

Subject to:
x11 + x12 + x13  5000
x21 + x22 + x23  2400
x31 + x32 + x33  4000
x41 + x42 + x43  1500
0.6x11 - 0.4x21 - 0.4x31 - 0.4x41  0
- 0.2x11 + 0.8x21 - 0.2x31 - 0.2x41  0
- 0.3x11 - 0.3x21 + 0.7x31 - 0.3x41  0
- 0.4x12 - 0.4x22 + 0.6x32 - 0.4x42  0
- 0.5x13 + 0.5x23 - 0.5x33 - 0.5x43  0
0.9x13 - 0.1x23 - 0.1x33 - 0.1x43  0
xij  0

Example 4
An investment firm has $1000000 to invest in four alternatives: stocks, bonds, savings
certificates and real estate.

The firm wishes to determine the mix of investments that will maximise the cash value at
the end of six years. Investment opportunities in stocks and bonds are available at the
beginning of each of the next six years. Each dollar invested in stocks at the beginning of
each year will return $1.20 (a profit of $0.20) two years later and can be immediately
reinvested in any alternative. Each dollar invested in bonds at the beginning of each year
will return $1.40 three years later and can be reinvested immediately.

Investment opportunities in savings certificates are available only once, at the beginning of
the second year. Each dollar invested in certificates at the beginning of the second year
will return $1.80 four years later. Investment opportunities in real estate are available at
the beginning of the fifth and sixth years. Each dollar invested in real estate will return
$1.10 one year later.

7
Operations Research Linear Programming

In order to minimise risk, the firm has decided to diversify its investments. The total
amount invested in stocks cannot exceed 30% of total investments and at least 25% of
total investments must be in savings certificates.

The management of the firm wishes to determine the optimal mix of investments in the
various alternatives that will maximise the amount of cash at the end of the sixth year.

Solution:

Decision Variables:
A diagram of the investment process is given below to demonstrate the type of multiperiod
investment decisions that should be made.
Year 1 Year 2 Year 3 Year 4 Year 5 Year 6
S1 S3 S5
S2 S4
B1 B4
B2
B3
C2
R5 R6

Figure 1

Figure 1 shows each type of investment, the year in which it can be made and the time to
maturity. For instance S2 represents an investment in stocks at the beginning of year two.
The arrow leading from S2 goes to the end of year 3 when the return is realised.

Based on the notation in figure 1 the decision variables are defined as follows:

Si = amount of money invested in stocks at the beginning of year i, i = 1, 2, 3, 4, 5.


Bi = amount of money invested in bonds at the beginning of year i, i = 1, 2, 3, 4
C2 = amount of money invested in savings certificates at the beginning of year 2.
Ri = amount of money invested in real estate at the beginning of year i, i = 5, 6.
Ii = amount of money held idle and not invested at the beginning of year i.

Objective Function:
The objective of the firm is to maximise cash value at the end of the sixth year. From
Figure 1 the amount of money at the end of year six is based on S5, B4 and R6, and the
amount of money not invested at the beginning of year six.

The objective function is therefore:

Maximise Z = 1.2S5 + 1.4B4 + 1.1R6 + I6

System Constraints:
The two sets of constraints concern the investment opportunities in a given year and the
investment policies established by management.

Year 1:

8
Operations Research Linear Programming

At the beginning of year 1 the only investment opportunities available are stocks
and bonds. A maximum amount of 1000000 is available for investment. However,
the minimum maturity period is two years; hence if all the $1 million is invested
there will be no money to invest at the beginning of the second year. Let I1 be the
amount of money not invested at the beginning of year 1.

The investment opportunity constraint is given:


S1 + B1 + I1 = $1000000

Year 2:
In the second year, the investment opportunity is S2, B2 and C2. Let the amount at
the beginning of the second year be I2, then the investment opportunity constraint
is:
S2 + B2 + C2 + I2 = I1

Year 3:
Investment opportunity is S3 and B3. The amount available for investment is I2 +
1.2S1, where 1.2S1 is the matured value of the stock investment in year 1. Given I3
for year 3, investment opportunity constraint is:

S3 + B3 + I3 = 1.2S1 + I2

Year 4:
By similar deductions the investment opportunity constraint is:
S4 + B4 + I4 = 1.2S2 + 1.4B1 + I3

Year 5:
S5 + R5 + I5 = 1.2S3 + 1.4B2 + I4

Year 6:
R6 + I6 = 1.2S4 + 1.1R5 + 1.8C2 + 1.4B3 + I5

Management policy on stock investment:


5
Total investment in stock S
i =1
i

5 4 6
Total investment is given as: S + B
i =1
i
i =1
i + C2 +  Ri
i =5
Management requires that investment in stock does not exceed 30% of total investment.
5 5 4 6
  Si  0.30(  Si +  Bi + C2 +  Ri )
i =1 i =1 i =1 i =5

Management policy on savings certificates:

Management requires that at least 25% of total investment should be in savings


certificates:

9
Operations Research Linear Programming

5 4 6
 C2  0.25( Si +  Bi + C2 +  Ri )
i =1 i =1 i =5

With all constraints in proper form, the mathematical model for the multiperiod
investment problem is given:

Maximise Z = 1.2S5 + 1.4B4 + 1.1R6 + I6

Subject to:
S1 + B1 + I1 = $1000000
S2 + B2 + C2 + I2 - I1 = 0
S3 + B3 + I3 - 1.2S1 - I2 = 0
S4 + B4 + I4 - 1.2S2 - 1.4B1 - I3 = 0
S5 + R5 + I5 - 1.2S3 - 1.4B2 - I4 = 0
R6 + I6 - 1.2S4 - 1.1R5 - 1.8C2 - 1.4B3 - I5 = 0
5 4 6
0.7 Si − 0.3 Bi − 0.3C2 − 0.3 Ri  0
i =1 i =1 i =5
5 4 6
− 0.25 Si − 0.25 Bi + 0.75C2 − 0.25 Ri  0
i =1 i =1 i =5

Si, Bi, C2, Ri,  0

C2
1000000
S1
S2 S3 S4 S5
I1 I2 I3 I4 I5 I6
1 2 3 4 5 6 7
R5 R6
B1 B2 B4
B3

Figure 2 Network Representation of Multiperiod Investment Problem

The diagram in Figure 2 can be used as an alternative approach to solving the multiperiod
investment problem. The constraints for investment opportunities per year could be
derived from the flow at each node (1,…, 6). At every node the flow in should balance the
flow out. For instance at node 1, the flow in = $1000000 and the flow out = S1 + I1 + B1
Therefore, constraint for year 1 investment opportunity becomes:

S1 + B1 + I1 = $1000000
and so on.

General Form of Linear Programming Model

Maximise (or Minimise) Z = C1X1 + C2X2 + … + CjXj + … + CnXn

Subject to:

10
Operations Research Linear Programming

a11X1 + a12X2 + … + a1jXj + … + a1nXn ( = ) b1


a21X1 + a22X2 + … + a2jXj + … + a2nXn ( = ) b2
    
ai1X1 + ai2X2 + … + aijXj + … + ainXn ( = ) bi
    
am1X1 + am2X2 + … + amjXj + … + amnXn ( = ) bm
X1, X2,…,Xj,…, Xn  0

j = 1, 2, …, n
i = 1, 2, …, m
Cj = contribution per unit activity j
bi = amount of each resource, i, available
aij = amount of resource i consumed per unit of activity j
Properties of the General Linear Programming Model
In order to evaluate how well Linear Programming applies to any given problem, the
underlying assumptions of linearity should be satisfied to a large extent by the problem.
The four main assumptions of linearity are proportionality, additivity, divisibility and
certainty.

1. Proportionality: Proportionality assumption implies that the rate of change or slope of


the functional relationship is constant, and therefore changes of equal size in the value
of a variable will result in exactly the same relative change in the functional value. For
instance, if a11 = 5 and x1 = 2 then a11x1 = 10. If x1 is increased by 10% it becomes 2.2,
then a11x1 becomes 11 (2.25), which is also a 10% increase.
2. Additivity: Additivity assumes that there are no interactions between any of the
activities, so that there are no cross-product terms in the model. This implies that, for
each function, the total function value can be obtained by adding the individual
contributions from respective activities. For instance, if Z = 3x1 + 5x2 and x1 = 1 and
x2 = 1, then Z = 3 + 5 = 8
3. Divisibility: Divisibility assumes that activity units can be divided into any fractional
levels, so that non-integer values for decision variables are permissible.
4. Certainty: Certainty assumes that all parameters of the model (aij, bi and cj values) are
known constants. There is however a degree of uncertainty especially as the
parameters would be used to predict future conditions. Sensitivity analysis is normally
conducted as one means of accounting for uncertainty in the assumed parameter
values.

Since a model is an idealised representation of the real problem, some approximation is


normally required in practice to be able to apply Linear Programming. It is common in
real applications of Linear programming that almost none of the four assumptions hold
completely. Except perhaps for the divisibility assumption, minor disparities are to be
expected in many cases. This is especially true for certainty assumption.

Problems
1. MEG Corporation has two truck manufacturing plants. The two plants have the
capacity for producing two types of trucks. The net unit profit for producing truck

11
Operations Research Linear Programming

types 1 and 2 are $4000 and $3000 respectively. Plant 1 and 2 have the capacity to
produce 700, 900 trucks per year respectively, regardless of the type or combination
involved.

The amount of available space also imposes a limitation on the production rates of the
trucks. Plant 1, and 2 have 10000, 12000 m2 space available for a year's production of
trucks. Each of truck types 1 and 2 produced requires 12 and 10 m 2 of space
respectively.

Sales forecasts indicate that 800 and 1000 units of truck types 1 and 2, respectively,
can be sold per year. To maintain a uniform workload among the plants, management
has decided that the plants must use the same number of trucks.

Management wants to know how many of each of the truck types 1 and 2 should be
produced by each of the plants to maximize profits. Formulate a linear programming
model for this problem

2. An auto parts manufacturer makes crankshafts that are sold to auto, truck and tractor
manufacturers. Each of the different vehicles requires a different crankshaft. The
company is in the process of determining their production of each of the three types of
crankshafts for the upcoming planning period. Their marketing department has
forecasted the following maximum demand for each of the crankshafts during the
planning period:

Crankshafts Maximum Demand


Autos 175
Trucks 65
Tractors 160

The company sells auto crankshafts for $27.75, truck crankshafts for $34.50, and
tractor crankshafts for $30.00. As a matter of policy, they want to produce no less than
50% of the forecasted demand for each product. They also want to keep production of
tractor crankshafts to a maximum of 40% of total production.

The production department has estimated that the material costs for autos, trucks and
tractor crankshafts will be $4, $6 and $5.50 per unit respectively. The crankshafts are
processed through forge, lathe and grinding stations. In the upcoming planning period,
there will be 360 hours available for forge where the direct labour cost is $2.25 per
hour. The lathe station has 240 hours available with a direct labour cost of $2.50 per
hour. The grinding station has 480 hours available and the direct labour cost is $2.75
per hour. The standard processing rate for auto crankshafts is 3 hours in forge, 2 hours
in lathe and 1 hour in grinding. Truck crankshafts require 4 hours in forge, 1 hour in
lathe and 3 hours in grinding, while tractor crankshafts require 2 hours at each station.
The auto company wants to know the optimal plan for crankshaft production.
Formulate a linear programming model of this problem.

SOLVING LINEAR PROGRAMMING PROBLEMS

12
Operations Research Linear Programming

After formulating a mathematical model, the next stage is the solution of the model. Two
main approaches are used for solving a LP model. The most common approach is
algebraic - commonly called the Simplex Method. The graphical approach is also used in
cases where only two decision variables are involved. The graphical approach will be used
to illustrate how the solution of a Linear Programming model is derived.

GRAPHICAL INTERPRETATION OF LINEAR PROGRAMMING

The following product mix example will be used to illustrate the interpretation of a Linear
Programming problem.

Example:
A company produces two products, 1 and 2. Each product has resource requirements as in
the following table:

Resource Product1 Product 2 Total Resources Available


Material (kg/unit) 1 2 10 kg
Labour (hr/unit) 6 6 36 hr
Profit ($/unit) 4 5

Because of demand forecasts, a maximum of 4 units of product 1 will be produced.

Formulation of problem:

Max Z = 4x1 + 5x2

Subject to:
x1 + 2x2  10
6x1 + 6x2  36
x1  4

x1, x2  0

Graphing the model:


1. To graph constraint inequalities, treat them as equations.
2. Then plot equations on graph

For the first constraint:

x1 + 2x2 = 10
If x1 = 0 x2 = 5; if x2 = 0 x1 = 10
We therefore plot a straight line passing through (0,5) and (10,0), see Figure 3.

For the second constraint:

6x1 + 6x2 = 36
If x1 = 0 x2 = 6; if x2 = 0 x1 = 6
We plot a straight line passing through the (0,6) and (6,0), see Figure 3.

13
Operations Research Linear Programming

For constraint 3:

x1 = 4
We plot a straight line passing through (4, 0) and (4, 10), see Figure 3.

Since both x1 and x2 (x1, x2  0) should be positive we plot in the first quadrant.

12
x2

10
x1 = 4

8 •P

6 6x1+6x2=36
A
B
4
•Q
m C x1+2x2=10
2 Z=40
Z=20
n
Z=10 Z=28 •T
•R
0 D x1
E0 R 2 4 Z=26
6 8 10 12
R
Figure 3RGraphical representation of a Maximisation Problem
R

• Applying inequalities results in a region for each constraint.


• A region is formed that simultaneously satisfies all three constraints. This region is
represented by ABCDE on Figure 3. This is the feasible region (area).
• Any set of x1, x2 within the feasible region is a feasible solution and satisfies all the
constraints. Any set of x1, x2 outside the feasible region is not a feasible solution since
it violates one or more constraints.
R and Q are feasible solutions, while P and T are infeasible.
• To find the optimal solution that maximises profit the objective function Z, must be
plotted.
• Z is of an equation of a single line, but there is a multitude of lines depending on the
value of Z.
Various plots are given for Z = 10, 20, 26, 28, 40.
• All Zj values are parallel because all levels of the objective function (j = 1, 2, ...)
regardless of the value of Z have the same slope.

Z = 4x1 + 5x2
z 4
 x2 = − x1
5 5

14
Operations Research Linear Programming

 slope of objective function is -4x1/5 for any value of Z.

• It is also apparent that an infinite number of objective function lines exists. The lines
start from the origin and move out into solution space as Z increases. These lines are
iso-function lines (infinite number of parallel lines).
• Z5 > Z4 > Z3 > Z2> Z1  Z1 is not the best value of Z, as the objective function can
take on larger values. However it is equally clear that Z5 is not optimal because it lies
outside the feasible region.
Z4 has a point B (where x1 = 2 and x2 = 4) which lies in the feasible region and is larger
than all Zj values within the region.
• The slightest increase in the value of Z4 will cause it to fall outside the feasible region.
On the other hand a slight decrease in value of Z4 will cause it not to include the
optimal point.
Therefore the maximum value of Z is at point B.
• Since the optimal solution is at the intersection of two constraints, a corner point, the
values of x1 and x2 can be found by solving the two equations simultaneously.
x1 + x2 = 10, and
6x1 + 6x2 = 36
which results in x1 = 2 and x2 = 4
• Substituting the optimal value of x1 (= 2) and x2 (= 4) in the objective function results
in the optimal value of Z.
Z = 4x1 + 5x2 = 42 + 54 = 28.

Observations:
a) The optimal solution will always lie on the boundary of the feasible solution space.
b) The feasible region forms a convex set of points. This means that the boundary of the
feasible region comprises a set of straight lines (or flat planes) that converge at corners
(often referred to as extreme points). As a result there are no indentations in the
boundary.
c) The definition of convexity can be verified by observing that a line joining any two
points in the feasible region is also in the region. (line mn in Figure 3).
d) Due to the property of convexity, the boundary formed by constraint equations must
contain a set of points that includes a unique maximum value of Z. Therefore the
boundary must contain the optimal point.
e) The optimal solution is not only on the boundary of the solution space but more
specifically is at a corner point formed by intersection of two constraints. This is
because the corner points are protrusions, or extremes, in the convex set and, thus the
outermost points on the boundary.
f) For any linear programming problem each extreme point feasible solution is at the
intersection of n constraint equations. Where n is the number of decision variables.
g) Thus, the solution at any corner point can be found by solving n simultaneous
equations. Except in the case of multiple optimal solutions which occurs when the
objective function is parallel to a constraint line.

A linear problem is therefore solved graphically by determining the x1 and x2 values of the
corner points of the feasible region and substituting in the objective function to determine
the point which maximises or minimises the objective function.

In the case of the maximisation problem represented in Figure 3, the following approach is
used.

15
Operations Research Linear Programming

Point X1 X2 Z = 4x1 + 5x2


A 0 5 25
B 2 4 28 maximum
C 4 2 26
D 4 0 16
E 0 0 0

The optimal solution is x1 = 2 and x2 = 4 which is point B.

Graphical Solution of a Minimisation Problem

The Problem:

Minimise Z = 3x1 + 3x2

Subject to:
2x1 + 4x2  16
4x1 + 3x2  24
x1  2
x1, x2  0

Constraint 1:
If x1 = 0 x2 = 16/4 = 4
If x2 = 0 x1 = 16/2 = 8
Therefore plot the straight line passing through the points (0, 4) and (8, 0).

Constraint 2:
If x1 = 0 x2 = 24/3 = 8
If x2 = 0 x1 = 24/4 = 6
Therefore plot the straight line passing through the points (0, 8) and (6, 0).

Constraint 3:
x1 = 2; plot a straight line passing through (2, 0) and (2, 10).

Figure 4 is a graph of the LP minimisation problem showing the feasible region.

16
Operations Research Linear Programming

X2
12

x1=2
10

8
4x1+3x2=24

6 A

B C
2
z3=15 2x1+4x2=16
Z 4=9 z1=27 x1
0
Z 2=21
0 2 4 6 8 10 12

Figure 4 Graphical Representation of a Minimisation Problem

• From Figure 4, the values of points A, B and C and the corresponding Z values are
tabulated as follows.

Point X1 X2 Z = 3x1 + 3x2


A 2 16/3 22
B 2 3 15 minimum
C 24/5 8/5 19.2

The optimal solution is x1 = 2and x2 = 3 (at point B) and the minimum value is 15.

• In a minimisation problem, the optimal solution is generally at the point in the feasible
region closest to the origin.

Special Cases of the General Linear Programming Problem

1. Multiple Optimal Solutions


This exists when the objective function fall on more than one optimal point. This happens
when the slope of the objective function line is the same as that of one of the constraint
equations. The objective function passes through adjacent corner points.

Example:

Max. Z = 4x1 + 4x2


Subject to:
x1 + 2x2  10
6x1 + 6x2  36
x1  4
x1, x2  0

The graph of the problem is represented in Figure 5.

17
Operations Research Linear Programming

12 X2

x1=4
10

6
6x1+6x2=36

B
4

C x1+2x2=10
2

Z=24
0 x1
0 2 4 6 8 10 12

Figure 5 Graphical Representation of a Case of Multiple Optimal Solutions

At the maximum boundary Z touches one of the constraint lines. This line contains B and
C (Figure 5), which are referred to as alternate optimal solutions. An infinite number of
points lies between B and C which are also optimal.

Practically multiple optimal solutions means that there are several options for an optimal
decision.

2. An Infeasible Problem
An infeasible problem occurs when there are no points simultaneously satisfying all
constraints.

Example:

Maximise Z = 5x1 + 3x2


4x1 + 2x2  8
x1  3
x2  7
x1, x2  0

The graphical representation of the example is shown in Figure 6.

It could be seen that there is no region that satisfies all three constraints simultaneously.
Point A satisfies the first constraint,
Point B does not satisfy any of the constraints,
Point C satisfies the second and third constraints,
Point D satisfies the third constraint, and
Point E satisfies the second constraint.

18
Operations Research Linear Programming

The model is an infeasible problem since there is no feasible region.


X2
12

x1=4
10
.D .C

8
x2=7

6 .B

.E
4 4x1+2x2=8

2
.A
0 X1
0 5 10 15

Figure 6 Graphical Representation of an Infeasible Problem

3 An Unbounded Problem
• In an unbounded problem the feasible region is not totally confined within a boundary.
• In such a case, objective function can increase indefinitely without reaching a limit,
since it does not reach a constraint boundary.

Example:
Max. Z = 4x1 + 2x2
Subject to:
-x1 + 2x2  6
-x1 + x2  2
x1, x2  0

A graphical representation of the example is presented in Figure 7.

• An unbounded problem normally comes about only when a mistake occurs in the LP
formulation or when a constraint is inadvertently omitted.
• In case of a minimisation problem, if all variables are restricted to be non-negative, the
solution will occur at the origin.

19
Operations Research Linear Programming

x2
9

5 -x1+x2=2

4
-x1+2x2=6
3

2
Z=16
1

x1
0
0 1 2 3 4 5

Figure 6 Graphical Representation of an Unbounded Problem

Problem
Solve the following linear programming problem graphically.
Min. Z = 20x1 + 16x2
Subject to:
3x1 + x2 ≥ 6
x1 + x2 ≥ 2
2x1 + 6x2 ≥ 12
x1, x2  0

THE SIMPLEX METHOD

The Simplex Method is a method for solving linear programming problems. It involves the
following general steps:
1. Transformation of the general LP model into standard form (Augmentation).
2. Definition of the initial solution (set xi = 0, i = 1,2, …, n constraints).
3. Searching for a better solution (if one exists).
4. Repeating of step 3 until a better solution cannot be found. At this point the Simplex
process terminates and the optimal solution(s) is found.

The Simplex Method in Application to a Maximisation Problem

Example:
Max. Z = 100x1 + 80x2
Subject to:
2x1 + 4x2  80
3x1 + x2  60
x1, x2  0

20
Operations Research Linear Programming

1. Transform LP model to standard form.


• The Simplex Method employs algebraic method of solution; hence it entails the
solution of a set of simultaneous equations.
• Therefore LP constraint inequalities should be converted to equations.
• Inequalities () are converted to equations by adding a slack variable to each
constraint. For the above example problem:
2x1 + 4x2 + s1 = 80
3x1 + x2 + s2 = 60

Slack variables are amount of unused resources.

If x1 = 20 and x2 = 0, then

2(20) + 4(0) + s1 = 80; s1 = 40

3(20) + 0 + s2 = 60; s2 = 0

Since slack variables are unused resources, they contribute nothing to profit
maximisation. The objective function therefore becomes:

Max Z = 100x1 + 80x2 + 0s1 + 0s2

The General Simplex Tableau


The steps involved in the Simplex method are conducted in the framework of a tableau
(table). This contributes to computational simplicity and facilitates understanding. Several
formats of the tableau are available but they perform identical functions. The Simplex
tableau showing the various column and row headings for the example is shown in the
following table.

Cj C1 C2 C3 C4
Cb basis bi x1 x2 s1 s2

Zj
Cj-Zj

Where:
Cj Is profit or cost coefficient of objective function
Cb Profit or cost coefficient of objective function for solution variables in the basis.
Basis Variables currently in the solution set. Referred to as the basic solution.
bi Initially, the right hand side of constraints. During iteration bi’s are solution values
corresponding to variables in the basis.
Zj The decrease in profit associated with the production of one unit of each variable.
Cj-Zj Per unit increase in profit of entering a non-basic variable in the solution base.

The Initial Simplex Tableau

21
Operations Research Linear Programming

The standard form of the model in the example is as follows:

Max Z = 100x1 +80x2 + 0s1 + 0s2


Subject to:
2x1 + 4x2 + s1 = 80
3x1 + x2 + s2 = 60
x1, x2, s1, s2  0

This is represented in the initial tableau following:

Cj 100 80 0 0
Cb basis bi x1 x2 s1 s2
0 s1 80 2 4 1 0
0 s2 60 3 1 0 1 Pivot row
Zj 0 0 0 0 0
Cj-Zj 100 80 0 0
Pivot column
• Given a linear programming problem with m constraints and n variables, there will
always be n-m non-basic variables and m basic variables.
Basic variables have solution values.
Non-basic variables are variables not in the solution basis, thus have zero values.
• The easiest basic solution to identify is at the origin (like in a graphical case) where
x1 = 0 and x2 = 0.
Therefore the initial basic solution is:
2(0) + 4(0) + s1 = 0;
s1 = 80
3(0) + 1(0) + s2 = 60
s2 = 60
• s1,s2 are the initial basic solution.

Zj values are computed as follows:


Multiply each aij value in the same column by its corresponding Cb value and sum these
products.
For the example, Zb is given as:
Cb  bi
0  80 = 0
0  60 = 0
Zb = 0

Zb is the total profit contribution of the basic solution.


Other Zj values are computed similarly. E.g. Z1 is given as:

Cb  x1
0 2=0
0 3=0
Z1 = 0

Cj-Zj is computed by subtracting Zj value from corresponding Cj value.

22
Operations Research Linear Programming

The Entering Non-basic Variable:


The entering non-basic variable is the one that results in the largest increase in profit per
unit.
In this case x1 is the entering variable since it has the largest Cj-Zj value (100).
The x1 column is the pivot column.

The Leaving Basic Variable:


Since x1 is to enter the basis, one of the existing basic variables should leave the basis. The
leaving basic variable is determined as follows:

Divide the values in the basis (bi) by the corresponding values in the pivot column and
select the variable with the minimum nonnegative quotient.

In this case:
basis bi x1
s1 80  2 = 40
s2 60  3 = 20 pivot row

The minimum corresponds to s2  s2 leaves the basis to be replaced by x1. The pivot
number is the number which corresponds to the pivot column and pivot row. This is
identified by a circle. In this case it is 3 .

The Second Simplex Tableau


In the second tableau x1 is now substituted for s2 which has left the basic solution.
The row values in the second tableau corresponding to the pivot row in the previous
tableau are computed by dividing the previous cell values by the pivot number. In this case
the cell numbers are each divided by 3, as follows:

60 3 1 0 1
, , , ,
3 3 3 3 3
old pivot row values
i.e. New pivot row values =
pivot number

These numbers represent the rate of substitution of x1 for every other variable shown at the
top of each column. The resulting values are shown in the following tableau.

Cj 100 80 0 0
Cb basis bi x1 x2 s1 s2
0 s1
1 1
100 x1 20 1 3
0 3

Zj
Cj-Zj

The cell values of the second and any other row apart from the pivot row, is computed as
follows:

23
Operations Research Linear Programming

 corresponding coefficients corresponding new


New row value = old tableau row value -   
 in pivot column pivot row values 

Columns old row coefficient in New pivot


-  =
values pivot column row value New row value
bi 80 - (2  20) = 40
x1 2 - (2  1) = 0
x2 4 - (2  1
3 ) =
10
3

s1 1 - (2  0) = 1
s2 0 - (2  1
3 ) = − 23

The second tableau therefore completes as follows:

Cj 100 80 0 0
Cb basis bi x1 x2 s1 s2
0 s1 40 0 10
3
1 − 23 out
100 x1 20 1 1 0 1
3 3

Zj 2000 100 100


3
0 100
3

Cj-Zj 0 46 23 0 − 100
3

in
s1 = 40 represents the remaining slack given that x1 = 20.
The total profit at this stage = 2000

The Third Simplex Tableau


Since we still have a positive Cj-Zj value (46 23 ) it implies that the solution can be
improved to increase profit.

The highest per unit increase in contribution to profit is 46 23 . Since this corresponds to x2,
x2 is the entering non-basic variable (new pivot column).
Dividing bi values by their corresponding values in x2 column yields:

s1 : 40  103 = 12
x1: 20  13 = 60
Since 12 is the minimum nonnegative value it implies that s1 is the leaving basic variable.
10
3 is therefore the new pivot number.

The cell values for the third tableau are computed using the same procedure as in the case
of the second tableau.

The values in the x2 row are obtained by dividing the old pivot row values by the pivot
number ( 103 ). The values in the second row (x1) are computed as follows:

columns old row coefficient in new pivot new row


-  =
values pivot column row value value

24
Operations Research Linear Programming

bi 20 - ( 13  12) = 16
x1 1 - ( 13  0) = 1
-
x2  1) 0
1
3 ( 13 =
-
s1 0 ( 13  ) 3
10 = − 101
-
s2 1
3 ( 13  −5)
1
= 2
5

The completed third tableau is shown below:

Cj 100 80 0 0
Cb basis bi x1 x2 s1 s2
80 x2 12 0 1 3
10 − 15
100 x1 16 1 0 − 101 2
5

Zj 2560 100 80 14 24
Cj-Zj 0 0 -14 -24

The Optimal Simplex Tableau


It is observed that there are no positive values in the Cj-Zj row of the third tableau. There
are zero values corresponding to the x1, x2 columns, since these are basic variables. The
values in s1, s2 columns imply that an introduction of one unit of s1 in the basis will
decrease profit by 14 units. Also an introduction of a unit of s2 into the basis will decrease
profit by 24 units.

Since there are no positive Cj-Zj values it implies that there are no non-basic variables that
could be selected into the basis to further increase profit. The simplex process terminates
and the optimal solution is found.

The optimal solution is:


x1 = 16
x2 = 12
The corresponding maximum profit, Z = 2560.

Summary of the Simplex Process for Maximisation


1. Transform the problem into standard form. Convert inequalities to equations with
slack variables.
2. Set up the initial tableau.
3. Determine the entering non-basic variable (i.e. the pivot column).
4. Determine the leaving basic variable (i.e. The pivot row).
5. Compute the new tableau row values.
6. Check whether the solution is optimal. If not optimal go to step 3 and repeat the
subsequent steps.

The Minimisation Problem

25
Operations Research Linear Programming

In general, the steps of the simplex method outlined in the maximisation problem (just
presented in the previous section) are used for any type of linear programming problem. A
minimisation problem however, requires modifications in the normal simplex process.

The following example will be used to demonstrate the application of the simplex method
to a minimisation problem.

Example:
Min Z = 4x1 + 3x2
Subject to:
2x1 + 4x2  16
3x1 + 2x2  12
x1, x2  0

Transformation into Standard Form


Surplus (negative slack) variables are subtracted from constraints to obtain equations. A
surplus variable represents an excess above a stated requirement. Surplus variables are
therefore subtracted.

For the given example the constraints become:


2x1 + 4x2 - s1 = 16
3x1 + 2x2 - s2 = 12

Check:
If x1 = 20 and x2 = 0
for constraint 1: 2(20) + 4(0) - s1 = 16
s1 = 24

Going by the same approach used in the maximisation problem, the initial basic solution
has x1 = x2 = 0.

In the case:
2(0) + 4(0) - s1 = 16
 s1 = -16
3(0) + 2(0) - s2 = 12
 s2 = -12

The negative values of s1 and s2 violate the non-negativity restriction x1, x2  0 of linear
programming.

It is clear in figure 8 that the origin (x1 = x2 = 0) is outside the feasible region. This implies
that this approach is not feasible.

Artificial Variables
In order to facilitate the solution of the problem artificial variables (Ai) are introduced.
Artificial variables have no real meaning. An artificial variable is introduced to give a
positive solution at the origin.

26
Operations Research Linear Programming

3x1+2x2=12
5

1 2x1+4x2=16

0
0 2 4 6 8 10

Figure 8

By the addition of artificial variables the equations become:


2x1 + 4x2 - s1 + A1 = 16
3x1 + 2x2 - s2 + A2 = 12

Now at the origin, x1 = 0, x2 = 0, s1 = 0, s2 = 0, hence


2(0) + 4(0) - 0 + A1 = 16
A1 = 16
3(0) + 2(0) - 0 + A2 = 12
A2 = 12

In the objective function the coefficients of the surplus variables (like slack variables) are
zero (0). This is because a surplus variable has no effect on the objective function in terms
of increasing or decreasing profits.

Since the artificial variables have no real meaning, a means is provided to ensure that they
do not appear in the optimal solution.

This is accomplished by assigning very large Cj values for the Ai’s. In a minimisation
problem the objective is to minimise cost. Therefore the inclusion of a variable in the final
tableau will depend on how much it contributes to minimising cost. A variable with a very
large coefficient will not be a good candidate for minimising cost and will therefore not
appear in the optimal solution.

This method of introducing large artificial variable coefficients in the objective function is
called the Big M Method. M is used as the large value (e.g. 1000 000).

Based on the foregoing the objective function becomes:


Min Z = 4x1 + 3x2 + 0s1 + 0s2 + MA1 + MA2

The model then transforms into the following:


Min Z = 4x1 + 3x2 + 0s1 + 0s2 + MA1 + MA2
Subject to:
2x1 + 4x2 - s1 + A1 = 16

27
Operations Research Linear Programming

3x1 + x22 - s2 + A2 = 12
x1, x2, s1, s2, A1, A2  0

The Initial Tableau


Using the augmented (transformed) problem the initial tableau is presented as follows:

Cj 4 3 0 0 M M
Cb basis bi x1 x2 s1 s2 A1 A2
M A1 16 2 4 -1 0 1 0 out
M A2 12 3 2 0 -1 0 1
Zj 28M 5M 6M -M -M M M
Zj-Cj 5M-4 6M-3 -M -M 0 0

in
Note that Cj-Zj has changed to Zj-Cj.
Zj-Cj - Is the net per unit decrease in cost for each variable. This brings about consistency
with the previous procedure, so that the largest positive value of Zj-Cj is used for
the entering non-basic variable. Otherwise using Cj-Zj implies the most negative
value will be used for the entering non-basic variable.

The entering non-basic variable x2 (pivot column) replaces the leaving basic variable A1
(pivot row). Using the same procedure the values in the new pivot row (x2 row) are
obtained by dividing all entries in the old row (A1 row) by the pivot number 4 . The cell
values for the second row are obtained as follows:

columns old row coefficient in new pivot new row


-  =
values pivot column row value value
bi 12 - (2  4) = 4
1
x1 3 - (2  2 ) = 2
x2 2 - (2  1) = 0
s1 0 - (2  − 41 ) = 1
2

s2 -1 - (2  0) = -1
A1 0 - (2  1
4 ) = - 21
A2 1 - (2  0) = 1

This results in the following second tableau:

Cj 4 3 0 0 M M
Cb basis bi x1 x2 s1 s2 A1 A2
1
3 x2 4 2
1 - 41 0 1
4
0
M A2 4 0 1 -1 1 out
2 2 - 21
3
Zj 12+4M 2 +2M 3 - 43 + M
2
-M M
Zj-Cj 2M- 25 0 M
2 - 43 -M 0

in

28
Operations Research Linear Programming

Note that the A1 column is cancelled out. A1 being an artificial variable will not re-enter
the basis, once it leaves the basis. Therefore any column involving an artificial variable
can be cancelled out in such a situation to facilitate the process.

The Third Tableau

By the same procedure the third tableau results.


Cj 4 3 0 0 M M
Cb basis bi x1 x2 s1 s2 A1 A2
3 x2 3 0 1 - 83 1
4
4 x1 2 1 0 1
4 - 21
Zj 17 4 3 - 81 - 45
Zj-Cj 0 0 - 81 - 45

It should be observed that all the values in the Zj-Cj row are not positive. Since Zj-Cj  0
the solution is optimal.

The optimal solution is:


x1 = 2, x2 = 3

The minimum value of Z = 17

A Mixed Constraint Problem


The previous two examples for maximisation and minimisation problems used constraints
of the standard form. The maximisation problem had all () constraints while the
minimisation problem had all () constraints.

Consider the following problem:


Max Z = 20x1 + 10x2
subject to:
x1 + x2 = 150
x1  40
x2  20
x1, x2  0

This is a mixed constraint problem. It has (=),() and () constraints, although it is a
maximisation problem.

The Simplex procedure will be used to solve this problem.

Transformation to Standard Simplex Form


(a) Converting an equality constraint.
x1 + x2 = 150 seems to be in the standard simplex form, since we want equations. However
the initial solution where x1 = 0, x2 = 0 (origin) will result in an impossibility:
x1 + x2 = 150
0+0=0
 0 = 150 impossible.

29
Operations Research Linear Programming

Since an equal sign indicates a strict condition where there are neither unused resources
nor the possibility of over-achieving a specified requirement, slack or surplus variables are
not appropriate.

An artificial variable is therefore used to make the constraint realistic at the origin and
meet the strict equality condition.
This becomes:
x1 + x2 + A1 = 150

(b) Converting a () Constraint in a Maximisation Problem


This is done in a same way as described for a maximisation problem: - A surplus variable
is subtracted and an artificial variable is added.
Constraint 3 becomes:
x2 - s2 + A2 = 20
However the Cj value assigned to the artificial variable in the objective function is no
longer positive, it is negative. Since the objective is to maximise profit a positive large
value will cause the artificial variable to remain in the optimal solution. A negative M
value is therefore introduced for all artificial variables in the objective function, including
those for equality constraints. Since this is a maximisation problem a large negative value
(-M) will not be in the optimal solution.

The model is transformed to:


Max Z= 20x1 + 10x2 + 0s1 + 0s2 - MA1 - MA2
Subject to:
x1 + x2 + A1 = 150
x1 + s1 = 40
x2 - s2 + A2 = 20
x1, x2, s1, s2, A1, A2  0

Using the same procedure the following simplex tableaux result.

The Initial Tableau

Cj 20 10 0 0 -M -M
Cb basis bi x1 x2 s1 s2 A1 A2
-M A1 150 1 1 0 0 1 0
0 s1 40 1 0 1 0 0 0
-M A2 20 0 1 0 -1 0 1 out
Zj -170M -M -2M 0 M -M -M
Cj-Zj 20+M 10+2M 0 -M 0 0
in

The Second Tableau

Cj 20 10 0 0 -M
Cb basis bi x1 x2 s1 s2 A1

30
Operations Research Linear Programming

-M A1 130 1 0 0 1 1
0 s1 40 1 0 1 0 0 out
10 x2 20 0 1 0 -1 0
Zj 200-130M -M 10 0 -10-M -M
Cj-Zj 20+M 0 0 10+M 0

in
The Third Tableau

Cj 20 10 0 0 -M
Cb basis bi x1 x2 s1 s2 A1
-M A1 90 0 0 -1 1 1 out
20 x1 40 1 0 1 0 0
10 x2 20 0 1 0 -1 0
Zj 1000-90M 20 10 20+M -10-M -M
Cj-Zj 0 0 -20-M 10+M 0
in
Fourth Tableau

Cj 20 10 0 0
Cb basis bi x1 x2 s1 s2
0 s2 90 0 0 -1 1
20 x1 40 1 0 1 0
10 x2 110 0 1 -1 0
Zj 1900 20 10 10 0
Cj-Zj 0 0 -10 0

Since all the values in the Cj-Zj row are non-positive the solution is optimal.
The optimal solution is:
s2 = 90
x1 = 40
x2 = 110

The maximum value Z = 1900.

Various Simplex Constraint Types and their Resolutions

Objective Function Coefficient


Constraint Adjustment in Constraint Maximisation Problem Minimisation
Problem
 Add a slack variable 0 0
= Add an artificial variable -M M
 Subtract a surplus variable 0 0
and add an artificial -M M
variable
Negative Variables
Linear Programming problems analysed so far are based on a non-negativity restriction.
This is true in most practical situations. However in some cases decision variables can be

31
Operations Research Linear Programming

used to define such concepts as production rates. A negative value implies a decrease in
the rate of production while a positive value implies an increase in the rate of production.

Since negative values are not allowed in the Simplex method, any problem with possible
negative values should be converted to an equivalent problem with positive variables. Two
general cases of non-negativity exists:
I. Variables that are unrestricted (unbounded) and
II. Variables that are negative within a given bound.

I Unrestricted Variables
Any or all of the decision variables are said to be unrestricted if they can take on negative
as well as positive values.
Unrestricted variables are converted to positive variables as follows:
x j = x j − x

Where xj = the unrestricted variable and


x j , x  0

Example:
Max Z = 9x1 + 18x2
subject to:
6x1 + 3x2  18
2x1 + 2x2  16
x1 - unrestricted
x2  0

Where x1 and x2 are production rate of products 1 and 2.

In order to convert, substitute x1 - x for x1.


( x is not subscripted because it can be used for any number of variables in a problem).

The problem becomes:


Max Z = 9( x1 - x ) + 18x2
subject to:
6( x1 - x ) + 3x2  18
2( x1 - x ) + 2x2  16
x1 , x , x2  0
The standard simplex form of the model is as follows:

Max Z = 9 x1 - 9 x + 18x2 + 0s1 + 0s2 - MA1


subject to:
6 x1 - 6 x + 3x2 - s1 + A1 = 18
2 x1 - 2 x + 2x2 + s2 = 16
x1 , x , x2, s1, s2, A1  0

The problem is solved using the simplex procedure.

32
Operations Research Linear Programming

Cj 9 -9 18 0 0 -M
Cb basis bi x1 x x2 s1 s2 A1
-M A1 18 6 -6 3 -1 0 1 out
0 s2 16 2 -2 2 0 1 0
Zj -18M -6M 6M -3M M 0 -M
Cj-Zj 9+6M -9-6M 18+3M -M 0 0
in
Cj 9 -9 18 0 0
Cb basis bi x1 x x2 s1 s2
9 x1 3 1 -1 1
2 - 16 0 out
0 s2 10 0 -0 1 1 1
3

Zj 27 9 -9 9
2 - 96 0
27 9
Cj-Zj 0 0 2 6
0
in
Cj 9 -9 18 0 0
Cb basis bi x1 x x2 s1 s2
18 x2 6 2 -2 1 - 13 0
0 s2 4 -2 2 0 2 1 out
3

Zj 108 36 -36 18 -6 0
Cj-Zj -27 27 0 6 0
in
Cj 9 -9 18 0 0
Cb basis bi x1 x x2 s1 s2
18 x2 10 0 0 1 - 13 1
-9 x 2 -1 1 0 1
1
2
3

Zj 162 9 -9 18 3 27
2

Cj-Zj 0 0 0 -3 - 272

The fourth tableau is optimal. The optimal solution is:

x2 = 10
x = 2
x1 = 0 - non-basic
Z = 162

Find the value of x1 by substitution in constraints.


x1 = x1 - x = 0 - 2 = -2

The value of x1 can be checked by substitution into original problem:


6(-2) + 3(10)  18

33
Operations Research Linear Programming

2(-2) + 2(10)  16

Z = 9(-2) + 18(10) = 162

Optimal solution is x1 = -2, x2 = 10 and maximum value, Z = 162

II Variables with a Negative Bound


Variables can also be negative but bounded. E.g. x1  -20.
This is handled similar to the unrestricted case, except that x is replaced by the boundary
value, 20.
x1 = x1 -20

Negative Right-Hand-Side Values

For example:
-5x1 + x2  -25

In the initial solution x1 = 0, x2 = 0.


Therefore in the standard form:
-5x1 + x2 + s1 = -25
s1 = -25
which violates the non-negativity restriction on s1.
To resolve this multiply the constraint by -1.
-1(-5x1 + x2  -25)
5x1 - x2  25

Other Complications and their Resolutions


1. Tie for the Pivot Column:
The entering non-basic variable can be determined by selecting the largest (Cj-Zj) or
Zj-Cj) value.
Break a tie by arbitrarily selecting between the tied values. There is no wrong choice,
however, the selection of one variable may result in more simplex iterations than the
other tied variable.
2. Tie for the Pivot Row and Degeneracy
This is illustrated with the following example:

Cj 4 6 0 0 0
Cb basis bi x1 x2 s1 s2 s3
0 s1 40 6 4 1 0 0 40/4=10
0 s2 16 1 0 0 1 0 tie
1
0 s3 10 2
1 0 0 1 10/1=10
Zj 0 0 0 0 0 0

34
Operations Research Linear Programming

Cj-Zj 4 6 0 0 0
in

It is seen that x2 is the entering non-basic variable. Two rows, s1 and s3, are tied for the
leaving basic variable. If s3 is chosen arbitrarily the following tableau results:

Cj 4 6 0 0 0
Cb basis bi x1 x2 s1 s2 s3
0 s1 0 4 0 1 0 -4
0 s2 16 1 0 0 1 0
6 x2 10 1
2
1 0 0 1
Zj 60 3 6 0 0 6
Cj-Zj 1 0 0 0 -6
in
It is seen in the second tableau that a basic variable (s1) has assumed a value of zero.
This is an occurrence that results from tied rows and is referred to as degeneracy. The
zero bi value can lead to a series of solutions with the same Zj value, in this case 60.
This is referred to as cycling or looping, and can theoretically continue infinitely with
the simplex method never yielding an optimal solution. In practice, however, after a
number of such loops, the simplex procedure will usually proceed normally and reach
an optimal solution.

In general, the best way to break the tie between rows is to simply select one
arbitrarily. Tie breaking methods have been developed to prevent infinite looping but
this will not be discussed here.

3. An Unbounded Problem
In an unbounded problem the objective function can increase indefinitely without ever
reaching a constraint boundary. The following tableau illustrates an unbounded
problem.

Cj 7 4 0 0
Cb basis bi x1 x2 s1 s2
0 s1 6 0 -2 1 -1
7 x1 2 1 -1 0 1
Zj 14 7 -7 0 7
Cj-Zj 0 11 0 7
in
From the tableau the entering non-basic variable is x2.
• However, it is impossible to select a pivot row and a leaving basic variable since
both pivot column values are negative.
• The tableau does not indicate optimal solution but the process cannot continue.
• As x2 enters solution basis neither of the basic variables act as a bound on the
problem. The basic variables increase as x2 increases and as a result Z increases
indefinitely.

35
Operations Research Linear Programming

In general, if a pivot row cannot be selected for lack of a positive ratio or if all a ij values in
the pivot column are negative or zero, the solution is unbounded.

4. Multiple Optimal Solutions


Consider the following final simple tableau for a maximisation problem.

Cj 4 2 0 0
Cb basis bi x1 x2 s1 s2
4 x1 10 1 1
2
1
2
0
0 s2 4 0 2 -1 1
Zj 40 4 2 2 0
Cj-Zj 0 0 -2 0

The tableau shows the solution is optimal since all Cj-Zj  0. However x2 is a non-
basic variable that has a Cj-Zj value not positive or negative but zero. This implies that
entering x2 will not result in a change in profit (values of Zj) but will result in a
different solution mix.
If x2 is selected as an entering non-basic variable the following tableau results:

Cj 4 2 0 0
Cb basis bi x1 x2 s1 s2
3
4 x1 9 1 0 4 - 41
2 x2 2 0 1 - 21 1
Zj 40 4 2 2 0
Cj-Zj 0 0 -2 0

This is also an optimal solution with the same objective function value as the previous.

This implies that the optimal solution can either be x1 = 10 and s2 = 4 or x1 = 9 and x2
= 2 both with an objective function value of 40.
These are the adjacent corner point solutions. All points in-between the adjacent corner
points are also optimal solutions.

In general, when Cj-Zj (Zj-Cj) indicates an optimal solution, and the values of any non-
basic variables are zero, multiple optimal solutions exist.

To find the alternate optimal solution(s) the non-basic variable with Cj-Zj (Zj-Cj) value
of zero should be selected as the entering variable and the simplex process continued.

5. An Infeasible Problem
This normally occurs when the problem has incompatible constraints, as a result there
is no common feasible solution space. An infeasible problem may not always be
apparent as the problem is formulated or during the simplex process.

One way of identifying an infeasible problem is the existence of an artificial variable


in the final solution base.

36
Operations Research Linear Programming

The Two Phase Simplex Method


The Two Phase Simplex method is an alternative approach to the Big M method for
handling artificial variables. In this case the LP problem is solved in two phases.

Phase 1
This phase consists of finding an initial basic feasible solution to the original problem.
This results in the removal of the artificial variables. For this an artificial objective
function is created which is the sum of all artificial variables. The artificial objective is
then minimised using the simplex method. If the minimum value of the artificial
problem is zero, then all the artificial variables have been reduced to zero, and we have
a basic feasible solution to the original problem. We then will proceed to phase 2.

In case the minimum value of the artificial problem is positive, then at least one of the
artificial variables is positive. This means that the original problem without the
artificial variables is infeasible. Since the artificial variables have no meaning it
implies the original problem is infeasible and the process is terminated.

Phase 2
In this phase, the basic feasible solution found at the end of phase 1 is optimised with
respect to the original objective function. In other words the final tableau of phase 1
becomes the initial tableau of phase 2 after changing the objective function. The
simplex method is then applied to find the optimal solution.

Let us use the two phase method to solve the mixed constraint problem that was solved
earlier with the Big M method.
Max Z = 20x1 + 10x2
subject to:
x1 + x2 = 150
x1  40
x2  20
x1, x2  0

In the standard form the constraints are:

x1 + x2 + A1 = 150
x1 + s1 = 40
x2 - s2 + A2 = 20
x1, x2, s1, s2, A1, A2  0

The phase 1 objective is:

Minimise Z = A1 + A2

Tableau 1 is presented as follows:

Tableau 1
Cj 0 0 0 0 1 1
Cb basis bi x1 x2 s1 s2 A1 A2
1 A1 150 1 1 0 0 1 0
0 s1 40 1 0 1 0 0 0
out
37
Operations Research Linear Programming

1 A2 20 0 1 0 -1 0 1
Zj 170 1 2 0 -1 1 1
Zj-Cj 1 2 0 -1 0 0

in
Tableau 2
Cj 0 0 0 0 1 1
Cb basis bi x1 x2 s1 s2 A1 A2
1 A1 130 1 0 0 1 1 -1 out
0 s1 40 1 0 1 0 0 0
0 x2 20 0 1 0 -1 0 1
Zj 130 1 0 0 1 1 -1
Zj-Cj 1 0 0 1 0 -2
in
Tableau 3
Cj 0 0 0 0 1 1
Cb basis bi x1 x2 s1 s2 A1 A2
0 s2 130 1 0 0 1 1 -1 out
0 s1 40 1 0 1 0 0 0
0 x2 150 1 1 0 0 1 0
Zj 0 0 0 0 0 0 0
Zj-Cj 0 0 0 0 -1 -1

Phase 1 is optimal since Zb = 0.

Phase 2
The original objective function in standard form is:
Max Z = 20x1 + 10x2 + 0s1 + 0s2

Therefore update the optimal tableau in phase 1 as follows:

Tableau 1
Cj 20 10 0 0
Cb basis bi x1 x2 s1 s2
0 s2 130 1 0 0 1
0 s1 40 1 0 1 0 out
10 x2 150 1 1 0 0
Zj 1500 10 10 0 0
Cj-Zj 10 0 0 0
in
Tableau 2
Cj 20 10 0 0

38
Operations Research Linear Programming

Cb basis bi x1 x2 s1 s2
0 s2 90 0 0 -1 1
20 x1 40 1 0 1 0
10 x2 110 0 1 -1 0
Zj 1900 20 10 10 0
Cj-Zj 0 0 -10 0

The solution is optimal since the Cj-Zj values are all  0


The optimal solution is:
x1 = 40
x2 = 110
s2 = 90
The maximum value of Z = 1900.

Problems
Solve the following problems using the simplex method:

1. Max Z = 10x1 + 5x2


subject to:
2x1 + x2  10
x1 = 4
x1 + 4x2  20
x1, x2  0

2. Min Z = 6x1 + 2x2


subject to:
3x1 + 2x2  18
2x1 + 4x2 = 20
2x2  8
x1, x2  0

39
Operations Research Postoptimality Analysis

POSTOPTIMALITY ANALYSIS

It is often possible that further analysis of the optimal solution will result in more useful
information than is given by the actual solution. The analysis of the optimal solution in
order to gain additional information is referred to as postoptimality analysis.

The optimal solution of a linear programming model can be analysed in two ways. Firstly,
the dual can be formulated to obtain useful information regarding the value of resources
that form the constraints of the model. Secondly, the various numerical coefficients in the
model constraints and objective function can be analysed to see the sensitivity of changes
in them to the optimal solution. Both duality and sensitivity analysis are used to
investigate the optimal solution to gain additional insight.

DUALITY

Every linear programming model has two forms. The first or original form of the model is
called the primal, while the second form of the problem is called the dual. Similarly, for
every primal solution there exists a corresponding dual solution.

The dual is analysed for one or both of the following reasons:


1. To provide economic interpretation of the resource parameters of an LP problem.
2. Occasionally, it may be easier to solve the dual form of the model than the primal
form.

Economic Interpretation of the Primal


Consider the following problem. A firm manufactures two products, 1 and 2. The
production of products 1 and 2 is subject to the following resource requirements and
availabilities for labour material, and storage space.

Resource Requirement
Resource Product 1 Product 2 Total
Resources
Labour (hr/unit) 1 2 10hr
Material (kg/unit) 6 6 36kg
Storage (m2/unit) 8 4 40m2

Given that the profits per unit of product 1 and 2 are $4 and $5 respectively, the problem is
formulated as:

Max. Z = 4x1 + 5x2


Subject to:
x1 + 2x2  10 (labour)
6x1 + 6x2  36 (material)
8x1 + 4x2  40 (storage)
x1, x2  0

Solution by the simplex method results in the following optimal tableau:


Cj 4 5 0 0 0

1
Operations Research Postoptimality Analysis

Cb basis bi x1 x2 s1 s2 s3
5 x2 4 0 1 1 - 16 0
4 x1 2 1 0 -1 1 0
3
0 s3 8 0 0 4 1
-2
Zj 28 4 5 1 1
2
0
Cj-Zj 0 0 -1 - 21 0

• Observing the Cj-Zj values under s1 and s2 it can be seen that if s1 and s2 enter the basis
profit will decrease by $1 and $0.50 respectively.
• Note that since s1 and s2 are not in the basis both labour and material resources are
fully used.
• Therefore if s1 enters the basis it is analogous to a reduction in the use of labour by one
unit. In the same way, entry of one unit of s2 into the basis will result in a reduction of
one unit of material.
• If the entry of one unit of s1 (reducing labour usage by one unit) would reduce profit
by $1.00, then increasing labour usage by one unit will increase profit by $1.00. In the
case of s2 profit will change by $0.50.
• The $1.00 and $0.50 therefore are the marginal values of labour and material. In other
words, we could expect profits to increase by $1.00 or $0.50 if another unit of labour
or material can be obtained.
• The Cj-Zj values under the slack variables are normally called shadow prices (marginal
values). These are the maximum prices one is willing to pay to obtain more of the
resources in order to maximise profit.
• The Cj-Zj value for s1 is the marginal value of labour, the Cj-Zj for s2 is the marginal
value for material and the Cj-Zj value for s3 is the marginal value for storage.
• It is seen that the Cj-Zj value for s3 is 0 implying that storage space has no value on
marginal basis. This is because s3 is in the basis with a value of 8 which implies that 8
m2 of storage space is left unused. Therefore storage is not a binding constraint.

The Dual Form of a LP Model


For a linear programming maximisation model (problem), which is primal, the
corresponding dual is a minimisation model (problem). Conversely, a primal minimisation
problem has a corresponding dual maximisation model (problem).

The dual of the following problem (the previous model):

Max. Z = 4x1 + 5x2


Subject to:
x1 + 2x2  10
6x1 + 6x2  36
8x1 + 4x2  40
x1, x2  0

The dual form of the model is as follows:

Min Zd = 10y1 +36y2 + 40y3


subject to:

2
Operations Research Postoptimality Analysis

y1 + 6y2 + 8y3  4
2y1 + 6y2 + 4y3  5
y1, y2, y3  0

yi is marginal value of one unit of resource i. The variable y1 is the marginal value of a
unit of labour; y2 is marginal value of a unit of material and so on.
The relationship between the primal and the dual formulations can be summarised as
follows:

1. The maximisation of a primal becomes a dual minimisation


2. The dual variables y1, y2, y3 correspond to resource constraints in the primal model
(problem). The number of resource constraints in the primal equals the number of dual
variables.
3. The right-hand-side parameters (bi) in the primal correspond to the coefficients of the
objective function in the dual.
4. The aij coefficients in the primal are the aji values in the dual.
5. The Cj values in the primal are the right-hand-side values in the dual.
6. All constraints in the maximisation primal are , and all constraints in the
corresponding minimisation dual are ,

The Primal Dual Relationship in General Form

The primal form:


n
Max Z = C x
j=1
j j

Subject to:
n

a j=1
ij x j  bi , i = 1, 2, ..., m

xj  0, j = 1, 2, …, n

The dual form:


m
Min Z d =  bi yi
i =1
Subject to:
m

a i=1
ji yi  C j , j = 1, 2, ..., n

yi  0, i = 1, 2, …, m

Algebraically, the primal is:

Max Z = Cx
subject to:
Ax  b
x0
and the corresponding dual is :

Min Zd = yb

3
Operations Research Postoptimality Analysis

subject to:
yA  C
y0

Where A is an mn matrix, b is an m1 column vector, C is a 1n row vector, and y is a
1m row vector.

Economic Interpretation of the Dual Form


This will be based on the following primal and dual models:

Primal Dual
Max Z = 4x1 + 5x2 Min Zd = 10y1 + 36y2 + 40y3
subject to: subject to:
x1 + 2x2  10 y1 + 6y2 + 8y3  4
6x1 + 6x2  36 2y1 + 6y2 + 4y3  5
8x1 + 4x2  40 y1, y2, y3  0
x1, x2  0

Optimal tableau for the primal is as follows:

Cj 4 5 0 0 0
Cb basis bi x1 x2 s1 s2 s3
5 x2 4 0 1 1 - 16 0
4 x1 2 1 0 -1 1 0
3
0 s3 8 0 0 4 1
-2
Zj 28 4 5 1 1
2
0
Cj-Zj 0 0 -1 - 21 0

The corresponding optimal tableau for the dual is as follows:

Cj 10 36 40 0 0
Cb basis bi y1 y2 y3 s1 ’ s2 ’
36 y2 1
2
0 1 2 - 13 1
6
10 y1 1 1 0 -4 1 -1
Zj 28 10 36 32 -2 -4
Zj-Cj 0 0 -8 -2 -4

From the two tableaux, the negative Cj-Zj row values under s1 and s2 of the primal tableau
correspond to the solution values of y1 and y2 of the dual.

Considering all Cj-Zj values in the primal solution tableau, we have:

Primal Tableau Cj-Zj Values


Column Headings in Primal Dual Tableau Basic Solution (bi)
x1 0 s1’ (not in the basis, therefore 0 by definition)
x2 0 s2’(not in the basis, therefore 0 by definition)

4
Operations Research Postoptimality Analysis

s1 1 y1
s2 1
2
y2
s3 0 y3 (not in the basis, therefore 0 by definition)

It can also be observed from the primal and the dual tableaux that the optimal value of the
objective function is the same for both the primal and dual forms.

i.e. Maximum Z = 28 = minimum Zd

This can be established analytically as follows:


The matrix forms of the primal and the dual are:

Max Z = Cx0 Min Zd = by0


subject to: subject to:
Ax0  b y0A  C
x0  0 y0  0

Where x0 and y0 are feasible vectors to primal and dual models respectively.
If the primal inequality constraint is multiplied on both sides by y0, we obtain:

y0Ax0  yb (a)
Similarly, if the dual inequality constraint is multiplied on both sides by x0, we get:

y0Ax0  Cx0 (b)

Inequalities (a) and (b) imply that:


Z= Cx0  y0Ax0  yb = Zd
 Z = Zd

It can be said generally that the value of the objective function of the minimisation
problem (dual) for any feasible solution is always greater than or equal to that of the
maximisation problem (primal). This is referred to as the weak duality theorem.

From the weak duality theorem the objective function value is the upper bound to the
objective function of the primal problem. Similarly, the objective function value of the
primal is a lower bound to the objective function of the dual problem. If the optimal
solutions to both the primal and dual are feasible then the objective function values of the
primal and dual are equal.
Z = Zd

This is referred to as strong duality theorem.

Exception to the Primal-Dual Relationship


The previous considerations on the primal-dual relationship have bothered on a
maximisation primal model (problem) with  constraints. This is not always the case as
there are situations where , =, and  constraints and/or unrestricted variables are
involved.

5
Operations Research Postoptimality Analysis

An Equality Constraint
Example:
Maximise Z = C1x1 + C2x2
subject to:
a11x1 +a12x2 = b1
a21x1 + a22x2  b2
x1, x2  0

The equality constraint can be expressed as:


a11x1 +a12x2  b1
a11x1 +a12x2  b1
Now, the  constraint can be converted to a proper form  for the dual as follows:
-a11x1 -a12x2  -b1

The original problem therefore becomes:


Maximise Z = C1x1 + C1x2
subject to:
a11x1 +a12x2  b1
-a11x1 - a12x2  -b1
a21x1 + a22x2  b2
x1, x2  0

Since the problem is in the proper form the dual can be constructed as follows:
Min Zd = b1y1 - b1y2 + b2 y3
subject to:
a11y1 - a11y2 + a21y3  C1
a12y1 - a12y2 + a22y3  C2
y1, y2, y3  0

This form of the dual can be manipulated further by combining all similar terms:
Min Zd = b1(y1 - y2)+ b2 y3
subject to:
a11(y1 - y2) + a21y3  C1
a12(y1 - y2) + a22y3  C2
y1, y2, y3  0

Referring to the discussion under the simplex method, an unrestricted variable xj = x j - x ,


where x j and x are all  0. The term y1-y2 above is in the same form if y1 was unrestricted.
This enables us to formulate the dual without transforming the original equality constraint.
The dual of the original primal problem is formulated by treating the equality constraint as
 constraint and letting y1 be an unrestricted variable.

The dual of the problem is therefore:


Min Zd = b1y1 + b2 y2
subject to:
a11y1 + a21y2  C1
a12y1 + a22y2  C2

6
Operations Research Postoptimality Analysis

y1 - unrestricted
y2  0

In general, any equality constraint i in the primal results in an unrestricted variable, yi in


the dual. When the primal contains an unrestricted variable xj, the dual constraint j is an
equality.

For Example:
Primal

Max Z = 3x1 + 7x2


subject to:
4x1 + 2x2  24
x1 + 7x2 = 28
2x1 + 3x2  18
x1, x2  0

Dual

Min Zd = 24y1 + 28y2 +18y3


subject to:
4y1 + y2 + 2y3  3
2y1 + 7y2 + 3y3  7
y1, y3  0
y2 - unrestricted

A  Constraint
A  constraint also alters the standard primal - dual transformation. In this case the
constraint is multiplied by -1 to convert it to a  constraint.

Example:
Primal

Max Z = 10x1 +3x2 + 8x3


subject to:
x1 + 4x2 + 2x3  16
3x2 + x3 = 10
6x1 + 2x2  20
x1, x2  0
x3 - unrestricted

Dual

Min Zd = 16y1 + 10y2 -20y3


subject to:
y1 - 6y3  10
4y1 + 3y2 - 2y3  3
2y1 + y2 =8

7
Operations Research Postoptimality Analysis

y1, y3  0
y2 - unrestricted

The Dual Form of a Minimisation Problem


The dual form of a primal minimisation problem is a maximisation problem. The proper
constraint form for a minimisation problem is  form.

Example:
Primal

Min Z = 3x1 + 6x2


Subject to:
2x1 + 7x2  16
x1  10
4x1 + 2x2 = 20
x1, x2  0

Dual

Max Zd = 16y1 - 10y2 + 20y3


subject to:
2y1 - y2 + 4y3  3
7y1 + 2y3  6
y1, y2  0
y3 - unrestricted

Summary of Primal-Dual Relationship

Primal Dual
n m
Max Z = C x j j Min Z d =  bi yi
j=1 i =1

Constraint i Variable yi
Variable xj Constraint j
 constraints  Constraints
Constraint i, = yi - unrestricted
xj - unrestricted Constraint j, =

SENSITIVITY ANALYSIS

Sensitivity analysis is the analysis of parameter changes and their effects on linear
programming solutions. The different categories of parameter changes that will be
considered are:

1. Changes in the right-hand-side values, bi


2. Changes in the objective function coefficients, Cj

Changes in the Right-Hand-Side (bi) Values

8
Operations Research Postoptimality Analysis

The following example will be used for illustration:

Max. Z = 4x1 + 5x2


Subject to:
x1 + 2x2  10 (labour)
6x1 + 6x2  36 (material)
8x1 + 4x2  40 (storage)
x1, x2  0

An increase in one of the bi values, for instance labour from 10 to 12, by an amount  can
affect the final solution. The feasible solution space may change to the point where the
optimal solution basis also changes. A general approach for determining the range of bi
values for which the solution basis remains optimal will be presented.

A general increase in the right-hand-side value of labour constraint by an amount  will


result in the following:

x1 + 2x2  10 + 
6x1 + 6x2  36 + 0
8x1 + 4x2  40 + 0

The initial simplex tableau using the updated constraints is:

Cj 4 5 0 0 0
Cb basis bi x1 x2 s1 s2 s3
0 s1 10+1 1 2 1 0 0
0 s2 36+0 6 6 0 1 0
0 s3 40+0 8 4 0 0 1
Zj 0 0 0 0 0 0
Cj-Zj 4 5 0 0 0

It can be seen that the coefficients of  in the bi column are the same as the values in the s1
column.

The corresponding optimal tableau is:

Cj 4 5 0 0 0
Cb basis bi x1 x2 s1 s2 s3
5 x2 4 + 1 0 1 1 - 16 0
4 x1 2 - 1 1 0 -1 1 0
3
0 s3 8 + 4 0 0 4 1
-2
1
Zj 28+ 4 5 1 2
0
Cj-Zj 0 0 -1 - 21 0

9
Operations Research Postoptimality Analysis

The same effect is also observed in the optimal tableau. In effect the coefficients of  in
the final tableau are the same as the values in the s1 column. It is therefore unnecessary to
go through the entire simplex process. In general, it is only necessary to change the final bi
values by a multiple of , where the multiple is the column coefficients of the slack
variable si for bi.

In this case it becomes:


x2 = 4 + 1
x1 = 2 - 1
s3 = 8 + 4
bi values
The simplex method requires all the feasible solution values to be non-zero. Therefore, in
order to determine the range of feasibility of b1 the following inequalities are solved
simultaneously for .

For x2: 4 + 1  0    -4
For x1: 2 - 1  0  2
For s3: 8 + 4  0    -2

Combining these three inequalities (in ) it can be stated that the solution basis will
remain feasible if:
-2    2

To find the range of b1, substitute the value of b1 (= 10 + ) in the range of .


 = b1 - 10

-2  b1 - 10  2

This implies that :


10 - 2  b1  10 + 2
8  b1  12

This means that the variables in the optimal basis will remain feasible as long as b 1 is
between 8 and 12.

Changes in the Objective Function Coefficients


Changes in the profit or cost contributions (Cj) in the objective function can occur for a
basic or a non-basic variable.

Changes in Cj When xj is a Non-basic Variable


The following example will be used to demonstrate the sensitivity analysis of Cj
parameter.

Max Z = 6x1 + 4x2


subject to:
2x1 + 6x2  12

10
Operations Research Postoptimality Analysis

4x1 + 4x2  16
x1, x2  0

The slope of the objective function depends on the value of Cj’s, therefore a change in Cj
can even affect the optimality of the original solution. We will be examining the range for
Cj over which the present solution will remain optimal.

Once Again, let us observe the tableau for the final optimal solution.

Cj 6 4 0 0
Cb basis bi x1 x2 s1 s2
0 s1 4 0 4 1 - 21
6 x1 4 1 1 0 1
4

Zj 24 6 6 0 3
2

Cj-Zj 0 -2 0 - 23

Introducing an increase of  in the value of C2, the following optimal tableau results.

Cj 6 4+ 0 0
Cb basis bi x1 x2 s1 s2
0 s1 4 0 4 1 - 21
6 x1 4 1 1 0 1
4

Zj 24 6 6 0 3
2

Cj-Zj 0 -2+ 0 - 23

This solution remains optimal only if Cj-Zj  0. To determine the value of  for the
solution to remain optimal the following relationship results:

-2 +   0
2 (a)
Since C2 = 4 + , the corresponding range for C2 is determined by substituting the value of
 into (a) above:

 = C2 - 4
 C2 -4  2  C2  6

This implies that as long as C2 is less or equal to 6, the present basic solution remains
optimal. This implies that x1, s1 will remain in the basis with their optimal values of 4, and
Zj will remain as 24.

Changes in Cj When xj is a Basic Variable


Using the model for the previous example let us consider a change in the value of C 1
(parameter of x1 - a basic variable). If an increase is considered the following initial
tableau results.

Cj 6+ 4 0 0

11
Operations Research Postoptimality Analysis

Cb basis bi x1 x2 s1 s2
0 s1 12 2 6 1 0
0 s2 16 4 4 0 1
Zj 0 0 0 0 0
Cj-Zj 6+ 4 0 0

The corresponding optimal tableau is:

Cj 6+ 4 0 0
Cb basis bi x1 x2 s1 s2
0 s1 4 0 4 1 - 21
6+ x1 4 1 1 0 1
4

Zj 24+4 6+ 6+ 0 3


2 + 4
Cj-Zj 0 -2- 0 - 23 - 4

If one of the non-basic variables enters the basis then the present solution is no longer
optimal. In order for the present solution to remain optimal, Cj-Zj values for the non-basic
variables should remain negative or zero.

For x2:
-2 -   0
   -2 (b)

For s2:
- 23 - 4  0
   -6 (c)

Substituting the original value of C1 = 6 +  (i.e.  = C1 - 6) in (b) and (c) the


corresponding range for C1 is as follows:
For x2:
C1 - 6  -2
C1  4
For s2:
C1 - 6  -6
C1  0

Combining the two ranges, the present solution will remain optimal as long as C1  4.

Computer Solution of Linear Programming Problems


Many practical problems formulated as linear programming problems have hundreds and
thousands of constraints and decision variables. These invariably have to be solved on a
digital computer.

Various computer software are available for solving these problems. The first generation
of LP computer software required the user to write a program to generate a matrix suitable
for the simplex format. These computer software that required the use of a matrix
generator are generally called Mathematical Programming Systems (MPS).

12
Operations Research Postoptimality Analysis

The more recent development in LP software is the use of algebraic coding languages.
These types of software enable the user to write codes directly in algebraic form without
the need for a matrix generator. The matrix generation aspect is accomplished by the
program. Typical examples of algebraic coding languages are LINDO (Linear INteractive
Discrete Optimiser) and AMPL (A Modelling Language for Mathematical Programming)

LINDO was developed in the early 1980’s and has seen wide application in industry,
research institutions and the universities world-wide. AMPL was developed in 1993 by
researchers in the Bell Laboratories, USA and Northwestern University, IL, USA. There is
a host of other LP software available commercially.

A typical application of LINDO for solving an LP problem is demonstrated.


The problem is stated as follows:

A small mining company operates three mines. The ore from each mine is separated into
two grades before it is shipped. The daily production capacities of the mines and their
respective operating costs are shown in the following table:

High grade Low grade Operating


Ore t/day Ore t/day Cost $1000/day
Mine 1 4000 4000 20
Mine 2 6000 4000 22
Mine 3 1000 6000 18

Given that the company has committed itself to deliver 54000 tonnes of high grade and
65000 tonnes of low grade ore in a given week. Formulate a mathematical model to
determine the number of days each mine should be operated in the week in question if the
company is to fulfil its commitment at minimum total operating cost.

The LP formulation of the problem is presented below:

Minimise Z = 20000x1 + 22000x2 + 18000x3

Subject to:
4000x1 + 6000x2 + 1000x3  54000
4000x1 + 4000x2 + 6000x3  65000
x1  7
x2  7
x3  7
x1, x2, x3  0

The LINDO code for the above formulation is presented in the box as follows::

! The decision variables are mine1, mine2 and mine3.


! Where mine1 is the number of hours mine 1 should
! be operated in a day.
!
Min 20000mine1+22000mine2+18000mine3

13
Operations Research Postoptimality Analysis

subject to
4000mine1+6000mine2+1000mine3>54000
4000mine1+4000mine2+6000mine3>65000
mine1<7
mine2<7
mine3<7

The solution obtained from the LINDO optimiser including sensitivity analysis is
presented.

LP OPTIMUM FOUND AT STEP 3

OBJECTIVE FUNCTION VALUE

1) 279000.0

VARIABLE VALUE REDUCED COST


MINE1 1.750000 0.000000
MINE2 7.000000 0.000000
MINE3 5.000000 0.000000

ROW SLACK OR SURPLUS DUAL PRICES


2) 0.000000 -2.400000
3) 0.000000 -2.600000
4) 5.250000 0.000000
5) 0.000000 2800.000000
6) 2.000000 0.000000

NO. ITERATIONS= 3

RANGES IN WHICH THE BASIS IS UNCHANGED:

OBJ COEFFICIENT RANGES


VARIABLE CURRENT ALLOWABLE ALLOWABLE
COEF INCREASE DECREASE
MINE1 20000.000000 52000.000000 1750.000000
MINE2 22000.000000 2800.000000 INFINITY
MINE3 18000.000000 7000.000000 13000.000000

RIGHTHAND SIDE RANGES


ROW CURRENT ALLOWABLE ALLOWABLE
RHS INCREASE DECREASE
2 54000.000000 17500.000000 5833.333008
3 65000.000000 10000.000000 25000.000000
4 7.000000 INFINITY 5.250000
5 7.000000 1.093750 3.281250
6 7.000000 INFINITY 2.000000

14
Operations Research Postoptimality Analysis

Problems
1. Formulate the dual of the following linear programming model:

Min Z = x1 + 2x2 + x3
subject to:
2x1 - 3x2 + x3 = 6
2x1 - 3x2 - x3 ≥ 1
5x1 + 7x3 ≤ 18
x1, x2  0
x3 ~ unrestricted

2. An electronic company manufactures 2 Hp and 1 Hp electric motors. The company has


resource constraints for production time, steel and wire. A Linear Programming model
of the manufacturing process is formulated as follows:

Decision variables: X1 is number of 2 Hp motors produced and X2 is number of 1 Hp


motors produced.

Max Z = 70X1 + 80X2 (profit, $)


Such that:
2X1 + X2  19 (production, h)
X1 + X2  14 (steel, kg)
X1 + 2X2  20 (wire, m)
X1, X2  0

The Simplex method was used to solve this problem with the following optimal (final)
tableau:

Cj 70 80 0 0 0
Cb basis bi X1 X2 S1 S2 S3
70 X1 6 1 0 2/3 0 -1/3
0 S2 1 0 0 -1/3 1 -1/3
80 X2 7 0 1 -1/3 0 2/3
Zj 980 70 80 20 0 30
Cj-Zj 0 0 -20 0 -30

a. Interpret the Cj-Zj values (shadow prices) for this tableau.


b. Define the dual variables.
c. Determine the ranges for each of the three resources (production time, steel and
wire) for which the basis will remain feasible.
d. Determine the range of values of profit per unit of 2 Hp motors for which the
basis remains unchanged.

15
Operations Research Transportation Problem

TRANSPORTATION PROBLEM

This is a special type of linear programming problem that deals with the transportation of a
product from a number of sources with limited supplies, to a number of destinations with
specified demands. The objective is normally to minimise total cost of transportation.

The general structure of the transportation problem is represented in the network in Figure
3.1.

Supply Sources Demand Destinations


D1

S1
D2

S2
D3

S3
D4
Figure 3.1

The Balanced Transportation Problem


A balance transportation problem has total supply being equal to total demand.

Example:
A concrete company transports concrete from three plants to three mine construction sites.
Supply capacities of the three plants, the demand requirements at the three mine
construction sites and the transportation costs ($/tonne) are as follows:

To Mine Construction Site


From Plant 1 2 3 Supply (tonnes)
1 $8 5 6 120
2 15 10 12 80
3 3 9 10 80
Demand (tonnes) 150 70 60 280

In the form of a network model, the problem is presented in Figure 3.2.

As a linear programming problem;


Let xij = Tonnes of concrete to ship from plant i to site j.

Min. Z = 8x11 + 5x12 + 6x13 + 15x21 + 10x22 + 12x23 + 3x31 + 9x32 + 10x33
Subject to:
x11 + x12 + x13 = 120 (plant 1 supply)
x21 + x22 + x23 = 80 (plant 2 supply)
x31 + x32 + x33 = 80 (plant 3 supply)
x11 + x21 + x31 = 150 (site 1 demand)

1
Operations Research Transportation Problem

x12 + x22 + x32 = 70 (site 2 demand)


x13 + x23 + x33 = 60 (site 3 demand)
xij  0

Sources Decision Variables Destinations

i xij j
x11 1 D1=150
S1=120 1 x12
x13
x21
2 x22 2 D2=70
S2=80
x23
x31 x32

S3=80 x33
3 3 D3=60
m=3 n=3

Figure 3.2 Network Representation of Problem

The general formulation of a transportation problem with m sources and n destinations is


as follows:

m n

 C
i =1 j =1
ij X ij

Subject to:
n

x
j =1
ij = Si (supply, S i , at source i = 1,2,..., m)
m

x
i =1
ij = D j (demand, D j , at destination j = 1,2,..., n)

xij  0
m n

 Si =  D j
i =1 j =1
balanced transportation condition

This problem could be solved by the Simplex method but there are special solution
methods which are computationally more efficient.

Transportation Tableau

2
Operations Research Transportation Problem

Table 3.1
To Destinations
From 1 2 … j … n Supply
C11 C12 C1j C1n
1 x11 x12 … x1j … x1n S1
S C21 C22 C2j C2n
o 2 x21 x22 … x2j … x2n S2
u . . . . . . . .
r        
c Ci1 Ci2 Cij Cin
e i xi1 xi2 … xij … xin Si
s . . . . . . . .
       
Cm1 Cm2 Cmj Cmn
m xm1 xm2 … xmj … xmn Sm
m n

Demand D1 D2 … Dj … Dn S = D
i =1
i
j =1
j

Sources are rows and destinations columns.

For the concrete transportation problem the transportation tableau is as follows:

Table 3.2
To
From 1 2 3 Supply
8 5 6
1 120
15 10 12
2 80
3 9 10
3 80
Demand 150 70 60 280

The Initial Solution

In the transportation problem, there are m supply and n demand constraints, making m + n
total constraints. In a typical LP problem the number of basic variables in the Simplex
tableau is equal to the number of constraints.

In the transportation problem one of the constraints is redundant, due to the balance
condition:

m n

 Si =  D j
i =1 j =1

 If m + n - 1 constraints are satisfied, m + n equations will also be satisfied. Hence only


m + n - 1 independent equations exist. The initial solution will therefore have m + n - 1
basic variables.

3
Operations Research Transportation Problem

Several methods are available for determining the initial solution: the Northwest Corner
method and Vogel’s Approximation method will be examined.

Northwest Corner Method

The Northwest Corner method is summarised as follows:


1. Start at the Northwest corner (upper-left-hand corner) of the tableau and allocate as
much as possible to x11 without violating the supply or demand constraints. i.e. x11 =
{min (S1,D1)}.
2. Row 1 and/or column 1 will be eliminated, as one of supply and/or demand will be
exhausted. Next allocate as much as possible to the adjacent cell in the row or column
that has not been eliminated. If both row and column are exhausted, move diagonally
to the next cell.
3. Continue in the same manner until all supply/demand requirements have been met.

For example, the initial solution for the concrete transportation problem is as follows:

Table 3.3
To
From 1 2 3 Supply
8 5 6
1 120 120
15 10 12
2 30 50 80
3 9 10
3 20 60 80
Demand 150 70 60 280

Note that the initial solution has 5 (m+n-1) basic variables and 4 non-basic variables.
The total cost, Z at this stage is given as:

Z = 120$8 + 30$15 + 50$10 + 20$9 + 60$10


= $960 + $450 + $500 + $180 + $600 = $2690

Vogel’s Approximation Method (VAM)

This consists of making allocations in a manner that will minimise penalty (opportunity)
cost for selecting the wrong cell for an allocation.

The process is summarised as follows:


1. Calculate the penalty cost for each row and column. The penalty costs for each row i
are computed by subtracting the smallest Cij value in the row from the next largest Cij
value in the same row. Penalty costs for columns are obtained in the same way, by
subtracting the smallest Cij value in each column from the next largest column Cij
value. These costs are the penalty costs for not selecting the minimum cost cell.
2. Select the column or row with the greatest penalty cost (breaking ties arbitrarily).
Allocate as much as possible to the cell with the minimum Cij value in the indicated

4
Operations Research Transportation Problem

row or column; that is, for minimum Cij xij = min {Si, Dj}. As a result, the largest
penalties are avoided.
3. Adjust the supply and demand requirements to reflect the allocation(s) already made.
Eliminate any rows and columns in which supply and demand have been exhausted.
4. If all supply and demand requirements have not been satisfied, go to the first step and
recalculate new penalty costs. If all row and column values have been satisfied, the
initial solution has been obtained.

Applying these steps to our example results in an initial VAM allocation in the following
transportation tableau.

Table 3.4
To Row Penalty
From 1 2 3 Supply Costs
8 5 6
1 70 50 120 1 1 1
15 10 12
2 70 10 80 2 2 2 2
3 9 10
3 80 80 6
Demand 150 70 60 280
Column 5 4 4
Penalty 7 5 6
Costs 5 6

Total cost of this initial solution is:

Z = 70$8 + 50$6 + 70$10 + 10$12 + 80$3


= $560 + $300 + $700 + $120 + $240 = $1920
This cost is lower than that for the initial solution using the Northwest corner method.

Determining the Optimal Solution


Two main methods for determining the optimal solution will be discussed: Stepping-Stone
method and Modified Distribution method.

Stepping-Stone Method
After finding the initial basic solution the next step is to find whether the solution can be
improved. The process of evaluating non-basic variables to determine if improvement is
possible and then reallocating units is called the Stepping-Stone Method.

A closed loop of occupied cells is used to evaluate each empty cell (non-basic variable).

Using the initial solution from the Northwest corner rule:

Table 3.5
To
From 1 2 3 Supply
-1 8 +1 5 6
1 120 120

5
Operations Research Transportation Problem

15 10 12
2 +1 30 -1 50 80
3 9 10
3 20 60 80
Demand 150 70 60 280

For a non-basic variable (empty cell) to enter the solution it must contribute to a reduction
in the objective function value.

If x12 (in the table above) is considered as a possible entering basic variable and we decide
to allocate 1 unit to that cell:
This results in 71 units > 70  the demand constraint is violated.
Hence 1 unit must be subtracted from 50 (x22) or 20 (x23).
Subtract 1 unit from x22, yielding 49, but this causes row 2 to have 79 units < 80, violating
supply requirement.
Therefore 1 unit is added to x21 to meet supply requirement of 80 units.
However column 1 has 151 units > 150, the demand requirement.
Therefore, 1 unit must be subtracted from x11 so that column 1 has 150 units.

This closed path process is the stepping stone procedure.

Empty cell Closed Loop


x12 x12 x22 x21 x11 x12
(+1) (-1) (+1) (-1)

The following conditions for the construction of stepping stone paths are given:

1. The direction taken, clockwise or anticlockwise, is immaterial in determining closed


path. The same path will result regardless of direction.
2. There is only one unique closed path for each empty cell.
3. The path must follow only (change direction at) occupied cells; the exception being the
non-basic variable being evaluated.
4. However both empty and occupied cells can be skipped over in construction of a
closed path. E.g.

4 8 4
-1 +1
10
7 10 9
8
10 6 1
+1 20 5 -1 12

5. A path can cross over itself. E.g.

4 3 7 12
- +
10 20
7 6 11 7
7
10 9 2 6
-

6
Operations Research Transportation Problem

12
+ 8 4 4 9
8 - 15
+ 5

6. Exactly one addition and one subtraction must appear in each row and column on a
path.

The purpose of the closed path is to allocate units to an empty cell while maintaining
supply and demand constraints.

In order to determine which cells can enter the solution, determine the net cost change for
various empty cells.

For x12:
C12 = +C12-C22+C21-C11
= 5 - 10 + 15 - 8 = +2

The cell cost summary for all non-basic variables are given in Table 3.6:

Table 3.6
Cij Path Cost Reduction & Addition Net Cost Change
C12 5 - 10 + 15 - 8 +2
C13 x13 x33 x32 x22 x21 x11 x13
6 - 10 + 9 - 10 + 15 - 8 +2
C23 x23 x33 x32 x22 x23
12 - 10 + 9 - 10 +1
C31 x31 x21 x22 x32 x31
3 - 15 + 10 - 9 -11

• From the analysis of the cost of non-basic variable entry only x31 has a net negative
*
change ( C31 = -11). Hence x31 is the only non-basic variable which when introduced in
the solution will reduce cost.
• If there are 2 or more non-basic variables with Cij* negative then select the most
negative one.
• In case of a tie select arbitrarily.

Now, making the reallocation the following table results:

Table 3.7
To
From 1 2 3 Supply
8 5 6
1 120 120
15 10 12
2 - 30 + 50 80
3 9 10
+ -

7
Operations Research Transportation Problem

3 20 60 80
Demand 150 70 60 280

The amount allocated to x31 is limited to the amount that can feasibly be transferred along
the closed path and also the demand/supply constraint.
The amount allocated to non-basic entering variable is restricted to the minimum amount
in a cell to be subtracted from ( xij− ) in the closed path.
In this case:
− −
x31 = min { x 32 , x 21 }
and in general, reallocated xij is the minimum on the closed path.

Reallocated xij = min(xij on closed path).

So reallocate 20 units to x31. The following table results from the reallocation.

Table 3.8
To
From 1 2 3 Supply
8 5 6
1 120 120
15 10 12
2 - 10 70 + 80
3 9 10
3 + 20 - 60 80
Demand 150 70 60 280

Check the current table for optimality.

Table 3.9
Cij*
C12* 5 - 10 + 15 - 8 = 2
*
C 13 6 - 10 + 3 - 8 = -9
*
C 23 12 - 10 + 3 - 15 = -10
*
C 22 9 - 10 + 15 - 3 = 11

Since x23 has the highest net reduction in cost it will enter the solution at this stage.
A reallocation of 10 units is made to x23 for the table to become:

Table 3.10
To
From 1 2 3 Supply
8 5 6
- +
1 120 120
15 10 12
2 70 10 80
3 9 10
+ -
8
Operations Research Transportation Problem

3 30 50 80
Demand 150 70 60 280

Check for optimality

Table 3.11
Cij*
C12* 5 - 8 + 3 - 10 + 12 - 10 = -8
C13* 6 - 10 + 3 - 8 = -9
*
C21 15 - 12 + 10 - 3 = 10
*
C32 9 - 10 + 12 - 10 = 1

Since x13 is the new entering variable, reallocate 50 units to x13.


The following table results from the reallocation:

Table 3.12
To
From 1 2 3 Supply
8 5 6
1 70 50 120
15 10 12
2 70 10 80
3 9 10
3 80 80
Demand 150 70 60 280

Check for optimality:


Table 3.13
Cij*
C12* 5 - 6 + 12 - 10 = 1
*
C 21 15 - 12 + 6 - 8 = 1
*
C 32 9 - 10 + 12 - 6 + 8 - 3 = 10
*
C 33 10 - 6 + 8 - 3 = 9

Since all Cij* are positive the solution is optimal.

Z = $870 + $650 + $1070 + $1210 + $380 = $1920

This solution is the same as that for VAM.


x11 = 70 transport 70 tons from plant 1 to site 1
x13 = 50 transport 50 tons from plant 1 to site 3
x22 = 70 transport 70 tons from plant 2 to site 2
x23 = 10 transport 10 tons from plant 2 to site 3
x31 = 80 transport 80 tons from plant 3 to site 1

9
Operations Research Transportation Problem

Modified Distribution Method


The modified distribution method (MODI) differs from the stepping stone method in the
sense that it is unnecessary to determine all the closed paths for non-basic variables.
Instead Cij* values are determined simultaneously and the closed path is identified only for
the entering non-basic variable.

In the MODI method a value ui is defined for each row (i) and a value vj, is defined for
each column (j) in the transportation tableau.

For each basic variable, xij the following relationship exists:


ui + vj = Cij

Where, Cij is the unit cost of transportation.

A summary of the modified distribution method is given.

Summary of the MODI Method


1. Determine ui values for each row and vj values for each column by using the
relationship ui + vj = Cij for all basic variables and assigning a value of zero to u1.
2. Compute the net cost change Cij* for each non-basic variable using the formula:
Cij* = Cij - ui - vj.
3. If a negative Cij* value exists, the solution is not optimal. Select the xij variable with
the highest negative Cij* value as the entering non-basic variable.
4. Allocate units to the entering non-basic variable, xij according to the stepping stone
process. Return to step 1.

Let us use the initial solution to the Northwest corner method to demonstrate the MODI
method.

Table 3.14
v1=8 v2=3 v3=4
To
From 1 2 3 Supply
u1=0 8 5 6
1 120 120
15 10 12
u2=7 - 30 + 50
2 80
3 9 10
u3=6 3 - 20 60 80
+

10
Operations Research Transportation Problem

Demand 150 70 60 280

Applying the relationship for ui, vj and Cij for each basic variable results in the following
equations:
x11: u1+v1 = C11 = 8
x21: u2+v1 = C21 = 15
x22: u2+v2 = C22 = 10
x32: u3+v2 = C32 = 9
x33: u3+v3 = C33 = 10

As seen above, there are five equations (m+n-1) with six unknowns (m+n). In order to
solve this assign any of the unknowns an arbitrary value.
u1 is usually assigned a value of zero (0).

For the above problem, if u1 = 0 then:

o+v1 = 8  v1 = 8
u2+8 = 15  u2 = 7
7+v2 = 10  v2 = 3
u3+3 = 9  u3 = 6
6+v3 = 10  v3 = 4

It should be noted that ui, vj can be negative.


The value of each non-basic variable net cost change Cij* , is determined as:

Cij* = Cij - ui - vj
C12* = C12 -u1-v2 = 5 - 0 - 3 = 2
C13* = C13 -u1-v3 = 6 - 0 - 4 = 2
*
C23 = C23 -u2-v3 = 12 - 7 - 4 = 1
*
C31 = C31 -u3-v1 = 3 - 6 - 8 = -11

*
This corresponds to the same values in the stepping stone method. Since C31 < 0 it implies
that the present solution is not optimal and x31 is the entering non-basic variable.

The next step is to use the stepping stone approach to reallocate to x31 as follows:

Table 3.15 v1=8 v2=3 v3=15


To 5
From 1 2 3 Supply
8 5 6
u1=0 1 120 120
15 10 12
u2=7 2 - 10 70 + 80
u3=-5 3 9 10
3 + 20 - 60 80
Deman 150 70 60 280
d

11
Operations Research Transportation Problem

Now, the new ui and vj values are computed in order to check optimality.

C11 = 8 = u1 + v1 = 0 + v1  v1 = 8
C21 = 15 = u2 + v1 = u2 + 8  u2 = 7
C22 = 10 = u2 + v2 = 7 + v2  v2 = 3
C31 = 3 = u3 + v1 = u3 + 8  u3 = -5
C33 = 10 = u3 + v3 = -5 + v3  v3 = 15

Check for optimality:

C12* = C12 -u1-v2 = 5 - 0 - 3 = 2


C13* = C13 -u1-v3 = 6 - 0 - 15 = -9
*
C23 = C23 -u2-v3 = 12 - 7 - 15 = -10
*
C32 = C32 -u3-v2 = 9 - (-5) - 3 = 11

x23 is the new entering non-basic variable.


A reallocation to x23 results in the next tableau (Table 3.16).

Table 3.16 v1=8 v2=13 v3=15


To
From 1 2 3 Supply
8 5 6
u1=0 - +
1 120 120
15 10 12
u2=-3 2 70 10 80
3 9 10
u3=-5 3 + 30 - 50 80
Demand 150 70 60 280

C11 = 8 = u1 + v1 = 0 + v1  v1 = 8
C22 = 10 = u2 + v2 = -3 + v2  v2 = 13
C23 = 12 = u2 + v3 = u2 + 15  u2 = -3
C31 = 3 = u3 + v1 = u3 + 8  u3 = -5
C33 = 10 = u3 + v3 = -5 + v3  v3 = 15

Check optimality:

C12* = C12 -u1-v2 = 5 - 0 - 13 = -8


C13* = C13 -u1-v3 = 6 - 0 - 15 = -9
*
C21 = C21 -u2-v1 = 15 - (-3) - 8 = 10
*
C32 = C32 -u3-v2 = 9 - (-5) - 13 = 1

x13 is the new entering non-basic variable.

A reallocation to x13 results in the following tableau (Table 3.17)

12
Operations Research Transportation Problem

Table 3.17
To
From 1 2 3 Supply
8 5 6
1 70 50 120
15 10 12
2 70 10 80
3 9 10
3 80 80
Demand 150 70 60 280

Now, compute the ui’s and vj’s:

C11 = 8 = u1 + v1 = 0 + v1  v1 = 8
C13 = 6 = u1 + v3 = 0 + v3  v3 = 6
C22 = 10 = u2 + v2 = 6 + v2  v2 = 4
C23 = 12 = u2 + v3 = u2 + 6  u2 = 6
C31 = 3 = u3 + v1 = u3 + 8  u3 = -5

Check optimality:

C12* = C12 -u1-v2 = 5 - 0 - 4 = 1


*
C21 = C21 -u2-v1 = 15 - 6 - 8 = 1
*
C32 = C32 -u3-v2 = 9 - (-5) - 4 = 10
*
C33 = C33 -u3-v3 = 10 - (-5) - 6 = 9
Since all Cij*  0 it implies that it is not possible to reduce cost further, therefore the
current solution is optimal. This solution is the same as the case for the stepping stone
method.

The Unbalanced Transportation Problem


In general, most transportation problems are unbalanced - supply exceeds demand or vice
versa.
E.g. If the concrete transportation problem is modified such that the demand at site 3 is
increased from 60 to 90, then the total demand will be 310 tons while supply is still 280
tons. Since the total demand exceeds the supply this problem is unbalanced.
In order to handle this problem as a balanced transportation problem and be able to apply
the various methods previously discussed, a dummy supply source that has a supply equal
to the difference between total demand and supply is created. This dummy source is
assigned a transportation cost of zero (0) to each of the destinations.

The new transportation problem becomes:

Table 3.18
To
From 1 2 3 Supply
8 5 6
1 120
15 10 12

13
Operations Research Transportation Problem

2 80
3 9 10
3 80
0 0 0
Dummy 30
Demand 150 70 90 310

The transportation problem is now balanced and can be solved by the methods previously
discussed.

In the case where supply exceeds demand, a dummy demand (column) is added with its
demand being the difference between total supply and demand.

E.g. If the concrete transportation problem is modified such that demand at site 1 is 100
tons instead of 150 tons then total demand becomes 230 tons while total supply is 280
tons. This makes the transportation problem unbalanced.

A balanced transportation problem based on this is presented in Table 3.19.

Table 3.19
To
From 1 2 3 Dummy Supply
8 5 6 0
1 120
15 10 12 0
2 80
3 9 10 0
3 80
Demand 100 70 60 50 280

Degeneracy
In the transportation method, the number of occupied cells must be equal to m+n-1. If a
transportation tableau has less than m+n-1 occupied cells (basic variables) it is degenerate.

Without m+n-1 basic variables it is impossible to apply the stepping stone or MODI
solution methods. All closed paths cannot be determined for the stepping stone method or
not all the ui + vj = Cij equations can be solved for the MODI method.

Example:

Table 3.20
To
From 1 2 3 Supply
8 5 6
1 100 100
15 10 12
2 100 20 120
3 9 10

14
Operations Research Transportation Problem

3 80 80
Demand 100 100 100 300

With reference to Table 3.20, the application of the Northwest corner method results in a
situation where only m+n-2 cells are occupied - thus a degenerate solution exists.

In order to overcome degeneracy, a fictitious allocation is made to one of the empty cells
to obtain the m+n-1 occupied cells condition. 0 (zero) unit is allocated to either x12 or x21
for instance (these are the two variables that would normally have an allocation in the
Northwest corner method). Allocation of 0 indicates that there are no actual units in that
cell but it is treated as an occupied cell for the purpose of solution. If x12 is allocated with
a dummy, 0, the following results:

Table 3.21
To
From 1 2 3 Supply
8 5 6
1 100 0 100
15 10 12
2 100 20 120
3 9 10
3 80 80
Demand 100 100 100 300

The normal solution procedure will then be used to solve this problem.

Degeneracy can also result during an iteration of the solution process.

Example:

Table 3.22
To
From 1 2 3 Supply
8 5 6
1 120 120
15 10 12
2 30 50 80
3 9 10
3 30 50 80
Demand 150 80 50 280

At this stage, x31 (Table 3.22) should enter the solution basis. Allocating the maximum
feasible amount of 30 units results in this tableau (Table 3.23)

Table 3.23

15
Operations Research Transportation Problem

To
From 1 2 3 Supply
8 5 6
1 120 120
15 10 12
2 80 80
3 9 10
3 30 50 80
Demand 150 80 50 280

The solution (Table 3.23) is now degenerate because only m+n-2 cells are basic
(occupied). This is because both x32 and x21 had 30 units (Table 3.22). Therefore, making a
reallocation of 30 units caused the two (x32 and x21) to leave the basis, instead of one. To
proceed with the solution, one of x32 and x21 should have a dummy allocation of 0. Then
proceed as usual.

If x32 is allocated a unit of 0 the following tableau (Table 3.24) results.

Table 3.24
To
From 1 2 3 Supply
8 5 6
1 120 120
15 10 12
2 80 80
3 9 10
3 30 0 50 80
Demand 150 80 50 280

Since the number of occupied cells is m+n-1 (5) the normal solution procedure can be
employed now.

Prohibited Routes
In some real world problems it is not possible to transport units over certain routes. Such
transportation problems with prohibited routes are handled by assigning a large Cij value,
M to xij which is prohibited. The normal solution process is then conducted with M being
treated as any other Cij.

Multiple Optimal Solutions


The optimal solution for a transportation problem exists when all the net cost change
values, C*ij for all non-basic variables are positive. However, as in the case of the simplex
method, when a non-basic variable has a net cost change C*ij (Cj-Zj) of zero in the (final)
tableau, an alternative optimal solution is implied.

A Maximisation Transportation Problem


The transportation problem has so far been considered only for problems where the
objective function represents cost and is therefore minimised. There are however some
problems where the objective function is to be maximised which can be classified as

16
Operations Research Transportation Problem

transportation problems (they follow the general structure of transportation problem


formulation). For instance, in mine equipment distribution network where sources are
warehouses and destination are mines. If management of the Equipment Distribution
Company wants to find analyse the profit contribution of each warehouse and mine
combination, the objective will be the maximisation of profit.

One of the solution procedures for a maximisation transportation problem requires that the
largest cell value (i.e. profit coefficient) in the transportation tableau be selected and all
other tableau cell values be subtracted from it. This creates a new tableau of relative cost
values, so the problem can be solved according to the normal transportation methods
previously presented.

Problems
1. Cement is produced and stored in three towns. Cement is supplied from the
warehouses to cement markets in four cities with the following demand.

Warehouse location Daily Production (t) Market Location Daily Demand (t)
Accra 150 Sunyani 130
Takoradi 210 Bibiani 70
Tema 320 Obuasi 180
Tarkwa 240

The following transportation costs per tonne have been determined.

From To Sunyani Bibiani Obuasi Tarkwa


Accra $14 9 16 18
Takoradi 11 8 7 16
Tema 16 12 10 22

However due to driver’s strike, transportation from Takoradi to Obuasi is presently


prohibited.

a. Set up a transportation tableau for this problem and determine the initial solution.
b. Determine the optimal transportation schedule.
c. Are there multiple optimal solutions? Explain. Identify the alternate solutions if any.

2. A diesel storage and transportation company has three depots: Depot 1, Depot 2 and
Depot 3 from which it supplies diesel to two open pit mines: Mine A and Mine B.
The monthly storage capacity of depots 1, 2 and 3 are 400 barrels, 300 barrels and 500
barrels respectively. The monthly diesel requirements (demands) of Mine A, Mine B
and Mine C are 320, 480 and 280 barrels respectively.

The cost ($) of transporting a barrel of diesel from each depot to each mine is given in
Table 3:

Depot Mine A Mine B Mine C


1 9 10 15
2 8 6 12

17
Operations Research Transportation Problem

3 8 14 10

Using the transportation method determine the number of barrels of diesel to transport
from each depot to each mine in order to minimise total transportation cost.
What is the minimum total cost of transportation?

18
Operations Research in Mining Assignment Problem

THE ASSIGNMENT PROBLEM

The assignment problem is a special type of transportation problem with an equal number
of sources and destinations and each source’s supply and destination’s demand equalling
one. It also has a special efficient solution method.

The general structure of the assignment problem is as follows:


n n
Min Z = C
i=1 j=1
x
ij ij

Subject to:
n

x
j =1
ij =1 for i = 1, 2,..., n
n

x
i =1
ij =1 for j = 1, 2,..., n

1 if an assignment is made from source i to destination j


xij = 
0 otherwise

The above formulation is a standard transportation problem with n sources and n


destinations where supply Si = 1 for I = 1, 2,…, n, and the demand Dj = 1 for j = 1, 2, …,
n.

The Hungarian Method


The Hungarian method is a special solution method for the assignment problem
developed on the basis of a mathematical property due to a Hungarian mathematician
called König. This method is based on the assumption that the assignment costs Cij are
nonnegative. The solution procedure for the Hungarian method is presented:

1. Develop opportunity cost table through row and column reductions. This is done by
subtracting the least value in each row or column from all the other values in that row
or column.
2. Draw the minimum number of horizontal and/or vertical lines necessary to cross out
all zeros. If the number of lines satisfies the condition m = n, the optimal assignment
has been determined. If not go to step 3.
3. Subtract the minimum uncrossed value from all uncrossed cell values and add this
same amount to all values at the intersection of lines.
4. Repeat the test for m = n unique solution.

The following problem is used to demonstrate the assignment method and its solution.

Three operators are available to be assigned to work on three machines in a manner that
will minimise total cost. The cost of each operator i, working on machine j, is given as
follows:

Table 3.25

1
Operations Research in Mining Assignment Problem

Machine j
Operator i 1 2 3 Supply
1 $7 3 5 1
2 8 9 2 1
3 9 6 8 1
Demand 1 1 1 3

The first step in the solution process is to construct an opportunity cost table. This table is
constructed by first subtracting the minimum value in each row from all other values in
the same row.

For the problem given the following opportunity cost table results:

Table 3.26
Machine
Operator 1 2 3
1 4 0 2
2 6 7 0
3 3 0 2

Repeat this procedure for each column by subtracting the minimum column value.

Table 3.27 results:

Table 3.27
Machine
Operator 1 2 3
1 1 0 2
2 3 7 0
3 0 0 2

The next step is to try and draw the minimum number of horizontal and/or vertical lines
to cross out all zeros. If this number equals the number of rows and columns the
assignment is optimal. Assign to these cells with zero values.

In this case, exactly 3 lines cross out the zeros, hence the assignment is optimal.
The optimal assignment is:

Operator Machine Cost($)


1 2 3
2 3 2
3 1 9
14

Consider the following cost table for the assignment of 4 operators to 4 machines.

Initial Assignment Tableau:

2
Operations Research in Mining Assignment Problem

Table 3.28
Machine
Operator 1 2 3 4
1 10 15 16 18
2 14 13 16 10
3 11 9 8 18
4 13 13 11 9

Construct opportunity cost table:

Table 3.29
Machine
Operator 1 2 3 4
1 0 5 6 8
2 4 3 6 0
3 3 1 0 10
4 4 4 2 0

Table 3.30
Machine
Operator 1 2 3 4
1 0 4 6 8
2 4 2 6 0
3 3 0 0 10
4 4 3 2 0

Since only 3 lines (< 4) can be drawn the solution is not optimal.

The next is to subtract the smallest uncrossed value from all other uncrossed values, then
add this minimum value to any value at the intersection of two lines.
Repeat the drawing of lines in the resulting opportunity cost table.

Applying this to Table 3.30 the following results:

Table 3.31
Machine
Operator 1 2 3 4
1 0 4 6 10
2 2 0 4 0
3 3 0 0 12
4 2 1 0 0

This solution is optimal as a minimum 4 lines can be drawn.

The optimal assignment is:


Operator Machine Cost($)
1 1 10

3
Operations Research in Mining Assignment Problem

2 2 13
3 3 8
4 4 9
40

An alternative assignment (multiple optimal solutions) is:


Operator Machine Cost($)
1 1 10
2 4 10
3 2 9
4 3 11
40

Unequal Supply and Demand


In real situations the number of sources may be more than the number of destinations.
The number of operators may exceed the number of machines and vice versa. In such a
case a dummy row or column is added to balance requirements. Assignment costs for
dummy row or column will all be zero.

The following is an example of unequal supply and demand.

Four operators can operate three machines at the following costs. Find the assignment that
will minimise total cost.

Table 3.31
Machine
Operator 1 2 3
1 7 10 4
2 9 8 6
3 11 3 2
4 7 6 3

Problem
A manufacturing firm has five employees and six machines. The firm desires to assign the
employees to the machines in a manner that will minimise cost. A cost table showing the
cost incurred by each employee on each machine is:

4
Operations Research in Mining Assignment Problem

Machine
Employe A B C D E F
e
1 $12 7 20 14 8 10
2 10 14 13 20 9 11
3 5 3 6 9 7 10
4 9 11 7 16 9 10
5 10 6 14 8 10 12

However, due to union rules regarding departmental transfers, employee 3 cannot be


assigned to machine E and employee 4 cannot be assigned to machine B.
Use the assignment method to find the optimal assignment and minimum cost.

5
Operations Research Simulation

SIMULATION

Simulation is one of the most widely used operations research techniques. It has found very
wide application in the mining and allied industries.

By definition Simulation is the process of designing a model of a real world system and
conducting experiments with this model for the purpose of understanding the behaviour of
the system and or evaluating various strategies for the operation of the system.

A system is a group or collection of interrelated elements that co-operate to accomplish some


stated objective.

A model is a representation of a group of objects or ideas in some form other than that of the
entity itself. Models are important because they are used to enable one learn something about
a real world system that cannot be observed or experimented with directly.

Types of Simulation Models


Simulation models can be classified in different ways.

Iconic or Symbolic Simulation Models


Iconic simulation models look, in some sense, like the real system and are used primarily for
training purposes. Examples are flight simulators for teaching pilots how to fly and to handle
emergencies, and driving simulators for teaching students how to drive a car.

Symbolic simulation models are those in which the properties and characteristics of the real
system are represented in mathematical or symbolic form. Symbolic models are usually run
on a computer.

Deterministic or Stochastic Simulation Models


Simulation models can also be classified with respect to whether or not the model recognises
the presence of random variation in the system.

Deterministic simulation models ignore randomness. A stochastic model represents the


important random components of the system.

Static or Dynamic Simulation Models


Simulation models can be classified in relation to time. A static simulation model shows the
behaviour of a system at a single point in time. An example is a cash flow model that shows
the cash flow at the end of a year.

A dynamic simulation model describes the behaviour of a system through time. An example
is a shovel-truck haulage model which simulates events and activities through a shift.

Discrete, Continuous or Combined Simulation Models


Simulation models can also be classified according to how the model represents changes of
state within the system. A discrete simulation model describes the changes in the status of a
system as occurring at isolated points in time. A continuous simulation model describes
change of state as a continuous phenomenon. Continuous models normally consists of
algebraic, differential or difference equations. A combined simulation model represents some
parts of the system as discrete and other parts as continuous.

1
Operations Research Simulation

The Simulation Process


Simulation modelling is purposed to assist the decision maker to solve a problem. In the
process, problem-solving techniques should merge with software engineering. The following
steps are involved in simulating a system.

1. Problem Definition: this involves clearly defining the goals of the study.
2. System Definition: This involves identifying the system variables, the interrelationship
among the system variables. The various performance criteria, decision rules should also
be identified.
3. Conceptual Model Formulation: This involves developing a preliminary model of the
system by either block diagram or pseudo-codes to represent the components, variables
and interactions.
4. Preliminary Experimental Design: This involves the selection of various measures of
effectiveness, factors to be varied, levels of factors to be varied.
5. Input Data Gathering: Once various measures of effectiveness, factors and their levels are
selected, the data needed for the study can be identified and collected.
6. Model Translation: This involves coding the model in a suitable simulation language.
7. Verification and Validation: This involves debugging and making sure that the model’s
output is representative of the real world system.
8. Final Experimental Design: Designing an experiment that will generate the information
desired of the model.
9. Perform Simulation: This involves executing the simulation to obtain results.
10. Analysis and Interpretation: This involves drawing inferences from simulation output.

Stochastic Simulation

The Monte Carlo Sampling Process


Monte Carlo sampling is a mathematical technique for selecting numbers randomly from a
probability distribution for use in a simulation run.

Monte Carlo technique originated in World War II and is attributed to Von Neumann and
Ulan, who used the technique as a tool for developing the atomic bomb. The research
involved a simulation of probabilistic problems concerned with random neutron diffusion of
fissionable material for nuclear shield devices. The name Monte Carlo was given because the
basic principle is the same as that underlying gambling devices, like roulette wheels, dice and
playing cards.

A Random Process Generator


As mentioned earlier on, the objective of stochastic simulation is to reproduce the variability
of the random variable(s) in the system being studied. This process involves the use of a
random process generator. The following example will be used to illustrate the development
of a random variable generator.

Example: The demand per day for a product is a discrete random variable defined by the
probability distribution in the following table:

Table 4.1
Daily Demand Probability of Demand
x p(x)

2
Operations Research Simulation

14 0.2
15 0.4
16 0.2
17 0.1
18 0.1

The cumulative distribution function F(x) is used, in the random process generation, to
generate values of the random variable x. The cumulative distribution function, F(x) is shown
in table 4.2.

Table 4.2
Daily Demand Probability of Demand Cumulative Distribution
x p(x) F(x)
14 0.2 0.2
15 0.4 0.6
16 0.2 0.8
17 0.1 0.9
18 0.1 1.0

As shown in table 4.2 above, the cumulative distribution is defined over the interval (0,1) and
represents the probability that demand will be less than or equal to x. e.g. F(16) = p(x  0.8.
This is graphically illustrated in Figure 4.1.
1
0.9
Cumulatie Distribution F(x)

0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0
13 14 15 16 17 18
Daily Demand x

Figure 4.1
It can be seen from the graph above (Figure 4.1) that the cumulative distribution for x
includes a series of ranges where each range corresponds to a particular demand. If a number,
r, between 0 and 1 can be generated randomly, then by determining which range the random
number (r) falls in, an associated value for demand, x, can be shown on the horizontal axis.
For example, r = 0.76 on the F(x) axis falls within the range 0.60  0.80. This corresponds to
a demand of 16. Thus, by randomly selecting values of r, values of x are randomly generated.

The process of using the Monte Carlo technique to generate random variables can be
demonstrated. Firstly, a random number is generated using random number tables (refer to
appendix1). Using the first column, the first number in the table is 39. Divide that number in
the table by 100 (since all numbers in the table are two digit numbers) to normalise it to a
value between 0 and 1. Using the graph in Figure 4.1, the demand corresponding to F(x) =
0.39 is 15. If the process is repeated for the first 15 numbers in the first column of the random
number table (Appendix 1) the following results:

3
Operations Research Simulation

Table 4.3
Demand Period r = F(x) Demand (x)
1 0.39 15
2 0.73 16
3 0.72 16
4 0.75 16
5 0.37 15
6 0.02 14
7 0.87 17
8 0.98 18
9 0.10 14
10 0.47 15
11 0.93 18
12 0.21 15
13 0.95 18
14 0.97 18
15 0.69 16
241

The values in Table 4.3 simulate daily demand of a product for 15 periods.
241
The average demand is = 16 151 .
15

Simulation of a Queuing System


Consider a shovel-truck haulage operation (which is a typical queuing system in mining)
involves a number of trucks being loaded by a shovel. The arrival times of trucks and service
(loading) time of the shovel can be described by discrete random variables. The probability
distributions for each random variable are as follows:

Table 4.4
Arrival Interval Cumulative Random Number
(min) Probability Probability Range
x p(x) F(x) r1
1.0 0.30 0.30 0.00-0.29
2.0 0.50 0.80 0.30-0.79
3.0 0.20 1.00 0.80-0.99

Loading Time Cumulative Random Number


(min) Probability Probability Range
y p(y) F(y) r2
2.0 0.30 0.30 0.00-0.29
3.0 0.30 0.60 0.30-0.59
4.0 0.40 1.00 0.60-0.99
In order to simulate this system both arrival intervals and loading times should be randomly
generated. The simulation of the next ten truck arrivals is presented. The random number
table is used as previously.

Table 4.5

4
Operations Research Simulation

Arrival Arrival Start Wait Queue Loading Depart Time


ith Interval Clock Loading Time Length Time Shovel in
Truck r1 (x) Time at Entry r2 (y) Time System
1 - - 0 0 0 0 0.39 3.0 3.0 3.0
2 0.73 2.0 2.0 3.0 1.0 0 0.72 4.0 7.0 5.0
3 0.75 2.0 4.0 7.0 3.0 0 0.37 3.0 10.0 6.0
4 0.02 1.0 5.0 10.0 5.0 1 0.87 4.0 14.0 9.0
5 0.98 3.0 8.0 14.0 6.0 1 0.10 2.0 16.0 8.0
6 0.47 2.0 10.0 16.0 6.0 1 0.93 4.0 20.0 10.0
7 0.21 1.0 11.0 20.0 9.0 2 0.95 4.0 24.0 13.0
8 0.97 3.0 14.0 24.0 10.0 2 0.69 4.0 28.0 14.0
9 0.41 2.0 16.0 28.0 12.0 2 0.91 4.0 32.0 16.0
10 0.80 3.0 19.0 32.0 13.0 3 0.67 4.0 36.0 17.0
65.0 12 101.0

The shovel-truck haulage system simulated in Table 4.5 has two main random variables;
arrival interval between trucks (x) and truck loading time of shovel (y). The Monte Carlo
sampling process is used to simulate both arrival interval and loading time.

It is assumed that initially there is no truck at the shovel, therefore the first truck that arrives
is immediately loaded. The arrival clock at that moment starts at 0, loading is also started at
time 0, there is no waiting (waiting time = 0). Since there was no truck before the first, the
queue length at entry is 0. On the basis of Monte Carlo sampling it took 3 minutes to load the
first truck and it departed the shovel immediately after loading (3 minutes.), the total time the
truck spent in the system (shovel area) is therefore only the loading time (3 minutes.).

On the basis of Monte Carlo sampling, the second truck arrived in the system 2 minutes after
the first, implying that the arrival clock was reading 2. The shovel started loading this truck
only immediately after it completed loading the first (3 minutes), therefore the second truck
had to wait for (3-2= 1 minute). At the time of arrival of second truck, there was no truck
queuing (first truck was being loaded), queue length at entry is then 0. On the basis of Monte
Carlo sampling the shovel took 4 minutes to load second truck which means the second truck
departed the shovel after time 7 minutes (3minutes for first and 4 minutes for second). The
time the second truck spent in the system is 5 minutes (1 minute waiting + 4 minutes being
loaded). The other times for the remaining trucks were determined similarly.

Based on the results of the simulation the following statistical attributes of the system are
computed:

Total Time 65
Average waiting time of truck = = = 6.5 min.
No. of Trucks 10

12
Similarly, average length of queue at entry = = 12
. trucks .
10

101
The average total time at the shovel area = = 101
. min.
10

5
Operations Research Simulation

It is evident that in simulating a system, random numbers are required to generate status-
changing events. A random number is a random variable that is uniformly distributed over
the interval 0 and 1. That means each number between 0 and 1 has an equal chance of
occurring.

Generation of Random Variates


In almost all simulation experiments there is the need for generating random statistical
variates from a certain distribution. The distribution will be the one that adequately represents
the physical process involved at that point in the experiment.

The general process for generating a random variate from a particular distribution follows the
following steps:
1. Generate a random number from the uniform distribution.
2. Perform a mathematical transformation of the uniform random number or numbers which
produces a random variate from the desired distribution.
3. Use the transformed variate in the experiment as desired.

The uniform distribution over an interval [0,1] is given by:


f(x) = 1 for 0x1
F(x) = x for 0x1

Where f(x) is the probability density function and is the probability that x occurs, and F(x) is
the cumulative distribution.
Uniform random numbers are numbers generated from the uniform distribution over a range
[0,1]. The most common method of generating uniform random numbers on a digital
computer is by algorithmic recursive equations for generating pseudo-random numbers. Since
algorithms are used in the generation of random numbers they are referred to as pseudo-
random numbers.

Properties of Uniformly Distributed Numbers


As a simulation experiment proceeds in time, uniform random numbers are generated
repeatedly to facilitate the production of random variates from any other statistical
distribution required by the simulation. A random number generator should have the
following main properties:

1. The numbers generated should as nearly as possible be uniformly distributed.


2. The generator should be fast.
3. The generator should have a long period
4. The generator should be able to produce streams of numbers depending on where it starts.
5. The generation method should not degenerate to repeatedly produce a constant value.
6. The generator should not produce a zero.

Three methods for generating random numbers are presented.

1. Midsquare Technique
This employs a seed value (the first number in the series) to generate random numbers. The
seed value is squared, and selected middle digits are used as the random number. This
number is used as the new seed and squared to develop the next random number.

Example:

6
Operations Research Simulation

Initial seed value, r0 = 1345


2
(1345) = 01 (8090)25, r1 = 8090
(8090)2 = 65(4481)00, r2 = 4481, etc

The values generated are transformed by dividing each by 10,000 (since 4 digits are
involved) and employed as random numbers in the interval [0,1].

This technique is rarely used because of these problems:


• The amount of time consumed by the many manipulations of the computer in developing
the middle digits of the seed value.
• This method degenerates when zeros come up as the middle four digits.

2. Mid-Product Method
The mid-product method employs the following formula:

rn+1 = k(rn)

Where, rn = a seed value


k = a constant
rn+1 = the middle digits of the product k(rn)
Example:
If k = 4213, rn = 1565;
then r1 = 4213(1565) = 06(5933)45
r1 = 5933 or 5933/10000 = 0.5933 for an interval [0,1].
r2 = 4213(5933) = 24(9957)29
r2 = 9957 or 0.9957 for an interval [0,1], etc.

Although this method tends to generate more uniformly distributed numbers, it is also rarely
used for the same reasons as the midsquare method.

3. Multiplicative Congruential Method


Congruential techniques are the most widely used methods for generating random
numbers. They generate random numbers that are more uniformly distributed and
generally require less computer time and cost. The sequence of random numbers is
reproducible and the period can be made to be very long before cycling.

The multiplicative congruential method uses the following approach:


rn+1 = (arn) mod m

Where,
a = constant multiplier
r1 = seed
Example: Select a seed of 29, a = 17, m =100

r2 = (1729) mod 100 = 493 mod 100 = 93  r2 = 0.93 for interval [0,1]
r3 = (1793) mod 100 = 1581 mod 100 = 81  r3 = 0.81 for interval [0,1]
r4 = (1781) mod 100 = 1377 mod 100 = 77  r4 = 0.77 for interval [0,1]
etc.

For another example Let r1 = 5, a = 5, m = 17

7
Operations Research Simulation

r2 = (55) mod 17 = 25 mod 17 = 8


r3 = (58) mod 17 = 40 mod 17 = 6
r4 = (56) mod 17 = 30 mod 17 = 13

The other numbers to complete the sequence are:


5, 8, 6, 13, 14, 2, 10, 16, 12, 9, 11, 4, 3, 15, 7, 1, 5, …

It is seen that 16 numbers were generated before the first number was repeated. Note also that
every number from 1 and 16 is in the sequence, but neither 0 nor 17 (the modular) appear.

The same sequence of random numbers can be obtained if the same seed is selected for the
same constants.
The numbers in the series and the length of period depends on the size of m (the modular). In
the second example m was 17 and the numbers in the series was 16. In general the bigger the
value of m the longer the series. For instance, in SIMAN (a general purpose simulation
language) simulation m = 231 - 1. This leads to a total number of 2 billion numbers per cycle,
for a seed value between 1 and 231 - 2. A multiplier of 16807 is used.

Generating a Random Variate with a Probability Density Function


The process for generating random variates for a distribution is different from a discrete one
(as in the daily demand and shovel-truck haulage examples). There are various techniques:
The Inverse Transformation Method; The rejection Method.; Composition Method,
Mathematical Derivation Method and Approximation Methods. The use of a particular
method depends on the type of distribution involved in the simulation experiment. The use of
the Inverse Transformation Method will be presented.

The Inverse Transformation Method


The inverse transformation technique is applied to distributions whose inverse functions can
be derived. The cumulative distribution function F(x) of the distribution to be simulated is
defined over an interval (0,1). Using a random number generator a uniform random number
can also be generated over the interval (0,1) and the relationship F(x) = r is set. Then x which
is the variable desired from the given distribution is determined uniquely by the relationship x
= F-1(r). Therefore, as long as the inverse transformation x = F-1(r) of the particular
cumulative distribution can be established the method can be employed. An example will be
used for illustration.

Example: The probability distribution for a random variable x which is the interarrival time
of dump trucks to a fuelling depot is defined as:
x
f(x) = 0x4
8
This function is plotted in Figure 4.2.

8
Operations Research Simulation

f(x)
0.6
0.5
0.4
0.3
0.2
0.1
0 x
0 2 4 6

Figure 4.2

The curve in figure 2 represents the probability of occurrence of x. The area under the curve
is 1 - the sum of all probabilities of occurrence of x. The cumulative distribution function,
F(x), is the area under the curve from 0 to any value of x. Mathematically, this is the integral
of the density function over the limits 0 and x. For the above distribution,
x
t2 
x
t x2
F ( x ) =  dt =  =
0
8 16  0 16

The graph of the cumulative distribution over the same interval (0  x  4) is plotted in
Figure 4.3.

F(x)
1.2
1
0.8
0.6
0.4
r =0.25
0.2
0 x
0 1 2 3 4 5

Figure 4.3

From Figure 4.3, for any given value F(x) in the interval (0,1), a corresponding value of x can
be found. Therefore any value of a random number r between 0 and 1 can be translated into a
value for x using the relationship r = F(x).

x2
In this case r = F(x) =
16

9
Operations Research Simulation

and x2 = 16r  x = 4 r
x = F-1 (r) = 4 r

For instance if a random number 0.25 is generated in the simulation process, then based on
Monte Carlo sampling the corresponding value of x (truck interarrival time) will be
4 0.25 = 2 , as shown in figure 3.

The following distribution functions: triangular, Weibull, uniform geometric and exponential
have appropriate inverse functions which enable the use of the inverse transformation
technique for simulating these distributions.

For the exponential distribution:


the probability density function, f(x) = e-x, for x  0
-x
the cumulative distribution function, F(x) = 1 - e , for x  0

To find the inverse transformation:


Set r = 1 - e-x = F(x)
 1 - r = e-x

If r is uniformly distributed in the interval (0,1) then 1-r is also uniformly distributed in the
same interval (0,1), so
r = e-x
ln r
x=− = F −1 (r )

On the basis of this inverse transformation the Monte Carlo sampling process can be used to
simulate any random variable that is exponentially distributed.

The inverse function does not exist or is mathematically complicated to develop for many
other distributions. In such a case, the other method s of generating random variates are
employed.

A Take Home Assignment on Simulation


At an underground mining operation, workers arrive at the shaft collar office to collect their
lamps before boarding the cage to go underground. There are three points at which lamps can
be collected by presenting an ID tag.

Each of the three collection points has a person who serves the miners according to the
discrete probability distributions in Table 4.6:

The miners arrive at the lamp collection area and join a queue if all service points are busy. If
any one service point is idle the first miner in the queue proceeds to be served, therefore
queue discipline is FIFO. There is a probability of 1/3 that a worker will go to a particular
server, if three servers are free. There is a probability of ½ that a worker will go to a
particular server, if two servers are free.
Table 4.6
Server1 Server2 Server3
Service Probability Service Probability Service Probability
Time (%) Time (%) Time (%)

10
Operations Research Simulation

(sec) (sec) (sec)


10 40 8 30 12 30
15 40 14 40 15 60
20 20 17 30 18 10

The interarrival time of the miners to the collection area follows the exponential distribution
with parameter  = 5 seconds. The density function of the exponential distribution f(x) =
x
1 −

e for x  0.
Simulate the lamp collection system for the next 20 arrivals and find the average waiting time
of each miner, the average idle time of each of servers 2 and 3 and the average time a miner
spends at the lamp collection office. Use the Multiplicative Congruential (with a seed value,
r1 = 71, constant multiplier, a = 13 and mod, m = 97) technique to generate your uniform
random numbers.

Determining the Distribution of Various Random Variables [Input Analysis]


Stochastic simulation involves the simulation of various components of a system which are
represented by random variables. The random variables are characterised by various
distributions:
• Discrete, or
• Continuous

Some common distributions that describe various physical phenomena are: uniform,
triangular, exponential, gamma (Erlang), weibull, normal, lognormal and beta, etc which are
all continuous. Some common discrete distributions are: discrete uniform, geometric,
binomial and Poisson.

The first step in determining the distribution of a particular variable is to summarise the data
in descriptive statistics. For a discrete variable, the frequency with which each value occurs is
recorded. For a continuous variable, the range of data is divided into classes and the
corresponding frequencies determined. The frequency distribution of the data is then plotted.

The frequency distribution plot can be compared to the frequency distribution of a theoretical
one. From visual comparison the more likely distribution will be known.
Once the form of the distribution has been hypothesised, the parameters of the distribution
can be determined.

Test of Goodness-of-fit
After selecting a likely distribution that is believed will adequately represent the data, and
after estimating the parameters of the selected distribution, the next step is to assess the
quality of fit. The quality of fit can either be assessed graphically or by using goodness-of-fit
tests. A goodness-of-fit test attempts to measure and evaluate the deviation of the sample
distribution from the theoretical. The Chi Square (2) test or Kolmogorov-Smirnov test can
be used.

Chi Square Test


The test statistic is calculated as follows:

11
Operations Research Simulation

 (O
i =1
i − Ei ) 2
 02 =
Ei
Where;
k = number of classes or intervals
Oi = observed frequency for ith class or interval.
Ei = expected frequency for ith class or interval predicted by the theoretical distribution.
Chi square test is applicable to at least 30 samples.

The test procedure involves computing the chi square statistic for a given sample and
deciding whether to accept or reject a stated null hypothesis.

The null hypothesis, H0 is given as:


H0: The random variable x conforms to the distribution assumed with the estimated
parameter(s).
The alternative hypothesis, H1 is given as:
H1: The random variable x does not conform to the assumed distribution with the estimated
parameter(s).

The decision rule is Reject H0 if  02  2,k − s −1

Where k-s-1 is the number of degrees of freedom


s- is the number of parameters

Minimum size for Ei is Ei  5

If Ei < 5, then two or more classes can be combined - with expected (Ei) frequencies in
adjacent classes.

Ei = nPi
Pi: the theoretical probability of the ith class interval.
n: the total number of observations.

Example: The number of mine vehicles passing the main entrance to the Tarkwaian Open Pit
mine in a 5 minute period from 7.00-7.05 am for five working days/week, over 20 weeks is
given as follows:

Table 4.7
No. of Vehicles Passing Frequency
0 12
1 10
2 19
3 17
4 10

12
Operations Research Simulation

5 8
6 7
7 5
8 5
9 3
10 3
11 1
100

• Analyse the Data


Plot Frequency Distribution

20

15
Frequency

10

0
0 1 2 3 4 5 6 7 8 9 10 11
No. of Vehicles
Figure 4.4

Pictorially, the shape of the distribution looks like Poisson. Poisson distribution is therefore
assumed.

• Estimate the distribution parameter:

The distribution function of Poisson is:


 e 
− x

for x = 0, 1, 2, ...
p( x) =  x!
0 other wise

The Poisson distribution is described by parameter, .


The maximum likelihood estimate of ,  is x - the sample mean.
1 k
x =  xi f i
n i =1

Where n is number of students


xi is number of arrivals for class I
fi is frequency of class i.

13
Operations Research Simulation

x = (120 + 110 + 219 + 317 + 410 + 58 + 67 + 75 + 85 + 93 + 103 + 111) 
100 = 3.64

On this basis, H0 and H1 are stated as follows:


H0: x is Poisson distributed with  = 3.64
H1: x is not Poisson distributed with  = 3.64

The theoretical probabilities (Pi’s) can be calculated as follows:


e −3.64 3.64 0
P(0) = = 0.026
0!

e −3.64 3.64 1
P(1) = = 0.096
1!
e −3.64 3.64 2
P ( 2) = = 0174
.
2!

P(3) = 0.211; P(4) = 0.192; P(5) = 0.14; P(6) = 0.085;


P(7) = 0.044; P(8) = 0.020; P(9) = 0.008; P(10) = 0.003; P(11) = 0.001

Chi square statistic is calculated using Table 4.8

Table 4.8
(Oi − E i ) 2
xi Oi Pi Ei Ei
0 12 0.026 2. 6  7.87
1 10 0.096 12.2
2 19 0.174 9 .6  0.15
3 17 0.211 17.4 0.80
4 10 0.192 21.1 4.41
5 8 0.140 19.2 2.57
6 7 0.085 14.0 0.26
7 5 0.044 8.5
8 5 0.020
4.4 
9 3 0.008 2.0 11.62
10 3 0.003 0.8 7.6
11 1 0.001 0.3
. 
01  02 = 27.68

Note that k has changed from 12 to 7, since some classes have been combined.
S=1
k-s-1=7-1-1=5
 (level of significance) = 0.05 i.e. 95% level of confidence.

From Chi square tables (appendix 2),  02.05,5 = 111


.

Reject H0, since  02 = 27.68 >  02.05,5 = 111


.

14
Operations Research Simulation

Data set does not describe the Poisson distribution.

Analysis of Simulation Output

Terminating and Non-terminating Systems


The way a simulation model is analysed depends on whether it is terminating or non-
terminating.

A terminating system has a fixed starting condition (to which it returns after each
termination) and an event defining the natural end of the simulation, e.g. post office,
restaurants, banks, retail stores, petrol filling stations. A non-terminating system has neither a
fixed starting condition and a natural ending point, e.g. hospital, and most production
systems.

Terminating Systems Analysis


In analysing a terminating system, there are two sources of observations for the analysis. The
individual observations within each replication (e.g. each trucks waiting at a shovel can be
used as observations for estimating the expected waiting time of trucks at that shovel) can be
used. The sample size in this case will be the total number of truck entities processed in a
single simulation run. Alternatively, the summary values (e.g. sum or average of the variable
of interest) for each replication can be used. In this case each replication produces a single
observation, and the sample size is the number of replications.

The second approach is normally used for analysis because if the simulation experiments is
designed to have a different seed for each replication then the set of random numbers for each
replication will be different and it can be assumed that each replication is independent of the
other. Terminating systems are therefore analysed by using individual observations for a
number of replications. If a single value (from each replication) is the sum or average of
many individual observations within a replication, then normal distribution can be used on
the basis of central limit theory. The central limit theory states that when we sum or average
many individual random values, the resulting sum or average is approximately normal,
regardless of the distribution of individual values.

Constructing Confidence Intervals on the Mean


Simulation outputs are often characterised by estimating the mean of individual observations
from a number of replications. The confidence interval is a means of estimating the precision
associated with the estimated mean. Confidence interval is stated in this form:
C.I. = x  h
Where
x is sample mean, and
h is interval half width

A random-sample mean, x , will fall within the interval with a probability of 1- ( is the
level of significance). This probability is called the confidence level of the interval. The half
width h is a measure of the precision of a point estimate, x , of the true mean, . The smaller
the half width the better the estimate.

15
Operations Research Simulation

s
h = t1− / 2 ,n −1
n
t1-/2,n-1 is obtained from student t-distribution tables (appendix 4).
n is the number of samples, and
s is the sample standard deviation

 (x
i =1
i − x)2
s2 =
n −1
Confidence interval estimation is based on the assumption that the observations are normally
distributed.

Example: A simulation experiment was conducted to determine the number of shovel loads in
a two hour operation. The results for 10 simulation replications (runs) are given in Table
4.10. Estimate the 95% confidence interval of the mean.

Table 4.10
Replication No. No. of Shovel Loads
1 93
2 113
3 107
4 103
5 112
6 103
7 112
8 100
9 98
10 105

x = (93 + 113 + 107 + 103 + 112 + 103 + 112 + 100 + 98 + 105)  10


= 104.6
s = 6.6
t1-0.05/2,10-1 = 2.262 (appendix 4)
6.6
h = 2.262  = 4.7
10

C.I. = 104.6  4.7


Hence, it can be stated with a high confidence (95%) that the true expected (average) number
of shovel loads is between 99.9 and 109.3.

Simulation Languages
At a stage in the simulation process the model should be translated into a language that will
be acceptable to the computer. More than 10 simulation packages are commercially available.

Any general algorithmic language (FORTRAN, BASIC, PASCAL, C, etc) is capable of


expressing the desired simulation model however, specialised simulation languages have very
distinct advantages, some of which are:
• reduced programming task

16
Operations Research Simulation

• conceptual guidance
• increased flexibility when changing the model
• fewer programming errors, and
• automated gathering of statistics.

Some of the more common simulation languages are:

• GPSS (general purpose systems simulation) was developed in 1977 by James Henrickson.
• SIMAN (ARENA) was developed between 1980 and 1984 by Dennis Pegden.
• SIMSCRIPT was developed in the early 1960’s by Harry Markowitz.
• SLAM II (simulation language for alternative modelling) was developed by Pritsker

Some Applications of Simulation in Mining

• Production systems like: conveyor networks, truck-shovel system, dragline operation,


surface mining, continuous mining, longwall mining, etc.
• Queuing systems
• Inventory problems
• Maintenance, etc.

Problem
The time between arrivals of fuel tankers at a filling station for unloading is given by the
following probability distribution.

Time between Tanker Arrivals (Days) Probability


1 0.05
2 0.10
3 0.20
4 0.30
5 0.20
6 0.10
7 0.05

a. Generate randomly the time between arrivals for the first twenty tankers (use the
multiplicative congruential technique with r1 = 59, a = 13 and m = 97).
b. Compute the relative frequency of the times between arrivals in (a) and compare these
simulated results with the actual probability distribution. Explain the difference between
the two.
c. Assume that the time to unload, clean and prepare a truck for departure is five days.
Develop a simulation experiment for the movement of tankers to and away from the
filling station (only one tanker can be serviced at a time). Compute the mean time
between arrivals, mean waiting time for unloading, mean number waiting to unload and
proportion of arrivals entering an empty system.
d. Assume that the time required to unload, clean and prepare a tanker for departure is a
random variable defined by the following distribution:

17
Operations Research Simulation

Time between Tanker Arrivals (Days) Probability


3 0.10
4 0.20
5 0.40
6 0.30

Repeat (c) for this condition.

18
Operations Research Network Scheduling

NETWORK SCHEDULING

CPM (Critical Path Method) and PERT (Project Review and Evaluation Technique) are two
of the best-known network modelling techniques. These methods were developed to aid the
planning, scheduling and control of large complex projects.

CPM/PERT are identified with respect to their basic concepts, which focus on activities,
events, predecessors, and a critical path. PERT emphasises the uncertainties associated with
activity completion times. CPM assumes certainty with regard to activity time and estimates
and places emphasis on project cost and completion time.

PERT has frequently been used to plan and control research and development projects while
CPM has been more frequently used for large construction projects. CPM/PERT analyses
have been specifically applied to shipbuilding, highway construction, oil refinery
maintenance projects, major building projects, installation of various machinery systems, etc.
In mining, CPM/PERT can be used for construction and installation of shovels, draglines,
conveyor systems, hoist machinery, stoping operations and various production operations.

Components of CPM/PERT Network and Precedence Relationships


There are two major components of CPM/PERT network: activities and events.

An activity or job is an operation or process consuming time and resources and incurring
cost. An event is a state in the progress of a project after the completion of all the preceding
activities but before the start of any succeeding activity.

It is required that a CPM/PERT network modelling process breaks down the process into
independent activities (jobs) and specifies the precedence relationships.

Example:
UMaT has planned to construct a concrete walkway from the library to join the main road to
Government Hill. This involves the following activities:

Table 5.1
Activity Activity Start and Activity Activity Activity Duration
Finish Nodes Description Predecessor Estimate
a (1,2) Construct forms - 5 hours
b (2,3) Pour concrete a 1 hour

The network diagram of the concrete walkway project is as follows:

Event 1 Event 2 Event 3


a b
1 2 3
Construct forms Pour concrete
Node 1 Node 2 Node 3
Figure 5.1

1
Operations Research Network Scheduling

Therefore, events are represented by nodes while activities are represented by arrows.
• Direction of arrow indicates the direction in which the activity proceeds.
• The length of arrow is not proportional to the duration of an activity or job.
• The network also shows that activity a precedes activity b OR activity b succeeds activity
a.

1 A 2
A
3 1
B B
2 3

A
1 2 1 A
C 4
3
B B
3 4 2

Figure 5.2

In all the networks in Figure 5.2 the jobs A and B are concurrent. Activities A and B should
be completed before activity C can start.

Dummy Activities
A dummy activity has no duration; it does not consume time or resources. To demonstrate
the use of dummies the sidewalk construction project is modified as follows:

Table 5.2
Activity Start and Activity Activity Activity Duration
Activity Finish Nodes Description Predecessor Estimate
a (1,2) Prepare concrete - 2 hours
a (1,2) Construct forms - 5 hours
b (2,3) Pour concrete a, a 1 hour

Prepare concrete

a
1 2 Pour concrete 3 Figure 5.3
Construct forms b
a
The network in Figure 5.3 is an incorrect representation of the above project (Table 5.2). The
correct representation is given in Figure 5.4.

4
a
Dummy

1 2 3 2
a b
Operations Research Network Scheduling

Figure 5.4

Figure 5.3 violates a basic rule in CPM/PERT modelling: Two or more network activities
cannot simultaneously share the same start and finish nodes. A dummy activity is therefore
created to resolve this, as shown in figure 5.4.

A dummy activity (job) has a broken arrow and is used to preserve the precedence
relationship in a network. A dummy activity has no duration; it does not consume time or
resources.

Critical Path
A primary objective of CPM/PERT is to determine the minimum time required for
completion of a project. The minimum time required to complete a project is equal to the
longest time path, or sequence of connected activities, through the network, which describe
the precedence relationships of all project activities. The longest time path is also the critical
path.

In the modified concrete walkway construction project the critical path will be as follows:
4
a D
2 0
a b
1 2 3
5 1
Figure 5.5

The critical path is 1 2 3 6 hours.

This is the longest duration path from the beginning to the end of the project.

It should be noted that activity a (preparation of concrete) completes in 2 hours but activity b
can only begin after activity a (construction of forms) is completed i.e. after 5 hours.
Therefore there is a 3 hour (5-2) slack or float associated with activity a.

Activity Scheduling
It is necessary to determine the activity schedule that gives the start and finish times of each
project activity. In preparing such a schedule, a framework is provided for determining the
critical path and duration of project.

The following example will be used for illustration.


The schedule for a conveyor system acquisition and installation is given in Table 5.3:

Table 5.3

3
Operations Research Network Scheduling

Activity Duration
Activity Activity Description Predecessor Days
a Order/purchase various system components - 1
b Arrange for shipment a 2
c Ship components to harbour b 40
d Clear and prepare site a 32
e Transport Components from harbour to site c, d 1
f Pour concrete in place for foundation d 15
g Install supporting structure and deck e, f 10
h Install idlers and pulleys g 12
i Install loading and discharge chutes g 3
j Install motor and gear unit g 1
k Install belt h 1
l Connect motor to main electric supply j 1
m Test run conveyor system i, k, l 3

Once the duration of activities are known, the next step is to show the start and end events
(nodes) of each activity after using the other pieces of information given to construct a
network. Table 5.4 shows the start and end nodes of each activity.

Table 5.4
Activity Start and Activity Duration
Activity End Nodes (i,j) Predecessor Days
a (1,2) - 2
b (2,3) a 1
c (3,4) b 40
d (2,5) a 32
D1 (5,4) d 0
e (4,6) c, d 1
f (5,6) d 15
g (6,7) e, f 10
h (7,8) g 12
i (7,10) g 3
j (7,9) g 1
k (8,11) h 1
l (9,11) j 1
m (10,11) i, k, l 3

A network representation of the project is given in Figure 5.6


As can be seen, the network diagram shows the precedence relationships and the duration of
each activity. In order to determine the critical path of the project, the concept of earliest and
latest times will be presented.
c 9
3 4 j l
40 e 1 1
b 1
a 2 D1 g i m
1 6 7 10
4
Operations Research Network Scheduling

2 0 11
1 d f 10 3 3
h k
32 5 15 12 1
8
Figure 5.6

Earliest Time
The earliest time, ET, is the point in time at which all activities leading to a node (event) are
completed. ETi (i denoting node i) is therefore the earliest starting time for all activities
emanating from node i.

ET values for each event are calculated by a forward pass through the network, progressing
from project start node to end node. Since node 1 is the initial project event (in the conveyor
installation example) it follows that ETi = 0. The earliest time for event 2 is the completion
time for activity (1, 2) = 1, and so on.

The earliest time for each event is determined using the following formula:
ETj = max {ETi + tij}

Where,
ETj - is the earliest time for node j
ETi - is the earliest time that activity (i,j) can be started.
tij - is the duration of activity (i,j)

E.g. with reference to Figure 5.6 ET6 = max {ET4 + t46, ET5 + t56}
= max {43 + 1, 33 + 15} = 48

On a network diagram the earliest time is represented by a box with the time written inside
the box.

Latest Time
To determine the critical path the latest time of each event should be computed. The latest
time is the latest time an event can occur without delaying the completion of the project
beyond the time frame established in the forward pass. As observed from Table 5.6 the
earliest completion time of the project is 74 days.

Latest time (LT) values for each event are calculated by a backward pass starting from node
11 and ending at node 1. Since the objective is to complete the project in 74 days it implies
LT11 = 74. The time to complete activity (10, 11) is 3 days, hence LT10 = 74-3 = 71 days etc.

In general, the latest time for each node i, is given by:

LTi = min{ LT j − t ij } , for all activities (ij) emanating from node i.


j

The corresponding network is presented in Figure 5.7.


59
3 43 9
c j l
3 4 1 1 5
40 e
1 b 1 48 58 71 74
0 g
a 2 D1 6 m
1 2 0 7 10 11
1 10 3
Operations Research Network Scheduling

70
7 47 i
3
0 1 48 58
71 74
12
33

70
Figure 5.7

The critical path in Figure 5.7 is shown by double lines. The critical path lies on nodes where
ET and LT are equal. The ET’s are indicated in rectangular boxes on top while the LT’s are
indicated in triangular boxes below.

The critical path is 1-2-5-6-7-8-10-11. The critical activities and critical events are those
lying on the critical path.

Activity Slack
It can be realised from the network in Figure 5.7 that the non-critical activities can be
delayed to some extent without delaying the completion of the conveyor project. Activity
slack is a measure of how much a non-critical activity may be delayed or extended. Two
types of slack are defined for each activity of the project: Total slack (float) and Free slack
(float). Total slack (TS) is always greater than or equal to free slack (FS  TS).

Total slack (TSij) for activity (ij) is the maximum time period available to schedule the
activity minus the estimated duration of the activity.
TSij = LTj - ETi - tij

For instance referring to figure 5.7, TS79 = LT9 - ET7 - t79


= 70 - 58- 1 = 11 days

This means that activity (7,9) can be delayed for a total of 11 days without affecting the
completion of project.
TS910 = LT10 - ET9 - t910
= 71 - 59 - 1 = 11 days

Similarly, activity (9,10) can be delayed for a total of 11 days without affecting completion
of the project.

Free Slack
Free slack (FS) is the slack associated with an activity such that if the activity is delayed by
such period it will not cause any delay in its immediate successor activities. The free slack
(FSij) associated with activity (i,j) is defined as follows:

6
Operations Research Network Scheduling

FSij = ETj - ETi - tij

FS79 = ET9 - ET7 - t79


= 59 - 58 - 1 = 0

FS910 = ET10 - ET9 - t910


= 71 - 59 - 1 = 11

This implies that all the slack associated with activity (7,9) is shared with activity (9,10).
Since activity (7,9) immediately precedes activity (9,10) any delay in activity (7,9) will affect
the earliest start of activity (9,10).

Note that activities a, d, f, g, h, k, m which are critical activities all have FS = TS = 0.

Uncertainties in Activity Times (PERT)


CPM assumes certainty when specifying activity times. As activity duration are estimates, it
is reasonable to associate uncertainty with activity time estimates. PERT emphasises these
uncertainties.

PERT assumes that activity times are variables associated with the beta distribution. PERT
assumes three estimates of activity duration as follows:
1. Optimistic Time (aij): This is the shortest possible time required for the completion of
activity (i,j).
2. Most Likely Time (mij): this is the most likely (mode) time required to complete activity
(i,j). That is the most frequently occurring duration to complete the activity.
3. Pessimistic Time (bij): This is the longest possible time required to complete activity (i,j).

Based on the three activity time estimates and with the assumption of beta distribution,
formulas for calculating the mean (tij) and variance (vij) for the distribution of each activity
time are given as:

aij + 4mij + bij


Mean, t ij =
6
(bij − aij ) 2
Variance, vij =
62

Let us reformulate the conveyor project as a project whose time estimates involve some
uncertainty. Therefore optimistic, most likely and pessimistic times are estimated for each
activity as follows (Table 5.5):

Table 5.5
Activity Optimistic Most Likely Pessimistic
Nodes Time Time Time
Activity (i,j) aij mij bij

7
Operations Research Network Scheduling

a (1,2) 0.5 1 1.5


b (2,3) 1.5 2 2.5
c (3,4) 30 41.25 45
d (2,5) 28 31 40
e (4,6) 0.6 1 1.4
f (5,6) 13 14.75 18
g (6,7) 8.4 9.9 12
h (7,8) 10.5 11.5 15.5
i (7,10) 2.5 3 3.5
j (7,9) 0.7 1 1.3
k (8,10) 0.4 1.1 1.2
l (9,10) 0.7 0.95 1.5
m (10,11) 2 3 4

We now compute the mean duration (tij) of the various activities which will be used to
construct the PERT network for the reformulated Conveyor Project and the corresponding
variances (vij) as shown in Table 5.6.

Table 5.6
Activity Optimistic Most Likely Pessimistic
Nodes Time Time Time Mean Variance
Activity (i,j) aij mij bij tij vij
a (1,2) 0.5 1 1.5 1 0.028
b (2,3) 1.5 2 2.5 2 0.028
c (3,4) 30 41.25 45 40 6.25
d (2,5) 28 31 40 32 4
e (4,6) 0.6 1 1.4 1 0.018
f (5,6) 13 14.75 18 15 0.694
g (6,7) 8.4 9.9 12 10 0.36
h (7,8) 10.5 11.5 15.5 12 0.694
i (7,10) 2.5 3 3.5 3 0.028
j (7,9) 0.7 1 1.3 1 0.01
k (8,10) 0.4 1.1 1.2 1 0.018
l (9,10) 0.7 0.95 1.5 1 0.018
m (10,11) 2 3 4 3 0.111

Since the mean activity times tij of this project (Table 5.6) are the same as the first conveyor
project, the critical path is the same. Therefore the critical activities are a, d, f, g, h, k, m.

On the basis of the central limit theorem, the means (tij) of the critical activities and the
corresponding variances can be added.

This gives a total expected project duration (E(t)) of:


1 + 32 + 15 + 10 + 12 + 1 + 3 = 74 days

Variance of the expected duration, v(t) is given as:

8
Operations Research Network Scheduling

v(t) = v12 + v25 + v56 + v67 + v78 + v810 + v1011


= 0.028 + 4 + 0.694 + 0.36 + 0.694 + 0.018 + 0.111 = 5.905

Based on the central limit theorem the normal distribution is used to make probability
statements about the completion of project.

Firstly, the standardised normal random variable, z, should be determined.


t  − E (t )
z=
v (t )

Where,
t = the project completion time for which a probability statement is to be made.
E(t) = the mean project completion time
v(t) = variance of the mean project completion time.

For instance, suppose the project manager wants to know the probability of completing the
project in 70 days or less.

Calculate z as follows:
70 − 74
P(t  70) = P( z  ) = P( z  −1646
. )
5.905

The random variable z is distributed as follows:

-z 0 z
Figure 5.8

Positive values can be read directly from standardised normal distribution tables (Appendix
5) for the corresponding probability.

P(-z) = 1 - P(z)
 From standardised normal distribution tables P(-1.646) = 1 - P(1.646)
 P(-1.646) = 1 - 0.9505 = 0.05
 There is only 5% probability of completing the project in 70 days.

The probability of completing 80 days is given as follows:


80 − 74
P(t  80) = P( z  ) = P( z  2.469)
5.905

9
Operations Research Network Scheduling

P(2.469) = 0.9932
 There is 99.32% chance that the project will be completed in 80 days. It implies that there
is only a 0.7% probability of completing project beyond 80 days.

Project Crashing
During the normal course of a large project, many circumstances typically cause one or more
activities to fall behind schedule. It may than be desirable to expedite, or crash, some of the
activities to get back on schedule. It costs more to crash an activity than to allow it to proceed
at its normal pace, however, important cost-time trade-offs must be considered by project
management.

Since the critical path determines the project duration, it will be more proper to concentrate
on crashing the critical activities. The general procedure for crashing project activities while
minimising cost is as follows:

1. Determine the minimum project time and the associated critical path for a) if all activities
are completed in normal time, b) if all activities are crashed, and starting with the normal
time critical path proceed to the next step.
2. Identify and crash the activity on the critical path with the minimum unit crash cost. If
there is more than one critical path, identify and crash the activity(s) on the critical
path(s) with the minimum joint unit crash cost.
3. Adjust the network for time and cost assigned to the crashed activity(s). Determine the
critical path(s). If the project time equals the crashing time computed in (1b) stop;
otherwise return to step 1.

The unit cost of crashing an activity is computed as follows:

crash cost - normal cost


Crash cost per unit time =
normal time - crash time

The time-cost relationship is therefore considered as linear, as shown in Figure 5.9.

Cost
Crash
cost

Normal
cost

0 Crash Normal time time


time
Figure 5.9

10
Operations Research Network Scheduling

The following example will be used to illustrate the crashing of a project.

Example: Table 5.7 shows the normal and crashing times and costs for activities in a project.

Table 5.7
Time(Weeks) Cost($) Crash cost
Activity (i,j) Normal Crashed Normal Crashed per week
a (1,2) 14 6 1400 2200 100
b (1,3) 12 8 1000 1800 200
c (2,5) 18 14 1600 2000 100
d (2,4) 6 4 800 1200 200
e (3,4) 4 2 400 800 200
f (4,5) 8 6 400 600 100
g (5,6) 12 8 800 1200 100
6400 9800

Now the first step of the project crashing procedure (with crash time in brackets ()) is
executed as follows:
Step 1:
14
2 $100
$100 18(14)
14(6) 14
32 $100 44
$200 12(8)
0 5
6(4) 6
1 $200 $100
32 44
0 12(8) 8(6)
$200 20
12
4(2) 4
3
20 24
Figure 5.10

The critical path for both normal and crashed activities is 1-2-5-6. The corresponding
durations are 44 weeks for normal time and 28 weeks for crash time.

Step 2:
On the critical path all activities have the same unit crash cost of $100/week. Therefore,
activity (1,2) is selected (arbitrarily) and crashed to its limit. The associated cost is 8$100 =
$800. This increases the project cost by $800 to $6400 + $800 = $7200

Step 3:
The new network resulting after crashing is as follows (Figure 5.11):

11
Operations Research 6 Network Scheduling
2 $100
18(14)
(6) 6
24 $100 36
$200 12(8)
0 5
6(4) 6
1 $200 $100
24 36
0 12(8) 8(6)
$200 16
12
4(2) 4
3
12 16

Figure 5.11

The project time has been reduced to 36 weeks but it is still greater than 28 weeks (the
minimum). Return to step 2.

Step 2:
There are two critical paths 1-2-5-6 and 1-3-4-5-6.

Reviewing the network in figure 5.11, crashing activity 5-6 is the best since it will result in
the most time reduction at the least cost. Activity 5-6 is therefore crashed to 8 weeks, at a
cost of 4$100 = $400.
Total project cost = $7200 + $400 = $7600 and the duration reduces to 36-4 = 32 weeks.

Step3:
The revised network is as follows (Figure 5.12):

6
2 $100
(6) 18(14)
6
24 32
0 $200 (8)
6(4) $100 5 6
1 $200
8(6) 24 32
0 12(8) $200
12 16
3 4(2) 4
16
12
Figure 5.12
Since the duration 32 > 28 (the minimum), the crashing continues. Return to step 2.

Step 2:

12
Operations Research Network Scheduling

There are still two critical paths: 1-2-5-6 and 1-3-4-5-6.

On path 1-2-5-6 only activity 2-5 is left to be crashed. On path 1-3-4-5-6 all the activities can
be crashed except 5-6. However, activity 4-5 gives the least cost. Therefore both activities 2-
5 and 4-5 are crashed by 2 weeks.

Note that you cannot crash one critical path and leave the other, since the project cost will
increase without reducing the project duration. Also the two activities should be crashed by
the same period.

Crashing activities 2-5 and 4-5 by 2 weeks each results in a cost increase of 2$100+ 2$100
= $400. Total project cost = $7600 + $400 = $8000. The duration reduces to 32-2 = 30.

Step 3:
The revised network is shown in Figure 5.13

6
2 $100
16(14)
(6) 6
22 30
$200 (8)
0 5
6(4) 6
1 $200 22 30
0 12(8) (6)
$200 16
12
4(2) 4
3
12 16
Figure 5.13

Looking at the network in Figure 5.13, there are still two critical paths. There is one crashing
option for path 1-2-5-6, which is activity 2-5 by 2 weeks at $100/week. There are two
crashing options for path 1-3-4-5-6, which are 1-2 by 2 weeks or 3-4 by 2 weeks at
$200/week in each case. Arbitrarily, activity 3-4 is selected.

Crashing results in a cost increase of 2$100 + 2$200 = $600.


Total project cost = $8000 + $600 = $8600 and the corresponding project duration is 30 - 2 =
28 weeks (the minimum).

Step 3:
The revised network is shown in Figure 5.14:

6
2
(14)
(6) 6
20 28
$200 (8) 13
0 5
6(4) 6
1 $200 20 28
0 12(8) (6)
14
Operations Research Network Scheduling

(2)

Figure 5.14

It is observed that the minimum possible project time has been obtained without crashing all
activities. The trade-off between project time and cost is shown in Table 5.8.

Table 5.8
ith Project Project
Crashing Result Time Cost ($)
(weeks)
0 No crashing 44 6400
1 (1,2) by 8 weeks 36 7200
2 (5,6) by 4 weeks 32 7600
3 (2,5) and (4,5) by 2 weeks 30 8000
4 each 28 8600
(2,5) and (3,4) by 2 weeks
each

A plot of project cost vrs time is shown in Figure 5.15.

9000

8500

8000
Cost ($)

7500

7000

6500

6000
24 29 34 39 44 49
Time

Figure 5.15

The curve in Figure 5.15 shows that direct project cost is inversely related to project
duration.

14
Operations Research Network Scheduling

Problem
A construction project has the following activities with the corresponding estimated duration
in days.

Time Estimates (Days)


Activity Predecessor Optimistic Most Likely Pessimistic
a - 1 3 5
b a 3 4 5
c a 4 6 10
d a 3 5 7
e b, c 1 2 5
f c, g 2 2 2
g d 1 1 1
h d 4 7 16
i d 6 8 16
j e, f, h 1 4 7
k i, j 2 3 4
l i, j 1 2 3
m k, l 1 1 1

a. Compute the mean and variance for each activity time.


b. Construct a PERT network of this construction project.
c. Determine the ET and LT for each node and the critical path for the project.
d. Identify the TS and FS values for each activity.
e. Which project activities have the greatest amount of uncertainty with respect to duration?
Are any of these activities on the critical path? What are the implications of this
uncertainty with respect to project critical path?
f. Determine the 95% confidence interval estimate of project completion time.
g. Determine the probability of completing within 27 days or less.

15
Operations Research Integer Programming

INTERGER PROGRAMMING

Linear programming generally requires that the model variables are divisible. This
implies that each model variable can take on any non-negative, continuous solution value.

In certain decision problems, however, the divisibility assumption is unrealistic and


unacceptable. For instance, a solution requiring 1.34 bridges on a river system has no
practical meaning. In this case either 1 or 2 bridges must be assigned. Also in an
assignment problem, it is impossible to assign 1.22 people to 0.68 machines. These types
of problems require integer variables for the model variables. There are other types of
problems that require integer variables to take on values either one or zero. Integer
programming technique is applicable to such types of problems.

An integer programming model requires the following characteristics:


• a linear objective function
• a set of constraints
• non-negativity constraints for variables
• integer value constraints for certain variables

When the model requires all integer values, it is referred to as all-integer or pure integer
problem. When the model requires only certain variables to be integers, it is called a
mixed-integer programming problem. When the model requires only values of zero or
one for the decision variables, it is called a zero-one integer problem.

Integer Programming Solution Methods


There are several approaches to solving integer programming problems. We will briefly
discuss the rounding approach and present the branch-and-bound technique - the most
widely used.

Rounding Approach
This is a simple and sometimes practical approach to solving an integer programming (IP)
problem. This approach may be a very effective technique for large integer programming
problems where computational costs are extremely high or for problems where the
solution values of decision variables are large. For example, rounding off a solution value
of 120500.2 to 120500 would probably be acceptable. However, the major disadvantage
of this approach is that the solution may not be the true optimal integer solution or it may
be an infeasible solution.

The following example problems will be used to illustrate the rounding approach:

Problem 1:
Max. Z = 100x1 + 90x2
subject to:
10x1 + 7x2  70
5x1 + 10x2  50
x1, x2  0

Problem 2:

1
Operations Research Integer Programming

Min. Z = 200x1 + 400x2


subject to:
10x1 + 25x2  100
3x1 + 2x2  12
x1, x2  0

Problem 3:

Max. Z = 80x1 + 100x2


subject to:
4x1 + 2x2  12
x1 + 5x2  15
x1, x2  0

The standard relaxed LP solution, the rounded integer solution and the optimal integer
solution of each of the three problems are presented in Table 6.1.

Table 6.1
Standard LP Rounded Integer Optimal Integer
Problem Relaxed Solution Solution Solution
1 x1 = 5.38 x1 = 5 x1 = 7
x2 = 2.31 x2 = 2 x2 = 0
Z= 746.15 Z= 680 Z= 700

2 x1 = 1.82 x1 = 2 x1 = 3, x2 =3
x2 = 3.27 x2 = 3 x1 = 5, x2 = 2
Z= 1672.73 Infeasible Z= 1800

3 x1 = 1.67 x1 = 2 x1 = 2
x2 = 2.67 x2 = 3 x2 = 2
Z= 400 Infeasible Z= 360

The comparison of the three problems in Table 6.1 demonstrates the shortcomings of the
rounding approach. In order to contain the potential problem of infeasibility, the rounding
approach involves rounding up only for a minimisation problem and rounding down only
for a maximisation problem. This is due to the fact that for a relaxed LP the optimum
solution is at the extreme (corner) of the boundary of the feasible region. Therefore, the
relaxed LP optimum solution values are the minimum possible for a minimisation
problem and the maximum possible for a maximisation problem. By rounding up in a
minimisation problem (and rounding down in a maximisation problem) it is ensured that
the solution stays in the feasible region.

Branch-and Bound Method


The branch-and-bound method is useful for solving integer, mixed-integer and zero-one
integer programming problems. The basic steps of the method are outlined as follows:
1. Solve the integer programming problem by the standard simplex method with the
integer restrictions relaxed (i.e. just as a normal LP problem).

2
Operations Research Integer Programming

2. Examine the optimal solution. If the basic variables that have integer restrictions have
integer solution values, the optimal integer solution is obtained. If one or more of the
basic variables do not satisfy integer requirements proceed to step 3.
3. The set of feasible integer solutions is branched into subsets (each subset comprising
a sub-problem). This branching is to eliminate continuous solutions that violate
integer requirements. Branching is achieved by introducing mutually exclusive
constraints that are necessary to satisfy integer requirements while making sure that
no feasible integer solution is excluded.
4. For each subset the optimal relaxed (LP) solution value of the objective function is the
upper bound. The best integer solution becomes the lower bound. Those subsets
having upper bounds that are less than the current lower bound are excluded from
further analysis. A feasible integer solution that is as good as or better than the upper
bound for any subset is sought. If such a solution exists, it is optimal. If such a
solution does not exist a subset with the best upper bound is selected to branch on.
Return to step 3.

In order to illustrate the branch-and-bound solution method the following example will be
used.

Max Z = 5x1 + 8x2


subject to:
x1 + x2  6
5x1 + 9x2  45
x1, x2  0 and integer.

The graphical solution is presented in Figure 6.1.


In Figure 6.1 the feasible region for the relaxed LP is shown by the region enclosed by the
bold lines. The feasible integer solution values are indicated by the small circles at the
integer section of the gridlines. The graphical solution in Figure 6.1 indicates that the
optimal solution for the relaxed LP problem is (point A) x1 = 2.25, x2 = 3.75 and Z =
41.25.

Obviously both x1 and x2 have non-integer solution values. Hence subsets are developed
by branching, as shown in Figure 6.2 (with branching started on x1). Table 6.2 presents a
summary of the branching and bounding procedure.

3
Operations Research Integer Programming

X2 7

5 (0,5)
x1+x2=6

4
(2.25,3.75
A

3
5x1+9x2=45
2

0 (6,0)
0 1 2 3 4 5 6 7 8 9 10
X2

Figure 6.1
Z=34 Z=40
x1=2 x1=0
Z=41.11 Z=40.56
x2=3 x2=5
x1=2 x1=1
x2=3.89 x23 4 fathomed x2=4.44 x25 8
Z=41.25 3 fathomed
x12 Z=41 7
x1=2.25
x1=1.8 x11
x2=3.75 Z=37
x24 x2=4 x1=1
1 5 x24 x2=4
Z=39
x1=3 9
x13 x2=3 x12 fathomed
2 fathomed 6 infeasible

Figure 6.2

The optimal integer solution is x1 = 0, x2 = 5 and Z = 40.

The branching is illustrated graphically from Figure 6.3 to Figure 6.6.

Branch 1-2 and 1-3:


There are two sub-problems that result from the two branches:

4
Operations Research Integer Programming

Sub-problem 1-2 Sub-problem 1-3


Max Z = 5x1 + 8x2 Max Z = 5x1 + 8x2
subject to: subject to:
x1 + x2  6 x1 + x2  6
5x1 + 9x2  45 5x1 + 9x2  45
x1  3 x1  2
x1, x2  0 and integer. x1, x2  0 and integer.

A graph of the two sub-problems is shown in Figure 6.3.

x2 8 x1=2 x1=3

7
6
5 (2,3.89)
4 B
(3,3)
C
3
BRANCH 1-3
2
1 BRANCH 1-2

0
0 2 4 6 8 10
x1

Figure 6.3

Solution to branch 1-2 is integer (point B on Figure 6.3); x1 = 3, x2 = 3, Z = 39.


Solution to branch 1-3 has (point C on Figure 6.3) x1 = 2, x2 = 3.89, Z = 41.11.
Although branch 1-2 has integer solution it is inferior to the Z value for branch 1-3. Since
branch 1-3 has a non-integer solution value (x2 = 3.89) another sub-problem is created
from node 3. This results in branch 3-4, 3-5.

Branch 3-4, 3-5:


There are two sub-problems that result from the two branches:

Sub-problem 3-4 Sub-problem 3-5


Max Z = 5x1 + 8x2 Max Z = 5x1 + 8x2
subject to: subject to:
x1 + x2  6 x1 + x2  6
5x1 + 9x2  45 5x1 + 9x2  45
x1  2 x1  2
x2  3 x2  4
x1, x2  0 and integer. x1, x2  0 and integer.
A graph of the two sub-problems is shown in Figure 6.4.

5
Operations Research Integer Programming

x2 7
x1=2 x1=3
BRANCH 3-5
6
5
x2=4
4 (1.8,4)
E
3
D (2,3) x2=3
2
BRANCH 3-4
1
0
0 2 4 6 8 10
x1

Figure 6.4

Branch 3-4 yields an all integer solution (point D on Figure 6.4): x1 = 2, x2 = 3, Z = 34,
which is inferior to the already existing ones so it is ignored.
Branch 3-5 yields a non-integer solution (point E on Figure 6.4): x1 = 1.8, x2 = 4, Z = 41,
which is still better than the highest solution Z = 39. Therefore, formulate a sub-problem
from node 5. Formulation of the sub-problem results in branch 5-6, 5-7.

Branch 5-6, 5-7:


The two sub-problems from the branches are:

Sub-problem 5-6 Sub-problem 5-7


Max Z = 5x1 + 8x2 Max Z = 5x1 + 8x2
subject to: subject to:
x1 + x2  6 x1 + x2  6
5x1 + 9x2  45 5x1 + 9x2  45
x1  2 x1  2 (redundant)
x2  4 x2  4
x1  2 x1  1
x1, x2  0 and integer. x1, x2  0 and integer.
Figure 6.5 is a graphical representation of the two sub-problems:

From Figure 6.5 Branch 5-6 results in an infeasible solution, therefore no further
branching can result from it.
Branch 5-7 yields a non-integer solution (point F in Figure 6.5): x1 = 1, x2 = 4.44,
Z= 40.56, which is still an upper bound to the highest integer solution (Z = 39, x1 = 3,
x2 = 3). Therefore formulate a sub-problem by branching on x2 (which is non-integer). A
new branch: 7-8, 7-9 results.

6
Operations Research Integer Programming

x2 7

x1=1 x1=2 x1=3


6

BRANCH 5-6
5 Infeasible
F (1,4.44)
x2=4
4
BRANCH 5-7
x2=3
3

0
0 2 4 6 8 10
x1
Figure 6.5

Branch 7-8, 7-9:


The two problems that result from the branches are:

Sub-problem 7-8 Sub-problem 7-9


Max Z = 5x1 + 8x2 Max Z = 5x1 + 8x2
subject to: subject to:
x1 + x2  6 x1 + x2  6
5x1 + 9x2  45 5x1 + 9x2  45
x2  4 (redundant) x2  4
x1  1 x1  1
x2  5 x2  4
x1, x2  0 and integer. x1, x2  0 and integer.

A graphical interpretation of the two sub-problems is presented in Figure 6.6.

7
Operations Research Integer Programming

x2 7

x1=1 x1=2 x1=3


6
BRANCH 7-8
(0,5) x2=5
5
G BRANCH 7-9
x2=4
4
(1,4) H
x2=3
3

0
0 2 4 6 8 10
x1
Figure 6.6

Branch 7-8 results in an integer solution (point G on Figure 6.6): x1 = 0, x2 = 5, Z = 40.


Branch 7-9 also results in an integer solution (point H in Figure 6.6): x1 = 1, x2 = 4,
Z = 37.

Table 6.2
Branch Point X1 X2 Z = 5X1+8X2 Remark
Relaxed LP 0 0 0
6 0 30
0 5 40
2.25 3.75 41.25 *
1-2 3 0 15
6 0 30
C 3 3 39 * Fathomed
1-3 0 0 0
2 0 10
B 2 3.89 41.12 *
0 5 40
3-4 0 0 0
2 0 10
D 2 3 34 * Inferior
3 0 15
3-5 0 4 32
0 5 40
E 1.8 4 41 *
5-6 Infeasible
5-7 0 4 32
0 5 40
1 4 37
F 1 4.44 40.52 *
7-8 G 0 5 40 * Fathomed
7-9 H 1 4 37 * Inferior

8
Operations Research Integer Programming

No further branching is necessary since all branches resulted in integer solutions. Since
branch 7-8 yielded an integer solution with the highest objective function value (Z = 40),
the optimal solution is x1 = 0, x2 = 5 and Z = 40.

Integer Programming Applications


Integer programming is applicable to the following types of problems:
• Assignment
• Capital Budgeting
• Project Scheduling
• Fixed Cost
• Facility Location
• Travelling Salesman
• Knapsack, etc.

Problems

Solve the following integer programming problems graphically using the branch and
bound method.

1. Max Z = 3x1 + 5x2


subject to:
2x1 + 4x2  25
x1  8
x2  10
x1, x2  0 and integer

2. Min Z = 5x1 + 2x2


subject to:
6x1 + 2x2  12
5x1 + 4x2  20
x2  x1
x1, x2  0 and integer

9
APPENDIX A
APPENDIX B
APPENDIX C
APPENDIX D

You might also like