Efficient Heuristic Based Methods for Two-Stage Transshipment Problem ()
1. Introduction
Minimum cost flow problem can be described as a preparation of minimum cost plan for the transportation of certain number of units from source to sink to satisfy the demand at each sink. One or more layers of transshipment nodes are present between the sources and sinks, which act as buffer. Weintraub [3] is attributed with the development of one of the first primal based algorithms to solve minimum cost flow problem with convex costs. A variant of negative cycle algorithm is used which aims to identify most negative cycle and subsequently induces it iteratively into the feasible flow. Plotkin and Tardos [4] later proposed a polynomial time algorithm for min cost flow with computational complexity of O (m4). Pseudo flow is maintained by the algorithm such that it satisfies the complimentary slackness conditions while performing flow augmentation from the nodes with positive excess to nodes with negative excess. Algorithm is terminated when all the excesses are reduced to zero. Ahuja et al. [5] has employed advanced data structures to solve primal simplex algorithm for min-cost flow. They have further documented that transshipment problem can be solved by enhanced capacity scaling algorithm in O (n log (n) S (n, m)) time, where n and m are the number of nodes and number of arcs in a network respectively. S (n, m) refers to running time of shortest path problem with n nodes and m arcs. Enhanced capacity scaling algorithm and repeated capacity scaling algorithm runs in O (n3 log (n)) and O (n2 log (n) S (n, m)) time respectively (Ahuja et al. [5] ). Further cost scaling algorithm can be used to solve min cost flow problem in O (n3 log (n)). Hence, best primal based approach solves the transshipment problem with the time complexity of O (n3 log (n)). Recently Juman and Hoque [6] have proposed an efficient heuristic with O (n3) running time to solve uncapacitated balanced transportation problem. Performance of this heuristic is better than Vogel’s Approximation Method (VAM), which is one of the most popular primal based methods to obtain a very good initial basic feasible solution.
Next, we review some popular dual based procedures to solve min cost flow problem. Busakar and Gowan [7] are attributed for developing successive shortest path algorithm. It successively identifies the least cost paths between the source and sink and allocates the maximum capacity on the residual network while maintaining the dual feasibility. Algorithm terminates when residual network contains no admissible path between the source and the sink or when the flow is maximal (primal feasibility is achieved). First polynomial time algorithm to solve min cost flow problem was proposed by Edmonds and Karp [8] . It is a specific implementation of Ford-Fulkerson algorithm in which breadth first search is used to find the shortest path in intermediate stages. Computational complexity of the algorithm is O ((n + m) log U). Helgason and Kennington [9] has used linear programming formulation of the network flow problem to analyze dual simplex method. Plotkin and Tardos [4] had proposed an efficient pivoting strategy with complexity of O (m2n) for the dual simplex method proposed by Orlin [10] . This reduces the number of pivoting steps required for dual simplex method. According to Ali et al. [11] , efficient execution of each pivot in dual based methods requires less number of iterations when compared with primal based algorithm. However, each pivot operation may require higher computational effort.
Our approach in this article to solve two stage transshipment problems is different from the approaches discussed above. We pose the two stage transshipment problem differently and exploit the special structure of the problem to devise two computationally attractive dual based procedures with the computational complexity of O (n2) and O (n3) respectively. We also propose a method (with computational complexity of O (n2)) to extract good primal solution from an existing dual solution. These methods are motivated by Sharma and Saxena [1] , and Sinha and Sharma [2] . Solution proposed by these methods can be used as an initial basic feasible solution to get an advanced start for the exact methods proposed by Orlin [10] , Plotkin and Tardos [4] , and Ali et al. [11] . Next we give problem formulation for two stage transshipment problem.
2. Problem Formulation
We next present the mathematical formulation of the primal problem and dual problem respectively.
2.1. Constants of the Problem
refers to the absolute demand at the lth demand node, while
is the demand at market l as a fraction of total market demand. Hence we have
and
,
where L is the total number of demand nodes. Similarly
refers to to absolute number of units available for transportation at the source node i and
. If the problem is balanced, then we have
, I is the total number of supply nodes.
is the cost of transporting
units from node i to j, j to k and k to l respectively.
2.2. Decision Variables
is the absolute number of units transported from node i to j, j to k and k to l respectively. We further have
Primal of the problem can be formulated as under ?
2.3. Primal (P)
Minimize:
(1)
Subject to:
(2)
(3)
(4)
(5)
(6)
(7)
(8)
and
(9)
In this formulation we assume forward unidirectional flows. Equation (1) minimizes the cost of transportation of units from source nodes to sink nodes while satisfying the supply and demand constraints. Equation (2) ensures that entire supply is transported from supply nodes to meet the demand, which is valid for the balanced problem. Equation (3) and Equation (4) ensures that the entire supply is transported between the layers of transshipment nodes and demand nodes respectively. Equation (5) and Equation (6) are supply and demand constraints respectively. Equation (7) and equation (8) ensures that no inventory is accumulated on any transshipment nodes. Equation (9) is the non-negativity constraint.
2.4. Dual of the Problem (DP)
In this section we present the dual of the problem P. We associate
as the dual variables corresponding to (2), (3), (4), (5), (6), (7) and (8) respectively. We first state the dual of the problem as DP and then divide it into two parts as DP1 and DP2 for computational simplicity.
1) DP
Maximize:
(10)
Subject to:
(11)
(12)
(13)
,
unrestricted (14)
2) DP1
Maximize:
(15)
Subject to:
(16)
(17)
,
unrestricted (18)
3) DP2
Maximize:
(19)
Subject to:
(20)
,
unrestricted (21)
3. Theoretical Results
We start with the development of the heuristic for the dual solution, and then move on to develop heuristic for the primal. Let
denote the length of shortest path from i to l such that
, such that
denotes the length of path from i to j, j to k and k to l in a shortest path
.
SPS = {
:
is the shortest path between i and l}
Problem TP
Minimize:
(22)
Subject to:
(23)
(24)
(25)
Theorem 1: Problem P and Problem TP are equivalent.
Proof: Since all the arcs capacities are unbounded in the transshipment problem, hence optimal flow for a pair of source and sink nodes will always be on
. This ensures that any further reduction in the objective function value is not possible. Therefore optimal solution to problem TP gives the optimal solution to problem P and hence problem TP and P are equivalent. Hence proved.
4. Solution Procedures
4.1. Description of Heuristic 1 (H1)
We extend this heuristic from our previous article on single stage transshipment Sinha and Sharma [2] problem to two stage transshipment problem. Unlike heuristic developed for single stage transshipment problem, we will decrease the
along the shortest path after substituting
. We next describe this heuristic in detail.
Step 1: Sort
in the ascending order and select the
from top of the list.
Step 2: Assign
, and
Step 3:
Step 4: Evaluate DP = DP1 + DP2 and retain the best solution.
Step 5: Repeat step 3 by decreasing value of
in steps
.
Step 6: Goto step 1 and repeat the entire process for all
from the sorted list.
Result 1: Computational complexity of the algorithm is O (n2).
Proof: Complexity of this algorithm is dominated by the step 1 which can be solved in O (n2) time.
4.2. Description of Heuristic 2 (H2)
In the previous algorithm, we tinkered with value of
along
. There is no reason as to why we cannot tinker with the values of
along
. We define
,
and
as source slack, transshipment slack and sink slack respectively (
). Next we describe this heuristic in detail.
Step 0: Sort values of
in SPS in ascending order and set
,
.
Step 1: Set
such that
belongs to
.
Step 2: Compute max_value of DP1 and DP2 by increasing value of
and retain the maximum value of (DP1 + DP2).
Step 3: Decrease the value of
in steps and repeat the step 2.
Step 4:
, If
, then goto step 5 else goto step 1.
Step 5: Stop
Result 2: Heuristic 2 runs in O (n3) time.
Proof: Complexity of the heuristic is dominated by step 2 which can be completed in O (n3) steps.
4.3. Description of Heuristic 2 (H2)
We refer Sharma and Prasad [12] for developing a heuristic to get a good primal solution after having yielded a good dual solution. This is due to the structural similarity between the two problems. Solution to dual problem DP can be expressed as
. Slack
is defined as following:
,
,
. If
and
, then
,
add
. In other words primal variables for the arc
(i.e.
) can assume positive value if the corresponding dual slacks for these arcs are zero. This is known as complementary slackness condition. We utilize this condition to devise a method to extract good primal solution from an existing dual solution. Let
denote the total slack for a shortest path between node i and node l i.e.
.
We further define deviation number as
. According to complimentary slackness condition, for a primal optimal solution, we have
.
If
, positive flow can be allocated to the corresponding path without violating the complimentary slackness property. Further, positive flow cannot be allocated to the path with
. As we are working with good dual solution (and not optimal dual solution), we may have to send positive flow along a path even if corresponding
. But the heuristic described below, tries to minimize
and hope to keep complementary slackness violations as low as possible to get good primal solution. If algorithm terminates with
,
then we have the optimal primal solution.
is similar to Kilter number (Clasen [13] ) for solving general min-cost-flow problem.
We find shortest path from every source node “i” to every sink node “l” using these slacks as weights, and then make the allocations according to shortest path available. Detailed heuristic is described as under:
Step 0:
Step 1: Compute
. Let min be at
and
.
Step 2: Sort all
in increasing order.
Step 3: Choose
from the top of the list such that
and
and goto step 4, if all Sil are processed then goto step 5
Step 4:
, remove
from the list then goto step 3.
Step 5: Stop.
Result 3: Computational complexity of the algorithm is O (n2).
Proof: Complexity of this algorithm is dominated by the step 2 which can be solved in O (n2) time.
5. Numerical Analysis and Conclusions
In this section, we discuss the efficacy of our methods by implementing them on large size randomly generated problems. 200 problems of the size 200 × 200 ×
200 × 200 are solved. Heuristic methods on these problems are implemented in C++. Optimal solution was obtained from problem implementation in CPLEX in GAMS. We compare the number of iterations and the duality gap for these problems in Table 1. As shown, our methods are capable of reducing the computational effort (number of iterations) significantly while not compromising much on duality gap. Heuristic solutions by H1 and H2 are capable of achieving on an average 96% and 98% closeness to optimal solution. Computational complexity of these methods has already been discussed. We later intend to extend this work to general case of Minimum cost flow problem with finite arc capacities.