Вы находитесь на странице: 1из 64

Linear Problem (LP)

Rajib Bhattacharjya
Department of Civil Engineering
IIT Guwahati
Linear programming

It is an optimization method applicable for the solution of optimization problem


where objective function and the constraints are linear

It was first applied in 1930 by economist, mainly in solving resource allocation


problem

During World War II, the US Air force sought more effective procedure for allocation
of resources

George B. Dantzig, a member of the US Air Force formulate general linear problem
for solving the resources allocation problem.

The devised method is known as Simplex method


Rajib Bhattacharjya, IITG CE 602: Optimization Method
Linear programming
It is considered as a revolutionary development that helps in obtaining optimal
decision in complex situation
Some of the great contributions are
George B. Dantzig : Devised simplex method
Kuhn and Tucker : Duality theory in LP
Charnes and Cooper: Industrial application of LP
Karmarkar : Karmarkar’s method

Nobel prize awarded for contribution related to LP


Nobel prize in economics was awarded in 1975 jointly to L.V. Kantorovich of the
former Soviet Union and T.C. Koopmans of USA on the application of LP to the
economic problem of resource allocation.

Rajib Bhattacharjya, IITG CE 602: Optimization Method


Linear programming
Standard form of Linear Problem (LP)

Minimize ݂ ‫ݔ‬ଵ , ‫ݔ‬ଶ , ‫ݔ‬ଷ , … , ‫ݔ‬௡ = ܿଵ ‫ݔ‬ଵ + ܿଶ ‫ݔ‬ଶ + ܿଷ ‫ݔ‬ଷ +… + ܿ௡ ‫ݔ‬௡


Subject to
ܽଵଵ ‫ݔ‬ଵ + ܽଵଶ ‫ݔ‬ଶ + ܽଵଷ ‫ݔ‬ଷ + ⋯ + ܽଵ௡ ‫ݔ‬௡ = ܾଵ

ܽଶଵ ‫ݔ‬ଵ + ܽଶଶ ‫ݔ‬ଶ + ܽଶଷ ‫ݔ‬ଷ + ⋯ + ܽଶ௡ ‫ݔ‬௡ = ܾଶ

ܽଷଵ ‫ݔ‬ଵ + ܽଷଶ ‫ݔ‬ଶ + ܽଷଷ ‫ݔ‬ଷ + ⋯ + ܽଷ௡ ‫ݔ‬௡ = ܾଷ

⋮ ⋮ ⋮
ܽ௠ଵ ‫ݔ‬ଵ + ܽ௠ଶ ‫ݔ‬ଶ + ܽ௠ଷ ‫ݔ‬ଷ + ⋯ + ܽ௠௡ ‫ݔ‬௡ = ܾ௠

‫ݔ‬ଵ , ‫ݔ‬ଶ , ‫ݔ‬ଷ , … , ‫ݔ‬௡ ≥ 0

Rajib Bhattacharjya, IITG CE 602: Optimization Method


Linear programming
Standard form of Linear Problem (LP) in Matrix form

Minimize ݂ ܺ = ܿ ் ܺ
Subject to
ܽܺ = ܾ
ܺ≥0

Where
‫ݔ‬ଵ ܾଵ ܿଵ ܽଵଵ ܽଵଶ ⋯ ܽଵ௡
‫ݔ‬ଶ ܾ ܿଶ ܽଶଵ ܽଶଶ ⋯ ܽଶ௡
ܺ= ⋮ ܾ= ଶ ܿ= ⋮ ܽ= ⋮ ⋮ ⋱ ⋮

‫ݔ‬௡ ܾ௡ ܿ௡ ܽ௠ଵ ܽ௠ଶ ⋯ ܽ௠௡

Rajib Bhattacharjya, IITG CE 602: Optimization Method


Linear programming
Characteristic of linear problem are
1. The objective function is minimization type
2. All constraints are equality type
3. All the decision variables are non-negative

Rajib Bhattacharjya, IITG CE 602: Optimization Method


Linear programming
Characteristic of linear problem are
1. The objective function is minimization type

For maximization problem


Maximize ݂ ‫ݔ‬ଵ , ‫ݔ‬ଶ , ‫ݔ‬ଷ , … , ‫ݔ‬௡ = ܿଵ ‫ݔ‬ଵ + ܿଶ ‫ݔ‬ଶ + ܿଷ ‫ݔ‬ଷ +… + ܿ௡ ‫ݔ‬௡

Equivalent to
Minimize ‫ = ܨ‬−݂ ‫ݔ‬ଵ , ‫ݔ‬ଶ , ‫ݔ‬ଷ , … , ‫ݔ‬௡ = −ܿଵ ‫ݔ‬ଵ − ܿଶ ‫ݔ‬ଶ − ܿଷ ‫ݔ‬ଷ −… − ܿ௡ ‫ݔ‬௡

Rajib Bhattacharjya, IITG CE 602: Optimization Method


Linear programming
Characteristic of linear problem are
2. All constraints are equality type
ܽ௞ଵ ‫ݔ‬ଵ + ܽ௞ଶ ‫ݔ‬ଶ + ܽ௞ଷ ‫ݔ‬ଷ + ⋯ + ܽ௞௡ ‫ݔ‬௡ = ܾ௞

If it is less than type If it is greater than type


ܽ௞ଵ ‫ݔ‬ଵ + ܽ௞ଶ ‫ݔ‬ଶ + ܽ௞ଷ ‫ݔ‬ଷ + ⋯ + ܽ௞௡ ‫ݔ‬௡ ≤ ܾ௞ ܽ௞ଵ ‫ݔ‬ଵ + ܽ௞ଶ ‫ݔ‬ଶ + ܽ௞ଷ ‫ݔ‬ଷ + ⋯ + ܽ௞௡ ‫ݔ‬௡ ≥ ܾ௞

It can be converted to It can be converted to


ܽ௞ଵ ‫ݔ‬ଵ + ܽ௞ଶ ‫ݔ‬ଶ + ܽ௞ଷ ‫ݔ‬ଷ + ⋯ + ܽ௞௡ ‫ݔ‬௡ + ‫ݔ‬௡ାଵ = ܾ௞ ܽ௞ଵ ‫ݔ‬ଵ + ܽ௞ଶ ‫ݔ‬ଶ + ܽ௞ଷ ‫ݔ‬ଷ + ⋯ + ܽ௞௡ ‫ݔ‬௡ − ‫ݔ‬௡ାଵ = ܾ௞

Slack variable Surplus variable

Rajib Bhattacharjya, IITG CE 602: Optimization Method


Linear programming
Characteristic of linear problem are
3. All the decision variables are non-negative

‫ݔ‬ଵ , ‫ݔ‬ଶ , ‫ݔ‬ଷ , … , ‫ݔ‬௡ ≥ 0

Is any variable ‫ݔ‬௝ is unrestricted in sign, it can be expressed as

‫ݔ‬௝ = ‫ݔ‬௝ᇱ − ‫ݔ‬௝ᇱᇱ

Where, ‫ݔ‬௝ᇱ , ‫ݔ‬௝ᇱᇱ ≥ 0

Rajib Bhattacharjya, IITG CE 602: Optimization Method


Linear programming
There are ݉ equations and ݊ decision variable
Now see the conditions
If ݉ > ݊, there will be ݉ − ݊ redundant equations which can be eliminated
If ݉ = ݊, there will be an unique solution or there may not be any solution
If ݉ < ݊, a case of undetermined set of linear equations, if they have any
solution, there may be innumerable solutions
The problem of linear programming is to find out the best solution that satisfy
all the constraints

Rajib Bhattacharjya, IITG CE 602: Optimization Method


Maximize ‫ܿ = ݖ‬ଵ ‫ ݔ‬+ ܿଶ ‫ݕ‬
Subject to

Infeasible
region

Infeasible region

Infeasible
Feasible
region

‫݌ = ݖ‬ସ

Infeasible region
‫݌ = ݖ‬ଶ ‫݌ = ݖ‬ଷ
‫݌ = ݖ‬ଵ
Increasing z direction Maximize ‫ܿ = ݖ‬ଵ ‫ ݔ‬+ ܿଶ ‫ݕ‬
Subject to

Infeasible
region
As such solution of
the problem will
Infeasible region be one of the
corners of the
Infeasible
Feasible
search space
region

Infeasible region

‫݌ = ݖ‬ଵ ‫݌ = ݖ‬ଶ ‫݌ = ݖ‬ଷ


Maximize ‫ܿ = ݖ‬ଵ ‫ ݔ‬+ ܿଶ ‫ݕ‬
Subject to

Infeasible
region
This problem has
infinite number of
Infeasible region solutions

Infeasible
Feasible
region

Infeasible region

‫݌ = ݖ‬ଷ
‫݌ = ݖ‬ଵ ‫݌ = ݖ‬ଶ
Maximize ‫ܿ = ݖ‬ଵ ‫ ݔ‬+ ܿଶ ‫ݕ‬
Subject to

Feasible region

Infeasible This is a problem


region Infeasible region of unbounded
solution

Infeasible region
Search space

Convex Search space Non Convex Search space


Rajib Bhattacharjya, IITG CE 602: Optimization Method
Rajib Bhattacharjya, IITG CE 602: Optimization Method
Some definitions
Point of ݊ -Dimensional space
A point ܺ in an ݊ -dimensional space is characterized by an ordered set of
݊ values or coordinates. The coordinate of ܺ are also called the
component of ܺ.
Line segment in ݊-Dimensions (L)
If coordinates of two pints ܺଵ and ܺ ଶ are given, the line segment (L)
joining these points is the collection of points ܺ ߣ whose coordinates are
given by
ܺ ߣ = ߣܺଵ + 1 − ߣ ܺ ଶ


Thus L = ܺ|ܺ = ߣܺ + 1 − ߣ ܺ ଶ ܺ ଵ
ܺ ߣ ܺ

Rajib Bhattacharjya, IITG 0≥ߣ≥1 CE 602: Optimization Method


Some definitions
Hyperplane
In ݊ -dimensional space, the set of points whose coordinate satisfy a linear
equation
ܽଵ ‫ݔ‬ଵ + ܽଶ ‫ݔ‬ଵ + ܽଷ ‫ݔ‬ଵ + ⋯ + ܽ௡ ‫ݔ‬௡ = ்ܽ ܺ = ܾ
is called a hyperplane
A hyperplane is represented by
‫ܽ ܪ‬, ܾ = ܺ|்ܽ ܺ = ܾ
A hyperplane has ݊ − 1 dimensions in an ݊-dimensional space
It is a plane in three dimensional space
It is a line in two dimensional space
Rajib Bhattacharjya, IITG CE 602: Optimization Method
‫ܪ‬ା
30

25

20

15

10
Plane
‫ିܪ‬
5

‫ ܪ‬ା = ܺ|்ܽ ܺ ≥ ܾ
0
10

8
0
6 2
4
4

‫ܾ ≤ ܺ ்ܽ|ܺ = ି ܪ‬
6
2
8
0 10

10

‫ିܪ‬
9

Line
‫ܪ‬ା
5

1
1 2 3 4 5 6 7 8 9 10

Rajib Bhattacharjya, IITG CE 602: Optimization Method


Convex Set
A convex set is a collection of points such that if ܺଵ and ܺ ଶ are any two
points in the collection, the line segment joining them is also in the
collection, which can be defined as follows
If ܺଵ , ܺ ଶ ∈ ܵ, then ܺ ∈ ܵ
Where ܺ ߣ = ߣܺଵ + 1 − ߣ ܺ ଶ 0≥ߣ≥1

Vertex or Extreme point

Rajib Bhattacharjya, IITG CE 602: Optimization Method


Feasible solution
In a linear programming problem, any solution that satisfy the conditions

ܽܺ = ܾ
ܺ≥0
is called feasible solution

Basic solution
A basic solution is one in which ݊ − ݉ variable are set equal to zero and
solution can be obtained for the ݉ number variable

Rajib Bhattacharjya, IITG CE 602: Optimization Method


Basis
The collection of variables not set equal to zero to obtain the basic solution
is called the basis.
Basic feasible solution
This is the basic solution that satisfies the non-negativity conditions

Nondegenerate basic feasible solution


This is a basic feasible solution that has got exactly ݉ positive ‫ݔ‬௜
Optimal solution
A feasible solution that optimized the objective function is called an
optimal solution
Rajib Bhattacharjya, IITG CE 602: Optimization Method
Solution of system of linear simultaneous equations
ܽଵଵ ‫ݔ‬ଵ + ܽଵଶ ‫ݔ‬ଶ + ܽଵଷ ‫ݔ‬ଷ + ⋯ + ܽଵ௡ ‫ݔ‬௡ = ܾଵ Eଵ
ܽଶଵ ‫ݔ‬ଵ + ܽଶଶ ‫ݔ‬ଶ + ܽଶଷ ‫ݔ‬ଷ + ⋯ + ܽଶ௡ ‫ݔ‬௡ = ܾଶ Eଶ
ܽଷଵ ‫ݔ‬ଵ + ܽଷଶ ‫ݔ‬ଶ + ܽଷଷ ‫ݔ‬ଷ + ⋯ + ܽଷ௡ ‫ݔ‬௡ = ܾଷ Eଷ
⋮ ⋮ ⋮
ܽ௡ଵ ‫ݔ‬ଵ + ܽ௡ଶ ‫ݔ‬ଶ + ܽ௡ଷ ‫ݔ‬ଷ + ⋯ + ܽ௡௡ ‫ݔ‬௡ = ܾ௡ E௡

Elementary operation
1. Any equation ‫ܧ‬௥ can be replaced by ݇‫ܧ‬௥ , where ݇ is a non zero constant
2. Any equation ‫ܧ‬௥ can be replaced by ‫ܧ‬௥ + ݇‫ܧ‬௦ , where ‫ܧ‬௦ is any other
equation

Rajib Bhattacharjya, IITG CE 602: Optimization Method


Using these elementary row operation, a particular variable can be
eliminated from all but one equation. This operation is known as Pivot
operation
Using pivot operation, we can transform the set of equation to the following
form
1‫ݔ‬ଵ + 0‫ݔ‬ଶ + 0‫ݔ‬ଷ + ⋯ + 0‫ݔ‬௡ = ܾଵᇱ
0‫ݔ‬ଵ + 1‫ݔ‬ଶ + 0‫ݔ‬ଷ + ⋯ + 0‫ݔ‬௡ = ܾଶᇱ
0‫ݔ‬ଵ + 0‫ݔ‬ଶ + 1‫ݔ‬ଷ + ⋯ + 0‫ݔ‬௡ = ܾଷᇱ
⋮ ⋮ ⋮
0‫ݔ‬ଵ + 0‫ݔ‬ଶ + 0‫ݔ‬ଷ + ⋯ + 1‫ݔ‬௡ = ܾ௡ᇱ
Now the solution are
‫ݔ‬௜ = ܾ௜ᇱ ݅ = 1,2,3, … , ݊
Rajib Bhattacharjya, IITG CE 602: Optimization Method
General system of equations
ܽଵଵ ‫ݔ‬ଵ + ܽଵଶ ‫ݔ‬ଶ + ܽଵଷ ‫ݔ‬ଷ + ⋯ + ܽଵ௡ ‫ݔ‬௡ = ܾଵ
ܽଶଵ ‫ݔ‬ଵ + ܽଶଶ ‫ݔ‬ଶ + ܽଶଷ ‫ݔ‬ଷ + ⋯ + ܽଶ௡ ‫ݔ‬௡ = ܾଶ
ܽଷଵ ‫ݔ‬ଵ + ܽଷଶ ‫ݔ‬ଶ + ܽଷଷ ‫ݔ‬ଷ + ⋯ + ܽଷ௡ ‫ݔ‬௡ = ܾଷ Pivotal variables
⋮ ⋮ ⋮ Non pivotal variables
ܽ௠ଵ ‫ݔ‬ଵ + ܽ௠ଶ ‫ݔ‬ଵ + ܽ௠ଷ ‫ݔ‬ଵ + ⋯ + ܽ௠௡ ‫ݔ‬௡ = ܾ௠
Constants
And ݊ > ݉
ᇱ ᇱ
1‫ݔ‬ଵ + 0‫ݔ‬ଶ + ⋯ + 0‫ݔ‬௠ + ܽଵ௠ାଵ ‫ݔ‬௠ାଵ + ⋯ + ܽଵ௡ ‫ݔ‬௡ = ܾଵᇱ
ᇱ ᇱ
0‫ݔ‬ଵ + 1‫ݔ‬ଶ + ⋯ + 0‫ݔ‬௠ + ܽଶ௠ାଵ ‫ݔ‬௠ାଵ + ⋯ + ܽଶ௡ ‫ݔ‬௡ = ܾଶᇱ
ᇱ ᇱ
0‫ݔ‬ଵ + 0‫ݔ‬ଶ + ⋯ + 0‫ݔ‬௠ + ܽଷ௠ାଵ ‫ݔ‬௠ାଵ + ⋯ + ܽଷ௡ ‫ݔ‬௡ = ܾଷᇱ
⋮ ⋮ ⋮
ᇱ ᇱ ᇱ
0‫ݔ‬ଵ + 0‫ݔ‬ଶ + ⋯ + 1‫ݔ‬௠ + ܽ௠௠ାଵ ‫ݔ‬௠ାଵ + ⋯ + ܽ௠௡ ‫ݔ‬௡ = ܾ௠
Rajib Bhattacharjya, IITG CE 602: Optimization Method
ᇱ ᇱ
1‫ݔ‬ଵ + 0‫ݔ‬ଶ + ⋯ + 0‫ݔ‬௠ + ܽଵ௠ାଵ ‫ݔ‬௠ାଵ + ⋯ + ܽଵ௡ ‫ݔ‬௡ = ܾଵᇱ
ᇱ ᇱ
0‫ݔ‬ଵ + 1‫ݔ‬ଶ + ⋯ + 0‫ݔ‬௠ + ܽଶ௠ାଵ ‫ݔ‬௠ାଵ + ⋯ + ܽଶ௡ ‫ݔ‬௡ = ܾଶᇱ
ᇱ ᇱ
0‫ݔ‬ଵ + 0‫ݔ‬ଶ + ⋯ + 0‫ݔ‬௠ + ܽଷ௠ାଵ ‫ݔ‬௠ାଵ + ⋯ + ܽଷ௡ ‫ݔ‬௡ = ܾଷᇱ
⋮ ⋮ ⋮
ᇱ ᇱ ᇱ
0‫ݔ‬ଵ + 0‫ݔ‬ଶ + ⋯ + 1‫ݔ‬௠ + ܽ௠௠ାଵ ‫ݔ‬௠ାଵ + ⋯ + ܽ௠௡ ‫ݔ‬௡ = ܾ௠
One solution can be deduced from the system of equations are
‫ݔ‬௜ = ܾ௜ᇱ For ݅ = 1,2,3, … , ݉
‫ݔ‬௜ = 0 For ݅ = ݉ + 1, ݉ + 2, ݉ + 3, … , ݊
This solution is called basis solution
Basic variable ‫ݔ‬௜ ݅ = 1,2,3, … , ݉
Non basic variable ‫ݔ‬௜ ݅ = ݉ + 1, ݉ + 2, ݉ + 3, … , ݊
Rajib Bhattacharjya, IITG CE 602: Optimization Method
Now let’s solve a problem
2‫ݔ‬ଵ + 3‫ݔ‬ଶ − 2‫ݔ‬ଷ − 7‫ݔ‬ସ = 1 ܴ଴
‫ݔ‬ଵ + ‫ݔ‬ଶ + ‫ݔ‬ଷ + 3‫ݔ‬ସ = 6 ܴଵ
‫ݔ‬ଵ − ‫ݔ‬ଶ + ‫ݔ‬ଷ + 5‫ݔ‬ସ = 4 ܴଶ

3 7 1 1
‫ݔ‬ଵ + ‫ݔ‬ଶ − ‫ݔ‬ଷ − ‫ݔ‬ସ = ܴ଴ଵ = ܴ଴
2 2 2 2
1 13 11
0 − ‫ݔ‬ଶ + 2‫ݔ‬ଷ + ‫ݔ‬ସ = ܴଵଵ = ܴଵ − ܴ଴ଵ
2 2 2
5 17 7
0 − ‫ݔ‬ଶ + 2‫ݔ‬ଷ + ‫ݔ‬ସ = ܴଶଵ = ܴଶ − ܴ଴ଵ
2 2 2
Rajib Bhattacharjya, IITG CE 602: Optimization Method
3
‫ݔ‬ଵ + 0 + 5‫ݔ‬ଷ + 16‫ݔ‬ସ = 17 ܴ଴ଶ = ܴ଴ଵ − ܴଵଶ
2
0 + ‫ݔ‬ଶ − 4‫ݔ‬ଷ − 13‫ݔ‬ସ = −11 ܴଵଶ = −2ܴଵଵ
5
0 + 0 − 8‫ݔ‬ଷ −24‫ݔ‬ସ = −24 ܴଶଶ = ܴଶଵ + ܴଵଶ
2

‫ݔ‬ଵ + 0 + 0 + ‫ݔ‬ସ = 2 ܴ଴ଶ = ܴ଴ଶ − 5ܴଶଶ

0 + ‫ݔ‬ଶ + 0 − ‫ݔ‬ସ = 1 ܴଵଷ = ܴଵଶ +4ܴଶଷ


1
0 + 0 + ‫ݔ‬ଷ + 3‫ݔ‬ସ = 3 ܴଶଷ = − ܴଶଶ
8

Rajib Bhattacharjya, IITG CE 602: Optimization Method


Solution of the problem is

‫ݔ‬ଵ = 2 − ‫ݔ‬ସ

‫ݔ‬ଶ = 1 + ‫ݔ‬ସ

‫ݔ‬ଷ = 3 − 3‫ݔ‬ସ

The solution obtain by setting independent variable equal to zero is


called basic solution.

‫ݔ‬ଵ = 2 ‫ݔ‬ଶ = 1 ‫ݔ‬ଷ = 3

Rajib Bhattacharjya, IITG CE 602: Optimization Method


2‫ݔ‬ଵ + 3‫ݔ‬ଶ − 2‫ݔ‬ଷ − 7‫ݔ‬ସ = 1 2‫ݔ‬ଵ + 3‫ݔ‬ଶ − 2‫ݔ‬ଷ − 7‫ݔ‬ସ = 1
‫ݔ‬ଵ + ‫ݔ‬ଶ + ‫ݔ‬ଷ + 3‫ݔ‬ସ = 6 ‫ݔ‬ଵ + ‫ݔ‬ଶ + ‫ݔ‬ଷ + 3‫ݔ‬ସ = 6
‫ݔ‬ଵ − ‫ݔ‬ଶ + ‫ݔ‬ଷ + 5‫ݔ‬ସ = 4 ‫ݔ‬ଵ − ‫ݔ‬ଶ + ‫ݔ‬ଷ + 5‫ݔ‬ସ = 4
‫ݔ‬ଵ = 2, ‫ݔ‬ଶ = 1, ‫ݔ‬ଷ = 3, ‫ݔ‬ସ = 0 ‫ݔ‬ଵ = 1, ‫ݔ‬ଶ = 2, ‫ݔ‬ଷ = 0, ‫ݔ‬ସ = 1

2‫ݔ‬ଵ + 3‫ݔ‬ଶ − 2‫ݔ‬ଷ − 7‫ݔ‬ସ = 1 2‫ݔ‬ଵ + 3‫ݔ‬ଶ − 2‫ݔ‬ଷ − 7‫ݔ‬ସ = 1


‫ݔ‬ଵ + ‫ݔ‬ଶ + ‫ݔ‬ଷ + 3‫ݔ‬ସ = 6 ‫ݔ‬ଵ + ‫ݔ‬ଶ + ‫ݔ‬ଷ + 3‫ݔ‬ସ = 6
‫ݔ‬ଵ − ‫ݔ‬ଶ + ‫ݔ‬ଷ + 5‫ݔ‬ସ = 4 ‫ݔ‬ଵ − ‫ݔ‬ଶ + ‫ݔ‬ଷ + 5‫ݔ‬ସ = 4

‫ݔ‬ଵ = 3, ‫ݔ‬ଶ = 0, ‫ݔ‬ଷ = 6, ‫ݔ‬ସ = −1 ‫ݔ‬ଵ = 0, ‫ݔ‬ଶ = 3, ‫ݔ‬ଷ = −3, ‫ݔ‬ସ = 2

Rajib Bhattacharjya, IITG CE 602: Optimization Method


How many combinations?
݊ ݊!
=
݉ ݊ − ݉ ! ݉!

The problem we have just solved has 4 combinations


Now consider a problem of 10 variables and 8 equations, we will
have 45 different combinations
If a problem of 15 variables and 10 equations, we will have 3003
different combinations
As such, it is not possible to find solutions for all the combinations
Moreover, many combinations, we may get infeasible solutions
As such we need some set of rules to switch from one feasible
solution another feasible solution
Rajib Bhattacharjya, IITG CE 602: Optimization Method
Now before discussing any method, let’s try to solve a problem

Minimize −‫ݔ‬ଵ − 2‫ݔ‬ଶ − ‫ݔ‬ଷ


Subject to
2‫ݔ‬ଵ + ‫ݔ‬ଶ − ‫ݔ‬ଷ ≤ 2 2‫ݔ‬ଵ + ‫ݔ‬ଶ − ‫ݔ‬ଷ +‫ݔ‬ସ =2
2‫ݔ‬ଵ − ‫ݔ‬ଶ + 5‫ݔ‬ଷ ≤ 6 2‫ݔ‬ଵ − ‫ݔ‬ଶ + 5‫ݔ‬ଷ + ‫ݔ‬ହ =6
4‫ݔ‬ଵ + ‫ݔ‬ଶ + ‫ݔ‬ଷ ≤ 6 4‫ݔ‬ଵ + ‫ݔ‬ଶ + ‫ݔ‬ଷ +‫଺ݔ‬ =6
‫ݔ‬௜ ≥ 0 ݅ = 1,2,3
−‫ݔ‬ଵ − 2‫ݔ‬ଶ − ‫ݔ‬ଷ −݂ = 0

The initial basic solution is ‫ݔ‬ସ = 2 ‫ݔ‬ହ = 6 ‫ = ଺ݔ‬6 Basic variable


‫ݔ‬ଵ = ‫ݔ‬ଶ = ‫ݔ‬ଷ = 0 Non basic variable
Rajib Bhattacharjya, IITG ݂=0 CE 602: Optimization Method
Now look at the objective function
−‫ݔ‬ଵ − 2‫ݔ‬ଶ − ‫ݔ‬ଷ −݂ = 0
Is it an optimal solution?
Can we improve the objective function value by making one non basic
variable as basic?
For this problem, all the coefficients of the objective function is
negative, as such making one of them as basic variable, we can
improve (reduce) the objective value.
However, making ‫ݔ‬ଶ as basic variable we will have maximum advantage
So, select the variable with minimum negative coefficient

Rajib Bhattacharjya, IITG CE 602: Optimization Method


In our problem, ‫ݔ‬ଶ is the new entering variable (basic variable)
Now, next question is which one will be pivoting element
2‫ݔ‬ଵ + ‫ݔ‬ଶ − ‫ݔ‬ଷ +‫ݔ‬ସ = 2 2‫ݔ‬ଵ + ‫ݔ‬ଶ − ‫ݔ‬ଷ + ‫ݔ‬ସ =2
2‫ݔ‬ଵ − ‫ݔ‬ଶ + 5‫ݔ‬ଷ + ‫ݔ‬ହ =6 4‫ݔ‬ଵ + 0‫ݔ‬ଶ + 4‫ݔ‬ଷ + ‫ݔ‬ସ + ‫ݔ‬ହ =8
4‫ݔ‬ଵ + ‫ݔ‬ଶ + ‫ݔ‬ଷ +‫଺ݔ‬ = 6 2‫ݔ‬ଵ + 0‫ݔ‬ଶ + 2‫ݔ‬ଷ −‫ݔ‬ସ + ‫଺ݔ‬ =4
−‫ݔ‬ଵ − 2‫ݔ‬ଶ − ‫ݔ‬ଷ −݂ = 0 3‫ݔ‬ଵ + 0‫ݔ‬ଶ − 3‫ݔ‬ଷ + ‫ݔ‬ସ −݂ = 4

The initial basic solution is ‫ݔ‬ଶ = 2 ‫ݔ‬ହ = 8 ‫ = ଺ݔ‬4 Basic variable


‫ݔ‬ଵ = ‫ݔ‬ଷ = ‫ݔ‬ସ = 0 Non basic variable
Rajib Bhattacharjya, IITG
݂ = −4 CE 602: Optimization Method
2‫ݔ‬ଵ + ‫ݔ‬ଶ − ‫ݔ‬ଷ +‫ݔ‬ସ = 2 4‫ݔ‬ଵ + 0‫ݔ‬ଶ + 4‫ݔ‬ଷ + ‫ݔ‬ସ +‫ݔ‬ହ =8
2‫ݔ‬ଵ − ‫ݔ‬ଶ + 5‫ݔ‬ଷ + ‫ݔ‬ହ = 6 −2‫ݔ‬ଵ + ‫ݔ‬ଶ − 5‫ݔ‬ଷ − ‫ݔ‬ହ = −6
4‫ݔ‬ଵ + ‫ݔ‬ଶ + ‫ݔ‬ଷ +‫଺ݔ‬ = 6 6‫ݔ‬ଵ + 0‫ݔ‬ଶ + 6‫ݔ‬ଷ +‫ݔ‬ହ + ‫ = ଺ݔ‬12
−‫ݔ‬ଵ − 2‫ݔ‬ଶ − ‫ݔ‬ଷ −݂ = 0 −5‫ݔ‬ଵ + 0‫ݔ‬ଶ − 11‫ݔ‬ଷ − 2‫ݔ‬ହ − ݂ = −12

The initial basic solution is ‫ݔ‬ଶ = −6 ‫ݔ‬ସ = 8 ‫ = ଺ݔ‬12 Basic variable


‫ݔ‬ଵ = ‫ݔ‬ଷ = ‫ݔ‬ହ = 0 Non basic variable
Rajib Bhattacharjya, IITG
݂ = −12 CE 602: Optimization Method
2‫ݔ‬ଵ + ‫ݔ‬ଶ − ‫ݔ‬ଷ +‫ݔ‬ସ = 2 −2‫ݔ‬ଵ + 0‫ݔ‬ଶ − 2‫ݔ‬ଷ + ‫ݔ‬ସ −‫ = ଺ݔ‬−4
2‫ݔ‬ଵ − ‫ݔ‬ଶ + 5‫ݔ‬ଷ + ‫ݔ‬ହ =6 6‫ݔ‬ଵ + 0‫ݔ‬ଶ + 6‫ݔ‬ଷ + ‫ݔ‬ହ + ‫ = ଺ݔ‬12
4‫ݔ‬ଵ + ‫ݔ‬ଶ + ‫ݔ‬ଷ +‫଺ݔ‬ =6 4‫ݔ‬ଵ + ‫ݔ‬ଶ + ‫ݔ‬ଷ + ‫ = ଺ݔ‬6
−‫ݔ‬ଵ − 2‫ݔ‬ଶ − ‫ݔ‬ଷ −݂ = 0 7‫ݔ‬ଵ + 0‫ݔ‬ଶ + ‫ݔ‬ଷ + 2‫ ଺ݔ‬− ݂ = 12

The initial basic solution is ‫ݔ‬ଶ = 6 ‫ݔ‬ସ = −4 ‫ݔ‬ହ = 12 Basic variable


‫ݔ‬ଵ = ‫ݔ‬ଷ = ‫ = ଺ݔ‬0 Non basic variable
Rajib Bhattacharjya, IITG
݂ = +12 CE 602: Optimization Method
2‫ݔ‬ଵ + ‫ݔ‬ଶ − ‫ݔ‬ଷ +‫ݔ‬ସ =2
2‫ݔ‬ଵ − ‫ݔ‬ଶ + 5‫ݔ‬ଷ + ‫ݔ‬ହ =6
4‫ݔ‬ଵ + ‫ݔ‬ଶ + ‫ݔ‬ଷ +‫଺ݔ‬ =6
Infeasible Infeasible
−‫ݔ‬ଵ − 2‫ݔ‬ଶ − ‫ݔ‬ଷ −݂ = 0 solution solution

‫ݔ‬ଶ = 2 ‫ݔ‬ହ = 8 ‫ = ଺ݔ‬4 ‫ݔ‬ଶ = −6 ‫ݔ‬ସ = 8 ‫ = ଺ݔ‬12 ‫ݔ‬ଶ = 6 ‫ݔ‬ସ = −4 ‫ݔ‬ହ = 12


‫ݔ‬ଵ = ‫ݔ‬ଷ = ‫ݔ‬ସ = 0 ‫ݔ‬ଵ = ‫ݔ‬ଷ = ‫ݔ‬ହ = 0 ‫ݔ‬ଵ = ‫ݔ‬ଷ = ‫ = ଺ݔ‬0
݂ = −4 ݂ = −12 ݂ = +12

Now what is the rule, how to select the pivoting element?

Rajib Bhattacharjya, IITG CE 602: Optimization Method


What is the maximum value of ‫ݔ‬ଶ without making ‫ݔ‬ଶ negative?

2‫ݔ‬ଵ + ‫ݔ‬ଶ − ‫ݔ‬ଷ +‫ݔ‬ସ =2 ‫ݔ‬ଶ = 2/1


2‫ݔ‬ଵ − ‫ݔ‬ଶ + 5‫ݔ‬ଷ + ‫ݔ‬ହ =6
4‫ݔ‬ଵ + ‫ݔ‬ଶ + ‫ݔ‬ଷ +‫଺ݔ‬ =6 ‫ݔ‬ଶ = 6/1

Select the minimum one to avoid infeasible solution


Thus the general rule is
௕೔
1. Calculate the ratio (For ܽ௜௦ ≥ 0)
௔೔ೞ
∗ ݉݅݊݅݉‫݉ݑ‬ ௕೔
2. Pivoting element is ‫ݔ‬௦ =
ܽ௜௦ ≥ 0 ௔೔ೞ
Rajib Bhattacharjya, IITG CE 602: Optimization Method
2‫ݔ‬ଵ + ‫ݔ‬ଶ − ‫ݔ‬ଷ +‫ݔ‬ସ =2
2‫ݔ‬ଵ − ‫ݔ‬ଶ + 5‫ݔ‬ଷ + ‫ݔ‬ହ =6
4‫ݔ‬ଵ + ‫ݔ‬ଶ + ‫ݔ‬ଷ +‫଺ݔ‬ =6
−‫ݔ‬ଵ − 2‫ݔ‬ଶ − ‫ݔ‬ଷ −݂ = 0

Basic Variable
f bi bi/aij
Variable x1 x2 x3 x4 x5 x6
x4 2 1 -1 1 0 0 0 2 2
x5 2 -1 5 0 1 0 0 6
x6 4 1 1 0 0 1 0 6 6
f -1 -2 -1 0 0 0 -1 0

Rajib Bhattacharjya, IITG CE 602: Optimization Method


Basic Variable
f bi bi/aij
Variable x1 x2 x3 x4 x5 x6
x2 2 1 -1 1 0 0 0 2
x5 4 0 4 1 1 0 0 8 2
x6 2 0 2 -1 0 1 0 4 2
f 3 0 -3 2 0 0 -1 4

Basic Variable
f bi bi/aij
Variable x1 x2 x3 x4 x5 x6
x2 3 1 0 1.25 0.25 0 0 4
x3 1 0 1 0.25 0.25 0 0 2
x6 0 0 0 -1.5 -0.5 1 0 0
f 6 0 0 2.75 0.75 0 -1 10

All ܿ௝ are positive, so no improvement is possible


Rajib Bhattacharjya, IITG CE 602: Optimization Method
Basic Variable
f bi bi/aij
Variable x1 x2 x3 x4 x5 x6
x2 2 1 -1 1 0 0 0 2
x5 4 0 4 1 1 0 0 8 2
x6 2 0 2 -1 0 1 0 4 2
f 3 0 -3 2 0 0 -1 4

Basic Variable
f bi bi/aij
Variable x1 x2 x3 x4 x5 x6
x2 3 1 0 0.5 0 0.5 0 4
x5 0 0 0 3 1 -2 0 0
x3 1 0 1 -0.5 0 0.5 0 2
f 6 0 0 0.5 0 1.5 -1 10

Obtain the same solution


Rajib Bhattacharjya, IITG CE 602: Optimization Method
SIMPLEX METHOD
ᇱ ᇱ
1‫ݔ‬ଵ + 0‫ݔ‬ଶ + ⋯ + 0‫ݔ‬௠ + ܽଵ௠ାଵ ‫ݔ‬௠ାଵ + ⋯ + ܽଵ௡ ‫ݔ‬௡ = ܾଵᇱ
ᇱ ᇱ
0‫ݔ‬ଵ + 1‫ݔ‬ଶ + ⋯ + 0‫ݔ‬௠ + ܽଶ௠ାଵ ‫ݔ‬௠ାଵ + ⋯ + ܽଶ௡ ‫ݔ‬௡ = ܾଶᇱ
ᇱ ᇱ
0‫ݔ‬ଵ + 0‫ݔ‬ଶ + ⋯ + 0‫ݔ‬௠ + ܽଷ௠ାଵ ‫ݔ‬௠ାଵ + ⋯ + ܽଷ௡ ‫ݔ‬௡ = ܾଷᇱ
⋮ ⋮ ᇱ
⋮ ᇱ ᇱ
0‫ݔ‬ଵ + 0‫ݔ‬ଶ + ⋯ + 1‫ݔ‬௠ + ܽ௠௠ାଵ ‫ݔ‬௠ାଵ + ⋯ + ܽ௠௡ ‫ݔ‬௡ = ܾ௠

0‫ݔ‬ଵ + 0‫ݔ‬ଶ + ⋯ + 0‫ݔ‬௠ − ݂ + ܿ௠ାଵ ‫ݔ‬௠ାଵ + ⋯ + ܿ௡ᇱ ‫ݔ‬௡ = −݂௢ᇱ

‫ݔ‬௜ = ܾ௜ᇱ For ݅ = 1,2,3, … , ݉


‫ݔ‬௜ = 0 For ݅ = ݉ + 1, ݉ + 2, ݉ + 3, … , ݊
݂ = ݂௢ᇱ
If the basic solution is feasible , then ܾ௜ᇱ ≥ 0 for ݅ = 1,2,3, … , ݉
Rajib Bhattacharjya, IITG CE 602: Optimization Method
From the last row

0‫ݔ‬ଵ + 0‫ݔ‬ଶ + ⋯ + 0‫ݔ‬௠ − ݂ + ܿ௠ାଵ ‫ݔ‬௠ାଵ + ⋯ + ܿ௡ᇱ ‫ݔ‬௡ = −݂௢ᇱ
We can write that

݂ = ݂௢ᇱ + ෍ ܿ௜ᇱ ‫ݔ‬௜


௜ୀ௠ାଵ

If all ܿ௜ᇱ are positive, it is not possible to improve (reduce) the objective
function value by making a non basic variable as basic variable
Maximum benefit can be obtained by making the non-basic variable with
minimum negative coefficient as basic variable
In case of a tie, any one can be selected arbitrarily

Rajib Bhattacharjya, IITG CE 602: Optimization Method


‫ݔ‬ଵ = ܾଵᇱ − ܽଵ௦

‫ݔ‬௦ ܾଵᇱ ≥ 0

‫ݔ‬ଶ = ܾଶᇱ − ܽଶ௦



‫ݔ‬௦ ܾଶᇱ ≥ 0
⋮ ⋮ ⋮
ᇱ ᇱ ᇱ
‫ݔ‬௠ = ܾ௠ − ܽ௠௦ ‫ݔ‬௦ ܾ௠ ≥0

If ܽ௜௦ is positive, the maximum possible value of ‫ݔ‬௦ is ܾ௜ᇱ /ܽ௜௦


If ܽ௜௦ is negative, the maximum possible value of ‫ݔ‬௦ is +∞

In this case, the problem has an unbounded solution

Rajib Bhattacharjya, IITG CE 602: Optimization Method


Example 1 (Unbounded solution)

Minimize f = −3‫ݔ‬ଵ − 2‫ݔ‬ଶ


Subject to
‫ݔ‬ଵ − ‫ݔ‬ଶ ≤ 1 ‫ݔ‬ଵ − ‫ݔ‬ଶ + ‫ݔ‬ଷ =1
3‫ݔ‬ଵ − 2‫ݔ‬ଶ ≤ 6 3‫ݔ‬ଵ − 2‫ݔ‬ଶ + ‫ݔ‬ସ = 6
‫ݔ‬௜ ≥ 0 ݅ = 1,2,3 ‫ݔ‬௜ ≥ 0 ݅ = 1,2,3

Basic Variable
f bi bi/aij
Variable x1 x2 x3 x4
x3 1 -1 1 0 0 1 1
x4 3 -2 0 1 0 6 2
f -3 -2 0 0 -1 0

Rajib Bhattacharjya, IITG CE 602: Optimization Method


Basic Variable
f bi bi/ais
Variable x1 x2 x3 x4
x1 1 -1 1 0 0 1
x4 0 1 -3 1 0 3 3
f 0 -5 3 0 -1 3

Basic Variable
f bi bi/ais
Variable x1 x2 x3 x4
x1 1 0 -2 1 0 4
x2 0 1 -3 1 0 3
f 0 0 -12 5 -1 18

All ܽ௜௝ are negative


Unbounded solution
Rajib Bhattacharjya, IITG CE 602: Optimization Method
Example 2 (Alternate optimal solutions)

Minimize f = −40‫ݔ‬ଵ − 100‫ݔ‬ଶ


Subject to
10‫ݔ‬ଵ + 5‫ݔ‬ଶ ≤ 2500 10‫ݔ‬ଵ + 5‫ݔ‬ଶ + ‫ݔ‬ଷ = 2500
4‫ݔ‬ଵ + 10‫ݔ‬ଶ ≤ 2000 4‫ݔ‬ଵ + 10‫ݔ‬ଶ + ‫ݔ‬ସ = 2000
2‫ݔ‬ଵ + 3‫ݔ‬ଶ ≤ 900 2‫ݔ‬ଵ + 3‫ݔ‬ଶ + ‫ݔ‬ହ = 900
‫ݔ‬௜ ≥ 0 ݅ = 1,2,3 ‫ݔ‬௜ ≥ 0 ݅ = 1,2,3,4,5

Rajib Bhattacharjya, IITG CE 602: Optimization Method


Basic Variable
Variable x1 x2 x3 x4 x5 f b bi/ais
x3 10 5 1 0 0 0 2500 500
x4 4 10 0 1 0 0 2000 200
x5 2 3 0 0 1 0 900 300
f -40 -100 0 0 0 -1 0
Solution is
Basic Variable
‫ݔ‬ଷ = 1500
Variable x1 x2 x3 x4 x5 f b bi/ais
x3 8 0 1 -0.5 0 0 1500 187.5 ‫ݔ‬ଶ = 500
x2 0.4 1 0 0.1 0 0 200 500 ‫ݔ‬ହ = 0
x5 0.8 0 0 -0.3 1 0 300 375
‫ݔ‬ଵ = ‫ݔ‬ସ = 0
f 0 0 0 10 0 -1 20000
݂ = −20000

All ܿ௝ are positive, so no improvement is possible


Rajib Bhattacharjya, IITG CE 602: Optimization Method
Basic Variable
Variable x1 x2 x3 x4 x5 f b bi/ais
x1 1 0 0.125 -0.0625 0 0 187.5
x2 0 1 -0.05 0.125 0 0 125
x5 0 0 -0.1 -0.25 1 0 150
f 0 0 0 10 0 -1 20000
Solution is The problem has infinite number of
‫ݔ‬ଵ = 187.5 optimal solutions, which can be obtained
using the following equation
‫ݔ‬ଶ = 125
‫ݔ‬ହ = 0 ܺ ߣ = ߣܺଵ + 1 − ߣ ܺ ଶ
‫ݔ‬ଷ = ‫ݔ‬ସ = 0
݂ = −20000
Rajib Bhattacharjya, IITG CE 602: Optimization Method
Example 3 (Artificial variable)

Minimize f = 2‫ݔ‬ଵ + 3‫ݔ‬ଶ + 2‫ݔ‬ଷ − ‫ݔ‬ସ + ‫ݔ‬ହ


Subject to
3‫ݔ‬ଵ − 3‫ݔ‬ଶ + 4‫ݔ‬ଷ + 2‫ݔ‬ସ − ‫ݔ‬ହ = 0 3‫ݔ‬ଵ − 3‫ݔ‬ଶ + 4‫ݔ‬ଷ + 2‫ݔ‬ସ − ‫ݔ‬ହ + ‫ݕ‬ଵ = 0
‫ݔ‬ଵ + ‫ݔ‬ଶ + ‫ݔ‬ଷ + 3‫ݔ‬ସ + ‫ݔ‬ହ = 2 ‫ݔ‬ଵ + ‫ݔ‬ଶ + ‫ݔ‬ଷ + 3‫ݔ‬ସ + ‫ݔ‬ହ + ‫ݕ‬ଶ = 2

‫ݔ‬௜ ≥ 0 ݅ = 1,2, … , 5 ‫ݔ‬௜ ≥ 0 ݅ = 1,2, … , 5


‫ݕ‬ଵ , ‫ݕ‬ଶ ≥ 0

‫ݕ‬ଵ and ‫ݕ‬ଶ Artificial variable

Rajib Bhattacharjya, IITG CE 602: Optimization Method


3‫ݔ‬ଵ − 3‫ݔ‬ଶ + 4‫ݔ‬ଷ + 2‫ݔ‬ସ − ‫ݔ‬ହ + ‫ݕ‬ଵ =0
‫ݔ‬ଵ + ‫ݔ‬ଶ + ‫ݔ‬ଷ + 3‫ݔ‬ସ + ‫ݔ‬ହ + ‫ݕ‬ଶ =2
2‫ݔ‬ଵ + 3‫ݔ‬ଶ + 2‫ݔ‬ଷ − ‫ݔ‬ସ + ‫ݔ‬ହ −݂ =0
The Artificial variables have to be remove from the basis initially (Phase I)
This can be remove using the following formulation
Minimize ‫ݕ = ݓ‬ଵ +‫ݕ‬ଶ
Now the problem
3‫ݔ‬ଵ − 3‫ݔ‬ଶ + 4‫ݔ‬ଷ + 2‫ݔ‬ସ − ‫ݔ‬ହ + ‫ݕ‬ଵ =0
‫ݔ‬ଵ + ‫ݔ‬ଶ + ‫ݔ‬ଷ + 3‫ݔ‬ସ + ‫ݔ‬ହ + ‫ݕ‬ଶ =2
2‫ݔ‬ଵ + 3‫ݔ‬ଶ + 2‫ݔ‬ଷ − ‫ݔ‬ସ + ‫ݔ‬ହ −݂ =0
‫ݕ‬ଵ + ‫ݕ‬ଶ − ‫ݓ‬ =0
Rajib Bhattacharjya, IITG CE 602: Optimization Method
3‫ݔ‬ଵ − 3‫ݔ‬ଶ + 4‫ݔ‬ଷ + 2‫ݔ‬ସ − ‫ݔ‬ହ + ‫ݕ‬ଵ =0
‫ݔ‬ଵ + ‫ݔ‬ଶ + ‫ݔ‬ଷ + 3‫ݔ‬ସ + ‫ݔ‬ହ + ‫ݕ‬ଶ =2
2‫ݔ‬ଵ + 3‫ݔ‬ଶ + 2‫ݔ‬ଷ − ‫ݔ‬ସ + ‫ݔ‬ହ −݂ =0
−4‫ݔ‬ଵ + 2‫ݔ‬ଶ − 5‫ݔ‬ଷ − 5‫ݔ‬ସ + 0‫ݔ‬ହ − ‫ݓ‬ = −2

Basic Variable
Variable x1 x2 x3 x4 x5 y1 y2 f w b bi/ais
y1 3 -3 4 2 -1 1 0 0 0 0 0
y2 1 1 1 3 1 0 1 0 0 2 0.67
f 2 3 2 -1 1 0 0 -1 0 0
w -4 2 -5 -5 0 0 0 0 -1 -2

Rajib Bhattacharjya, IITG CE 602: Optimization Method


Basic Variable
Variable x1 x2 x3 x4 x5 y1 y2 f w b bi/ais
x4 1.5 -1.5 2 1 -0.5 0.5 0 0 0 0
y2 -3.5 5.5 -5 0 2.5 -1.5 1 0 0 2 0.36
f 3.5 1.5 4 0 0.5 0.5 0 -1 0 0
w 3.5 -5.5 5 0 -2.5 2.5 0 0 -1 -2

Basic Variable
Variable x1 x2 x3 x4 x5 y1 y2 f w b bi/ais
x4 0.55 0 0.64 1 0.18 0.09 0.27 0 0 0.55
-
x2 0.64 1 -0.91 0 0.45 -0.27 0.18 0 0 0.36
f 4.45 0 5.36 0 -0.18 0.91 -0.27 -1 0 -0.55
w 0 0 0 0 0 1 1 0 -1 0

Rajib Bhattacharjya, IITG


All ܿ௝ are positive, so no improvementCE 602:
is Optimization
possible Method
Phase II
Basic Variable bi/ais
Variable x1 x2 x3 x4 x5 f b
x4 0.55 0 0.64 1 0.18 0 0.55 3
x2 -0.64 1 -0.91 0 0.45 0 0.36 0.8
f 4.45 0 5.36 0 -0.18 -1 -0.55
Solution is
‫ݔ‬ସ = 0.4
Basic Variable bi/ais ‫ݔ‬ହ = 0.8
‫ݔ‬ଵ = ‫ݔ‬ଶ = ‫ݔ‬ଵ = 0
Variable x1 x2 x3 x4 x5 f b
x4 0.8 -0.4 1 1 0 0 0.4
x5 -1.4 2.2 -2 0 1 0 0.8
f 4.2 0.4 5 0 0 -1 -0.4 ݂ = 0.4

All ܿ௝ are positive, so no improvement is possible Optimal


Rajib Bhattacharjya, IITG CE 602: Optimization Method
solution
Example 4 (Unrestricted in sign)

Minimize ݂ = 4‫ݔ‬ଵ + 2‫ݔ‬ଶ Consider ‫ݔ‬ଶ =‫ݔ‬ଷ − ‫ݔ‬ସ


Subject to Where, ‫ݔ‬ଷ , ‫ݔ‬ସ ≥ 0
‫ݔ‬ଵ − 2‫ݔ‬ଶ ≥ 2 Now, the problem can be
‫ݔ‬ଵ + 2‫ݔ‬ଶ = 8 written as
‫ݔ‬ଵ − ‫ݔ‬ଶ ≤ 11 Minimize ݂ = 4‫ݔ‬ଵ + 2‫ݔ‬ଷ − 2‫ݔ‬ସ
‫ݔ‬ଵ ≥ 0
Subject to
‫ݔ‬ଶ is unrestricted in sign ‫ݔ‬ଵ − 2‫ݔ‬ଷ + 2‫ݔ‬ସ ≥ 2
‫ݔ‬ଵ + 2‫ݔ‬ଷ − 2‫ݔ‬ସ = 8
‫ݔ‬ଵ − ‫ݔ‬ଷ + ‫ݔ‬ସ ≤ 11
‫ݔ‬௜ ≥ 0 ݅ = 1,3,4
Rajib Bhattacharjya, IITG CE 602: Optimization Method
‫ݔ‬ଵ − 2‫ݔ‬ଷ + 2‫ݔ‬ସ − ‫ݔ‬ହ + ‫ݕ‬ଵ =2
‫ݔ‬ଵ + 2‫ݔ‬ଷ − 2‫ݔ‬ସ + ‫ݕ‬ଶ =8
‫ݔ‬ଵ − ‫ݔ‬ଷ + ‫ݔ‬ସ + ‫ = ଺ݔ‬11
4‫ݔ‬ଵ + 2‫ݔ‬ଷ − 2‫ݔ‬ସ −݂ =0

Phase I
Minimize ‫ݕ = ݓ‬ଵ + ‫ݕ‬ଶ
Or, Minimize w = −2‫ݔ‬ଵ + 0‫ݔ‬ଷ + 0‫ݔ‬ସ + ‫ݔ‬ହ = −10

Rajib Bhattacharjya, IITG CE 602: Optimization Method


Phase I problem can be written as
‫ݔ‬ଵ − 2‫ݔ‬ଷ + 2‫ݔ‬ସ − ‫ݔ‬ହ + ‫ݕ‬ଵ =2
‫ݔ‬ଵ + 2‫ݔ‬ଷ − 2‫ݔ‬ସ + ‫ݕ‬ଶ =8
‫ݔ‬ଵ − ‫ݔ‬ଷ + ‫ݔ‬ସ + ‫ = ଺ݔ‬11
4‫ݔ‬ଵ + 2‫ݔ‬ଷ − 2‫ݔ‬ସ −݂ =0
−2‫ݔ‬ଵ + 0‫ݔ‬ଷ + 0‫ݔ‬ସ + ‫ݔ‬ହ − ‫ = ݓ‬−10
Basic Variable
w f bi bi/aij
Variable x1 x3 x4 x5 x6 y1 y2
y1 1 -2 2 -1 0 1 0 0 0 2 2
y2 1 2 -2 0 0 0 1 0 0 8 8
x6 1 -1 1 0 1 0 0 0 0 11 11
f 4 2 -2 0 0 0 0 0 -1 0
w -2 0 0 1 0 0 0 -1 0 -10
Rajib Bhattacharjya, IITG CE 602: Optimization Method
Basic Variable
w f bi bi/aij
Variable x1 x3 x4 x5 x6 y1 y2
x1 1 -2 2 -1 0 1 0 0 0 2
y2 0 4 -4 1 0 -1 1 0 0 6 1.5
x6 0 1 -1 1 1 -1 0 0 0 9 9
f 0 10 -10 4 0 -4 0 0 -1 -8
w 0 -4 4 -1 0 2 0 -1 0 -6

Basic Variable
w f bi bi/aij
Variable x1 x3 x4 x5 x6 y1 y2
x1 1 0 0 -0.5 0 0.5 0.5 0 0 5
x3 0 1 -1 0.25 0 -0.25 0.25 0 0 1.5
x6 0 0 0 0.75 1 -0.75 -0.25 0 0 7.5
f 0 0 0 1.5 0 -1.5 -2.5 0 -1 -23
w 0 0 0 0 0 1 1 -1 0 0

All ܿ௝ are positive, so no improvementCEis602:possible


Rajib Bhattacharjya, IITG Optimization Method
Phase II

Basic Variable
f bi bi/aij
Variable x1 x3 x4 x5 x6
x1 1 0 0 -0.50 0 0 5
x3 0 1 -1 0.25 0 0 1.5
x6 0 0 0 0.75 1 0 7.5
f 0 0 0 1.5 0 -1 -23

It can be noted that all the coefficients of the cost function is


positive, hence it is not possible to improve the objective
function value
This the optimal solution of the problem is
‫ݔ‬ଵ = 5 ‫ݔ‬ଶ = 1.5 ‫ݔ‬ଷ = 1.5 ‫ = ଺ݔ‬7.5 ‫ݔ‬ସ = ‫ݔ‬ହ = 0 ݂ = 23
Rajib Bhattacharjya, IITG CE 602: Optimization Method
Example 5
A manufacturer produces, A, B, C, and D, by using two types of machines
(lathes and milling machines). The time required on the two machines to
manufacture one unit of each of the four products, the profit per unit products
and the total time available on the two types of machines per day are given
below.
Machine Time required per unit (min) for Available
product time
A B C D (min)
Lathe machine 7 10 4 9 1200
Milling machine 3 40 1 1 800
Profit per unit 45 100 30 50
Find the number of units to be manufactured of each product per day for
maximizing profit.

Rajib Bhattacharjya, IITG CE 602: Optimization Method


LP Formulation
Maximize ݂ = 45‫ݔ‬ଵ + 100‫ݔ‬ଶ + 30‫ݔ‬ଷ + 50‫ݔ‬ସ
Subject to
7‫ݔ‬ଵ + 10‫ݔ‬ଶ + 4‫ݔ‬ଷ + 9‫ݔ‬ସ ≤ 1200
3‫ݔ‬ଵ + 40‫ݔ‬ଶ + ‫ݔ‬ଷ + ‫ݔ‬ସ ≤ 800
‫ݔ‬௜ ≥ 0 ݅ = 1,2,3,4

Minimize ݂ = −45‫ݔ‬ଵ − 100‫ݔ‬ଶ − 30‫ݔ‬ଷ − 50‫ݔ‬ସ


Subject to
7‫ݔ‬ଵ + 10‫ݔ‬ଶ + 4‫ݔ‬ଷ + 9‫ݔ‬ସ + ‫ݔ‬ହ = 1200
3‫ݔ‬ଵ + 40‫ݔ‬ଶ + ‫ݔ‬ଷ + ‫ݔ‬ସ + ‫ = ଺ݔ‬800
‫ݔ‬௜ ≥ 0 ݅ = 1,2,3,4,5,6
Rajib Bhattacharjya, IITG CE 602: Optimization Method
Basic Variable
f bi bi/aij
Variable x1 x2 x3 x4 x5 x6
x5 7 10 4 9 1 0 0 1200 120
x6 3 40 1 1 0 1 0 800 20
f -45 -100 -30 -50 0 0 -1 0

Basic Variable
f bi bi/aij
Variable x1 x2 x3 x4 x5 x6
x5 6.25 0 3.75 8.75 1 -0.25 0 1000 114
x2 0.075 1 0.025 0.025 0 0.025 0 20 800
f -37.5 0 -27.5 -47.5 0 2.5 -1 2000

Rajib Bhattacharjya, IITG CE 602: Optimization Method


Basic Variable
f bi bi/aij
Variable x1 x2 x3 x4 x5 x6
x4 0.71 0 0.43 1 0.11 -0.03 0 114 266
x2 0.06 1 0.01 0 0.00 0.03 0 17 1200
f -3.57 0 -7.14 0 5.43 1.14 -1 7428

Basic Variable
f bi bi/aij
Variable x1 x2 x3 x4 x5 x6
x3 1.67 0 1 2.33 0.27 -0.07 0 267
x2 0.03 1 0 -0.03 -0.01 0.03 0 13
f 8.33 0 0 16.67 7.33 0.67 -1 9333

This the optimal solution of the problem is


‫ݔ‬ଵ = 0 ‫ݔ‬ଶ = 13 ‫ݔ‬ଷ = 267 ‫ݔ‬ସ = 0 ‫ݔ‬ହ = 0 ‫ = ଺ݔ‬0 ݂ = −9333
Rajib Bhattacharjya, IITG CE 602: Optimization Method
Rajib Bhattacharjya, IITG CE 602: Optimization Method

Вам также может понравиться