You are on page 1of 289

Engineering Optimization (ME F320)

Department of Mechanical Engineering


BITS Pilani K. K. Birla Goa campus
Instructor in charge: Dr. Biswajit Das
Email: biswajitd@goa.bits-pilani.ac.in

BITS Pilani Goa campus Dr. Manoj Kumar Pandey


Text Book

Belegundu A.D. and Chandrupatla T.R., "Optimization Concepts and


Applications in Engineering", Cambridge Univ. Press, 2nd Ed.(2011),
ISBN:9781107606227

Dr. Manoj Kumar Pandey


Reference Books
R1. Roland L. Radin, Optimization in Operations Research, Pearson
Education, 2nd Indian Reprint, 2003.

R2. F. S. Hillier and G. J. Lieberman, Introduction to Operations


Research, T M H, 8th Ed., 2005

R3. J. C. Pant, Introduction to Optimization: Operations Research,


Jain Brothers, New Delhi, 5th Ed, 2000
R4. Saul I. Gass, Linear Programming Methods and Applications,
Dover Publications, 5th edn., 2003.
R5. G.C. Onwubolu and B.V. Babu, New Optimization Techniques
in Engineering, Springer, 1st Ed, 2004.
Dr. Manoj Kumar Pandey
Objective of the Course:
The objective of the course is to provide students with:
• Basic techniques to formulate single and multi-objective
problems into a mathematical models.

• The primal-dual relations and to analyze the sensitivity of


decision variables.

• Various techniques to solve transportation and assignment


problems.

• Various techniques to solve linear and nonlinear programming


problem.

Dr. Manoj Kumar Pandey


Learning Outcomes:

Upon completing the course students will be able to:

• Formulate real life problem into a mathematical programming


problem.

• Solve linear and nonlinear programming problems, and use these


methods to solve real life problems.

• Use duality and post-optimality to measure the sensitivity of


decision variable and constraint of a linear programming
problem.

• Solve unconstraint programming problems, and use these


methods to solve practical problems.
Dr. Manoj Kumar Pandey
Evaluation Components

Component Duration Weightage Date and Time Remarks


(%)
Refer to time table
Mid semester 1.5 hour 35 CB

announced
Quizzes ** 20 OB

Comprehensive 3 hours 45 Refer to time table


Examination CB
(20% before mid-
semester
+
80% after mid
semester)
Introduction to Linear Programming Problems (LPPs)

Historically, the first term for optimization was “linear programming”, which
was due to George B. Dantzig, although much of the theory had been
introduced by Leonid Kantorovich

George Dantzig Leonid Kantorovich


1914-2005 1912-1986

Prof P C Mahalanobis Established an OR Team in ISI Kolkata for solving


problem related
Dr. Manoj Kumarto national planning and survey.
Pandey
Application

Optimization is widely used in scientific applications, engineering,


and management.
Ø Hospital management
Ø Energy conservation
Ø Environmental pollution

Dr. Manoj Kumar Pandey


Introduction to Linear Programming Problems (LPPs)

The term programming in this context does not refer to computer


programming. Rather, the term comes from the use of program by
the United States military to refer to proposed training and logistics
schedules, which were the problems Dantzig studied at that time.

Dr. Manoj Kumar Pandey


Features of operations research

ü Interdisciplinary approach
ü Scientific approach
ü Holistic approach
ü Objective oriented approach

ü Judgement phase
ü Research phase
ü Action phase

Dr. Manoj Kumar Pandey


Computer software for OR

§ Excel 97

§ Linear Interactive Discrete Optimization (LINDO)

§ Quantitative system for Business plus (QSOM)

Dr. Manoj Kumar Pandey


Engineering Optimization ( ME F320)
Department of Mechanical Engineering
BITS Pilani K. K. Birla Goa campus
Instructor in charge: Dr. Biswajit Das
Email id: biswajitd@goa.bits-pilani.ac.in

BITS Pilani Goa campus Dr. Manoj Kumar Pandey


Models in operations research

Advantages
Ø A model describes relationships among various variables more effectively than
verbal communication.
Ø Models allows experiment on complex system that is not possible in real life.
Ø It can simplify investigation.
Ø It can identify bottle neck of the process.
Classification
Ø Deterministic
Ø Probabilistic
Ø Static
Ø Dynamic
Ø Analytical model
Ø Simulation model
Dr. Manoj Kumar Pandey
Models in operations research

Ø These models are necessary to represent the essence of a system that is


required for decision analysis.

Ø The term “formulation” indicates the process of converting verbal description


and numerical data into mathematical expressions.

Ø This mathematical expression represents relationship among


, on the use of to several
competing activities on the basis of given criteria of optimality.

Dr. Manoj Kumar Pandey


Introduction to Linear Programming Problems (LPPs)

Linear refers to linear relationship among variables in a model. For a


given change in one variable causes a proportional change in another
variable.

Example: If you double investment on a certain project will also double


the rate of return.

Programming is a mathematical modelling and solving a problem that


involves use of limited resources by choosing a particular course of
action among given courses of action in order to achieve desired
objective.

Note: Software is not for model building.


Dr. Model building
Manoj Kumar Pandeyis an art that improves with practice.
Assumptions of LP model
Certainty: Resource availability, profit contribution per unit of
decision variables are known.
Additivity: Value of objective function and the total amount of
each resource used for must be equal to sum of respective
individual contribution.
Linearity (proportionality): Amount of each resource used and
its contribution to the profit in objective function must be
proportional.

Divisibility (Continuity): Solution values of decision variables are


allowed to assume continuous value.

Dr. Manoj Kumar Pandey


Advantages and limitations of LP model

Ø Effective utilization of production resource.


Ø Improves the quality of decision
Ø Helps to arrive at optimal solution of a decision problem by
taking into account constraints.
Ø Highlights bottleneck in production processes.

Limitations:
Ø In real life problems, decision variables, or objective function
are not linearly related.
Ø Rounding off error cannot be avoided that leads to error in
optimal solution
Ø Effect of time and uncertainty is neglected.
Ø LPP deals with single objective.
Ø Parameters are considered constant.
Dr. Manoj Kumar Pandey
Production example

A manufacturing company is engaged in producing three types of products: A,


B and C. The production department produces, each day, components
sufficient to make 50 units of A, 25 units of B and 30 units of C. The
management is confronted with the problem of optimizing daily production of
the products in assembly department, where only 100 man hours are available
daily for assembling the products. The following additional information is
available:
Type of product Profit contribution per Assembly time per
unit of product (Rs) product (hrs)
A 12 0.8

B 20 1.7

C 45 2.5

The company has a daily order commitment for 20 units of products A and a total of 15
units of products B and C. Formulate the LP model.

Dr. Manoj Kumar Pandey


Solution

Dr. Manoj Kumar Pandey


Solution

Dr. Manoj Kumar Pandey


Solution

Dr. Manoj Kumar Pandey


Structure of LP model

Decision Variables: That we seek to determine, help in


describing the decision to be made.

Objective function: Describes the main objective (or


purpose) of the problem. Depending on the nature of the
problem the objective function may be of type
maximization or minimization.

Constraints: Describe the various restrictions imposed


on the problem.
Dr. Manoj Kumar Pandey
The general form of the problem

Max. / Min. f (X)=Z


subject to
gi (X) ≤ or = or ≥ 0, i=1,2,…m
X  0, where X = ( x1, x2…..xn)

Dr. Manoj Kumar Pandey


The Mathematical Programming problem is
classified into two classes:

1. Linear Programming Problems (LPP)

2. Nonlinear Programming Problems (NLPP)

Dr. Manoj Kumar Pandey


Linear Programming Problems (LPP)

An optimization problem is called a Linear


Programming Problem (LPP) when the objective
function and all the constraints are linear functions of
the decision variables, x1, x2, …, xn. We also include
the “non-negativity restrictions”, namely xj ≥ 0 for all
j = 1,2, …, n.

Dr. Manoj Kumar Pandey


A typical LPP is of the form:
Max. / Min. z = c1 x1 + c2 x2+ …+ cn xn

subject to the constraints:


a11 x1 + a12 x2 + … + a1n xn ≤ b1
a21 x1 + a22 x2 + … + a2n xn ≤ b2
. . .
am1 x1 + am2 x2 + … + amn xn ≤ bm
x1, x2, …, xn  0
Dr. Manoj Kumar Pandey
Non-Linear Programming Problems (NLPP)
An optimization problem of the form:

Max. / Min. f (X)


subject to
gi (X) ≤ or = or ≥ 0, i=1,2,…m
X  0,
where X = (x1, x2, …..xn), is said to be NLPP if either the
objective function or the any of the constraints or both
are nonlinear function of X.

Dr. Manoj Kumar Pandey


Example
An electronic company is engaged in the production of two components C1 and C2 that
are used in radio sets. Each unit of C1 costs the company Rs 5 in wages and Rs 5 in
material, while each of C2 costs the company Rs 25 in wages and Rs 15 in material. The
company sells both products on one period credit terms, but the company labour and
material expenses must be paid in cash. The selling price of C1 is Rs 30 per unit and of
C2 it is Rs 70 per unit. Because of the strong monopoly, it is assumed that the company
can sell, at the prevailing prices, as many units as it produces. The company’s production
capacity is however limited by two considerations. First, at the beginning of period 1, the
company has an initial balance of Rs 4000 (cash plus bank credit plus collections from
past credit sales). Second, the company has, in each period, 2000 hours of machine time
ans 1400 hours of assembly time. The production of each C1 requires 3 hours of machine
time and 2 hours of assembly time. The production of each C1 requires 3 hours of
machine time and 2 hours of assembly time, whereas the production of each C2 requires
2 hours of machine time and 3 hours of assembly time. Formulate the LPP to maximize
the total profit.

Dr. Manoj Kumar Pandey


Solution

Dr. Manoj Kumar Pandey


Solution

Dr. Manoj Kumar Pandey


Example
A company has two grades of inspectors 1 and 2, the members of which are to be
assigned for a quality control inspection. It is required that at least 2000 pieces be
inspected per 8 hour day. Grade 1 inspectors can check pieces at the rate of 40 per hour
with an accuracy of 97 percent. Grade 2 inspectors check at the rate of 30 pieces per
hour with an accuracy of 95 percent.
The wage rate of a grade 1 inspector is Rs 5 per hour while that of a grade 2 inspector is
Rs 4 per hour. An error made by an inspector costs Rs 3 to the company. There are only
nine grade 1 inspectors and eleven grade 2 inspectors available to the company. The
company wishes to assign work to the inspectors so that cost of inspection reduces.
Formulate the LPP as to minimize daily inspection cost.

Dr. Manoj Kumar Pandey


Example

Dr. Manoj Kumar Pandey


Example

Dr. Manoj Kumar Pandey


Engineering Optimization ( ME F320)
Department of Mechanical Engineering
BITS Pilani K. K. Birla Goa campus
Instructor in charge: Dr. Biswajit Das
Email id: biswajitd@goa.bits-pilani.ac.in

BITS Pilani Goa campus Dr. Manoj Kumar Pandey


Problem

A Post Office requires different number of full-time employees on different days of


the week. The number of employees required on each day is given in the table-1.
Union rules say that each full-time employee must receive two days off after
working for five consecutive days. The Post Office wants to meet its requirements
using only full-time employees. Formulate the above problem as a LPP so as to
minimize the number of full-time employees hired.

Table-1
Day No. of employees required
1 -Monday 10
2 -Tuesday 6
3 -Wednesday 8
4 -Thursday 12
5 –Friday 7
6 -Saturday 9
7 -Sunday 4

Dr. Manoj Kumar Pandey


Dr. Manoj Kumar Pandey
Dr. Manoj Kumar Pandey
Dr. Manoj Kumar Pandey
Dr. Manoj Kumar Pandey
Napkin Problem

An institute has to organize its annual cultural festival continuously for next five
days. There is an arrangement of dinner for every invited team. The requirement of
napkins during these five days is:
Days 1 2 3 4 5

Napkins 80 50 100 80 150


required

Accordingly, a caterer has been requested to supply the cloth napkins according to
the schedule and no napkins in the beginning. After the festival is over caterer has no
use of napkins. A new napkin cost 50 Rs. The washing charges for a used napkin is
15 Rs by ordinary service and 25 Rs, if express service is used. A napkin given by
ordinary service is returned third day, while under express service it is return next
day. How the caterer should meet the requirement of the festival organizers so that
the total cost is minimized.
Dr. Manoj Kumar Pandey
Dr. Manoj Kumar Pandey
Dr. Manoj Kumar Pandey
Engineering Optimization ( ME F320)
Department of Mechanical Engineering
BITS Pilani K. K. Birla Goa campus
Instructor in charge: Dr. Biswajit Das
Email id: biswajitd@goa.bits-pilani.ac.in

BITS Pilani Goa campus Dr. Manoj Kumar Pandey


Problem

A company has two plants, each of which produces and supplies two products: A and
B. The plants can each work up to 16 hours a day. In plant 1, it takes three hours to
prepare and pack 1000 gallons of A and one hour to prepare and pack one quintal of
B. In plant 2, it takes two hours to prepare and pack 1000 gallons of A and 1.5 hours
to prepare and pack a quintal of B. In plant 1, it costs Rs 15000 to prepare and pack
1000 gallons of A and Rs 28000 to prepare and pack a quintal of B, whereas in plant
2 these costs are Rs 18000 and Rs 26000, respectively. The company is obliged to
produce daily at least 10 thousand gallons of A and 8 quintals of B. Formulate this
problem as an LP model to find out as to how the company should organize its
production so that the required amounts of the two products be obtained at minimum
cost.

Dr. Manoj Kumar Pandey


Dr. Manoj Kumar Pandey
Dr. Manoj Kumar Pandey
Trim loss or slitting problem
A paper company produces paper rolls with a standard width of 20 ft. each. Special
customer place order for different widths, and hence they are produced by slitting
the standard rolls. Typical order which may vary daily is summarized below.

Order Desired width (ft.) Desired no. of rolls

1 5 150

2 7 200

3 9 300

Formulate the problem as an LPP model to minimize the total wastages.

Dr. Manoj Kumar Pandey


Network or transportation problem
A dairy plant has two milk plants, daily milk production of 6 million litres and 9
million liters, respectively. Each day, the firm must fulfill the need of its three
distribution centers which have which have milk requirement of 7, 5, 3 million litres.
Cost of transportation of 1 million litres of milk from each plant to each distribution
centre is given in hundred of rupees below. Formulate the LP problem to minimize
the transportation cost.

Dist centre

Plant 1 2 3 Supply

1 2 3 11 6

2 1 9 6 9

Demand 7 5 3

Dr. Manoj Kumar Pandey


Engineering Optimization ( ME F320)
Department of Mechanical Engineering
BITS Pilani K. K. Birla Goa campus
Instructor in charge: Dr. Biswajit Das
Email id: biswajitd@goa.bits-pilani.ac.in

BITS Pilani Goa campus Dr. Manoj Kumar Pandey


Network or transportation problem
A dairy plant has two milk plants, daily milk production of 6 million litres and 9
million liters, respectively. Each day, the firm must fulfill the need of its three
distribution centers which have which have milk requirement of 7, 5, 3 million litres.
Cost of transportation of 1 million litres of milk from each plant to each distribution
centre is given in hundred of rupees below. Formulate the LP problem to minimize
the transportation cost.

Dist centre

Plant 1 2 3 Supply

1 2 3 11 6

2 1 9 6 9

Demand 7 5 3

Dr. Manoj Kumar Pandey


problem

A company produces two types of hats. Type I requires twice as much as labour time
as type II alone. If all labour time is dedicated to type II alone, the company can
produce a total of 400 hats of type II per day. Respective market limits for two types
are 150 and 200 per day. The profit is Rs. 8 for type I hat and Rs. 5 per type II hat.
Find the optimum no. of hats to be produced so that company's profit can be
maximized.

Dr. Manoj Kumar Pandey


Scheduling problem
Magsons daily needs anything between 32 to 40 workers to run the shop depending
on the time of the day. The rush hours are between noon and 2 PM. The number of
workers required at various hours is given in the table.
Time period No. of workers required
9 AM -11 AM 32
11 AM -1 PM 40
1 PM-3 PM 35
3 PM-5 PM 33
Magsons now employs 34 full time workers but also needs a few part time workers.
A part time worker must put in exactly 4 hours per day, but can start any time
between 9 AM to 1 PM. Full time workers work from 9 AM to 5 PM but are allowed
an hour for lunch. It is known that half the full time workers eat at 12 noon and other
half at 1 PM. Full timers thus provide 35 hours per week of productive labour time.
The management of Magsons limits part time hours to a maximum of 50 % of the
day’s total requirement. Part timers earn Rs. 48 per day on an average while full time
workers earn Rs. 140 per day in salary. Formulate the problem as an LPP model to
minimize the daily manpower cost.
Dr. Manoj Kumar Pandey
Engineering Optimization (ME F320)
Department of Mechanical Engineering
BITS Pilani K. K. Birla Goa campus
Instructor in charge: Dr. Biswajit Das

BITS Pilani Goa campus Dr. Manoj Kumar Pandey


LP-Graphical method

Graphical method:
(i) Extreme point solution method
(ii) Iso-profit (cost) function line method

Solution: Any value of the decision variables x j (j=1,2,..,n) that satisfy all the
constraints of an LP problem is called as a of that LP problem.

Feasible solution: The set of values of the decision variables xj (j=1,2,..,n) that
satisfy all the constraints and non negativity conditions simultaneously of an LP
problem is called as a of that LP problem.

Infeasible solution: The set of values of the decision variables xj (j=1,2,..,n) that
does not satisfy all the constraints and non negativity conditions simultaneously of
an LP problem is called as a of that LP problem.

Dr. Manoj Kumar Pandey


Extreme point solution method:

Covert the statement into mathematical LP model.

(a) Replace the inequality sign with equality sign for each constraint.
(b) Draw straight lines on the graph paper and take decision for area of feasible
solutions according to the inequality sign of the constraint.
(c) Shade the common portion of the graph that satisfies all the constraints drawn.
(d) The final shaded area called feasible region (or solution space) of the given LP
problem. Any point inside the shaded region is called feasible solution and these
solutions satisfy all the constraints.

(a) Determine the coordinates of each extreme point of the feasible solution space.
(b) Compute and compare the values of the objective function at each extreme point.
(c) Identify the extreme point that gives optimal (max or min) value of objective
function.

Dr. Manoj Kumar Pandey


Example 1
Max Z= 15x1 + 10x2
s.t.
4x1 + 6x2  360
3x1  180
5x2  200

x1 , x2 ≥ 0

Dr. Manoj Kumar Pandey


Dr. Manoj Kumar Pandey
Dr. Manoj Kumar Pandey
Dr. Manoj Kumar Pandey
Example 2
Max Z= 10x1 + 6x2
s.t.
5x1 + 3x2  30
x1 + 2x2  18

x1 , x2 ≥ 0

Dr. Manoj Kumar Pandey


Special cases in LP

Alternative or multiple optimal solutions


In few particular cases, a given LP problem can have more than one solution
producing the same optimal objective function value. Each of such optimal solutions
is termed as

Dr. Manoj Kumar Pandey


Special cases in LP

Alternative or multiple optimal solutions

Dr. Manoj Kumar Pandey


Special cases in LP

Alternative or multiple optimal solutions

Dr. Manoj Kumar Pandey


Example 3
Max Z= 3x1 + 2x2
s.t.
x1 - x2 ≥ 1
x1 + x2 ≥ 3

x1 , x2 ≥ 0

Dr. Manoj Kumar Pandey


Special cases in LP

Unbounded solution
occurs when particular decision variables and value of
objective function are permitted to increase infinitely without violating feasibility
condition.

Dr. Manoj Kumar Pandey


Special cases in LP

Unbounded solution

Dr. Manoj Kumar Pandey


Special cases in LP

Unbounded solution

Dr. Manoj Kumar Pandey


Example 4
Max Z= 6x1 - 4x2
s.t.
2x1 + 4x2  4
4x1 + 8x2 ≥ 16

x1 , x2 ≥ 0

Dr. Manoj Kumar Pandey


Special cases in LP

Infeasible solution
arises there is no solution that satisfies all the constraints
simultaneously.

Dr. Manoj Kumar Pandey


Special cases in LP

Infeasible solution

Dr. Manoj Kumar Pandey


Problem
The ABC company has been a producer of picture tubes for television sets and
certain printed circuits for radios. The company has just expanded into full scale
production and marketing of AM and AM-FM radios. It has built a new plant
that can operate 48 hours per week. Production of an AM radio in the new plant
will require 2 hours and production of an AM-FM radio will require 3 hours.
Each AM radio will contribute Rs 40 to profits while AM-FM radio will
contribute Rs 80 to profits. The marketing department, after extensive research
has determined that a maximum of 15 AM radios and 10 AM-FM radios can be
sold each week.

(a) Formulate an LP model to determine the optimum production mix of AM


and FM radios that will maximize profit.

(b) Solve the problem usinf the graphical method.

Dr. Manoj Kumar Pandey


Dr. Manoj Kumar Pandey
Dr. Manoj Kumar Pandey
Dr. Manoj Kumar Pandey
Engineering Optimization (ME F320)
Department of Mechanical Engineering
BITS Pilani K. K. Birla Goa campus
Instructor in charge: Dr. Biswajit Das

BITS Pilani Goa campus Dr. Manoj Kumar Pandey


Minimization case example
A diet for sick person must contain at least 4000 units of vitamins, 50 units of
minerals and 1400 units of calories. Two foods A and B are available at a cost of
Rs. 4 and Rs. 3 per unit, respectively. If one of A contains 200 units of vitamins, 1
unit of mineral and 40 calories and one unit of food B contains 100 units of
vitamins, 2 units of minerals and 40 calories. Formulate the LP problem and solve
it by graphical method to find the combination of foods to be used to have least
cost.

Dr. Manoj Kumar Pandey


Minimization case example
A diet for sick person must contain at least 4000 units of vitamins, 50 units of
minerals and 1400 units of calories. Two foods A and B are available at a cost of
Rs. 4 and Rs. 3 per unit, respectively. If one of A contains 200 units of vitamins, 1
unit of mineral and 40 calories and one unit of food B contains 100 units of
vitamins, 2 units of minerals and 40 calories. Formulate the LP problem and solve
it by graphical method to find the combination of foods to be used to have least
cost.

Dr. Manoj Kumar Pandey


Dr. Manoj Kumar Pandey
Dr. Manoj Kumar Pandey
Dr. Manoj Kumar Pandey
Mixed constraints example
A firm plans to purchase at least 200 quintals of scrap containing high quality
metal X and low quality metal Y. It decides that the scrap to be purchased must
contain at least 100 quintals of metal X and not more than 35 quintals of metal Y.
The firm can purchase the scrap from two suppliers (A and B) in unlimited
quantities. The percentage of X and Y metals in terms of weight in the scrap
supplied by A and B is given below.
Metals Supplier A Supplier B

X 25% 75%

Y 10% 20%

The price of A’s scrap is Rs 200 per quintal and that of B is Rs 400 per quintal.
The firm wants to determine the quantities that it should buy from the two
suppliers so that the total cost is minimized.
Dr. Manoj Kumar Pandey
Dr. Manoj Kumar Pandey
Dr. Manoj Kumar Pandey
Dr. Manoj Kumar Pandey
Practice problem
The manager of oil refinery must decide on the optimal mix of two possible
blending processes of which the inputs and outputs per production run are as
follows:

Process Input (units) Output (units)


(units) Grade A Grade B Gasoline X Gasoline Y
1 5 3 5 8

2 4 5 4 4

The maximum amounts available of crudes A and B are 200 units and 150 units,
respectively. Market requirements show that at least 100 units of gasoline X and
80 units of gasoline Y must be produced. The profits per production run for
process 1 and process 2 are Rs. 300 and Rs. 400, respectively. Formulate this
problem as an LP model and solve it using graphical method to determine the
production run for process 1 and Dr.
2.Manoj Kumar Pandey
Algebraic method

Algebraic Solution of LPPs


To solve an LPP algebraically, we first arrange it in the
standard form. That is all the variables are nonnegative
and all constraints (other than the non-negativity
restrictions) are equations with nonnegative RHS.

Standard algebraic form of LPP


• Change all constraints to equations with non negative
RHS.

• All variables should beDr. non negative.


Manoj Kumar Pandey
Algebraic method

Changing inequalities into equations (using SLACK and


SURPLUS variables)

SLACK VARIABLE: A slack variable is used to change a (  )


inequality to equation.

SURPLUS VARIABLE: A surplus variable to change a (≥) inequality to


equation.

Note : the slack and surplus variables are always non-negative

If the RHS of the equation is negative then multiply both sides of the
equation by -1.

Dr. Manoj Kumar Pandey


Algebraic method

Example 1:

Write the following LPP in the standard form:


Maximize z = x1 + x2
subject to
x1 + 2x2  6 --- (1)

2x1 + x2 ≥ 16 --- (2)

x1 , x2 ≥ 0

Dr. Manoj Kumar Pandey


Dr. Manoj Kumar Pandey
Engineering Optimization (ME F344 and ME F320)
Department of Mechanical Engineering
BITS Pilani K. K. Birla Goa campus
Instructor in charge: Dr. Biswajit Das

BITS Pilani Goa campus Dr. Manoj Kumar Pandey


Ø , is a popular algorithm used for numerically
solving linear programming problems.

Ø The algorithm was introduced by the American Mathematician


George B. Dantzig in 1947.

Ø The technique first published in the journal “Computing in Science


and Engineering”

Ø Listed as one of the top 10 algorithms of the century.

Ø The method uses the concept of a simplex, which is a polytope


(such as polygon, polyhedron etc.,) with finite number of vertices.

Ø A polytope is a geometric object with flat sides, and may exist in


any general number of dimensions n as an n-dimensional polytope
or n-polytope Manoj Kumar Pandey, OPTIMIZATION 2
2-dimensional Polytope

Dr. Manoj Kumar Pandey


How to Solve an LPP of higher dimension ?
o The constraints of a Linear Programming Problem give
rise to a polytope with finite number of vertices.

o If we can determine all the vertices of the polytope, then


we can calculate the value of the objective function at
these points and take the best one as our optimal solution.

o The Simplex Method is an iterative method which


moves from one vertex to another vertex (in the
direction of optimum improvement) until the optimal
solution is reached
Dr. Manoj Kumar Pandey
Dr. Manoj Kumar Pandey
Simplex Method

An iterative Initialization
procedure (Find initial BFS)

Is the current Stop


BFS optimal?

Move to a better
adjacent BFS

Manoj Kumar Pandey, OPTIMIZATION 6


Initial Assumptions

• All constraints are of ≤ type

• All right-hand-side values (bj, j=1, …,m) must


be non-negative

Manoj Kumar Pandey, OPTIMIZATION 7


Initialization

• Find an initial basic feasible solution

“If possible, use the origin as the initial BFS”

• Equivalent to:

Choose original variables to be non basic (xi=0, i=1,…n) and


let the slack variables be basic (sj=bj, j=1,…m)

Manoj Kumar Pandey, OPTIMIZATION 8


Optimality Test

• Are any adjacent BFS better than the current one?


• Rewrite Z in terms of nonbasic variables and investigate
rate of improvement
• Current nonbasic variables: x1 , x2
• Corresponding Z: Z = 3x1 + 5x2

Manoj Kumar Pandey, OPTIMIZATION 9


Direction of Movement

• Which edge to move on?


• Determine the direction of movement by selecting the
entering variable (variable ‘entering’ the basis)
• Choose the direction of steepest ascent
– x1: Rate of improvement in Z = 3
– x2: Rate of improvement in Z = 5

• Entering basic variable = x2

Manoj Kumar Pandey, OPTIMIZATION 10


The nonbasic variable that will become basic is referred to as
“entering” variable.

The basic variable that will become nonbasic is referred to as


“leaving” variable.

Criterion for “entering” variable


Choose that variable as the “entering” variable which has the
most –ve coefficient in the z-row in case it is a maximization
problem (most +ve coefficient in the z-row in case it is a
minimization problem) while writing it as an equation CX=0.

Manoj Kumar Pandey, OPTIMIZATION 11


Criterion for “leaving” variable (Feasibility Condition)

Let bi be the RHS of the ith row.

Let aij be the coefficient of the entering variable xj in the ith row.

The following “minimum ratio test” decides the leaving variable


Choose xk as the leaving variable where k is given as that row
index i for which the ratio

 bi 
 , aij  0  is Minimum
 aij 

Manoj Kumar Pandey, OPTIMIZATION 12


Let us consider the following problem

Maximize Z= 3x1+ 5x2

subject to
x1 ≤4
2x2 ≤ 12
3x1+ 2x2 ≤18
x1, x2 ≥ 0

Manoj Kumar Pandey, OPTIMIZATION 13


Write as system of equations

Z - 3x1 - 5x2 =0
x1 +s1 =4
2x2 +s2 = 12
3x1+ 2x2 +s3 = 18

Manoj Kumar Pandey, OPTIMIZATION 14


Basic
variable
Z x1 x2 s1 s2 s3 Solution

s1

s2

s3

Manoj Kumar Pandey, OPTIMIZATION 15


Ø Z-row is the objective equation row.

Ø The remaining 3 rows are the basic variable rows.

Ø Each row corresponds to a basic variable

Manoj Kumar Pandey, OPTIMIZATION 16


Iteration 1 :

Basic
Z x1 x2 s1 s2 s3 Solution
variable

Z 1 -3 -5 0 0 0 0

s1 0 1 0 1 0 0 4

s2 0 0 2 0 1 0 12

s3 0 3 2 0 0 1 18

Manoj Kumar Pandey, OPTIMIZATION 17


Choose that variable as the “entering” variable which has the most –ve
coefficient in the z-row in case it is a maximization
x2 enters the basis
Basic Min.
Z x1 x2 s1 s2 s3 Solution
variable Ratio
0/-5=No Ratio
Z 1 -3 -5 0 0 0 0
s1 0 1 0 1 0 0 4 4/0= ---------

s2 0 0 2 0 1 0 12 12/2 =6

18/2 =9
s3 0 3 2 0 0 1 18

Minimum Ratio is corresponding to S2


S2 leaves the basis

Manoj Kumar Pandey, OPTIMIZATION 18


The entering variable column is called the pivot column.

The leaving variable row is called the pivot row.

The coefficient in the intersection of the two is referred to as


the pivot element.

Apply elementary row operations to modify the simplex tableau so that


the pivot column has 1 at the pivot element and zero in all other places.

Pivot row
New pivot row= Current pivot row/ pivot element

All other rows (Z also)


New row=(current row)-(pivot column coefficient)×(new pivot
row) Manoj Kumar Pandey, OPTIMIZATION 19
Iteration 2 :

Min.
Basic Ratio
Z x1 x2 s1 s2 s3 Solution
variable

Z 1 -3 0 0 5/2 0 30 No Ratio

s1 0 1 0 1 0 0 4 4/1 = 4

x2 0 0 1 0 1/2 0 6 -------

s3 0 3 0 0 -1 1 6 6/3 =2

Stop: If all the entries in the Z-row are ≥ 0 ( or ≤ 0 )


in Max. (or Min.) then stop else repeat the iteration.

Manoj Kumar Pandey, OPTIMIZATION 20


Basic
Z x1 x2 s1 s2 s3 Solution
variable

Z 1 0 0 0 3/2 1 36

s1 0 0 0 1 1/3 -1/3 2

x2 0 0 1 0 1/2 0 6

x1 0 1 0 0 -1/3 1/3 2

All the entries in the Z-row are ≥ 0, hence we have reached


the optimal solution.

Optimal Solution: x1 = 2, x2 = 6, Z=36

Manoj Kumar Pandey, OPTIMIZATION 21


Optimal
Solution
(0, 6) (2, 6)

Feasible (4, 3)
Region

(0, 0) (4, 0)

Manoj Kumar Pandey, OPTIMIZATION 22


Points to Remember in Simplex Algorithm

Ø All the constraints should be ≤ type.

Ø All variables should be ≥ 0.

Ø Coefficients of basic variables in z-row should be zero.

Ø The coefficients matrix corresponding to initial basic


variables forms an identity matrix.

Ø The entering variable will be the one which has most


negative (most positive) z-row coefficient in case of max.
(min.) problem.
This is the first process that has been followed in few books.
There is other technique in next
Manoj Kumar Pandey, slides. Check that too.
OPTIMIZATION 23
Points to Remember …..

Ø Leaving variable should follow the minimum ratio test.

Ø When all the z-row coefficients are ≥ 0 (or ≤ 0) in case of


max. (or min.) problem the optimality is reached and we
will stop the simplex iteration.

Manoj Kumar Pandey, OPTIMIZATION 24


Engineering Optimization (ME F320)
Department of Mechanical Engineering
BITS Pilani K. K. Birla Goa campus
Instructor in charge: Dr. Biswajit Das

BITS Pilani Goa campus Dr. Manoj Kumar Pandey


A company makes two kinds of leather belts, belt A and belt B. Belt
A is a high quality belt B is of low quality. The respective profits are
as Rs. 4 and Rs. 3 per belt. The production of each of type A
requires twice as much as time as a belt of type B, and if all belts
were of type B, the company could make 1000 belts per day. The
supply of leather is sufficient for only 800 belts per day (both A and
B combined). Belt A requires a fancy buckle and only 400 of these
are available per day. There are only 700 buckles a day available for
belt B. What should be the daily production of each type of belt?
Formulate the problem as an LP model and solve it using simplex
method.

Manoj Kumar Pandey, OPTIMIZATION 2


Manoj Kumar Pandey, OPTIMIZATION 3
Standard form

Manoj Kumar Pandey, OPTIMIZATION 4


Iteration 1

Basic Basic Basic x1 x2 s1 s2 s3 s4 Min ratio


variabl varia variab
es bles le
coeffici values
ent
0 s1 1000 2 1 -1 0 1 0 1000/2=500

0 s2 800 1 2 0 -1 0 1 800/2=800

0 s3 400 1 0 0 0 1 0 400/1=400

0 s4 700 0 1 0 0 0 1 Not defined

5
Manoj Kumar Pandey, OPTIMIZATION 6
Manoj Kumar Pandey, OPTIMIZATION 7
Iteration 2

Basic Basic Basic x1 x2 s1 s2 s3 s4 Min ratio


variabl varia variab
es bles le
coeffici values
ent
0 s1

0 s2

4 x1

0 s4

8
Manoj Kumar Pandey, OPTIMIZATION 9
Iteration 3

Basic Basic Basic x1 x2 s1 s2 s3 s4 Min ratio


variabl varia variab
es bles le
coeffici values
ent
3 x2

0 s2

4 x1

0 s4

10
Manoj Kumar Pandey, OPTIMIZATION 11
Iteration 4

Basic Basic Basic x1 x2 s1 s2 s3 s4


variabl varia variab
es bles le
coeffici values
ent
3 x2

0 s3

4 x1

0 s4

12
Manoj Kumar Pandey, OPTIMIZATION 13
Engineering Optimization (ME F320)
Department of Mechanical Engineering
BITS Pilani K. K. Birla Goa campus
Instructor in charge: Dr. Biswajit Das

BITS Pilani Goa campus Dr. Manoj Kumar Pandey


Contents

Ø Artificial Variables Techniques

• Big M Method

• Two Phase Method

2
If in a starting simplex tableau, we don’t have an
identity sub matrix (i.e. an obvious starting BFS), then
we introduce artificial variables to have a starting BFS.

This is known as artificial variable technique.


There are two methods to find the starting BFS and
solve the problem –

(1) Big M Method


(2) Two-Phase Method.

3
Big M Method

4
 Suppose, ith constraint equation doesn't have a slack
variable. i.e.
ith constraint in the original LPP is either ≥ or = type .

 In this case, an artificial variable Ri is added, to form


the ith unit vector column.

 Since the artificial variables are not part of the


original LPP, they are assigned a very high penalty in
the objective function and thus forcing them to equal
zero in the optimum solution.

5
Artificial variable objective coefficient
= - M (Sum of artificial variables) in a maximization
problem,
= M (sum of the artificial variables ) in a minimization
problem
where M is a very large positive number.

Mathematically M 

6
This problem is solved in class:

Min Z = 600x1 + 500x2


subject to
2x1 + x2 ≥ 80
x1 + 2x2 ≥ 60

x1, x2 ≥ 0

Manoj Kumar Pandey, OPTIMIZATION 7


Standard form

Manoj Kumar Pandey, OPTIMIZATION 8


Iteration 1

Basic Basic Basic x1 x2 s1 s2 A1 A2 Min


variabl varia varia ratio
es bles ble
coeffic value
ient s
M A1 80 2 1 -1 0 1 0 80/1=80

M A2 60 1 2 0 -1 0 1 60/2=30

9
Manoj Kumar Pandey, OPTIMIZATION 10
Manoj Kumar Pandey, OPTIMIZATION 11
Iteration 2

Basic Basic Basic x1 x2 s1 s2 A1 Min


variabl varia varia ratio
es bles ble
coeffic value
ient s
M A1 50 3/2 0 -1 1/2 1 100/3

500 x2 30 1/2 1 0 -1/2 0 60

12
Manoj Kumar Pandey, OPTIMIZATION 13
Iteration 3

Basic Basic Basic x1 x2 s1 s2


variabl varia varia
es bles ble
coeffic value
ient s
600 x1 100/3 1 0 -2/3 1/3

500 x2 40/3 0 1 1/3 -2/3

14
Manoj Kumar Pandey, OPTIMIZATION 15
Engineering Optimization (ME F320)
Department of Mechanical Engineering
BITS Pilani K. K. Birla Goa campus
Instructor in charge: Dr. Biswajit Das

BITS Pilani Goa campus Dr. Manoj Kumar Pandey


An air force is experimenting with three types of bombs P, Q, and R
in which three types of explosives, viz. A, B and C will be used.
Taking the various factors into account, it has been decided to use
the maximum 600 kg of explosive A, at least 480 kg of explosive
Band exactly 540 kg of explosive C. Bomb P is estimated to give the
equivalent of a 2 ton explosion, bomb Q, a 3 ton of explosion and
bomb R, a 4 ton of explosion, respectively. Under what production
schedule can the Air force make the biggest bang?
Iteration 1

Basic Basic b=Xb x1 x2 x3 s1 s2 A1 A2 Min ratio


variables Variables
coefficie (B)
nt
(CB)

s1

A1

A2
Iteration 2

Basic Basic b=Xb x1 x2 x3 s1 s2 A2 Min ratio


variables Variables
coefficie (B)
nt
(CB)

s1

x2

A2
Iteration 3

Basic Basic b=Xb x1 x2 x3 s1 s2


variables Variables
coefficie (B)
nt
(CB)

s1

x2

x3
Engineering Optimization (ME F320)
Department of Mechanical Engineering
BITS Pilani K. K. Birla Goa campus
Instructor in charge: Dr. Biswajit Das

BITS Pilani Goa campus Dr. Manoj Kumar Pandey


Example 1

Max z = 3x1 + 2x2 + x3

Subject to
2x1 + 5x2 + x3 = 12
3x1 + 4x2 = 11

x2, x3≥ 0 and x1 unrestricted variable

Manoj Kumar Pandey, OPTIMIZATION 2


Manoj Kumar Pandey, OPTIMIZATION 3
Iteration 1

Basic Basic Basic X1’ X1’’ X2 X3 A1 Min ratio


variabl varia variab
es bles le
coeffici values
ent
1 x3 12 2 -2 5 1 0 12/5

-M A1 11 3 -3 4 0 1 11/4

4
Iteration 2

Basic Basic Basic X1’ X1’’ X2 X3 A1 Min ratio


variabl varia variab
es bles le
coeffici values
ent
2 x2 12/5 2/5 -2/5 1 1/5 0 12/5*5/2

-M A1 7/5 7/5 -7/5 0 -4/5 1 7/5*5/7

5
Iteration 3

Basic Basic Basic X1’ X1’’ X2 X3 Min ratio


variabl varia variab
es bles le
coeffici values
ent
2 x2 2 0 0 1 3/7 2/(3/7)=14/3

3 X1’ 1 1 -1 0 -4/7 ---

6
Iteration 4

Basic Basi Basic X X1’’ X2 X3



variables c variabl 1
coefficient vari e
able values
s
1 x3 14/3 0 0 7/3 1

3 X1’ 11/3 1 -1 4/3 0

7
Engineering Optimization (ME F320)
Department of Mechanical Engineering
BITS Pilani K. K. Birla Goa campus
Instructor in charge: Dr. Biswajit Das

BITS Pilani Goa campus Dr. Manoj Kumar Pandey


Special Cases in Simplex Method
Some exceptional cases that may occur while
solving an LPP

Ø Degeneracy

Ø Alternative optimal Solutions

Ø Unbounded Solutions

Ø Infeasible Solutions
ALTERNATIVE OPTIMUM SOLUTION
Example

Max z = 6x1 + 4x2


Subject to
2x1 + 3x2  30
3x1 + 2x2  24
x1 + x2 ≥ 3
x1, x2≥ 0
Before going into the solutions further for this problem take a note the
iteration or table shown in the next slide is the optimum table itself.
From there, we have tried to show you the example of multiple
solutions.
Optimal solution

Cj 6 4 0 0 0

Basic Basic b=Xb x1 x2 s1 s2 s3 Min ratio


variables Variables
coefficient (B)
(CB)

0 s1 14 0 5/3 1 -2/3 0 14/(15


/3)=42
/5
0 s3 5 0 -1/3 0 1/3 1 ----

6 x1 8 1 2/3 0 1/3 0 8/(2/3)


=12
Iteration 1

Cj 6 4 0 0 0

Basic Basic b=Xb x1 x2 s1 s2 s3


variables Variables
coefficient (B)
(CB)

4 x2 42/5 0 1 3/5 -2/5 0

0 s3 39/5 0 0 1/5 1/5 1

6 x1 12/5 1 0 -2/5 3/5 0


• Degeneracy will be discussed in the next class again. Hence,
that problem is not uploaded today.
Engineering Optimization (ME F320)
Department of Mechanical Engineering
BITS Pilani K. K. Birla Goa campus
Instructor in charge: Dr. Biswajit Das

BITS Pilani Goa campus Dr. Manoj Kumar Pandey


Special Cases in Simplex Method
DEGENERACY
Degeneracy
During the application of Simplex method, a tie for the
minimum ratio may be broken arbitrarily.

One of the reasons for degeneracy may be due to the presence


of some redundant constraint.

Implication: Cycling or circling, the simplex table starts repeating


itself after some iterations, that is to say that the value of the
objective function do not improve after a few iterations.
Solving the problem graphically

x2
Example 1 Constraint x1 + 4x2  8 is
redundant as it is not essential
Max z = 3x1 + 9x2 for finding the optimal solution

Subject to
x1 + 4x2  8
x1 + 2x2  4
x1 + 4x2  8
x1, x2≥ 0
x1
x1 + 2x2  4

Optimal solution occurs at (0,2) with z = 18.


Iteration 1

Cj 3 9 0 0

Basic Basic b=Xb x1 x2 s1 s2 Min ratio


variables Variables
coefficient (B)
(CB)

0 s1 8 1 4 1 0 8/4=2

0 s2 4 1 2 0 1 4/2=2
Rules for selection

Row x2 column Column


(pivot column)
s1 s2

s1 4 1 0

s1 2 0 1
Rules for selection

Row X2 column Column


(pivot column)
s1 s2

s1 4 ¼=1/4 0/4=0

s2 2 0/2=0 ½=1/2
Iteration 2

Cj 3 9 0 0

Basic Basic b=Xb x1 x2 s1 s2


variables Variables
coefficient (B)
(CB)

0 s1 0 -1 0 1 -2

9 x2 2 1/2 1 0 1/2
Degeneracy
If there is a tie between two decision variables then selection
can be made arbitrarily.

If there is a tie between a decision variable and a slack


variable, then select decision variable to leave into basis.

If there is a tie between two slack (or surplus variable), then
selection can be made arbitrarily.
How to remove degeneracy

 In two variable problems the redundant constraint can be identified


easily by graphical method.

 There are no reliable techniques for identifying redundant constraints


directly from the simplex table.
UNBOUNDED SOLUTION
Unbounded solution

 In some linear programming problems, the value of some of the


variables may be increased indefinitely without violating the constraints.

 This means that the solution space is unbounded in at least one


direction.

 As a result the objective function value may increase or decrease


indefinitely

 Unbounded solutions sometimes occur due to the poorly constructed


model. Some irregularities that may occur are ignoring the non
redundant constraints or incorrect estimation of parameters.
Example

Max z = 3x1 + 5x2


Subject to
x1 - 2x2  6
x1  10
x2 ≥ 1
x1, x2≥ 0
Iteration 1

Cj 3 5 0 0 0 -M

Basic Basic b=Xb x1 x2 s1 s2 s3 A1 Min ratio


variables Variables
coefficien (B)
t
(CB)

0 s1 6 1 -2 1 0 0 0 ---

0 s2 10 1 0 0 1 0 0 ----

-M A1 1 0 1 0 0 -1 1 1
Iteration 2

Cj 3 5 0 0 0 -M

Basic Basic b=Xb x1 x2 s1 s2 s3 A1


variables Variables
coefficien (B)
t
(CB)

0 s1 8 1 0 1 0 -2 2

0 s2 10 1 0 0 1 0 0

5 x2 1 0 1 0 0 -1 1
INFEASIBLE SOLUTION
Infeasible solution

LP models with inconsistent constraints have no feasible solution.

This situation can never occur when all the constraints are of the
type ().

If one of the artificial variable remains positive in the optimum


iteration, then the solution space will be infeasible
Example

Max z = 6x1 + 4x2


Subject to
x1 + x2  5
x2 ≥ 8
x1, x2≥ 0
Iteration 1

Cj 6 4 0 0 -M

Basic Basic b=Xb x1 x2 s1 s2 A1 Min ratio


variables Variables
coefficient (B)
(CB)

0 s1 5 1 1 1 0 0 5/1

-M A1 8 0 1 0 -1 1 8/1
Iteration 2

Cj 6 4 0 0 -M

Basic Basic b=Xb x1 x2 s1 s2 A1


variables Variables
coefficient (B)
(CB)

4 x2 5 1 1 1 0 0

-M A1 3 -1 0 -1 -1 1
Engineering Optimization (ME F344 and ME F320)
Department of Mechanical Engineering
BITS Pilani K. K. Birla Goa campus
Instructor in charge: Dr. Biswajit Das

BITS Pilani Goa campus Dr. Manoj Kumar Pandey


Simplex method

Case II-at least one constraint


Case I-at least one
hold ≥ or =
constraint hold 

Regular simplex method Big M or Two phase method

Manoj Kumar Pandey, OPTIMIZATION 2


Why use two phase method when Big M - method
is already there ?

One major disadvantage of Big M - method is that it


is computationally inefficient.

Mathematically it is said that M should be a very


large number, but sometimes very large values of M
may lead to a wrong result.

Manoj Kumar Pandey, OPTIMIZATION 3


Phase - I

We construct an auxiliary LPP

The objective function is sum of artificial variables,


with the original constraints

The optimal solution of the auxiliary problem will give


a starting BFS for the original problem.

4
Phase - II

We use the basic feasible solution available from the


Phase-I to find the optimal solution of the original
problem.

5
Example

Min z = x1 + x2
Subject to
2x1 + x2 ≥ 4
x1 + 7x2 ≥ 7
x1, x2≥ 0

Manoj Kumar Pandey, OPTIMIZATION 6


Standard form

Max z* = -x1 - x2
Subject to
2x1 + x2 –s1 +A1 = 4
x1 +7x2 –s2 +A2 = 7

x1, x2, s1, s2, A1, A2 ≥ 0

Manoj Kumar Pandey, OPTIMIZATION 7


Phase I

Max z* = -A1 - A2
Subject to
2x1 + x2 –s1 +A1 = 4
x1 +7x2 –s2 +A2 = 7

x1, x2, s1, s2, A1, A2 ≥ 0

Manoj Kumar Pandey, OPTIMIZATION 8


Initial table

Cj 0 0 0 0 -1 -1

Basic Basic b=Xb x1 x2 s1 s2 A1 A2


variables Variables
coefficient (B)
(CB)

-1 A1 4 2 1 -1 0 1 0

-1 A2 7 1 7 0 -1 0 1
Iteration 1

Cj 0 0 0 0 -1 -1

Basic Basic b=Xb x1 x2 s1 s2 A1 A2


variables Variables
coefficient (B)
(CB)

-1 A1 3 13/7 0 -1 1/7 1 -1/7

0 x2 1 1/7 1 0 -1/7 0 1/7


Iteration 2 Formulate this table by yourself for practice

Cj

Basic Basic b=Xb x1 x2 s1 s2 A1 A2


variables Variables
coefficient (B)
(CB)
Phase II: Initial table Formulate this table by yourself for practice
Cj 0 0 0 0

Basic Basic b=Xb x1 x2 s1 s2


variables Variables
coefficient (B)
(CB)
Example

Min z = x1 - 2x2 - 3x3


Subject to
-2x1 + x2 + 3x3 = 2
2x1 + 3x2 + 4x3 = 1
x1, x2, x3 ≥ 0

Manoj Kumar Pandey, OPTIMIZATION 14


Initial table

Cj 0 0 0 -1 -1

Basic Basic b=Xb x1 x2 x3 A1 A2


variables Variables
coefficient (B)
(CB)

-1 A1 2 -2 1 3 1 0

-1 A2 1 2 3 4 0 1
Iteration 1
Cj 0 0 0 -1

Basic Basic b=Xb x1 x2 x3 A1


variables Variables
coefficient (B)
(CB)

-1 A1 5/4 -7/2 -5/4 0 1

0 x3 1/4 1/2 3/4 1 0


 In Phase I we always minimize the sum of the
artificial variables.

 If in the optimal table of phase I an artificial variables


remains at non-zero level in the basis, then the problem
has no feasible solution.

17
Engineering Optimization (ME F344 and ME F320)
Department of Mechanical Engineering
BITS Pilani K. K. Birla Goa campus
Instructor in charge: Dr. Biswajit Das

BITS Pilani Goa campus Dr. Manoj Kumar Pandey


MATRIX FORMULATION
of
LINEAR PROGRAMMING PROBLEM
Consider the following LPP (standard form)

Max (or Min) z  c1 x1  c2 x2  ...  cn xn


Subject to
a11 x1  a12 x2  ...  a1n xn  b1
a21 x1  a22 x2  ...  a2 n xn  b2
.
.
am1 x1  am 2 x2  ...  amn xn  bm
x1 , x2 ,..., xn  0, b1 , b2 ,..., bm  0
Using the notations
 x1   b1 
x  b 
 2  2
C  c1 c2 . . cn  , X  .  , b . 
   
.  . 
 xn  bm 

 a11 a12 . . a1n 


a a22 . . a2 n 
 21
A . 
 
 . 
 am1 am 2 . . amn 
The problem can be written as

 1 c   z   0 
 
   
 0 A    
X b
Let B is a m x m non-singular sub-matrix of the
coefficient matrix A.
Let XB be the corresponding set of basic variables
with cB as its associated objective vector. The
corresponding solution (and the objective function
value ) may be computed as follows:

1 -cB   z  0
  X    
0 B   B b 
1
 z  1  CB  0 
 X   0  b 
 B  B   
 z  1 CB B  0
1

X   1   
 B  0 B  b

 z  C B B b   C B X B 
1
 
 X   1   B 1 b 
 B  B b   
The general simplex tableau:

 1 cB B   1 c   z   1 cB B   0 
1 1

 1        1   
 0 B   0 A   X   0 B  b 

Multiplying out the matrices, we get

 1 cB B A - C   z   cB B b 
1 1

 1      1 
0 B A  X  B b 
Thus in the new simplex tableau the z column
will be 1 
0
 
 . 
 
 . 

0 

The column of xj (in the constraint equations)


will be B 1 A j ,
where A j is the jth column of A.
i.e., the column corresponding to xj.
1
The solution column will be B b.
And in the z-row, the coefficient of xj will be
1
cBB Aj  c j  z j  c j
Finally the solution entry in the z-row will
be 1
c B b
B

In matrix form the new tableau will look like


Basic z X Solution
1 1
z 1 cB B A  C cB B b
1
XB 0 1
B A B b
In terms of the components xj , the new
tableau will look like

Basic z xj Solution
1 1
z 1 cB B Aj  c j cB B b
1 1
XB 0 B Aj B b
Using the notations

A= Coefficient of decision variables in constraints


b= Right hand side of constraints
B= Coefficient of basic variables in constraints
C= Coefficient of decision variables in objective function
Cb= Coefficient of basic variables in objective function
Example

Max Z =5 x1+ 4x2


Subject to
2x1 + x2 ≤ 20
x1 + x2 ≤ 18
x1 + 2x2 ≥ 12
x1, x2 ≥ 0.
Rules
Step 1: Find the variables that will serve as basic variable

Step 2: Obtain B-1

Step 3: Obtain B-1A, and B-1b’

Step 4: Obtain CBB-1A-C (Zj-Cj) ≥ 0, you can finish


otherwise go back to step 1 and continue.
Engineering Optimization (ME F344 and ME F320)
Department of Mechanical Engineering
BITS Pilani K. K. Birla Goa campus
Instructor in charge: Dr. Biswajit Das

BITS Pilani Goa campus Dr. Manoj Kumar Pandey


MATRIX FORMULATION
of
LINEAR PROGRAMMING PROBLEM
Consider the following LPP (standard form)

Max (or Min) z  c1 x1  c2 x2  ...  cn xn


Subject to
a11 x1  a12 x 2  ...  a1 n x n  b1
a 21 x1  a 22 x 2  ...  a 2 n x n  b 2
.
.
a m 1 x1  a m 2 x 2  ...  a m n x n  b m
x1 , x 2 , ..., x n  0, b1 , b 2 , ..., b m  0
Using the notations
 x1   b1 
x  b 
 2  2
C   c1 cn  X  .  , b  . 
c2 . . ,    
.  . 
 xn   bm 

 a1 1 a1 2 . . a1 n 
a a 22 . . a 2 n 
 21
A   . 
 
 . 
 a m 1 am 2 . . a m n 
Using the notations

A= Coefficient of decision variables in constraints


b= Right hand side of constraints
B= Coefficient of basic variables in constraints
C= Coefficient of decision variables in objective function
Cb= Coefficient of basic variables in objective function
Example

Max Z =5 x1+ 4x2


Subject to
2x1 + x2 ≤ 20
x1 + x2 ≤ 18
x1 + 2x2 ≥ 12
x1, x2 ≥ 0.
Engineering Optimization (ME F320)
Department of Mechanical Engineering
BITS Pilani K. K. Birla Goa campus
Instructor in charge: Dr. Biswajit Das

BITS Pilani Goa campus Dr. Manoj Kumar Pandey


Ø The term ‘Dual’ implies two or double.

Ø This concept is useful for managerial decision making.


Ex: In a two person game theory, one competitor’s
problem is dual of opponent’s dual problem.

Ø To every LPP, there is an associated LPP which is called


the dual of the original problem (or the primal problem).

Ø The two problems are so closely related that the optimal


solution of one yields the optimal solution of the other
problem.
Example: There is a small company which has recently
become engaged in the production of office furniture. The
company manufactures tables, desks and chairs. The
production of a table requires 8kgs of wood and 5kgs of
metal and is sold for $80; a desk uses 6kgs of wood and
4kgs of metal and is sold for $60; and a chair requires 4kgs
of both metal and wood and is sold for $50. We would like
to determine the revenue maximizing strategy for the
company, given that their resources are limited to 100kgs of
wood and 60kgs of metal.
Ø Now, consider a company of higher capacity as compared to the
previous company which has been the lone producer of this type of
furniture for many years.

Ø They don’t appreciate the competition from this new company; so


they have decided to tender an offer to buy all of their competitor’s
resources and therefore put them out of business.

Ø The challenge for this large company then is to develop a LPP


which will determine the appropriate amount of money that
should be offered for a unit of each type of resource, such that
the offer will be acceptable to the smaller company while
minimizing the expenditure of the large company.
Dual LPP :

y1 and y2 are cost of


per kg of wood and
metal
Definition of the dual problem
Primal (Original) LPP (in standard form)
Maximize z  c1 x1  c2 x2  ...  cn xn
subject to a11 x1  a12 x 2  ...  a1 n x n  b1
a 21 x1  a 22 x 2  ...  a 2 n x n  b2
.
.
a m 1 x1  a m 2 x 2  ...  a mn x n  bm
x1 , x 2 , ..., x n  0
Rules
Let y j be the dual variable
1. Number of dual variablesy =j Number of constraints
in the primal.
2. Number of variables ( xi ) in the primal = Number of
constraints in the dual

3. If the primal is maximization then the dual is


minimization and all constraints are  .
If the primal is minimization then the dual is
maximization and all constraints are .
4. In the primal, all variables are  0 while in the
dual all the variables are unrestricted in sign.

5. The objective function coefficients ci of the primal


are the RHS constants of the dual constraints.
6. The RHS constants bj of the primal constraints are
the objective function coefficients of the dual.
7. The coefficient matrix of the constraints of the dual
is the transpose of the coefficient matrix of the
constraints of the primal.
Matrix Form
Primal Problem (in the Standard Form) :

M a x. z  C X
S u b je c t to
AX  b
X  0
Where
 x1   b1 
x  b 
 2  2
C   c1 c2 . . cn  X  .  , b  . 
,    
.  . 
 xn   bm 

 a11 a12 . . a1 n 
a a 22 . . a2 n 
 21
A . 
 
 . 
 a m 1 am 2 . . a mn 
Dual Problem:
T
Min. w  b Y
Subject to
T T
A Y C
Y Unrestricted in sign
T
where Y  ( y1 y 2  y m )
Write the dual of the LP

Maximize z  x1  x2
subject to
2 x1  x2  5
3x1  x2  6
x1 , x2 unrestricted in sign
Engineering Optimization (ME F320)
Department of Mechanical Engineering
BITS Pilani K. K. Birla Goa campus
Instructor in charge: Dr. Biswajit Das

BITS Pilani Goa campus Dr. Manoj Kumar Pandey


Dual Simplex Method
Why use dual simplex?

• Adding a new constraint to a solved LP.

• Finding a new solution after the right hand side changes.

• Solving Min. problems without big-M


Dual Simplex Method
In simplex method, we start with a basic feasible
solution (which is not optimal) and move towards
optimality.

In the dual simplex method, the exact opposite occurs.


We start with an “optimal” solution (which is not
feasible) and move towards feasibility. The algorithm
ends once we obtain feasibility.
To start the dual Simplex method, the following three
conditions need to be satisfied:
1. The objective function must satisfy the optimality conditions
of the regular Simplex method.
2. All the constraints must be of the type .
3. All variables should be  0.

Note: As in the simplex method, we must have an identity


matrix in the constraint matrix; however, the RHS
constants bi need Not be  0.
In dual simplex method, we first decide the “leaving”
variable and then decide entering variable.
Dual Feasibility Condition (Condition for a
variable to leave )

The leaving variable x i , is the basic variable


having the most negative value.

Ties are broken arbitrarily.

If all the basic variables are  0, the algorithm ends


and we obtain the optimal solution.
The entering variable, xj , is determined from
among the non-basic variables as the one for
which the ratio

 z j  c j

 , a ij  0
 a ij 

is minimum, aij is the coefficient of xj in the leaving


variable (xi) row.
Ties are broken arbitrarily.
Basic Z x1 x2 S1 S2 Sol.
Z 1 -2 -3 0 0 0
S1 0 2 2-2 1 0 30
S2 0 -1 -2 0 1 -10
Basic Z x1 x2 S1 S2 Sol.
Z 1 -1/2 0 0 -3/2 15
S1 0 1 0 1 1 20

x2 0 1/2 1 0 -1/2 5
This is the optimal tableau.

Optimal sol: x1= 0, x2=5; Optimum Value: z =15


Engineering Optimization (ME F320)
Department of Mechanical Engineering
BITS Pilani K. K. Birla Goa campus
Instructor in charge: Dr. Biswajit Das

BITS Pilani Goa campus Dr. Manoj Kumar Pandey


Primal –Dual relations:
Primal optimal, dual optimal.

Primal unbounded, dual infeasible.

Primal infeasible, dual unbounded.


Iteration 1
Cj -3 -2 0 0 M M

Basic Basic b=Xb y1 y2 s1 s2 A1 A2 Min ratio


variables Variables
coefficien (B)
t
(CB)

M A1 4 -1 -1 -1 0 1 0 ----

M A2 1 -1 1 0 -1 0 1 2
Iteration 2
Cj -3 -2 0 0 M M

Basic Basic b=Xb y1 y2 s1 s2 A1 A2


variables Variables
coefficient (B)
(CB)

M A1 6 -2 0 -1 -1 1 1

-2 y2 2 -1 1 0 -1 0 1
Final table or optimal table
Cj 1 -3 2 0 0 0

Basic Basic b=Xb x1 x2 x3 s1 s2 s3


variables Variables
coefficient (B)
(CB)

1 x1 9/8 1 -3/8 0 1/4 0 -1/16

0 s2 57/4 0 13/4 0 1/2 1 -1/8

2 x3 29/16 0 1/16 1 1/8 0 3/32

You might also like