A State-Dependent Approximation Method for Estimating Truck Queue Length at Marine Terminals

: As international trade and freight volumes increase, there is a growing port congestion problem, leading to the long truck queues at US marine terminal gates. To address this problem, some countermeasures have been proposed and implemented for reducing truck queue length at marine terminals. To assess the effectiveness of these countermeasures, a method for accurately estimating terminal gate truck queue length is needed. This study developed a new method, named the state-dependent approximation method, for estimating the truck queue length at marine terminals. Based on the simulation of the truck queuing system, it was found that it takes several hours for the truck queue length to reach its steady state, and neglecting the queue formation (queue dispersion) processes will cause overestimation (underestimation) of truck queue length. The developed model can take into account the queue formation and dispersion processes, and it can be used to estimate the truck queue length caused by short-term oversaturation at marine terminals. For model evaluation, a simulation-based case study was conducted to evaluate the prediction accuracy of the developed model by comparing its results with the simulated queue lengths and the results of other four existing methods, including the ﬂuid ﬂow model, the M/M/S queuing model, and a simulation-based regression model developed a previous study. The evaluation results indicate that the developed model outperformed the other four modeling methods for different states of queue formation and dispersion processes. In addition, this new method can accurately estimate the truck queue length caused by the short-term system oversaturation during peak hours. Therefore, it will be useful for assessing the effectiveness of the countermeasures that are targeted at reducing the peak-hour congestion at marine terminals.


Introduction
As the volumes of international trade and freight increase, traffic congestion at ports is becoming a serious problem. Recently, the times that trucks must wait have continued to increase, and there almost always are long queues of trucks at the gates waiting to enter and leave marine terminals. Sometimes, the congestion even extends to the surrounding networks of roads. This situation seriously hampers the smooth operation of ports and other nearby businesses, resulting in significant economic losses. Thus, some countermeasures have been proposed and implemented to reduce truck queue length at marine terminals, e.g., using a gate appointment system to manage the arrivals of the trucks and applying advanced communication and image processing technologies to reduce the service time at the gate. California Assembly Bill (AB) 2650 required marine port terminals to either extend hours of operation for truck pick-ups and deliveries, establish an appointment system for trucks, or otherwise reduce truck queuing at terminal gate entries [1].
To assess the effectiveness of these countermeasures, a method is needed that can accurately estimate the truck queue length at terminal gates. The existing methods, such as queuing models and fluid flow models, have limitations and cannot provide accurate estimates of the truck queue length when certain conditions exist. For example, the traditional queuing models cannot handle oversaturated situations (when demand exceeds capacity), which occur often during peak hours at marine terminals. Note that, the capacity in this study is referred to as the service capacity of a terminal gate, which is equal to the average service rate per gate booth multiplied by the number of gate booths. In addition, most of the queuing models [2][3][4] do not consider the processes involved in the formation and dispersion of queues. Note that, truck queue length cannot reach its steady-state instantaneously because there are queue formation and dispersion processes that can take many hours [5]. Thus, due to the variations in the truck arrival rate and in the gate service time, the truck queue length may not be able to reach its steady-state before the conditions are changed. Therefore, if the queue formation and dispersion processes are neglected, inaccurate queue length estimation will be produced. To fill these gaps, this study is to develop a new method, named the state-dependent approximation method, for estimating the truck queue length at marine terminals by using the simulation-based, regression-modeling approach. The hypothesis that being test is that the proposed method can provide a more accurate estimation of truck queue length than four selected existing methods. The proposed new method considers both the queue formation and dispersion processes and can also estimate the truck queue length caused by short-term system oversaturation at marine terminals. Thus, it fills several important gaps in the existing methods, which will be discussed in detail in the literature review section as follows.

Literature Review
The existing studies used both analytical and simulation approaches to analyze the congestion at the container terminal gates. Some of them focus on the estimation of the truck queue length and waiting time at the terminal gates [2,[5][6][7]. Some studies analyzed the impacts of vehicle queue length on the approach roads to the container terminals [8,9]. Some studies investigated different operational strategies, such as truck appointment systems, extending gate hours, and pooled queue strategy, on the reduction of gate congestions [10][11][12][13][14][15]. In this literature review, we focus on the methods for estimating the truck queue length at the terminal gate. In general, there are four typical types of existing methods, i.e., fluid flow models, queuing models, simulation-based models, and simulation-based regression models. An introduction of these existing methods and some representative studies for each method are presented below.

Fluid Flow Models
The fluid flow method has been used to model many types of queues, including telecommunication queues and vehicle queues at roadway intersections. This method is based on the flow balance principle, i.e., the change in a queue is equal to the inflow of vehicles minus the outflow of vehicles, and it can be expressed mathematically as follows: where l t is the average queue length in time interval t; λ t is the average rate of arrivals in time interval t, and µ t is the average service rate in time interval t. Martonosi [16] used a fluid flow model to study the servers that could switch dynamically between the two queues in order to minimize the total waiting time. In Martonosi [16], the basic idea of the fluid flow model is illustrated as Figure 1.  Figure 1 shows that the length of the queue is the difference between the cumulative arrivals (upper curve) and the services (lower curve). This method is simpler and easier to use than other methods. Most importantly, it can estimate the length of the queue in both undersaturated and oversaturated conditions. However, this method is deterministic in nature because it assumes uniform arrival and service rates and it cannot take into account the queue caused by the random fluctuations in the arrival and service rates. For example, Figure 1 shows that, according to the fluid flow model, the queue will develop only if the arrival rate exceeds the service rate (the oversaturated condition). However, the queue will form even if the arrival rate is less than the service rate because of the random fluctuations in the arrival and service rates. Thus, the fluid flow method tends to underestimate the length of the queue.

Queuing Models
Two types of queuing models, i.e., stationary and non-stationary models, have been used in modeling the length of the queue of trucks at the gates of marine terminals. The stationary queuing models are based on the classical queueing theory, which estimates the length of the steady state queue at given service and arrival rates. These models are useful for determining the steady state performance of a queuing system. Yoon [6] used M/M/1 and M/M/S queuing models to estimate the delay of the truck as containers are inspected at two successive stages of security inspections. Guan [2] applied a multi-server M/Ek/s queuing model to analyze congestion at the container's terminal gate and to quantify the cost associated with the truck's waiting. Minh and Huynh [7] expanded the work of Guan [2] by providing design engineers with a methodology to investigate the possible benefit of using a pooled queuing strategy for inbound terminal gate trucks and to determine the optimal number of service gate booths for different truck waiting time threshold. The major problem with the stationary queuing models is that the queue formation and dispersion processes were neglected. Actually, the truck queue length cannot reach its steady state instantaneously and the queue formation or dispersion process can take up to 24 h [5]. As a result, the stationary queuing models can not accurately estimate the time-varying truck queue lengths at marine terminals. In addition, the queuing models cannot handle oversaturated situations, which often occur at congested marine terminals where demand exceeds capacity during peak hours.
To address the problem of time-varying queue length Chen et al. [3] used a nonstationary queuing model to estimate the truck queue lengths at ports. In their model, a time-dependent capacity utilization ratio was used to estimate the time-dependent length of the queue. This time-dependent capacity utilization ratio was derived using the steady state queue-length equation of the stationary queuing model, which is based on the assumption of an undersaturated queuing system. As a result, this model is not applicable to the temporarily oversaturated queuing systems too. Other non-stationary queuing models, such as the pointwise stationary approximation (PSA) model developed by Green and Kolesar [4], also are based on stationary queuing models, thereby inheriting this same problem of the stationary queuing models. Chen et al. [17] applied a multi-serve non-stationary queueing model to analyze the maritime terminal gate system. In order to be able to solve the oversaturated queueing problem, the authors selected the fluid flow based pointwise stationary approximation method and integrating it with the bisection method and a correction factor. However, this model was developed based on the assumption of a specific parameter of the gate service time distribution, which limits the applicability of the model.

Simulation-Based Models
Numerous studies have used simulation models to investigate the problem of truck congestion at marine terminals. In these studies, the discrete-event simulation and agentbased simulation are two major approaches.

Discrete-Event Simulation
Discreet-event simulation is one of the most popular techniques in port operation modeling [18]. Azab & Eltawil [19] used a discrete event simulation model FlexSim to study the problem of long Truck Turn Times (TTTs) for external trucks at marine container terminals. In this study, special simulation software for container terminal operations was used to estimate the TTTs and the maximum truck queue lengths for different arrival patterns. Derse and Gocmen [20] used ARENA, a discrete event simulation software, to analyze the operating performance measures of a container terminal system, including ship waiting times, queue time of the processes, the number of the containers at the queue, the usage rate of the resources and the number of the loading-unloading containers. Preston et al. [21] used a discrete-event simulation model in analyzing the future operation of a ferry port considering the increased traffic volumes. Preston et al. [9] also used this model for identifying the critical thresholds for vehicle processing times that would cause the system to become oversaturated.

Agent-Based Simulation
An agent-based model is another common type of approach for simulating the port operation.
Karafa et al. used an agent-based simulation PARAMICS to investigate the effectiveness of the truck appointment system, as well as extending gate hours. Sherif et al. [22] used an agent-based simulation and solutions by EI Farol model to achieve the steady arrival of trucks and hence less queuing at congestion at port terminal gates. Fleming et al. [13] used agent-based simulation to model the terminal gate system with two different queuing strategies (pooled and non-pooled queues) to evaluate the system's operational performance in various conditions. The use of simulation models is an effective approach for investigating the queuing process because it takes into account the random fluctuations in the arrival and service rates, and these models can provide estimates of the queue lengths for various scenarios. The limitations of the simulation-based approach are that (1) conducting the simulation is time-consuming and (2) the results of simulation studies cannot be applied easily to new scenarios that have yet to be simulated. To overcome this problem, an approach, called simulation-based regression modeling, has been used by previous studies.

Simulation-Based Regression Models
Simulation-based regression models have been developed in several previous studies for modeling the truck queue length at marine terminals. In these studies, a simulation model was developed that could be used initially to simulate the operations at marine terminals and derive the truck queue lengths for different scenarios. Then, based on the results of the simulation, regression models were developed and used to estimate the truck queue lengths in different scenarios. Thus, the regression models are used to generalize the simulation results in order to predict the truck queue lengths beyond the simulated scenarios. Chen and Yang [5] used a microscopic traffic simulation tool, PARAMIC, to simulate a container terminal system and observe the truck queuing process. In their study, they pointed out that "a queue cannot reach its steady state instantaneously," and, according to its simulation results, it can take up to 24 h for the queue to reach a steady length. Based on this finding, the truck queue length was estimated separately for two different states, i.e., (1) the queue formation state and (2) steady state. For "steady state," a stationary queuing model, M/G/S, is used to estimate the steady queue length according to the arrival and service rates. For the queue formation state, a set of regression models was developed for estimating the queue lengths during the queue formation process based on the simulation results. It is important to note that this is the first study that pointed out and verified the need for considering the queue-formation process in modeling the truck queue length. However, it only considers the queue formation process without considering the queue dispersion process, which can also affect the accuracy of the queue estimation.
In addition, in their study, a model was developed specifically for a given marine terminal with a given number of gate booths (2) at a fixed service rate (40.8 trucks per hour), and these specific conditions limit the applicability of the model.
Our literature review indicated that the existing methods all have their limitations and improvements are needed for accurately estimating the truck queue length at marine terminals. The new method that we proposed in this study is a type of simulation-based regression model.

Methodology
This research was conducted to develop a new method, named state-dependent approximation method, for estimating truck queue length at marine terminals. The model was developed based on the method proposed by Chen and Yang [5], but it expanded two critical aspects of their work. First, both queue formation and dispersion processes have been considered in the estimation of truck queue length. Thus, the truck queue length was estimated separately for four different states: (I) steady state, (II) queue formation state, (III) queue dispersion state, and (IV) oversaturated state. Second, the proposed model can be used for estimating truck queue length at the marine terminals with different numbers of gate booths and various service rates.
This model was developed in three steps, i.e., (1) estimating the steady queue length, (2) modeling the queue formation and dispersion processes, and (3) developing the final model.

Step 1. Estimating the Steady Queue Length
In this step, a multi-server (M/M/S) queuing model was used to estimate the steady state length of the queue of trucks. A marine terminal gate system that has multiple inbound and outbound gates can be treated as a multi-server queuing system. In this queuing system, it is assumed that (1) the number of parallel servers (S) is the number of gate booths, (2) the truck arrival rate (number of trucks arriving per hour) follows a Poisson distribution (M), and (3) the service time for each gate follows an exponential distribution (M). Under these assumptions, the system utilization factor (ρ) is given by the following equation: where λ is the average truck-arrival rate (average number of trucks arriving per hour), C is the service capacity of a terminal gate, µ is the average service rate per gate booth (average number of trucks that can be served per hour per gate booth), and S is the number of gate booths.
Then, according to the M/M/S queuing model, the steady state of the truck queue length (the average number of trucks in the queue) can be estimated by the following equation: where α = λ/µ is referred to as traffic density [2], and P 0 is the probability that no trucks are in the queue (L = 0); P 0 can be estimated by the following equation: According to Equations (2) and (3), the steady queue length, L, is a function of α, ρ, and S. Besides, since ρ is a function of α and S. Therefore, the steady queue length L can be viewed as a function with only two variables α and S as follows: where Equation (5) shows that L can be determined once the values of α and S are given.

Step 2. Modeling the Queue Formation and Dispersion Processes
A simulation-based regression modeling approach was used to model the formation and dispersion processes of the queue. Initially, a queuing simulation model was developed to simulate the queue formation and dispersion processes in different scenarios. Based on the simulation results, a set of regression models was developed for estimating the average truck queue length at a particular moment of the queue formation and dispersion processes.

•
Queuing Simulation A queuing simulation model was developed using MATLAB. In the simulation, the arrival time of a truck and the truck service time is determined according to the random numbers generated from two exponential distributions. The parameters of these two exponential distributions were set according to the truck arrival rate and the gate service rate. The simulation time is set enough long (up to 60 h) to allow the queue to reach its steady state. Since the steady queue is only determined by two variables, i.e., traffic density (α = λ/µ) and the number of gate booths (S), different simulation scenarios were designed by varying these two variables. In this study, based on the information collected from a marine terminal in the Houston area, S was set from 2 to 21, which is the range of the number of gate booths that usually are open at marine terminals. The value of α was set according to S because ρ is equal to α/S and there are some constraints on the value of ρ. First, to reach a steady-state, the system utilization factor (ρ) should be less than 1. Second, ρ should not be very small, otherwise, the steady queue length will be very short and can be reached instantaneously. Using the trial-and-error method, the minimum value of ρ was set as 0.75. Thus, ρ varies from 0.75 to 1. For the design of the simulation scenarios, the value of ρ varies from 0.75 to 0.95 in 0.05 increments. Since ρ is equal to α/S, the value of α varies from 0.75 S to 0.95 S in 0.05 S increments. As listed in Tables 1 and 2, 95 different simulation scenarios were designed by varying the two variables, S and α. Note that, in the real-world application, if α = λ/µ is not equal to the values listed in Tables 1 and 2, the interpolated method could be used for deriving the estimated queue length l t . Since the simulation is driven by stochastic factors, for each designed simulation scenario, 500 simulation runs were conducted for both the queue formation and queue dispersion processes. The simulated lengths of the queue were averaged, and the average queue lengths showed a clearly developed trend (Figure 2). Figure 2a is the simulation result for the queue formation process for an example scenario (S = 20 and α = 19), and Figure 2b is the simulation result for the queue dispersion process for the same scenario. Note that, the initial queue length is set at 0 for the queue formation process, and for the queue dispersion process, the initial queue is generated by doubling the arrival rate to make the system oversaturated for the first hour. In Figure 2a (Figure 2b), the queue length continues increasing (decreasing) until it reaches a steady-state, then it fluctuates slightly within a range. In Figure 2, the critical point is the first time point at which the queue length reached its steady state. The steady queue length (14.3526) was estimated by using Equation (5). Using this critical point as a boundary, the entire queuing formation (dispersion) process can be divided into two states, i.e., (1) queue formation (dispersion) state and (2) steady-state. Figure 2 shows that it takes a long time for the length of the queue to reach a steady state. Therefore, if the queue formation (dispersion) process is neglected, the length of the queue in the queue formation (dispersion) state will be overestimated (underestimated).

Development of Regression Models
Based on the simulation results, regression models were developed for estimating the queue length at a particular moment of queue formation or queue dispersion state.
For the queue-formation state, it was found that the natural logarithm curve fit the simulated queuing curve well (Figure 2a). Therefore, the following regression model used by Chen and Yang [5] was used for modeling the queue length during the queue formation state: where t is the time interval, l t is the queue length at t, and a 1 and b 1 are the coefficients for the regression model for the queue formation state.
For the queue dispersion state, it was found that the natural exponential curve fit the simulated queue formation curve better (Figure 2b). Therefore, the regression model for the queue dispersion stage is: where t is the time interval, l t is the queue length at t, and a 2 and b 2 are the coefficients for the regression model for the queue dispersion state. For each simulation scenario, the simulated queue lengths before reaching the critical point were used to develop the regression model. The modeling results for different simulation scenarios for both the queue formation state and the queue dispersion state are presented in Tables 1 and 2, respectively.

Step 3. Development of the Final Model
Based on the regression models that were developed, the truck queue length can be estimated separately for four different states, i.e., (1) steady state, (2) queue formation state, (3) queue dispersion state, and (4) oversaturated state. The basic modeling ideal can be described by the following step-by-step procedure.

1.
Check to determine whether or not the system is oversaturated. If the system utilization factor at time t, i.e., ρ t , is equal to or greater than 1, then the system is oversaturated, which means the demand is greater than the capacity. In this case, a steady queue length cannot be reached, and the fluid flow model will be used to estimate the queue length as follows: 2.
If the system is not oversaturated, then, according to the traffic density (α = λ/µ) and the number of gate booths (S) at time t, the steady queue length at time t, i.e., L t , can be estimated according to Equation (5). After that, according to the estimated queue length at the time interval t-1, i.e., l t−1 , the state of the queuing process can be determined.
a. If l t−1 < L t , it is at the queue formation state. Then, the regression models (see Equation (6)) developed for the queue formation state (given in Table 1) will be used to estimate the length of the queue at time interval t. Figure 3 shows the basic idea for this step. According to the value of l t−1 , the time needed for the queue length to reach l t−1 can be derived by the regression model at first. Then, by adding 1 time interval, the current queue length l t , can be estimated by the regression model. This can be expressed mathematically as follows: where: In addition, since the estimated queue length will not exceed the steady length of the queue, then: If l t−1 > L t , it is at the queue dispersion state, and the regression models (see Equation (7)) developed for the queue dispersion state will be used to estimate the queue length at time interval t. Similarly, the current queue length, l t , can be estimated according to the value of l t−1 , by the following equations: where: c. If l t−1 = L t , it is at steady state, and then, the steady queue length L t can be used for estimating l t . Based on the modeling ideals described above, the overall model can be expressed mathematically as: where ρ t = α t S t , l queue f ormation t is estimated by Equation (9), l queuedispersion t is estimated by Equation (10), and L t is estimated by Equation (5).

Model Evaluation
To evaluate the model that was developed, a case study was conducted to compare the accuracy of the model with other existing methods, including the fluid flow model, the M/M/S queuing model, and the simulation-based regression model developed by Chen and Yang [5], which is referred to as Chen (2014)'s model. A simulation-based numerical experiment was conducted to derive the simulated truck queue length at a maritime terminal where the truck arrival rate and the gate service rate vary throughout the day. It was assumed that the hourly truck arrival rate increased from 35 to 45 during the first 10 h and decreased to 31 for the rest of the day. To compare with Chen (2014)'s model, the number of gate booths S and the service rate µ (number of trucks that can be served per hour) were set the same as in Chen (2014)'s model, i.e., S = 2 and µ = 40.8. Therefore, the system was oversaturated during a 9-h peak period (from 6th to 14th hour). The proposed modeling method was used in this case study, and the modeling results and the results of other existing models are presented in Figure 4. By comparing the simulated truck queue lengths with the queue lengths estimated by different models, the following key findings were obtained:

1.
Overall, the proposed state-dependent approximation method outperformed the other modeling methods regarding the accuracy of the estimation. Other models either underestimated or overestimated the queue lengths.

2.
The fluid flow model significantly underestimated the queue length because it neglected the random fluctuations in the arrival rate and the gate service rate.

3.
The M/M/s queuing model cannot be used in the oversaturation condition (ρ > 1), and it significantly overestimated the queue length for the queue formation state and significantly underestimated the queue length for the queue dispersion state. 4.
Chen (2014)'s model had a comparable performance during the queue formation process. However, it significantly underestimated the queue length during the queue dispersion process because this process was not considered in the model.

Discussion
The proposed modeling method can estimate the truck queue length more accurately than the other four existing methods. It is because the truck queue length needs several hours to reach its steady-state and the developed model is the only model that can take account of both the queue formation and dispersion processes. In addition to the model estimation accuracy, the proposed model is more flexible and applicable than other models. First, it can be used for both undersaturated and oversaturated situations. This new method can accurately estimate the truck queue length caused by the short-term oversaturation during peak hours. Therefore, it will be useful for assessing the effectiveness of the countermeasures that are targeted at reducing the peak-hour congestion at marine terminals. Second, since the model estimates the truck queue length based on two input variables, i.e., traffic density (α = λ/µ) and the number of gate booths (S), it can be used for marine terminals that have different numbers of gate booths and different gate services rates.
In terms of the model applications, the developed model can be used for assessing the effectiveness of some countermeasures that reduce the terminal gate congestion by controlling the truck arrival rate (such as terminal appointment system), reducing the gate service time (such as using optical character recognition (OCR) technology and IT system) or increase the number of gate booths. Besides, it can be used as a sketching tool to quickly estimate the truck queue lengths to help design the scenarios for simulation-based port operation modeling. For example, the size of the buffer zone in the simulation model can be set according to the estimated truck queue lengths.

Conclusions
In this study, a state-dependent approximation method for estimating truck queue length at marine terminals was developed to fill the gaps in the existing methods. Based on the simulation of the truck queuing system, it was found that it takes several hours for the truck queue length to reach its steady state, and neglecting the queue formation (queue dispersion) processes will cause overestimation (underestimation) of truck queue length. To address this problem, the proposed method takes account of both the queue formation and dispersion processes into the truck queue length estimation. The model evaluation results showed that it can produce more accurate and robust estimates of the truck queue length than the existing methods. In addition, this new method can accurately estimate the truck queue length caused by the short-term oversaturation during peak hours. Therefore, it will be useful for assessing the effectiveness of the countermeasures that are targeted at reducing the peak-hour congestion at marine terminals. Furthermore, the developed model can be applied to estimate the customers' queue at any service facility in the transportation and logistic industry where the customer arrival rate and service rate vary by time and system oversaturation conditions exist during peak hours.
In this study, the proposed model was evaluated based on the simulation experiment results. In the future, field data need to be collected at the maritime terminal gates to further verify the accuracy of the developed model. In addition, more research can be conducted on the application of the developed model to optimize some operational strategies, such as the terminal appointment system, to minimize the truck queue length at the terminal gates.

Data Availability Statement:
The data presented in this study are available on request from the corresponding author. The data are not publicly available due to the institutional restrictions.

Conflicts of Interest:
The authors declare no conflict of interest.