100% found this document useful (1 vote)
255 views560 pages

OR Merged

This document provides an overview of linear programming, including its objectives, requirements, formulation, and applications. It discusses how linear programming can be used to optimize the allocation of limited resources. The key steps in linear programming are identifying the problem, formulating a mathematical model, and solving the model. The model components include decision variables, an objective function, constraints, and parameters. An example of a product mix problem is provided to illustrate how to formulate a linear programming model.

Uploaded by

Madhur Aggarwal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
255 views560 pages

OR Merged

This document provides an overview of linear programming, including its objectives, requirements, formulation, and applications. It discusses how linear programming can be used to optimize the allocation of limited resources. The key steps in linear programming are identifying the problem, formulating a mathematical model, and solving the model. The model components include decision variables, an objective function, constraints, and parameters. An example of a product mix problem is provided to illustrate how to formulate a linear programming model.

Uploaded by

Madhur Aggarwal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 560

SESSIONS 1&2

LINEAR PROGRAMMING -1
Formulation &
Graphical Solution
12/1/2020 1
LINEAR PROGRAMMING I
 Examples of modelling business
problems for linear programming
problems (LPP)
 Basic Requirements for applying LPP
 Basic assumptions of LPP
 Graphical solution of LPP for two
variables
 Technical issues involved in linear
programming
 Applications of LPP
12/1/2020 2
LEARNING OBJECTIVES
After this session, you should be able :
◦ To formulate linear programming models for
resource allocation problems
◦ To understand the requirements of a linear
programming problem
◦ To solve a linear programming maximization
problem involving two variables graphically
◦ To solve a linear programming minimization
problem involving two variables graphically
◦ To appreciate the technical issues involved in
linear programming
LINEAR PROGRAMMING
 A problem solving approach developed to
help managers make decisions.

 A mathematical modeling technique


designed to optimize the uses of limited
resources.

 Consists of a sequence of steps that will


lead to an optimal solution to problems, in
cases where an optimum exists.
TYPICAL APPLICATION OF LP
 A marketing manager wants to determine how best to
allocate a fixed advertising budget among alternative
advertising media such as radio, TV, newspaper and
magazine. The manager would like to determine the media
mix that maximizes advertising effectiveness.

 A company has warehouses in a number of locations.


Given specific customer demands the company would like
to determine how much each warehouse should ship to
each customer so that total transportation costs are
minimized.

 A manufacturer wants to develop a production schedule


and an inventory policy that will satisfy sales demand in
future periods. Ideally the schedule and policy will enable
the company to satisfy demand and at the same time
minimize the total production and inventory costs.
TYPICAL APPLICATION OF LP
 All examples have one common basic
property.

 Concerned with maximizing or minimizing


some quantity.

◦ In example 1, marketing manager wants to


maximize advertising effectiveness.
◦ In example 2, the company wants to minimize
total transportation costs.
◦ In example 3, the manufacturer wants to
minimize costs.

 In all LPPs, the maximization or minimization


of some quantity is the objective.
TYPICAL APPLICATION OF LP
 2nd basic property of all LPPs is restrictions or
constraints that limit the degree to which the
objective can be pursued.
◦ In example 1, marketing manager’s media
selection decision is constrained by a fixed
advertising budget and availability of various
media.
◦ In example 2, the minimum-cost shipping
schedule is constrained by supply of product
available in each warehouse.
◦ In example 3, manufacturer is restricted by
constraints requiring product demand to be
satisfied and by constraints limiting production
capacity.
 Constraints are 2nd general feature of every LPP.
USAGE OF LINEAR PROGRAMMING
 To decide on product quantities to maximize
profit (product mix problems)
 To determine number of advertising units of
different advertising media (Radio, TV,
Magazine) to ensure maximum exposures –
media selection problems
 To find the quantity of components to be used in
producing products at minimum cost (alloy mix,
fertilizer mix, food mix, paint mix etc.)
 To decide least cost route of transportation of
units from different plants to different
warehouses (Transportation problems)
 To establish optimal allocation of tasks to
facilities (assignment problems)
USAGE OF LINEAR PROGRAMMING
 To determine the most economic pattern and
timings for flights so as to make the most efficient
use of aircraft and crews (routing problem)
 To select the shortest route for a salesman
starting from a given city visiting each of the
specified cities and then returning back to the
starting city (travelling salesman problem)
 To select specific investments among available
alternatives so as to maximize return or minimize
risk (portfolio selection)
 To develop a work schedule that allows a large
restaurant, a hospital or a police station to meet
their manpower needs at all hours with minimum
number of employees (staffing problems)
Objectives in Linear Programming
 OPTIMIZATION - find best possible
answer

 OBJECTIVE - what it is firm wants to


accomplish

 OBJECTIVE FUNCTION - measure of


attainment of objective

TS1-10
REQUIREMENTS FOR APPLYING LPP
 1. An objective which should be clearly
identifiable and measurable in quantitative terms
such as maximization of sales, maximization of
profits, minimization of costs etc.

 2. Resources of system which are to be allocated


for attainment of goal should be identifiable and
measurable quantitatively.

LP techniques would involve allocation of these


resources (must be in limited supply) in a manner
that would trade off returns on investment of
resources for attainment of objective.
REQUIREMENTS FOR APPLYING LPP
 3. Relationships representing objective as also
resource limitation considerations represented
by objective function and constraint equations
or inequalities respectively must be linear in
nature.

 A series of feasible alternative courses of


action are available to decision maker which
are determined by resource constraints.
THREE STAGES OF LPP
 Stage 1: Problem identification
 Involves specification of the problem
consisting

◦ identification of available alternatives


◦ establishment of relationship between
variables
◦ specification of constraints i.e.
available hours, space materials,
money etc.
THREE STAGES OF LPP
 Stage 2: Problem formulation
 Involves construction of mathematical
model from the given data requiring
◦ identification of decision variables
◦ setting up of mathematical equations for
constraints and objectives
◦ Presentation of objective and constraints
in a comprehensive form

 Stage 3: Problem solving


 Involves
◦ selection of appropriate method
◦ attainment of solution to problem with help
of selective method
◦ testing solution for optimality
LP: An Overview
 Objectives of business decisions frequently
involve maximizing profit or minimizing costs.
 Linear programming uses linear algebraic
relationships to represent a firm’s decisions,
given a business objective, and resource
constraints.
 Steps in application:
1. Identify problem as solvable by linear
programming.
2. Formulate a mathematical model of the
unstructured problem.
3. Solve the model.
4. Implementation
Model Components
 Decision variables - mathematical symbols
representing levels of activity of a firm.
 Objective function - a linear mathematical
relationship describing an objective of the
firm, in terms of decision variables - this
function is to be maximized or minimized.
 Constraints – requirements or restrictions
placed on the firm by the operating
environment, stated in linear relationships of
the decision variables.
 Parameters - numerical coefficients and
constants used in the objective function and
constraints.
FORMULATION OF LP MODEL
 Denotes constructing a mathematical model
from given data.
 Involves following steps:
i. Study available data to find key decisions
to be made i.e. identify unknowns called
decision variables.
ii. Assign symbols (x,y,z……) to the
quantities of the decision variables
identified in step i.
iii. Express feasible alternatives
mathematically in terms of variables.
Feasible alternatives are non-negative
constraints which when expressed in
mathematical terms appear as under
x ≥ 0, y ≥ 0, ……
FORMULATION OF LP model
iv. Identify objective function quantitatively and
express it as a linear function of decision
variables multiplied by their unit costs or
profit contributions.

v. Identify restrictions on availability


(resources) or requirements (demands) and
express them as a linear equality or
inequality in terms of decision variables.

vi. Express objective function, constraints and


non-negativity condition identified in step
(i) to (v) in LP format.
MODEL ASSumptions

 Linearity - all functions linear

 Certainty - all coefficients ( a ij , b i , c j )


are known constants
 no statistical distributions

 Continuity - solution liable to contain


fractional values for x j

TS1-19
LP Model Formulation: Example- 1
Product mix problem
 Beaver Creek Pottery Company
 How many bowls and mugs should be produced to
maximize profits given labor and materials
constraints?
 Product resource requirements and unit profit:
Resource Requirements

Labor Clay Profit


Product
(Hr./Unit) (Lb./Unit) ($/Unit)

Bowl 1 4 40

Mug 2 3 50
Product mix problem
SOLUTION (Product mix problem)
Resource 40 hrs of labor per day
Availability: 120 lbs of clay
Decision x1 = number of bowls to produce per day
Variables: x2 = number of mugs to produce per day
Objective Maximize Z = $40x1 + $50x2
Function: Where Z = profit per day
Resource 1x1 + 2x2  40 hours of labor
Constraints: 4x1 + 3x2  120 pounds of clay
Non-Negativity x1  0; x2  0
Constraints:
SOLUTION (Product mix problem)
Complete Linear Programming Model:

MaximizeZ = $40x1 + $50x2

subject to: 1x1 + 2x2  40

4x1 + 3x2  120

x1, x2  0
EXAMPLE II (Media Selection)
 An advertising company is planning a media
campaign for a client, willing to spend Rs. 20
lakhs to promote a new fuel economy model
of a pressure cooker.

 Client wishes to limit his campaign media to a


daily newspaper, radio and prime time
television.

 Agency’s own research data on cost


effectiveness of advertising media suggests
the following:
EXAMPLE (Media Selection)

Advertising Cost per Estimated no. of


Media unit (Rs) housewives exposed to
each advertising unit
Newspaper 20,000 1,00,000
Radio 40,000 5,00,000
Television 1,00,000 10,00,000
 Client wishes that at least 50,00,000 housewives
should be exposed to TV advertising.
 The expense on newspaper advertising must not
exceed Rs. 5,00,000.
 Formulate the problem as a LP model.
SOLUTION (Media Selection)
Decision Variables
• Problem is to decide the advertising units of
newspaper, radio and TV to be bought to
maximize media exposure.
• x1: no. of newspaper advertising units to be
bought,
• x2: no. of radio advertising units to be bought
• x3: no. of prime time TV advertising units to be
bought
• x1, x2 and x3 are decision variables.

Objective Function
 Objective is to maximize total number of
housewives (z) to be exposed to the
advertisements
 Maximize z = 1,00,000x1 + 5,00,000x2 + 10,00,000x3
SOLUTION (Media Selection)
Constraints
 Maximum total expense on advertising not to
exceed Rs.20,00,000
» 20,000x1+40,000x2+1,00,000x3≤ 20,00,000
» x1 + 2x2 + 5x3 ≤ 100
 At least 50,00,000 housewives to be exposed
to TV advertising
» 10,00,000x3 ≥ 50,00,000
» x3 ≥ 5

 Expense on newspaper advertising should


not exceed Rs.5,00,000
» 20,000x1 ≤ 5,00,000,
» x1 ≤ 25
SOLUTION (Media Selection)
LP model:
Max z = 1,00,000x1 + 5,00,000x2 + 10,00,000x3

subject to constraints

x1 + 2x2 + 5x3 ≤ 100 (Budget constraint)

x3 ≥ 5 (Female audience exposure constraint)

x1≤25 (Newspaper advertising expense


constraint)

x1 ≥ 0, x2 ≥ 0, x3 ≥ 0 (Non-negativity constraints)
Example III (Diet Mix)
A kitchen manager at Calcutta Medical Collage Hospital
has to decide food mix for patients.
Dietary instructions are that each patient must get at
least: i) One gm of protein ii) one gm of fat iii) three gm
of carbohydrates
Additional instructions are that in no case
carbohydrates should exceed 6 gm per patient.
Availability of protein, fat and carbohydrates in gms per
kg of chicken, rice and bread is given as follows:
Protein Fat Carbohydrates Price/Kg
Chicken 10 2 0 160
Rice 2 1 15 30
Bread 2 0 10 20
Formulate a suitable mathematical model for the above
diet mix assuming 100 patients on that day.
SOLUTION (Diet Mix)
 Decision Variables
 Problem is to find the quantity of chicken,
rice and bread to be used for diet of 100
patients.
 x1 : quantity (kg) of chicken to be used,
 x2 : quantity (kg) of rice to be used and
 x3 : quantity (kg) of bread to be used

x1, x2 and x3 are decision variables.

 Objective Function
 Objective is to minimize the cost of diet mix
Minimize z = 160x1 + 30x2 + 20x3
SOLUTION (Diet Mix)
Constraints
 Food to contain at least 100gm (= 1gm per
patient Х 100 patients) of protein
» 10x1 + 2x2 + 2x3 ≥ 100

 Food to contain at least 100 gm (= 1gm per


patient Х 100 patients) of fat
» 2x1 + x2 + 0x3 ≥ 100

 Food to contain at least 300gm (= 3gm per


patient Х 100 patients) of carbohydrates
» 0x1 + 15x2 + 10x3 ≥ 300

 Carbohydrate content should not exceed


600gm (considering 6gm per patient)
» 15x2 + 10x3 ≤ 600
SOLUTION TO (Diet Mix)
LP model:
Min z = 160x1 + 30x2 + 20x3

subject to constraints
10x1+2x2+2x3 ≥ 100 (Minimum Protein
requirements)
2x1+ x2 ≥ 100 (Minimum Fat requirements)
15x2+10x3 ≥ 300 (Minimum Carbohydrate
requirements)
15x2+10x3 ≤ 600 (Maximum limit of
Carbohydrates)
x1 ≥ 0, x2 ≥ 0, x3 ≥ 0 (Non-negativity constraints)
Example IV (By-product Generation)
 In a chemical Industry, two products A & B are
made involving two operations.

 Production of B results also in a by-product C.

 Product A can be sold at a profit of Rs30 per unit


and B at Rs80 per unit.

 By-product C sells at a profit of Rs.20 per unit but


if it is not sold, it should be destroyed at a
destruction cost of Rs.10 per unit.

 Forecast shows that up to 5 units of C can be


sold.

 Company gets 3 units of C for each unit of B


produced.
Example IV (By-product Generation)
 The manufacturing times are

◦ 3 hours and 4 hours per unit for A on


operations I & II respectively
◦ 4 hours and 5 hours per unit for B on
operations I & II respectively.

 Because product C results from producing


B, no time is spent in producing C.

 Available times are 18 and 21 hours of


operation I & II respectively.

 Formulate the problem as LP model.


SOLUTION (By-product Generation)
Parameters for the By-product Problem
Product Manufacturing time per Maximum Profit per
unit Sale unit (Rs.)
Operations Operations possible
I II
A 3 4 No limit 30
B 4 5 No limit 80
C - - 5 20 (for
quantity
sold)
-10 (for
quantity
not sold)
Availabl 18 21
e Hours
SOLUTION (By-product Generation)
LP model:

Maximize Z = 30x1 + 80x2 + 20x3 - 10x4

subject to constraints
3x1+4x2 ≤18 (Capacity constraint of Operation I)
4x1+5x2 ≤ 21 (Capacity constraint of Operation II)
x3 ≤ 5 (Sale of by-product C)
3x2– x3– x4=0 (Generation of by-product C)

X1≥0, x2≥0, x3≥0, x4≥0 (Non-negativity constraints)


Example V (Staffing Problem)
Hotel Maharaja at Pune runs a 24 hours
coffee shop for it’s patrons.

Though each waiter has to work


continuously for 8 hours but to have
continuity in the work, waiters are added
at every 4 hours interval to work along
those who have already completed 4
hours.
Example V (Staffing Problem)
The requirement for different 4 hour periods
are estimated as follows:
Duration No. of waiters required
00 – 04 hrs 2
04 – 08 hrs 3
08 – 12 hrs 5
12 – 16 hrs 4
16 – 20 hrs 7
20 – 24 hrs 3
Formulate LP model for minimum manpower
schedule for Hotel Maharaja.
SOLUTION (Staffing Problem)
 Decision Variables
◦ xi : no. of waiters added at the start of ith
period, i = 1, 2, ………., 6
◦ Since no. of workers can not be a
fractional value, the value of the decision
variable x1, x2, …….. X6 must be integer
values.

 Objective Function
◦ Objective is to minimize manpower
requirements
◦ i.e. no. of waiters for all six periods
together must be minimum possible i.e.

Minimize z = x1 + x2 + x3 + x4 + x5 + x6
SOLUTION (Staffing Problem)
 Constraints
◦ At any 4 hrs period, no. of waiters added
& continuing from previous shift should
be at least equal to their requirement
» x6 + x1 ≥ 2
x1 + x2 ≥ 3
x2 + x3 ≥ 5
x3 + x4 ≥ 4
x4 + x5 ≥ 7
x5 + x6 ≥ 3
X1, ………. , X6 ≥ 0 and have integer values
Financial Model: Rate of Return
 An investor has $100,000 to invest in the stock
market and is considering investments in six stocks
with the following current projected rates of return:
 Tech Stocks: Cisco(8%), Microsoft(6%) & Intel(5%)
 Bank Stocks: Bank of America(7%), First Bank (4%)
 Money Market: ING(2%)
Constraints
 At least $20,000 is to be invested in ING
 At least 25% of funds in tech stocks must be in Intel
 At least as much in bank stocks as tech stocks
 No more than $25,000 in investments with projected
returns of 5% or less
◦ Formulate a suitable LP model
CASE – Regional Planning
Southern confederation of Kibbutzim is a group of
3 Kibbutzim (communal farming communities) in
Israel.

Overall planning for this group is done in it’s


coordinating ‘Technical Office’.
The office currently is planning agricultural
production for coming year.

Agricultural output of each Kibbutz is limited by


both the amount of available irrigable land and the
quantity of water allocated for irrigation by the
Water Commissioner (a national government
official).
CASE – Regional Planning
Resource data for the Southern Confederation
of Kibbutzim
Kibbutzim Usable Land Water allocation
(acres) (Acre feet)
1 400 600
2 600 800
3 300 375
Crops suited for this region include sugar
beets, cotton and sorghum and these are the 3
being considered for upcoming season.
These crops differ primarily in their expected
net return per acre and their consumption of
water.
Regional Planning
In addition the Ministry of Agriculture has set a
maximum quota for the total acreage that can be
devoted to each other crops by the Southern
Confederation of Kibbutzim, as shown in the
following table.
Crop Data for the Southern Confederation of
Kibbutzim
Crop Maximum Water Net
quota consumption (Acre return
(Acres) Feet per Acre) ($/Acre)
Sugar 600 3 1000
beets
Cotton 500 2 750
Sorghum 325 1 250
Regional Planning
Because of limited water available for irrigation,
Southern Confederation of Kibbutzim will not be
able to use all it’s irrigable land for planting
crops in the upcoming season.

To ensure equality among 3 Kibbutzim, it has


been agreed that every Kibbutz will plant the
same proportion of it’s available irrigable land.

For example, if Kibbutz 1 plants 200 of it’s


available 400 acres, then Kibbutz 2 must plant
300 of it’s 600 acres; while Kibbutz 3 must plant
150 acres of it’s 300 acres.
Regional Planning

However, any combination of the crops may be


grown at any of the Kibbutzim.

The job facing the Coordinating Technical


Office is to plan how many acres to devote to
each crop at the respective Kibbutzim while
satisfying t given restriction.

The objective is to maximize total net return to


the Southern Confederation of Kibbutzim as a
whole.
SESSIONs 3

LINEAR PROGRAMMING -1
Graphical Solution
12/4/2020 1
LINEAR PROGRAMMING I

 Graphical solution of LPP for two


variables

 Special
types of linear programming
problems

 Applications of LPP

12/4/2020 2
LEARNING OBJECTIVES
After this session, you should be able :
◦ To solve a linear programming maximization
problem involving two variables graphically

◦ To solve a linear programming minimization


problem involving two variables graphically

◦ To understand Special types of linear


programming problems
LINEAR PROGRAMMING
 A problem solving approach developed to
help managers make decisions.

 A mathematical modeling technique


designed to optimize the uses of limited
resources.

 Consists of a sequence of steps that will


lead to an optimal solution to problems, in
cases where an optimum exists.
Graphical Solution of LP Models
 Graphical solution is limited to linear
programming models containing only
two decision variables (can be used
with three variables but only with great
difficulty).

 Graphical methods provide


visualization of how a solution for a
linear programming problem is
obtained.
SOLUTION TO LPP : GRAPHICAL METHOD
 Makes use of graphical analysis & is used to solve
problems which involve 2 unknowns.
 Problems with 3 or more unknowns (decision
variables) can be solved by simplex method.
 Requires

◦ drawing 2 axes to represent 2 unknowns,


◦ plotting lines representing constraints,
◦ identifying feasible region,
◦ drawing objective function line,
◦ selecting optimal vertex &
◦ calculating co-ordinates of the vertex to obtain
values of unknown.
TERMINOLOGY OF GRAPHICAL METHOD
 Constraint: An upper limit on availability of a resource
or a lower limit on necessary level to achieve.

 Feasible regions: Region defined by constraints & non-


negativity restriction of LP problems.

 Corner points or vertices: Points of intersection of 2 or


more boundaries of the feasible region.

 Feasible Solution: Pair of values (x, y) of decision


variables that satisfy constraints & non negative
constraints.
Every point inside or on edge of feasible region
provides a feasible solution, not necessarily optimal
solution.

 Optimal Solution: Point (or points) in feasible region


that gives optimal values of objective function.
Product mix problem
 Beaver Creek Pottery Company
 How many bowls and mugs should be produced to
maximize profits given labor & materials constraints?
 Product resource requirements and unit profit:
Resource Requirements

Labor Clay Profit


Product
(Hr./Unit) (Lb./Unit) ($/Unit)

Bowl 1 4 40

Mug 2 3 50

Resource 40 hrs/ day 120 lb/ day


Availability:
SOLUTION (Product mix problem)
Decision x1 = number of bowls to produce/ day
Variables: x2 = number of mugs to produce/ day

Linear Programming Model:

MaximizeZ = $40x1 + $50x2

subject to: 1x1 + 2x2  40

4x1 + 3x2  120

x1, x2  0
Graphical Solution of Maximization
Model: Coordinate Axes
X2: mugs

Maximize
Z = $40x1 + $50x2

subject to:
1x1 + 2x2  40
4x2 + 3x2  120

x1, x2  0

X1: bowls Coordinates for Graphical Analysis


Graphical Solution of Maximization
Model: Labor Constraint
Maximize
Z = $40x1 + $50x2

subject to:
1x1 + 2x2  40
4x2 + 3x2  120

x1, x2  0

Graph of Labor Constraint


Labor Constraint Area

Maximize
Z = $40x1 + $50x2

subject to:
1x1 + 2x2  40
4x1+ 3x2  120

x1, x2  0

Labor Constraint Area


Clay Constraint Area

Maximize
Z = $40x1 + $50x2

subject to:
1x1 + 2x2  40
4x1 + 3x2  120

x1, x2  0

Clay Constraint Area


Both Constraints

Maximize
Z = $40x1 + $50x2

subject to:
1x1 + 2x2  40
4x2 + 3x2  120

x1, x2  0

Graph of Both Model Constraints


Feasible Solution Area

Maximize
Z = $40x1 + $50x2

subject to:
1x1 + 2x2  40
4x2 + 3x2  120

x1, x2  0

Feasible Solution Area


Objective Function Solution = $800

Maximize
Z = $40x1 + $50x2

subject to:
1x1 + 2x2  40
4x2 + 3x2  120

x1, x2  0

Objection Function Line for Z = $800


Alternative Objective Function
Solution Lines
Maximize
Z = $40x1 + $50x2

subject to:
1x1 + 2x2  40
4x2 + 3x2  120

x1, x2  0

Alternative Objective Function Lines


Optimal Solution

Maximize
Z = $40x1 + $50x2

subject to:
1x1 + 2x2  40
4x2 + 3x2  120

x1, x2  0

Identification of Optimal Solution Point


Optimal Solution Coordinates

Maximize
Z = $40x1 + $50x2

subject to:
1x1 + 2x2  40
4x2 + 3x2  120

x1, x2  0

Optimal Solution Coordinates


Extreme (Corner) Point Solutions

Maximize
Z = $40x1 + $50x2

subject to:
1x1 + 2x2  40
4x2 + 3x2  120

x1, x2  0

Solutions at All Corner Points


Optimal Solution for New Objective
Function
Maximize
Z = $70x1 + $20x2

subject to:
1x1 + 2x2  40
4x2 + 3x2  120

x1, x2  0

Optimal Solution with Z = 70x1 + 20x2


Flowchart for Graphical Method
Start
Identify Feasible
Solution Region
Identify Decision
Variables
Graph objective function

Set up equations No
of objective function Is the objective
function maximized?
Identify nearest vertex
Set up equations Yes among vertices in feasible
of constraints
region in relation to
Identify farthest vertex among
objective function line
vertices in feasible region in
Write complete relation to objective function line
LPP formulation

Read off co-ordinates of above


Does the problem vertex to obtain values of decision
involve 2 variables? No (Simplex Method)
variables for optimal solution
Yes (Graphical Method)

Graph constraints by End


Calculate total cost / profit
reducing them to equality
LP Model Formulation – Minimization

 Two brands of fertilizer available - Super-gro,


Crop-quick.
 Field requires at least 16 pounds of nitrogen
and 24 pounds of phosphate.
 Super-gro costs $6 per bag, Crop-quick $3
per bag.

 Problem: How much of each brand to


purchase to minimize total cost of fertilizer
given following data ?
LP Model Formulation – Minimization

Fertilizing
farmer’s field

Chemical Contribution

Nitrogen Phosphate
Brand
(lb/bag) (lb/bag)
Super-gro 2 4
Crop-quick 4 3
LP Model Formulation – Minimization
Decision Variables:
x1 = bags of Super-gro
x2 = bags of Crop-quick

Objective Function: Minimize Z = 6x1 + 3x2


Where: $6x1 = cost of x1 bags of Super-Gro
$3x2 = cost of x2 bags of Crop-Quick

Model Constraints:
2x1 + 4x2  16 (nitrogen constraint)
4x1 + 3x2  24 (phosphate constraint)
x1, x2  0 (non-negativity constraint)
Constraint Graph – Minimization

Minimize
Z = $6x1 + $3x2

subject to:
2x1 + 4x2  16
4x1 + 3x2  24

x1, x2  0

Graph of Both Model Constraints


Feasible Region– Minimization

Minimize
Z = $6x1 + $3x2

subject to:
2x1 + 4x2  16
4x2 + 3x2  24

x1, x2  0

Feasible Solution Area


Optimal Solution Point – Minimization

Minimize
Z = $6x1 + $3x2

subject to:
2x1 + 4x2  16
4x2 + 3x2  24

x1, x2  0

Optimum Solution Point


REDUNDANT CONSTRAINTS
 In general, the constraint in an LPP defines a
certain portion of boundary of solution
region.

 If any constraint, when plotted does not form


part of boundary marking feasible region of
the problem, called a redundant constraint.

 Inclusion or exclusion of a redundant


constraint does not affect optimal solution to
the problem since it does not affect feasible
region.
EXAMPLE
A company manufactures two types of chairs, type A & type B.
Both type of chairs pass through the processes, shaping, setting and
finishing.The standard man-hours for each process per unit and
available man-hours for each department are given in the table below:
Chairs Department
Shaping Setting Finishing
Processing time per unit (hrs)
A 6 2 3.6
B 4 4 4
Available man-hours 3600 2000 3600
Availability of wood is sufficient to produce 500 nos. chairs of type A and
400 nos. of chairs of type B.
Each chair of type A yields a profit of Rs. 25 while each chair of type B
yields a profit of Rs. 20.
a) Identify feasible solution region defined by the constraints.
b) Is there any redundant constraint?
c) Find the quantity of each type of chair to be produced to maximize
profit.
SOLUTION TO EXAMPLE
◦ X: number of chairs of type A to be
produced
◦ Y: number of chairs of type B to be
produced.

◦ LP model Max Z = 25x + 20y

◦ Subject to constraints

6x + 4y ≤ 3600
2x + 4y ≤ 2000
3.6x + 4y ≤ 3600

0 ≤ x ≤ 500 0 ≤ y ≤ 400
x2 SOLUTION TO EXAMPLE
Feasible solution region
1000
OABCDE shows every straight
900
(0, 900) line in the graph except (3), i.e.
every constraint in this problem
4
800 except constraint 3.6x+4y≤3600
defines a certain portion of
700 boundary of feasible solution
region and hence it is a
600
redundant constraint.
(0, 500)
500
5
(0, 400) B
400
A
C
300

200

D
100

(600,0) (1000,0)
E
(500,0)
0 100 200 300
400 500 600 700 800 900 1000 2
1 3
SOLUTION TO EXAMPLE
Co-ordinates of extreme points of feasible region are
O(0,0), A(0,400), B(200,400), C(400,300), D(500,150),
E(500,0)
Step 4: Z values corresponding to extreme points are
Extreme point (x,y) Z=25x+20y
O (0,0) 0
A (0,400) 8000
B (200,400) 13000
C (400,300) 16000
D (500,150) 15500
E (500,0) 12500
•Max value of Z occurs at extreme point C(400,300) »
company should produce 400 & 300 nos. of chairs of type
A and type B respectively.
REDUNDANT CONSTRAINTS
•Max value of Z occurs at extreme point C(400,300) »
company should produce 400 & 300 nos. of chairs of
type A and type B respectively.

•Redundant constraints do not affect feasible region,


•Can be removed from a linear programming model
without affecting optimal solution.

•If LP model is to be resolved later, changes in some


data might change a previously redundant constraint
into a binding constraint.

•Need to keep all constraints to LP model even though


one or more of the constraints may be redundant.
Irregular Types of LPP
 ‘Well behaved’ problems: LPPs having
unique optimal solution .
 Every LPP does not have a unique optimal
solution.

 Special types of problems include:


 Multiple optimal solutions
 Infeasible solutions
 Unbounded solutions
Multiple Optimal Solutions: Beaver
Creek Pottery
Objective function is
parallel to a
constraint line.

Maximize
Z=$40x1 + 30x2
subject to:
1x1 + 2x2  40
4x2 + 3x2  120
x1, x2  0
x1 = number of bowls
x2 = number of mugs Multiple Optimal Solutions
CONDITIONS FOR EXISTENCE OF MULTIPLE
OPTIMAL SOLUTION

 Objective function should be parallel to


a constraint that forms an edge or
boundary on feasible region.

 Constraint should form boundary on


feasible region in direction of optimal
movement of objective function i.e.
constraint must be binding constraint.
An Infeasible Problem
Every possible
solution violates
at least one
constraint:
Maximize
Z = 5x1 + 3x2
subject to:
4x1 + 2x2  8
x1  4
x2  6
x1, x2  0
Infeasible Problem
Infeasible SOULTION
 Infeasibility signifies that no solution to LPP
satisfies all constraints including non-negative
constraints.
 LP models with inconsistent constraints have no
feasible solutions.
 Practically, infeasibility points to possibility of
incorrect formulation of LP model
 For some infeasible LPP, only reasonable
approach is to drop one or more constraints and
resolve the problem.
 Firms need to determine whether management
plans are feasible by analyzing managerial
problems using LP, to point out infeasible
conditions & initiate corrective actions.
An Unbounded Problem
Value of objective
function
increases
indefinitely:
Maximize
Z = 4x1 + 2x2
subject to:
x1  4
x2  2
x1, x2  0

Unbounded Problem
UNBOUNDED SOULTION
 A LPP is unbounded if value of solution is made
infinitely large in a maximization LPP or
infinitely small in minimization LPP
without violating any of the constraints.

 Value of objective function, in such cases,


may increase (for maximization) or
decrease (for minimization) indefinitely.

 Termed as ‘Managerial Utopia’.


If this condition was to occur in a profit maximization
problem, Firm could achieve an unlimited profit.

 Signifies that the problem has been improperly


formulated.

 Occurrence of an unbounded solution is result of a


missing constraint.
Terminology of solutions in LP model
Solution: satisfies all model constraints
Feasible solution: satisfies all the constraints
Infeasible solution: at least one of the constraints is
violated
Feasible region: set of all points that satisfies all
constraints
Binding constraint: left-hand side and right-hand
side of the constraint are equal. Otherwise the
constraint is nonbinding.
Optimal solution: feasible solution that has the best
value of the objective function.
Largest value  maximization problems
Smallest value  minimization problems
 Multiple optimal solutions, no optimal solutions,
unbounded Z
SESSION 4
1

LINEAR PROGRAMMING -II

12/9/2020
LINEAR PROGRAMMING II
2

 Mathematical fundamentals of LPP


 Use of slack, surplus & artificial variables
 Simplex Method, computing procedure
 Solution to maximization as well as
minimization problems
 Justification & significance of elements in
simplex tableau
 Special cases in
LPP
12/9/2020
LEARNING OBJECTIVES
After this session, you should be able :

 To understand mathematical formulation of LPP


 To understand economic interpretation of slack &
surplus variable
 To understand the conversion of LP constraints to
equalities using slack, surplus & artificial
variables
 To understand simplex algorithm for solving LPP
involving two or more variables
 To understand economic interpretation of simplex
tableau
 To understand the Technical issues involved in
Simplex Method
DETERMINISTIC OR MODELS
OR models can be formulated as:

Maximize / Minimize z = f(x1, x2 ,…, xn)

Subject to

gi(x1, x2 , …, xn)
{ }


=
bi , ,, i =1,2,…,m

xj ≥ 0, j = 1,…,n

,…,m
MODEL COMPONENTS

• xj : decision variables (controllable)

{}
• •gi (x1, x2 ,…, xn)


=
bi
: structural or functional or technological
constraints
• xj ≥ 0 : non-negativity constraints
• f(x1, x2 ,…, xn) :objective function
x1

.
A feasible solution x = .
xn )
satisfies all the
constraints (both structural and non negativity)
Objective function ranks feasible solutions
LP – A MATHEMATICAL PROGRAM
A linear program is a special case of a
mathematical program where f and g1 ,…, gm are
linear functions
Linear Program:
Maximize/Minimize z = c1x1 + c2x2 + • • • + cnxn

{}
Subject to ≥
ai1x1 + ai2x2 + • • • + ainxn ≤
bi m ,

,i = 1,…,m =

xj ≥ 0, j = 1,…,n
LP MODEL COMPONENTS

x = decision vector = "activity levels"

aij , cj and bi are all known data

 goal is to find x
LP model : Canonical form

xi >= 0 , (i =1,2,…,n)
STANDARD FORM OF LPP

General LPP in form

Maximize/Minimize z = c1x1 + c2x2 + • • • + cnxn

Subject to ai1x1 + ai2x2 + • • • + ain=xn = ,, bi ,

,,i = 1,…,m

xj ≥ 0, j = 1,…,n is known as in standard form


CHARACTERISTICS

 All constraints are expressed in form of


equations, except for non negative
restrictions
 RHS of each constraint equation is non
negative
 All variables are non negative
If xj is unrestricted in sign we can replace
it by two other non negative variables xt &
xs where xj= xt - xs , xt & xs ≥ 0
LP MODEL (Product mix problem)

Decision x1 = number of bowls to produce/ day


Variables: x2 = number of mugs to produce/ day

Linear Programming Model:

MaximizeZ = $40x1 + $50x2


subject to: 1x1 + 2x2  40
4x1 + 3x2  120

x1, x2  0
Slack Variables

 Standard form requires that all constraints be in


the form of equations (equalities).
 A slack variable is added to LHS of a  constraint
(weak inequality) to convert it to an equation (=).
 Represents difference between RHS & LHS of a
≤ constraint.
 Interpreted as amount of unused resource.
 Contributes nothing to objective function value
since unused capacity makes no contribution
to profit
o Have coefficients of zero in objective function.
SLACK VARIABLE

 A variable added to LHS of a less than or equal


to constraint to convert the constraint into an
equality.

 Interpreted as amount of unused resource.

 Since unused capacity makes no contribution


to profit, slack variables have coefficients of
zero in objective function.

 Represents difference between RHS & LHS of a


≤ constraint.
LPModel: Standard Form

Max
Z=40x1 + 50x2 +0. s1 +
0.s2
subject to:
1x1 + 2x2 + s1 = 40
4x2 + 3x2 + s2 = 120
x1, x2, s1, s2  0
Where:
x1 = number of bowls
x2 = number of mugs
s1, s2 are slack
variables
Solution Points A, B, and C with Slack
LP Model – FERTILIZER EXAMPLE

Decision Variables:
x1 = bags of Super-gro
x2 = bags of Crop-quick

Objective Function: Minimize Z = 6x1 + 3x2


Where: $6x1 = cost of x1 bags of Super-Gro
$3x2 = cost of x2 bags of Crop-Quick

Model Constraints:
2x1 + 4x2  16 (nitrogen constraint)
4x1 + 3x2  24 (phosphate constraint)
x1, x2  0 (non-negativity constraint)
Surplus Variables

 A surplus variable is subtracted from a 


constraint to convert it to an equation (=).
 A surplus variable represents an excess above
a constraint requirement level.
 Interpreted as amount over & above some
required minimum level.
 A surplus variable contributes nothing to the
calculated value of the objective function.
 Given a coefficient of zero in objective function
because they have no effects on its value.
SURPLUS VARIABLE (FERTILIZER)

 Model Constraints:
 2x1 + 4x2  16 (nitrogen constraint)
 4x1 + 3x2  24 (phosphate constraint)
 x1, x2  0 (non-negativity constraint)

 Subtracting surplus variables in the


constraints:
2x1 + 4x2 - s1 = 16 (nitrogen)
4x1 + 3x2 - s2 = 24 (phosphate)
Graphical Solutions (FERTILIZER)

Minimize
Z = $6x1 + $3x2 + 0s1 +
0s2

subject to:
2x1 + 4x2 – s1 = 16
4x2 + 3x2 – s2 = 24
x1, x2, s1, s2  0
Graph of Fertilizer Example
LP PROBLEM 1

 A firm is engaged in producing two products A


& B.

 Each unit of product A requires 2 kg of raw


materials & 4 labour hours for processing ,
whereas each unit of product B requires 3 kg of
raw materials & 3 hours of labour, of the same
type.

 Every week , the firm has an availability of 60 kg


of raw materials & 96 labour hours .
LP PROBLEM 1

 One unit of product A sold yield Rs 40 & one


unit of product B sold gives Rs 35 as profit.

 Formulate this problem as a LPP to determine


as to how many units of each of the products
should be produced per week so that the firm
can earn maximum profit.

 Assume that there is no marketing constraint so


that all that is produced can be sold.
LP PROBLEM 1 (SOLUTION)

 x1 and x2: Number of units produced per week of


the products A & B respectively.

 LPP model :
Max Z = 40x1 + 35x2 (Profit)

 subject to constraints
2x1 + 3x2 ≤ 60 (Raw material constraint)
4x1 + 3x2 ≤ 96 (Labour hour constraint)

x1 ≥ 0, x2 ≥ 0 (Non-negativity restrictions)
STEP 1: STANDARDIZATION OF PROBLEM
 Standard form of LPP (introducing slack
variables x3 & x4):
 Max Z = 40x1 + 35x2 + 0.x3 + 0.x4
 subject to constraints
2x1 + 3x2 + x3 + 0.x4 = 60
4x1 + 3x2 + 0.x3 + x4 = 96
xj ≥ 0, j = 1, 2, 3, 4
 Initial basic feasible solution:
x1 = 0, x2 = 0, x3 = 60, x4 = 96
 Value of objective function:
Z=40.0 + 35.0 + 0.60 + 0.96= 0
 IBFS is not to produce any of the products A and
B with a zero profit.
JUSTIFICATION & SIGNIFICANCE
OF SLACK VARIABLES
 2x1 + 3x2 = 0 » x3 = 60
& 2x1 + 3x2 = 60 » x3 = 0

 2x1 + 3x2 < 60 » x3 is equal to the difference

» 0 ≤ x3 ≤ 60 depending on value of (2x1+ 3x2)

 0 ≤ x4 ≤ 96 depending on value of (4x1 + 3x2)

 Variables x3 & x4 are slack variables


 take up any slack between LHS and RHS of
inequalities upon being converted into
equations.
JUSTIFICATION & SIGNIFICANCE
OF SLACK VARIABLES

 Value of x3 & x4 represent amount of unused raw


material and unused labour hour respectively.

 Coefficients of x3 & x4 in objective function Z may


represent the cost involved in not using raw
materials or labour hours.

 Assumption:
Unused resources have no cost and do not affect
profit.
 Coefficients assigned is zero.
SESSION 5
1

LINEAR PROGRAMMING -II

12/14/2020
LP PROBLEM 1

 A firm is engaged in producing two products A


& B.

 Each unit of product A requires 2 kg of raw


materials & 4 labour hours for processing ,
whereas each unit of product B requires 3 kg of
raw materials & 3 hours of labour, of the same
type.

 Every week , the firm has an availability of 60 kg


of raw materials & 96 labour hours .
LP PROBLEM 1

 One unit of product A sold yield Rs 40 & one


unit of product B sold gives Rs 35 as profit.

 Formulate this problem as a LPP to determine


as to how many units of each of the products
should be produced per week so that the firm
can earn maximum profit.

 Assume that there is no marketing constraint so


that all that is produced can be sold.
LP PROBLEM 1 (SOLUTION)

 x1 and x2: Number of units produced per week of


the products A & B respectively.

 LPP model :
Max Z = 40x1 + 35x2 (Profit)

 subject to constraints
2x1 + 3x2 ≤ 60 (Raw material constraint)
4x1 + 3x2 ≤ 96 (Labour hour constraint)

x1 ≥ 0, x2 ≥ 0 (Non-negativity restrictions)
STEP 1: STANDARDIZATION OF PROBLEM
 Standard form of LPP (introducing slack
variables x3 & x4):
 Max Z = 40x1 + 35x2 + 0.x3 + 0.x4
 subject to constraints
2x1 + 3x2 + x3 + 0.x4 = 60
4x1 + 3x2 + 0.x3 + x4 = 96
xj ≥ 0, j = 1, 2, 3, 4
 Initial basic feasible solution:
x1 = 0, x2 = 0, x3 = 60, x4 = 96
 Value of objective function:
Z=40.0 + 35.0 + 0.60 + 0.96= 0
 IBFS is not to produce any of the products A and
B with a zero profit.
JUSTIFICATION & SIGNIFICANCE
OF SLACK VARIABLES
 2x1 + 3x2 = 0 » x3 = 60
& 2x1 + 3x2 = 60 » x3 = 0

 2x1 + 3x2 < 60 » x3 is equal to the difference

» 0 ≤ x3 ≤ 60 depending on value of (2x1+ 3x2)

 0 ≤ x4 ≤ 96 depending on value of (4x1 + 3x2)

 Variables x3 & x4 are slack variables


 take up any slack between LHS and RHS of
inequalities upon being converted into
equations.
JUSTIFICATION & SIGNIFICANCE
OF SLACK VARIABLES

 Value of x3 & x4 represent amount of unused raw


material and unused labour hour respectively.

 Coefficients of x3 & x4 in objective function Z may


represent the cost involved in not using raw
materials or labour hours.

 Assumption:
Unused resources have no cost and do not affect
profit.
 Coefficients assigned is zero.
STEP 2: SIMPLEX TABLE 1
(NON-OPTIMAL SOLUTION)
Step 2:
Simplex Table 1 (Non-optimal solution)
Cj 40 35 0 0 Replacement
Basis Ratio
CB XB Xj X1 X2 X3 X XBi/air, air > 0
4
C3=0 X3=60 2 3 1 0 60/2 = 30

C4=0 X4=96 4 3 0 1 96/4 = 24


Zj 0 0 0 0
Δj =Cj-ZJ 40 35 0 0
Zj VALUES

 Values of Zj represent amount by which profit


would be reduced if 1 unit of any of the variables
(x1 , x2 , x3 , x4) were added to the mix.

 E.g., to introduce 1 unit of x1, entries in this


column indicate that 2 kg of raw materials and 4
labour hours must be used.

 Unused resources are assumed to have zero


cost
no reduction to profit
Z1 = 0 X 11 + 0 X 21 = 0
TESTING OPTIMALITY

 Δj=Cj-Zj represents net profit which would


result from introducing one unit of variable to the
product mix

 Since one unit of x1 adds Rs 40 to profit and it’s


introduction causes no loss,
Δ1 = 40 – 0 = 40

 Δj row: Net Opportunity Cost or


Net Evaluation Row (NER).
TESTING OPTIMALITY

 A Simplex table depicts an optimal solution


if all entries in Δj row are

 Zero or -ve (i.e. all Δj ≤ 0)


for a maximization LPP
 Zero or +ve (i.e. all Δj ≥ 0)
for a minimization LPP

Simplex Table 1 shows that solution is not


optimal since all Δj ≥ 0
TESTING OPTIMALITY :STEP 3
 Presence of +ve Δj values suggest that the solution
can be improved by moving any one of variables
into the solution that are not present.

 Each of the values in Δj row signifies the amount of


increase in objective function that would occur if 1
unit of variable were introduced into solution.

 Need to select the variable with largest Δj value.

 x1 » incoming variable, x4 » outgoing variable, Key


element » 4
STEP 3: SIMPLEX TABLE 2
(NON-OPTIMAL SOLUTION)
Step 3:
Simplex Table 2 (Non-optimal solution)
Cj 40 35 0 0 Replacement
Basis Ratio
CB XB Xj X1 X2 X3 X4 XBi/air, air > 0
C3=0 X3=12 0 3/2 1 -1/2 12/(3/2) = 8

C1=40 X1=24 1 3/4 0 1/4 24/(3/4) = 32

Zj 40 30 0 10
Δj =Cj-ZJ 0 5 0 -10
STEP 3: SIMPLEX TABLE 2
(NON-OPTIMAL SOLUTION)
 To obtain improved iteration (Simplex Table 2),
following operations are used:

R2’ = R2 / 4, R1’ = R1 – 2 R2’

 Since, one of the Δj > 0,


» solution is non-optimal.

 Incoming variable X2, outgoing variable x3, key


element 3/2
STEP 4: SIMPLEX TABLE 3
(OPTIMAL SOLUTION)
Step 4:
Simplex Table 2 (Optimal solution)
Cj 40 35 0 0
Basis
CB XB Xj X1 X2 X3 X4
C2=35 X2=8 0 1 2/3 -1/3

C1=40 X1=18 1 0 -1/2 1/2


Zj 40 35 10/3 25/3
Δj =Cj-ZJ 0 0 -10/3 -25/3
STEP 4: SIMPLEX TABLE 3
(OPTIMAL SOLUTION)
 To obtain Simplex Table 4, following operations
are used:

R1’ = R1 x 2/3, R2’ = R2 – 3/4 R1’

All Δj ≤ 0 » solution is optimal.

 Optimal Solution: x1 = 18, x2 = 8,

Max Z = 35 X 8 + 40 X 18 = 1000
JUSTIFICATION AND SIGNIFICANCES
 XB values:
 In Table 1, containing initial Simplex Table 1 (Non-optimal solution)x
solution, Product A (x1)
yielded a profit of Rs. 40/unit Cj 40 35 0 0 Repla
Basis ceme
while product B(x2) would nt
contribute Rs. 35/unit & Ratio
hence x1 is added to the new Xj X1 X2 X3 X4 XBi/air,
solution. CB XB air > 0
 With focus on product A, the
quantity to be added could C3=0 X3=60 2 3 1 0 60/2=
be determined as: 30

No. of units of raw material


available/ Raw material C4=0 X4=96 4 3 0 1 96/4=
24
required per unit of product
A = 60/2 = 30 Zj 0 0 0 0
No. of labour hours available
/ Labour hours required per Δj =Cj-ZJ 40 35 0
unit of product A=96/4 = 24
JUSTIFICATION AND SIGNIFICANCES
• XB values:
Simplex Table 2 (Non-optimal solution)x
• Thus 24 units was
Cj 40 35 0 0 Replac
determined as the target Basis ement
quantity which could be Ratio
XBi/air,
produced without violating Xj X1 X2 X3 X4
air > 0
resource availability CB XB

restriction
C3=0 X3=12 0 3/2 1 -1/2 12/(3/2)
• Production of 24 units of =8
product A will exhaust all the
labour hours, while this C1=40 X1=24 1 3/4 0 1/4 24/(3/4)
= 32
output would require 24x2 =
48 kg of raw material leaving Zj 40 30 0 10

60 – 48 = 12 kg unused.
Δj =Cj-ZJ 0 5 0 -10
• XB values X3 = 12 and X1 =
24 in Simplex table 2 are
indicative of this
SUBSTITUTION RATES (Column headed X4)
simplex table 2
 Since one unit of product A requires 4 hours of
labour, the solution in table 2 indicates complete
use of available 96 labour hours.

 Production of anything else using labour would


require reduction of units of product A.

 For example, if one unit of X4, that is one labour


hour is made available for other purposes, then ¼
units of x1 (product A) would have to be given up.
SUBSTITUTION RATES: Column headed X4
simplex table 2
 i.e. every labour hour added to the solution
reduces the output of product A (x1) by ¼ units.

 Reduction in product A would have an effect on


raw material;, since it requires both resources.

 Since product A require 2 kg of raw material per


unit and because adding one hour of x4 reduces
output of A (x1) by ¼ units, ¼ x 2 = ½ kg of raw
material would be freed.

 Values -½ and ¼ corresponding to x3 and x1


under x4 indicates these facts.
SUBSTITUTION RATES: Column headed X3
 A zero corresponding to x1 in this column implies that
reducing one kg of raw material has no effect on the
output of A.

 Labour hours is the limiting factor of production, all the


hours having been used and making available one kg of
raw material would cause no change in output of A

 With 12 kgs of raw material still available, one kg can be


made to available without reducing output of A (x1).

 However, a ’1’ corresponding to x3 in this column implies


that withdrawing one kg of raw material would reduce
one of the twelve kg of raw material as indicated by the
solution.
SUBSTITUTION RATES Column headed X 1
simplex table 2
 A ‘1’ corresponding to x1 in this column implies that
each unit of product A added to the current product mix
would replace one unit of same product in current
solution.

 Since a maximum of 24 units of product A can be


produced with labour hours limitation, addition of a unit
of A, requires reduction of one unit of the same product
to make necessary time availble.

 Since adding a unit of A would necessarily involve


reducing a unit of same product, this would imply no
change in requirement of raw material which is
indicated by element 0 against x3.
SUBSTITUTION RATES Column headed X2
Values 3/4 and 3/2 corresponding to x1 and x3 can be
interpreted as below:

 Addition of one unit of product B (x2) would replace ¾


unit of product A (x1), because labour is limiting
reasource (being fully used) and a unit of B requires
3 hours of labour while a unit of A require 4 hours.

 Thus to produce a unit of B, 3 labour hours needed


would imply reduction of ¾ units of A to provide for 3
hours.

 Also adding a unit of B would replace 3/2 kgs raw


SUBSTITUTION RATES Column headed X2

 Adding a unit of B replaces ¾ units of A, and a unit of A


requires 2 kg of raw material.

 Thus reducing ¾ units of A releases 2x3/4 = 3/2 kg of raw


material.

 Now 3 kg of raw material required to produce a unit of B


minus 3/2 kg released equals 3 – 3/2= 3/2 kg net reduction.

 Elements in main body of the table are marginal rates of


substitution between various variables involved with
positive rate indicating a decrease and negative rates
indicating a release/increase.
Zj ELEMENTS
 Δj=Cj-Zj,
 Zj represents loss of profits that results from
addition of one unit of variable heading a
particular column.
 In Simplex Table 2, the Zj value for column
headed x1, x2, x3, x4 are 40, 30, 0 &10 respectively
 For column headed x1
 Addition of one unit of product A causes a
reduction of one unit of same product and a
zero change in x3.
 The reduction of a unit A would result in a loss
of profit of Rs. 40.
 Hence, for x1, the value equals 40.
Zj ELEMENTS
 For column headed x2
 Additionof one unit of product B (x2) results in two
changes: (1) x3 is reduced by 3/2 units and (2) x1 is
reduced by 3/4 units

 Sinceprofit per unit of unused raw material x3 is 0,


change in x3 cause no change in profits

 Since profit per unit of x1 is Rs. 40, reduction of ¾


unit of x1 would result in a loss of 40 x ¾ = Rs. 30.

 Hence, total loss of profit resulting from adding a


unit of x2, given by z2, is 0+30 = 30
Zj ELEMENTS
 For column headed x3
 Addition of one unit of x3 causes a substitution of 1
unit of same and none of x1.
 Therefore, the loss of profit is nil.

 For column headed x4


 Adding one unit of x4 produces two changes:

(1) releasing ½ unit of x3 & (2) reducing ¼ units of x1.


 Release of ½ units of x3 has no effect on the profit
as the profit rate for x3 is zero.
 Reduction of ¼ units of x1 would cause a reduction
of 40x1/4 = Rs. 10 (Since Rs. 40 is unit profit of
product A).
 Thus an addition of x4 involves a loss of Rs. 10 of
profit.
Δj ELEMENTS

 Cj value for various columns indicate net profit

 Cj values are 40, 35, 0 and 0 respectively for x1, x2,


x3 and x4 respectively in table 1.

 If one unit of x1 is added to the solution, it would


add Rs. 40 to the profit whereas addition of the
unit also involvesa a loss of profit of Rs. 40 as
indicated by Zj values for this variable.

 Therefore, net change to profit on adding one unit


of x1 is given by Δj=Cj-Zj = 40 – 40 = 0.
Δj ELEMENTS
 Similarly, for x2, unit profit is Rs. 35, whereas loss of
profit is Rs. 30, accordingly net change in profit
resulting from addition of one unit of product B is 35
– 30 = Rs. 5.

 For x3, net change is zero, while for x4, adding a unit
to the solution would involve a net loss of Rs. 10.

 Therefore, a positive number in Δj indicates that the


objective function value may be increased further
while a negative element in the row reflects the loss
(in profit) that would result if one unit of the variable
heading the particular variable were added to the
solution.
SESSION 6
1

LINEAR PROGRAMMING II

12/17/2020
LINEAR PROGRAMMING II
2

 Use of artificial variables

 The Simplex Method, computing procedure


for a minimization problems

 Special types of linear programming


problems

12/17/2020
LEARNING OBJECTIVES
After this session, you should be able :

 To understand mathematical formulation of LPP


 To understand economic interpretation of slack &
surplus variable
 To understand the conversion of LP constraints to
equalities using slack, surplus & artificial variables
 To understand simplex algorithm for solving LPP
involving two or more variables
 To understand economic interpretation of simplex
tableau
 To understand the Technical issues involved in
Simplex Method
PROBLEM ON MINIMIZATION CASE

 Agricultural Research Institute (ARI) suggested


to a farmer to spread out at least 4800 kgs of a
special phosphate fertilizer & not less than 7200
kg of a special nitrogen fertilizer to raise
productivity of crops in his field.

 There are two sources for obtaining this –


mixture A & B.

 Both of these are available in bags weighing


100 kgs each & they cost Rs40 & Rs24
respectively.
PROBLEM ON MINIMIZATION CASE

 Mixture A contains phosphate and nitrogen


equivalent of 20kg and 80kg respectively while
mixture B contains these ingredients equivalent
of 50 kgs each.

 Formulate this as an LPP and determine how


many bags of each type the farmer should buy
in order to obtain required fertilizer at minimum
cost.
SOLUTION TO MINIMIZATION CASE

 x1& x2: no. of bags of mixture A & B


respectively.

 LP formulation:
Minimize Z = 40x1 + 24x2 (Total Cost)
subject to

20x1 + 50x2 ≥ 4800 (Phosphate Requirement)


80x1 + 50x2 ≥ 7200 (Nitrogen Requirement)
x1 ≥ 0, x2 ≥ 0, (Non-negativity constraints)
SOLUTION TO MINIMIZATION CASE
 Introducing surplus variable x3 and x4,

Minimize Z = 40x1 + 24x2 + 0.x3 + 0.x4


subject to constraints
20x1 + 50x2 - x3 + 0.x4 = 4800
80x1 + 50x2 + 0.x3 - x4 = 7200
xj ≥ 0, j = 1, 2, 3, 4

 Surplus variable x3 and x4 represents the excess of what


is generated (given by the LHS of the inequality) over the
requirement (shown by the RHS value)

 Initial basic solution (IBS): x1 = 0, x2 = 0,


x3= - 4800, x4 = -7200

 IBS is not feasible as it violates non-negativity restriction.


ARTIFICIAL VARIABLE: big m method
 Need to add artificial variable into the model to obtain an
initial basic feasible solution.

 Unlike slack or surplus variable, artificial variable has no


tangible relationship with decision problem.

 Does not represent any quantity relating to decision


problem & must be driven out of the system

 ‘Modeling trick’ is used to force it to zero value in optimal


iteration

 Ensured by assigning an extremely high cost (Penalty) to


it in objective function

 A value M is assigned as its coefficient in objective


function where M is a sufficiently large positive value
(mathematically, M ∞)
ARTIFICIAL VARIABLE: big m method

 Appearance of artificial variables in the optimal


solution may be prohibited by
i) an extremely large value when objective is to
minimize and
ii) an extremely small (-ve) value when objective is
to maximize.

 A coefficient of +M is assigned to artificial variable


in objective function when problem is of minimization
nature.

 A coefficient of -M is assigned to artificial variable in


objective function when problem is of maximization
nature.
SOLUTION TO MINIMIZATION CASE

 Introducing artificial variables A1, A2 in LP model

Minimize Z = 40x1 + 24x2 + 0.x3 + 0.x4 + MA1 + MA2

subject to constraints
20x1 + 50x2 - x3 + 0.x4 + A1 + 0.A2 = 4800
80x1 + 50x2 + 0.x3 - x4 + 0.A1 + A2 = 7200
xj ≥ 0, j = 1, 2, 3, A1 , A2 ≥ 0

 Initial basic feasible solution:


 x1 = 0, x2 = 0, x3 = 0, x4 = 0 (Non basic variables),
A1, = 4800, A2 =7200 (Basic variables)
SOLUTION TO MINIMIZATION CASE
Step 2:
Simplex Table 1 (Non-optimal solution)
Cj 40 24 0 0 M M Replacem
Basis ent Ratio
CB XB Xj X1 X2 X3 X4 A1 A2 Xbi /air,
air > 0
C5=M A1=4800 20 50 -1 0 1 0 4800/50
= 96
C6=M A2=7200 80 50 0 -1 0 1 7200/50
= 144
Zj 100M 100M -M -M M M

Δj =Cj-ZJ 40 - 24 - M M 0 0
100M 100M
SOLUTION TO MINIMIZATION CASE
Step 3:
Simplex Table 2 (Non-optimal solution)
Cj 40 24 0 0 M Replacem
Basis ent Ratio
CB XB Xj X1 X2 X3 X4 A2 XBi/air,
air > 0
C2=24 X2 = 96 2/5 1 -1/50 0 0 96/(2/5)
= 240
C6=M A2=2400 60 0 +1 -1 1 2400/60
= 40
Zj 60M+ 24 M- -M M
48/5 12/25
Δj =Cj-ZJ 152/5 0 12/25 - M 0
– 60M M
SOLUTION TO MINIMIZATION CASE
Step 4:
Simplex Table 3 (Non-optimal solution)
Cj 40 24 0 0 Replacem
Basis ent Ratio
CB X Xj X1 X2 X3 X4 XBi/air,
B air > 0
C2=24 X2 = 80 0 1 -2/75 1/150
C1=40 X1=40 1 0 1/60 -1/60 40/(1/60)
=2400
Zj 40 24 2/75 -38/75
Δj =Cj-ZJ 0 0 -2/75 38/75
SOLUTION TO MINIMIZATION CASE
:optimal table
Cj 40 24 0 0 Replacemen
Basis t Ratio
CB XB Xj X1 X2 X3 X4 XBi/air, air > 0

C2=24 X2 = 144 8/5 1 0 -1/50


C3=0 X3=2400 60 0 1 -1
Zj 192/5 24 0 -12/25
Δj =Cj-ZJ 8/5 0 0 12/25
Since all Δj ≥ 0, Table is optimal.
Optimal solution: X1 = 0, X2 = 144, X3=2400, ZMin = Rs. 3456/-
X3=2400, indicates surplus phosphate ingredient obtained
by buying least cost mix.
Special types of linear
programming problems
MULTIPLE OPTIMAL SOLUTIONS

Max Z = 8x1 + 16x2

subject to constraints

x1 + x2 ≤ 200
x2 ≤ 125
3x1 + 6x2 ≤ 900

x1 ≥ 0, x2 ≥ 0 (Non-negativity restrictions)
MULTIPLE OPTIMAL SOLUTIONS
OPTIMAL SIMPLEX TABLE
Cj 8 16 0 0 0
Basis

Xj X1 X2 X3 X4 X5
CB XB
C4=0 X3 = 25 0 0 1 1 -1/3

C2=16 X2 = 125 0 1 0 1 0

C1=8 X1=50 1 0 0 -2 1/3

Zj 8 16 0 0 8/3

Δj =Cj-ZJ 0 0 0 0 -8/3
MULTIPLE OPTIMAL SOLUTIONS
 Optimal solution is X1=50, X2=125, Zmax= 2400

 In every simplex table, all basic variables has Δj = 0, but


not the non-basic one.

 When a solution is indicated to be optimal with non zero Δj


value for all non-basic variable, optimal solution is unique.

 If a non-basic variable in an optimal solution has a zero Δj


value, then solution is not unique and multiple optimal
solution exists.

 In last optimal table, one of the non-basic variables X4 has


a value 0 in Δj row.

 This variable has a net zero contribution and therefore it


can be included in the basis without changing the value of
objective function.
SPECIAL CASES: MULTIPLE OPTIMAL SOLUTIONS
OPTIMAL SIMPLEX TABLE
Cj 8 16 0 0 0
Basis

Xj X1 X2 X3 X4 X5
CB XB
C5=0 X4 = 25 0 0 1 1 -1/3

C2=16 X2 = 100 0 1 -1 0 1/3

C1=8 X1=100 1 0 2 0 -1/3

Zj 8 16 0 0 8/3

Δj =Cj-ZJ 0 0 0 0 -8/3
MULTIPLE OPTIMAL SOLUTIONS

 Optimal solution: X1=100, X2=100, Zmax= 2400

 In the last table a non-basic variable x3 in this


solution has a value 0 in Δj row, suggesting
that the solution is one of the optimal and not
unique.

 Therefore, when a non-basic variable in the


final table showing optimal solution to a
problem has a net zero contribution, then
optimal solution to given problem is not
unique but multiple.
INFEASIBLE SOLUTIONS

 Infeasibility in a LPP exists when a given


problem has no feasible solution

 It is evident graphically when no common


feasible region is found for all constraints of a
problem taken jointly.

 In terms of simplex algorithm, when in final


optimal table, an artificial variable is present in
basis with positive value, the solution is
infeasible.
INFEASIBLE SOLUTIONS

Max Z = 20x1 + 30x2

subject to constraints

2x1 + x2 ≤ 40
4x1 - x2 ≤ 20
x1 ≥30

x1 ≥ 0, x2 ≥ 0 (Non-negativity restrictions)
INFEASIBLE SOLUTIONS
(OPTIMAL SIMPLEX TABLE)
Cj 20 30 0 0 0 -M
Basis

CB XB Xj X1 X2 X3 X4 X5 A1

C2=30 X2 = 20 0 1 2/3 -1/3 0 0

C1 =20 X1= 10 1 0 1/6 1/6 0 0


C6= - M A1 =20 0 0 -1/6 -1/6 -1 1
Zj 20 30 M/6+70/3 M/6-20/3 M -M
Δj =Cj-ZJ 0 0 -M/6-70/3 20/3-M/6 -M 0
INFEASIBLE SOLUTIONS

 LP model with inconsistent constraints have no


feasible solution.

 This situation can never occur if all constraints


are of ≤ type with nonnegative RHS because
slacks provide a feasible solution.

 For other types of constraints, artificial variables


are used.

 Although artificial variables are penalized in


objective function to force them to zero at the
optimum, this can occur only if the model has a
feasible space.
INFEASIBLE SOLUTIONS

 Otherwise, at least one artificial variable will be


positive in optimum iteration.

 From practical standpoint, an infeasible space


points to the possibility that the model is not
formulated correctly.

 Last optimal table shows that artificial variable


A1 (=20) is positive which indicates given
problem has infeasible solution.
UNBOUNDED SOLUTIONS

 If value of variable/s in a LP model is increased


indefinitely without violating any of constraints
Indicating unbounded solution space in at least
one variable,

 Objective function value for such a LP model may


increase (maximization case) or decrease
(minimization case) indefinitely.

 In this case, both solution space & optimum


objective value are unbounded.
UNBOUNDED SOLUTIONS

 Unboundedness points to possibility of poorly


constructed model

 Non incorporation of one or more non redundant


(Key) constraints may lead to this irregularity.

 Another possibility of this irregularity includes


inaccurate estimates of constraint coefficients
UNBOUNDED SOLUTIONS

Maximize Z = 2x1 + x2
subject to

x1 - x2 ≤ 10
2x1 ≤ 40
x1≥0, x2≥0, (Non-negativity constraints)
UNBOUNDED SOLUTIONS
(NON OPTIMAL SIMPLEX TABLE-1)

Cj 2 1 0 0
Basis
Replacement
Xj X1 X2 X3 X4 Ratio
CB XB XBi/air, air > 0
C3 =0 X3= 10 1* -1 1 0 10

C4=0 X4= 40 2 0 0 1 20
Zj 0 0 0 0
Δj =Cj-ZJ 2 1 0 0
UNBOUNDED SOLUTIONS

 Table 1 indicates non optimal solution with


positive Δ1 & Δ2 values in Δj row.

 Δ1 has the most +ve value indicating x1 as


entering variable .

 However, all constraint coefficients under X2 are -


ve (or zero) indicating that there is no leaving
variable & X2 can be increased indefinitely without
violating any of the constraints.
SPECIAL CASES
UNBOUNDED SOLUTIONS
 Because each unit increase in X2 will increase Z
by 1, an infinite increase in X2 leads to an
infinite increase in Z implying that the problem
has no bounded solution.

 We can apply strict optimality condition that


calls for x1 to enter the solution

 In that case, a succeeding table would


eventually have led to an entering variable with
the same characteristics of x2
UNBOUNDED SOLUTIONS
(NON OPTIMAL SIMPLEX TABLE-2)

Cj 2 1 0 0
Basis Replacement
CB XB X j X1 X2 X3 X4 Ratio
XBi/air, air > 0
C1 =2 X1= 10 1 -1 1 0

C4=0 X4= 20 0 2* -2 1 10
Zj 2 -2 2 0
Δj =Cj-ZJ 0 3 -2 0
UNBOUNDED SOLUTIONS
(NON OPTIMAL SIMPLEX TABLE-3)
Cj 2 1 0 0
Basis Replacement Ratio
CB XB Xj X1 X2 X3 X4 X Bi/ air, air > 0

C1 =2 X1= 20 1 0 0 1/2 a13 = 0,

C2=1 X2= 10 0 1 -1 1/2 a23 = -1 ,


Zj 2 1 -1 1/2 Δ3 >0 indicating X3
entering variable
but both a13 & a23 are not
>0
Δj =Cj-ZJ 0 0 1 -1/2 Solution unbounded
DEGENERACY

 Occurs when one or more of basic variables


assume a value of zero.

 In an n-variable, m-constraint LPP (n ≥ m),


solution would contain m basic & n-m non-basic
variables, of which basic variables would assume
positive values.

 In condition of degeneracy, solution would


contain smaller number of nonzero basic
variables than number of constraints, m.
DEGENERACY

 A tie for minimum ratio can occur & can be


broken arbitrarily while applying feasibility
condition of simplex method, .

 In such case,, at least one basic variable will be


zero in next iteration & the new solution is called
Degenerate.

 From practical standpoint, the condition reveals


that the model has at least one redundant
constraint
DEGENERACY

Max Z = 28x1 + 30x2

subject to constraints

6x1 + 3x2 ≤ 18
3x1 + x2 ≤ 8
4x1 + 5x2 ≤ 30

x1 ≥ 0, x2 ≥ 0 (Non-negativity restrictions)
DEGENERACY

Introducing slack variables x3, x4 and x5


Max Z = 28x1 + 30x2 + 0.x3 + 0.x4 + 0.x5
subject to constraints

6x1 + 3x2 + x3 + 0.x4 + 0.x5 = 18


3x1 + x2 + 0.x3 + x4 + 0.x5 = 8
4x1 + 5x2 + 0.x3 + 0.x4 + x5 = 30

xj ≥ 0, j = 1, 2, ….., 6 (Non-negativity restrictions

IBFS: x3 = 18, x4 = 8, x5 = 30
Non-basic variables: x1 = 0, x2 = 0
DEGENERACY
Step 2:
Simplex Table 1 (Non-optimal solution)
Cj 28 30 0 0 0 Replacement
Basis Ratio
CB XB j X X 1 X 2 X3 X 4 X XBi/air, air > 0
5
C3=0 X3 =18 6 3 1 0 0 18/3 = 6

C4=0 X4 =8 3 1 0 1 0 8/1 = 8 TIE

C5=0 X5 = 30 4 5 0 0 1 30/5 = 6
Zj 0 0 0 0 0
Δj =Cj-ZJ -28 -30 0 0 0
DEGENERACY
Step 3:
Simplex Table 2 (Optimal solution)
Cj 28 30 0 0 0 Replacement
Basis Ratio
XBi/air, air > 0
CB XB Xj X1 X2 X3 X4 X5
C2=30 X2 = 6 2 1 1/3 0 0

C4=0 X4 = 2 1 0 -1/3 1 0
C5=0 X5 = 0 -6 0 -5/3 0 1
Zj 60 30 10 0 0
Δj =Cj-ZJ -32 0 -10 0 0
DEGENERACY

 All Δj ≤ 0, the solution is optimal.

 Optimal solution: x1 = 0, x2 = 6, Zmax = 180

 Now, instead of x3, we can also make x5 as


leaving variable since there is a tie in minimun
replacement ratio.

 Accordingly, simplex table is revised.


DEGENERACY
Step 4:
Simplex Table 3 (Non-optimal solution)
Cj 28 30 0 0 0 Replacement
Basis Ratio
CB XB Xj X1 X2 X3 X4 X5 XBi/air, air > 0
C3=0 X3 =0 18/5 0 1 0 -3/5 0/(18/5) = 0

C4=0 X4 =2 11/5 0 0 1 -1/5 2/(11/5) =


10/11
C2=30 X2 = 6 4/5 1 0 0 1/5 6/(4/5) = 15/2
Zj 24 30 0 0 6
Δj =Cj-ZJ 4 0 0 0 -6
DEGENERACY
Step 4:
Simplex Table 4 (Optimal solution)
Cj 28 30 0 0 0 Replaceme
Basis nt Ratio
CB XB Xj X1 X2 X3 X4 X5 XBi/air, air >
0
C1=28 X1 =0 1 0 5/18 0 -1/6
C4=0 X4 =2 0 0 -11/10 1 1/6
C2=30 X2 = 6 0 1 -2/9 0 1/3
Zj 28 30 10/9 0 16/3
Δj =Cj-ZJ 0 0 -10/9 0 -16/3
Since all Δj ≤ 0, the solution is optimal.
Optimal solution: x1 = 0, x2 = 6, Zmax = 180
DEGENERACY: observations

• In simplex table 2, the variable x5 has a value 0,


though it is in basis, while in simplex table 4,
basic variable x1 has a value zero.
• Variable x5 and the solution in first case and the
variable x1 and the solution in second case are
degenerate.
• Whenever there is a tie in replacement ratio, for
determining outgoing variable, the next table
would give a degenerate solution.
• Successive simplex tables represent
improvements in value of objective function –
increases for maximization problem & decreases
for minimization problem.
DEGENERACY: observation
 However when outgoing variable happens to be a
degenerate variable, objective function value in
next table does not change which is obvious from
table 3 & 4.
 i.e, Z value for a non optimal solution is no
different from Z value for a optimal solution.
 From the practical standpoint, the condition
reveals that the model has at least one redundant
constraint
 The mere knowledge that some resources are
superfluous can be valuable during the
implementation of the solution
 The information may also lead to discovering
irregularities in construction of the model.
SESSION 7

LINEAR PROGRAMMING
III
1 12/28/2020
LINEAR PROGRAMMING III
2

 Duality concept in LPP

 Formulation of dual

 Duality and simplex method

 Economic interpretation of dual

 Concept of shadow price


12/28/2020
LEARNING OBJECTIVES
After this session, you should be able to:
 To understand the concept of duality

 Tounderstand the relation of primal & dual


problem

 To understand the formulation of dual

 Tounderstand the solution procedure of dual


using simplex method

 Tounderstand economic interpretation of dual


& concept of shadow price
DUALITY IN LPP
4
 Duality theory describes that every LPP exists in
pair.

 Associated with every LPP (maximization or


minimization) there always exist another LPP,
based on same data and having same optimal
solution.

 Original problem is called primal problem while


the associated one is called it’s dual problem.

 Concept of duality is based on the fact that any


LPP must be first put in it’s standard form before
solving the problem by Simplex method.
GENERAL PRIMAL DUAL PAIR
5

 Based on standard form of primal, there are


two important primal-dual pair:

Def 1 (Standard Primal Problem)


Max Z = C1x1 + C2x2 + ………… + Cnxn

subject to constraints
ai1x1+ ai2x2+ ………. +ainxn = bi , i = 1,2,…….,m
j = 1,2,…….,n
xj ≥ 0
DUAL PROBLEM (MINIMIZATION)
6
 Minimize Z* = b1w 1 + b2w 2 + ………… + bmw m

subject to constraints
a1jw1+ a2jw2+ ………. +amjwm ≥ cj,

wi unrestricted, i = 1,2,…….,m
j = 1,2,…….,n

where xi‘s are the primal variables, wj‘s the


dual variables
GENERAL PRIMAL DUAL PAIR
7

Def 2 (Standard Primal Problem)

Minimize Z = C1x1 + C2x2 + ………… + Cnxn

subject to constraints
ai1x1+ ai2x2+ ………. +ainxn = bi ,
i = 1,2,…….,m
j = 1,2,…….,n
xj ≥ 0
DUAL PROBLEM (MAXIMIZATION)
8
 Maximize Z* = b1w 1 + b2w 2 + ………… + bmw m

subject to constraints
a1jw1+ a2jw2+ ………. +amjwm ≤ cj ,

wi unrestricted i = 1,2,…….,m
j = 1,2,…….,n

where xi‘s are primal variables, wj‘s dual


variables
DUALITY THEORY
Primal 9
Dual
Maximisation Minimisation
No. of variables No. of constraints
No. of constraints No. of variables
≤ type constraint Non-negative variable
= type constraint Unrestricted variable
Unrestricted variable = type constraint
Objective function RHS constant for jth
coefficient for jth variable constraint
RHS constant for ith Objective function
constraint coefficient for ith variable
Coefficient (aij) for jth Coefficient (aij) for ith
variable in ith constraint variable in jth constraint
FORMULATING A DUAL PROBLEM
10
 Step 1: Considering given LPP as primal problem,
put it into standard form.
 Step 2: Identify variables to be used in dual
problem. Number of these variables equals the
number of constraint equations in primal.
 Step 3: Write down objective function of dual
using RHS constants of the primal constraints.
 If primal problem is of maximization type, dual will
be a minimization problem and vice versa.
 Step 4: Making use of dual variables identified in
Step 2, write the constraints for dual problem:
FORMULATING A DUAL PROBLEM
11
i. If Primal is a maximization problem, dual
constraints must be all of ≥ type.
If Primal is a minimization problem, dual
constraints must be all of ≤ type.
i. Column coefficients of Primal Constraints
become row coefficients of Dual
Constraints.
ii. Coefficients of Primal objective function
becomes RHS constants of dual
constraints.
iii. Dual variables are unrestricted in sign.
PROBLEM 1
 A manufacturer specializing in manufacture of
12
gears, intends to add two more gears to his
existing product line.
 Both type of gears will be worked in blanking shop
and gear shop.
 Each gear of type A requires 20 minutes in
blanking shop and 40 minutes in gear shop.
 Each gear of type B requires 10 minutes in
blanking shop and 10 minutes in gear shop.
 The blanking shop and gear shop have
respectively 1200 minutes and 1600 minutes
available per week.
 Marginal profit on each gear of type A is Rs. 10 and
on each gear of type B is Rs. 4.
 How many units of each gear be produced to
maximize profit?
SOLUTION TO PROBLEM 1
Step 1: LP formulation: 13
Maximize Z = 10x1 + 4x2
subject to constraints
20x1+ 10x2 ≤ 1200 (Blanking shop)
40x1+ 10x2 ≤ 1600 (Gear shop), x1 ≥ 0, x2 ≥ 0
Step 2: Standard form
Introducing Slack variable x3 and x4, standard
form is:
Maximize Z = 10x1 + 4x2 + 0.x3 + 0.x4
subject to constraints
20x1+ 10x2+ x3 + 0.x4 = 1200
40x1+ 10x2+ 0.x3 + x4 = 1600, x1, x2, x3, x4, ≥ 0
SOLUTION TO PROBLEM 1
14
 Dual: Let w1 and w2 be dual variable corresponding to
primal constraints.
 Dual problem is:
Minimize Z = 1200w1 + 1600w2
subject to constraints
20w1+ 40w2 ≥ 10
10w1+ 10w2 ≥ 4
w1+ 0.w2 ≥ 0» w1 ≥ 0
0.w1+ w2 ≥ 0 » w2 ≥ 0
w1 and w2 are unrestricted in sign (redundant)
Dual variables “w1 and w2 unrestricted” are dominated
by w1 ≥ 0 & w2 ≥ 0.
Eliminating redundancy, w1 ≥ 0, w2 ≥ 0
PROBLEM 2
15

 Obtain dual problem of following LPP:

Minimize Z = x1 - 3x2 - 2x3

subject to constraints
3x1 – x2 + 2x3 ≥ 7
2x1 – 4x2 ≥ 12
– 4x1 +3x2 + 8x3 = 10

x1, x2 ≥ 0 , x3 is unrestricted.
SOLUTION TO PROBLEM 2
16
Step 1: Writing x3 = xt – xs where xt ≥ 0 , xs ≥ 0 we get
Minimize Z = x1 – 3x2 – 2xt + 2xs
Subject to constraints
3x1 - x2 + 2xt - 2xs ≥ 7
2x1 – 4x2 + 0.xt + 0.xs ≥ 12
– 4x1 + 3x2 + 8xt – 8xs = 10
xj ≥ 0, j = 1, 2, t, s

Introducing surplus variables s1 & s2,


Minimize Z = x1 – 3x2 – 2xt + 2xs + 0. s1 + 0.s2
Subject to constraints
3x1 - x2 + 2xt - 2xs – s1 + 0.s2 = 7
2x1 – 4x2 + 0.xt + 0.xs + 0. s1 – s2 = 12
– 4x1 + 3x2 + 8xt – 8xs + 0. s1 + 0.s2 = 10
x1 ≥ 0, x2 ≥ 0, xt ≥ 0, xs ≥ 0, s1 ≥ 0, s2 ≥ 0
SOLUTION TO PROBLEM 2
17
Dual: w1, w2 & w3 are dual variables corresponding to
primal constraints.
Dual problem : Max Y = 7w1 + 12w2 + 10w3
Subject to constraints
3w1 + 2w2 – 4w3 ≤ 1
- w1 – 4w2 + 3w3 ≤ – 3
2w1 + 0.w2 + 8w3 ≤ – 2
- 2w1 + 0.w2 – 8w3 ≤ 2
– w1 + 0.w2 + 0.w3 ≤ 0 » w1 ≥ 0
0. w1 – w2 + 0.w3 ≤ 0 » w2 ≥ 0

w1, w2, & w3 are unrestricted

Eliminating redundancy, w1 ≥ 0, w2 ≥ 0, & w3 unrestricted


SOLUTION TO PROBLEM 2
18

Rewriting, Max Y = 7w1 + 12w2 + 10w3


Subject to constraints
3w1 + 2w2 - 4w3 ≤ 1
w1 + 4w2 – 3w3 ≥ 3
-2w1 – 8w3 ≥ 2
-2w1 – 8w3 ≤ 2
w1 ≥ 0, w2 ≥ 0 & w3 unrestricted

Again rewriting, Max Y = 7w1 + 12w2 + 10w3

Subject to constraints
3w1 + 2w2 - 4w3 ≤ 1
w1 + 4w2 – 3w3 ≥ 3
- 2w1 – 8w3 = 2
w1 ≥ 0, w2 ≥ 0 & w3 unrestricted
DUALITY AND SIMPLEX METHOD
19
 Since any LPP can be solved by using simplex
method, the method is applicable to both the
primal as well as to its dual.

 Fundamental theorem of duality suggests that an


optimum solution to the associated dual can be
obtained from that of its primal and vice versa.

 If primal is a maximization problem, then


following are the set of rules that govern the
derivation of the optimum solution:
DUALITY AND SIMPLEX METHOD
20

 Rule 1: Negative of the Corresponding net


evaluations of the starting primal variables
= Difference between the left and right sides of
dual constraints associated with starting primal
variables

Rule 2: Negative of the corresponding net


evaluations of the starting dual variables
= Difference between the left and right sides of
primal constraints associated with dual starting
variables

 Rule 3: If the primal (dual) is unbounded, then


the dual (primal) problem does not have any
feasible solution.
RESULTS ON DUALITY
21

Standard results on duality can be summarized as


follows:
Primal Problem
Dual Problem
Feasible Non-feasible
Solution Solution
Feasible Optimum Dual Unbounded
Solution
Non-feasible Primal Unbounded or
Solution Unbounded Infeasible
PROBLEM 3
22

Maximize Z = 25x1 + 20x2


subject to 6x1 + 4x2 ≤ 3600
2x1 + 4x2 ≤ 2000
x1 , x 2 ≥ 0

Standard form :
Max Z = 25x1 + 20x2 + 0.x3 + 0.x4

subject to 6x1 + 4x2 + x3 + 0.x4 = 3600


2x1 + 4x2 + 0.x3 + x4 = 2000
xj ≥ 0, j = 1, 2, 3, 4
PROBLEM 3
23

Step 2: Dual problem

Minimize Y = 3600w 1 + 2000w2


subject to 6w1 + 2w2 ≥ 25
4w1 + 4w2 ≥ 20
w1 + 0.w2 ≥ 0 » w1 ≥ 0, w2 ≥ 0
0.w1 + w2 ≥ 0
w1, w2 unrestricted in sign
Eliminating redundancy,
dual variables w1 ≥ 0, w2 ≥ 0
PROBLEM 3
Step 3:
Final optimal Table (Primal)
Basis Cj 25 20 0 0
xj x1 x2 x3 x4
CB XB
C1=25 x1=400 1 0 1/4 -1/4
C4=20 X4=300 0 1 -1/8 3/8
Zj 25 20 15/4 5/4
Δj=Cj-ZJ 0 0 -15/4 -5/4
Since all Δj ≤ 0, present solution is optimal.
optimal solution to primal problem is x1=400, x2=300,
ZMax = 25x400 + 20x300 = 16000
24
PROBLEM 4
25
Step 4: Value of dual variables from optimal primal table
Dual constraints associated with starting primal variables
x3 & x4 are w1 ≥ 0 & w2 ≥ 0 respectively
Starting primal variables x3 x4
corresponding net evaluation (-(Cj-ZJ)) - (-15/4) - (-5/4)

LHS – RHS of dual constraints w1 - 0 w2 - 0


associated with starting primal
variables
Making use of Rule 1, optimal solution to primal problem
w1 – 0 = 15/4 and w2 – 0 = 5/4
» w1 = 15/4, w2 = 5/4
ZMin = 3600.15/4 + 2000.5/4 = 16000
ECONOMIC INTERPRETATION OF DUAL
26
 Dual variables provide a basis for deciding how much to
pay for additional units of resources.

 Dual variables equal marginal values of resources. The


total marginal value of resources equal the optimal value
of objective function.

 Shadow price/ imputed price: Maximum amount that


should be paid for one additional unit of a resource

 Shadow price represents the unit worth of a resource –

 Provides contribution to objective function resulting from


a unit increase/ decrease in the availability of a resource.
LP PROBLEM
 A firm is engaged in producing two products A & B.
 Each unit of product A requires 2 kg of raw
materials & 4 labour hours for processing , whereas
each unit of product B requires 3 kg of raw
materials & 3 hours of labour, of the same type.
 Every week , the firm has an availability of 60 kg of
raw materials & 96 labour hours .
 One unit of product A sold yield Rs 40 & one unit of
product B sold gives Rs 35 as profit.
 Formulate this problem as a LPP to determine as to
how many units of each of the products should be
produced per week so that the firm can earn the
maximum profit.
 Assume that there is no marketing constraint so
that all that is produced can be sold.
ECONOMIC INTERPRETATION OF DUAL
LP Model:
Maximize z = 40x1 + 35x2 (Profit)
2x1 + 3x2 ≤ 60 (Raw material constraint)

4x1 + 3x2 ≤ 96 (Labour hour constraint)

x1, x2 ≥ 0 (Non negativity constraint)

Optimal Solution:
Producing 18 units of A & 8 units of B per week
would yield maximum profit of Rs.1000.

28
OPTIMAL SOLUTION)

Simplex Table (Optimal solution)


Cj 40 35 0 0
Basis

CB XB Xj X1 X2 X3 X4
C2=35 X2=8 0 1 2/3 -1/3

C1=40 X1=18 1 0 -1/2 1/2

Zj 40 35 10/3 25/3
Δj =Cj-ZJ 0 0 -10/3 -25/3
ECONOMIC INTERPRETATION OF DUAL
 Let the firm be approached by another firm who
would like to rent facilities of firm for one week.

 Firm has 60kg of raw material & 96 labour hours.

 y1 & y2 : Rental rates per kg of raw material & per


labour hour respectively.
 Firm would receive a total rental of 60y1 + 96y2 .
 Need to compute minimum value of rental so that
firm will know as to what minimum offer shall be
economically acceptable to it.

 Constraints can be set up in such a way that the


alternative of renting must be at least as
favourable as producing products A & B.
30
ECONOMIC INTERPRETATION OF DUAL
 Production of 1unit of A requires 2 kg of raw
material & 4 labour hour.

 Total rent for these amount of resources should be


greater than or equal to profit obtainable from one
unit of product A, i.e. Rs 40.

 2y1 + 4y2 ≥ 40

 Similarly, resource consumed in producing 1unit of


product B are 3 kg of raw material & 3 labour hours.

 Total rental of these resources should equal at


least Rs 35, unit profit of product B.

 3y1 + 3y2 ≥ 35
Also, rentals can not be negative. 31
ECONOMIC INTERPRETATION OF DUAL
COMPLETE FORM OF PROBLEM:
Minimize G = 60y1 + 96y2
subject to 2y1 + 4y2 ≥ 40
3y1 + 3y2 ≥ 35, y1, y2 ≥ 0
 Same as dual to the given problem.
 Rental rates y1 and y2 obtained from solutions of dual:
y1 = 10/3 y2 = 25/3
 Can also be obtained from Δj row of optimal primal
simplex table.
 Objective function value of primal and dual would be
identical.
 i.e. Minimum total rental acceptable by farm is equal
to maximum profit that it can earn by producing
output itself using given resources. 32
ECONOMIC INTERPRETATION OF DUAL
 Shadow/ Imputed Price: Individual rental rates y1 &
y2 (dual variables corresponding to slack variables)
 Indicates unit worth of a resource- change in optimal
objective value per unit change in availability of the
resource .
 Prices assigned to services of two resources, raw
materials and labour hours.
 Imputed from profit obtained from utilizing their
services.
 Bear no relationship with original costs of the two.
 So long as the total revenue from all the activities is
less than the worth of resources , corresponding
primal & dual solutions are not optimal.
 Optimality (maximum revenue) is reached only when
the resources have been exploited completely which
can happen only when the input (worth of
resources) equals the output (revenue).
33
ECONOMIC INTERPRETATION OF DUAL
 Each unit of product A contributes Rs40 to the profit.
 Imputed prices of material and labour Rs10/3 per kg and
Rs25/3 per hour respectively.

 Total imputed cost of resources:


2 kg @ Rs10/3 per kg = Rs20/3
4 hours @ Rs25/3 per hour = Rs100/3
Total = Rs120/3 = Rs40
 Imputed cost of producing one unit of product A equals
unit profit obtainable from it.

 For each unit of product B, total imputed cost of


resources:
3 kg @ Rs10/3 per kg = Rs 10
3 hours @ Rs 25/3 per hour = Rs 25
Total = Rs 35
 Equals profit per unit of product.
34
ECONOMIC INTERPRETATION OF DUAL
 Services of resources are valued in such a way that
total value of resources matches the profit realizable
from optimal utilization of their services.

 Shadow prices also called marginal profitability of


resources.

 Say, there were a market for renting materials and


labour hours.

 The firm would be willing to take some materials if


 price of the materials less than Rs10/3 per kg
 Price of labour hours less than Rs25/3 per hour
35
ECONOMIC INTERPRETATION OF DUAL

 An additional kg of raw material would add Rs.


10/3 to the profit.

 A reduction of 1 kg would reduce profit by an


equal amount.

 Addition of one labour hour would cause the


profit to increase by Rs. 25/3.

 A reduction of one labour hour would reduce


profit by Rs. 25/3.
36
SESSION 8

LINEAR PROGRAMMING III -


SENSITIVITY ANALYSIS
1 1/12/2021
LINEAR PROGRAMMING III
2

 Need of sensitivity analysis in LPP

 Concept of Sensitivity analysis

 Sensitivity analysis and simplex method

 Changes in objective function coefficients

 Right hand side ranging 1/12/2021


LEARNING OBJECTIVES
After this session, you should be able :
 To
understand need & concept of sensitivity
analysis

 Tounderstand whether the optimal product-mix


need to change if the profitability of various
products changes, i.e, what are the limits of these
price changes?

 Tounderstand whether it is advisable to introduce


a new product given the amount of resources
required for its production & its profitability.

 Tounderstand the relation between shadow price


& sensitivity analysis
WHY DO WE NEED TO STUDY SENSITIVITY
ANALYSIS
 Optimal solutions to linear programming
problems obtained through deterministic
assumptions.

 Data and relationship are assumed to be certain.

 Viz. Prices are fixed, resources availability is


known, production time needed are exactly set.

 Coefficients (constants) of objective function


and constraints are fixed.
WHY DO WE NEED TO STUDY SENSITIVITY
ANALYSIS
 In real world situation, conditions are dynamic and
changing.
 Optimal solution to an LP model that has a profit of
Rs.10 per unit may often show that profit changed
to say Rs.9.
 This change may be due to incorrect estimation of
values, say the selling price overestimated by $1.
 Else it may be a result of what-if analysis, say
what if the profit reduces by 10%, or,
what if less money is available for advertising, or,
what if workers overstay one hour longer everyday
at 1.5 times pay?
SENSITIVITY ANALYSIS

 Also known as post-optimality analysis.

 Shows how to answer the questions posed


using current optimal solution.

 What is the need to study sensitivity analysis


when computer can be used to solve LPP?

 Say, we know that change in an input value is


definite (We know with certainty that profit has
decreased from $10 to $9).
SENSITIVITY ANALYSIS

 The easiest and logical course of action is to do


just what the question suggests.

 Need to simply change input data value in the


formulation and solve the model again.

 With different computer models, its not difficult to


solve these problems.

 This same approach can be used even if definite


changes are made to more than one input data at
the same time.
SENSITIVITY ANALYSIS

 In contrast, what-if changes in input data values are


just hypothetical.

 Firm can consider lowering of the selling price but


not yet decided to what extent it should be lowered.

 Firm may consider 10 different selling prices.


 This will result 10 separate models.

 If this problem is expanded for two different


products, Firm need to solve 10x10 = 100 LP models
SENSITIVITY ANALYSIS
 This approach becomes impractical when firm
have many input data values and consider what-if
multiple changes in each of their values.

 In such situations, the preferred approach is to


formulate and solve a single LP model with a
given set of input data values.

 However, after solving this model, a sensitivity


analysis of the optimal solution need to be
conducted to see just how sensitive it is to
changes in each of these input data values.
SENSITIVITY ANALYSIS

 Need to determine a range of values for each input


data value, within which the current optimal solution
will remain optimal.

 If current selling price for a product is $10 per unit,


the extent to which this value can change (both on
higher and lower side) without affecting the
optimality of current solution, can be identified.

 This information can be obtained from current


solution without resolving the LP model each time.
SENSITIVITY ANALYSIS – PROBLEM

•A firm has the choice of producing four similar


products P1, P2, P3 & P4 in any combination.

•These products have profit rates of Rs.70, 65, 80 &


75 respectively.

•These all require two types of raw materials R1 &


R2 & two types of labour L1 & L2.

•Per unit requirements and availability of resources


every week is given in following table:
SENSITIVITY ANALYSIS – PROBLEM

RESOURCE PER UNIT REQUIREMENT AVAILABILITY

P1 P2 P3 P4
R1 4 4 3 7 90 Kgs
R2 6 3 5 4 120 Kgs
L1 5 2 3 3 60 Hrs
L2 6 5 1 2 100 Hrs
Determine the optimal product mix for the firm and
carryout the sensitivity analysis for changes in the
objective funtion coefficients and RHS values of the
constraint.
FORMULATION OF LPP
x1, x2, x3 & x4: No. of units to be produced.
The LP model:

Max z = 70x1 + 65x2 + 80x3 + 75x4

subject to 4x1 + 4x2 + 3x3 + 7x4 ≤ 90


6x1 + 3x2 + 5x3 + 4x4 ≤ 120
5x1 + 2x2 + 3x3 + 3x4 ≤ 60
6x1 + 5x2 + x3 + 2x4 ≤ 100
x1, x2, x3, x4 ≥ 0
SOLUTION TO LPP

Simplex Table: Optimal Solution


Cj 70 65 80 75 0 0 0 0
CB XB x1 x2 x3 x4 x5 x6 x7 x8
65 X2 = 15 -1/2 1 0 2 1/2 0 -1/2 0
0 X6 = 25 -5/2 0 0 -1/3 1/6 1 -11/6 0
80 X3 = 10 2 0 1 -1/3 -1/3 0 2/3 0
0 X8 = 15 13/2 0 0 -23/3 -13/6 0 11/6 1
Cj - zj -115/2 0 0 -85/3 -35/6 0 - 0
- 125/
6
SOLUTION TO LPP
Simplex Table: Optimal Solution
Cj 70 65 80 75 0 0 0 0
CB XB x1 x2 x3 x4 x5 x6 x7 x8
65 X2 = 15 -1/2 1 0 2 1/2 0 -1/2 0
0 X6 = 25 -5/2 0 0 -1/3 1/6 1 -11/6 0
80 X3 = 10 2 0 1 -1/3 -1/3 0 2/3 0
0 X8 = 15 13/2 0 0 -23/3 -13/6 0 11/6 1
Cj - zj -115/2 0 0 -85/3 -35/6 0 - 0
- 125/6
Optimal Solution: X1 = 0, X2 = 15, X3 = 10, X4 = 0, X5 = 0,
X6 = 25, X7 = 0, X8 = 15 & Zmax = 1775
OPTIMAL SOLUTION -INTERPRETATION

 Optimal Solution is to produce no units of


product P1, 15 units of product P2, 10 units of
product P3, no units of product P4 & obtaining
maximum profit of Rs.1775/.
 Indicates that while producing products
optimally, all available units of raw material R1 &
labour hour L1 were exhausted where as 25 Kgs
of raw material R2 & 15 labour hours of L2 were un
utilized.
 Shadow prices of resources:
Rs.35/6 for R1, Rs.0 for R2,
Rs125/6 for L1 & Rs.0 for L2
SENSITIVITY ANALYSIS- Changes in
coefficient in the objective function
Changes in coefficient in the objective function
 Basic variables are x2 & x3
 Non basic variables are x1 & x4
Sensitivity Analysis for product P2 (Basic Variable X2)
x1 x2 x3 x4 x5 x6 x7 x8
Cj - z j -115/2 0 0 -85/3 -35/6 0 -125/6 0
Coeff -1/2 1 0 2 ½ 0 -1/2 0
in Row
x2
Ratio 115 0 - -85/6 -70/6 - 125/3 -
(Least - (Least +ve)
ve)
Allowable increase (Least +ve ratio) = 125/3 = 41.67
Allowable decrease (Least -ve ratio) = 70/6 = 11.67
SENSITIVITY ANALYSIS-Changes in
coefficient in the objective function
Sensitivity Analysis for product P3 (Basic Variable X3)

x1 x2 x3 x4 x5 x6 x7 x8
cj - zj -115/2 0 0 -85/3 -35/6 0 -125/6 0
Coeff 2 0 1 -1/3 -1/3 0 2/3 0
in
Row
x3
Ratio -115/4 - 0 85 35/2 - -125/4) -
(Least (Least
-ve) +ve
Allowable increase (Least +ve ratio) = 35/2 = 17.50
Allowable decrease (Least -ve ratio) = 115/4 = 28.75
SENSITIVITY ANALYSIS-Changes in
coefficient in the objective function
Changes in coefficient in the objective function for
Non basic variables are x1 & x4

• X1 is not included in basis of Optimal table & Δj =-


115/2 suggests that a unit production of P1 would
cause a loss of Rs.115/2

• Implies that a profit margin of at least Rs.115/2


must be increased in respect of this product
before the firm would decide to include this item
in its product mix in positive terms
SENSITIVITY ANALYSIS-Changes in
coefficient in the objective function
Changes in coefficient in the objective function for
Non basic variables are x1 & x4

• Implies that the profit margin should be at least


Rs.70+115/2 = 127.50 before its production could
be undertaken

• Any decrease in the unit profit or an increase


less than Rs.115/2 per unit of this product will
lead to non production of the product & result in
unchanged optimal solution
Ranges of objective function coefficients for
which optimal solutions remain unchanged
Product Variable Current Allowable Allowable Range
objective fn increase decrease
coefficient
P1 x1 70 57.50 infinity -∞ to
127.50
P2 x2 65 41.67 11.67 53.33
to
106.67
P3 x3 80 17.50 28.75 51.25
to
97.50
P4 x4 75 28.33 infinity -∞ to
103.33
Changes in the Right Hand Side Values

 Optimal solution indicates Shadow Prices or


Marginal Profitability of resources:
Rs.35/6 for R1 & Rs.0 for R2,
Rs.125/6 for L1 & Rs.0 for L2

 Implies adding 1 kg of raw material R1 would


increase the aggregate profit by Rs.35/6 while
reduction of 1kg of raw material R1 would lower
the profit by same amount.
Changes in the Right Hand Side Values

 Similarly addition of one extra kg of R2 will leave


the profit unchanged.

 The question is how many units of a particular


resource may be increased or decreased, so that
the shadow prices would remain the same

 Problem is to determine the range over which


each of the shadow prices will remain valid
Changes in the Right Hand Side Values

Calculations of Ratios for Slack Variables


VARIABLE RATIO FOR

x5 x6 x7 x8 xB x5 x6 x7 x8

1/2 0 -1/2 0 15 30 - -30 -

1/6 1 -11/6 0 25 150 25 - -


150/11
-1/3 0 2/3 0 10 -30 - 15 -

- 0 11/6 1 15 -90/13 - 90/11 15


13/6
Range of shadow prices for which current
optimal solution remains unchanged
constraint Current Allowable Allowable Range
RHS increase decrease
Variable
1 90 90/13 30 60 to 96.92

2 120 infinity 25 95 to ∞

3 60 150/11 90/11 51.82 to


73.64

4 100 infinity 15 85 to ∞
INTRODUCING A NEW PRODUCT
•Suppose that the firm is contemplating introduction of a
new product P5 with a likely profit margin of Rs. 60.
•Data shows that product P5 shall consume
3 kg of R1 and 8 kg R2 (raw materials) &
4 hr of L1 and 6 hr of L2 (labour hours)
Should the firm decide for the introduction of the product?
Value of resources (RM & LH) consumed by Product P5
3 kg of R1 @ Rs. 35/6 Rs.3 Х 35/6 = 35/2 = 17.50
8 kg of R2 @ Rs. 0 Rs.8 Х 0 = 0
4 hr of L1 @ of 125/6 Rs.4 Х 125/6 = 250/3 = 83.33
6 hr of L2 @ of 0 Rs.6 Х 0 = 0
TOTAL 100.83
Since profit per unit of P5 (Rs60) is less than value of
resources (Rs100.83) consumed by it, the product should
not be included in the production list of the firm.
Decision Theory and
Game Theory

Dr. Himani Gupta


Decision Theory
• Decision theory problems are characterized by
the following:
1. A list of alternatives.
2. A list of possible future states of nature.
3. Payoffs associated with each alternative/state of
nature combination.
4. An assessment of the degree of certainty of possible
future events.
5. A decision criterion.
Example 1

Suppose that a real estate developer must decide on a


plan for developing a certain piece of property. After
careful consideration, the developer has ruled out “do
nothing” and is left with the following list of acceptable
alternatives:
1. Residential proposal.
2. Commercial proposal #1.
3. Commercial proposal #2.
Suppose that the developer views the possibilities as
1. No shopping center.
2. Medium-sized shopping center.
3. Large shopping center.
Table 1 General Format of a Decision Table
Table 2 Payoff Table for Real Estate Developer
Table 3 If It Is Known That No Shopping Center Will be Built, Only the
First Column Payoffs Would Be Relevant

Decision Making under Certainty


Decision Making under
Complete Uncertainty

• Approaches to decision making under complete


uncertainty:
1. Maximin
2. Maximax.
3. Minimax regret.
4. Hurwicz
5. Equal likelihood
Table 4 Maximin Solution for Real Estate Problem

Maximin
The maximin strategy is a conservative one; it consists of identifying
the worst (minimum) payoff for each alternative and then selecting the
alternative that has the best (maximum) of the worst payoffs. In effect,
the decision maker is setting a floor for the potential payoff; the actual
payoff cannot be less than this amount.
Table 5 Maximax Solution for Real Estate Problem

Maximax
The maximax approach is the opposite of the previous one: The
best payoff for each alternative is identified, and the alternative with
the maximum of these is the designated decision.
Table 6 Payoff Table with Similar Maximum Payoffs

Minimax Regret
An approach that takes all payoffs into account. To use this approach,
it is necessary to develop an opportunity loss table that reflects the
difference between each payoff and the best possible payoff in a
column (i.e., given a state of nature). Hence, opportunity loss
amounts are found by identifying the best payoff in a column and then
subtracting each of the other values in the column from that payoff.
Table 7 Opportunity Loss Table for Real Estate Problem
Table 8 Identifying the Minimax Regret Alternative
Table 9 Minimax Regret Can Lead in a Poor Decision
The Hurwicz (Realism) Criterion (Weighted
Average or Realism Criterion)
• The approach offers the decision maker a compromise
between the maximax and the maximin criteria.
– Requires the decision maker to specify a degree of optimism, in
the form of a coefficient of optimism α, with possible values of
α ranging from 0 to 1.00.
– The closer the selected value of α is to 1.00, the more optimistic
the decision maker is, and the closer the value of α is to 0, the
more pessimistic the decision maker is.
Table 10 Equal Likelihood Criterion
Table 11 Summary of Methods for Decision Making under Complete
Uncertainty
A Retail store desires to determine the optimal daily
order size for a perishable item. The store buys the
perishable item at the rate of Rs. 80per Kg. and sells at
the rate Rs. 100 per Kg. if the order size is more than
the demand, the excess quantity can be sold at Rs. 70
per Kg in a secondary market; otherwise the opportunity
cost for the store is Rs. 15 per Kg for the unsatisfied
portion of the demand. Based on the past experience, it
is found that demand varies from 50 Kg to 250Kg, in
steps of 50. The possible value of the order size are
from 75Kg to 300Kg in steps of 75Kg. Determine the
optimal order size which will maximize the daily profit of
the store.
Game Theory

• Game theory can be used to determine


optimal decisions in face of other decision
making players.

• All the players are seeking to maximize their


return.

• The payoff is based on the actions taken by


all the decision making players.
Classification of Games

– By number of players
• Two players - Chess
• Multiplayer – Poker
– By total return
• Zero Sum - the amount won and amount lost by all
competitors are equal (Poker among friends)
• Nonzero Sum -the amount won and the amount lost by all
competitors are not equal (Poker In A Casino)
– By sequence of moves
• Sequential - each player gets a play in a given sequence.
• Simultaneous - all players play simultaneously.
Dominance property :
Reduce the size of payoff matrix by eliminating
redundant rows or columns

• In the payoff matrix of Player A, if all the entries in a row


(X) are greater than or equal to the corresponding
entries of another row (Y), then the row Y is dominated
by row X. Under such situation, row Y of the payoff
matrix can be deleted.

• In the payoff matrix of such Player A, if each of the sum


of the entries of any two rows (sum of the entries of row
X and row Y) is greater than or equal to the
corresponding entry of a third row (Z); then row Z is
dominated by row X and row Y. Under such situation.
Row Z of the payoff matrix can be deleted.
Dominance property
Reduce the size of payoff matrix by eliminating
redundant rows or columns

• In the payoff matrix of Player A, if all the entries in a


column (X) are lesser than or equal to the
corresponding entries of another column (Y), then the
column Y is dominated by column X. Under such
situation, column Y of the payoff matrix can be deleted.

• In the payoff matrix of such Player A, if each of the sum


of the entries of any two columns (sum of the entries of
column X and column Y) is lesser than or equal to the
corresponding entry of a third column (Z); then column
Z is dominated by column X and column Y. Under such
situation. Column Z of the payoff matrix can be deleted.
IGA SUPERMARKET

• The town of Gold Beach is served by two


supermarkets: IGA and Sentry.

• Market share can be influenced by their advertising


policies.

• The manager of each supermarket must decide


weekly which area of operations to discount and
emphasize in the store’s newspaper flyer.
IGA SUPERMARKET

• Data
– The weekly percentage gain in market share for
IGA, as a function of advertising emphasis.
Sentry's Emphasis
Meat Produce Grocery Bakery
IGA's Meat 2 2 -8 6
Emphasis Produce -2 0 6 -4
Grocery 2 -7 1 -3

– A gain in market share to IGA results in equivalent


loss for Sentry, and vice versa (i.e. a zero sum
game)
IGA needs to determine an advertising
emphasis that will maximize its expected
change in market share regardless of
Sentry’s action.
IGA SUPERMARKET - Solution

• To prevent a sure loss of market share, both


IGA and Sentry should select the weekly
emphasis randomly.
• Thus, the question for both stores is:
What proportion of the time each area should be
emphasized by each store?
IGA’s Linear Programming Model

• Decision variables
– X1 = the probability IGA’s advertising focus is on
meat.
– X2 = the probability IGA’s advertising focus is on
produce.
– X 3 = the probability IGA’s advertising focus is on
groceries.

• Objective Function For IGA


– Maximize expected market increase regardless of
Sentry’s advertising policy.
IGA’s Perspective

• Constraints
– IGA’s market share increase for any given
advertising focus selected by Sentry, must be at
least V.
• The model
IGA’s expected change
Max V in market share.
S.T.
Meat 2X1 – 2X2 + 2X3  V
Sentry’s Produce 2X1 – 7 X3  V
advertising Groceries -8X1 – 6X2 + X3  V
emphasis Bakery 6X1 – 4X2 – 3X3  V
Probability X1 + X2 + X3 = 1
Sentry’s Linear Programming Model

• Decision variables
– Y1 = the probability Sentry’s advertising focus is on meat.
– Y2 = the probability Sentry’s advertising focus is on
produce.
– Y 3 = the probability Sentry’s advertising focus is on
groceries.
– Y4 = the probability Sentry’s advertising focus is on
bakery.

• Objective Function For Sentry


Minimize the changes in market share in favor of IGA
Sentry’s perspective

• Constraints
– Sentry’s market share decrease for any given advertising
focus selected by IGA, must not exceed V.
• The Model
Min V
S.T.
2Y1 + 2Y2 – 8Y3 + 6Y4  V
-2Y1 + 6Y3 – 4Y4  V
2Y1 – 7Y2 + Y3 – 3Y4  V
Y1 + Y2 + Y3 + Y4 = 1

Y1, Y2, Y3, Y4 are non-negative; V is unrestricted


IGA SUPERMARKET – Optimal Solution

• For IGA
– X1 = 0.3889; X2 = 0.5; X3 = 0.1111

• For Sentry
– Y1 = .3333; Y2 = 0; Y3 = .3333; Y4 = .3333

• For both players V =0 (a fair game).


Operations Research
Transportation Model and Its
Variants
Dr. Prabir Kumar Das
Professor (QT-BRM)
Indian Institute of Foreign Trade
Learning Objectives
After completing this session, we will be able to:

1. Structure special LP problems using the


transportation models
2. Use the northwest corner, Least Cost Method
and Vogel’s Approximation Method (VAM) for
initial solution.
3. Use stepping-stone method and Modified
Distribution (MODI) (also known as U-V or RK
method) for optimal solution.
Session Outline

▪ Introduction
▪ Setting Up a Transportation Problem
▪ Developing an Initial Solution: Northwest
Corner Rule
▪ Stepping-Stone Method: Finding a Least-
Cost Solution
▪ Modified Distribution (MODI) Method (also
known as U-V method)
▪ Vogel’s Approximation Method (VAM):
Another Way to Find an Initial Solution
▪ Unbalanced Transportation Problems
Session Outline

▪ Degeneracy in Transportation Problems


▪ More Than One Optimal Solution
▪ Maximization Transportation Problems
▪ Unacceptable or Prohibited Routes
Introduction
The transportation model is a special class of
linear programs that deals with shipping a
commodity from sources (e.g., factories) to
destinations (e.g., warehouses).
The objective is to determine the shipping
schedule that minimizes the total shipping
cost while satisfying supply and demand
limits.
Other application areas: inventory control,
employment scheduling, and personnel
assignment.
Introduction

 The transportation algorithm is same as


simplex method.
 Because of their structure, it can be solved
more efficiently than the simplex method.
 These problems are members of a
category of LP techniques called network
flow problems.
Transportation Model
 The transportation problem deals with the distribution of
goods from several points of supply (sources) to a number
of points of demand (destinations)
 Usually we are given the capacity of goods at each source
and the requirements at each destination
 Typically the objective is to minimize total transportation and
production costs
Transportation problem in a
network format
Transportation problem in a
network format

Factories Warehouses
(Sources) (Destinations)

100 Units Des Moines Albuquerque 300 Units

300 Units Evansville Boston 200 Units

300 Units Fort Lauderdale Cleveland 200 Units

Capacities Shipping Routes Requirements


Special Purpose Algorithms

 Initial Solution
NorthWest Corner Rule
Least Cost Method
Vogel’s Approximate Method
 Optimum Solution
Stepping Stone Method
MODI/UV/RK Method
Special-purpose
algorithms
Although standard LP methods can be
used to solve transportation problems,
special-purpose algorithms have been
developed that are more efficient.
They still involve finding an initial
solution and developing improved
solutions until an optimal solution is
reached.
They are fairly simple in terms of
computation.
Common Techniques

 Streamlined versions of the simplex method


are important for two reasons
1. Their computation times are generally many times
faster
2. They permit larger problems to be solved
 Two common techniques for developing initial
solutions are the northwest corner method and
Vogel’s approximation method (VAM).
 The initial solution is evaluated using either the
stepping-stone method or the modified
distribution (MODI) method (U-V method).
A Mini Case Study
Executive Furniture Corporation
Setting Up a Transportation
Problem
 The Executive Furniture Corporation
manufactures office desks at three
locations: Des Moines, Evansville, and Fort
Lauderdale.
 The firm distributes the desks through
regional warehouses located in
Albuquerque, Boston, and Cleveland.
 Estimates of the monthly production
capacity of each factory and the desks
needed at each warehouse are shown in
Figure 1.
Setting Up a
Transportation Problem
 Example of a transportation problem in a
network format
Factories Warehouses
(Sources) (Destinations)

100 Units Des Moines Albuquerque 300 Units

300 Units Evansville Boston 200 Units

300 Units Fort Lauderdale Cleveland 200 Units

Capacities Shipping Routes Requirements

Figure 1
Setting Up a Transportation
Problem
 Geographical locations of Executive Furniture’s
factories and warehouses

Boston

Cleveland
Factory
Des Moines
Evanston Warehouse

Albuquerque

Fort Lauderdale

Figure 2
Setting Up a Transportation
Problem
 Production costs are the same at the three
factories so the only relevant costs are
shipping from each source to each destination.
 Costs are constant no matter the quantity
shipped.
 The transportation problem can be described
as how to select the shipping routes to be used
and the number of desks to be shipped on
each route so as to minimize total
transportation cost.
 Restrictions regarding factory capacities and
warehouse requirements must be observed.
Setting Up a Transportation
Problem
 The first step is setting up the transportation table.
 Its purpose is to summarize all the relevant data
and keep track of algorithm computations.

Table 1: Transportation costs per desk for Executive Furniture


TO
FROM ALBUQUERQUE BOSTON CLEVELAND
DES MOINES $5 $4 $3

EVANSVILLE $8 $4 $3

FORT LAUDERDALE $9 $7 $5
Setting Up a Transportation
Problem
 Transportation table for Executive FurnitureDes Moines
capacity
constraint

TO WAREHOUSE WAREHOUSE WAREHOUSE


AT AT AT FACTORY
FROM ALBUQUERQUE BOSTON CLEVELAND CAPACITY

DES MOINES $5 $4 $3
100
FACTORY

EVANSVILLE $8 $4 $3
300
FACTORY

FORT LAUDERDALE $9 $7 $5
300
FACTORY

WAREHOUSE
300 200 200 700
REQUIREMENTS
Cell representing a
Table 2 Total supply source-to-destination
Cost of shipping 1 unit from Cleveland (Evansville to Cleveland)
and demand
Fort Lauderdale factory to warehouse shipping assignment
Boston warehouse demand that could be made
Setting Up a Transportation
Problem

 In this table, total factory supply


exactly equals total warehouse
demand.
 When equal demand and supply
occur, a balanced problem is said to
exist.
 This is uncommon in the real world
and we have techniques to deal with
unbalanced problems.
Developing an Initial
Solution
I. North West Corner Rule
Developing an Initial Solution:
Northwest Corner Rule
 Once we have arranged the data in a table, we
must establish an initial feasible solution
 One systematic approach is known as the
northwest corner rule. It produces integer solution.
 Start in the upper left-hand cell and allocate units
to shipping routes as follows
1. Exhaust the supply (factory capacity) of each row
before moving down to the next row
2. Exhaust the demand (warehouse) requirements of
each column before moving to the right to the next
column
3. Check that all supply and demand requirements are
met.
 In this problem it takes five steps to make the
initial shipping assignments
Developing an Initial Solution:
Northwest Corner Rule
1. Beginning in the upper left hand corner, we assign
100 units from Des Moines to Albuquerque. This
exhaust the supply from Des Moines but leaves
Albuquerque 200 desks short. We move to the
second row in the same column.
TO ALBUQUERQUE BOSTON CLEVELAND FACTORY
FROM (A) (B) (C) CAPACITY

DES MOINES $5 $4 $3
100 100
(D)

EVANSVILLE $8 $4 $3
300
(E)

FORT LAUDERDALE $9 $7 $5
300
(F)

WAREHOUSE
300 200 200 700
REQUIREMENTS
Developing an Initial Solution:
Northwest Corner Rule
2. Assign 200 units from Evansville to
Albuquerque. This meets Albuquerque’s
demand. Evansville has 100 units remaining
so we move to the right to the next column of
the second row.
TO ALBUQUERQUE BOSTON CLEVELAND FACTORY
FROM (A) (B) (C) CAPACITY

DES MOINES $5 $4 $3
100 100
(D)

EVANSVILLE $8 $4 $3
200 300
(E)

FORT LAUDERDALE $9 $7 $5
300
(F)

WAREHOUSE
300 200 200 700
REQUIREMENTS
Developing an Initial Solution:
Northwest Corner Rule
3. Assign 100 units from Evansville to Boston.
The Evansville supply has now been
exhausted but Boston is still 100 units short.
We move down vertically to the next row in
the Boston column.
TO ALBUQUERQUE BOSTON CLEVELAND FACTORY
FROM (A) (B) (C) CAPACITY

DES MOINES $5 $4 $3
100 100
(D)

EVANSVILLE $8 $4 $3
200 100 300
(E)

FORT LAUDERDALE $9 $7 $5
300
(F)

WAREHOUSE
300 200 200 700
REQUIREMENTS
Developing an Initial Solution:
Northwest Corner Rule

4. Assign 100 units from Fort Lauderdale to


Boston. This fulfills Boston’s demand and Fort
Lauderdale still has 200 units available.
TO ALBUQUERQUE BOSTON CLEVELAND FACTORY
FROM (A) (B) (C) CAPACITY

DES MOINES $5 $4 $3
100 100
(D)

EVANSVILLE $8 $4 $3
200 100 300
(E)

FORT LAUDERDALE $9 $7 $5
100 300
(F)

WAREHOUSE
300 200 200 700
REQUIREMENTS
Developing an Initial Solution:
Northwest Corner Rule
5. Assign 200 units from Fort Lauderdale to
Cleveland. This exhausts Fort Lauderdale’s
supply and Cleveland’s demand. The initial
shipment schedule is now complete.
TO ALBUQUERQUE BOSTON CLEVELAND FACTORY
FROM (A) (B) (C) CAPACITY

DES MOINES $5 $4 $3
100 100
(D)

EVANSVILLE $8 $4 $3
200 100 300
(E)

FORT LAUDERDALE $9 $7 $5
100 200 300
(F)

WAREHOUSE
300 200 200 700
REQUIREMENTS
Developing an Initial Solution:
Northwest Corner Rule
 We can easily compute the cost of this
shipping assignment
ROUTE
UNITS PER UNIT TOTAL
FROM TO SHIPPED x COST ($) = COST ($)
D A 100 5 500
E A 200 8 1,600
E B 100 4 400
F B 100 7 700
F C 200 5 1,000
4,200

◼ This solution is feasible but we need to check to


see if it is optimal
Developing an Initial
Solution
II. Least Cost Method: Pl refer to discussion
held in the class for detailed algorithm
Developing an Initial
Solution
III. Vogel’s Approximation Method
Vogel’s Approximation Method: Another
Way To Find An Initial Solution

 Vogel’s Approximation Method (VAM) is not as


simple as the northwest corner method, but it
provides a very good initial solution, often one that
is the optimal solution. It produces integer result.
 VAM tackles the problem of finding a good initial
solution by taking into account the costs associated
with each route alternative
 This is something that the northwest corner rule
does not do
 To apply VAM, we first compute for each row and
column the penalty faced if we should ship over the
second-best route instead of the least-cost route
Vogel’s Approximation Method

 The six steps involved in determining an initial VAM


solution are illustrated below beginning with the
same layout originally shown in Table 10.2
VAM Step 1. For each row and column of the
transportation table, find the difference between
the distribution cost on the best route in the row
or column and the second best route in the row or
column
◼ This is the opportunity cost of not using the
best route
◼ Step 1 has been done in the next Table
Vogel’s Approximation Method

VAM Step 2. identify the row or column with the


greatest opportunity cost, or difference (column A in
this example)
VAM Step 3.Assign as many units as possible to the
lowest-cost square in the row or column selected
VAM Step 4. Eliminate any row or column that has
been completely satisfied by the assignment just
made by placing Xs in each appropriate square
VAM Step 5. Recompute the cost differences for the
transportation table, omitting rows or columns
eliminated in the previous step
Vogel’s Approximation Method

VAM Step 6. Return to step 2 for the rows and


columns remaining and repeat the steps until an
initial feasible solution has been obtained

◼ In this case column B now has the greatest


difference, 3
◼ We assign 200 units to the lowest-cost square in
the column, EB
◼ We recompute the differences and find the
greatest difference is now in row E
◼ We assign 100 units to the lowest-cost square in
the column, EC
Developing an Initial
Solution
III. Vogel’s Approximation Method: For an alternative
approach, pl refer to discussion held in the class
Optimal Solution Using
I. Stepping Stone Method
Stepping-Stone Method: Finding
an Optimal Solution Solution

 The stepping-stone method is an


iterative technique for moving from an
initial feasible solution to an optimal
feasible solution. It produces integer
solution.
 There are two distinct parts to the
process
 Testing the current solution to determine if improvement is possible
 Making changes to the current solution to obtain an improved
solution

 This process continues until the optimal


solution is reached
Stepping-Stone Method: Finding
an Optimal Solution
 There is one very important rule
 The number of occupied routes (or squares) must
always be equal to one less than the sum of the
number of rows plus the number of columns
 In the Executive Furniture problem this means the
initial solution must have 3 + 3 – 1 = 5 squares
used
Occupied shipping Number Number of
routes (squares) = of rows + columns –1

◼ When the number of occupied routes is less than


this, the solution is called degenerate.
Testing the Solution for Possible
Improvement

The stepping-stone method works by


testing each unused square in the
transportation table to see what would
happen to total shipping costs if one
unit of the product were tentatively
shipped on an unused route
There are five steps in the process
Five Steps to Test Unused
Squares with the Stepping-Stone
Method
1.Select an unused square to evaluate.
2.Beginning at this square, trace a closed
path back to the original square via
squares that are currently being used
and moving with only horizontal or
vertical moves.
3.Beginning with a plus (+) sign at the
unused square, place alternate minus
(–) signs and plus signs on each corner
square of the closed path just traced.
Five Steps to Test Unused Squares
with the Stepping-Stone Method

4. Calculate an improvement index by adding


together the unit cost figures found in each
square containing a plus sign and then
subtracting the unit costs in each square
containing a minus sign
5. Repeat steps 1 to 4 until an improvement
index has been calculated for all unused
squares. If all indices computed are greater
than or equal to zero, an optimal solution has
been reached. If not, it is possible to improve
the current solution and decrease total
shipping costs.
Five Steps to Test Unused Squares
with the Stepping-Stone Method
 For the Executive Furniture Corporation data

Steps 1 and 2. Beginning with Des Moines–Boston


route we trace a closed path using only currently
occupied squares, alternately placing plus and
minus signs in the corners of the path
◼ In a closed path, only squares currently used for
shipping can be used in turning corners
◼ Only one closed route is possible for each square
we wish to test
Five Steps to Test Unused
Squares with the Stepping-Stone
Method
Step 3. We want to test the cost-effectiveness of
the Des Moines–Boston shipping route so we
pretend we are shipping one desk from Des
Moines to Boston and put a plus in that box
◼ But if we ship one more unit out of Des Moines
we will be sending out 101 units
◼ Since the Des Moines factory capacity is only
100, we must ship fewer desks from Des Moines
to Albuquerque so we place a minus sign in that
box
◼ But that leaves Albuquerque one unit short so we
must increase the shipment from Evansville to
Albuquerque by one unit and so on until we
complete the entire closed path
Five Steps to Test Unused
Squares with the Stepping-Stone
Method
Step 4. We can now compute an improvement
index (Iij) for the Des Moines–Boston route
◼ We add the costs in the squares with plus signs
and subtract the costs in the squares with minus
signs
Des Moines–
Boston index = IDB = +$4 – $5 + $8 – $4 = + $3

◼ This means for every desk shipped via the Des


Moines–Boston route, total transportation cost
will increase by $3 over their current level
Five Steps to Test Unused
Squares with the Stepping-Stone
Method
Step 5. We can now examine the Des Moines–
Cleveland unused route which is slightly more
difficult to draw
◼ Again we can only turn corners at squares that
represent existing routes
◼ We must pass through the Evansville–Cleveland
square but we can not turn there or put a + or –
sign
◼ The closed path we will use is
+ DC – DA + EA – EB + FB – FC
Obtaining an Improved
Solution
 In the Executive Furniture problem there is only one
unused route with a negative index (Fort Lauderdale-
Albuquerque)
 If there was more than one route with a negative index,
we would choose the one with the largest improvement
 We now want to ship the maximum allowable number of
units on the new route
 The quantity to ship is found by referring to the closed
path of plus and minus signs for the new route and
selecting the smallest number found in those squares
containing minus signs
Obtaining an Improved
Solution

 To obtain a new solution, that number is


added to all squares on the closed path with
plus signs and subtracted from all squares in
the closed path with minus signs
 All other squares are unchanged
 In this case, the maximum number that can
be shipped is 100 desks as this is the smallest
value in a box with a negative sign (FB route)
 We add 100 units to the FA and EB routes and
subtract 100 from FB and EA routes
 This leaves balanced rows and columns and
an improved solution
Obtaining an Improved
Solution
 Second solution to the Executive Furniture problem

TO FACTORY
A B C
FROM CAPACITY
$5 $4 $3
D 100 100

$8 $4 $3
E 100 200 300

$9 $7 $5
F 100 200 300

WAREHOUSE
300 200 200 700
REQUIREMENTS

◼ Total shipping costs have been reduced by (100


units) x ($2 saved per unit) and now equals $4,000
Obtaining an Improved
Solution
 This second solution may or may not be optimal
 To determine whether further improvement is
possible, we return to the first five steps to test
each square that is now unused
 The four new improvement indices are
D to B = IDB = + $4 – $5 + $8 – $4 = + $3
(closed path: + DB – DA + EA – EB)
D to C = IDC = + $3 – $5 + $9 – $5 = + $2
(closed path: + DC – DA + FA – FC)
E to C = IEC = + $3 – $8 + $9 – $5 = – $1
(closed path: + EC – EA + FA – FC)
F to B = IFB = + $7 – $4 + $8 – $9 = + $2
(closed path: + FB – EB + EA – FA)
Obtaining an Improved
Solution
◼ Total cost of third solution

ROUTE
DESKS PER UNIT TOTAL
FROM TO SHIPPED x COST ($) = COST ($)
D A 100 5 500
E B 200 4 800
E C 100 3 300
F A 200 9 1,800
F C 100 5 500
3,900
Obtaining an Improved
Solution
◼ Third and optimal solution

TO FACTORY
A B C
FROM CAPACITY
$5 $4 $3
D 100 100

$8 $4 $3
E 200 100 300

$9 $7 $5
F 200 100 300

WAREHOUSE
300 200 200 700
REQUIREMENTS
Summary of Steps in
Transportation Algorithm
(Minimization)
1. Set up a balanced transportation table.
2. Develop initial solution using either the northwest
corner method or Vogel’s approximation method.
3. Calculate an improvement index for each empty
cell using either the stepping-stone method or the
MODI method (also known as U-V method). If
improvement indices are all nonnegative, stop as
the optimal solution has been found. If any index
is negative, continue to step 4.
4. Select the cell with the improvement index
indicating the greatest decrease in cost. Fill this
cell using the stepping-stone path and go to step
3.
Optimal Solution
II. MODI Method (or U-V Method; also known as R-K
Method)
MODI Method (or U-V Method)

 The MODI (modified distribution) method allows us


to compute improvement indices quickly for each
unused square without drawing all of the closed
paths. It produces integer result.
 Because of this, it can often provide considerable
time savings over the stepping-stone method for
solving transportation problems
 If there is a negative improvement index, then only
one stepping-stone path must be found
 This is used in the same manner as before to obtain
an improved solution
How to Use the MODI Approach
 In applying the MODI method, we begin with an
initial solution obtained by using the northwest
corner rule
 We now compute a value for each row (call the
values R1, R2, R3 if there are three rows) and for
each column (K1, K2, K3) in the transportation table
 In general we let
Ri = value for assigned row i
Kj = value for assigned column j
Cij = cost in square ij (cost of shipping from
source i to destination j)
In some literature, R is denoted by U and K is
denoted by V; and the name U-V is used
instead of MODI.
Five Steps in the MODI Method to
Test Unused Squares

1. Compute the values for each row and column, set


Ri + Kj = Cij
but only for those squares that are currently used
or occupied
2. After all equations have been written, set R1 = 0
3. Solve the system of equations for R and K values
4. Compute the improvement index for each unused
square by the formula
Improvement Index (Iij) = Cij – Ri – Kj
5. Select the best negative index and proceed to
solve the problem as you did using the stepping-
stone method
Solving the Executive Furniture
Corporation Problem with MODI
 The initial northwest corner solution is
repeated in Table below
 Note that to use the MODI method we have
added the Ris (rows) and Kjs (columns)
Kj K1 K2 K3
TO FACTORY
Ri A B C
FROM CAPACITY
$5 $4 $3
R1 D 100 100

$8 $4 $3
R2 E 200 100 300

$9 $7 $5
R3 F 100 200 300

WAREHOUSE
300 200 200 700
REQUIREMENTS
Solving the Executive Furniture
Corporation Problem with MODI
 The first step is to set up an equation for each
occupied square
 By setting R1 = 0 we can easily solve for K1, R2,
K2, R3, and K3

(1) R1 + K1 = 5 0 + K1 = 5 K1 = 5
(2) R2 + K1 = 8 R2 + 5 = 8 R2 = 3
(3) R2 + K2 = 4 3 + K2 = 4 K2 = 1
(4) R3 + K2 = 7 R3 + 1 = 7 R3 = 6
(5) R3 + K3 = 5 6 + K3 = 5 K3 = –1
Solving the Executive Furniture
Corporation Problem with MODI
 The next step is to compute the improvement
index for each unused cell using the formula
Improvement index (Iij) = Cij – Ri – Kj
 We have
Des Moines- IDB = C12 – R1 – K2 = 4 – 0 – 1
Boston index = +$3
Des Moines- IDC = C13 – R1 – K3 = 3 – 0 – (–1)
Cleveland index = +$4
Evansville- IEC = C23 – R2 – K3 = 3 – 3 – (–1)
Cleveland index = +$1
Fort Lauderdale- IFA = C31 – R3 – K1 = 9 – 6 – 5
Albuquerque index = –$2
Solving the Executive Furniture
Corporation Problem with MODI

 The steps we follow to develop an improved


solution after the improvement indices have
been computed are
1. Beginning at the square with the best improvement
index, trace a closed path back to the original
square via squares that are currently being used
2. Beginning with a plus sign at the unused square,
place alternate minus signs and plus signs on each
corner square of the closed path just traced
Solving the Executive Furniture
Corporation Problem with MODI

3. Select the smallest quantity found in those squares


containing the minus signs and add that number to
all squares on the closed path with plus signs;
subtract the number from squares with minus signs
4. Compute new improvement indices for this new
solution using the MODI method
 Note that new Ri and Kj values must be
calculated
 Follow this procedure for the second and third
solutions
<Please refer to the class notes
for further details>
Mini Case Study II
MG Auto
MG Auto
Mileage Chart

Table 1
Transportation Tableau

Table 2
Model
Optimal Solution of MG Auto
in Network Framework
<Please refer to the class notes
for further details>
Unbalanced Transportation
Problems

 In real-life problems, total demand is


frequently not equal to total supply
 These unbalanced problems can be handled
easily by introducing dummy sources or
dummy destinations
 If total supply is greater than total demand, a
dummy destination (warehouse), with demand
exactly equal to the surplus, is created
 If total demand is greater than total supply, we
introduce a dummy source (factory) with a
supply equal to the excess of demand over
supply
Unbalanced Transportation
Problems

 In either case, shipping cost coefficients of


zero are assigned to each dummy location
or route as no goods will actually be
shipped
 Any units assigned to a dummy
destination represent excess capacity
 Any units assigned to a dummy source
represent unmet demand
Demand Less Than Supply

 Suppose that the Des Moines factory increases its


rate of production from 100 to 250 desks
 The firm is now able to supply a total of 850 desks
each period
 Warehouse requirements remain the same (700) so
the row and column totals do not balance
 We add a dummy column that will represent a fake
warehouse requiring 150 desks
 This is somewhat analogous to adding a slack
variable
 We use the northwest corner rule and either
stepping-stone or MODI to find the optimal solution
Demand Less Than Supply

 Initial solution to an unbalanced problem


where demand is less than supply
TO DUMMY TOTAL
FROM
A B C WAREHOUSE AVAILABLE
$5 $4 $3 0
D 250 250

$8 $4 $3 0
E 50 200 50 300

$9 $7 $5 0
F 150 150 300

WAREHOUSE
300 200 200 150 850
REQUIREMENTS

Total cost = 250($5) + 50($8) + 200($4) + 50($3) + 150($5) + 150(0) = $3,350

New Des Moines


capacity
Demand Greater than Supply

◼ The second type of unbalanced condition occurs


when total demand is greater than total supply
◼ In this case we need to add a dummy row
representing a fake factory
◼ The new factory will have a supply exactly equal
to the difference between total demand and total
real supply
◼ The shipping costs from the dummy factory to
each destination will be zero
Special Cases in Transportation
Problem
Degeneracy in Transportation Problems

 Degeneracy occurs when the number of


occupied squares or routes in a transportation
table solution is less than the number of rows
plus the number of columns minus 1
 Such a situation may arise in the initial
solution or in any subsequent solution
 Degeneracy requires a special procedure to
correct the problem. Since there are not
enough occupied squares to trace a closed
path for each unused route and it would be
impossible to apply the stepping-stone method
or to calculate the R and K values needed for
the MODI technique
Degeneracy in Transportation Problems

 To handle degenerate problems, create an


artificially occupied cell
 That is, place a zero (representing a fake
shipment) in one of the unused squares and then
treat that square as if it were occupied
 The square chosen must be in such a position as to
allow all stepping-stone paths to be closed
 There is usually a good deal of flexibility in
selecting the unused square that will receive the
zero
Degeneracy in an Initial Solution

 The Martin Shipping Company example


illustrates degeneracy in an initial solution
 They have three warehouses which supply
three major retail customers
 Applying the northwest corner rule the initial
solution has only four occupied squares
 This is less than the amount required to use
either the stepping-stone or MODI method to
improve the solution (3 rows + 3 columns – 1
= 5)
 To correct this problem, place a zero in an
unused square, typically one adjacent to the
last filled cell
Degeneracy During Later Solution
Stages

 A transportation problem can become


degenerate after the initial solution stage if
the filling of an empty square results in two or
more cells becoming empty simultaneously
 This problem can occur when two or more
cells with minus signs tie for the lowest
quantity
 To correct this problem, place a zero in one of
the previously filled cells so that only one cell
becomes empty
More Than One Optimal Solution
 It is possible for a transportation problem to have
multiple optimal solutions
 This happens when one or more of the
improvement indices that we calculate for unused
squares is zero in the optimal solution
 This means that it is possible to design alternative
shipping routes with the same total shipping cost
 The alternate optimal solution can be found by
shipping the most to this unused square using a
stepping-stone path
 In the real world, alternate optimal solutions
provide management with greater flexibility in
selecting and using resources
Maximization
Transportation
Problems
Maximization

 If the objective in a transportation problem is to


maximize profit, a minor change is required in the
transportation algorithm
 Now the optimal solution is reached when all the
improvement indices are negative or zero
 The cell with the largest positive improvement
index is selected to be filled using a stepping-stone
path
 This new solution is evaluated and the process
continues until there are no positive improvement
indices
Unacceptable Or
Prohibited Routes
Unacceptable Or Prohibited Routes

 At times there are transportation problems in


which one of the sources is unable to ship to
one or more of the destinations
 When this occurs, the problem is said to have
an unacceptable or prohibited route
 In a minimization problem, such a prohibited
route is assigned a very high cost to prevent
this route from ever being used in the optimal
solution
 In a maximization problem, the very high cost
used in minimization problems is given a
negative sign, turning it into a very bad profit
Thank You
Operations Research
Transshipment Model
Dr. Prabir K. Das
Professor
Indian Institute of Foreign Trade
Learning Objectives
After completing this session, we will be able to:

1. Structure special LP problems using the


transshipment model
2. Converting transshipment problem to
transportation problem using the concept of
buffer
Session Outline

▪ Introduction
▪ Network
▪ Setting up an LP Transshipment Problem
Introduction

 The transshipment model recognizes that


it may be cheaper to ship through
intermediate or transient nodes before
reaching the final destination.
 It is more general than that of the regular
transportation model, where direct
shipment only is allowed between a source
and a destination.
 In transshipment model, arcs indicate
direction of flow of the commodity.
Introduction

One fundamental difference


between transportation and
transshipment problem is that
transshipment allows shipments
both in and out of some nodes while
transportation problems do not.
Constraints in a transshipment
problem include a variable for every
arc.
Transshipment

 Two automobile plants, P1 and P2, are linked to


three dealers D1, D2, and D3, by way of two
transit centers, T1 and T2, according to network
shown in the next slide.
 The supply amounts at P1 and P2 are 1000 and
1200 cars, and the demand amount at dealers D1,
D2, and D3 are 800, 900, and 500 cars.
 The shipping costs per car (in hundred of dollars)
between pairs of nodes are shown on the
connecting links (or arcs) of the network.
Transshipment

 Transshipment occurs in the network


because the entire supply amount of
2200(1000+1200) cars at nodes P1 and P2
could conceivably pass through any node of
the network before ultimately reaching their
destinations at nodes D1, D2, and D3.
 In this regard, each node in the network with
both input and output arcs (T1, T2, D1, and
D2) acts as both source and a destination
and is referred to as a transshipment node.
The remaining nodes are either pure supply
nodes (P1 and P2) or pure demand nodes
(D3).
Transshipment
Transshipment

 The transshipment model can be converted into a regular


transportation model with six sources (P1, P2, T1, T2,
D1, and D2) and five destinations (T1, T2, D1, D2 and
D3). The amounts of supply and demand at the different
nodes are computed as
 Supply at a pure supply node=Original supply
 Demand at a pure demand node=Original demand
 Supply at a transshipment node=Original supply + buffer
amount
 Demand at a transshipment node=Original demand +
buffer amount
Transshipment

 The buffer amount should be sufficiently large to allow


all of the original supply (or demand) units to pass
through any of the transshipment nodes.
 Let B be the desired buffer amount; then
 B =total supply (or demand)
= 1000+1200 (or 800+900+500)
=2200 cars
Using the buffer B and the unit shipping costs given in the
network, the equivalent regular transportation model is
presented in the next Table.
Transshipment Model
T1 T2 D1 D2 D3 Supply
P1 3 4 M M M 1000
P2 2 5 M M M 1200
T1 0 7 8 6 M B
T2 M 0 M 4 9 B
D1 M M 0 5 M B
D2 M M M 0 3 B
Demand B B 800+B 900+B 500
Transshipment Solution
Mini Case Study II
Ron Electronics

 Ron is an electronics company with production facilities


in Denver and Atlanta
 Components produced at either facility may be shipped
to either of the firms’ regional warehouses, which are
located in Kansas city and Louisville
 From the regional warehouses, the firm supplies retail
outlets in Detroit, Miami, Dallas, and New Orleans
 The key features of the problem are shown in the
network model
Ron Electronics

 The supply at each origin and demand at each


destination are shown in the left and right margins,
respectively.
 Nodes 1 (DV) and 2 (AT) are the origin nodes; nodes 3
(KC) and 4 (LV) are the transshipment nodes; and nodes
5 (DE),6 (M),7 (DA) and 8 (NO) are the destination
nodes.
 The transportation cost per unit for each distribution
route is shown in the Table 1 and on the arcs of the
network model in the figure given in the next slide.
Transshipment Problem-
Network Representation

5 200
600 1 2 2

3 6
3
3 6 150
6
4
3 4
7 350
1 6
4
5
400 2
8 300

Supplies Distribution routes


Demand
(arcs)
Transportation cost per unit

Warehouse Retail outlet


Plant Kansa Louisville Wareh Detroi Miami Dallas New
s ouse t Orlea
Denver 2 3 ns

Atlanta 3 1 Kansa 2 6 3 6
s
Louisv 4 4 6 5
ille
Model Formulation

 As with the transportation problems, we can formulate


a linear programming model of the transshipment
problem for a network representation. Again, we need a
constraint for each node and a variable for each arc.
 Let xij denotes the number of units shipped from node i
to node j. For example, x13 denotes the number of units
shipped from the Denver plant to the Kansas city
warehouse, x14 denotes the number of units shipped
from the Denver plant to the Louisville warehouse, and
so on.
Model Formulation

 The supply at the Denver plant is 600 units, the amount


shipped from the Denver plant must be <=600.
Mathematically, we, write the supply constraint as
 x13+x14<=600
 Similarly, for the Atlanta plant we have
 x23+x24<=400
Model Formulation

 Constraint corresponding to the two transshipment nodes


 For node 3 (the Kansas City warehouse), we must guarantee that the
number of units shipped out must equal the number of units shipped
into the warehouse.
 If number of units shipped out of node
3=x35+x36+x37+x38
 and
 Number of units shipped into node 3=x13+x23
 We obtain
 x35+x36+x37+x38=x13+x23
Model Formulation

 Rearranging we get
 -x13-x23+x35+x36+x37+x38=0
 Similarly, the constraint corresponding to node 4 is
 -x14-x24+x45+x46+x47+x48=0
 To develop the constraints associated with the
destination nodes, we recognize that for each node the
amount shipped to the destination must equal to the
demand. For example, to satisfy the demand for 200
units at node 5 (the Detroit retail outlet), we write
 X35+x45=200
Model Formulation

 Similarly, for nodes 6, 7 and 8, we have


 x36+x46=150
 x37+x47=350
 x38+x48=300
 The objective function reflects the total shipping cost
over the 12 shipping routes.
 Combining the objective function and constraints lead to
a 12-variable, 8-constraint linear programming model of
the Ron Electronics.
Model Formulation

 Minimize 2x13+3x14+3x23+1x24+2x35+6x36+3x37+6x38+4x45+
4x46+6x47+5x48
 Subject to
 x13+x14 <=600
 x23+x24 <=400
 -x13 -x23 +x35+x36+x37+x38 =0
 -x14 -x24 +x45+x46+x47+x48 =0
 x35 +x45 =200
 x36 +x46 =150
 x37 x47 =350
 x38 +x48 =300
 xij>=0 for all i and j
General Transshipment
Problem

 In the transshipment problem arcs may connect any pair


of nodes.
 All such shipping patterns are possible in a
transshipment problem.
 We still require only one constraint per node, but the
constraint must include a variable for every arc entering
or leaving the node.
 For origin nodes, the sum of the shipments out minus
the sum of the shipments in must be less than or equal
to the origin supply.
General Transshipment
Problem

 For destination nodes, the sum of the shipments in


minus the sum of the shipments out must equal
demand.
 For transshipment nodes, the sum of the shipments out
must equal the sum of the shipments in.
General Transshipment
Problem

 Suppose that it is possible to ship directly from Atlanta


to New Orleans at $4 per unit and from Dallas to New
Orleans at $1 per unit.
A General Linear Programming
Model of the Transshipment Problem

Min  c xi
all arcs
ij ij

s.t.
x
arcs out
ij − x
arcs in
ij  si Origin nodes i

x
arcs out
ij − x
arcs in
ij = 0 Transshipment nodes

x
arcs in
ij − x
arcs out
ij = dj Destination nodes j

xij  0  i and j
where

xij=number of units shipped from node i to


node j
cij=cost per unit of shipping from node i to
node j
si=supply at origin node i
dj=demand at destination node j
Modified Transshipment
Problem

5 200
600 1 2 2

3 6
3
3 6 150
6
4
3 4
7 350
1 6
4
5 1
400 2
4
8 300

Supplies Distribution routes


Demand
(arcs)
Thank You
Simulation Modeling
Dr. Prabir K. Das
Professor(QT-BRM/Analytics)
Indian Institute of Foreign Trade
Learning Objectives

1. Understand the definition and concept of


simulation
2. Tackle a wide variety of problems by
simulation
3. Understand the seven steps of conducting a
simulation
4. Explain the advantages and disadvantages of
simulation
5. Develop random number intervals and use
them to generate outcomes
6. Understand alternative simulation packages
available
Session Outline
• Introduction-Definition
• Advantages and Disadvantages of Simulation
• Monte Carlo Simulation
• Simulation and Inventory Analysis
• Simulation of a Queuing Problem
• Fixed Time Increment and Next Event
Increment Simulation Models
• Simulation Model for a Maintenance Policy
• Two Other Types of Simulation
• Verification and Validation
• Role of Computers in Simulation
Introduction

 Simulation is one of the most widely used


modeling technique
 It is the next best thing to observing a real
system
 It is used by major multinational corporations in
corporate planning
 To simulate is to try to imitate the features,
appearance, and characteristics of a real system
 We will build a mathematical model that comes
as close as possible to representing the reality of
the system
 Physical models can also be built to test systems
Introduction…(cont’d.)

 The idea behind simulation is to imitate a real-


world situation mathematically
 Study its properties and operating characteristics
 Draw conclusions and make action decisions
Definition

 D 1 : Simulation is a numerical technique for conducting


experiments on a digital computer, which involves logical and
mathematical relationships that interact to describe the behavior
and structure of a complex real world system over extended
periods of time.
 D 2: It deals with a computerized imitation of the random behavior
of a system for the purpose of estimating its measures of
performance.
 D 3: An experimental method used to study the dynamics of
systems. Rather than ‘solving’ the system, the analyst operates a
‘model’ of the system under different operating conditions.
Definition…(cont’d.)

 D 4: A modeling activity where a simplified description is


abstracted from a relatively complex reality for the purpose of
gaining insight into system behavior.
 D5: An attempt to duplicate the operation of a system or activity
without incurring the expense of building and/or operating the
system or activity.
Why Simulation

 Duplicating experiments can reveal rare stochastic


combinations of events that may dramatically affect
system performance
 It allows study of dynamic effects and events. Allowing
complex computations for the system
 May be used where analytic models are not available,
appropriate, or applicable
 May be used for a “show me” convincing argument
Importance of Simulation

 Can study systems with preliminary data and critical data elements
can be identified
 Simulation generates data by using existing data decreasing need
to collect additional data
 Methods are often easier to apply than other methods
 Analytical techniques are great, but usually require set of
simplifying assumptions that cannot always be justified
 Simplifying assumptions are often not required
Importance of
Simulation…(cont’d.)

 Can build system model in modules, run independently,


and subsequently can be joined together
 Satisfy “show me” requirements
 Simulation is used along with interplay with other
analytical and semi-analytical techniques
 Substitution for experimentation with the real system for
analysis of arbitrary system behavior
When, Why and Where

 The real system does not exist and it is costly or impossible to


build and experiment with prototypes
 Experimenting with the real system is expensive, dangerous, or
likely to cause serious disruptions
 Other modeling methods are impossible
 Other modeling methods have no simple and practical analytical
or numerical solutions
 Expected accuracy of simulation is consistent with our
requirements
Important Concepts

 System: A system is what can be isolated and can be “controlled”


and “observed” to improve our understanding of it or answer some
specific questions about it.
 Model: A model for a system is anything to which an experiment
can be applied in order to answer questions about the system.
 Experiment: An experiment is the process of extracting data from a
system by exerting it through certain inputs.
 State variable: Is a variable, which describes the “state” of a
dynamical system.
Model

 Scale: Can be to any scale


 Functionality: May not function
 Size: Could be bigger or smaller
 Purpose: Demonstration of product
 Look: May be only the exterior
 Cost: Relatively cheap to manufacture
Prototype

 Functionality: Fully functional; prone to error


 Size: Actual version
 Purpose: Performance evaluation and improvement
 Look: Interior and exterior
 Cost: Relatively expensive
Types of Simulation
Discrete and Continuous
Systems
 Discrete system
 A system where state variables change only at discrete
sets of point in time

 Continuous system
 A system where state variables change continuously
over time
 Many continuous systems are modeled as discrete and
vice versa for tractability
Deterministic and Stochastic
System

 Deterministic system
 A system where all state variables change only deterministically.
 Stochastic system
 A system where some state variables evolves probabilistically over
time.
Time Dependent and Time
Independent Simulations

 Time Dependent and Time Independent Simulations


 In time dependent system it is important to know the
exact time of occurrence of an event
 In time independent system, it is not required.
Interactive Simulation

 Present the consequences of change in the value of


input variation in the model.
 Progress is displayed.
Business Simulation
Games

 Capstone is a rich,
complex business
simulation designed to
teach strategy,
competitive analysis,
finance, cross-functional
alignment, and the
selection of tactics to
build a successful and
focused company.
Business Simulation
Games

 Attract customers and


make profit
 Construction and
management
Business Simulation Games

 The objective of the


game is to build and
manage a railroad
company by laying track,
building stations, and
buying and scheduling
trains.
 PC version free.
Business Simulation
Games
 Users role-play as
entrepreneurs to
start their own
business in game
and finally build up
a universal
corporation. Users
will compete with
each other in the
same marketplace,
just like in real life.
They can co-operate
with others to create
a joint venture.
Continuous and Stochastic Systems

Examples of Continuous Examples of Continuous


and Stochastic Systems and Stochastic Systems

 Finance  Economics
 Financial risk  Economic indicators:
management
capital-labor ratio,
 Option pricing exchange rates
 Marketing  Environmental sciences
 Network systems  Pollution transport and
 Communication systems: prediction
Data flow under different
protocols  Corrosion analysis

 Electrical networks  Hydrological systems


Continuous and Stochastic Systems

Examples of Continuous Examples of Continuous


and Stochastic Systems and Stochastic Systems

 Energy Systems
 Biological Systems
 Epidemiology  Groundwater and surface
 Genetics water modeling

 Demographics  Physical Sciences

 Neuronal systems  Physics

 Meteorology  Chemistry
Need of Models to Understand
System

 Models are constructed with a view of using them to


conduct experiments, predict events, and designate a
future course of action
 The use of models are defined before they are
developed. The model is not the focus. Instead model
used in the context of a decision making is the focus
 Model is a means to an end
 Models are abstractions of the real system
What is the Need of
Abstraction

 Lower cost than real system study


 Brings perspective to the need for detail
 Improved system understanding
 Framework for testing system modifications
 More control over variation than direct study
 Enables investigator to organize beliefs and empirical
observations
Black Box

 Once an appropriate model is developed, the system


relationships can be treated as a ‘black’ box.

 Input Output
Advantages of Simulation

 Simulation is useful because


 It is relatively straightforward and flexible
 Recent advances in computer software make simulation models
very easy to develop
 Can be used to analyze large and complex real-world situations
 Allows “what-if?” type questions
 Does not interfere with the real-world system
 Enables study of interactions between components
 Enables time compression
 Enables the inclusion of real-world complications
Disadvantages of Simulation

 The main disadvantages of simulation are


 It is often expensive as it may require a long, complicated process
to develop the model
 Does not generate optimal solutions, it is a trial-and-error
approach
 Requires managers to generate all conditions and constraints of
real-world problem
 Each model is unique and the solutions and inferences are not
usually transferable to other problems
Disadvantages of
Simulation…(Cont’d.)

 The ease of its applicability make it vulnerable for misuse. (It


does not require much of a genius to be able to utilize a
simulation program. So, in order to use simulation intelligently, we
must understand what we are doing)
 Become "model addicts", not realizing that the model represents
the real system under very specific experimental conditions.
Falling in the trap of overusing, over-interpreting the results from
simulation using the model.
Disadvantages of
Simulation…(cont’d.)
 Simulations require a lot more work than analytical
technique do to get an understanding of the system
 One run of simulation gives information of how the
system behaves under one specific set of experimental
conditions, as opposed to the analytical technique that
gives under all experimental conditions
 Therefore analytical techniques must be used wherever
possible
 Results need to be interpreted raising error possibility.
 Error sources can be difficult to trace
Disadvantages of
Simulation…(cont’d.)

 Model construction can be long and arduous.


 Validation is difficult. Is it the model or the system??
Process of Simulation

 Define a problem
 Introduce the variables associated with the problem
 Construct a numerical model
 Set up possible courses of action for testing
 Run the experiment
 Consider the results
 Decide what courses of action to be taken
Process of Simulation

Define Problem

Introduce Important
Variables

Construct Simulation
Model

Specify Values of
Variables to Be Tested

Conduct the
Simulation

Examine the
Results

Select Best Course of


Figure 1 Action
Planning a Simulation Model

 Formulation of the problem


 Identify the type of model support desired: single use
throwaway model or multiple “what if” analysis.
 Explicit statement of the objectives of the study. May
change with time over the project term.
 Questions to be answered and hypothesis to be tested.
 Criteria for evaluating answers to questions.
Planning a Simulation
Model
 Collection of data
 Descriptive and quantitative data.
 Model will often help refine data requirements.
 Lists of data needed and forms for holding data.
 Estimation of parameters
 Fit the data to the parameters in the model.
 Determine units and whether parameter is deterministic
or stochastic.
Planning a Simulation Model

 Formulation of computer program


 Flow chart of the system / code
 Coding logic in the language
 Error checking of code
 Testing operation of code
Planning a Simulation Model

 Validation
 Check model results against historical or expectations of
system performance.
 Review accuracy of predictions and plan experiments
accordingly.
 Verify logic and data.
Building Blocks of Simulation
Models
 A definition of the state of the system (the
number of customers in a queueing system)
 Identification of possible states of the system
that can occur.
 Identification of possible events (e.g., arrivals
and service completions in a queueing system)
that would change the state of the system.
 Simulation clock (passage of time)
 A method for randomly generating the events
 A formula for identifying state transitions that
are generated by the various kinds of events.
Requirements of a
Simulation Model
 Create random numbers
 Create random variables
 Record data for output
 Perform statistical analysis on recorded data
 Arrange and carry out computations using the output in
specified formats
 Detect and report logical inconsistencies and other error
and provide correction
Two Statistical Theories

 Strong law of large numbers


 Central limit theorem
Strong Law of Large
Numbers

 Larger the sample size, closer the distribution to the


theoretical distribution
Central Limit Theorem

 A mean of set of variables drawn independently from


some distribution will be normally distributed
Central Limit Theorem

 Let x1, x2, …, and xn be independent and identically distributed


random variables, each with mean μ and standard deviation σ, and
define
 Sn=x1+x2+…+xn
 As n becomes large (n ->∞),the distribution of Sn becomes
asymptotically normal with mean nμ and variance n σ2, regardless of
the distribution of x1, x2,…, xn.
 Distribution of sample mean of a set of variables of sample size n
drawn independently from some distribution will be normally
distributed with mean μ and standard deviation σ/√n.
Generation of Random
Numbers
 Random number (r.n.) generator algorithms produce
stream of numbers in the interval 00000 to .99999
 These number streams are called pseudo random
number streams
 Not truly random
 Mathematically produce the exactly same sequence each
time they are used
 Generated using mathematical operations, generally
remainder division
Random Number
Generator
 Every number in it has equal probability of occurring
 Numbers are independent
 Can be tested using run test or serial correlation test
 All streams begin with a seed value
 Different seeds give different sequences
Random Number Generator -
LMCG

 Linear Mixed Congruential Generators (LMCG) for generating


Random Numbers
 Deterministic recursion used to generate seemingly random
numbers (pseudo random numbers)
 un+1 = (bun + c) (mod m), n=0,1,2,...
 where b, c and m are positive integers (b, m > 0, c >= 0)
 Also, b<m, c<m
 This mathematical notation signifies that un+1 is the remainder when
bun+c is divided by m.
Random Number Generator -
LMCG

 Thus the possible values of un+1 are 0, 1, 2, …, m-1, so


that m represents the desired number of different values
that could be generated for the random numbers
 The initial value u0 is usually referred to as the seed of
the generator
 Recursion starts from a seed u0
 b, c and m should be picked appropriately
Random Number Generator

 Uniformly distributed numbers on the unit interval [0, 1] are


obtained by
 Rn = un/m
 For example, b = 16,807 = 75, c = 0, m = 231-1 (prime)
 Why such number
 The Congruential algorithm is widely used, but there is one
problem. It has a looping characteristic
 It has a period, which is defined as the smallest positive integer p
which satisfies ui+p = Xi for all i >k; for some k >= 0 which
cannot exceed m
Random Number
Generator (RNG)
 In large-scale simulation this can become a major
weakness, for example, a 32-bit linear congruential
generator will have a period less than 232
 In large simulation this sequence will be exhausted in
just a few minutes
 So, b, c, and m (and RNGs) need to be chosen with not
only long period in mind but also, good statistical
properties, such as independence and equal probability
of occurrence
Random Number
Generator

 Computational and storage efficiency


 Reproducibility (same seed!)
 Facilities for separate streams (change seed)
An Illustration…(cont’d.)

 Uniform random number is obtained by


 Uniform r.n.=(random integer number+0.5)/m
 Each of these uniform random numbers lies at the midpoint of one of
the eight equal-sized intervals 0 to 0.125, 0.125 to 0.25,…,0.875 to 1
 The multiplicative congruential method is just the special case of the
mixed congruential method where c=0
 In additive congruential method, we set b=1 and replace c by some
number preceding un in the sequence, say un-1
Sampling from Probability
Distribution

 Inverse method
 Acceptance-rejection method
Inverse Method

 Suppose that it is desired to obtain a random sample x


from the continuous or discrete probability distribution
having probability density function f(x) or probability
mass function p(x).
 Determine a closed form expression of the cumulative
density function F(x)=P(X≤x), where 0 ≤F(x) ≤1, for all
defined values of X. Given that R is a random value
obtained from a uniform (0,1) distribution, and
assuming that F-1 is the inverse of F; following steps are
followed:
Inverse Method

 Step 1: Generate the (0, 1) random number R


 Step 2: Compute the desired sample, x=F -1(R)
 The procedure for both a continuous and a discrete
random distribution is illustrated in the Figure presented
in the next slide
 The uniform (0, 1) random value R1 is projected from
the vertical F(x)-scale to yield the desired sample value
x1 on the horizontal scale
Relationship Between
Uniform Distribution and
Cumulative Distribution
Inverse Method
Test of Quality

 While doing simulation it is necessary to know where the random


numbers are coming from
 The kind of random number generator may have some artifacts
that can result in some misleading conclusions.
 It is even advisable to run the simulation with two
different types of random number generators to make sure the
results are genuine, and not artifacts of the properties of the
generator
 Another generator with better properties is Lagged Fibonacci
Testing a Uniform Random
Number Generator

 The Frequency Test: A goodness-of-fit procedures, such


as chi-square test or the Kolmogorov-Smirnov test, is
used to determine the uniformity of digits generated.
 The Gap Test: Statistically analyze the number of digits
that occur between the generation of a specified digit.
 The Run Test: The runs test (a) checks for sequence of
digits that successively fall below (above) 0.5 or (b)
checks to see if unusual runs up or down occur in
successive numbers.
Testing a Uniform Random
Number Generator

 The Poker Test: The Poker test examines individual


digits to see if a single number or combinations of
numbers form pairs, threes, and so forth, in successive
sets of five random numbers.
 Serial Test: Check the randomness of successive
numbers in a sequence.
 Product Tests: Product tests measure the independence
between the sequence of random numbers.
Testing a Uniform Random
Number Generator

 Tests for Autocorrelation: To determine whether there


are patterns or relationship among sets of random
numbers.
 The Maximum Test: The maximum test examines
sequences of numbers to detect abnormally high or low
numbers.
Probability Distributions
Uniform Distribution

 1
b  a for a  xb

f ( x)  
 0 for all other values

Area = 1

a b
Uniform Distribution
Probability

P( x  X  x )  x x
2 1
1 2
ba

45  42 1
P( 42  X  45)  
47  41 2 Area
= 0.5

42 45
Uniform Distribution
Mean and Standard Deviation
Mean Mean
a+b 41 + 47 88
= =   44
2 2 2

Standard Deviation Standard Deviation


ba 47  41 6
    1. 732
12 12 3. 464
Uniform Distribution of
Assembly of Plastic
Modules
 1 1

 39  27 12 for 27  x  39

f ( x)   1

1
 0 for all other valu es 39  27 12

Area = 1
Uniform Distribution
Mean and Standard Deviation
Mean Mean
a+b 39 + 27
= =  33
2 2
Uniform Distribution of
Assembly of Plastic Modules
35  30 5
P(30  X  35)    0.4167
39  27 12

35  30
 0.4167
30 39  27
f (x) 42 45

27 35 39 x
Uniform Distribution of
Assembly of Plastic Modules
30  27 3
P( X  30)    0.2500
39  27 12

30
f ( x)

27 39 x
Uniform Distribution

 Build the cumulative density function (c.d.f.) for the


distribution

 So effectively, we invert the cumulative density function


 Xn = F-1(Un)
Relationship Between
Uniform Distribution and
Cumulative Distribution
Exponential Distribution

 Continuous
 Family of distributions
 Skewed to the right
 X varies from 0 to infinity
 Apex is always at X = 0
 Steadily decreases as X gets larger
 Probability function
 X
f (X)  e for X  0,   0
Different Exponential
Distributions
Exponential Distribution:
Computation of Probability
1.2

X 0
1.0
 P X  X 0  e
(12
P X  2|   12
. e
. )(2)
0.8
.0907
0.6

0.4

0.2

0.0
0 1 2 3 4 5
Generating Exponential
Random Variable

 Cumulative density function for exponential distribution:


F(x; λ) = 1- e-λx, 0 < x < ∞
 Inverting the cumulative density function.
 Xn = F-1(Un)
 Xn = -(1/λ) log (1-Un)
Types of Simulation Models

Simulation models are often broken


into three categories
 The Monte Carlo method
 Operational gaming
 Systems simulation

Though theoretically different,


computerized simulation has tended
to blur the differences
Monte Carlo Simulation

 When systems contain elements that exhibit chance in


their behavior, the Monte Carlo method of simulation
can be applied
 The Mathematics behind Monte Carlo came out of the
Manhattan Project to build the atomic bomb during the
second World War
 The work is largely credited to Stainslaw Ulam, An
Austrian-born mathematician, along with computer
pioneer and scientist John von Neumann
 Simulation models offered a way of arriving at
approximate solutions to complex problems associated
with the random neutron diffusion in nuclear weapons
material
 The name underline the fact that this is a probability
and not a certainty model
Monte Carlo Simulation

 The basis of the Monte Carlo simulation is


experimentation on the probabilistic
elements through random sampling
 It is based on the following five steps
Monte Carlo Simulation

 Setting up a probability distribution for important


variables
 Building a cumulative probability distribution for each
variable
 Establishing an interval of random numbers for each
variable
 Generating random numbers
 Actually simulating a series of trials
Some Application Areas

 Inventory demand
 Lead time for inventory
 Times between machine breakdowns
 Times between arrivals
 Service times
 Times to complete project activities
 Number of employees absent
Simulation of a Queuing
Problem
Simulation of a Queuing Problem
 Modeling waiting lines is an important application
of simulation
 The assumptions of queuing models are quite
restrictive
 Sometimes simulation is the only approach that fits
 In a Port, fully loaded container ships arrive at
night for unloading
 The number of ships per night varies from 0 - 5
 The number of ships vary from day to day
Port of New Orleans

 In this example, arrivals do not follow a Poisson


distribution and unloading rates are not
exponential or constant
 The supervisor has information which can be used
to create a probability distribution for the daily
unloading rate
 Barges are unloaded first-in, first-out
 Barges must wait for unloading which is expensive
 The dock superintendent wants to do a simulation
study to enable him to make better staffing
decisions
Port of New Orleans

 Overnight ship arrival rates and random


number intervals

NUMBER OF CUMULATIVE RANDOM


ARRIVALS PROBABILITY PROBABILITY NUMBER INTERVAL
0 0.13 0.13 01 to 13
1 0.17 0.30 14 to 30
2 0.15 0.45 31 to 45
3 0.25 0.70 46 to 70
4 0.20 0.90 71 to 90
5 0.10 1.00 91 to 00

Table 10
Port of New Orleans

 Unloading rates and random number intervals

DAILY UNLOADING CUMULATIVE RANDOM


RATE PROBABILITY PROBABILITY NUMBER INTERVAL
1 0.05 0.05 01 to 05
2 0.15 0.20 06 to 20
3 0.50 0.70 21 to 70
4 0.20 0.90 71 to 90
5 0.10 1.00 91 to 00
1.00

Table 11
Port of New Orleans

 <Pl refer to class discussion>


Software

 Simulation languages
 Simula
 Simscript
 GPSS
 Simio
 Software packages
 Crystal ball
 @ Risk
 GoldSim
If any error or inconsistencies are
found in this presentation, pl.
report it to [email protected]
Thank You
Queuing Theory Models
Dr. Prabir K. Das
Professor (QT-BRM/Analytics)
Indian Institute of Foreign Trade
Learning Objectives

 Understand the importance of studying queues


 Describe the trade-off curves for cost-of-waiting
time and cost-of-service
 Understand the three parts of a queuing system:
the calling population, the queue itself, and the
service facility
 Describe the basic queuing system
configurations
 Understand the assumptions of the common
models dealt with in this session
 Analyze a variety of operating characteristics of
waiting lines
Session Outline

 Introduction
 Waiting Line Costs
 Characteristics of a Queuing System
 Poisson process and exponential
distribution
 Single-Channel Queuing Model with
Poisson Arrivals and Exponential Service
Times (M/M/1)
 Multichannel Queuing Model with
Poisson Arrivals and Exponential Service
Times (M/M/m)
Introduction

 Waiting for service is part of our daily life


 Waiting cannot be eliminated completely
without incurring inordinate expenses, and the
goal is to reduce its adverse impact to
“tolerable” levels
 Queues form in business process as well
 Queuing theory is the study of waiting lines
 It is one of the oldest and most widely used
analytical techniques
 The objective of queuing analysis is to offer a
reasonably satisfactory service to waiting
customers
 It is not an optimization technique
Introduction
 Analytical models of waiting lines can
help managers evaluate the cost and
effectiveness of service systems
 It determines the measures of
performance of waiting lines such as
the queue length, average waiting time
in queue and the productivity of the
service facility (or facility utilization),
which can then be used to design the
service installation
Waiting Line Costs

 Most waiting line problems are focused on


finding the ideal level of service a firm should
provide
 In most cases, this service level is something
management can control
 When an organization does have control, they
often try to find the balance between two
extremes
 A large staff and many service facilities
generally results in high levels of service but
have high costs
Waiting Line Costs

 Having the minimum number of service


facilities keeps service cost down but may
result in dissatisfied customers
 There is generally a trade-off between cost of
providing service and cost of waiting time
 Service facilities are evaluated on their total
expected cost which is the sum of service
costs and waiting costs
 Organizations typically want to find the service
level that minimizes the total expected cost
Waiting Line Costs

 Queuing costs and service level

Total Expected Cost

Cost of Providing Service


Cost

Cost of Waiting Time

* Service Level
Optimal
Figure 1 Service
Level
Elements of a Queuing
Model
 Arrivals (from a source) (Customers are also
known as calling population)
 Interarrival time: The arrival of customers is
represented by interarrival time between
successive customers
 Service facilities
 Service: is described by service time per customer
 The actual waiting line
Characteristics of a Queuing
System

Arrival has three major


characteristics, size, pattern, and
behavior
 Size of the calling population
 Can be either unlimited (essentially infinite) or
limited (finite)
 Pattern of arrivals
 Can arrive according to a known pattern or can
arrive randomly
 Random arrivals generally follow a Poisson
distribution
Characteristics of a Queuing
System

 Let X be a random variable describing number


of arrival (s). The probability mass function of
Poisson distribution is given by

e  x
P( X  x)  for x  0, 1, 2, 3, 4,...
x!
where

P(x) = probability of x arrivals


x = number of arrivals per unit of time
 = average arrival rate
e = 2.7183
Characteristics of a Queuing
System
 The values of e– can be calculated
 If  = 2, we can find the values for x = 0, 1, and 2

e  x
P( x) 
x!

e 2 20 0.1353(1)
P (0 )    0.1353  14%
0! 1
e 2 21 e 2 2 0.1353(2)
P (1)     0.2706  27%
1! 1 1
e 2 22 e 2 4 0.1353( 4)
P (2 )     0.2706  27%
2! 2(1) 2
Computation of
Probability
The probability of arrival (0, 1, 2, 3, …) can be easily computed using the
function “POISSON” in MS Excel.
Computation of
Probability
Characteristics of a Queuing
System
 Two examples of the Poisson distribution for
arrival rates
0.30 – 0.25 –
0.25 – 0.20 –
0.20 –
0.15 –
Probability

Probability
0.15 –
0.10 –
0.10 –
0.05 – 0.05 –

0.00 –| | | | | | | | | | 0.00 –| | | | | | | | | |
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9
X X
 = 2 Distribution  = 4 Distribution

Figure 2
Characteristics of a Queuing
System

 Behavior of arrivals
 Most queuing models assume customers are patient and
will wait in the queue until they are served and do not
switch lines
 Customer may switch from one Q to another in the hope
of reducing waiting time. It is known as jockey
 Balking refers to customers who refuse to join the queue
 Reneging customers enter the queue but become
impatient and leave without receiving their service
 That these behaviors exist is a strong argument for the
use of queuing theory to managing waiting lines
Characteristics of a Queuing
System

Waiting Line Characteristics


 Waiting lines can be either limited or unlimited
 Queue discipline refers to the rule by which customers
in the line receive service
 The most common rule is first-in, first-out (FIFO)
 Other rules are possible and may be based on other
important characteristics
 Other rules can be applied to select which customers
enter which queue, but may apply FIFO once they are in
the queue
Q Discipline

First come first serve (FCFS)


First in first out (FIFO)
Last come first served (LCFS)
Service in random order (SIRO)
Priority
Characteristics of a Queuing
System
Service Facility Characteristics
Basic queuing system configurations
 Service systems are classified in terms of the
number of channels, or servers, and the number of
phases, or service stops
 A single-channel system with one server is quite
common
 Multichannel systems exist when multiple servers
are fed by one common waiting line
 In a single-phase system the customer receives
service from just one server
 If a customer has to go through more than one
server, it is a multiphase system
Characteristics of a Queuing
System
 Four basic queuing system configurations

Queue

Service Departures
Arrivals Facility after Service

Single-Channel, Single-Phase System

Queue
Type 1 Type 2 Departures
Arrivals Service Service after Service
Facility Facility

Single-Channel, Multiphase System

Figure 3 (a)
Characteristics of a Queuing
System
 Four basic queuing system configurations

Service
Facility Departures
Queue
1

Service
Arrivals Facility after
2

Service
Facility Service
3

Multichannel, Single-Phase System

Figure 3 (b)
Characteristics of a Queuing
System
 Four basic queuing system configurations

Type 1 Type 2
Queue Service Service
Facility Facility
1 1 Departures
Arrivals after
Service
Type 1 Type 2
Service Service
Facility Facility
2 2

Multichannel, Multiphase System

Figure 3 (c)
Characteristics of a Queuing
System

 Service time distribution


 Service patterns can be either constant or random
 Constant service times are often machine controlled
 More often, service times are randomly distributed
according to exponential probability distribution
(also known as negative exponential probability
distribution)
 Models are based on the assumption of particular
probability distributions
 Analysts should take to ensure observations fit the
assumed distributions when applying these models
Characteristics of a Queuing
System
 Two examples of exponential distribution for
service times
f (x)
– f (x) = αe–αx

for x ≥ 0
and α> 0

α= Average Number Served
– per Minute

Average

Service Time of

20 Minutes
Average Service Time of 1 Hour
Figure 4 |– | | | | | |
0 30 60 90 120 150 180 Service Time (Minutes)
The Role of the Exponential
Distribution
 The operating characteristics of queuing
systems are determined largely by the
probability distribution of interarrival times
 The probability distribution of service times
 For real queuing systems these distributions
can take any form
 To formulate a queuing theory model as a
representation of the real system, it is
necessary to specify the assumed form of
each of these distributions
The Role of the Exponential
Distribution
 To be useful, the assumed form should be
sufficiently realistic that the model provides
reasonable predictions while, at the same time,
being sufficiently simple that the model is
mathematically tractable
 Based on these considerations, the most
important probability distribution in queuing
theory is the exponential distribution
 Let a random variable X represents interarrival
or service times
 End of these times are considered as events
The Role of the Exponential
Distribution
 A random variable X is said to have an
exponential distribution with
parameter α if its probability density
function is
f (x) = αe–αx for x ≥ 0
0 for x<0
and α> 0

 The cumulative probabilities are


 F(x)=P(X≤x)=1-e-αx
The Role of the Exponential
Distribution

 α=average number of events in one


unit of time

 The expected value and variance of


the random variable are
 E(X)=1/α
 V(X)=1/ α2
Computation of probability

 Using the exponential distribution, the


probability that the service time will be less
than or equal to a time length x is (assuming
one customer per min. i.e., α=1)
 P(service time≤0.5 min)=1-exp(-1*0.5)=1-
0.6065=0.3935
 P(service time≤1.0 min)=1-exp(-1*1.0)=1-
0.3679=0.6321
 P(service time≤2.0 min)=1-exp(-1*2.0)=1-
0.1353=0.8647
 So, there is a 39% probability that the service
can be completed within 30 seconds
Computation of probability

 MS Excel can be used to compute the probability


The Role of the Exponential
Distribution

 Six key properties of exponential distribution


 f(x) is a strictly decreasing function of x (x≥0)
 Lack of memory: For interarrival times, the
time until the next arrival is completely
uninfluenced by when the last arrival occurred.
 The minimum of several exponential random
variables has an exponential distribution
 Related to Poisson distribution
The Role of the
Exponential Distribution

 For all positive values of x,


P(X≤x+Δx|X>x)≈α for small Δx
 Unaffected by aggregation or
disaggregation
Identifying Models Using Kendall
Notation
 D. G. Kendall developed a notation for queuing
models that specifies the pattern of arrival
(number of arrivals or interarrival time
distribution), the service time distribution, and
the number of channels. It is of the form

a/b/c:d/e/f
a=Arrival b=Service time c=Number of service
distribution distribution channels open

d=Q discipline e=Max no allowed f=size of the calling


in the system source
Identifying Models Using
Kendall Notation
 Specific letters are used to represent probability distributions
M = Markovian process (Poisson distribution for
number of arrivals or exponential for interarrival
time distribution)
D = Deterministic or Degenerate (constant rate)
time
G = General distribution with known mean and
variance
GI = General Independent distribution is used to
refer interarrival times
Ek = Erlang or gamma distribution of time (the
sum of independent exponential distribution)
Q Discipline Notations

 The Q discipline notations (symbol d) includes


 FCFS = First come first serve or FIFO = First in first out
 LCFS = Last come first served
 SIRO = Service in random order
 GD = General discipline (i.e., any type of discipline)
Identifying Models Using
Kendall Notation
 So a single channel model with Poisson arrivals
and exponential service times would be
represented by
M/M/1
 If a second channel is added we would have
M/M/2
 A three channel system with Poisson arrivals and
constant service time would be
M/D/3
 A four channel system with Poisson arrivals and
normally distributed service times would be
M/G/4
Single-Channel Model, Poisson
Arrivals, Exponential Service
Times (M/M/1)
Assumptions of the model
 Arrivals are served on a FIFO basis
 No balking or reneging
 Arrivals are independent of each other but rate is
constant over time
 Arrivals follow a Poisson distribution
 Service times are variable and independent but the
average is known
 Service times follow an exponential distribution
 Average service rate is greater than the average
arrival rate
Single-Channel Model, Poisson
Arrivals, Exponential Service
Times (M/M/1)
 When a service outlet opens initially there may
be less activity, this period is known as transient
period
 The transient period ends when the system
reaches the normal or steady-state operation
 Queuing models describe the steady-state
operating characteristics of a waiting line
 When these assumptions are met, we can
develop a series of equations that define the
queue’s operating characteristics
 The arrival rate and the service rate must be for
the same time period
Single-Channel Model, Poisson
Arrivals, Exponential Service
Times (M/M/1)

 The following formulas can be used to


compute steady-state operating
characteristics for a single-channel
waiting line with Poisson arrival and
exponential service times, where
 State of system=No of customers in
queuing system
 Queue length= No of customers waiting
for service to begin=state of system
minus no of customers being served
Single-Channel Model,
Poisson Arrivals, Exponential
Service Times (M/M/1)
 N(t)=No of customers in the queuing system
at time t (t≥0)
 Pn(t)=Prob of exactly n customers in queuing
system at time t, given number at time 0
 m = No of servers (parallel service channels)
in queuing system (=1 in M/M/1 system)
 λn=Mean arrival rate of new customers when n
customers are in the system
 αn=Mean service rate for overall system when
n customers are in the system
Single-Channel Model, Poisson
Arrivals, Exponential Service
Times (M/M/1)

 = mean number of arrivals per time period


 α= mean number of people or items served per time
period
 L=Expected no.

of customers in queueing system
L  nP
n 0
n

Lq   ( n  1) P
n 1
n
Little’s Flow Equation

L  W
and
Lq  Wq
W = Wq + 1/α
Single-Channel Model, Poisson
Arrivals, Exponential Service Times
(M/M/1)
1. The average time a customer spends in the
system, W W  1
 

2. The average number of customers or units in the system,


L


L
 
3. The average number of customers in the
queue, Lq
2
Lq 
 (   )
Single-Channel Model, Poisson
Arrivals, Exponential Service Times
(M/M/1)
4. The average time a customer spends waiting in
the queue, Wq

Wq 
 (   )

5. The utilization factor for the system, , the


probability the service facility is being used




Single-Channel Model, Poisson
Arrivals, Exponential Service Times
(M/M/1)
6. The percent idle time, P0, the probability no
one is in the system

P0  1 


Pw   An arriving customer has to wait

7. The probability that the number of customers
in the system is greater than k, Pn>k

k 1

Pn k  
 
Case: Arnold’s Muffler Shop

 Arnold’s mechanic Reid Blank, is able to install new


muffler at an average rate of 3 per hour, or about 1
every twenty minutes.
 A muffler (or silencer in British English) is a device
for reducing the amount of noise emitted by
the exhaust of an internal combustion engine.
 Customers requiring this service arrive at the shop on
an average 2 per hour.
 Larry Arnold, the shop owner is a professional
Entrepreneur and is aware of Queuing models. He
understands that his system meets all the seven
conditions of single-channel queuing model. He
proceeds to compute the operating characteristics of
his system.
Case : Arnold’s Muffler Shop

 Customers arrive at a rate of 2 per hour


 Arnold’s mechanic can install mufflers at a rate of 3
per hour
 = 2 cars arriving per hour
α = 3 cars serviced per hour

 2 2  2 cars in the system on the average


L  
  3 2 1
 1 hour that an average car spends in the
1 1
W  system
  3 2
Case: Arnold’s Muffler Shop

Lq 
2

22

4
 (   ) 3(3  2) 3(1)
 1.33 cars waiting in line
on the average

Wq 
 2
 hour
 (   ) 3
 40 minutes average
waiting time per car
in the Q

 2
  0.67
 3
 percentage of time
mechanic is busy
Case: Arnold’s Muffler
Shop

P0  1 


2
 1   0.33
3
 probability that there are 0
cars in the system

 Pw=Probability that an arriving customer has to wait for


service=1-0.3333=0.6667
Case: Arnold’s Muffler Shop
 Probability of more than k cars in the system

k Pn>k = (2/3)k+1

0 0.667 Note that this is equal to 1 – P0 = 1 – 0.33 = 0.667


1 0.444
2 0.296
3 0.198 Implies that there is a 19.8% chance that more
than 3 cars are in the system
4 0.132
5 0.088
6 0.058
7 0.039
Case: Arnolds Muffler Shop
: M/M/1 Results
Interpretation

 Customers wait an average of 1 hour before beginning to start the


service, which appears a long wait
 Average numbers of customers waiting in the Q is more than 1
and that 66.67% of arriving customers have to wait for service
are indicators that something should be done to make the waiting
line customer friendly
 There is a 19.8% chance that more than 3 cars in the system are
waiting for service at one time
 These appears to be unsatisfactory and Arnold has to do
something
Case: Arnold’s Muffler Shop

Introducing costs into the model


 Arnold wants to do an economic analysis of the queuing system
and determine the waiting cost and service cost
 The total service cost is

Total service cost (Number of channels)


= x (Cost per channel)

Total service cost


= mCs

where
m = number of channels
Cs = service cost of each channel
Case : Arnold’s Muffler Shop
 Waiting cost when the cost is based on time in
the system
Total waiting cost (Total time spent waiting by all arrivals) x
= (Cost of waiting)

(Number of arrivals) x (Average wait per


= arrival)Cw

Total waiting cost


= ( W)Cw

 If waiting time cost is based on time in the queue

Total waiting cost


= ( Wq)Cw
Case : Arnold’s Muffler Shop

 So the total cost of the queuing system when


based on time in the system is
Total cost = Total service cost + Total waiting cost
Total cost = mCs + WCw

 And when based on time in the queue

Total cost = mCs + WqCw


Case : Arnold’s Muffler Shop
 Arnold estimates the cost of customer waiting
time in line is $10 per hour
Total daily waiting
cost = (8 hours per day) WqCw
= (8)(2)(2/3)($10) = $106.67

 Arnold has identified the mechanics wage $7 per hour as the service
cost

Total daily service


cost = (8 hours per day)mCs
= (8)(1)($7) = $56

 So the total cost of the system is


Total daily cost of the
queuing system = $106.67 + $56 = $162.67
Case : Arnold’s Muffler Shop

 Arnold is thinking about hiring a different mechanic


who can install mufflers at a faster rate
 The new operating characteristics would be
 = 2 cars arriving per hour
α = 4 cars serviced per hour

L


2

2  1 car in the system on the
  42 2
average

W
1

1  1/2 hour that an average car spends in
  42 the system
Case : Arnold’s Muffler Shop

2 22 4  1/2 cars waiting in line on the


Lq    average
 (   ) 4(4  2) 8(1)

Wq 
 1
 hour  15 minutes average waiting time
 (   ) 4 per car


 2
  0.5  percentage of time mechanic is busy
 4

P0  1 
 2
 1   0.5  probability that there are 0 cars in
 4 the system
Case : Arnold’s Muffler Shop

 Probability of more than k cars in the system

k Pn>k = (2/4)k+1

0 0.500
1 0.250
2 0.125
3 0.062

4 0.031
5 0.016
6 0.008
7 0.004
Case : Arnold’s Muffler Shop
 The customer waiting cost is the same $10 per
hour
Total daily waiting
cost = (8 hours per day) WqCw
= (8)(2)(1/4)($10) = $40.00

 The new mechanic is more expensive at $9 per hour

Total daily service


cost = (8 hours per day)mCs
= (8)(1)($9) = $72

 So the total cost of the system is


Total daily cost of the
queuing system = $40 + $72 = $112
Case : Arnold’s Muffler Shop

 The total time spent waiting for the 16


customers per day was formerly
(16 cars per day) x (2/3 hour per car) = 10.67
hours
 It is now
(16 cars per day) x (1/4 hour per car) = 4 hours
 The total system costs are less with the new
mechanic resulting in a $50 per day savings
$162 – $112 = $50
Enhancing the Queuing
Environment

Reducing waiting time is not the


only way to reduce waiting cost
Reducing waiting cost (Cw) will also
reduce total waiting cost
This might be less expensive to
achieve than reducing either W or Wq
Multichannel Model, Poisson
Arrivals, Exponential Service
Times (M/M/m)

Assumptions of the model


 Arrivals are served on a FIFO basis
 No balking or reneging
 Arrivals are independent of each other but rate is constant over
time
 Arrivals follow a Poisson distribution
 Service times are variable and independent but the average is
known
 Service times follow a negative exponential distribution
 Average service rate is greater than the average arrival rate
Multichannel Model, Poisson
Arrivals, Exponential Service
Times (M/M/m)
 Equations for the multichannel queuing model
 We let
m = number of channels open
 = average arrival rate
α= average service rate at each channel

1. The probability that there are zero customers in the system

1
P0  for m  
nm1 1    n
 1    mm

     
 n0 n!     m!    m  
Multichannel Model, Poisson
Arrivals, Exponential Service
Times (M/M/m)
2. The average number of customer in the system

 ( /  )m 
L P
(m  1)!(m   ) 2 0

3. The average time a unit spends in the waiting line or being served, in
the system

 ( /  ) m 1 L
W  P0  
(m  1)!(m   ) 2
 
Multichannel Model, Poisson
Arrivals, Exponential Service
Times (M/M/m)
4. The average number of customers or units in
line waiting for service

Lq  L 

5. The average number of customers or units in line waiting for service

1 Lq
Wq  W  
 

6. The average number of customers or units in line waiting for service



m
Arnold’s Muffler Shop
Revisited
 Arnold wants to investigate opening a second
garage bay
 He would hire a second worker who works at the
same rate as his first worker
 The customer arrival rate remains the same

1
P0  for m  
nm1 1   n  1 
m
m
     
 n0 n!    
  m!    m  

P0  0.5
 probability of 0 cars in the system
Arnold’s Muffler Shop
Revisited
 Average number of cars in the system

 ( /  )m 
L P   0.75
(m  1)!(m   ) 2 0

 Average time a car spends in the system

L 3
W  hours  22 1 minutes
 8 2
Arnold’s Muffler Shop
Revisited
 Average number of cars in the queue

 3 2 1
Lq  L      0.083
 4 3 12

 Average time a car spends in the queue

1 Lq 0.083
Wq  W     0.0415 hour  2 1 minutes
  2 2
Arnold’s Muffler Shop
Revisited
 Effect of service level on Arnold’s operating
characteristics
LEVEL OF SERVICE
ONE TWO ONE FAST
OPERATING MECHANIC MECHANICS MECHANIC
CHARACTERISTIC α= 3 α= 3 FOR BOTH α=4
Probability that the system
0.33 0.50 0.50
is empty (P0)
Average number of cars in
2 cars 0.75 cars 1 car
the system (L)
Average time spent in the
60 minutes 22.5 minutes 30 minutes
system (W)
Average number of cars in
1.33 cars 0.083 car 0.50 car
the queue (Lq)
Average time spent in the
40 minutes 2.5 minutes 15 minutes
queue (Wq)
Table 2
Arnold’s Muffler Shop
Revisited
 Adding the second service bay reduces the waiting
time in line but will increase the service cost as a
second mechanic needs to be hired
Total daily waiting cost = (8 hours per day) WqCw
= (8)(2)(0.0415)($10) = $6.64

Total daily service cost = (8 hours per day)mCs


= (8)(2)($7) = $112
 So the total cost of the system is

Total system cost = $6.64 + $112 = $118.64

 The fast mechanic is the cheapest option


More Complex Queuing Models
and the Use of Simulation
 In the real world there are often variations
from basic queuing models
 Computer simulation can be used to solve
these more complex problems
 Simulation allows the analysis of
controllable factors
 Simulation should be used when standard
queuing models provide only a poor
approximation of the actual service
system
Simulation of a Queuing
Problem
Simulation of a Queuing Problem
 Modeling waiting lines is an important application
of simulation
 The assumptions of queuing models are quite
restrictive
 Sometimes simulation is the only approach that fits
 In a Port, fully loaded container ships arrive at
night for unloading
 The number of ships per night varies from 0 - 5
 The number of ships vary from day to day
Port of New Orleans

 In this example, arrivals do not follow a Poisson


distribution and unloading rates are not
exponential or constant
 The supervisor has information which can be used
to create a probability distribution for the daily
unloading rate
 Barges are unloaded first-in, first-out
 Barges must wait for unloading which is expensive
 The dock superintendent wants to do a simulation
study to enable him to make better staffing
decisions
Port of New Orleans

 Overnight ship arrival rates and random


number intervals

NUMBER OF CUMULATIVE RANDOM


ARRIVALS PROBABILITY PROBABILITY NUMBER INTERVAL
0 0.13 0.13 01 to 13
1 0.17 0.30 14 to 30
2 0.15 0.45 31 to 45
3 0.25 0.70 46 to 70
4 0.20 0.90 71 to 90
5 0.10 1.00 91 to 00

Table 3
Port of New Orleans

 Unloading rates and random number intervals

DAILY UNLOADING CUMULATIVE RANDOM


RATE PROBABILITY PROBABILITY NUMBER INTERVAL
1 0.05 0.05 01 to 05
2 0.15 0.20 06 to 20
3 0.50 0.70 21 to 70
4 0.20 0.90 71 to 90
5 0.10 1.00 91 to 00
1.00

Table 4
Port of New Orleans

 <Pl refer to class discussion>


Thank You

You might also like