0% found this document useful (0 votes)
53 views73 pages

Linear Programming Problem Overview

Chapter 2 covers Linear Programming Problems (LPP), including their definition, formulation, and application areas. It outlines the components of optimization, types of optimization problems, and provides examples of LPP formulation in various contexts. The chapter also emphasizes the importance of understanding the system and environment for effective LPP formulation.

Uploaded by

mihretu694
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
0% found this document useful (0 votes)
53 views73 pages

Linear Programming Problem Overview

Chapter 2 covers Linear Programming Problems (LPP), including their definition, formulation, and application areas. It outlines the components of optimization, types of optimization problems, and provides examples of LPP formulation in various contexts. The chapter also emphasizes the importance of understanding the system and environment for effective LPP formulation.

Uploaded by

mihretu694
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

Chapter 2

Linear Programming Problem


Learning Objectives
When you complete this chapter you will be able to:
• Know Linear programming problem(LPP) and its
applications

• Know formulating LPP

• Solve a LPP with graphical and simplex method

• Solve a LPP using Excel solver and GAMS softwares

• Sensitivity analysis and its interpretation


Components of Optimization ?

• Any optimization problem has the following three components.

➢ An objective function is a mathematical function which


mainly depends upon decision variables that needs to be
optimized.

➢ Unknown or Decision variables which control the value of


the objective function.

➢ A set of Constraints are the limitations for optimization.


For example: limited land resources.

Optimization problem: To find values of the decision variables that


minimize or maximize the objective function while satisfying the
constraints.

3
General Mathematical Expression of Optimization ?

• A general optimization problem may be expressed as:


Min. or Max. f ( X )
subject to
g i ( X )  =  bi , i = 1,2,3,..., m
and X  0
Where,
f(X) is an objective function to be optimized.
gj(X) is set of constraints
bj = constants (limits to the resources)
X is a vector of decision variables, X = {x1, x2, …, xn}
which is non-negative.

➢ Therefore, in this representation, there are n decision


variables and m constraints.

4
Types of Optimization Problems

• There are several types of optimization models,

➢ Linear Programming problem


✓ both the objective function and the constraints are linear
✓ Has wider application in engineering

➢ Integer Programming
✓ LPP but the decision variables required to be integers

➢ Non-linear programming problem


✓ the objective function and/or any of the constraints involve
non-linear terms.

➢ Dynamic programming problem


✓ It is a multi-stage decision making model

➢ Transportation Problem

➢ Assignment Model, etc.

5
Linear Programming Problem - Definition

• Linear Programming Problem (LPP) is a special type of


mathematical model where all relationships between parts of the
system/problem being modeled can be represented linearly (a
straight line).

• It is a powerful quantitative tool used to obtain optimal solutions


to problems that involve restrictions or limitations such as the
available material, budget, labour, etc.

6
Linear Programming Problem – Application Areas
• Examples of application areas of LPP:
• A product mix problem
Example: Furniture companies

• A blending problem
Example: Food industries

• A product scheduling problem


Example: Airlines - flight schedules

• A transportation problem
Example: Cement factory

• A flow capacity problem, etc.


Example: Water distribution system

Assignment 1. Give LPP example for each of the above application areas.
7
Linear Programming Problem - Requirements

• Requirements of linear programming problem: This technique


to be employed, the basic conditions to be fulfilled are:

– There must be a well defined objective function.

– At least some of the resources must be in limited supply,


which give rise to constraints.

– Both the objective function and constraints must be linear


equations or inequalities.

– All the decision variables must be non-negative.

– Deterministic – coefficients in the objective function and


constraints are known and do not change during the period
under study.

8
Linear Programming Problem - Expression
• L.P.P can be generally described mathematically as:

– Determine x1 , x2 ,..., x,n which optimize z = c1 x1 + c2 x2 + ...cn xn


subject to the conditions

a11 x1 + a12 x2 + a13 x3 + ... + a1n xn (≤, = ≥)b1


a21 x1 + a22 x2 + a23 x3 + ... + a2 n xn (≤, = ≥)b2
...
am1 x1 + am 2 x2 + am 3 x3 + ... + amn xn (≤, = ≥)bm

And non-negativity restrictions, x j  0, j = 1,2,..., n

Where, Cj’s, bj’s and aij’s are constants and xj’s are variables.

Finding a solution to the problem, we mean to find the non-negative


values of x1, x2,….,xn which optimize Z and satisfy all the constraints.
9
Linear Programming Problem - Expression

n
In short: Optimize(max . or min . ) z =  c j x j
j =1

subject to
n

 a x (, =, )b , i = 1, 2, ..., m


j =1
ij j i

x j  0, j = 1, 2, ..., n
Example:

10
Linear Programming Problem - Formulation

Important points for LPP formulation

• Understand the system and environment to which the problem


belongs
• Understand the problem and the objective to be achieved
• State the model - clear idea of problem and what can and can not
be included in the model
• Collect Data - get data/parameters/constraints and boundaries of
system and interrelationships
• Determine decisions - define decision variables - what do we need
the model to tell us?
• Formulate the model

The optimal solution to the wrong problem is of no value.


11
Linear Programming Problem - Formulation

The formulation of L.P.P involves the following steps.


1. Find the key decision to be made from the study
Example: Maximization

2. Identify the variables and assume symbols x1, x2, …


Example: x1 = area of the segment for Building A
x2 = area of the segment for Building B

3. Express the constraints mathematically in terms of decision


variables.
Example: x1 + x2 = 10000m2

4. Mention the objective quantitatively and express it as a linear


function of variables.
Example: Maximize f(x) = 2x1 + 3x2

12
Linear Programming Problem - Formulation

Example 1:
A metal manufacturing firm engaged in producing two models of block making
machine (model A and B) performs three operations painting, assembly and
testing. The relevant data are as follows:

Model Unit sale Hours required for each unit for


price
(birr) Assembly Painting Testing
A 500 1.0 0.2 0.0
B 800 1.5 0.2 0.1

Total number of hours available are: Assembly 600; painting 100, and testing
30. Formulate this as a LPP to maximize the profit.

13
Linear Programming Problem - Formulation
Solution:
Decision Variables:
Let x1 be the number of Model A produced and x2 be the number of Model
B produced.

Constraints:
Working hours for assembly : x1+ 1.5x2  600
Working hours for Painting: 0.2x1+ 0.2x2  100
Working hours for testing : 0.1x2  30

Objective function: z = 500x1+800x2


Therefore, the LPP
Max. Z = 500x1+800x2
subject to
x1+ 1.5x2  600
0.2x1+ 0.2x2  100
0.1x2  30
and x1, x2  0
14
Linear Programming Problem - Formulation
Example 2:
A Moha soft drink company has two bottling plants in Addis Ababa, one located
at Semit(S) and the other at Gotera (G). Each plant produces three different
soft drinks 7-up, Pepsi and Mirinda. The capacities of the two plants in number
of bottles per day are as follows
Products Plants

S G

7-up 3000 1000


Pepsi 1000 1000
Mirinda 2000 6000

A market survey indicates that during the month of February, there will be a
demand for 24000 bottles of 7-up, 16000 bottles of Pepsi and 48000 bottles of
Mirinda. The operating costs per day of running S and G respectively are 60000
birr and 40000 birr, how many days should the company run each plant in
February so that the production cost is minimized?

15
Linear Programming Problem - Formulation

Solution:

The LPP
Min. Z = 60000x1+40000x2
subject to
3x1+ x2  24
x1+ x2  16
x1+ 3x2  24
and x1, x2  0

16
Linear Programming Problem - Formulation

Example 3:
A real estate company constructs two models
of residential houses (Model A and Model B).
Each Model A house requires twice as much
labor time as Model B. If all houses are model
B only, the company can construct a total of
500 houses a year. The market limits yearly
sales of Model A houses and Model B houses to
150 and 250, respectively. The profits on
Model A and B houses are 80,000birr and
50,000birr, respectively. Formulate the
problem as a LPP.

No. of decision variables No. of constraints

17
Linear Programming Problem - Formulation
Solution:
• Let x1 be number of Model A and x2 be number of model B houses
constructed by the company.
• The problem is a maximization problem. Therefore, the objective function
is:
Z = 80,000x1+50,000x2

• However, there are three constraints. The limitations are capacity of


construction for model B; and market limitations.
– 2x1+x2  500
– x1  150
– x2  250
• Thus the complete formulation of the problem is:
Maximize Z = 80,000x1+50,000x2
Subject to
2x1+x2 500
x1 150
x2 250
and x1, x2 0
18
Linear Programming Problem - Formulation
Example 4:
A cargo plane has three compartments for storing cargo: front, centre and rear. These
compartments have the following limits on both weight and space:

The following four cargoes are available for shipment on the next flight:

Any proportion of these cargos can be accepted. The objective is to determine how
much (if any) of each cargo C1, C2, C3 and C4 should be accepted and how to
distribute each among the compartments so that the total profit for the flight is
maximized.

Formulate the above problem as a linear program

19
Linear Programming Problem - Formulation

No. of decision variables No. of constraints

12 10
Solution:
Variables:
• Let xij be tonnes of cargo i (i=1,2,3,4 for C1, C2, C3 and C4 respectively)
that is put into compartment j (j=1 for Front, j=2 for Centre and j=3 for
Rear) where xij >=0, i=1,2,3,4; j=1,2,3

• Note here that we are explicitly told we can split the cargoes into any
proportions (fractions) that we like.

Constraints:
• cannot pack more of each of the four cargos than we have available
x11 + x12 + x13 ≤ 18
x21 + x22 + x23 ≤ 15
x31 + x32 + x33 ≤ 23
x41 + x42 + x43 ≤ 12
20
Linear Programming Problem - Formulation

Solution:
Constraints:
• the weight capacity of each compartment must be respected
x11 + x21 + x31 + x41 ≤ 10
x12 + x22 + x32 + x42 ≤ 16
x13 + x23 + x33 + x43 ≤ 8

• the volume (space) capacity of each compartment must be respected


480x11 + 650x21 + 580x31 + 390x41 ≤ 6800
480x12 + 650x22 + 580x32 + 390x42 ≤ 8700
480x13 + 650x23 + 580x33 + 390x43 ≤ 5300

Objective:
• The objective is to maximize total profit, i.e.
Max. Z= 310[x11+ x12+x13] + 380[x21+ x22+x23] + 350[x31+ x32+x33] + 285[x41+ x42+x43]

21
Linear Programming Problem - Formulation

Solution:
Therefore,
Max. Z= 310[x11+ x12+x13] + 380[x21+ x22+x23] + 350[x31+ x32+x33] + 285[x41+ x42+x43]
Subject to
x11 + x21 + x31 + x41 ≤ 10
x12 + x22 + x32 + x42 ≤ 16
x13 + x23 + x33 + x43 ≤ 8
x11 + x12 + x13 ≤ 18
x21 + x22 + x23 ≤ 15
x31 + x32 + x33 ≤ 23
x41 + x42 + x43 ≤ 12
480x11 + 650x21 + 580x31 + 390x41 ≤ 6800
480x12 + 650x22 + 580x32 + 390x42 ≤ 8700
480x13 + 650x23 + 580x33 + 390x43 ≤ 5300
and
x11, x21, x31 , x41 , x12 , x22 , x32 , x42 , x13 , x23 , x33 , x43 ≥ 0

22
Home Take Assignment 1

Exercise 1:
• A construction site requires a minimum of 12,000 cubic meters of
sand and gravel mixture. The mixture must contain no less than
5,000 cubic meters of sand and no more than 6,000 cubic meters
of gravel. Materials may be obtained from two sites: 35% of sand
and 65% gravel from site 1 at a delivery cost of $5.00 per cubic
meter and 70% sand and 30% gravel from site 2 at a delivery cost
of $7.00 per cubic meter. Formulate the problem as a LP model

23
Home Take Assignment 1

Exercise 2:
Medroc Cement Company plans on building a maximum of 11 new
stores in Addis Ababa and Nazareth. The company will build these
stores in one of three sizes: a small store, a medium store, and a
large store. The small-sized store requires birr 41.25 million to
build and 30 employees to operate. The medium-sized store
requires birr 82.5 million to build and 15 employees to operate.
The large-sized store requires birr 123.75 million to build and 45
employees to operate. The corporation can dedicate birr 825
million in construction capital, and 300 employees to staff the
stores. On average, the small store nets birr 12 million annually,
the medium store nets birr 20 million annually, and the large
store nets birr 26 million annually. Formulate the LPP.

24
Graphical Solution of L.P.P

Graphical method of solving the LPP involves the following steps.


i. Formulate the problem mathematically.
ii. Convert each inequality in the constraint equation be written in the
form of equality. Thus we get equation of straight line. Draw all the
straight lines thus obtained from each constraints equations on the
graph with X1 as x-axis and X2 as Y-axis.
iii. Identify the feasible region. i.e. the area which satisfies all the
constraint simultaneously (convex region). For greater than and
greater than or equal to constraint, the feasible region will be the
area which lies above the constraint line and below otherwise.
iv) corner point method is used to get the solution. Identify each of the
corner, or extreme points of the feasible region either by visual
inspection or the method of simultaneous equations.
v) compute the profit/cost at each corner point by substituting that
points coordinates into the objective function.
vi) Identify the optimal solution at corner point that give highest profit
in a maximization problem or lowest cost in a minimization problem.

25
Graphical Solution of L.P.P

A region or set of points is said to be convex if the line joining any two
points lies completely within the region.

26
Graphical Solution of L.P.P

• Example 1. A piece of land having an area of 2000m2 is provided for a


real estate company. Two model residential houses A and B are proposed
to construct on this land. The cost of construction and benefits from
these constructions are as below.

Model Cost of construction Benefits


(x 10,000 birr/m2) (x 10,000birr/m2)

A 3 5
B 1 2

If a total of 30,000,000 birr is available, what areas should be provided to


construct model A and model B house, respectively to maximize total net
benefits? Write complete formulation of the problem and solve by using
graphical LP method.

27
Graphical Solution of L.P.P

Solution:
Step 1. Formulate the problem.
• Let x1 and X2 be the number of model A & B houses to be constructed,
respectively.
• Constraints: Money and land area
– Money: 30,000x1+10,000x230,000,000
– Land: x1+x2 2000
• The complete LPP formulation is:
Maximize Z =2x1+x2 (Remember: Z= 20000x1+10000x2)
Subject to
3x1+x23000
x1+x2 2000
x1, x2 0
Step 2. Change the constraints to straight line equations.
• To obtain the feasibility region by graphical method, the constraints are
expressed into equality as :
3x1+x2 = 3000 and x1+x2 = 2000
28
Graphical Solution of L.P.P
Step 3. Draw the lines on x-y axis with x1 as x-axis and x2 as y-axis

• To draw the straight lines, for each equation, determine where the line
intersects each axis.
a. To find where it crosses the x2 axis, set x1 equal to zero and
solve the equation for the value of x2.
b. To find where it crosses the x1 axis, set x2 equal to zero and
solve the equation for the value of x1.
29
Graphical Solution of L.P.P

Step 4. Find the feasible region


• From the graph, identify the feasible region which is the common region
bounded by the lines drawn.
Feasible for money;
not for area
The feasible region
is ABCD

Feasible for area; not


for money.

Note:
• For less than or equal to constraints, shade the area to the left of the
line, or otherwise.
30
Graphical Solution of L.P.P

Step 5. Identify the optimal solution


• Any point within the region /boundary formed by the horizontal axis and
by the lines so formed is the feasible solution (ABCD)

• But to find the optimal point, take the corner coordinates and check the
optimality of the objective function.

– A(0,0) ; Z =2x1+x2 = 2*0+0 = 0


– B(0,2000) ; Z =2x1+x2 = 2*0+2000 = 2000
– C(500,1500) --- reading from the graph or solving the equations
simultaneously.
Z =2*500+1500 = 2500
– D(1000, 0); Z =2*1000+0= 2000
– The optimal solution is found at C(500, 1,500) since it gives the highest
value
Answer: x1 = 500 and x2 = 1500 which gives
Z= 2*500+1500 = 2500
= 2,500*10,000 birr = 25,000,000 birr
31
Home Take Assignment 2

Exercise 1:

• A real estate company constructs two models of residential houses


(Model A and Model B). Each model A house requires twice as
much labour time as model B. If all houses are model B only, the
company can construct a total of 500 houses a year. The market
limits yearly sales of Model A houses and Model B houses to 150
and 250, respectively. The profits on Model A and B houses are
80,000birr and 50,000birr, respectively. Solve the problem using a
graphical technique.

No. of decision variables No. of constraints

32
Home Take Assignment 2

Exercise 2:
• A construction site requires a minimum of 12,000 cubic meters of
sand and gravel mixture. The mixture must contain no less than
5,000 cubic meters of sand and no more than 6,000 cubic meters
of gravel. Materials may be obtained from two sites: 35% of sand
and 65% gravel from site 1 at a delivery cost of $5.00 per cubic
meter and 70% sand and 30% gravel from site 2 at a delivery cost
of $7.00 per cubic meter. Solve the problem using graphical
technique.

33
Home Take Assignment 2
Exercise 3:
A real estate company plans to build 5-storey
and 3-storey apartments on a 60,900 m² plot
of land. The company has a budget of 200
million USD for construction and working
hours of 4800. Based on the details provided
below, what is the maximum number of each
type of apartment that can be built to
accommodate the greatest number of
residents?

Type of Max. No. of Required area Working hours Cost per


Apartment Residents for each for each Apartment
Apartment Apartment
5-storey 30 800 120 600,000

3-storey 12 600 60 200,000

34
Home Take Assignment 2

Exercise 4:
A total of 1000 m³ of soil needs to be
excavated within one week (5 working days)
using five different types of rental machines.
Each machine has a specified hourly cost
(including machine and operator), and each
machine can operate up to 8 hours per day.
Determine the allocation of machine usage
that minimizes the total excavation cost.

Type of Machine Cost per hour Availability Capacity in m3


(USD) Hours per day per hour
Shovel Dozer 17.5 6 28.2
Large Backhoe 40 6 150
Backhoe A 27.5 6 90
Backhoe B 22 8 60
Crane 47 5.5 40
35
Possible Cases to Solution of L.P.P

• Example 1. Using graphical method, solve the following L.P.P.


Max. Z = 3x1+4x2
subject to
x1+ x2  450
2x1+ x2  600
and x1, x2 0

• The maximum value of Z occurs at one vertex of the feasible region(say A).
• Thus, this problem has a unique optimal solution.

36
Possible Cases to Solution of L.P.P

• Example 2. Using graphical method, solve the following L.P.P.


Max. Z = 100x1+40x2
subject to
5x1+ 2x2  1000
3x1+ 2x2  900
x1+ 2x2  500
and x1, x2 0

• The maximum value of Z occurs at two points (say A and B).


• Further, any point on the line joining A and B will also give the same
maximum value of Z.
• Thus, since there are infinite number of points between A and B, there are
infinite number of optimal solutions for this LPP.

37
Possible Cases to Solution of L.P.P

• Example 3. Using graphical method to solve the following L.P.P.


Max. z = 2x1+3x2
subject to
x1- x2  2
x1+ x2  4 and x1, x2 0

• Here the solution space is unbounded. i.e. there are points in the feasible
region for which z will have much higher values. The maximum value z
occurs at infinity. Thus, this problem has an unbounded solution.

38
Possible Cases to Solution of L.P.P

• Example 4. Using graphical method, solve the following L.P.P.


Max. z = 4x1+3x2
subject to
x1- x2  -1
- x1+ x2  0 and x1, x2 0

• There are no point (x1, x2) common to both the shaded regions.
• Thus, the problem cannot be solved. Hence the problem has no feasible
solution.

39
Possible Cases to Solution of L.P.P

Unique feasible Point

✓ Situation: Feasible region


consist of a single point.

✓ Solution: There is no need for


optimization as there is only
one feasible point

40
Possible Cases to Solution of L.P.P

Therefore, a linear programming problem may have

– A unique, finite solution

– An unbounded solution,

– Multiple (or infinite) number of optimal solution,

– Infeasible solution, and

– A unique feasible point

41
Graphical Solution of L.P.P

Characteristics of the graphical method:


Advantages:
– The graphical method is simple to understand and easy to use.
– It gives the basic concepts of solving a LPP.
– It eliminates redundant constraints
– Multiple solutions, unbounded solutions, and infeasible solutions get
highlighted very clearly in the graph.
– Sensitivity analysis can be illustrated easily by drawing the graph of the
changes.

Disadvantages:
– But it can effectively solve LPP if the problem involves only two
variables.
– Moreover, even though the problem involves only two variables, if the
number constraints are large, a large number of lines make the graph
difficult to read.
– Thus, it is not the powerful tool of linear programming as most of the
practical situations do involve more than two variables.
42
Cases to Solution of L.P.P

Redundant Constraints

43
Simplex Method

Simplex Method
• Simplex method is the most popular method used for the solution of
Linear Programming Problems (LPP).

• The method was invented during WW II by George Dantzig.

• In the graphical method, the optimal solution in a feasible region involves


finding at any one vertex of the region.

• Similarly, the simplex method provides an algorithm which consists in


moving from one vertex of the feasible region to another until it gets an
optimal vertex.

How does it work

44
Simplex Method

Important terms:
 Given a system of m linear equations with n variables (m < n), the
solution obtained by setting (n - m) variables equal to zero and
solving for the remaining m variables (basic variables) is called
basic solution.

 A feasible solution which is also basic is called a basic feasible


solution.

45
Simplex Method

Example: Find all the basic solutions to the following problem


Max Z =2x1+x2+2x3
Subject to A basic feasible solution
x1+2x2+3x3= 4
2x1+3x2+5x3= 7

Basic Non-Basic Values of the Value of Is the Is the


No. variables variables basic variables the solution solution
given by the objective feasible feasible
constraints function ? and
(simultaneously optimal?
solving the
equations)

1 x1, x2 x3= 0 x1=2 and x2=1 5 yes yes


2 x1, x3 x2= 0 x1=1 and x3=1 4 yes No

3 x2, x3 x1= 0 x2=-1 and x3=2 3 No No

46
Simplex Method

The simplex method Algorithm


Assuming the existence of an initial basic feasible solution, an optimal
solution to any LPP by simplex method is found as follows:

• Step 1. Check whether the objective function is to be maximized or


minimized. If it is to be maximized, go to step 2.
If it is to be minimized, then convert it into a problem of
maximization by multiplying the objective function by -1. Then,
Minimize Z = - Maximize (-Z)

• Step 2. Check whether all bi’s are positive. If any of the bi’s is negative,
multiply both sides of that constraint by -1 so as to make its right hand
side positive.

• Step 3. By introducing slack/surplus variables, convert the inequality


constraints into equations and express the given LPP into its standard
form.

47
Simplex Method

• General LP problem is:

Max (or Min) Z= C1X1+C2X2+………CnXn

While satisfying the constraints


a11X1+…….a1nXn ≤b1 or ≥ b1
a21X1+…….a2nXn ≤b2 or ≥ b2
……..
am1X1+…….amnXn ≤bm or ≥ bm

and X1, ….Xn ≥0

• Now, inequalities are converted to equalities by adding a slack or a


surplus variable.

48
Simplex Method

• The general LLP can be put in the standard form as follows.

Max (or Min) Z= C1X1+C2X2+………CnXn


s.t
a11X1+…….a1nXn ±S1 =b1
a21X1+…….a2nXn ±S2 =b2
……..
am1X1+…….amnXn ±Sm = bm

and X1, ….Xn, S1, S2, …, Sm ≥0

• Slack variables: are defined, when there are ≤ inequalities.


• Surplus variables: are defined when there are ≥ inequalities.

49
Simplex Method
Step 4. Find an initial basic feasible solution and express the above information
conveniently in the following simplex table.
n
Optimize(max . or min . ) z =  c j x j
j =1

subject to
n

 a x (, =, )b , i = 1, 2, ..., m


ij j i Cj row = coefficients of the
CB column = j =1
variables in the objective function
coefficients of the x j  0, j = 1, 2, ..., n
basic variables in the
objective function
Cj ( C1 C2 C3 …. 0 0 0 …..)
CB YB XB x1 x2 x3 …. s1 s2 s3 …..
CB1 s1 b1 a11 a12 a13 …. 1 0 0 ….
CB2 s2 b2 a21 a22 a23…. 0 1 0 ….
CB 3 s3 b3 a31 a32 a33…. 0 0 1 ….
: : : : : …. ….
: : : : : …. ….
Body Matrix Unit Matrix
(Zj – Cj) Z0 (Z1 – C1 ) (Z2 – C2) (Z3 – C3) …. ….
50
Simplex Method

Where,
• Cj row = coefficients of the variables in the objective function
• CB column = coefficients of the basic variables in the objective function
• YB column = the basic variables
• The body matrix = the coefficients of the non-basic variables in the
constraint equations.
• Unit matrix = the coefficients of the basic variables in the constraints
equation.
• The (Zj-Cj) row = the net evaluations or index for each column.

• Step 5. Compute the net evaluations (Zj-Cj) (j=1,2, …,n) by using the relation:
Zj-Cj = CBaj –Cj
Examine the sign of (Zj-Cj )
a) if all (Zj-Cj )  0, then the current basic feasible solution XB is
optimal.
b) if at least one (Zj-Cj ) < 0, then the current basic feasible solution
is not optimal, go to the next step.

51
Simplex Method

• Step 6. (to find the entering variable)


• The entering variable is the non-basic variable corresponding to the most
negative value of (Zj-Cj ). Let it be xr (for some j = r). The entering variable
column is known as pivot column which is usually marked at the bottom of
the table. If more than one variable has the same most negative (Zj-Cj ),
any of these variables may be selected arbitrarily as the entering variable.

• Step 7 (to find the leaving variable)


• Compute the ratio X 
 = Min Bi , air  0
 air 
(the ratio between the solution column and the entering variable column
considering only positive denominators)
• a) if all air 0, then there is an unbounded solution to the given LPP
• b) If at least one air >0, then the leaving variable is the basic variable
corresponding to the minimum ratio , the basic variable say, xk leaves the
basis. The leaving variable row is called pivot row (pivot equation). The
element at the intersection of pivot column and pivot row is called the
pivot element.
52
Simplex Method

• Step 8. Drop the leaving variable and introduce the entering variable
along with its associated value under CB column. Convert the pivot
element to unity by dividing the pivot equation by pivot element and all
other elements in its column to zero by making use of

i) New pivot equation = old pivot equation  pivot element


ii) New equation [for all other rows including (Zj-Cj ) row]

 Corresponding   New pivot 


= (old equation) −     
 column coefficient   equation 
• Step 9. Go to step (5) and repeat the procedure until either an optimum
solution is obtained or there is an indication of an unbounded solution.

Note:
If the net evaluation, Zj-Cj > 0, for all non-basic variables, then the problem has a unique
optimal solution
If the net evaluation, Zj-Cj = 0, for at least one non-basic variables, then the problem has
alternative or infinite number of solution.
53
Simplex Method

Example 1. Use simplex method to solve the LPP,


Max. z = 4x1+10x2
subject to
2x1+ x2  50
2x1+ 5x2  100
2x1+ 3x2  90 and x1, x2 0
Solution:
• Introduce slack variables and change the LPP into standard form:
Max. z = 4x1+10x2 + 0s1+0s2+0s3
subject to
2x1+ x2 + s1+ 0s2 + 0s3 = 50
2x1+ 5x2 + 0s1+ s2 + 0s3 = 100
2x1+ 3x2 +0s1+ 0s2 + s3 = 90 and x1, x2 , s1 , s2 , s3 0
• Since there are 3 equations with 5 variables, the initial basic feasible
solution is obtained by equating (5-3) = 2 variables to zero.
• Therefore, the initial basic feasible solution is s1=50, s2 =100, s3 =90 (x1, x2
are non-basic)
54
Simplex Method

• The initial simplex table is then given by:


Pivot row
Pivot element
Cj (4 10 0 0 0)
CB YB XB x1 x2 s1 s2 s3
 X Bi 
 = Min , air  0
 air 

0 s1 50 2 1 1 0 0 50

0 s2 100 2 ( 5) 0 1 0 20*

0 s3 90 2 3 0 0 1 30

(Zj – Cj) 0 -4 -10 0 0 0

Pivot column
Since there are some (Zj – Cj)<0, the current basic feasible solution is not
optimal.
55
Simplex Method

• To find the entering variable :


• Since (Zj – Cj) = -10 is the most negative, the corresponding non-basic variable x2
enters the basis. The column corresponding to this x2 is the pivot column.
• To find the leaving variable:
• Find  = Min X Bi , a  0
 ir 
 air 
 X Bi 
 = Min , ai 2  0
 ai 2 
 50 100 90 
 = Min , , 
1 5 3

 = Min50,20,30 = 20
• This corresponds to s2 . Therefore, the leaving variable is the basic variable s2.
• The leaving variable row is the pivot equation and 5 is the pivot element.
• Now, the new pivot equation is:
• New pivot equation = old pivot equation  pivot element

56
Simplex Method
• New pivot equation = old pivot equation  pivot element
= (100 2 5 0 1 0)  5
= (20 2/5 1 0 1/5 0)

 Corresponding   New pivot 


New s1 equation = (old equation) −     
 column coefficient   equation 
= 50 2 1 1 0 0
(-) 20 2/5 1 0 1/5 0
= 30 8/5 0 1 -1/5 0
New s3 equation = 90 2 3 0 0 1
(-) 60 6/5 3 0 3/5 0
= 30 4/5 0 0 -3/5 1
New (Zj-Cj) equation = 0 -4 -10 0 0 0
(-) -200 -20/5 -10 0 -10/5 0
= 200 0 0 0 2 0

57
Simplex Method

• First iteration:

Cj (4 10 0 0 0)

CB YB XB x1 x2 s1 s2 s3
 X Bi 
 = Min , air  0
 air 

0 s1 30 8/5 0 1 -1/5 0

10 x2 20 2/5 1 0 1/5 0

0 s3 30 4/5 0 0 -3/5 1

(Zj – Cj) 200 0 0 0 2 0

Since all (Zj – Cj)0, the current basic feasible solution is optimal.
Therefore, the optimal solution is Max. Z = 200, x1= 0, x2= 20

58
Simplex Method

• Exercise 1. A corporation plans on building a maximum of 11 new stores


in a large city. They will build these stores in one of three sizes for each
location – a convenience store (open 24 hours), a standard store, and an
expanded services store. The convenience store requires $4.125 million to
build and 30 employees to operate. The standard store requires $8.25
million to build and employs 15 staff members to operate. The expanded-
services store requires $12.375 million to build and employs 45 staff
members to operate. The corporation can dedicate $82.5 million in
construction capital and employ 300 staff members. On average, the
convenience store nets $1.2 million annually, the standard store nets $2
million annually, and the expanded services store nets $2.6 million
annually. How many of each should they build to maximize revenue?
Ans: Z = $ 20.4 ; x1 = 2; x2 = 9; x3 = 0

Let us use software


• Excel Solver
• LINDO
• GAMS
59
Case Problem of LPP

Reading Assignment: Scheduling Planes at Delta Air lines with LP


• An airline seat is the most perishable commodity in the world. Each time an
airliner takes off with an empty seat, a revenue opportunity is lost forever.
• For Delta Airlines, which flies over 2500 domestic flights per day using
about 450 aircrafts of 10 different models, its schedule is the very heart
beat of the airline.
• Delta uses its huge LP model “Coldstart” and runs the model every day.
• The typical size of a daily Coldstart model is about 40000 constraints and
60000 variables.
• The objective of the model is to minimize a combinational operating costs
and lost passenger revenue, called “spill costs”.
• The savings from the model have been phenomenal, at 220000 USD per day
over earlier model “Warmstart”.
• Delta saves 300 million USD through use of linear programming.

60
Sensitivity Analysis in L.P.P
• Sensitivity analysis/post-optimality analysis, is the study of how sensitive
the solution is to parameter changes.

• Once the optimal solution to a LPP problem has been attained, it may be
desirable to study how the current solution changes when the parameters
of the problem changes.

• Such analysis converts the static LPP solution into a dynamic tool to study
the effect of changing conditions.

• The changes in the parameters of a LPP include:


– Changes in the right hand side of the constant
– Changing in the cost coefficient
– Addition of new variables
– Addition of new constraints, etc.
• With a sensitivity analysis, we find which design parameters are most
critical to the performance of the design and what are the critical range
of those parameters.
61
Sensitivity Analysis Approaches

1. Trial and Error method


• It involves resolving the entire problem, preferably by computer, each time
one input data item or parameter is changed.
• It can take a long time to test a series of possible changes in this way.

2. The analytic post-optimality method


• This is done without resolving the whole problem.
• LP software, such as Excel’s Solver software has this capability.

Example: An electronics company problem


Hours required to produce 1 unit of Available
Department Hrs
Television Radio
Electronic 4 3 240
Assembly 2 1 100
Profit per unit $7 $5

62
Sensitivity Analysis Approaches
Let,
X1 = number of Televisions to be produced;
X2 = number of Radios to be produced

Limitations:
Hours for electronic works: 4x1+ 3x2  240
Hours for Assembly: 2x1+ x2  100

Max. Z = 7x1+5x2
subject to
4x1+ 3x2  240
2x1+ x2  100
and x1, x2 0

63
Adjustable cells table – the impact of changes of the coefficients in the objective
function on the optimal solution
Constraints table – the impact of changes of the RHS of the constraints on the optimal
solution
64
Sensitivity Analysis Approaches
Exercise 1: Do a sensitivity analysis on the following LPP.

Max. Z = 100x1+300x2 +50x3


subject to
300x1+ 1200x2 +120x3 93000
0.5x1+ x2 + 0.5x3 101
and x1, x2 , x30

65
Advantages and Disadvantages of LPP
• Advantages
– It provides an insight into the problem environment.
– It makes a scientific and mathematical analysis of the problem
situations.
– It gives an opportunity to decision makers to formulate his/her
strategies consistent with the constraints and the objectives.
– It deals with changing situations. That is, once a plan is arrived through
the LPP it can also be reevaluated for changing conditions.

• Limitations
– LPP treats all relationships as linear. But it is not true in real life
situations.
– The decision variables in some LPP would be meaningful only if they
have integer values .
– All the parameters in the LPP are assumed to be known constants. But in
real life they may not be known completely or they may be probabilistic
and liable to changes.
– The problems are complex if the number of variables and constraints are
large.
– LPP deals with only a single objective problems.
66
Other Forms of Linear PP

Other Variants of LPP are:


• Pure Integer Programming
– is a special form of LP in which all decision variables are required to be
integer values.
– IP's occur frequently because many decisions are essentially discrete
(such as yes/no, go/no-go).
– Thus, violates the LP rule that decision variables be continuous
Example: Max. Z = 7x1+5x2
subject to
4x1+ 3x2  240
2x1+ x2  100
and x1, x2 are integers

• MIP (Mixed Integer Programming)


– is a LP but at least one decision variable is required to be a integer value
– violates the LP rule that decision variables be continuous
– is solved by branch and bound method

67
Other Forms of Linear PP

• Example on Pure Integer Programming:


– Maximize the profits from the sale of the products C and F with the
following LLP.

Max. Z = 600C+700F
subject to
2C+ 3F  12
6C+ 5F 30

C, F ≥0 and integers

68
Other Forms of Linear PP
Solution: Graphical LP Solution

The shaded region shows the feasible region for the LP problem.
Optimal corner point solution: C = 3.75; F = 1.5 Profit of $3,300

Is it the right solution? Rounding off?


69
Other Forms of Linear PP
• Solution: The following table shows all possible integer solutions for this
problem.

• You may also use Excel Solver to solve the problem!!


70
More… Techniques to solve All types of LPP

• Revised Simplex Method


• Bounded Variable Method
• Dual Simplex method
• Big-M method
• Branch and Bound Method –Mixed integer programming
• Cutting method
For integer programming
• Search Method
• Gomory’s cutting plane method – For Mixed integer programming

71
Home Take Assignment 3

• Solve the cargo problem using excel solver and GAMS.

• Give a brief outline on the branch and bound method of solving


integer programming problem.

• Give a brief outline on Big-M method of solving Integer


programming problem.

72
Questions?

THANK YOU
73

You might also like