Transshipment Problem
The
transshipment problem is an extension of the transportation problem in which
intermediate nodes, referred to as transshipment nodes, are added to account
for locations such as warehouses.
In
this more general type of distribution problem, shipments may be made between
any pair of the three general types of nodes: origin nodes, transshipment
nodes, and destination nodes
The
objective in the transshipment problem is to determine how many units should be
shipped over each arc in the network so that all destination demands are satisfied
with the minimum possible transportation cost.
Example
A
manufacturing firm is having production facilities at DEN and ATL. Products
manufactured at either facility may be shipped to either of the firm’s regional
warehouses, which are located in KAN and LOU. From the regional warehouses, the
firm supplies retail outlets in DET, MIA, DAL, and NEW. The transportation cost
per unit for each distribution route is shown in Table 1 and Table 2. The
network model is shown in Figure 1.
Table
1: Transportation Cost: Plant to Warehouse
Plant |
Warehouse |
|
KAN |
LOU |
|
DEN |
2 |
3 |
ATL |
3 |
1 |
Table 2: Transportation Cost: Plant to Warehouse
Warehouse |
Retail
Outlet |
|||
DET |
MIA |
DAL |
NEW |
|
KAN |
2 |
6 |
3 |
6 |
LOU |
4 |
4 |
6 |
5 |
Fig. 1: Network Model
Find out the minimum transportation cost and corresponding allocation.
Decision Variables:
Let
Xij denote the number of units shipped from i to node j
Objective Function:
Min
2 X13+3 X14+3 X23+1
X24+ 2X35+6 X36+3 X37+6 X38+4
X45+4 X46+6 X47+5 X48
import pulp as p
# Create a LP
Minimization problem
Lp_prob =
p.LpProblem('Problem', p.LpMinimize)
# Create problem
Variables
X13 =
p.LpVariable("X13", lowBound = 0)
# Create a variable X13 >= 0
X14 =
p.LpVariable("X14", lowBound = 0)
# Create a variable X14 >= 0
X23 =
p.LpVariable("X23", lowBound = 0)
# Create a variable X23 >= 0
X24 =
p.LpVariable("X24", lowBound = 0)
# Create a variable X24 >= 0
X35 =
p.LpVariable("X35", lowBound = 0)
# Create a variable X35 >= 0
X36 =
p.LpVariable("X36", lowBound = 0)
# Create a variable X36 >= 0
X37 =
p.LpVariable("X37", lowBound = 0)
# Create a variable X37 >= 0
X38 = p.LpVariable("X38",
lowBound = 0) # Create a variable X38
>= 0
X45 =
p.LpVariable("X45", lowBound = 0)
# Create a variable X45 >= 0
X46 =
p.LpVariable("X46", lowBound = 0)
# Create a variable X46 >= 0
X47 =
p.LpVariable("X47", lowBound = 0)
# Create a variable X47 >= 0
X48 =
p.LpVariable("X48", lowBound = 0)
# Create a variable X48 >= 0
# Objective Function
Lp_prob +=
2*X13+3*X14+3*X23+1*X24+2*X35+6*X36+3*X37+6*X38+4*X45+4*X46+6*X47+5*X48
# Constraints:
Lp_prob += 1*X13 +
1*X14 <= 600
Lp_prob += X23+ X24
<= 400
Lp_prob +=
-1*X13-1*X23+1*X35+1*X36 +1*X37+1*X38 == 0
Lp_prob +=
-1*X14-1*X24+1*X45+1*X46 +1*X47+1*X48 == 0
Lp_prob += 1*X35+1*X45
== 200
Lp_prob += 1*X36+ 1*X46
== 150
Lp_prob += 1*X37+1*X47
== 350
Lp_prob += 1*X38+ 1*X48
== 300
# Display the problem
print(Lp_prob)
status =
Lp_prob.solve() # Solver
print(p.LpStatus[status]) # The solution status
# Printing the final
solution
print(p.value(X13),p.value(X14),p.value(X23),p.value(X24),p.value(X35),p.value(X36),p.value(X37),p.value(X38),p.value(X45),p.value(X46),p.value(X47),p.value(X48),p.value(Lp_prob.objective))
Solution is:
Problem: MINIMIZE 2*X13 + 3*X14 + 3*X23 + 1*X24 + 2*X35 + 6*X36 + 3*X37 + 6*X38 + 4*X45 + 4*X46 + 6*X47 + 5*X48 + 0 SUBJECT TO _C1: X13 + X14 <= 600 _C2: X23 + X24 <= 400 _C3: - X13 - X23 + X35 + X36 + X37 + X38 = 0 _C4: - X14 - X24 + X45 + X46 + X47 + X48 = 0 _C5: X35 + X45 = 200 _C6: X36 + X46 = 150 _C7: X37 + X47 = 350 _C8: X38 + X48 = 300 VARIABLES X13 Continuous X14 Continuous X23 Continuous X24 Continuous X35 Continuous X36 Continuous X37 Continuous X38 Continuous X45 Continuous X46 Continuous X47 Continuous X48 Continuous Optimal 550.0 50.0 0.0 400.0 200.0 0.0 350.0 0.0 0.0 150.0 0.0 300.0 5200.0
No comments:
Post a Comment