You are on page 1of 22

TRANSPORTATION

PROBLEM
MINIMUM COST METHOD
FIRST, LET’S DEFINE
“TRANSPORTATION PROBLEM”

The transportation problem is a type of linear programming problem designed to


minimize the cost of distributing a product from Y sources to Z destinations.

Many examples from other disciplines may be used to explain the transportation
challenge. One application is the efficient movement of troops from bases to
combat sites. Another consideration is the best assignment of agents or workers to
various occupations or roles. Moving items from various factories to different
warehouse sites, or from warehouses to storefronts, is by far the most typical use.
BASIC FORM OF
TRANSPORTATION
PROBLEM
TYPES OF TRANSPORTATION
PROBLEMS

cases where the total


BALANCED supply is equal to
the total demand.

Based on the basic


facts provided, there
are two sorts of
transportation
challenges.

An imbalanced transportation problem


occurs when supply and demand are
not equal. To make this sort of problem
balanced, either a dummy row or a
UNBALANCED dummy column is inserted, depending
on the requirement. Then, like with the
balanced issue, it may be solved.
BALANCED
UNBALANCED
WHAT IS MINIMUM COST
OPERATION? Basically, the minimum-cost technique seeks to minimize
distribution costs by focusing on particular sections of the
process that have lower costs than others.

Definition: The Least Cost Method is another method used to obtain the initial
feasible solution for the transportation problem.
The Least Cost Method is considered to produce more optimal results than the
North-west Corner because it considers the shipping cost while making the
allocation, whereas the North-West corner method only considers the availability and
supply requirement and allocation begin with the extreme left corner, irrespective of
the shipping cost. over the higher-cost cell with the objective to have the least cost of
transportation.
LET’S SAY,
A mobile phone manufacturing company has three branches located in three different
regions, say Jaipur, Udaipur and Mumbai.
The company has to transport mobile phones to three destinations, say Kanpur, Pune
and Delhi. The availability from Jaipur, Udaipur and Mumbai is 40, 60 and 70 units
respectively. The demand at Kanpur, Pune and Delhi are 70, 40 and 60 respectively.
The transportation cost is shown in the matrix below (in Rs). Use the Least Cost
method to find a basic feasible solution (BFS).
MINIMUM
COST METHOD
STEPS
Step 1: Balance the problem
Balance the problem meaning we need to
check that if;
Σ Supply=Σ Demand
I​ f this holds true, then we will consider
the given problem as a balanced
problem.
Now, what if it’s not balanced?
i.e., Σ Supply(not) ​=Σ Demand​
If such a condition occurs, then we have
to add a dummy source or market;
whichever makes the problem balanced.
MINIMUM
COST METHOD
STEPS
Step 2: Select the lowest cost from the entire matrix and
allocate the minimum of supply or demand.

We are using Least Cost Method here, so we will be


indentifying the lowest cell value in this entire
matrix.

Here, in this matrix we have 1 (For cell: Jaipur-


Delhi) as the lowest value.
 -image on the right

So, moving with that cell, and allocating the


minimum of demand or supply, i.e. allocating 40 here
(as supply value is 40, whereas demand is of 60).

Checking out the first row and not the last column,
because we are allocating 40 in the cell for supply, as
it is minimum.

Subtracting allocated value (i.e. 40) from


corresponding supply and demand.
MINIMUM
COST METHOD
STEPS
Step 3: Remove the row or column
whose supply or demand is
fulfilled and prepare a new matrix
As we have fulfilled the demand or
supply for that row or column
respectively, remove that row or
column and prepare a new matrix,
as shown on the right:
MINIMUM
COST METHOD
STEPS
Step 4: Repeat the procedure until
all the allocations are over
Repeat the same procedure of
allocation of the smallest value in
the new generated matrix and
check out demand or supply based
on the smallest value (of demand
or supply) as shown below, until
all allocations are over.
MINIMUM
COST METHOD
STEPS
CON
Step 4: Repeat the procedure until
all the allocations are over
Tie in the following step as:
MINIMUM
COST METHOD
STEPS
Step 5: After all the allocations are
over, write the allocations and
calculate the transportation cost
Once all allocations are over,
prepare the table with all
allocations marked and calculate
the transportation cost as follows:
PSEUDOCODE
Clear console
Clear function and variables
prompts the user for cost
prompts the user supply
prompts the user demand
define the equation of balance
calculated to minimum cost value
calculated to supply and demand range
set as matrix dimension between zero to two
define the loop between t-v and zero
end loops
size of x
display to totalcost
CODE
x=input('enter the cost of factorie 1,2 and 3: ');

y=input('enter the supply:');

z=input('enter the demand:');

t=sum(y);

v=sum(z,2);

if t~=v

error('NOT BALANCE EQUATİON')

end

Totalcost=0;

y=size(x);

while y>0

[NUM]=min(x(:));

//min equel to number

[A,B]=ind2sub(size(x),find(x==NUM));

//x is the row and y is the column

A=A(1,1);

B=B(1,1);
CODE
//if we have same minimum
//find min,row and column
t=y(A);
//the supply to take
v=z(B);
//the demand to take
g=t-v;
end
if g<0
//find g is negative change to positive
g=-g;

end
CODE
if t<v then

y(A)=y(A)-t;

z(B)=z(B)-t;

x(A,:)=[];

y(A,:)=[];

totalcost=totalcost+([NUM]*t);

//A(x,:)=[],is use to remove row from matrix A

//%b(x,:)=[]:is use to remove row from matrixB


CODE
else
y(A)=y(A)-v;
z(B)=z(B)-v;
x(:,B)=[];
z(:,B)=[];
totalcost=totalcost+([NUM]*v);
//%A(:,y)=[] is use to remove column from matrix A
//%c(:,y)=[] is use to remove column from matrix c

end
y=size(x);
disp(totalcost,'totalcost')
OUTPUT
M1 M2 M3
P1 50 300 0
P2 250 0 300
RESULT SUMMARY WITH
EXPERIENCE
Although, writing and analyzing the code, we came face to face with many errors
and unwanted output types. With the help of many student blogs and websites that
were dictated on educational purposes, understanding and having an idea on this
method operation were beneficial for us.
https://towardsdatascience.com/operations-research-in-r-
transportation-problem-1df59961b2ad

https://www.educationlessons.co.in/notes/least-cost-met
hod/

SOURCES https://study.com/academy/lesson/using-the-minimum-c
ost-method-to-solve-transportation-problems.html#:~:te
xt=Using%20the%20minimum%20cost%20method,the
%20lowest%20possible%20transportation%20costs
.

You might also like