# Transshipment problem

Transshipment problems form a subgroup of transportation problems, where transshipment is allowed. In transshipment, transportation may or must go through intermediate nodes, possibly changing modes of transport.
The Transshipment problem has its origins in medieval times when trading started to become a mass phenomenon. Obtaining the minimum-cost route had been the main priority. However, technological development slowly gave priority to minimum-duration transportation problems.

## Overview

Transshipment or Transhipment is the shipment of goods or containers to an intermediate destination, and then from there to yet another destination. One possible reason is to change the means of transport during the journey (for example from ship transport to road transport), known as transloading. Another reason is to combine small shipments into a large shipment (consolidation), dividing the large shipment at the other end (deconsolidation). Transshipment usually takes place in transport hubs. Much international transshipment also takes place in designated customs areas, thus avoiding the need for customs checks or duties, otherwise a major hindrance for efficient transport.

## Formulation of the problem

A few initial assumptions are required in order to formulate the transshipment problem completely:
* The system consists of m origins and n destinations, with the following indexing respectively: $i=1,\ldots ,m$, $j=1,\ldots ,n$
* One uniform good exists which needs to be shipped
* The required amount of good at the destinations equals the produced quantity available at the origins
* Transportation simultaneously starts at the origins and is possible from any node to any other (also to an origin and from a destination)
* Transportation costs are independent of the shipped amount
* The transshipment problem is a unique Linear Programming Problem (LLP) in that it considers the assumption that all sources and sinks can both receive and distribute shipments at the same time (function in both directions)

## Notations

* $t_{r,s}$: time of transportation from node r to node s
* $a_{i}$: goods available at node i
* $b_{m+j}$: demand for the good at node (m+j)
* $x_{r,s}$: actual amount transported from node r to node s

## Mathematical formulation of the problem

The goal is to minimize $\sum \limits _{i=1}^{m}\sum \limits _{j=1}^{n}t_{i,j}x_{i,j}$ subject to:
* $x_{r,s}\geq 0$; $\forall r=1\ldots m$, $s=1\ldots n$
* $\sum _{s=1}^{m+n}{x_{i,s}}-\sum _{r=1}^{m+n}{x_{r,i}}=a_{i}$; $\forall i=1\ldots m$
* $\sum _{r=1}^{m+n}{x_{r,m+j}}-\sum _{s=1}^{m+n}{x_{m+j,s}}=b_{m+j}$; $\forall j=1\ldots n$
* $\sum _{i=1}^{m}{a_{i}}=\sum _{j=1}^{n}{b_{m+j}}$

## Solution

Since in most cases an explicit expression for the objective function does not exist, an alternative method is suggested by Rajeev and Satya. The method uses two consecutive phases to reveal the minimal durational route from the origins to the destinations. The first phase is willing to solve $n\cdot m$ time-minimizing problem, in each case using the remained $n+m-2$ intermediate nodes as transshipment points. This also leads to the minimal-durational transportation between all sources and destinations. During the second phase a standard time-minimizing problem needs to be solved. The solution of the time-minimizing transshipment problem is the joint solution outcome of these two phases.

### Phase 1

Since costs are independent from the shipped amount, in each individual problem one can normalize the shipped quantity to 1. The problem now is simplified to an assignment problem from i to m+j. Let $x'_{r,s}=1$ be 1 if the edge between nodes r and s is used during the optimization, and 0 otherwise. Now the goal is to determine all $x'_{r,s}$ which minimize the objective function:
$T_{i,m+j}=\sum _{r=1}^{m+n}\sum _{s=1}^{m+n}{t_{r,s}\cdot x'_{r,s}}$,
such that
* $\sum _{s=1}^{m+n}{x'_{r,s}}=1$
* $\sum _{r=1}^{m+n}{x'_{r,s}}=1$
* $x'_{m+j,i}=1$
* $x'_{r,s}=0,1$.

#### Corollary

* $x'_{r,r}=1$ and $x'_{m+j,i}=1$ need to be excluded from the model; on the other hand, without the $x'_{m+j,i}=1$ constraint the optimal path would consist only of $x'_{r,r}$-type loops which obviously can not be a feasible solution.
* Instead of $x'_{m+j,i}=1$, $t_{m+j,i}=-M$ can be written, where M is an arbitrarily large positive number. With that modification the formulation above is reduced to the form of a standard assignment problem, possible to solve with the Hungarian method.

### Phase 2

During the second phase, a time minimization problem is solved with m origins and n destinations without transshipment. This phase differs in two main aspects from the original setup:
* Transportation is only possible from an origin to a destination
* Transportation time from i to m+j is the sum of durations coming from the optimal route calculated in Phase 1. Worthy to be denoted by $t'_{i,m+j}$ in order to separate it from the times introduced during the first stage.

#### In mathematical form

The goal is to find $x_{i,m+j}\geq 0$ which minimize
$z=max\left\{t'_{i,m+j}:x_{i,m+j}>0\;\;(i=1\ldots m,\;j=1\ldots n)\right\}$, such that
* $\sum _{i=1}^{m}{x_{i,m+j}}=a_{i}$
* $\sum _{j=1}^{n}{x_{i,m+j}}=b_{m+j}$
* $\sum _{i=1}^{m}{a_{i}}=\sum _{j=1}^{n}{b_{m+j}}$
This problem is easy to be solved with the method developed by Prakash. The set $\left\{t'_{i,m+j},i=1\ldots m,\;j=1\ldots n\right\}$ needs to be partitioned into subgroups $L_{k},k=1\ldots q$, where each $L_{k}$ contain the $t'_{i,m+j}$-s with the same value. The sequence $L_{k}$ is organized as $L_{1}$ contains the largest valued $t'_{i,m+j}$'s $L_{2}$ the second largest and so on. Furthermore, $M_{k}$ positive priority factors are assigned to the subgroups $\sum _{L_{k}}{x_{i,m+j}}$, with the following rule:
$\alpha M_{k}-\beta M_{k+1}=\left\{{\begin{array}{cc}-ve,&if\;\alpha <0\\ve,&if\;\alpha >0\end{array}}\right.$
for all $\beta$. With this notation the goal is to find all $x_{i,m+j}$ which minimize the goal function
$z_{1}=\sum _{k=1}^{q}{M_{k}}\sum _{L_{k}}{x_{i,m+j}}$
such that
* $\sum _{i=1}^{m}{x_{i,m+j}}=a_{i}$
* $\sum _{j=1}^{n}{x_{i,m+j}}=b_{m+j}$
* $\sum _{i=1}^{m}{a_{i}}=\sum _{j=1}^{n}{b_{m+j}}$
* $\alpha M_{k}-\beta M_{k+1}=\left\{{\begin{array}{cc}-ve,&if\;\alpha <0\\ve,&if\;\alpha >0\end{array}}\right.$

## Extension

Some authors such as Das et al (1999) and Malakooti (2013) have considered multi-objective Transshipment problem.