To get good results from a linear programming application, it is very important to develop a good model for the problem being solved. There may be several ways of modeling the problem, and it is very important to select the one most appropriate to model it intelligently to get good results. Skill in modeling comes from experience; unfortunately there is no theory to teach how to model intelligently. We will now discuss a case study of an application carried out for routing trucks inside a container terminal to minimize congestion. Three different ways of modeling the problem have been tried. The first two approaches lead to (1) an integer programming model and (2) a large-scale multicommodity flow LP model, respectively. Both these models gave very poor results. The third and final model developed uses a substitute objective function technique; that is, it optimizes another simpler objective function that is highly correlated to the original, because that other objective function is much easier to control. This approach led to a small LP model, and gives good results.
Today most of the nonbulk cargo is packed into steel boxes called containers (typically of size 40×8×9 in feet) and transported in oceangoing vessels. A container terminal in a port is the place where these vessels dock at berths for unloading of inbound containers and loading of outbound containers. The terminals have storage yards for the temporary storage of these containers. The terminal’s internal trucks (TIT) transport containers between the berth and the storage yard (SY). The SY is divided into rectangular areas called blocks, each served by one or more cranes (rubber tired gantry cranes, or RTGC) to unload/load con- tainers from/to trucks. Customers bring outbound containers into the terminal in their own trucks (called external trucks, or XT), and pick up from the SY and take away their inbound containers on these XT. Each truck (TIT or XT) can carry only one container at a time.
The example (from Murty et al., 2005a,b) deals with the mathematical modeling of the problem of routing the trucks inside the terminal to minimize congestion. We represent
the terminal road system by a directed network G= (N,A) where N is the set of nodes (each block, berth unloading/loading position, road intersection, terminal gate is a node), Ais the set of arcs (each lane of a road segment joining a pair of nodes is an arc). Each (berth unloading/loading position, block), (block, berth unloading/loading position), (gate, block), (block, gate) is an origin–destination pair for trucks that have to go from the origin to the destination; they constitute a separate commodity that flows inG. LetT denote the number of these commodities. Many terminals use a 4-hour planning period for their truck routing decisions.
Let f= (fijr) denote the flow vector of various commodities on G in the planning period, where fijr= expected number of trucks of commodity r passing through arc (i, j) in the planning period for r= 1 to T, and (i, j)∈ A. Let θ= maxT
r=1fijr: (i, j)∈ A , μ= minT
r=1fijr: (i, j)∈ A
. Then eitherθ or θ−μcan be used as measures of conges- tion onGduring the planning period, to optimize.
As storage space allocation to arriving containers directly determines how many trucks travel between each origin–destination pair, the strategy used for this allocation plays a critical role in controlling congestion. This example deals with mathematical modeling of the problem of storage space allocation to arriving containers to minimize congestion.
Typically, a block has space for storing 600 containers, and a terminal may have 100 (some even more) blocks. At the beginning of the planning period, some spaces in the SY would be occupied by containers already in storage, and the set of occupied storage positions changes every minute; it is very difficult to control this change. Allocating a specific open storage position to each container expected to arrive in the planning period has been modeled as a huge integer program, which takes a long time to solve. In fact, even before this integer programming model is entered into the computer, the data change. So these traditional integer programming models are not only impractical but also inappropriate for the problem.
So a more practical way is to break up the storage space allocation decision into two stages:
Stage 1 determines only the container quota xi, for each block i, which is the number of newly arriving containers that will be dispatched to blockifor storage during the planning period. Stage 1 will not determine which of the specific arriving containers will be stored in any block; that decision is left to Stage 2, which is a dispatching policy that allocates each arriving container to a specific block for storage at the time of its arrival, based on conditions prevailing at that time. So, Stage 2 makes sure that by the end of the planning period the number of new containers sent for storage to each block is its quota number determined in Stage 1, while minimizing congestion at the blocks and on the roads.
Our example deals with the Stage 1 problem. The commonly used approach is based on a batch-processing strategy. Each batch consists of all the containers expected to arrive/leave at each node during the planning period. At the gate, this is the number of outbound containers expected to arrive for storage. At a block it is the number of stored containers expected to be retrieved and sent to each berth or the gate. At each berth it is the number of inbound containers expected to be unloaded to be sent for storage to SY. With this data, the problem can be modeled as a multicommodity network flow problem. It is a large- scale LP with many variables and thousands of constraints. However, currently available LP software systems are fast; this model can be solved using them in a few minutes of computer time.
But the output from this model turned out to be poor, as the model is based solely on the total estimated workload during the planning period. Such a model gives good results for the real problem only if the workload in the terminal (measured in number of containers
handled/unit time) is distributed more or less uniformly over time during the planning period. In reality the workload at terminals varies a lot over time. At the terminal where we did this work, the number of containers handled per hour varied from 50 to 400 in a 4-hour planning period.
Let fi(t) denote the fill ratio in block i at time point t, which is equal to (number of containers in storage in block i at time point t)/(number of storage spaces in block i).
We observed that the fill ratio in a block is highly positively correlated with the number of containers being moved in and out of the block/minute. So, maintaining fill ratios in all the blocks nearly equal, along with a good dispatching policy, will ensure that the volumes of traffic in the neighborhoods of all the blocks are nearly equal, thus ensuring equal distribution of traffic on all the terminal roads and hence minimizing congestion. This leads to a substitute-objective-function technique for controlling congestion indirectly. For the planning period, we define the following:
xi= The container quota for blocki= number of containers arriving in this period to be dispatched for storage to blocki, a decision variable.
ai= The number of stored containers that will remain in blocki at the end of this period if no additional containers are sent there for storage during this period, a data element.
N= The number of new containers expected to arrive at the terminal in this period for storage, a data element.
B, A= The total number of blocks in the storage yard, the number of storage posi- tions in each block, data elements.
The fill-ratio equalization policy determines the decision variables xi to make sure that the fill ratios in all the blocks are as nearly equal as possible at one time during the period, namely the end of the period. The fill ratio in the whole yard at the end of this period will beF= (N+
iai)/(A×B). If the fill ratios in all the blocks at the end of this period are all equal, they will all be equal toF. Thus, this policy determinesxi to guarantee that the fill ratio in each block will be as close toF as possible by the end of this period. Using the least sum of absolute deviations measure, this leads to the following model to determinexi.
Minimize B i=1
|ai+xi−AF| subject to
B i=1
xi=N
xi≥0 for alli Transforming this we get the following LP model to determinexi
Minimize B i=1
(u+i +u−i ) subject to
B i=1
xi=N
ai+xi−AF=u+i −u−i for alli xi, u+i , u−i ≥0 for alli
This is a much simpler and smaller LP model with onlyB+ 1 constraints. Using its special structure, it can be verified that its optimum solution can be obtained by the following
combinatorial scheme: Rearrange the blocks in increasing order ofai from top to bottom.
Then begin at the top and determinexi one after the other to bringai+xi to the levelAF or as close to it as possible until all theN new containers expected to arrive are allocated.
We will illustrate with a small numerical example of an SY withB= 9 blocks,A= 600 spaces in each block, with N= 1040 new containers expected to arrive during the plan- ning period. Data on ai already arranged in increasing order are given in the following table. So, the fill ratio in the whole yard at the end of the planning period is expected to beF= (N+
iai)/(AB) = 3547/5400≈0.67, and so the average number of containers in storage/block will be AF≈400. So, the LP model for determining xi for this planning period to equalize fill ratios is
Minimize 9 i=1
(u+i +u−i )
subject to 9 i=1
xi= 1040
ai+xi−u+i +u−i = 400 for alli xi, u+i , u−i ≥0 for alli
The optimum solution (xi) of this model obtained by the above combinatorial scheme is given in Table 1.11. ai+xi is the expected number of containers in storage in block i at the end of this planning period; it can be verified that its values in the various blocks are nearly equal.
Stage 1 determines only the container quota numbers for the blocks, not the identities of containers that will be stored in each block. The storage block to which each arriving container will be sent for storage is determined by the dispatching policy discussed in Stage 2. Now we describe Stage 2 briefly.
Regardless of how we determine the container quota numbersxi, if we send a consecutive sequence of arriving container trucks to the same block in a short time interval, we will create congestion at that block. To avoid this possibility, the dispatching policy developed in Stage 2 ensures that the yard crane in that block has enough time to unload a truck we send there before we send another. For this we had to develop a system to monitor continuously over time:wi(t) = the number of trucks waiting in blockito be served by the yard cranes there at time pointt. As part of our work on this project, the terminal where we did this work developed systems to monitorwi(t) continuously over time for each blocki.
TABLE 1.11 Optimum Solutionxi
Blocki ai xi ai+xi
1 100 300 400
2 120 280 400
3 150 250 400
4 300 100 400
5 325 75 400
6 350 35 385
7 375 0 375
8 400 0 400
9 450 0 450
Total 2570 1040
They also developed a dispatching cell that has the responsibility of dispatching each truck in the arriving stream to a block; this cell gets this wi(t) information continuously over time.
As time passes during the planning period, the dispatching cell also keeps track of how many containers in the arriving stream have already been sent to each block for storage.
When this number becomes equal to the container quota number for that block, they will not send any more containers for storage to that block during the planning period. For each block i, letxRi(t) =xi−(number of new containers sent to block i for storage up to time t in the planning period) = remaining container quota number for blocki at timet in the planning period.
This policy dispatches each truck arriving (at the terminal gate, and at each berth) at time pointtin the period to a blockisatisfying:wi(t) = Min{wj(t) :jsatisfyingxRi (t)>0}, that is, a block with a remaining positive quota that has the smallest number of trucks waiting in it.
This strategy for determining the quota numbers for blocks, xi described above, along with the dynamic dispatching policy to dispatch arriving container trucks using real time information on how many trucks are waiting in each block, turned out to be highly effective.
It reduced congestion and helped reduce truck turnaround time by over 20%.
In this work, our first two mathematical models for the problem turned out to be ineffec- tive; the third one was not only the simplest but a highly effective one. This example shows that to get good results in real world applications, it is necessary to model the problems intelligently. Intelligent modeling + information technology + optimization techniques is a powerful combination for solving practical problems.