Sign Out
Logged In:
Tab Image

Loading Container Freight at the Melbourne Rail Terminal

by Alan Brown and Patrick Tobin, Swinburne University of Technology, Victoria, Australia


Rail freight terminals engage in extensive loading and unloading to transfer freight between trains or to and from trucks. An efficient loading/unloading procedure is essential for smooth running of a terminal and effective use of expensive machinery. Terminals differ in the freight characteristics but simulation can be a useful tool in examining both feasible and near optimal loading options. Various loading and freight options are examined here with specific consideration of the rail terminal in Melbourne.


A container freight terminal provides for the transfer of freight containers between trains and from trains to trucks and vice versa. In Australia, container freight terminals operate within each of the main five capital cities – often with interstate freight and intra-state freight separated.

The modelling of container freight terminals is well established (see e.g. Kozan, 1997) and individual problems which arise within terminals are frequently amenable to solution or partial solution by the standard techniques in operations research such as mathematical programming or simulation.

The efficient loading and unloading of trains has not been specifically discussed in the literature and is a complex problem partly dependent on local conditions. The matter was raised however in context of general terminal operations at the Mathematics in Industry Study Group for the Adelaide container terminal (Ernst and Pudney, 2001). Issues which can impinge on the solution include truck-train access and the terminal layout, load/unload equipment available, types of freight containers as well as inspection and rostering considerations. The requirements of trucks are also important – do they need to take a specified container or will any similar container suit them for transport. For example, in the Adelaide terminal there is extensive double stacking of low freight containers for Perth whereas this is rare on the freight corridors not serving Perth. In Melbourne there are overhead gantry loaders covering one or more lines as well as the mobile reach stacking equipment.

The complexity of the problem makes simulation a convenient option. This enables feasibility of loading plans to be investigated and the sensitivity of those plans to parameters arising both within and outside control of the freight depot can be analysed. These parameters arise naturally such as loading or unloading times on equipment or commencement times for loading and unloading.

Loading Plans and the Model Process

Scope of problem
The objective of the partial problem is to load each container onto its assigned wagon whilst incurring the minimum cost to the terminal operator and minimum delay to trucks which wait for containers to be loaded onto the train. The principal costs to the terminal operator are the travel costs of the lifting equipment and the costs associated with delays in scheduled arrival and departure of trains.

Service policies for loading
Several different service policies for loading can be considered, two of which are of particular interest here. The service policy is called:

  1. “loopy” - if the stacker travels from one end of its assigned service section and back, and loads only in one direction, and
  2. “sweep” - if the stacker travels from one end of its assigned service section and back, and loads in both directions.

A FIFO policy leads to a major blow-out in the overall service time for loading and unloading a train because of wasteful travel time by the lifting equipment.

A deterministic model of the loopy or sweep policy for loading

The model for loading a train assumes that:

  1. on arrival the train is broken into p pieces of equal length, and moved to parallel sidings
  2. an individual stacker can load and unload wagons on each of these parallel sidings from a single position at the same rate,
  3. stackers are assigned equal nonoverlapping sections of the train to service.

The following parameters are used in the model:

Container arrival rate = ? per minute
Container loading rate = µ per minute
Traffic intensity ? = ? / µ (< 1 if queue is not to explode)
Train length = L metres
Stacker velocity = v metres per minute
Number of stackers = n
Number of parallel lines = p
Length of train serviced by each stacker = L / np metres
Loop travel time t = 2L / vnp minutes
Average loop time T = loop travel time + loading time for expected arrivals

T = t + T? / µ = 2L / vnp + T?

This equation can be rewritten in the form

T = 2L / vnp(1 - ?)

It is easy to show that the average waiting time w = T / 2 minutes, and the maximum waiting time m = T minutes

In practice, the estimate for the average waiting time is likely to be high, because savings in travel time can be made by turning when no further containers awaiting loading are visible in the direction of travel. On the other hand the estimate for the maximum waiting time is likely to be low because of stochastic variation in the pattern of arrivals. These biases will be accentuated by variation in the traffic intensity over the working time period.

Differences between loopy and sweep policies under stochastic conditions
The loopy policy has an objective of keeping its expected maximum waiting time to a minimum by providing the same level of service to all trucks. The sweep policy provides a better service to those containers loaded near the middle of the loop to the detriment of the service to those containers loaded near the extremities of the loop. It makes up for this by providing two chances of loading containers near the extremity in each loop which has the effect of increasing the possibility of savings in distance and travel time on the next loop. Simulation results show that there is a reduction in the average loop time for the sweep policy, leading to lower mean and maximum waiting times compared with the loopy policy.

Simultaneous loading and unloading of wagons leads to time losses, due to interference. A newly arrived container cannot be loaded onto a wagon still occupied by a container yet to be unloaded. The container still on the wagon can be “loaded to ground” to clear the immediate problem, but a subsequent lifting operation will still be required to place it on a truck so that it can be cleared from the depot.

Another form of interference arises if two trucks are waiting to gain access to the same wagon - one with the out-bound container and the other to collect the in-bound container.

The basic need to decouple the loading from the unloading can be achieved when the lifting equipment is able to service two parallel tracks and two sets of wagons are available. However interference between trucks can still occur when several parallel tracks are being serviced by the one piece of lifting equipment. Furthermore, attempts to localise the region of service for the out-bound train are likely to be thwarted by a random location of pick-up of containers on any in-bound train. Simulation of such situations indicates that localisation of the region of service for the out-bound train can actually delay its departure unless loading and unloading from parallel tracks is temporarily suspended.

The Melbourne container terminal has parallel sidings. This study is carried out under the following assumptions:

  1. A train may arrive with in-bound containers and depart with a similar (or same) number of out-bound containers at scheduled times, or a train may arrive with in-bound at a scheduled time and a complementary set of wagons are available on a parallel siding to accept out-bound containers prior to the scheduled departure time. Combinations are possible.
  2. Several pieces of lifting equipment are available. Load balancing is considered.
  3. Shunting disrupts the loading and unloading operations on other sidings for prescribed periods of time. Load rebalancing for the lifting equipment may be required.
  4. The arrival time distribution for trucks to accept in-bound containers is known.
  5. The arrival time distribution for outbound trucks is known.

A proportion of the in-bound containers will be loaded to ground because of interference in the use of the wagons. The choice of the loading policy will affect the choice of the unloading policy. In the case of policy conflict, a period may be required shortly before scheduled departure when loading is given priority over unloading so that the train can depart on time. After the train has left, the containers on the ground must be lifted onto the waiting trucks.

The simulation process is more difficult to control, as it is affected by both the train movements and the truck arrivals. Train shunting may lead to load rebalancing for the lifting equipment. Congestion of trucks on the road opposite parallel wagons may occur. In addition congestion of containers on the ground may occur if there are several “in/out” trains being processed simultaneously.

The key result obtained from this type of simulation turns out to be the measure of the level of congestion likely to occur under a proposed operational plan. The measure is obtained without inflicting the congestion on the clients. Calibration of the model with observed performance of the freight terminal is necessary of course before credibility of the model measurements can be established.

Simulation in the Melbourne Container Depot

The Melbourne Interstate Freight Terminal
This terminal operates with two large gantries covering four lines and two individual line gantries as well as two reach-stackers and a forklift. The terminal sends out five trains each workday – one each to Brisbane, Perth and Sydney and two to Adelaide. The layout of the terminal is shown in figure 1.

Figure 1 The Melbourne Interstate Freight Terminal Layout.
Figure 1 The Melbourne Interstate Freight Terminal Layout.

The overhead gantry is shown in Figure 2

Figure 2 Overhead Gantry
Figure 2 Overhead Gantry

In figure 3 a reach stacker is shown loading a container to a waiting truck.

Figure 3 A reach stacker in loading action
Figure 3 A reach stacker in loading action

Results for the Sydney and Adelaide trains

The Melbourne terminal originally used the four-track gantry system for loading and unloading the Perth and Brisbane trains. The terminal management decided to switch the Sydney and Adelaide trains to this position instead and we simulated the process in advance of the move to see if this would be a feasible and effective move. The simulation generated few problems based on the available data for train arrivals and shunt times as well as the estimated loading and unloading times. The data was placed in an EXCEL spreadsheet ‘brew’ which is able to be changed by the user at will. This was then linked to the VBA coded macros in the spreadsheet, which generated the truck entities and associated them with the wagons. This simulation code also provided the train shunts. Output included charts identifying truck congestion and waiting time distributions as well as tracking truck service patterns.

A sample data brew is shown in the worksheet segment of figure 4. The duration times are shown in hours, minutes and seconds for convenience of the user and the track labels and other data reflect the real situation. The simulation proceeds rapidly on a fast computer and can be slowed down by use of an artificial time-wasting device called ‘fog’ which forces the pace down. This enables the gantry motion and train wagon activity to be visible to the user.

As well as input data the brew worksheet records the truck waiting time and output statistics for the gantries. Congestion is signalled by a ‘jam’ variable. This gives the number of other trucks waiting for any given truck during the load/unload process.

Figure 4 Sample Data Input for the Simulation of Adelaide and Sydney Trains
Figure 4 Sample Data Input for the Simulation of Adelaide and Sydney Trains

Figure 5 Sample Output on Congestion of Trucks  the Truck view.
Figure 5 Sample Output on Congestion of Trucks – the Truck view.

Low-congestion feasible solutions are marked by no spikes, or only a few spikes, all of height 1. This is illustrated in figure 5.

The congestion can also be viewed in terms of train wagon position.

The container arrival and departure can be viewed in a Road chart which tracks the in and out positions for every one of the 290 loading/unloading events. This is shown in figure 6. The horizontal axis gives wagon position along the road.

Congestion manifests in the chart by some truck arrival/departures being superimposed. This is not always serious if the delivering truck takes a container from the same location almost at once– that would assist the gantry.

Figure 6 Sample Output on Road beside wagons: position versus time.
Figure 6 Sample Output on Road beside wagons: position versus time.

Figure 7 A Typical Waiting Time Distribution for the brew of figure 4.
Figure 7 A Typical Waiting Time Distribution for the brew of figure 4.

The waiting time distribution for the trucks (assuming that they can leave after they are loaded/unloaded) is illustrated in figure 7. The peaks in this mainly correspond to periods following train shunts. The simulation does not allow the gantries to work on any line while shunting occurs although there are some variations from this in the real situation where some work can occur on an inner track while an outer track shunt occurs. Hence the solution is conservative here.

The character of a train as a linear set of wagons is well mirrored by a column of cells in EXCEL making it easy to perform a visual interactive simulation by colouring cells as they are loaded and unloaded.

Figure 8 The spreadsheet columns used for visual simulation.
Figure 8 The spreadsheet columns used for visual simulation.

Figure 9 Motion of the Gantries
Figure 9 Motion of the Gantries

In basic form the simulation spreadsheet uses the first four columns for the tracks and the gantry location. This is shown in figure 8. A barrier is placed centrally to prevent gantry crossover or collision - in practice they must avoid each other and yet each can range over the full train length. To model this the bar can be moved as appropriate during a load period. It is altered with each shunt.

The second column of the visual simulation worksheet gives the wagons being loaded for Sydney, the third column is the recently arrived Sydney train being unloaded and the Adelaide train is in the fourth column, loading and unloading. Colour coding identifies trains and also signals cell activity – i.e. that a wagon is being loaded or unloaded.

The gantries’ operation can be tracked on a chart as they pass through the train loading or unloading the containers. The vertical axis gives the wagon position – the location along the train. The horizontal axis shows the time of day. Inbound and outbound containers are shown on the diagram and the gantry paths are given – in figure 9 the top path is for gantry 2.

In general the gantry paths will be slow (low frequency) when the gantries are under pressure. For a gantry under less pressure there will be more frequent traverses and there are horizontal idle times which show up. The simulation can help in planning any extension to a gantry operation – more gantries or more rail under them.

Experience shows that down-time on the gantries is very low and regular maintenance is possible on Sundays. There has been occasional equipment breakdown with older mobile machinery. The simulation has not allowed for any equipment outage at this stage.

Assignment and unloading policies
The problem of assignment of containers to wagons is not easy, as many factors must be taken into account. For the purpose of this paper we consider only policies that might affect the loading and unloading operations.

At one extreme, the assignment of containers to wagons might be at random. This may be satisfactory when parallel sidings are being worked simultaneously, especially if concurrent unloading operations are also being conducted from wagons at random.

One possible way to implement the assignment of containers is to maintain a continuous bias towards loading at the front of the train. Early arrivals will be assigned closer to the front whenever there is an alternative choice of wagon. If the bias is maintained throughout the service period, then the remaining empty wagons near the front of the train will tend to be filled first. Towards the close of service the empty wagons should be near the rear. This will have the effect of localising the region of service, especially in the important period close to departure, when it can be assumed that all the booked containers have arrived. The remaining task to load all the waiting containers will be completed by at most one more loop. The time for this final loop can be reduced below the average loop time if the region of service has been localised.

It is important to note that the load planner requires no feedback of the actual stacker position to perform such a task, but it would need to remember its prior decisions. However for the load planning to be effective the unloading policy must be in harmony. The effect of concurrent unloading at random wagons would be to negate the benefits of the load planning. A practical solution is to allow, and even encourage, trucks coming to accept inbound containers to position themselves close by and in the direction of service of the lifting equipment. Under these conditions the regional bias in the loading operation will influence the regional bias in the unloading operation, and the benefits of load planning can be largely achieved.

Simulation offers a convenient option for examining feasibility of loading plans in container terminals. The advantage of using EXCEL is that it gives ease of access on everyday machines meaning no expensive additional software needs to be purchased. There is a naturally user-friendly front end provided in the spreadsheet environment for a regular user. The simulation offers an opportunity for management to plan for future expansions and make contingency plans in the event of serious delays – for example due to late arrival of a train or equipment breakdown.

Some problems emerge which require further modelling. The single road allows trucks limited access to wagons and can cause real wait times to blow out if a served truck is stuck in a line. Increasing numbers of the trucks under the gantry have specific containers to collect in comparison to the previous case where Brisbane and Perth trains were loaded there.

Other issues also naturally arise in freighting containers. From the container user’s point of view, the time spent in the freight terminal whilst other containers are loaded or unloaded onto the train is dead time. This dead time grows as the length of the train increases, and if the delay is too large a proportion of the total travel time, the alternative of road transport between nodes becomes more attractive. Short distances between nodes require short trains, while longer trains are effective only for long distance haulage. This is seen in the comparative length of Brisbane / Perth trains compared with the Adelaide and Sydney trains. Further research could determine if market competition provides adequate checks and balances for the problem of determining the appropriate length of the train.

Thanks are due to Peter Pudney from the MISG for discussion and preliminary analysis on loading policies and to Tony McGreevy from the National Rail Corporation in Melbourne for supplying data and information for the simulation models, testing them and providing feedback.


  • Ernst, A. and Pudney, P. Efficient Loading of Intermodal Container Trains. Draft paper for the Proceedings of the MISG 2001.
  • Kozan, E, (1997), Increasing the Operational Efficiency of Container Terminals in Australia, Journal of the Operational Research Society, 48, 151-161.


Alan Brown is a retired actuary and former operations research group leader at an Insurance company. He is active in researching various problems in practical and theoretical areas of operations research and applied statistics and holds an adjunct professorship at Swinburne University of Technology. His main areas of interest are risk modeling and health insurance and he has coauthored papers in several areas of operations research with the present coauthor.



Patrick Tobin has been a lecturer in mathematics at Swinburne University of Technology since 1990 where he has written numerous papers in operations research and mathematics education. He is secretary of the state branch of the Australian Society for Operations Research. Recent research has included models of banking risk, electricity spot price forecasts, interior point algorithms in mathematical programming and use of technology in teaching mathematics.

First published to members of the Operational Research Society in OR Insight July- September 2004