Anda di halaman 1dari 22

Introduction

The method oh LINEAR PROGRAMMING help us achieve an optimum solution or


optimum value to the function in model of mathematic. The function is known as
Objective function which consists of many several variables that are independent.
These variables are subjected to many constraints, restrictions. The independent
variable and constraints are together expressed in the form of an equations or
inequalities.
To arrange something in a straight line is the literal meaning of word linear and the word
programming means to schedule something. It means to organize something with linear
models. The meaning of finding an optimal and feasible solution or to achieve the best
outcome is to find the maximum or the minimum value. The term Linear in linear
programming have its own individuality. It shows that the function to be minimized or
maximized is linear and then the independent variables and constraints are conveyed or
indicated by linear inequalities or linear equations.
Linear programming has various and numerous application to in our day to day life
being it from business, governmental applications, economizing, and industrial
application etcetera. The objective may be to minimize or maximize the profit,
distribution of resources, formulation of policies, and budget. Linear programming helps
us allot the most favorable solution as called by the situation. Linear programming helps
us model a surprising series of complications. Linear programming is massively used in
our life. For example, linear programming was a part of 25% of scientific computations.

History

In 1939, Leonid Kantorovich gave the first Linear Programming problem which is
identical to formulation of problem. The method to solve the same was given during the
World War II. It helped to minimize the losses, reduce the cost during the time and
maximize the loss to the enemy. Around the same time T.C. Koopmans, the Dutch
American economist gave the linear programming techniques and programs. They both
won the Nobel Prize.

Merits and Demerits

Advantages of Linear Programming


1 The simple way of understanding, the uncomplicated nature of the planning help
us approach this model.
2 It helps us to have judicious use of the resources.
3 They help us solve a vast variety of problems that we face in our everyday life,
be it from our cooking recipe or to a government budget.
4 It is connected and interwoven to our lives.
5 The most optimum, feasible, best outcome or result is obtained using the
technique of linear programming.
6 It is adaptive and malleable structure of mathematic.
7 It helps us to improve the quality of the result.
Disadvantages of linear programming
1 Linear programming cannot be used to solve or simplify very large problem.
2 Linear programming may lead to fractional answers which are not possible or
applicable in real life.
3 This technique cannot be used to solve single objective functions
4 It is mandatory to have a linear relationship between the objective functions and
constraints.
5 In real world everything cannot be expressed in linear form
6 This mathematic technique cannot be used to express the human relation,
behavior and nature.
7 Graphical method cannot be used to solve problems which have more than then
two variables.
Linear programming has its own merits and demerits just like a coin have its two
face. There are many parts, areas and fields of life where linear programming
helps us to obtain a optimum solution while there are some which is unexplainable
by this modeling technique.

Linear Programming- Problem Formulation

Linear programming is a mathematical model that helps us to find or help us to allocate


the scarce resources such as money, Labor, raw material etcetera. It help us to find the
most optimum and feasible solution to our problem according to the given condition of
optimality.
The first part or phase of linear programming is to understand the problem, interpret it,
perceive it and finally find a procedure to find the best outcome according to the
condition of optimality.
Problem formulation is the part of linear programming which consists of understanding
and perceiving the problem and finally formulating the problem to give the optimum
solution.

General model of Mathematical Linear Programming model

Optimize (Maximize or Minimize)


Z= C1X1 + C2X2 ++ CnXn
Subject to constraints,
A1IX1 + AI2X2++ AINXN (, =, ) b1
A2IX2 + A22X2 ++ A2NXN (, =, ) b2
A31X1+ A32X2 ++ A3NXN (, =, ) b3
AM1X1 + AM2X2 ++ AMNXN (, =, ) bM
And X1, X2 .XN 0

Assumptions of Linear Programming

In order to differentiate linear programming problems from other mathematical problem


we have to assume certain things and the assumptions made are:
1 Proportionality: it means that if a variable is multiplied by a constant then the
contribution of the variable to the objective function and the constraints are
multiplied by the same constant.
2 Linearity: This assumption shows that all the variable and constraints are
expressed in a linear relationship
3 Additivity: This assumption shows that the sum of individual contribution of
constraints Is the sum of contribution of decision variables which is the total value
of the objective function.
4 Divisibility: This assumption states that the solution to the problem or the decision
variable can take any non-negative value that is they can even take fractional
values which are one of the limitations to the model of linear programming.
5 Certainty: This means that the variables and the constraints do not change or
show any movement. All parameters are same during the study period.

Formulation of Linear Programming

1 Identify and define the variables of decision.


2 Objective function is defined.
3 The set of constraints are identified and arranged in a linear equation or linear
inequality.
4 Since the negative values of decision variable have no physical interpretation so
non negative constraints are added.

Examples on problem formulation

Example 1
Arman requires 15, 17, and 19 units of pesticides A, B and C respectively for his farm. A
liquid pesticide contains 7, 4 and 6 units of A, B and C respectively per jar. A dry product
contains 2, 3 and 5 units of A, B and C per box.. If the liquid product sells for Rs.4 per
jar and the dry product sells for Rs.3 per carton, how many of each should be brought in
order to reduce the cost and meet the needs?
i) Give the decision variable of the problem?
Let X1 and X2 be the units of liquid pesticide and dry products required by Arman

ii) Give the objective function.


The objective is to minimize the cost to meet the requirements
Minimize Z= 4X1+ 3X2
iii) Give the constraints for which the objective function is optimum?
There are three constraints.
7X1 +2X2 >15
4X1+ 3X2 >17
6X1 + 5X2 >19
X1, X22 >0
Finally,
Min. Z = 4X1 + 3X2 is subjected to three constraints
7X1 + 2X2 >15
4X1 + 3X2 >17
6X1 + 5X2 >19
X1, X2 >0

Methods to solve
lpp
1 graphical solution method
Extreme point theorem forms the basis of this solution method
1 Extreme point theorem: It states that the extreme or the corner points of the
feasible area gives the most optimum and best output to the problem.
2 Feasible solution: The non negative set of values that satisfy the objective
function and all the constraints together is known as feasible solution.
3 Infeasible solution: These may or may not be negative values that do not satisfy
the constraints and objective function.
4 Basic solution: This is the solution obtained by equating (a-b) variables to zero
where b is the number equation.
5 Basic feasible solution: a basic solution which is also feasible.
6 Degenerate: When at least one basic variable is zero.
7 Non degenerate: when all basic variables are non-zero and positive.
8 Unbounded solution: A solution which may affect the objective function
indefinitely.

2)Simplex method
There are some cases when there are more than two decision variables associated with
the linear programming problems. When such things happen the solution to such
problems cannot be found using graphical solution method. The problem of linear
programming with two or more than three decision variables can be solved using a
systematic procedure called Simplex method. George B. Dantzig discovered the
solution algorithm for the simplex method. This method helps us to evaluate the corner
points such that each corner points gives us a better solution than the other one.

Some Useful Definitions

1 Standard form: When all the constraints are written in the form of equation then
the linear programming is known to be in the standard form
2 Slack variable: In order to transform the inequality into an equation a variable is
added to left hand side of a less than or equal side. This is known as slack
variable.
3 Surplus variable: In order to convert an inequality into an equation a variable is
subtracted from left hand side of a greater than or equal side. This variable is
known as surplus variable.
4 Basic solution: When solution is obtained by equating (a-b) variables equal to
zero where b is the number of equalities.
5 Simplex table: When simplex method is used a table is used to keep a track of
calculation made at each iteration.
6 Key column: The column containing largest positive number in Z J CJ row in
minimization case or largest negative number in ZJ CJ row in maximization case.
7 Key row: The row corresponding to smallest positive ratio
8 Key element: The intersection of key column and key row.

3)Big-m method
Artificial variables can be removed using the Big-G Method. It can be done by giving
coefficients to the artificial variables irrespective of the objective function. In case of
minimization a very large positive coefficient is assigned called as penalty, in the same
way in case of maximization a very large negative penalty is assigned.

Big-M Method

Steps to follow
1 Standard form is given to the problem.
2 Addition of non- negative variables. If there are no solution to the problem
these artificial variables will appear in the solution in the last even if we want
to eliminate them.
3 Initiation of table.

4 Optimization.
a ZJ - CJ 0, optimum basic feasible solution
b ZJ CJ 0, selection of key element and initiation of second table
5 Feasibility test
4)two phase method

In the first phase of this method, there is a minimization of the sum of all artificial
variables. In the second phase the objective function is optimized to give a feasible
solution. The method is known as two phase method since the method is completed
in two phase.

Two Phase Method

Algorithm steps
Phase 1- Transformation into Maximization type.
a Max. z 0: Existence of no feasible solution
b Max. z = 0 and presence of no artificial variable in the last row: Go for
phase 2 to obtain an optimal solution
c Max. z = 0 and presence of an artificial variable in the last row or the
basis: Begin with phase to get a feasible solution.

The Transportation Problem

There is a type of linear programming problem that may be solved using a


simplified version of the simplex technique called transportation method.
Because of its major application in solving problems involving several product
sources and several destinations of products, this type of problem is
frequently called the transportation problem. It gets its name from its
application to problems involving transporting products from several sources
to several destinations. Although the formation can be used to represent more
general assignment and scheduling problems as well as transportation and
distribution problems. The two common objectives of such problems are either
(1) minimize the cost of shipping m units to n destinations or (2) maximize the
profit of shipping m units to n destinations.
Let us assume there are m sources supplying n destinations. Source
capacities, destinations requirements and costs of material shipping from
each source to each destination are given constantly. The transportation
problem can be described using following linear programming mathematical
model and usually it appears in a transportation tableau.
There are three general steps in solving transportation problems.
We will now discuss each one in the context of a simple example. Suppose
one company has four factories supplying four warehouses and its
management wants to determine the minimum-cost shipping schedule for its
weekly output of chests. Factory supply, warehouse demands, and shipping
costs per one chest (unit) are shown in Table 7.1

At first, it is necessary to prepare an initial feasible solution, which


may be done in several different ways; the only requirement is that
the destination needs be met within the constraints of source supply.

Modelling the transportation problem


The transportation problem is concerned with finding the minimum cost of
transporting
a single commodity from a given number of sources (e.g. factories) to a
given number of
destinations (e.g. warehouses). These types of problems can be solved by
general network
methods, as in Chapter 9, but here we use a specific transportation
algorithm.
The data of the model include
1. The level of supply at each source and the amount of demand at each
destination.
2. The unit transportation cost of the commodity from each source to each
destination.
Since there is only one commodity, a destination can receive its demand
from more than
one source. The objective is to determine how much should be shipped from
each source
to each destination so as to minimise the total transportation cost.

This figure represents a transportation model with m sources and n


destinations. Each
source or destination is represented by a node. The route between a source
and destination
is represented by an arc joining the two nodes. The amount of supply
available at source i
1
is ai , and the demand required at destination j is b . The cost of transporting
one unit
between source i and destination j is c .
Let x denote the quantity transported from source i to destination j. The cost
associated
with this movement is cost_quantity = cijxij . The cost of transporting the
commodity
from source i to all destination is given by
j.

ij

ij

j=1

cijxij = ci1xi1 + ci2xi2 + _ _ _ + cinxin:

Thus, the total cost of transporting the commodity from all the sources to all
the destinations
is
m

Total cost =

cijxij
i=1
j=1

= c 11x11+c12x12+..+c1nx1n
c21x21+c22x22+..+c2nx2n
cm1xm1+cm2xm2+.+cmnxmn
In order to minimise the transportation costs, the following problem must be solved:
MINIMISE

z=

i=1

j=1

cijxij

SUBJECT TO

ij

j=1

ai for i=1n

AND

i=1

WHERE

ij

bj for j=1.n

x ij0 for all I and j

The first constraint says that the sum of all shipments from a source cannot exceed
the available supply. The second constraint specifies that the sum of all shipments
to a destination must be at least as large as the demand. The above implies that
m

the total supply

i=1

is greater than or equal to the total demand

b
j=1

When the total supply is equal to the total demand then the transportation model is
said to be balanced. In a balanced transportation model, each of the constraints is
an equation:
n

x
j=1

ij

= ai for i=1.m

x
i=1

ij

= bj for j=1.n

A transportation model in which the total supply and total demand are unequal is
called unbalanced. It is always possible to balance an unbalanced transportation
problem.
Example 1- Balanced transportation model. Consider the following problem with 2
factories and 3 warehouses:
Factory 1
Factory 2
Demand

Warehouse 1
C11
C21
7

Warehouse 2
C12
C22
10

Warehouse 3
C13
C23
13

Supply
20
10

TOTAL SUPPLY =20+10=30


TOTAL DEMAND=7+10+13=30=TOTAL SUPPLY
Since Total supply = Total demand, the problem is balanced.

Example 2- Unbalanced transportation model. There are two cases to consider,


namely excess demand and excess supply.

1. Suppose the demand at warehouse 1 above is 9 units. Then the total supply and
total demand are unequal, and the problem is unbalanced. In this case it is not
possible to satisfy all the demand at each destination simultaneously. We
reformulate the model as follows: since demand exceeds supply by 2 units, we
introduce a dummy source (i.e. a fictitious factory) which has a capacity of 2. The
amount shipped from this dummy source to a destination represents the shortage
quantity at that destination. It is necessary to specify the costs associated with the
dummy source. There are two situations to consider
(a) Since the source does not exist, no shipping from the source will occur, so the
unit transportation costs can be set to zero.
(b) Alternatively, if a penalty cost, P, is incurred for every
unit of
unsatisfied demand, then the unit transportation costs
should be set equal to
the unit penalty costs.

FACTORY 1
FACTORY 2
DUMMY
DEMAND

WAREHOUSE
1
C11
C21
P
7

WAREHOUSE
2
C12
C22
P
10

WAREHOUSE
3
C13
C23
P
13

SUPPLY
20
10
2

In effect we are allocating the shortage to different destinations.


2) If supply exceeds demand then a dummy destination is added which absorbs the
surplus units. Any units shipped from a source to a dummy destination represent a
surplus at that source. Again, there are two cases to consider for how the unit
transportation costs should be determined.
(a) Since no shipping takes place, the unit transportation costs can be set to zero.
(b) If there is a cost for storing , S, the surplus production then the unit
transportation costs should be set equal to the unit storage costs.

FACTORY 1
FACTORY 2
DEMAND

WAREHOUS
E1
C11
C21
7

WAREHOUS
E2
C12
C22
10

WAREHOUS
E3
C13
C31
13

DUMMY

SUPPLY

S
S
4

20
10

Here we are allocating the excess supply to the different destinations. From now on,
we will discuss balanced transportation problems only, as any unbalanced problem
can always be balanced according to the above constructions

Solution of the transportation problem


A balanced transportation problem has Total supply = Total demand which can be
expressed as
m

a
i=1

b
j=1

A consequence of this is that the problem is defined by n + m 1 supply and


demand variables since, if ai , i = 2, 3, . . . , m and bj , j = 1, 2, . . . , n are specified,
then a1 can be found from (7.1). This means that one of the constraint equations is
not required. Thus, a balanced transportation model has n + m 1 independent
constraint equations. Since the number of basic variables in a basic solution is the
same as the number of constraints, solutions of this problem should have n + m 1
basic variables which are non-zero and all the remaining variables will be non-basic
and thus have the value zero.

Starting the algorithm: finding an initial basic feasible solution


We consider two ways of constructing initial basic feasible solutions for a
transportation problem, i.e. allocations with n + m 1 basic variables which satisfy
all the constraint equations.
Method 1: The North-West Corner Method
Consider the problem represented by the following transportation tableau. The
number in the bottom right of cell (i, j) is c ij, the cost of transporting 1 unit from
source i to destination j. Values of x ij , the quantity actually transported from source
i to destination j, will be entered in the top left of each cell. Note that there are 3
factories and 4 warehouses and so m = 3, n = 4.

W1

W2

W3

W4

supply

F1

10

20

11

20

F2

12

20

25

F3

14

16

18

25

demand

10

15

15

20

The north-west corner method generates an initial allocation according to the


following procedure:
1. Allocate the maximum amount allowable by the supply and demand constraints
to the variable x11 (i.e. the cell in the top left corner of the transportation tableau).

2. If a column (or row) is satisfied, cross it out. The remaining decision variables in
that column (or row) are non-basic and are set equal to zero. If a row and column
are satisfied simultaneously, cross only one out (it does not matter which).
3. Adjust supply and demand for the non-crossed out rows and columns.
4. Allocate the maximum feasible amount to the first available non-crossed out
element in the next column (or row).
5. When exactly one row or column is left, all the remaining variables are basic and
are assigned the only feasible allocation
. For the above example:
x11 = 10. Cross out column 1. The amount left in row 1 is 10.
x12 = 10. Cross out row 1. 5 units are left in column 2.
x22 = 5. Cross out column 2. 20 units are left in row 2.
x23 = 15. Cross out column 3. 5 units are left in row 2.
Only column 4 is now left and so both the remaining variables x 24 and x34 will be
basic. The only feasible allocation of the 5 units in row 2 and the 15 units in row 3 is
to allocate x24 = 5 and x34 = 15, which also ensures that the demand in column 4 is
satisfied. 5 This provides the initial basic feasible solution x 11 = 10, x12 = 10, x22 = 5,
x23 = 15, x24 = 5, x34 = 15. The remaining variables are non-basic and therefore
equal to zero. The solution has m + n 1 = 6 basic variables as required. The
values of the basic variables xij are entered in the top left of each cell. There should
always be m + n 1 of these; in certain (degenerate) cases some of them may be
zero. They must always add up to the total supply and demand in each row and
column. Note that some books position the data differently in the cells of the
tableau.

Method 2: The Least-Cost Method


This method usually provides a better initial basic feasible solution than the NorthWest Corner method since it takes into account the cost variables in the problem.
1. Assign as much as possible to the cell with the smallest unit cost in the entire
tableau. If there is a tie then choose arbitrarily.
2. Cross out the row or column which has satisfied supply or demand. If a row and
column are both satisfied then cross out only one of them.
3. Adjust the supply and demand for those rows and columns which are not crossed
out
. 4. When exactly one row or column is left, all the remaining variables are basic and
are assigned the only feasible allocation.

F1
F2
F3
Demand

W1
10
12
0
10

W2
0
7
14
15

W3
20
9
16
15

W4
11
20
18
20

supply
20
25
15

For the above example:


Cells (1, 2) and (3, 1) both have zero cost so we arbitrarily choose the first and
assign x12 = 15. Cross out column 2. The amount left in row 1 is 5.
x31 = 10. Cross out column 1. The amount left in row 3 is 5.
x23 = 15. Cross out column 3. The amount left in row 2 is 10.
Only column 4 is now left and so all the variables in this column will be basic. The
only feasible allocation is x14 = 5, x24 = 10 and x34 = 5.
This provides the initial basic feasible solution x 12 = 15, x31 = 10, x23 = 15, x14 = 5,
x24 = 10, x334= 5. All the other variables are non-basic and are therefore equal to
zero. Again, we have 6 basic variables as required.

Checking for optimality


So far we have only looked at ways of obtaining an initial basic feasible solution to
the balanced transportation problem. We now develop a method for checking
whether the current basic feasible solution is optimal. For illustrative purposes, we
will start with the initial basic feasible solution that was provided by the North-West
Corner method. Usually, initial basic feasible solutions obtained by the Least-Cost
method (or other methods given in many text-books, such as Vogels method) will
give better starting configurations.
Suppose that the cost cij transporting 1 unit from source i to destination j is made
up of a dispatch cost i and a reception cost j so that i + j=cij
Whenever xij is a basic variable.
Remarks
The total number of i and j variables is n+m. However, there are only n+m1
basic variables. Thus, we are free to choose one of the i s or j s arbitrarily. It is
usual to set 1 = 0.
These costs can take negative values if required. Considering only these
dispatch and reception costs, it would cost i + j to send 1 unit from source i to
destination j. For (i, j) not corresponding to a basic variable, it will often be the case
that i + j 6= cij . In particular, if i + j > cij for a particular (i, j) not corresponding
to a basic variable, then there would be a benefit from sending more goods that
way. So let sij = cij i j . The sij values are entered in the top right of the cells.
Then sij is the change in cost due to allocating 1 extra unit to cell (i, j) (in fact it is a

shadow price). If any sij is negative (so that i+ j > cij ), then the total cost can be
reduced by allocating as many units as possible to cell (i, j). However, if all the s ij
are positive then it will be more expensive to change any of the allocations and so
we have found a minimum cost.
Thus the procedure is as follows:
1. Assign values of i and j to the columns.
2. Enter the values sij = cij i j in every cell.
3. If all the sij s are non-negative, we have an optimal solution.
Assigning values of i and j to our example with the initial basic feasible solution
given by the North-West Corner method, gives the following transportation tableau:

Adding the sij variables to each cell, we find three negative values and so the
solution is not optimal.
Iterating the algorithm
If the current solution is not optimal, we need a method for moving to a better
basic feasible solution. As previously, this involves changing only one variable in the
basis so again we must identify an entering variable and a departing variable in the
basis
Determining the entering variable
If the current solution is not optimal, choose the cell with the most negative value
of sij as the entering variable, as the cost will be reduced most by using this route.
For our example, the most negative value is s31 and so the entering variable is x31.
Determining the leaving variable
We construct a closed loop that starts and ends at the entering variable and
comprises successive horizontal and vertical segments whose end points must be

basic variables (except those associated with the entering variable). It does not
matter whether the loop is clockwise or anticlockwise.

Starting tableau

We now see how large the entering variable can be made without violating the
feasibility conditions. Suppose x31 increases from zero to some level > 0. Then x 11
must change to 10 to preserve the demand constraint in column 1. This has a
knock on effect for x12 which must change to 10 + . This process continues for all
the corners of the loop. The departing variable is chosen from among the corners of
the loop which decrease when the entering variable increases above zero level. It is
the one with the smallest current value, as this will be the first to reach zero as the
entering variable increases. Any further increase in the entering variable past this
value leads to infeasibility. Clearly x22 is the departing variable in this case. The
entering variable x31 can increase to 5 and feasibility will be preserved. New values
of the i s and the j s can now be assigned and the test for optimality applied. If
the solution is still not optimal, new entering and departing variables must be
determined and the process repeated.
Second tableau

As before, we construct i s and j s which satisfy i + j = cij for the basic


variables and enter the values of s ij = cij ij j for every cell. This tableau is not
optimal as one of the sij s is negative. The most negative value of s ij occurs for x14
and so this is the entering variable. Next we construct a loop which only involves
the four corner cells in this case. The maximum that can be without one of the
variables going negative is 5 which gives x 11 = 0 and so this is therefore the
departing variable.

Third tableau

We construct i s, j s and sij s as before, and then check for optimality. The
tableau is not optimal as x22 is negative and is therefore the entering variable. The
loop construction shows that can be as large as 10, and that x 24 is the departing
variable.
Fourth tableau

This is now optimal because sij 0 in every cell.

Final Solution
The minimum cost is given by 5 0 + 15 11 + 10 7 + 15 9 + 10 0 + 5
18 = 460 which occurs when x12 = 5, x14 = 15, x22 = 10, x23 = 15, x31 = 10, x34= 5
and all the other decision variables are equal to zero. 7.2.4 Solving the
transportation problem with Excel Solver We can use Excel Solver to solve the
transportation problem. We set the problem out in the general form of a linear
programming problem

The data is entered as two arrays - one of transportation costs and the other as
decision variables. The Excel spreadhseet illustrating this is available on the module
website.

Application of Linear Programming in Real World

We can use linear programming in numerous fields of our life and not only that we
use techniques of linear programming in many fields of our life be it from our house
budget to the government policies, economy, and business etcetera.
Important areas of application of linear programming are:
1 Manufacturing problems: It helps us to find the optimum methods in order to
maximize the profit, to know about amount of raw material, machinery, labour
resource needed.
2 Assembling problem: To combine things in order to have a feasible and optimum
solution.
3 Diet problem: Linear programming helps us to determine the exact and optimum
constituents and nutrients needed by the body to have a healthy life.
4 Blending problem:
5 Transportation problems: It helps us to determine the schedule and way in order
to have cheapest mode of transportation.
6 Investment problems: Linear programming helps us to invest in number of fixed
income to help us make maximum profit.

Linear programming can be used to express many practical problems. Network flow
problem and multicommodity flow problem are some special cases of linear
programming. Duality, decomposition, convexity are some concepts of optimization
theory that are central to linear programming. Linear programming is used in
company management, microeconomics, technology, planning, production, and so
more.
Linear programming characterizes so many issues be it from our daily life basis or to
the scientific basis.

Conclusion

In this project our main motto is to discuss the basic concepts about Linear
Programming and its Application. Also by using the concepts of Linear Programming
we discuss its application in real life. This tells us that the technique of linear
programming can be used to obtain optimal solution. We could apply it in our real
lives to have good and feasible solutions.

Anda mungkin juga menyukai