# A Transient Queuing Model for Analyzing and Optimizing Gate Congestion of Railway Container Terminals

Authors: Ming Zeng; Wenming Cheng; Peng Guo
Journal: Mathematical Problems in Engineering
 (2014)

---

## Abstract

As the significant connection between the external and internal of the railway container terminal, the operation performance of the gate system plays an important role in the entire system. So the gate congestion will bring many losses to the railway container terminal, even the entire railway container freight system. In this paper, the queue length and the average waiting time of the railway container terminal gate system, as well as the optimal number of service channels during the different time period, are investigated. AnM
/
E
k
/
n transient queuing model is developed based on the distribution of the arrival time interval and the service time; besides the transient solutions are acquired by the equally likely combinations (ELC) heuristic method. Then the model is integrated into an optimization framework to obtain the optimal operation schemes. Finally, some computational experiments are conducted for model validation, sensitivity testing, and system optimization. Experimental results indicate that the model can provide the accurate reflection to the operation situation of the railway container terminal gate system, and the approach can yield the optimal number of service channels within the reasonable computation time.


---

## Body

## 1. Introduction

Nowadays, the container transportation has been fast developed throughout the world. It becomes the best mode of transportation for the commercial intercourse of various countries, and the containerization ratio of the general cargos in some countries has exceeded 80%. The statistics of the United Nations Conference on Trade and Development (UNCTAD) present that Germany is the first country of European Union containerized exports and imports, which has 3.04 million TEUS in export and 2.84 million TEUS in import in 2010. Meanwhile, China ranks as the first of all the exporters of containerized cargo in 2010, which has 31.3 million TEUS, and it also has 12.0 million TEUS import volume of containerized cargo in 2010 which is ranked the second. The first country is the United States which has 17.6 million TEUS [1]. The railway container transportation was firstly carried out in the United States in 1853, and China began this practice in the 1950s. In the recent years, the railway container transportation volume of China is on a rapid growth. Compared with 2000, the dispatch volume of railway container cargos increased by 60.1% in 2005, and the average growth rate per annum of railway container transportation volume in China is 11.6% in 2000–2004. In 2006, the volume has a 16.7% increase to the year 2005, that is, 68.91 million tons. Furthermore, the container transportation volume is as much as 471 TEU which is equivalent to 90.65 million tons in 2012 [2].According to the huge demand, China increases the investment to the relevant facilities and the infrastructure construction and has established a railway container transportation support system which takes 18 railway container terminals as the hub. Railway container terminals are always established in the main economic centers and the important ports, which are the collecting and distributing centre of the railway container transportation. Railway container terminal has many functions as marshalling, declassification, handling, warehousing, and some other logistics service. Nonetheless, with the constant development of the regional economy and the rapid growth of transportation volume, there still are many challenges to the railway container terminals. Generally, the maximum backlog time of the combined type marshalling cargos in the container terminals may be up to 15–20 days. Hence, the improving of the operation efficiency in railway container terminal under the existing conditions is a serious problem at present. As one of the most important procedures in the railway container terminal operation system, the through capacity and service level of the gate system have significant impacts on the efficiency of the railway container terminal, even the whole railway container freight system. Currently, the operation management of the railway container terminal gate system relies on the empirical estimation and the real time information feedback in the most cases. However, these methods are not accurate and efficient in reality, so they are not able to solve this problem fundamentally.Recently, the researchers pay more attention to the study of container terminals. Meanwhile, their research areas mainly focus on the operation management and the equipment scheduling. Mattfeld and Kopfer [3] developed an integral decision model for the operations of the terminal. Kim et al. [4] proposed a dynamic programming model to evaluate the delay time of outside trucks in port container terminals and discussed the different situations, respectively. Lee et al. [5] presented a mixed integer programming model together with a genetic algorithm to solve the quay crane scheduling problem and then extended the problem with the noninterference constraints [6]. Similar problem was also studied by using different constrains and algorithms [7–9]. In addition, the relevant layout planning [10, 11], the berth allocation [12], and the programming problems [13–18] are also researched comprehensively.Similarly, the researches of the railway container terminals and the intermodal terminals are conducted in these fields, and the loading/discharging equipment scheduling problems have become the hot issues [19–21]. Guo et al. [22] presented a mixed integer programming model with a discrete artificial bee colony algorithm to solve the gantry crane scheduling problem in railway container terminals. Dorndorf and Schneider [23] studied the triple cross-over stacking cranes scheduling problem in order to increase the productivity and reduce the delays. Besides, the operation researches, for example, the loading planning [24, 25], the shunting of rail container wagons [26], the container stacking [27], and the layout planning like the crane areas determination [28, 29], are some other research interests in this field. The strategic planning and the scenario generating for the railway container terminals are usually implemented by the simulation methods [30–32]. Guo et al. [33] developed a discrete event simulation model for the container handling process of the railway container logistic center to make the evaluation and improvement. However, there exist some disadvantages in the simulation methods; for example, the quantitative solutions cannot be provided and they are unable to be nested with the optimization models. Therefore, Edmond and Maggs [34] have pointed out the importance of queuing theory in the related decision making of container terminals many years before. Recently, some literature began to use the queuing methods to analyze the problems. For instance, Canonaco et al. [35] proposed a queuing network model to solve the machine operations problem of the container terminal. But the researches of queuing models for the railway container terminal gate system are still relatively small, because the railway container terminal gate system cannot be described completely and accurately by the traditional queuing models, which are also incapable of analyzing the instantaneous features of this system, so there are some limitations in this field.The queuing models can be classified into stationary queuing models and transient queuing models. Because it is difficult to describe and calculate all the system states of the transient queuing models, the majority of the queuing models which are applied in various important research areas only take the steady solution into consideration [36, 37]. However, the theory and application research of transient queuing models has gone through some development in the past ten years. Ausin et al. [38] used the Bayesian analysis method to solve the optimized number of servers in the GI/M/c queuing system on the basis of the minimum total costs. Besides, they utilized the Bayesian inference to predict the transient features of the GI/G/1 system [39]. Czachórski et al. [40] studied the transient features of the G/G/1 queuing system from the diffusion approximation model. Parlar and Sharafali [41] created a time-related queuing model to optimize the airport security checkpoints and briefly discussed a general condition that the service time follows the Erlang distribution.In this paper, a transient queuing model and an optimization model are established to analyze and optimize the gate congestion according to the arrival time interval of the external container trucks and the distribution regularity of the service time for the railway container terminal gate system. Then the equally likely combinations heuristic solution and the optimization solution methods are adopted to solve these models. After that, the system simulation and sensitivity analysis are conducted to verify the rationality and validity of our approach. Finally, the optimal numbers of the service channels in different time periods are determined by the optimization experiment. The remainder of this paper is structured as follows. Section2 provides some background information to the case study. The queuing model and optimization model together with the solution methods are presented in Section 3. The model validation, sensitivity analysis, and the optimization experiments are given in Section 4. Finally, Section 5 concludes the paper with an outline of future study.


## 2. Chengdu Railway Container Terminal

Chengdu railway container terminal is located in the northeast of Chengdu, where it is near the Chengxiang railway station which connects with many key rail routes of China. Chengdu railway container terminal is the largest railway container terminal of Asia, which is also the container logistics hinge of southwest China. Therefore, it acts as an important part to the entire container transportation network. The terminal was built in 2010, which is 8.4 kilometers long and 850 meters wide. The annual cargo throughput is 1 million TEU in recent period, and the forward cargo handling capacity will be 2.5 million TEU.Railway container terminal gate system is the access of the container trucks to go through. There are some service channels which have the technical facilities to conduct the necessary processes in the railway container terminal gate system. A picture of Chengdu railway container terminal gate system can be seen in Figure1. The major works at the service channels are container number identification, information verification, inspection, and position assignment. The railway container terminal gate system is schematically depicted in Figure 2. However, because of the limitations of the facilities and the service conditions, the container trucks have to line up to complete the processes before they enter into or get out of the terminal. Therefore, the whole processes can be seen as a queuing process, in which the container trucks are the input flows and the channels are the service stations.Figure 1
Chengdu railway container terminal gate system.Figure 2
Schematic representation of the railway container terminal gate system.


## 3. Railway Container Terminal Gate System Modelling

### 3.1.M
/
E
k
/
n Queuing Model

All the data with respect to the time intervals of two container trucks that arrive in succession and the service time of the service channels were collected to ascertain the best fitting distributions. 560 arrival time intervals of container trucks and 350 service times of the service channels were field-measured in Chengdu railway container terminal gate system for the observation period of two weeks, and then probability information of the collected data along with the relevant distribution curves was acquired as follows.The best fitting distribution of the arrival time intervals as displayed in Figure3 is the exponential distribution f
(
x
)
=
0.212
e
-
0.212
x, x
≥
0, and the average arrival time interval is 4.714 minutes. The fit of arrival time interval distribution to the collected data is calculated by R-square which equals 0.9542 and RMSE (root mean square error) which is 0.012. The distribution of the service time as shown in Figure 4 is best fitted by the Erlang distribution f
(
x
)
=
0.0625
·
x
·
e
-
0.25
x, x
≥
0, with k equal to 2, and the mean service rate is 0.25. The R-square value for fitting the service time distribution to the collected data is 0.9078, and the RMSE is 0.096. Thus, the appropriate queuing model for the railway container terminal gate system is exponential arrival intervals with Erlang service times and multiple service stations, which is represented as M
/
E
k
=
2
/
n. The solution for this model can be divided into two types: the exact solution method and the approximate solution method. However, the former has a large number of possible states and the state transitions are complicated; the calculation is quite difficult. So here we utilize the approximate solution method to solve the M
/
E
k
/
n queuing model. Equally likely combinations (ELC) heuristic solution technique has been put forward by Escobar et al. [42], the basic assumption of which is the combinations of the stages unfinished in the servers are equally likely. The detailed description of this heuristic solution method is as follows.Figure 3
The distribution of arrival time interval.Figure 4
The distribution of service time.


#### 3.1.1. System States Description

For the sake of simplifying the Erlang distribution and then forming an efficient solution, the system states are represented by three elements and(
s
,
v
,
m
); s means the stages have to be finished by the container trucks in the system at this moment; v is the total number of container trucks in the system at present; m refers to the mode number. The reason for introducing the third element is to distinguish the different modes with the same s and v. For example, the state (
7,4
), as shown in Figure 5, either means four trucks in the system with two trucks having one stage unfinished, one having two stages unfinished, and the other one just arriving (i.e., Mode 1) or represents one truck having one stage left over and the other three all having two stages (i.e., Mode 2).Figure 5
An example of different modes and stages for the same state.


#### 3.1.2. State Transition Probability

Before doing the description of the state transition probability, firstly letP
s
,
v represent the probability of state (
s
,
v
), because the relevant calculation will be conducted, so the mode number is discarded for conciseness. Compared with the original ELC solution which considers new trucks will arrive at each time step, in this paper, we take the average arrival time interval into account, in order to reduce the state space dimension and calculation difficulty.Suppose there arev container trucks and s stages have to be finished at current time t for the next time step (i.e., t
+
1); the possible states and state transition are as below.Lett
a denote the average time interval between two trucks arriving at the gate system and let t
N represent the Nth truck had arrived. For the next time step, before the (
N
+
1
)
th truck arrived, there are two possible transitions that may happen when a truck finishes one stage.(a) The stage is the last one to finish for a truck, and the truck leaves the gate system.Under this situation, the state is transferred from(
s
,
v
) to (
s
-
1
,
v
-
1
). As mentioned in Section 3.1.1, there are different modes for the same state and different combinations for the same mode. Therefore, the combinations for one given mode I can be calculated as follows:
(1)
C
i
=
ω
!
ω
1
!
ω
2
!
⋯
ω
p
!
,
where ω is the min
⁡
{
v
,
n
}, which means the active service channels; p is the number of combinations of stages in the service channels; ω
j is the number of channels that have the same number of unfinished stages; j
=
1,2
,
…
p.Accordingly, the total number of combinations for a specific state is(2)
C
total
=
∑
i
∈
M
C
i
,
where M is a set of all the mode numbers for this state.Then the probability of this situation (i.e., the last stage is finished and the truck leaves the gate system) is calculated by(3)
σ
s
,
v
=
1
ω
C
total
∑
i
∈
M
E
1
,
i
C
i
,
where C
i
/
C
total means the probability of mode i; E
1
,
i is the number of service channels with one stage unfinished in mode i, so E
1
,
i
/
ω means the probability of service channels with only one stage left in mode i.Suppose the service rate isλ
(
t
); the transition probability from state (
s
,
v
) to (
s
-
1
,
v
-
1
) can thus be given by
(4)
P
(
s
,
v
)
→
(
s
-
1
,
v
-
1
)
=
σ
s
,
v
×
λ
(
t
)
×
k
×
v
.(b) The truck is still in the gate system to finish the other stages.Because the probability that the last stage is finished and the truck leaves the gate system isσ
(
s
,
v
), the probability that one more stage is completed but there is no truck leaving the gate system can be simply represented by
(5)
δ
s
,
v
=
1
-
σ
s
,
v
.Consequently, the transition probability from state(
s
,
v
) to (
s
-
1
,
v
) is calculated as
(6)
P
(
s
,
v
)
→
(
s
-
1
,
v
)
=
δ
s
,
v
×
λ
(
t
)
×
k
×
v
.On the other hand, when the next time step (i.e.,t
+
1) exactly equals t
N
+
t
a, which means the (
N
+
1
)
th truck has just arrived, the only possible state transition is from (
s
,
v
) to (
s
+
k
,
v
+
1
); k is the total number of stages for a container truck to finish in the gate system. Hence, the transition probability is P
(
s
,
v
)
→
(
s
+
k
,
v
+
1
)
=
1.The entire state transition mentioned above forM
/
E
k
=
2
/
n queuing model can be explained by the state transition diagram of Figure 6.Figure 6
State transition diagram of theM
/
E
k
=
2
/
n queuing model.For Figure6, the numbers in the first row denote the total number of trucks in the system (i.e., v), and the numbers in the circles represent the unfinished stages in the system (i.e., s); a state (
s
,
v
) can thus be expressed. The solid arrows that point to the right indicate the transitions that one truck just arrives. The slanted arrows represent the transitions that one truck finishes the last stage and leaves the system. And the downward dotted arrows are used to denote the transitions that one more stage is finished but the truck is still in the system.


#### 3.1.3. State to State Transition Probabilities Calculation

On the basis of what is discussed in Section3.1.2, the state to state transition probabilities at each time step t
i then can be calculated and updated accordingly by the following equations. For the time steps, t
i
=
t
,
…
,
t
+
t
a
-
1, that is, the time period when the N
th truck had arrived and one time step before the (
N
+
1
)
th truck arrives. Let P
s
,
v
(
t
i
) represent the probability of state (
s
,
v
) at current time t, and let P
s
,
v
′
(
t
i
) represent the variation of P
s
,
v
(
t
i
) at each time step, so obviously the state probabilities of the next time step can be given by
(7)
P
s
,
v
(
t
i
+
1
)
=
P
s
,
v
(
t
i
)
+
P
s
,
v
′
(
t
i
)
.The calculation processes of the variation of probabilities are as below.(a) When the number of trucks is less than the number of service channels in the system,v
<
n, we have the following.For the state(
0,0
),
(8)
P
0,0
′
(
t
i
)
=
λ
(
t
i
)
×
k
×
P
1,1
(
t
i
)
.
For v
=
1,2
,
…
,
n
-
1,
(9)
P
v
k
,
v
′
(
t
i
)
=
-
λ
(
t
i
)
·
k
·
v
·
P
v
k
,
v
(
t
i
)
+
σ
v
k
+
1
,
v
+
1
·
λ
(
t
i
)
·
k
·
(
v
+
1
)
·
P
v
k
+
1
,
v
+
1
(
t
i
)
.
For v
=
1,2
,
…
,
n
-
1, a
=
1,2
,
…
,
v
·
(
k
-
1
),
(10)
P
v
k
-
a
,
v
′
(
t
i
)
=
-
λ
(
t
i
)
·
k
·
v
·
P
v
k
-
a
,
v
(
t
i
)
+
δ
v
k
-
a
+
1
,
v
·
λ
(
t
i
)
·
k
·
v
·
P
v
k
-
a
+
1
,
v
(
t
i
)
+
σ
v
k
-
a
+
1
,
v
+
1
·
λ
(
t
i
)
·
k
·
(
v
+
1
)
·
P
v
k
-
a
+
1
,
v
+
1
(
t
i
)
.(b) When the number of trucks equals or is greater than the number of service channels in the system,v
≥
n, we have the following.Forv
=
n, n
+
1
,
…
,
N,
(11)
P
v
k
,
v
′
(
t
i
)
=
-
λ
(
t
i
)
·
k
·
n
·
P
v
k
,
v
(
t
i
)
+
σ
(
n
-
1
)
k
+
1
,
n
·
λ
(
t
i
)
·
k
·
n
·
P
v
k
+
1
,
v
+
1
(
t
i
)
.
For v
=
n, n
+
1
,
…
,
N, a
=
1,2
,
…
,
(
n
-
1
)
·
(
k
-
1
),
(12)
P
v
k
-
a
,
v
′
(
t
i
)
=
-
λ
(
t
i
)
·
k
·
n
·
P
v
k
-
a
,
v
(
t
i
)
+
δ
n
k
-
a
+
1
,
n
·
λ
(
t
i
)
·
k
·
n
·
P
v
k
-
a
+
1
,
v
(
t
i
)
+
σ
(
n
-
1
)
k
-
a
+
1
,
n
·
λ
(
t
i
)
·
k
·
n
·
P
v
k
-
a
+
1
,
v
+
1
(
t
i
)
.
For v
=
n, n
+
1
,
…
,
N, b
=
(
n
-
1
)
·
(
k
-
1
)
+
1
,
(
n
-
1
)
·
(
k
-
1
)
+
2
,
…
,
n
(
k
-
1
),
(13)
P
v
k
-
b
,
v
′
(
t
i
)
=
-
λ
(
t
i
)
·
k
·
n
·
P
v
k
-
b
,
v
(
t
i
)
+
δ
n
k
-
b
+
1
,
n
·
λ
(
t
i
)
·
k
·
n
·
P
v
k
-
b
+
1
,
v
(
t
i
)
.Then for the time pointt
i
=
t
+
t
a, the (
N
+
1
)
th truck arrives in the system. As mentioned in Section 3.1.2, the probability of state transition from (
s
,
v
) to (
s
+
k
,
v
+
1
) is equal to 1. Therefore, the state probabilities under this situation can be calculated as below.Forv
=
0,1
,
…
,
N, N
+
1, a
=
0,1
,
…
,
(
n
-
1
)
·
(
k
-
1
)
,
…
,
n
·
(
k
-
1
), if the states (
v
k
-
a
-
k
,
v
-
1
) exist, then
(14)
P
v
k
-
a
,
v
(
t
i
)
=
P
v
k
-
a
-
k
,
v
-
1
(
t
i
)
.The probabilities of the states which are not included in (8)–(14) are all equal to 0. The processes mentioned above are repeated until the time step reaches the end of analysis time period. Then all the transient state probabilities can be acquired using the decoding procedure in Algorithm 1.Algorithm 1:The state transition probabilities transient calculation procedure.
Procedure:the state to state transition probabilities transient calculation
Initialization:
Input the initial value of k,  n,  t_max, t
a, λ. Set t
=
0, N
=
0, s
=
0,  P
0,0
(
0
)
=
1, isend = 0
Initialize the P
s
,
v
(
t
i
) and P
′
s
,
v
(
t
i
)
while  isend = 0 do
for  t
i
=
t : t
+
t
a
-
1  do
if  N < n  then
calculate P
′
0,0
(
t
i
) by (8) and P
0,0
(
t
i
+
1
) by (7)
for  v
=
1 : N  do
calculateP
′
v
k
,
v
(
t
i
) by (9) and P
v
k
,
v
(
t
i
+
1
) by (7)
for  a
=
1 : v
(
k
-
1
)  do
calculate P
′
v
k
-
a
,
v
(
t
i
) by (10) and P
v
k
-
a
,
v
(
t
i
+
1
) by (7)
end for
end for
else if
N≥  n  then
calculate P
′
0,0
(
t
i
) and P
0,0
(
t
i
+
1
)
for
v
=
1 : n
-
1  do //calculate the part of probabilities that v < n //
calculateP
′
v
k
,
v
(
t
i
), P
’
v
k
-
a
,
v
(
t
i
) and P
v
k
,
v
(
t
i
+
1
), P
v
k
-
a
,
v
(
t
i
+
1
)
end for
for  v
=
n : N  do //calculate the part of probabilities that v ≥ n //
calculateP
′
v
k
,
v
(
t
i
) by (11) and P
v
k
,
v
(
t
i
+
1
) by (7)
for
a
=
1 : (n
-
1)(k
-
1) do
calculate P
′
v
k
-
a
,
v
(
t
i
) by (12) and P
v
k
-
a
,
v
(
t
i
+
1
) by (7)
end for
for
b
=
(
n
-
1
)
(
k
-
1
)
+
1 : n
(
k
-
1
)   do
calculate P
′
v
k
-
b
,
v
(
t
i
) by (13) and P
v
k
-
b
,
v
(
t
i
+
1
) by (7)
end for
end for
end if
end for
t
i
=
t
+
t
a, v
=
N
+
1
calculate the probabilities when a new container truck arrives P
v
k
-
a
,
v
(
t
i
) by (14)
v
=
v
-
1, t
=
t
i, N
=
N
+
1
if  t ≥ t_max then
isend = 1
end if
end while


#### 3.1.4. The Calculation of Gate Congestion Indicators

After calculating the entire probabilities for each time step in the analysis time period, some significant performance indicators such as the probability ofv container trucks in the system, the queue length, and the average waiting time for the v container trucks at any time point t all could be calculated accordingly. Moreover, these results can be obtained promptly without doing the unnecessary or repetitive calculation as the simulation models. The value of the performance indicators is provided by the following equations separately.(a) The probability ofv container trucks in the system at time t:
(15)
P
v
(
t
)
=
{
∑
s
=
v
k
v
P
s
,
v
(
t
)
,
0
≤
v
≤
n
∑
s
=
n
+
k
·
(
v
-
n
)
k
v
P
s
,
v
(
t
)
,
v
>
n
.(b) The queue length at timet:
(16)
L
v
(
t
)
=
l
×
∑
v
(
P
v
(
t
)
×
v
)
,
0
≤
v
≤
N
,
where l is the average length of the container trucks.(c) The average waiting time for thev container trucks in the system at time t:
(17)
W
v
(
t
)
=
μ
∑
v
(
P
v
(
t
)
×
v
)
.


### 3.2. Optimization Model

As mentioned before, thisM
/
E
k
/
n transient queuing model is easy to be integrated into an optimization framework in order to get some useful results to support the related decision making. So in this section, a simple and valid optimization model for the railway container terminal gate system is proposed.The objective of the optimization is to minimize the total cost of the railway container terminal gate system in a certain analysis time periodT. The total cost here consists of two parts: the operation expenses of the supply side and the waiting cost of the demand side. Therefore, in other words, the goal of this optimization problem is to find the optimal number of service channels which strike a balance between the supply and demand. Then the objective function and the constraints can be determined accordingly. As shown in function (18), the operating cost of the service channels is expressed by the multiplication of operation cost per hour of a service channel, the number of service channels, and the certain analysis time period T. The waiting cost of the container trucks in the queue is calculated by multiplying the hourly waiting value of each container truck by the number of container trucks waiting in the queue by the analysis time period T. There are two constraints represented in functions (19) and (20) separately. All the above mentioned expressions are presented as below.LetC
t denotes the total cost of the gate system during the time period t. Then
(18)
min
⁡
C
t
=
(
C
n
×
n
t
+
C
w
×
R
t
)
×
T
(19)
s
.
t
.
μ
×
R
t
n
t
≤
ε
,
(20)
n
min
⁡
≤
n
t
≤
n
max
⁡
,
where C
n is the operation cost per hour of a service channel; C
w is the waiting cost per hour of a container truck; n
t is the number of service channels opened in the time period t; n
min
⁡ and n
max
⁡ are the minimum and maximum number of service channels available in the system; R
t is the number of container trucks waiting in the system in the time period t; T is the time span of time period t; μ is the average service time of the service channel; ε is the threshold of the average waiting time; (
μ
×
R
t
)
/
n
t
≤
ε ensures the average waiting time of each container truck does not exceed the threshold. n
min
⁡
≤
n
t
≤
n
max
⁡ indicates that the number of service channels opened in the time period t cannot go beyond the available range.For the solution of this optimization problem, first integrate the transient queuing model into the optimization framework, and then conduct an optimization calculation in each time periodt. That is to say, the optimal number of the service channels that satisfied the objective function and constrains is searched at each round of the transient calculation procedure in Section 3.1.3. This computation process will be carried out in MATLAB R2008a, and the detailed results and discussions are listed in Section 4.3.


## 3.1.M
/
E
k
/
n Queuing Model

All the data with respect to the time intervals of two container trucks that arrive in succession and the service time of the service channels were collected to ascertain the best fitting distributions. 560 arrival time intervals of container trucks and 350 service times of the service channels were field-measured in Chengdu railway container terminal gate system for the observation period of two weeks, and then probability information of the collected data along with the relevant distribution curves was acquired as follows.The best fitting distribution of the arrival time intervals as displayed in Figure3 is the exponential distribution f
(
x
)
=
0.212
e
-
0.212
x, x
≥
0, and the average arrival time interval is 4.714 minutes. The fit of arrival time interval distribution to the collected data is calculated by R-square which equals 0.9542 and RMSE (root mean square error) which is 0.012. The distribution of the service time as shown in Figure 4 is best fitted by the Erlang distribution f
(
x
)
=
0.0625
·
x
·
e
-
0.25
x, x
≥
0, with k equal to 2, and the mean service rate is 0.25. The R-square value for fitting the service time distribution to the collected data is 0.9078, and the RMSE is 0.096. Thus, the appropriate queuing model for the railway container terminal gate system is exponential arrival intervals with Erlang service times and multiple service stations, which is represented as M
/
E
k
=
2
/
n. The solution for this model can be divided into two types: the exact solution method and the approximate solution method. However, the former has a large number of possible states and the state transitions are complicated; the calculation is quite difficult. So here we utilize the approximate solution method to solve the M
/
E
k
/
n queuing model. Equally likely combinations (ELC) heuristic solution technique has been put forward by Escobar et al. [42], the basic assumption of which is the combinations of the stages unfinished in the servers are equally likely. The detailed description of this heuristic solution method is as follows.Figure 3
The distribution of arrival time interval.Figure 4
The distribution of service time.


### 3.1.1. System States Description

For the sake of simplifying the Erlang distribution and then forming an efficient solution, the system states are represented by three elements and(
s
,
v
,
m
); s means the stages have to be finished by the container trucks in the system at this moment; v is the total number of container trucks in the system at present; m refers to the mode number. The reason for introducing the third element is to distinguish the different modes with the same s and v. For example, the state (
7,4
), as shown in Figure 5, either means four trucks in the system with two trucks having one stage unfinished, one having two stages unfinished, and the other one just arriving (i.e., Mode 1) or represents one truck having one stage left over and the other three all having two stages (i.e., Mode 2).Figure 5
An example of different modes and stages for the same state.


### 3.1.2. State Transition Probability

Before doing the description of the state transition probability, firstly letP
s
,
v represent the probability of state (
s
,
v
), because the relevant calculation will be conducted, so the mode number is discarded for conciseness. Compared with the original ELC solution which considers new trucks will arrive at each time step, in this paper, we take the average arrival time interval into account, in order to reduce the state space dimension and calculation difficulty.Suppose there arev container trucks and s stages have to be finished at current time t for the next time step (i.e., t
+
1); the possible states and state transition are as below.Lett
a denote the average time interval between two trucks arriving at the gate system and let t
N represent the Nth truck had arrived. For the next time step, before the (
N
+
1
)
th truck arrived, there are two possible transitions that may happen when a truck finishes one stage.(a) The stage is the last one to finish for a truck, and the truck leaves the gate system.Under this situation, the state is transferred from(
s
,
v
) to (
s
-
1
,
v
-
1
). As mentioned in Section 3.1.1, there are different modes for the same state and different combinations for the same mode. Therefore, the combinations for one given mode I can be calculated as follows:
(1)
C
i
=
ω
!
ω
1
!
ω
2
!
⋯
ω
p
!
,
where ω is the min
⁡
{
v
,
n
}, which means the active service channels; p is the number of combinations of stages in the service channels; ω
j is the number of channels that have the same number of unfinished stages; j
=
1,2
,
…
p.Accordingly, the total number of combinations for a specific state is(2)
C
total
=
∑
i
∈
M
C
i
,
where M is a set of all the mode numbers for this state.Then the probability of this situation (i.e., the last stage is finished and the truck leaves the gate system) is calculated by(3)
σ
s
,
v
=
1
ω
C
total
∑
i
∈
M
E
1
,
i
C
i
,
where C
i
/
C
total means the probability of mode i; E
1
,
i is the number of service channels with one stage unfinished in mode i, so E
1
,
i
/
ω means the probability of service channels with only one stage left in mode i.Suppose the service rate isλ
(
t
); the transition probability from state (
s
,
v
) to (
s
-
1
,
v
-
1
) can thus be given by
(4)
P
(
s
,
v
)
→
(
s
-
1
,
v
-
1
)
=
σ
s
,
v
×
λ
(
t
)
×
k
×
v
.(b) The truck is still in the gate system to finish the other stages.Because the probability that the last stage is finished and the truck leaves the gate system isσ
(
s
,
v
), the probability that one more stage is completed but there is no truck leaving the gate system can be simply represented by
(5)
δ
s
,
v
=
1
-
σ
s
,
v
.Consequently, the transition probability from state(
s
,
v
) to (
s
-
1
,
v
) is calculated as
(6)
P
(
s
,
v
)
→
(
s
-
1
,
v
)
=
δ
s
,
v
×
λ
(
t
)
×
k
×
v
.On the other hand, when the next time step (i.e.,t
+
1) exactly equals t
N
+
t
a, which means the (
N
+
1
)
th truck has just arrived, the only possible state transition is from (
s
,
v
) to (
s
+
k
,
v
+
1
); k is the total number of stages for a container truck to finish in the gate system. Hence, the transition probability is P
(
s
,
v
)
→
(
s
+
k
,
v
+
1
)
=
1.The entire state transition mentioned above forM
/
E
k
=
2
/
n queuing model can be explained by the state transition diagram of Figure 6.Figure 6
State transition diagram of theM
/
E
k
=
2
/
n queuing model.For Figure6, the numbers in the first row denote the total number of trucks in the system (i.e., v), and the numbers in the circles represent the unfinished stages in the system (i.e., s); a state (
s
,
v
) can thus be expressed. The solid arrows that point to the right indicate the transitions that one truck just arrives. The slanted arrows represent the transitions that one truck finishes the last stage and leaves the system. And the downward dotted arrows are used to denote the transitions that one more stage is finished but the truck is still in the system.


### 3.1.3. State to State Transition Probabilities Calculation

On the basis of what is discussed in Section3.1.2, the state to state transition probabilities at each time step t
i then can be calculated and updated accordingly by the following equations. For the time steps, t
i
=
t
,
…
,
t
+
t
a
-
1, that is, the time period when the N
th truck had arrived and one time step before the (
N
+
1
)
th truck arrives. Let P
s
,
v
(
t
i
) represent the probability of state (
s
,
v
) at current time t, and let P
s
,
v
′
(
t
i
) represent the variation of P
s
,
v
(
t
i
) at each time step, so obviously the state probabilities of the next time step can be given by
(7)
P
s
,
v
(
t
i
+
1
)
=
P
s
,
v
(
t
i
)
+
P
s
,
v
′
(
t
i
)
.The calculation processes of the variation of probabilities are as below.(a) When the number of trucks is less than the number of service channels in the system,v
<
n, we have the following.For the state(
0,0
),
(8)
P
0,0
′
(
t
i
)
=
λ
(
t
i
)
×
k
×
P
1,1
(
t
i
)
.
For v
=
1,2
,
…
,
n
-
1,
(9)
P
v
k
,
v
′
(
t
i
)
=
-
λ
(
t
i
)
·
k
·
v
·
P
v
k
,
v
(
t
i
)
+
σ
v
k
+
1
,
v
+
1
·
λ
(
t
i
)
·
k
·
(
v
+
1
)
·
P
v
k
+
1
,
v
+
1
(
t
i
)
.
For v
=
1,2
,
…
,
n
-
1, a
=
1,2
,
…
,
v
·
(
k
-
1
),
(10)
P
v
k
-
a
,
v
′
(
t
i
)
=
-
λ
(
t
i
)
·
k
·
v
·
P
v
k
-
a
,
v
(
t
i
)
+
δ
v
k
-
a
+
1
,
v
·
λ
(
t
i
)
·
k
·
v
·
P
v
k
-
a
+
1
,
v
(
t
i
)
+
σ
v
k
-
a
+
1
,
v
+
1
·
λ
(
t
i
)
·
k
·
(
v
+
1
)
·
P
v
k
-
a
+
1
,
v
+
1
(
t
i
)
.(b) When the number of trucks equals or is greater than the number of service channels in the system,v
≥
n, we have the following.Forv
=
n, n
+
1
,
…
,
N,
(11)
P
v
k
,
v
′
(
t
i
)
=
-
λ
(
t
i
)
·
k
·
n
·
P
v
k
,
v
(
t
i
)
+
σ
(
n
-
1
)
k
+
1
,
n
·
λ
(
t
i
)
·
k
·
n
·
P
v
k
+
1
,
v
+
1
(
t
i
)
.
For v
=
n, n
+
1
,
…
,
N, a
=
1,2
,
…
,
(
n
-
1
)
·
(
k
-
1
),
(12)
P
v
k
-
a
,
v
′
(
t
i
)
=
-
λ
(
t
i
)
·
k
·
n
·
P
v
k
-
a
,
v
(
t
i
)
+
δ
n
k
-
a
+
1
,
n
·
λ
(
t
i
)
·
k
·
n
·
P
v
k
-
a
+
1
,
v
(
t
i
)
+
σ
(
n
-
1
)
k
-
a
+
1
,
n
·
λ
(
t
i
)
·
k
·
n
·
P
v
k
-
a
+
1
,
v
+
1
(
t
i
)
.
For v
=
n, n
+
1
,
…
,
N, b
=
(
n
-
1
)
·
(
k
-
1
)
+
1
,
(
n
-
1
)
·
(
k
-
1
)
+
2
,
…
,
n
(
k
-
1
),
(13)
P
v
k
-
b
,
v
′
(
t
i
)
=
-
λ
(
t
i
)
·
k
·
n
·
P
v
k
-
b
,
v
(
t
i
)
+
δ
n
k
-
b
+
1
,
n
·
λ
(
t
i
)
·
k
·
n
·
P
v
k
-
b
+
1
,
v
(
t
i
)
.Then for the time pointt
i
=
t
+
t
a, the (
N
+
1
)
th truck arrives in the system. As mentioned in Section 3.1.2, the probability of state transition from (
s
,
v
) to (
s
+
k
,
v
+
1
) is equal to 1. Therefore, the state probabilities under this situation can be calculated as below.Forv
=
0,1
,
…
,
N, N
+
1, a
=
0,1
,
…
,
(
n
-
1
)
·
(
k
-
1
)
,
…
,
n
·
(
k
-
1
), if the states (
v
k
-
a
-
k
,
v
-
1
) exist, then
(14)
P
v
k
-
a
,
v
(
t
i
)
=
P
v
k
-
a
-
k
,
v
-
1
(
t
i
)
.The probabilities of the states which are not included in (8)–(14) are all equal to 0. The processes mentioned above are repeated until the time step reaches the end of analysis time period. Then all the transient state probabilities can be acquired using the decoding procedure in Algorithm 1.Algorithm 1:The state transition probabilities transient calculation procedure.
Procedure:the state to state transition probabilities transient calculation
Initialization:
Input the initial value of k,  n,  t_max, t
a, λ. Set t
=
0, N
=
0, s
=
0,  P
0,0
(
0
)
=
1, isend = 0
Initialize the P
s
,
v
(
t
i
) and P
′
s
,
v
(
t
i
)
while  isend = 0 do
for  t
i
=
t : t
+
t
a
-
1  do
if  N < n  then
calculate P
′
0,0
(
t
i
) by (8) and P
0,0
(
t
i
+
1
) by (7)
for  v
=
1 : N  do
calculateP
′
v
k
,
v
(
t
i
) by (9) and P
v
k
,
v
(
t
i
+
1
) by (7)
for  a
=
1 : v
(
k
-
1
)  do
calculate P
′
v
k
-
a
,
v
(
t
i
) by (10) and P
v
k
-
a
,
v
(
t
i
+
1
) by (7)
end for
end for
else if
N≥  n  then
calculate P
′
0,0
(
t
i
) and P
0,0
(
t
i
+
1
)
for
v
=
1 : n
-
1  do //calculate the part of probabilities that v < n //
calculateP
′
v
k
,
v
(
t
i
), P
’
v
k
-
a
,
v
(
t
i
) and P
v
k
,
v
(
t
i
+
1
), P
v
k
-
a
,
v
(
t
i
+
1
)
end for
for  v
=
n : N  do //calculate the part of probabilities that v ≥ n //
calculateP
′
v
k
,
v
(
t
i
) by (11) and P
v
k
,
v
(
t
i
+
1
) by (7)
for
a
=
1 : (n
-
1)(k
-
1) do
calculate P
′
v
k
-
a
,
v
(
t
i
) by (12) and P
v
k
-
a
,
v
(
t
i
+
1
) by (7)
end for
for
b
=
(
n
-
1
)
(
k
-
1
)
+
1 : n
(
k
-
1
)   do
calculate P
′
v
k
-
b
,
v
(
t
i
) by (13) and P
v
k
-
b
,
v
(
t
i
+
1
) by (7)
end for
end for
end if
end for
t
i
=
t
+
t
a, v
=
N
+
1
calculate the probabilities when a new container truck arrives P
v
k
-
a
,
v
(
t
i
) by (14)
v
=
v
-
1, t
=
t
i, N
=
N
+
1
if  t ≥ t_max then
isend = 1
end if
end while


### 3.1.4. The Calculation of Gate Congestion Indicators

After calculating the entire probabilities for each time step in the analysis time period, some significant performance indicators such as the probability ofv container trucks in the system, the queue length, and the average waiting time for the v container trucks at any time point t all could be calculated accordingly. Moreover, these results can be obtained promptly without doing the unnecessary or repetitive calculation as the simulation models. The value of the performance indicators is provided by the following equations separately.(a) The probability ofv container trucks in the system at time t:
(15)
P
v
(
t
)
=
{
∑
s
=
v
k
v
P
s
,
v
(
t
)
,
0
≤
v
≤
n
∑
s
=
n
+
k
·
(
v
-
n
)
k
v
P
s
,
v
(
t
)
,
v
>
n
.(b) The queue length at timet:
(16)
L
v
(
t
)
=
l
×
∑
v
(
P
v
(
t
)
×
v
)
,
0
≤
v
≤
N
,
where l is the average length of the container trucks.(c) The average waiting time for thev container trucks in the system at time t:
(17)
W
v
(
t
)
=
μ
∑
v
(
P
v
(
t
)
×
v
)
.


## 3.1.1. System States Description

For the sake of simplifying the Erlang distribution and then forming an efficient solution, the system states are represented by three elements and(
s
,
v
,
m
); s means the stages have to be finished by the container trucks in the system at this moment; v is the total number of container trucks in the system at present; m refers to the mode number. The reason for introducing the third element is to distinguish the different modes with the same s and v. For example, the state (
7,4
), as shown in Figure 5, either means four trucks in the system with two trucks having one stage unfinished, one having two stages unfinished, and the other one just arriving (i.e., Mode 1) or represents one truck having one stage left over and the other three all having two stages (i.e., Mode 2).Figure 5
An example of different modes and stages for the same state.


## 3.1.2. State Transition Probability

Before doing the description of the state transition probability, firstly letP
s
,
v represent the probability of state (
s
,
v
), because the relevant calculation will be conducted, so the mode number is discarded for conciseness. Compared with the original ELC solution which considers new trucks will arrive at each time step, in this paper, we take the average arrival time interval into account, in order to reduce the state space dimension and calculation difficulty.Suppose there arev container trucks and s stages have to be finished at current time t for the next time step (i.e., t
+
1); the possible states and state transition are as below.Lett
a denote the average time interval between two trucks arriving at the gate system and let t
N represent the Nth truck had arrived. For the next time step, before the (
N
+
1
)
th truck arrived, there are two possible transitions that may happen when a truck finishes one stage.(a) The stage is the last one to finish for a truck, and the truck leaves the gate system.Under this situation, the state is transferred from(
s
,
v
) to (
s
-
1
,
v
-
1
). As mentioned in Section 3.1.1, there are different modes for the same state and different combinations for the same mode. Therefore, the combinations for one given mode I can be calculated as follows:
(1)
C
i
=
ω
!
ω
1
!
ω
2
!
⋯
ω
p
!
,
where ω is the min
⁡
{
v
,
n
}, which means the active service channels; p is the number of combinations of stages in the service channels; ω
j is the number of channels that have the same number of unfinished stages; j
=
1,2
,
…
p.Accordingly, the total number of combinations for a specific state is(2)
C
total
=
∑
i
∈
M
C
i
,
where M is a set of all the mode numbers for this state.Then the probability of this situation (i.e., the last stage is finished and the truck leaves the gate system) is calculated by(3)
σ
s
,
v
=
1
ω
C
total
∑
i
∈
M
E
1
,
i
C
i
,
where C
i
/
C
total means the probability of mode i; E
1
,
i is the number of service channels with one stage unfinished in mode i, so E
1
,
i
/
ω means the probability of service channels with only one stage left in mode i.Suppose the service rate isλ
(
t
); the transition probability from state (
s
,
v
) to (
s
-
1
,
v
-
1
) can thus be given by
(4)
P
(
s
,
v
)
→
(
s
-
1
,
v
-
1
)
=
σ
s
,
v
×
λ
(
t
)
×
k
×
v
.(b) The truck is still in the gate system to finish the other stages.Because the probability that the last stage is finished and the truck leaves the gate system isσ
(
s
,
v
), the probability that one more stage is completed but there is no truck leaving the gate system can be simply represented by
(5)
δ
s
,
v
=
1
-
σ
s
,
v
.Consequently, the transition probability from state(
s
,
v
) to (
s
-
1
,
v
) is calculated as
(6)
P
(
s
,
v
)
→
(
s
-
1
,
v
)
=
δ
s
,
v
×
λ
(
t
)
×
k
×
v
.On the other hand, when the next time step (i.e.,t
+
1) exactly equals t
N
+
t
a, which means the (
N
+
1
)
th truck has just arrived, the only possible state transition is from (
s
,
v
) to (
s
+
k
,
v
+
1
); k is the total number of stages for a container truck to finish in the gate system. Hence, the transition probability is P
(
s
,
v
)
→
(
s
+
k
,
v
+
1
)
=
1.The entire state transition mentioned above forM
/
E
k
=
2
/
n queuing model can be explained by the state transition diagram of Figure 6.Figure 6
State transition diagram of theM
/
E
k
=
2
/
n queuing model.For Figure6, the numbers in the first row denote the total number of trucks in the system (i.e., v), and the numbers in the circles represent the unfinished stages in the system (i.e., s); a state (
s
,
v
) can thus be expressed. The solid arrows that point to the right indicate the transitions that one truck just arrives. The slanted arrows represent the transitions that one truck finishes the last stage and leaves the system. And the downward dotted arrows are used to denote the transitions that one more stage is finished but the truck is still in the system.


## 3.1.3. State to State Transition Probabilities Calculation

On the basis of what is discussed in Section3.1.2, the state to state transition probabilities at each time step t
i then can be calculated and updated accordingly by the following equations. For the time steps, t
i
=
t
,
…
,
t
+
t
a
-
1, that is, the time period when the N
th truck had arrived and one time step before the (
N
+
1
)
th truck arrives. Let P
s
,
v
(
t
i
) represent the probability of state (
s
,
v
) at current time t, and let P
s
,
v
′
(
t
i
) represent the variation of P
s
,
v
(
t
i
) at each time step, so obviously the state probabilities of the next time step can be given by
(7)
P
s
,
v
(
t
i
+
1
)
=
P
s
,
v
(
t
i
)
+
P
s
,
v
′
(
t
i
)
.The calculation processes of the variation of probabilities are as below.(a) When the number of trucks is less than the number of service channels in the system,v
<
n, we have the following.For the state(
0,0
),
(8)
P
0,0
′
(
t
i
)
=
λ
(
t
i
)
×
k
×
P
1,1
(
t
i
)
.
For v
=
1,2
,
…
,
n
-
1,
(9)
P
v
k
,
v
′
(
t
i
)
=
-
λ
(
t
i
)
·
k
·
v
·
P
v
k
,
v
(
t
i
)
+
σ
v
k
+
1
,
v
+
1
·
λ
(
t
i
)
·
k
·
(
v
+
1
)
·
P
v
k
+
1
,
v
+
1
(
t
i
)
.
For v
=
1,2
,
…
,
n
-
1, a
=
1,2
,
…
,
v
·
(
k
-
1
),
(10)
P
v
k
-
a
,
v
′
(
t
i
)
=
-
λ
(
t
i
)
·
k
·
v
·
P
v
k
-
a
,
v
(
t
i
)
+
δ
v
k
-
a
+
1
,
v
·
λ
(
t
i
)
·
k
·
v
·
P
v
k
-
a
+
1
,
v
(
t
i
)
+
σ
v
k
-
a
+
1
,
v
+
1
·
λ
(
t
i
)
·
k
·
(
v
+
1
)
·
P
v
k
-
a
+
1
,
v
+
1
(
t
i
)
.(b) When the number of trucks equals or is greater than the number of service channels in the system,v
≥
n, we have the following.Forv
=
n, n
+
1
,
…
,
N,
(11)
P
v
k
,
v
′
(
t
i
)
=
-
λ
(
t
i
)
·
k
·
n
·
P
v
k
,
v
(
t
i
)
+
σ
(
n
-
1
)
k
+
1
,
n
·
λ
(
t
i
)
·
k
·
n
·
P
v
k
+
1
,
v
+
1
(
t
i
)
.
For v
=
n, n
+
1
,
…
,
N, a
=
1,2
,
…
,
(
n
-
1
)
·
(
k
-
1
),
(12)
P
v
k
-
a
,
v
′
(
t
i
)
=
-
λ
(
t
i
)
·
k
·
n
·
P
v
k
-
a
,
v
(
t
i
)
+
δ
n
k
-
a
+
1
,
n
·
λ
(
t
i
)
·
k
·
n
·
P
v
k
-
a
+
1
,
v
(
t
i
)
+
σ
(
n
-
1
)
k
-
a
+
1
,
n
·
λ
(
t
i
)
·
k
·
n
·
P
v
k
-
a
+
1
,
v
+
1
(
t
i
)
.
For v
=
n, n
+
1
,
…
,
N, b
=
(
n
-
1
)
·
(
k
-
1
)
+
1
,
(
n
-
1
)
·
(
k
-
1
)
+
2
,
…
,
n
(
k
-
1
),
(13)
P
v
k
-
b
,
v
′
(
t
i
)
=
-
λ
(
t
i
)
·
k
·
n
·
P
v
k
-
b
,
v
(
t
i
)
+
δ
n
k
-
b
+
1
,
n
·
λ
(
t
i
)
·
k
·
n
·
P
v
k
-
b
+
1
,
v
(
t
i
)
.Then for the time pointt
i
=
t
+
t
a, the (
N
+
1
)
th truck arrives in the system. As mentioned in Section 3.1.2, the probability of state transition from (
s
,
v
) to (
s
+
k
,
v
+
1
) is equal to 1. Therefore, the state probabilities under this situation can be calculated as below.Forv
=
0,1
,
…
,
N, N
+
1, a
=
0,1
,
…
,
(
n
-
1
)
·
(
k
-
1
)
,
…
,
n
·
(
k
-
1
), if the states (
v
k
-
a
-
k
,
v
-
1
) exist, then
(14)
P
v
k
-
a
,
v
(
t
i
)
=
P
v
k
-
a
-
k
,
v
-
1
(
t
i
)
.The probabilities of the states which are not included in (8)–(14) are all equal to 0. The processes mentioned above are repeated until the time step reaches the end of analysis time period. Then all the transient state probabilities can be acquired using the decoding procedure in Algorithm 1.Algorithm 1:The state transition probabilities transient calculation procedure.
Procedure:the state to state transition probabilities transient calculation
Initialization:
Input the initial value of k,  n,  t_max, t
a, λ. Set t
=
0, N
=
0, s
=
0,  P
0,0
(
0
)
=
1, isend = 0
Initialize the P
s
,
v
(
t
i
) and P
′
s
,
v
(
t
i
)
while  isend = 0 do
for  t
i
=
t : t
+
t
a
-
1  do
if  N < n  then
calculate P
′
0,0
(
t
i
) by (8) and P
0,0
(
t
i
+
1
) by (7)
for  v
=
1 : N  do
calculateP
′
v
k
,
v
(
t
i
) by (9) and P
v
k
,
v
(
t
i
+
1
) by (7)
for  a
=
1 : v
(
k
-
1
)  do
calculate P
′
v
k
-
a
,
v
(
t
i
) by (10) and P
v
k
-
a
,
v
(
t
i
+
1
) by (7)
end for
end for
else if
N≥  n  then
calculate P
′
0,0
(
t
i
) and P
0,0
(
t
i
+
1
)
for
v
=
1 : n
-
1  do //calculate the part of probabilities that v < n //
calculateP
′
v
k
,
v
(
t
i
), P
’
v
k
-
a
,
v
(
t
i
) and P
v
k
,
v
(
t
i
+
1
), P
v
k
-
a
,
v
(
t
i
+
1
)
end for
for  v
=
n : N  do //calculate the part of probabilities that v ≥ n //
calculateP
′
v
k
,
v
(
t
i
) by (11) and P
v
k
,
v
(
t
i
+
1
) by (7)
for
a
=
1 : (n
-
1)(k
-
1) do
calculate P
′
v
k
-
a
,
v
(
t
i
) by (12) and P
v
k
-
a
,
v
(
t
i
+
1
) by (7)
end for
for
b
=
(
n
-
1
)
(
k
-
1
)
+
1 : n
(
k
-
1
)   do
calculate P
′
v
k
-
b
,
v
(
t
i
) by (13) and P
v
k
-
b
,
v
(
t
i
+
1
) by (7)
end for
end for
end if
end for
t
i
=
t
+
t
a, v
=
N
+
1
calculate the probabilities when a new container truck arrives P
v
k
-
a
,
v
(
t
i
) by (14)
v
=
v
-
1, t
=
t
i, N
=
N
+
1
if  t ≥ t_max then
isend = 1
end if
end while


## 3.1.4. The Calculation of Gate Congestion Indicators

After calculating the entire probabilities for each time step in the analysis time period, some significant performance indicators such as the probability ofv container trucks in the system, the queue length, and the average waiting time for the v container trucks at any time point t all could be calculated accordingly. Moreover, these results can be obtained promptly without doing the unnecessary or repetitive calculation as the simulation models. The value of the performance indicators is provided by the following equations separately.(a) The probability ofv container trucks in the system at time t:
(15)
P
v
(
t
)
=
{
∑
s
=
v
k
v
P
s
,
v
(
t
)
,
0
≤
v
≤
n
∑
s
=
n
+
k
·
(
v
-
n
)
k
v
P
s
,
v
(
t
)
,
v
>
n
.(b) The queue length at timet:
(16)
L
v
(
t
)
=
l
×
∑
v
(
P
v
(
t
)
×
v
)
,
0
≤
v
≤
N
,
where l is the average length of the container trucks.(c) The average waiting time for thev container trucks in the system at time t:
(17)
W
v
(
t
)
=
μ
∑
v
(
P
v
(
t
)
×
v
)
.


## 3.2. Optimization Model

As mentioned before, thisM
/
E
k
/
n transient queuing model is easy to be integrated into an optimization framework in order to get some useful results to support the related decision making. So in this section, a simple and valid optimization model for the railway container terminal gate system is proposed.The objective of the optimization is to minimize the total cost of the railway container terminal gate system in a certain analysis time periodT. The total cost here consists of two parts: the operation expenses of the supply side and the waiting cost of the demand side. Therefore, in other words, the goal of this optimization problem is to find the optimal number of service channels which strike a balance between the supply and demand. Then the objective function and the constraints can be determined accordingly. As shown in function (18), the operating cost of the service channels is expressed by the multiplication of operation cost per hour of a service channel, the number of service channels, and the certain analysis time period T. The waiting cost of the container trucks in the queue is calculated by multiplying the hourly waiting value of each container truck by the number of container trucks waiting in the queue by the analysis time period T. There are two constraints represented in functions (19) and (20) separately. All the above mentioned expressions are presented as below.LetC
t denotes the total cost of the gate system during the time period t. Then
(18)
min
⁡
C
t
=
(
C
n
×
n
t
+
C
w
×
R
t
)
×
T
(19)
s
.
t
.
μ
×
R
t
n
t
≤
ε
,
(20)
n
min
⁡
≤
n
t
≤
n
max
⁡
,
where C
n is the operation cost per hour of a service channel; C
w is the waiting cost per hour of a container truck; n
t is the number of service channels opened in the time period t; n
min
⁡ and n
max
⁡ are the minimum and maximum number of service channels available in the system; R
t is the number of container trucks waiting in the system in the time period t; T is the time span of time period t; μ is the average service time of the service channel; ε is the threshold of the average waiting time; (
μ
×
R
t
)
/
n
t
≤
ε ensures the average waiting time of each container truck does not exceed the threshold. n
min
⁡
≤
n
t
≤
n
max
⁡ indicates that the number of service channels opened in the time period t cannot go beyond the available range.For the solution of this optimization problem, first integrate the transient queuing model into the optimization framework, and then conduct an optimization calculation in each time periodt. That is to say, the optimal number of the service channels that satisfied the objective function and constrains is searched at each round of the transient calculation procedure in Section 3.1.3. This computation process will be carried out in MATLAB R2008a, and the detailed results and discussions are listed in Section 4.3.


## 4. Computational Experiments

### 4.1. Model Validation

For the purpose of verifying the transient queuing model and the corresponding solution method, a simulation method is adopted simultaneously to acquire the estimators of the railway container terminal gate system. eM_Plant is a professional object-oriented simulation software for management, industrial engineering, and system engineering. It is able to analyze the operation conditions of the railway container terminal gate system by running the visual simulation models. One simulation model of the railway container terminal gate system is shown in Figure7.Figure 7
Simulation model in eM_Plant.In the simulation model, the Container trucks arrival is the producer of container trucks which is set at the exponential arrival time interval to represent the truck arrival situations. The Queuing place and waiting signs represent the container trucks in the queue. The Service station denotes the service channels in the railway container terminal gate system which is commanded to satisfy the Erlang service time. The Container trucks move is the saver of the produced container trucks and indicates the trucks move to the container yard. Event controller is used to determine the beginning and ending time of the simulation.The experiments are conducted by using theM
/
E
k
/
n transient queuing model and the eM_Plant simulation model, respectively. Take 30 trucks per hour as a possible volume of the container trucks for the experiment. The service time follows the E
k
=
2 distribution and the mean value is set as 8 minutes. The analysis time period is instructed to be 60 minutes. Besides, to relieve the impact of randomness, the simulation model needs to be run several times to get the mean value and standard variance for each case. Meanwhile, in consideration of the running time, the simulation model is run 20 times and all the results are shown in Table 1.Table 1
Results of the queuing method and the simulation method.
Arrival volume (trucks/h)
Number of service channels
Average number of trucks in the queue
Queuing model
Simulation model
Relative error
Mean value
Standard variance
30
1
23.00
22.16
6.94
0.038
2
16.28
14.73
5.75
0.105
3
9.96
8.68
3.62
0.147
4
4.73
4.41
2.28
0.073It can be seen, from the comparison experiment results, that the average number of trucks in the queue at the end of 60 minutes calculated from theM
/
E
k
=
2
/
n transient queuing model is approximate to the simulation model. This means the transient queuing model is correct and the equally likely combinations (ELC) heuristic method is effective. Therefore, the model together with the solution method can be applied to analyze the queuing situation of the railway container terminal gate system.


### 4.2. Sensitivity Analysis

The sensitivity tests of theM
/
E
k
/
n transient queuing model are carried out in three ways, which are to analyze the changes of the results, while the number of service channels, the mean arrival volume of the container trucks, and the average service time are different. From these tests, the results of the model can be demonstrated and can provide some insights to the railway container gate system management. The calculated values of the mean arrival volume of the container trucks and the average service time are determined in accordance with the distributions in Section 3.1, that is, the mean arrival time interval equals 4.714 minutes (i.e., the mean arrival volume of the container trucks is 12 trucks per hour) and the average service rate is 0.25 (i.e., the average service time is 4 minutes). Besides, in order to confirm the results and present the trend more obviously, another set of severe values are also adopted as a comparison. The mean arrival volume of the container trucks and the average service time are set as 30 trucks per hour and 10 minutes, respectively.


#### 4.2.1. The Influence of Increasing the Number of Service Channels

This sensitivity analysis test is on the purpose of observing the change of the average waiting time when increasing the number of service channels. As mentioned above, the calculated mean arrival volume of the container trucks is 12 trucks per hour and the average service time is 4 minutes which followed the mean values of the distributions in Section3.1. Meanwhile, the comparison analysis which has the mean arrival volume of 30 trucks per hour and the average service time of 10 minutes is also conducted. According to the practical condition of the current railway container terminal gate system, the maximum number of service channels is 8. Therefore, let the number of service channels range from 1 to 8 to see the changes of the average waiting time for the container trucks at the end of 60 minutes. The results of the calculated value and the comparison analysis tests are shown in Figures 8 and 9, respectively.Figure 8
Results of the calculated value analysis test.Figure 9
Results of the comparison analysis test.It can be observed from the results in Figure8 that the average waiting time has a dramatic decrease while the number of service channels increases from 1 to 2, and there is also an obvious decrease when another service channel is added; the average waiting time goes down to 2.3 minutes. However, there has hardly been any change when the number of service channels increases further. A similar situation can be seen in Figure 9. There is 148.92 minutes’ reduction of the average waiting time when the number of service channels increases from 1 to 2, and the time decreases 48.76 minutes while one more service channel is increased. Then the declines slow down and the average waiting time has been reduced to 11.44 minutes when 5 service channels are opened. After this, the changes are not very obvious. Consequently, the results can be used to decide the number of service channels under a certain average waiting time limitation. For example, the most reasonable number of service channels must be 5 if the average waiting time needs to be around 10 minutes in the second case.


#### 4.2.2. The Impact of Raising the Mean Arrival Volume of the Container Trucks

The objective of this sensitivity analysis test is to research the variation of the queue length and the average waiting time when raising the mean arrival volume of the container trucks. The average service time is also set by the calculated value (i.e., 4 minutes) and the comparison value (i.e., 10 minutes), but the mean arrival time interval in this test is reduced from 6 to 1 minute in decrement of 1 minute (i.e., the mean arrival volumes of the container trucks are 10, 12, 15, 20, 30, and 60 trucks per hour) by considering the mean arrival time interval of the exponential distribution (i.e., 4.714 minutes). Assume the number of service channels equals 2. Then obtain the number of the trucks in the queue and the average waiting time 60 minutes later. The results of the calculated value analysis tests and the comparison analysis tests can be found in Tables2 and 3.Table 2
Results of the calculated value analysis test.
Mean arrival volume (trucks/h)
10
12
15
20
30
60
Average number of trucks
1.11
1.20
1.35
1.63
2.50
31.3
Average waiting time (minutes)
2.23
2.40
2.7
3.27
5.0
62.5Table 3
Results of the comparison analysis test.
Mean arrival volume (trucks/h)
10
12
15
20
30
60
Average number of trucks
2.33
3.14
5.10
9.50
19.12
48.8
Average waiting time (minutes)
11.65
15.7
25.51
47.48
95.6
244The results in Table2 show a linear increasing trend along with the raise in the mean arrival volume of container trucks. The average waiting time is 2.23 minutes at the end of 60 minutes when the mean arrival volume is 10 trucks per hour. However, there exists a severe congestion (the average waiting time is as long as 62.5 minutes) when the mean arrival volume comes to 60 trucks per hour under this condition. The same trend but with a more significant increase appears in the comparison analysis test. It can be seen from Table 3 that the average waiting time quadruples (from 11.65 minutes to 47.48 minutes) while the mean arrival volume is increased from 10 trucks per hour to 20 trucks per hour. And more notably, the average waiting time reaches up to 244 minutes which cannot be accepted by the people in practice. Therefore, the relevant authorities can use the results to make some decisions to control the average waiting time of the container trucks in the railway container terminal gate system. For example, in the second case, if we want to maintain the average waiting time less than 20 minutes, then more service channels are required or the service rate must be increased when the mean arrival volume is equal to or greater than 15 trucks per hour.


#### 4.2.3. The Effect of Altering the Average Service Time

The last sensitivity analysis test is aimed at investigating the influence of varying the average service time. To be more specific, this test is to seek the appropriate number of service channels when altering the average service time and also ensuring that the average waiting time remains at the same level. The mean arrival volume of the container trucks is assigned as well by the calculated value of 12 trucks per hour and the comparison value of 30 trucks per hour, respectively. Considering the calculated value (i.e., 4 minutes) and the comparison value (i.e., 10 minutes) of the average service time, the range of the average service time in this test is set from 3 to 10 minutes in increment of 1 minute. Make the average waiting time of the container trucks around 20 minutes, and then determine the number of service channels needed at the end of 60 minutes. The computation results of the calculated value analysis test and the comparison analysis test are presented in Figures10 and 11 as below.Figure 10
Results of the calculated value analysis test.Figure 11
Results of the comparison analysis test.A stepped growth trend can be seen from the results of the calculated value analysis test in Figure10. There is only need for 1 service channel to be open when the average service time is less than 5 minutes under the first condition. Another service channel is needed while the average service time is more than 5 minutes but less than 8 minutes. However, the number of service channels shows a linear increasing when the average service time increases more; that is, with one-minute increase in average service time one more service channel is required. The growth trend of the comparison analysis test in Figure 11 is corresponding to the calculated value analysis test in Figure 10; there is also a rapid increase after the stepped growth with the average service time going up. On the whole, the necessary number of service channels is threefold when the average service time varies from 3 minutes to 9 minutes in the second case. It can be concluded from all of these results that if the average waiting time of the container trucks should be controlled in a certain range without varying the mean arrival volume, more service channels are needed when the average service time increases. Meanwhile, the results are capable of helping the administrators to make some relevant policies for these cases. For example, the appropriate number of service channels is equal to 3 when the mean arrival volume of the container trucks is 30 trucks per hour and the acceptable average waiting time is around 20 minutes.


### 4.3. Optimization Results and Discussion

The model validation and the analysis tests have verified the establishedM
/
E
k
/
n transient queuing model is reasonable and effective. Hence, a real data experiment is put forward accordingly for the solution of the optimization model. Moreover, through the discussion of the experiment results, some features in practical operations of the railway container terminal gate system are also revealed at the end.The aim of the optimization experiment here is to find the optimal number of service channels for each time period and make some conclusions from the results. In this experiment, the hourly arrival volume of container trucks is the real data collected from 4:00 a.m. to 6:00 p.m. of Chengdu railway container terminal gate system for a certain day; the details can be seen in Figure12. Thus, the analysis time period is 14 hours and the time period t is 1 hour (i.e., the system performance indicators such as the queue length, the average waiting time, and the optimal number of service channels are calculated every one hour until all the results of 14 hours have been output). The average service time of Chengdu railway container terminal gate system is the mean value of Erlang distribution in Section 3.1. For comparison, the operation cost per hour of a service channel, C
n, is set as two different values: one is $40 per hour and another is $80 per hour. Assume the waiting cost per hour of a container truck, C
w, is $15 per hour. Meanwhile, based on the practical situation of the Chengdu railway container terminal gate system, the minimum and maximum number of service channels n
min
⁡ and n
max
⁡ are set as 1 and 8. In addition, the acceptable average waiting time for each container truck is about 10 minutes in practice. Therefore, the threshold ε is set as 10 minutes. All the optimization results for the duration of 14 hours are presented in Figure 13.Figure 12
Arrival volume during the analysis time period.Optimization results for the analysis time period.
(a)
The minimum total cost
(b)
The optimal number of service channelsThe sequence number of time period in Figure13 is corresponding to the above mentioned time period t, the initial number indicates the time period from 4:00 a.m. to 5:00 a.m., and the rest are expressed in the same way. Graph (a) is the minimum total cost of Chengdu railway container terminal gate system in different time period, which is calculated from the established optimization model. The solid line and the marked dash line are generated from the two cases that the operation cost per hour of a service channel is $80 and $40, respectively. Graph (b) is the optimal numbers of service channels during all the time periods under these two cases. On the whole, the optimization results have a similar trend with the arrival volume of the container trucks for the analysis time period, which is the same as the intuition. When the arrival volume of the container trucks is low, the number of service channels and the total cost are small. With the growth of the arrival volume, the number of service channels and the total cost are increased. It also can be concluded from this optimization experiment that when the operation cost of the service channel is relatively high compared to the waiting cost of the container truck, the average waiting time of the container trucks should be sacrificed so as to obtain the minimum total cost of the system. As seen in Graph (b), the optimal number of service channels when the hourly cost of operating a service channel is $80 is less than the number of service channels in the other case (i.e., the operation cost per hour of a service channel is $40). By comparison between the two Graphs, although opening more service channels causes more expenses, the total cost is still less when the level of operation cost of a service channel for an hour is comparatively low.Beyond the analysis conclusions above, the other useful information also can be obtained from the further study of this optimization experiment. Take the case that the operation cost of a service channel is $80 per hour as an example, although the optimal number of service channels is altered in time with the variation of the service demand at different time period, a general pattern still can be summarized for a typical day of Chengdu railway container terminal gate system. Then accordingly, the analysis time period is divided into several sections on the basis of the same optimal number of service channels. For example, the optimal numbers of service channels are all equal to 1 for the time periods 1 and 2 (i.e., 4:00-5:00 and 5:00-6:00); therefore they are taken as one separate time section. And the rest are treated in the same way. All the number of service channels, the average number of trucks in the queue, and the average total cost of different time sections are provided in Table4. As shown in the table, the number of service channels is the least in the early morning of the railway container terminal gate system and is gradually increasing until noon; then after a little decrease, the number reaches the peak in the late afternoon. These results make sense to the relevant optimization of the railway container terminal gate system and give the decision makers some reference to grasp the pattern of the variation and help in forming the most economic and reasonable operation scheme.Table 4
Optimization results of the railway container terminal gate system in different time sections.
Time section
Number of service channels
Average number of trucks in the queue
Average total cost ($)
4:00–6:00
1
1.56
103.41
6:00–8:00
2
1.80
186.93
8:00–12:00
3
3.29
289.38
12:00–14:00
2
2.20
192.99
14:00–18:00
4
4.89
393.36


## 4.1. Model Validation

For the purpose of verifying the transient queuing model and the corresponding solution method, a simulation method is adopted simultaneously to acquire the estimators of the railway container terminal gate system. eM_Plant is a professional object-oriented simulation software for management, industrial engineering, and system engineering. It is able to analyze the operation conditions of the railway container terminal gate system by running the visual simulation models. One simulation model of the railway container terminal gate system is shown in Figure7.Figure 7
Simulation model in eM_Plant.In the simulation model, the Container trucks arrival is the producer of container trucks which is set at the exponential arrival time interval to represent the truck arrival situations. The Queuing place and waiting signs represent the container trucks in the queue. The Service station denotes the service channels in the railway container terminal gate system which is commanded to satisfy the Erlang service time. The Container trucks move is the saver of the produced container trucks and indicates the trucks move to the container yard. Event controller is used to determine the beginning and ending time of the simulation.The experiments are conducted by using theM
/
E
k
/
n transient queuing model and the eM_Plant simulation model, respectively. Take 30 trucks per hour as a possible volume of the container trucks for the experiment. The service time follows the E
k
=
2 distribution and the mean value is set as 8 minutes. The analysis time period is instructed to be 60 minutes. Besides, to relieve the impact of randomness, the simulation model needs to be run several times to get the mean value and standard variance for each case. Meanwhile, in consideration of the running time, the simulation model is run 20 times and all the results are shown in Table 1.Table 1
Results of the queuing method and the simulation method.
Arrival volume (trucks/h)
Number of service channels
Average number of trucks in the queue
Queuing model
Simulation model
Relative error
Mean value
Standard variance
30
1
23.00
22.16
6.94
0.038
2
16.28
14.73
5.75
0.105
3
9.96
8.68
3.62
0.147
4
4.73
4.41
2.28
0.073It can be seen, from the comparison experiment results, that the average number of trucks in the queue at the end of 60 minutes calculated from theM
/
E
k
=
2
/
n transient queuing model is approximate to the simulation model. This means the transient queuing model is correct and the equally likely combinations (ELC) heuristic method is effective. Therefore, the model together with the solution method can be applied to analyze the queuing situation of the railway container terminal gate system.


## 4.2. Sensitivity Analysis

The sensitivity tests of theM
/
E
k
/
n transient queuing model are carried out in three ways, which are to analyze the changes of the results, while the number of service channels, the mean arrival volume of the container trucks, and the average service time are different. From these tests, the results of the model can be demonstrated and can provide some insights to the railway container gate system management. The calculated values of the mean arrival volume of the container trucks and the average service time are determined in accordance with the distributions in Section 3.1, that is, the mean arrival time interval equals 4.714 minutes (i.e., the mean arrival volume of the container trucks is 12 trucks per hour) and the average service rate is 0.25 (i.e., the average service time is 4 minutes). Besides, in order to confirm the results and present the trend more obviously, another set of severe values are also adopted as a comparison. The mean arrival volume of the container trucks and the average service time are set as 30 trucks per hour and 10 minutes, respectively.


### 4.2.1. The Influence of Increasing the Number of Service Channels

This sensitivity analysis test is on the purpose of observing the change of the average waiting time when increasing the number of service channels. As mentioned above, the calculated mean arrival volume of the container trucks is 12 trucks per hour and the average service time is 4 minutes which followed the mean values of the distributions in Section3.1. Meanwhile, the comparison analysis which has the mean arrival volume of 30 trucks per hour and the average service time of 10 minutes is also conducted. According to the practical condition of the current railway container terminal gate system, the maximum number of service channels is 8. Therefore, let the number of service channels range from 1 to 8 to see the changes of the average waiting time for the container trucks at the end of 60 minutes. The results of the calculated value and the comparison analysis tests are shown in Figures 8 and 9, respectively.Figure 8
Results of the calculated value analysis test.Figure 9
Results of the comparison analysis test.It can be observed from the results in Figure8 that the average waiting time has a dramatic decrease while the number of service channels increases from 1 to 2, and there is also an obvious decrease when another service channel is added; the average waiting time goes down to 2.3 minutes. However, there has hardly been any change when the number of service channels increases further. A similar situation can be seen in Figure 9. There is 148.92 minutes’ reduction of the average waiting time when the number of service channels increases from 1 to 2, and the time decreases 48.76 minutes while one more service channel is increased. Then the declines slow down and the average waiting time has been reduced to 11.44 minutes when 5 service channels are opened. After this, the changes are not very obvious. Consequently, the results can be used to decide the number of service channels under a certain average waiting time limitation. For example, the most reasonable number of service channels must be 5 if the average waiting time needs to be around 10 minutes in the second case.


### 4.2.2. The Impact of Raising the Mean Arrival Volume of the Container Trucks

The objective of this sensitivity analysis test is to research the variation of the queue length and the average waiting time when raising the mean arrival volume of the container trucks. The average service time is also set by the calculated value (i.e., 4 minutes) and the comparison value (i.e., 10 minutes), but the mean arrival time interval in this test is reduced from 6 to 1 minute in decrement of 1 minute (i.e., the mean arrival volumes of the container trucks are 10, 12, 15, 20, 30, and 60 trucks per hour) by considering the mean arrival time interval of the exponential distribution (i.e., 4.714 minutes). Assume the number of service channels equals 2. Then obtain the number of the trucks in the queue and the average waiting time 60 minutes later. The results of the calculated value analysis tests and the comparison analysis tests can be found in Tables2 and 3.Table 2
Results of the calculated value analysis test.
Mean arrival volume (trucks/h)
10
12
15
20
30
60
Average number of trucks
1.11
1.20
1.35
1.63
2.50
31.3
Average waiting time (minutes)
2.23
2.40
2.7
3.27
5.0
62.5Table 3
Results of the comparison analysis test.
Mean arrival volume (trucks/h)
10
12
15
20
30
60
Average number of trucks
2.33
3.14
5.10
9.50
19.12
48.8
Average waiting time (minutes)
11.65
15.7
25.51
47.48
95.6
244The results in Table2 show a linear increasing trend along with the raise in the mean arrival volume of container trucks. The average waiting time is 2.23 minutes at the end of 60 minutes when the mean arrival volume is 10 trucks per hour. However, there exists a severe congestion (the average waiting time is as long as 62.5 minutes) when the mean arrival volume comes to 60 trucks per hour under this condition. The same trend but with a more significant increase appears in the comparison analysis test. It can be seen from Table 3 that the average waiting time quadruples (from 11.65 minutes to 47.48 minutes) while the mean arrival volume is increased from 10 trucks per hour to 20 trucks per hour. And more notably, the average waiting time reaches up to 244 minutes which cannot be accepted by the people in practice. Therefore, the relevant authorities can use the results to make some decisions to control the average waiting time of the container trucks in the railway container terminal gate system. For example, in the second case, if we want to maintain the average waiting time less than 20 minutes, then more service channels are required or the service rate must be increased when the mean arrival volume is equal to or greater than 15 trucks per hour.


### 4.2.3. The Effect of Altering the Average Service Time

The last sensitivity analysis test is aimed at investigating the influence of varying the average service time. To be more specific, this test is to seek the appropriate number of service channels when altering the average service time and also ensuring that the average waiting time remains at the same level. The mean arrival volume of the container trucks is assigned as well by the calculated value of 12 trucks per hour and the comparison value of 30 trucks per hour, respectively. Considering the calculated value (i.e., 4 minutes) and the comparison value (i.e., 10 minutes) of the average service time, the range of the average service time in this test is set from 3 to 10 minutes in increment of 1 minute. Make the average waiting time of the container trucks around 20 minutes, and then determine the number of service channels needed at the end of 60 minutes. The computation results of the calculated value analysis test and the comparison analysis test are presented in Figures10 and 11 as below.Figure 10
Results of the calculated value analysis test.Figure 11
Results of the comparison analysis test.A stepped growth trend can be seen from the results of the calculated value analysis test in Figure10. There is only need for 1 service channel to be open when the average service time is less than 5 minutes under the first condition. Another service channel is needed while the average service time is more than 5 minutes but less than 8 minutes. However, the number of service channels shows a linear increasing when the average service time increases more; that is, with one-minute increase in average service time one more service channel is required. The growth trend of the comparison analysis test in Figure 11 is corresponding to the calculated value analysis test in Figure 10; there is also a rapid increase after the stepped growth with the average service time going up. On the whole, the necessary number of service channels is threefold when the average service time varies from 3 minutes to 9 minutes in the second case. It can be concluded from all of these results that if the average waiting time of the container trucks should be controlled in a certain range without varying the mean arrival volume, more service channels are needed when the average service time increases. Meanwhile, the results are capable of helping the administrators to make some relevant policies for these cases. For example, the appropriate number of service channels is equal to 3 when the mean arrival volume of the container trucks is 30 trucks per hour and the acceptable average waiting time is around 20 minutes.


## 4.2.1. The Influence of Increasing the Number of Service Channels

This sensitivity analysis test is on the purpose of observing the change of the average waiting time when increasing the number of service channels. As mentioned above, the calculated mean arrival volume of the container trucks is 12 trucks per hour and the average service time is 4 minutes which followed the mean values of the distributions in Section3.1. Meanwhile, the comparison analysis which has the mean arrival volume of 30 trucks per hour and the average service time of 10 minutes is also conducted. According to the practical condition of the current railway container terminal gate system, the maximum number of service channels is 8. Therefore, let the number of service channels range from 1 to 8 to see the changes of the average waiting time for the container trucks at the end of 60 minutes. The results of the calculated value and the comparison analysis tests are shown in Figures 8 and 9, respectively.Figure 8
Results of the calculated value analysis test.Figure 9
Results of the comparison analysis test.It can be observed from the results in Figure8 that the average waiting time has a dramatic decrease while the number of service channels increases from 1 to 2, and there is also an obvious decrease when another service channel is added; the average waiting time goes down to 2.3 minutes. However, there has hardly been any change when the number of service channels increases further. A similar situation can be seen in Figure 9. There is 148.92 minutes’ reduction of the average waiting time when the number of service channels increases from 1 to 2, and the time decreases 48.76 minutes while one more service channel is increased. Then the declines slow down and the average waiting time has been reduced to 11.44 minutes when 5 service channels are opened. After this, the changes are not very obvious. Consequently, the results can be used to decide the number of service channels under a certain average waiting time limitation. For example, the most reasonable number of service channels must be 5 if the average waiting time needs to be around 10 minutes in the second case.


## 4.2.2. The Impact of Raising the Mean Arrival Volume of the Container Trucks

The objective of this sensitivity analysis test is to research the variation of the queue length and the average waiting time when raising the mean arrival volume of the container trucks. The average service time is also set by the calculated value (i.e., 4 minutes) and the comparison value (i.e., 10 minutes), but the mean arrival time interval in this test is reduced from 6 to 1 minute in decrement of 1 minute (i.e., the mean arrival volumes of the container trucks are 10, 12, 15, 20, 30, and 60 trucks per hour) by considering the mean arrival time interval of the exponential distribution (i.e., 4.714 minutes). Assume the number of service channels equals 2. Then obtain the number of the trucks in the queue and the average waiting time 60 minutes later. The results of the calculated value analysis tests and the comparison analysis tests can be found in Tables2 and 3.Table 2
Results of the calculated value analysis test.
Mean arrival volume (trucks/h)
10
12
15
20
30
60
Average number of trucks
1.11
1.20
1.35
1.63
2.50
31.3
Average waiting time (minutes)
2.23
2.40
2.7
3.27
5.0
62.5Table 3
Results of the comparison analysis test.
Mean arrival volume (trucks/h)
10
12
15
20
30
60
Average number of trucks
2.33
3.14
5.10
9.50
19.12
48.8
Average waiting time (minutes)
11.65
15.7
25.51
47.48
95.6
244The results in Table2 show a linear increasing trend along with the raise in the mean arrival volume of container trucks. The average waiting time is 2.23 minutes at the end of 60 minutes when the mean arrival volume is 10 trucks per hour. However, there exists a severe congestion (the average waiting time is as long as 62.5 minutes) when the mean arrival volume comes to 60 trucks per hour under this condition. The same trend but with a more significant increase appears in the comparison analysis test. It can be seen from Table 3 that the average waiting time quadruples (from 11.65 minutes to 47.48 minutes) while the mean arrival volume is increased from 10 trucks per hour to 20 trucks per hour. And more notably, the average waiting time reaches up to 244 minutes which cannot be accepted by the people in practice. Therefore, the relevant authorities can use the results to make some decisions to control the average waiting time of the container trucks in the railway container terminal gate system. For example, in the second case, if we want to maintain the average waiting time less than 20 minutes, then more service channels are required or the service rate must be increased when the mean arrival volume is equal to or greater than 15 trucks per hour.


## 4.2.3. The Effect of Altering the Average Service Time

The last sensitivity analysis test is aimed at investigating the influence of varying the average service time. To be more specific, this test is to seek the appropriate number of service channels when altering the average service time and also ensuring that the average waiting time remains at the same level. The mean arrival volume of the container trucks is assigned as well by the calculated value of 12 trucks per hour and the comparison value of 30 trucks per hour, respectively. Considering the calculated value (i.e., 4 minutes) and the comparison value (i.e., 10 minutes) of the average service time, the range of the average service time in this test is set from 3 to 10 minutes in increment of 1 minute. Make the average waiting time of the container trucks around 20 minutes, and then determine the number of service channels needed at the end of 60 minutes. The computation results of the calculated value analysis test and the comparison analysis test are presented in Figures10 and 11 as below.Figure 10
Results of the calculated value analysis test.Figure 11
Results of the comparison analysis test.A stepped growth trend can be seen from the results of the calculated value analysis test in Figure10. There is only need for 1 service channel to be open when the average service time is less than 5 minutes under the first condition. Another service channel is needed while the average service time is more than 5 minutes but less than 8 minutes. However, the number of service channels shows a linear increasing when the average service time increases more; that is, with one-minute increase in average service time one more service channel is required. The growth trend of the comparison analysis test in Figure 11 is corresponding to the calculated value analysis test in Figure 10; there is also a rapid increase after the stepped growth with the average service time going up. On the whole, the necessary number of service channels is threefold when the average service time varies from 3 minutes to 9 minutes in the second case. It can be concluded from all of these results that if the average waiting time of the container trucks should be controlled in a certain range without varying the mean arrival volume, more service channels are needed when the average service time increases. Meanwhile, the results are capable of helping the administrators to make some relevant policies for these cases. For example, the appropriate number of service channels is equal to 3 when the mean arrival volume of the container trucks is 30 trucks per hour and the acceptable average waiting time is around 20 minutes.


## 4.3. Optimization Results and Discussion

The model validation and the analysis tests have verified the establishedM
/
E
k
/
n transient queuing model is reasonable and effective. Hence, a real data experiment is put forward accordingly for the solution of the optimization model. Moreover, through the discussion of the experiment results, some features in practical operations of the railway container terminal gate system are also revealed at the end.The aim of the optimization experiment here is to find the optimal number of service channels for each time period and make some conclusions from the results. In this experiment, the hourly arrival volume of container trucks is the real data collected from 4:00 a.m. to 6:00 p.m. of Chengdu railway container terminal gate system for a certain day; the details can be seen in Figure12. Thus, the analysis time period is 14 hours and the time period t is 1 hour (i.e., the system performance indicators such as the queue length, the average waiting time, and the optimal number of service channels are calculated every one hour until all the results of 14 hours have been output). The average service time of Chengdu railway container terminal gate system is the mean value of Erlang distribution in Section 3.1. For comparison, the operation cost per hour of a service channel, C
n, is set as two different values: one is $40 per hour and another is $80 per hour. Assume the waiting cost per hour of a container truck, C
w, is $15 per hour. Meanwhile, based on the practical situation of the Chengdu railway container terminal gate system, the minimum and maximum number of service channels n
min
⁡ and n
max
⁡ are set as 1 and 8. In addition, the acceptable average waiting time for each container truck is about 10 minutes in practice. Therefore, the threshold ε is set as 10 minutes. All the optimization results for the duration of 14 hours are presented in Figure 13.Figure 12
Arrival volume during the analysis time period.Optimization results for the analysis time period.
(a)
The minimum total cost
(b)
The optimal number of service channelsThe sequence number of time period in Figure13 is corresponding to the above mentioned time period t, the initial number indicates the time period from 4:00 a.m. to 5:00 a.m., and the rest are expressed in the same way. Graph (a) is the minimum total cost of Chengdu railway container terminal gate system in different time period, which is calculated from the established optimization model. The solid line and the marked dash line are generated from the two cases that the operation cost per hour of a service channel is $80 and $40, respectively. Graph (b) is the optimal numbers of service channels during all the time periods under these two cases. On the whole, the optimization results have a similar trend with the arrival volume of the container trucks for the analysis time period, which is the same as the intuition. When the arrival volume of the container trucks is low, the number of service channels and the total cost are small. With the growth of the arrival volume, the number of service channels and the total cost are increased. It also can be concluded from this optimization experiment that when the operation cost of the service channel is relatively high compared to the waiting cost of the container truck, the average waiting time of the container trucks should be sacrificed so as to obtain the minimum total cost of the system. As seen in Graph (b), the optimal number of service channels when the hourly cost of operating a service channel is $80 is less than the number of service channels in the other case (i.e., the operation cost per hour of a service channel is $40). By comparison between the two Graphs, although opening more service channels causes more expenses, the total cost is still less when the level of operation cost of a service channel for an hour is comparatively low.Beyond the analysis conclusions above, the other useful information also can be obtained from the further study of this optimization experiment. Take the case that the operation cost of a service channel is $80 per hour as an example, although the optimal number of service channels is altered in time with the variation of the service demand at different time period, a general pattern still can be summarized for a typical day of Chengdu railway container terminal gate system. Then accordingly, the analysis time period is divided into several sections on the basis of the same optimal number of service channels. For example, the optimal numbers of service channels are all equal to 1 for the time periods 1 and 2 (i.e., 4:00-5:00 and 5:00-6:00); therefore they are taken as one separate time section. And the rest are treated in the same way. All the number of service channels, the average number of trucks in the queue, and the average total cost of different time sections are provided in Table4. As shown in the table, the number of service channels is the least in the early morning of the railway container terminal gate system and is gradually increasing until noon; then after a little decrease, the number reaches the peak in the late afternoon. These results make sense to the relevant optimization of the railway container terminal gate system and give the decision makers some reference to grasp the pattern of the variation and help in forming the most economic and reasonable operation scheme.Table 4
Optimization results of the railway container terminal gate system in different time sections.
Time section
Number of service channels
Average number of trucks in the queue
Average total cost ($)
4:00–6:00
1
1.56
103.41
6:00–8:00
2
1.80
186.93
8:00–12:00
3
3.29
289.38
12:00–14:00
2
2.20
192.99
14:00–18:00
4
4.89
393.36


## 5. Conclusion

This paper contributes to analyzing the railway container terminal gate system by theM
/
E
k
/
n transient queuing model with the equally likely combinations (ELC) heuristic solution. The comparison experiment was then conducted with the eM_Plant simulation method. The experiment results indicate that the M
/
E
k
/
n model is capable of providing a precise reflection to the queuing process of the railway container terminal gate system, and the relevant performance indicators of gate congestion such as the number of container trucks in the system, the queue length, and the average waiting time can be obtained by the ELC transient solution dynamically and effectively. Moreover, a variety of sensitivity tests were carried out for analysis. It turned out that the model is efficient under different conditions with low computational consumption, so it is able to be applied to assist decision making. In addition, because of the flexibility of the analytic method, this model can be easily integrated in an optimization framework. Therefore, the optimization of the railway container terminal gate system was implemented ultimately. All these results can provide some support to the relevant authorities, so the model and method of this paper have the value of practical application.Furthermore, there are some related works that can be done for the following research. For example, the applicability of the model and methods for the other railway container terminals needs further observations. In addition, take the railway container terminal system as a whole; combine the gate system optimization to the other parts of the entire system.



---

*Source: 914706-2014-07-23.xml*