roorkee college of engineeringrceroorkee.in/pdf/pdfo/tme601.pdf · roorkee college of engineering,...

27
ROORKEE COLLEGE OF ENGINEERING OPERATIONS RESEARCH LECTURE NOTES RAHUL BHARTI Assistant Professor RCE, ROORKEE

Upload: others

Post on 16-Mar-2020

8 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: ROORKEE COLLEGE OF ENGINEERINGrceroorkee.in/pdf/pdfo/TME601.pdf · ROORKEE COLLEGE OF ENGINEERING, ROORKEE Introduction The mathematical models which tells to optimise (minimize or

ROORKEE COLLEGE OF ENGINEERING

OPERATIONS RESEARCH

LECTURE NOTES

RAHUL BHARTI

Assistant Professor RCE, ROORKEE

Page 2: ROORKEE COLLEGE OF ENGINEERINGrceroorkee.in/pdf/pdfo/TME601.pdf · ROORKEE COLLEGE OF ENGINEERING, ROORKEE Introduction The mathematical models which tells to optimise (minimize or

ROORKEE COLLEGE OF ENGINEERING, ROORKEE

Introduction

The mathematical models which tells to optimise (minimize or maximise) the

objective function Z subject to certain condition on the variables is called a Linear

programming problem (LPP).

During World War II, the military managements in the U.K and the USA engaged a

team of scientists to study the limited military resources and form a plan of action or

programme to utilise them in the most effective manner. This was done under the name

'Operation Research' (OR) because the team was dealing with research on military

operation.

Linear Programming Problems (LPP)

The standard form of the linear programming problem is used to develop the

procedure for solving a general programming problem.

A general LPP is of the form

Max (or min) Z = c1x1 + c2x2 + … +cnxn

x1, x2, ....xn are called decision variable.

Application Areas of Linear Programming

The Application Areas of Linear Programming are:

1. Transportation Problem

2. Military Applications

3. Operation of System Of Dams

4. Personnel Assignment Problem

5. Other Applications: (a). manufacturing plants, (b). distribution centres, (c).

production management and manpower management.

Basic Concept of Linear Programming Problem

Objective Function: The Objective Function is a linear function of variables which is

to be optimised i.e., maximised or minimised. e.g., profit function, cost function etc. The

objective function may be expressed as a linear expression.

Page 3: ROORKEE COLLEGE OF ENGINEERINGrceroorkee.in/pdf/pdfo/TME601.pdf · ROORKEE COLLEGE OF ENGINEERING, ROORKEE Introduction The mathematical models which tells to optimise (minimize or

ROORKEE COLLEGE OF ENGINEERING, ROORKEE

Constraints: A linear equation represents a straight line. Limited time, labour etc.

may be expressed as linear inequations or equations and are called constraints.

Optimisation: A decision which is considered the best one, taking into consideration

all the circumstances is called an optimal decision. The process of getting the best

possible outcome is called optimisation.

Solution of a LPP: A set of values of the variables x1, x2,….xn which satisfy all the

constraints is called the solution of the LPP..

Feasible Solution: A set of values of the variables x1, x2, x3,….,xn which satisfy all

the constraints and also the non-negativity conditions is called the feasible solution of the

LPP.

Optimal Solution: The feasible solution, which optimises (i.e., maximizes or

minimizes as the case may be) the objective function is called the optimal solution.

Important terms Convex Region and Non-convex Sets.

Mathematical Formulation of Linear Programming

Problems

There are mainly four steps in the mathematical formulation of linear programming

problem as a mathematical model. We will discuss formulation of those problems which

involve only two variables.

1. Identify the decision variables and assign symbols x and y to them. These decision

variables are those quantities whose values we wish to determine.

2. Identify the set of constraints and express them as linear equations/inequations in

terms of the decision variables. These constraints are the given conditions.

3. Identify the objective function and express it as a linear function of decision

variables. It might take the form of maximizing profit or production or minimizing cost.

4. Add the non-negativity restrictions on the decision variables, as in the physical

problems, negative values of decision variables have no valid interpretation.

Advantages of Linear Programming

i. The linear programming technique helps to make the best possible use of available

productive resources (such as time, labour, machines etc.)

ii. In a production process, bottle necks may occur. For example, in a factory some

machines may be in great demand while others may lie idle for some time. A significant

advantage of linear programming is highlighting of such bottle necks.

Page 4: ROORKEE COLLEGE OF ENGINEERINGrceroorkee.in/pdf/pdfo/TME601.pdf · ROORKEE COLLEGE OF ENGINEERING, ROORKEE Introduction The mathematical models which tells to optimise (minimize or

ROORKEE COLLEGE OF ENGINEERING, ROORKEE

Limitations of Linear Programming

(a). Linear programming is applicable only to problems where the constraints and

objective function are linear i.e., where they can be expressed as equations which

represent straight lines. In real life situations, when constraints or objective functions are

not linear, this technique cannot be used.

(b). Factors such as uncertainty, weather conditions etc. are not taken into

consideration.

Graphical Method of Solution of a Linear

Programming Problem

The graphical method is applicable to solve the LPP involving two decision variables

x1, and x2, we usually take these decision variables as x, y instead of x1, x2. To solve an

LPP , the graphical method includes two major steps.

a) The determination of the solution space that defines the feasible solution (Note that

the set of values of the variable x1, x2, x3,....xn which satisfy all the constraints and also

the non-negative conditions is called the feasible solution of the LPP).

b) The determination of the optimal solution from the feasible region.

There are two techniques to find the optimal solution of an LPP. Corner Point Method

and ISO- PROFIT (OR ISO-COST).

The Objective Function is a linear function of variables which is to be optimised i.e.,

maximised or minimised. e.g., profit function, cost function etc. The objective function

may be expressed as a linear expression.

Constraints

A linear equation represents a straight line. Limited time, labour etc. may be expressed as

linear inequations or equations and are called constraints.

e.g., If 2 tables and 3 chairs are to be made in not more than 10 hours and 1 table is made

in x hours while 1 chair is made in y hours, then this constraint may be written as

A linear equation is also called a linear constraint as it restricts the freedom of choice of

the values of x and y.

Page 5: ROORKEE COLLEGE OF ENGINEERINGrceroorkee.in/pdf/pdfo/TME601.pdf · ROORKEE COLLEGE OF ENGINEERING, ROORKEE Introduction The mathematical models which tells to optimise (minimize or

ROORKEE COLLEGE OF ENGINEERING, ROORKEE

Optimisation

A decision which is considered the best one, taking into consideration all the

circumstances is called an optimal decision. The process of getting the best possible

outcome is called optimisation. The best profit is the maximum profit. Hence optizmizing

the profit would mean maximising the profit. Optimising the cost would mean

minimising the cost as this would be most favourable.

Solution of a LPP

A set of values of the variables x1, x2,….xn which satisfy all the constraints is called the

solution of the LPP.

Feasible Solution

A set of values of the variables x1, x2, x3,….,xn which satisfy all the constraints and also

the non-negativity conditions is called the feasible solution of the LPP.

Optimal Solution

The feasible solution, which optimises (i.e., maximizes or minimizes as the case may be)

the objective function is called the optimal solution.

ntroduction to Linear Programming Problems:

Linear Programming is the process to find the extreme values (maximum and minimum

values) of a function for a region defined by inequalities. Linear programming (LP) is a

mathematical method to determine a way to achieve the best outcome (such as maximum

profit or lowest cost) in a given mathematical model for some list of requirements

represented as linear equations.

The problem of maximizing or minimizing linear constraints from linear function subject

is defined as the linear programming problem. These linear constraints are mayor may

not be equalities. That is it may either equality or non equality.

Uses of Linear Programming:

More formally, uses of linear programming are the technique, in which the optimization

of a linear objective functions, subject to linear equality and linear inequality constraints.

Given a polytope and the real-valued affine function defined on this polytope, a linear

programming method will find a point on the polytope where this function has the

smallest (or largest) value if such point exists, by searching through the polytope vertices.

Page 6: ROORKEE COLLEGE OF ENGINEERINGrceroorkee.in/pdf/pdfo/TME601.pdf · ROORKEE COLLEGE OF ENGINEERING, ROORKEE Introduction The mathematical models which tells to optimise (minimize or

ROORKEE COLLEGE OF ENGINEERING, ROORKEE

Uses of Linear programming may be applied to various fields of study, which is a major

uses of linear programming. It is used most extensively in business and economics

studies, but can also be utilized for some engineering problems. An industry that uses

linear programming models are transportation, energy, telecommunications, and

manufacturing. It has proved useful in modeling diverse type of problems in planning,

routing, scheduling, assignment, and design. Linear programming is a considerable field

for uses of optimization for several reasons. Many practical problems in operations

research may be expressed as linear programming problems.

Cases of Linear Programming:

Certain special cases of linear programming are network flow problems and

multicommodity flow problems are considered important enough to have generated much

research on specialized algorithms for their solution. A certain number of algorithms for

other types of optimization problems work by solving LP problems as sub-problems.

Historically, ideas from linear programming had inspired many of the central concepts of

optimization theory, such as duality, decomposition, and the importance of convexity and

its generalizations. Likewise, linear programming is heavily used under microeconomics

and company management, such as planning, production, transportation, technology and

other issues.

Though the modern management issues are ever changing, most companies would like to

maximize profits or minimize costs with limited resources. Therefore, many issues may

boil down to linear programming problems.

How to Solve Linear Programming Problem:

Structure of linear programming problem:

The linear programming problem generally consists of three components:

Activities of variables and their relationships.

Objective functions

The constraints.

Solving a Linear programming Problem:

How to find the solution set is called the feasible region for a set of linear inequalities.

These concepts will be used for solving Linear programming Problem.

A programming problem consists of Business problem where one faces several

limitations causing restrictions. One has to remain within the frame work of these

restrictions and optimize his goals. The strategies of doing so successfully, is called

solving a programming problem.

Page 7: ROORKEE COLLEGE OF ENGINEERINGrceroorkee.in/pdf/pdfo/TME601.pdf · ROORKEE COLLEGE OF ENGINEERING, ROORKEE Introduction The mathematical models which tells to optimise (minimize or

ROORKEE COLLEGE OF ENGINEERING, ROORKEE

If the restrictions, when expressed mathematically are in the form of linear inequalities,

the programming problem is called a Linear programming Problem. These restrictions

are also called constraints.

If the constraints do not have more than two variables the L.P.P Can be solved

graphically.

The goals when written mathematically are called Objective functions.

Solving a Linear programming problem using Graphical method:

This is done in two stages:

1. Find the solution set.

2. Get the optimum solution from this set.

Solve linear programming problem Step 1:

Write the restrictions or the constraints mathematically and find their solution set.

All possible solutions of the problem represent the solution set. The Feasible region is

defined as the graphical representations of the constraints. This method is known as the

Graphical representations of the constraints. Then the objective function is to optimize. It

means to find that solution from the solution set that gives the optimum value of the

objective function.

The optimum value of the objective function will be the unique, but there can be many

solutions which optimize the objective function.

Solve linear programming problem Step 2:

Find the optimum solution. That is find the value/ values of the variables which optimize

the objective function.

The optimum solution is found by using a theorem known as the Convex polygon

Theorem.

Applications of Linear programming problem:

The Diet problem

Portfolio optimization

Crew scheduling

Manufacturing and transportation

Telecommunication

Travelling sales man problem

Page 8: ROORKEE COLLEGE OF ENGINEERINGrceroorkee.in/pdf/pdfo/TME601.pdf · ROORKEE COLLEGE OF ENGINEERING, ROORKEE Introduction The mathematical models which tells to optimise (minimize or

ROORKEE COLLEGE OF ENGINEERING, ROORKEE

There are mainly four steps in the mathematical formulation of linear programming

problem as a mathematical model. We will discuss formulation of those problems which

involve only two variables.

Identify the decision variables and assign symbols x and y to them. These

decision variables are those quantities whose values we wish to determine.

Identify the set of constraints and express them as linear equations/inequations in

terms of the decision variables. These constraints are the given conditions.

Identify the objective function and express it as a linear function of decision

variables. It might take the form of maximizing profit or production or

minimizing cost.

Add the non-negativity restrictions on the decision variables, as in the physical

problems, negative values of decision variables have no valid interpretation.

There are many real life situations where an LPP may be formulated. The following

examples will help to explain the mathematical formulation of an LPP.

01. A diet is to contain at least 4000 units of carbohydrates, 500 units of fat and 300 units

of protein. Two foods A and B are available. Food A costs 2 dollars per unit and food B

costs 4 dollars per unit. A unit of food A contains 10 units of carbohydrates, 20 units of

fat and 15 units of protein. A unit of food B contains 25 units of carbohydrates, 10 units

of fat and 20 units of protein. Formulate the problem as an LPP so as to find the

minimum cost for a diet that consists of a mixture of these two foods and also meets the

minimum requirements.

Suggested answer:

The above information can be represented as

Let the diet contain x units of A and y units of B.

\ Total cost = 2x + 4y

The LPP formulated for the given diet problem is

Page 9: ROORKEE COLLEGE OF ENGINEERINGrceroorkee.in/pdf/pdfo/TME601.pdf · ROORKEE COLLEGE OF ENGINEERING, ROORKEE Introduction The mathematical models which tells to optimise (minimize or

ROORKEE COLLEGE OF ENGINEERING, ROORKEE

Minimize Z = 2x + 4y

subject to the constraints

02. In the production of 2 types of toys, a factory uses 3 machines A, B and C. The time

required to produce the first type of toy is 6 hours, 8 hours and 12 hours in machines A, B

and C respectively. The time required to make the second type of toy is 8 hours, 4 hours

and 4 hours in machines A, B and C respectively. The maximum available time (in hours)

for the machines A, B, C are 380, 300 and 404 respectively. The profit on the first type of

toy is 5 dollars while that on the second type of toy is 3 dollars. Find the number of toys

of each type that should be produced to get maximum profit.

Suggested answer:

Mathematical Formulation

The data given in the problem can be represented in a table as follows.

Let x = number of toys of type-I to be produced

y = number of toys of the type - II to be produced

\ Total profit = 5x + 3y

The LPP formulated for the given problem is:

Maximise Z = 5x + 3y subject to the constraints

Page 10: ROORKEE COLLEGE OF ENGINEERINGrceroorkee.in/pdf/pdfo/TME601.pdf · ROORKEE COLLEGE OF ENGINEERING, ROORKEE Introduction The mathematical models which tells to optimise (minimize or

ROORKEE COLLEGE OF ENGINEERING, ROORKEE

So far we have learnt how to construct a mathematical model for a linear programming

problem. If we can find the values of the decision variables x1, x2, x3, ..... xn, which can

optimise (maximize or minimize) the objective function Z, then we say that these values

of xi are the optimal solution of the LPP.

The graphical method is applicable to solve the LPP involving two decision variables x1,

and x2, we usually take these decision variables as x, y instead of x1, x2. To solve an LPP

, the graphical method includes two major steps.

a) The determination of the solution space that defines the feasible solution (Note that the

set of values of the variable x1, x2, x3,....xn which satisfy all the constraints and also the

non-negative conditions is called the feasible solution of the LPP)

b) The determination of the optimal solution from the feasible region.

a) To determine the feasible solution of an LPP, we have the following steps.

Step 1:

Since the two decision variable x and y are non-negative, consider only the first quadrant

of xy- plane

Draw the line ax + by = c ...(1)

For each constraint,

the line (1) divides the first quadrant in to two regions say R1 and R2, suppose (x1, 0) is a

point in R1. If this point satisfies the in equation ax + by £ c or (³ c), then shade the

region R1. If (x1, 0) does not satisfy the inequation, shade the region R2.

Step 3:

Corresponding to each constant, we obtain a shaded region. The intersection of all these

shaded regions is the feasible region or feasible solution of the LPP.

Page 11: ROORKEE COLLEGE OF ENGINEERINGrceroorkee.in/pdf/pdfo/TME601.pdf · ROORKEE COLLEGE OF ENGINEERING, ROORKEE Introduction The mathematical models which tells to optimise (minimize or

ROORKEE COLLEGE OF ENGINEERING, ROORKEE

Let us find the feasible solution for the problem of a decorative item dealer whose LPP is

to maximise profit function.

Z = 50x + 18y ...(1)

Subject to the constraints

Step 1:

Since x 0, y 0, we consider only the first quadrant of the xy - plane

Step 2:

We draw straight lines for the equation

2x+ y = 100 ...(2)

x + y = 80

To determine two points on the straight line 2x + y = 100

Put y = 0, 2x = 100

x = 50

(50, 0) is a point on the line (2)

put x = 0 in (2), y =100

(0, 100) is the other point on the line (2)

Plotting these two points on the graph paper draw the line which represent the line 2x + y

=100.

Page 12: ROORKEE COLLEGE OF ENGINEERINGrceroorkee.in/pdf/pdfo/TME601.pdf · ROORKEE COLLEGE OF ENGINEERING, ROORKEE Introduction The mathematical models which tells to optimise (minimize or

ROORKEE COLLEGE OF ENGINEERING, ROORKEE

This line divides the 1st quadrant into two regions, say R1 and R2. Choose a point say (1,

0) in R1. (1, 0) satisfy the inequation 2x + y 100. Therefore R1 is the required region for

the constraint 2x + y 100.

Similarly draw the straight line x + y = 80 by joining the point (0, 80) and (80, 0). Find

the required region say R1', for the constraint x + y 80.

The intersection of both the region R1 and R1' is the feasible solution of the LPP.

Therefore every point in the shaded region OABC is a feasible solution of the LPP, since

this point satisfies all the constraints including the non-negative constraints.

b) There are two techniques to find the optimal solution of an LPP.

Corner Point Method

The optimal solution to a LPP, if it exists, occurs at the corners of the feasible region.

The method includes the following steps

Step 1:

Find the feasible region of the LLP.

Step 2:

Find the co-ordinates of each vertex of the feasible region.

Page 13: ROORKEE COLLEGE OF ENGINEERINGrceroorkee.in/pdf/pdfo/TME601.pdf · ROORKEE COLLEGE OF ENGINEERING, ROORKEE Introduction The mathematical models which tells to optimise (minimize or

ROORKEE COLLEGE OF ENGINEERING, ROORKEE

These co-ordinates can be obtained from the graph or by solving the equation of the lines.

Step 3:

At each vertex (corner point) compute the value of the objective function.

Step 4:

Identify the corner point at which the value of the objective function is maximum (or

minimum depending on the LPP)

The co-ordinates of this vertex is the optimal solution and the value of Z is the optimal

value

Example:

Find the optimal solution in the above problem of decorative item dealer whose objective

function is Z = 50x + 18y.

In the graph, the corners of the feasible region are

O (0, 0), A (0, 80), B(20, 60), C(50, 0)

At (0, 0) Z = 0

At (0, 80) Z = 50 (0) + 18(80)

= Rs. 1440

At (20, 60), Z = 50 (20) +18 (60)

= 1000 + 1080 = Rs.2080

At (50, 0) Z = 50 (50 )+ 18 (0)

= Rs. 2500.

Since our object is to maximise Z and Z has maximum at (50, 0) the optimal solution is x

= 50 and y = 0.

The optimal value is Rs. 2500.

If an LPP has many constraints, then it may be long and tedious to find all the corners of

the feasible region. There is another alternate and more general method to find the

optimal solution of an LPP, known as 'ISO profit or ISO cost method'

Page 14: ROORKEE COLLEGE OF ENGINEERINGrceroorkee.in/pdf/pdfo/TME601.pdf · ROORKEE COLLEGE OF ENGINEERING, ROORKEE Introduction The mathematical models which tells to optimise (minimize or

ROORKEE COLLEGE OF ENGINEERING, ROORKEE

ISO- PROFIT (OR ISO-COST)

Method of Solving Linear Programming Problems

Suppose the LPP is to

Optimize Z = ax + by subject to the constraints

This method of optimization involves the following method.

Step 1:

Draw the half planes of all the constraints

Step 2:

Shade the intersection of all the half planes which is the feasible region.

Step 3:

Since the objective function is Z = ax + by, draw a dotted line for the equation ax + by =

k, where k is any constant. Sometimes it is convenient to take k as the LCM of a and b.

Step 4:

To maximise Z draw a line parallel to ax + by = k and farthest from the origin. This line

should contain at least one point of the feasible region. Find the coordinates of this point

by solving the equations of the lines on which it lies.

To minimise Z draw a line parallel to ax + by = k and nearest to the origin. This line

should contain at least one point of the feasible region. Find the co-ordinates of this point

by solving the equation of the line on which it lies.

Step 5:

If (x1, y1) is the point found in step 4, then

Page 15: ROORKEE COLLEGE OF ENGINEERINGrceroorkee.in/pdf/pdfo/TME601.pdf · ROORKEE COLLEGE OF ENGINEERING, ROORKEE Introduction The mathematical models which tells to optimise (minimize or

ROORKEE COLLEGE OF ENGINEERING, ROORKEE

x = x1, y = y1, is the optimal solution of the LPP and

Z = ax1 + by1 is the optimal value.

The above method of solving an LPP is more clear with the following example.

Example:

Solve the following LPP graphically using ISO- profit method.

maximize Z =100 + 100y.

Subject to the constraints

Suggested answer:

since x 0, y 0, consider only the first quadrant of the plane graph the following straight

lines on a graph paper

10x + 5y = 80 or 2x+y =16

6x + 6y = 66 or x+y =11

4x+ 8y = 24 or x+ 2y = 6

5x + 6y = 90

Identify all the half planes of the constraints. The intersection of all these half planes is

the feasible region as shown in the figure.

Page 16: ROORKEE COLLEGE OF ENGINEERINGrceroorkee.in/pdf/pdfo/TME601.pdf · ROORKEE COLLEGE OF ENGINEERING, ROORKEE Introduction The mathematical models which tells to optimise (minimize or

ROORKEE COLLEGE OF ENGINEERING, ROORKEE

Give a constant value 600 to Z in the objective function, then we have an equation of the

line

120x + 100y = 600 ...(1)

or 6x + 5y = 30 (Dividing both sides by 20)

P1Q1 is the line corresponding to the equation 6x + 5y = 30. We give a constant 1200 to

Z, then the P2Q2 represents the line.

120x + 100y = 1200

6x + 5y = 60

P2Q2 is a line parallel to P1Q1 and has one point 'M' which belongs to feasible region and

farthest from the origin. If we take any line P3Q3 parallel to P2Q2 away from the origin, it

does not touch any point of the feasible region.

The co-ordinates of the point M can be obtained by solving the equation 2x + y = 16

x + y =11 which give

x = 5 and y = 6

The optimal solution for the objective function is x = 5 and y = 6

Page 17: ROORKEE COLLEGE OF ENGINEERINGrceroorkee.in/pdf/pdfo/TME601.pdf · ROORKEE COLLEGE OF ENGINEERING, ROORKEE Introduction The mathematical models which tells to optimise (minimize or

ROORKEE COLLEGE OF ENGINEERING, ROORKEE

The optimal value of Z

120 (5) + 100 (6) = 600 + 600

= 1200

Problems:

Example Problem 1: Do the calculation to find graphically the

Minimum value of the objective function. Z = – 50x + 20y --- (1)

Subject to the constraints:

2x – y ≥ – 5 --- (2)

3x + y ≥ 3 ------ (3)

2x – 3y ≤ 12 --- (4)

x ≥ 0, y ≥ 0 ---- (5)

Solution:

First we have to draw the graph for the given data. The feasible region (shaded) is shown

in the figure. Now we can calculate Z at the corner points.

Page 18: ROORKEE COLLEGE OF ENGINEERINGrceroorkee.in/pdf/pdfo/TME601.pdf · ROORKEE COLLEGE OF ENGINEERING, ROORKEE Introduction The mathematical models which tells to optimise (minimize or

ROORKEE COLLEGE OF ENGINEERING, ROORKEE

From the above figure we can see that - 300 is the smallest value of Z at the corner point

(6, 0). Therefore minimum value of Z is – 300

Minimum value of Z is – 300.

Example problem 2 : Solve the following linear programming problem graphically:

Maximize Z = 4x + y ----- (1)

Subject to the constraints:

x + y ≤ 50 --- (2)

3x + y ≤ 90 --- (3)

x ≥ 0, y ≥ 0 --- (4)

Solution:

The shaded region in figure is the feasible region determined by the system of constraints

(2) to (4). We observe that the feasible region OABC is bounded. So, we now use Corner

Point Method to determine the maximum value of Z. The coordinates of the corner points

O, A, B and C are (0, 0), (30, 0), (20, 30) and (0, 50) respectively. Now we evaluate Z at

each corner point.

Hence, maximum value of Z is 120 at the point (30, 0).

Maximum value of Z is 120 at the point (30, 0).

Page 19: ROORKEE COLLEGE OF ENGINEERINGrceroorkee.in/pdf/pdfo/TME601.pdf · ROORKEE COLLEGE OF ENGINEERING, ROORKEE Introduction The mathematical models which tells to optimise (minimize or

ROORKEE COLLEGE OF ENGINEERING, ROORKEE

Practice Problem 1: Solve the following linear programming problem graphically:

Minimize Z = 200 x + 500 y ---- (1)

Subject to the constraints:

x + 2y ≥ 10 ------ (2)

3x + 4y ≤ 24 ----- (3)

x ≥ 0, y ≥ 0 ----- (4)

Answer: The minimum value of Z is 2300 attained at the point (4, 3)

Practice Problem 2: Solve the following problem graphically: Minimize and Maximize

Z = 3x + 9y ---- (1)

Subject to the constraints: x + 3y ≤ 60 ... (2)

x + y ≥ 10 ----- (3)

x ≤ y ----- (4)

x ≥ 0, y ≥ 0 ----- (5)

Answer: The maximum value of Z on the feasible region occurs at the two corner points

C (15, 15) and D (0, 20) and it is 180 in each case.

Practice problem 3: A dietitians wishes to mix two types of foods in such a way that

vitamin contents of the mixture contain at least 8 units of vitamin A and 10 units of

vitamin C. Food ‘I’ contains 2 units/kg of vitamin A and 1 unit/kg of vitamin C. Food ‘II’

contains 1 unit/kg of vitamin A and 2 units/kg of vitamin C. It costs dollars 50 per kg to

purchase Food ‘I’ and dollars 70 per kg to purchase Food ‘II’. Can you minimize the cost

of such a mixture?

Answer: Dollars 380.

Practice problem 4: A cooperative society of farmers has 50 hectare of land to grow two

crops X and Y. The profit from crops X and Y per hectare are estimated as dollars 10,500

and dollars 9,000 respectively. To control weeds, a liquid herbicide has to be used for

crops X and Y at rates of 20 liters and 10 liters per hectare. Further, no more than 800

liters of herbicide should be used in order to protect fish and wild life using a pond which

collects drainage from this land. Can you find that how much land should be allocated to

each crop so as to maximize the total profit of the society?

Answer: Dollars 4, 95,000

Page 20: ROORKEE COLLEGE OF ENGINEERINGrceroorkee.in/pdf/pdfo/TME601.pdf · ROORKEE COLLEGE OF ENGINEERING, ROORKEE Introduction The mathematical models which tells to optimise (minimize or

ROORKEE COLLEGE OF ENGINEERING, ROORKEE

Queueing theory

Queueing theory is the mathematical study of waiting lines, or queues. The theory

enables mathematical analysis of several related processes, including arriving at the (back

of the) queue, waiting in the queue (essentially a storage process), and being served at the

front of the queue. The theory permits the derivation and calculation of several

performance measures including the average waiting time in the queue or the system, the

expected number waiting or receiving service, and the probability of encountering the

system in certain states, such as empty, full, having an available server or having to wait

a certain time to be served.

Queueing theory has applications in diverse fields including telecommunications, traffic

engineering, computing and the design of factories, shops, offices and hospitals.

Overview

The word queue comes, via French, from the Latin cauda, meaning tail. The spelling

"queueing" over "queuing" is typically encountered in the academic research field. In

fact, one of the flagship journals of the profession is named "Queueing Systems".

Queueing theory is generally considered a branch of operations research because the

results are often used when making business decisions about the resources needed to

provide service. It is applicable in a wide variety of situations that may be encountered in

business, commerce, industry, healthcare, public service and engineering. Applications

are frequently encountered in customer service situations as well as transport and

telecommunication. Queueing theory is directly applicable to intelligent transportation

systems, call centers, PABXs, networks, telecommunications, server queueing,

mainframe computer queueing of telecommunications terminals, advanced

telecommunications systems, and traffic flow.

Notation for describing the characteristics of a queueing model was first suggested by

David G. Kendall in 1953. Kendall's notation introduced an A/B/C queueing notation that

can be found in all standard modern works on queueing theory, for example, Tijms.

The A/B/C notation designates a queueing system having A as interarrival time

distribution, B as service time distribution, and C as number of servers. For example,

"G/D/1" would indicate a General (may be anything) arrival process, a Deterministic

(constant time) service process and a single server. More details on this notation are

given in the article about queueing models.

Application to telephony

The public switched telephone network (PSTN)is designed to accommodate the offered

traffic intensity with only a small loss. The performance of loss systems is quantified by

their grade of service, driven by the assumption that if sufficient capacity is not available,

Page 21: ROORKEE COLLEGE OF ENGINEERINGrceroorkee.in/pdf/pdfo/TME601.pdf · ROORKEE COLLEGE OF ENGINEERING, ROORKEE Introduction The mathematical models which tells to optimise (minimize or

ROORKEE COLLEGE OF ENGINEERING, ROORKEE

the call is refused and lost. Alternatively, overflow systems make use of alternative routes

to divert calls via different paths — even these systems have a finite traffic carrying

capacity.

However, the use of queueing in PSTNs allows the systems to queue their customers'

requests until free resources become available. This means that if traffic intensity levels

exceed available capacity, customer's calls are not lost; customers instead wait until they

can be served. This method is used in queueing customers for the next available operator.

A queueing discipline determines the manner in which the exchange handles calls from

customers. It defines the way they will be served, the order in which they are served, and

the way in which resources are divided among the customers. Here are details of four

queueing disciplines:

First in first out

This principle states that customers are served one at a time and that the customer

that has been waiting the longest is served first.

Last in first out

This principle also serves customers one at a time, however the customer with the

shortest waiting time will be served first. Also known as a stack.

Processor sharing

Customers are served equally. Network capacity is shared between customers and

they all effectively experience the same delay.

Priority

Customers with high priority are served first.

Queueing is handled by control processes within exchanges, which can be modelled

using state equations. Queueing systems use a particular form of state equations known as

a Markov chain that models the system in each state. Incoming traffic to these systems is

modelled via a Poisson distribution and is subject to Erlang’s queueing theory

assumptions viz.

Pure-chance traffic – Call arrivals and departures are random and independent

events.

Statistical equilibrium – Probabilities within the system do not change.

Full availability – All incoming traffic can be routed to any other customer within

the network.

Congestion is cleared as soon as servers are free.

Classic queueing theory involves complex calculations to determine waiting time, service

time, server utilization and other metrics that are used to measure queueing performance.

Queueing networks

Networks of queues are systems which contain an arbitrary, but finite, number m of

queues. Customers, sometimes of different classes, travel through the network and are

Page 22: ROORKEE COLLEGE OF ENGINEERINGrceroorkee.in/pdf/pdfo/TME601.pdf · ROORKEE COLLEGE OF ENGINEERING, ROORKEE Introduction The mathematical models which tells to optimise (minimize or

ROORKEE COLLEGE OF ENGINEERING, ROORKEE

served at the nodes. The state of a network can be described by a vector ,

where ki is the number of customers at queue i. In open networks, customers can join and

leave the system, whereas in closed networks the total number of customers within the

system remains fixed.

Role of Poisson process, exponential distributions

A useful queueing model represents a real-life system with sufficient accuracy and is

analytically tractable. A queueing model based on the Poisson process and its companion

exponential probability distribution often meets these two requirements. A Poisson

process models random events (such as a customer arrival, a request for action from a

web server, or the completion of the actions requested of a web server) as emanating

from a memoryless process. That is, the length of the time interval from the current time

to the occurrence of the next event does not depend upon the time of occurrence of the

last event. In the Poisson probability distribution, the observer records the number of

events that occur in a time interval of fixed length. In the (negative) exponential

probability distribution, the observer records the length of the time interval between

consecutive events. In both, the underlying physical process is memoryless.

Models based on the Poisson process often respond to inputs from the environment in a

manner that mimics the response of the system being modeled to those same inputs. The

analytically tractable models that result yield both information about the system being

modeled and the form of their solution. Even a queueing model based on the Poisson

process that does a relatively poor job of mimicking detailed system performance can be

useful. The fact that such models often give "worst-case" scenario evaluations appeals to

system designers who prefer to include a safety factor in their designs. Also, the form of

the solution of models based on the Poisson process often provides insight into the form

of the solution to a queueing problem whose detailed behavior is poorly mimicked. As a

result, queueing models are frequently modeled as Poisson processes through the use of

the exponential distribution.

Limitations of queueing theory

The assumptions of classical queueing theory may be too restrictive to be able to model

real-world situations exactly. The complexity of production lines with product-specific

characteristics cannot be handled with those models. Therefore specialized tools have

been developed to simulate, analyze, visualize and optimize time dynamic queueing line

behavior.

For example; the mathematical models often assume infinite numbers of customers,

infinite queue capacity, or no bounds on inter-arrival or service times, when it is quite

apparent that these bounds must exist in reality. Often, although the bounds do exist, they

can be safely ignored because the differences between the real-world and theory is not

statistically significant, as the probability that such boundary situations might occur is

remote compared to the expected normal situation. Furthermore, several studies show the

Page 23: ROORKEE COLLEGE OF ENGINEERINGrceroorkee.in/pdf/pdfo/TME601.pdf · ROORKEE COLLEGE OF ENGINEERING, ROORKEE Introduction The mathematical models which tells to optimise (minimize or

ROORKEE COLLEGE OF ENGINEERING, ROORKEE

robustness of queueing models outside their assumptions. In other cases the theoretical

solution may either prove intractable or insufficiently informative to be useful.

Queueing Theory Basics

We have seen that as a system gets congested, the service delay in the system increases.

A good understanding of the relationship between congestion and delay is essential for

designing effective congestion control algorithms. Queuing Theory provides all the tools

needed for this analysis. This article will focus on understanding the basics of this topic.

Communication Delays

Before we proceed further, lets understand the different components of delay in a

messaging system. The total delay experienced by messages can be classified into the

following categories:

Processing Delay This is the delay between the time of receipt of a

packet for transmission to the point of putting it into

the transmission queue.

On the receive end, it is the delay between the time

of reception of a packet in the receive queue to the

point of actual processing of the message.

This delay depends on the CPU speed and CPU load

in the system.

Queuing Delay This is the delay between the point of entry of a

packet in the transmit queue to the actual point of

transmission of the message.

This delay depends on the load on the

communication link.

Transmission Delay This is the delay between the transmission of first bit

of the packet to the transmission of the last bit.

This delay depends on the speed of the

communication link.

Propagation Delay This is the delay between the point of transmission of

the last bit of the packet to the point of reception of

last bit of the packet at the other end.

This delay depends on the physical characteristics of

the communication link.

Page 24: ROORKEE COLLEGE OF ENGINEERINGrceroorkee.in/pdf/pdfo/TME601.pdf · ROORKEE COLLEGE OF ENGINEERING, ROORKEE Introduction The mathematical models which tells to optimise (minimize or

ROORKEE COLLEGE OF ENGINEERING, ROORKEE

Retransmission Delay This is the delay that results when a packet is lost

and has to be retransmitted.

This delay depends on the error rate on the link and

the protocol used for retransmissions.

Queueing model

In queueing theory, a queueing model is used to approximate a real queueing situation or

system, so the queueing behaviour can be analysed mathematically. Queueing models

allow a number of useful steady state performance measures to be determined, including:

the average number in the queue, or the system,

the average time spent in the queue, or the system,

the statistical distribution of those numbers or times,

the probability the queue is full, or empty, and

the probability of finding the system in a particular state.

These performance measures are important as issues or problems caused by queueing

situations are often related to customer dissatisfaction with service or may be the root

cause of economic losses in a business. Analysis of the relevant queueing models allows

the cause of queueing issues to be identified and the impact of proposed changes to be

assessed.

Notation

Queuing models can be represented using Kendall's notation:

A/B/S/K/N/D

where:

A is the interarrival time distribution

B is the service time distribution

S is the number of servers

K is the system capacity

N is the calling population

D is the service discipline assumed

Page 25: ROORKEE COLLEGE OF ENGINEERINGrceroorkee.in/pdf/pdfo/TME601.pdf · ROORKEE COLLEGE OF ENGINEERING, ROORKEE Introduction The mathematical models which tells to optimise (minimize or

ROORKEE COLLEGE OF ENGINEERING, ROORKEE

Many times the last members are omitted, so the notation becomes A/B/S and it is

assumed that K = , N = and D = FIFO.

Some standard notation for distributions (A or B) are:

M for a Markovian (exponential) distribution

Eκ for an Erlang distribution with κ phases

D for degenerate (or deterministic) distribution (constant)

G for general distribution (arbitrary)

PH for a phase-type distribution

Models

Construction and analysis

Queueing models are generally constructed to represent the steady state of a queueing

system, that is, the typical, long run or average state of the system. As a consequence,

these are stochastic models that represent the probability that a queueing system will be

found in a particular configuration or state.

A general procedure for constructing and analysing such queueing models is:

1. Identify the parameters of the system, such as the arrival rate, service time, queue

capacity, and perhaps draw a diagram of the system.

2. Identify the system states. (A state will generally represent the integer number of

customers, people, jobs, calls, messages, etc. in the system and may or may not be

limited.)

3. Draw a state transition diagram that represents the possible system states and

identify the rates to enter and leave each state. This diagram is a representation of

a Markov chain.

4. Because the state transition diagram represents the steady state situation between

state there is a balanced flow between states so the probabilities of being in

adjacent states can be related mathematically in terms of the arrival and service

rates and state probabilities.

5. Express all the state probabilities in terms of the empty state probability, using the

inter-state transition relationships.

6. Determine the empty state probability by using the fact that all state probabilities

always sum to 1.

Whereas specific problems that have small finite state models can often be analysed

numerically, analysis of more general models, using calculus, yields useful formulae that

can be applied to whole classes of problems.

Page 26: ROORKEE COLLEGE OF ENGINEERINGrceroorkee.in/pdf/pdfo/TME601.pdf · ROORKEE COLLEGE OF ENGINEERING, ROORKEE Introduction The mathematical models which tells to optimise (minimize or

ROORKEE COLLEGE OF ENGINEERING, ROORKEE

Single-server queue

Single-server queues are, perhaps, the most commonly encountered queueing situation in

real life. One encounters a queue with a single server in many situations, including

business (e.g. sales clerk), industry (e.g. a production line), transport (e.g. a queues that

the customer can select from.) Consequently, being able to model and analyse a single

server queue's behaviour is a particularly useful thing to do.

Poisson arrivals and service

M/M/1/ / represents a single server that has unlimited queue capacity and infinite

calling population, both arrivals and service are Poisson (or random) processes, meaning

the statistical distribution of both the inter-arrival times and the service times follow the

exponential distribution. Because of the mathematical nature of the exponential

distribution, a number of quite simple relationships are able to be derived for several

performance measures based on knowing the arrival rate and service rate.

This is fortunate because an M/M/1 queuing model can be used to approximate many

queuing situations.

Poisson arrivals and general service

M/G/1/ / represents a single server that has unlimited queue capacity and infinite

calling population, while the arrival is still Poisson process, meaning the statistical

distribution of the inter-arrival times still follow the exponential distribution, the

distribution of the service time does not. The distribution of the service time may follow

any general statistical distribution, not just exponential. Relationships are still able to be

derived for a (limited) number of performance measures if one knows the arrival rate and

the mean and variance of the service rate. However the derivations are generally more

complex and difficult....

A number of special cases of M/G/1 provide specific solutions that give broad insights

into the best model to choose for specific queueing situations because they permit the

comparison of those solutions to the performance of an M/M/1 model.

Multiple-servers queue

Multiple (identical)-servers queue situations are frequently encountered in

telecommunications or a customer service environment. When modelling these situations

care is needed to ensure that it is a multiple servers queue, not a network of single server

queues, because results may differ depending on how the queuing model behaves.

One observational insight provided by comparing queuing models is that a single queue

with multiple servers performs better than each server having their own queue and that a

single large pool of servers performs better than two or more smaller pools, even though

there are the same total number of servers in the system.

Page 27: ROORKEE COLLEGE OF ENGINEERINGrceroorkee.in/pdf/pdfo/TME601.pdf · ROORKEE COLLEGE OF ENGINEERING, ROORKEE Introduction The mathematical models which tells to optimise (minimize or

ROORKEE COLLEGE OF ENGINEERING, ROORKEE

One simple example to prove the above fact is as follows: Consider a system having 8

input lines, single queue and 8 servers.The output line has a capacity of 64 kbit/s.

Considering the arrival rate at each input as 2 packets/s. So, the total arrival rate is 16

packets/s. With an average of 2000 bits per packet, the service rate is 64 kbit/s/2000b =

32 packets/s. Hence, the average response time of the system is 1/(μ − λ) = 1/(32 − 16) =

0.0625 sec. Now, consider a second system with 8 queues, one for each server. Each of

the 8 output lines has a capacity of 8 kbit/s. The calculation yields the response time as

1/(μ − λ) = 1/(4 − 2) = 0.5 sec. And the average waiting time in the queue in the first case

is ρ/(1 − ρ)μ = 0.03125, while in the second case is 0.25.

Infinitely many servers

While never exactly encountered in reality, an infinite-servers (e.g. M/M/ ) model is a

convenient theoretical model for situations that involve storage or delay, such as parking

lots, warehouses and even atomic transitions. In these models there is no queue, as such,

instead each arriving customer receives service. When viewed from the outside, the

model appears to delay or store each customer for some time