THAILAND PORT THROUGHPUT PREDICTION VIA PARTICLE SWARM OPTIMIZATION BASED NEURAL NETWORK

Shipping volume in Thailand have significantly increased in last four years. It is important to pay attention to the trend of Thailand port throughput and use as the guideline to prepare for the needs of supporting facilities, infrastructures, financial and human resources. An effective forecasting technique called particle swarm based neural network (PSONN) is developed to estimate Thailand port throughput in this work. The prediction results from PSONN and classical backpropagation training algorithm, backpropagation neural networks (BPNN) were compared. The results shown that PSONN provides more accurate results than BPNN when apply to predict port throughput of Thailand. The mean squared error obtained from PSONN are about 10 times lower than that of BPNN. This confirms that neural network based on PSO training algorithm has better performance and better ability to escape local optimum than that of BPNN.


INTRODUCTION
Thailand is in a center of mainland Southeast Asia and also located in between Gulf of Thailand and Andaman Sea which offer logistics opportunities to Thailand. The port throughput is one of the most important factors to indicate the economics of the country. The Port Authority of Thailand (PAT) reported that the shipping volume have been dramatically increased over past four years coupled with the strategies for developing new transportation in Thailand during 2015-2022 for water transportation is to improve seaport for both Gulf of Thailand and Andaman Sea sides. It is very interesting to study the Thailand port throughput and use as the guideline to plan for improving the seaport supply chain. Therefore, trend of port throughput is needed to be taken into account to use as the guideline to enhance port performance in the future. Artifi cial intelligent and statistical techniques are generally used for solving a wide range of the real-world problems. Several statistical techniques such as moving average (MA), least squared methods (LSQ), regression, or multiple regressions, and exponential smoothing are widely used for the forecasting purpose however, the use of such techniques are not accurate in a satisfactory manner. Artifi cial neural network is a tool that can model complex non-linear relationships among relevant factors. It models the base on learning process from the historical data trends. It can produce high accuracy of the solutions through training, testing and validation processes. Consequently, artifi cial neural network (ANN) is recognized as the effective forecasting approach in real world situations. Learning performance of neural network (NN) can be improved by the integration of optimization algorithms such as simulated annealing (SA), tabu search (TS), genetic algorithm (GA), Genetic Programming (GP), Differential evolution (DE), and particle swarm optimization (PSO). Numerous studies show that the integration of optimization search technique with the neural network provide the better results than conventional neural network.The survey for the classical metaheuristics algorithms was provided by [1]. The survey found that GA has the largest number of related studies and follow by PSO, TS, GP, and DE, respectively. However, PSO has more simplicity than GA. GA requires three main operators: selection, crossover, and mutation whereas PSO requires only few parameters and each parameter is easier to be adjusted during the search. GA and PSO obtained the comparable solution quality [2]. However, PSO has computational effi ciency superior to the GA with 99% confi dence level in seven out of eight test problems. Further PSO was proven to be more effi cient and effective to train neural network by using GA [3]. Consequently, PSO is selected to use as a tool for training neural network in this work. The contributions of this study are summarized as follows: • Particle swarm optimization (PSO) is employed to train the weights of NN for higher convergence rate and higher effi ciency. • PSO-based neural network (PSONN) is developed for predicting port throughput in Thailand. • The prediction results can be used as the benchmark and guideline for operational seaport management.

THEORY AND EXPERIMENTAL
Port capacity is theoretically measured as the maximum throughput in tons, twenty-foot equivalent unit (TEU), or others unit. The port capacity depends on eight key el-ements i.e. 1. channels and waterways, 2. terminals, 3. berths and berth length, 4. loading and unloading equipment, 5. storage space for cargo, containers, and chassis, 6. Modal connections, 7. port operating factors, and 8. external factors such as weather, schedule reliability and institutional disruption [4]. Port throughput and capacity can be used as a parameter for estimating the performance of the port. This would be benefi t for the port management to develop the competitive strategies. Another factor that must be considered for enhancing the port performance is the demand in the future. If the future demand can be accurately forecast, it would be benefi t for the port manager to plan and prepare everything for serving the customers' need.
Forecasting of the demand is not easy since there is a numerous affected factor such as economy growth, existing situation, competitors, exchange rate, etc. Consequently, forecasting approach is needed to be developed for improving the accuracy of the existing times series forecasting methods. In this case, gross provincial product per capita (GPP), sea import statistics, sea export statistics, and berth capacity are considered as the infl uencing factors of the container throughput.

Artifi cial neural network (ANN)
Recently, Artifi cial Neural network have been applied in a wide range of researchers due to its ability to learn a non-linear function from the example which is inspired by human brain. ANN can be used for extracting the patterns and detecting the trends the data that are complicated. Feedforward network (FFNN) or multilayer perceptron (MLP) is one of the most popular type of neural network due to its simplicity, ease of calculation and good capabilities. It has been applied in a wide range of areas i.e. marketing, electronics, economics, etc. to approximate the function. The structure of feedforward composes of three main layers which are input layer, hidden layer and output layer. Input data is delivered to the input layer, the data is then passed through the network in each layer Figure 1: Feedforward network architecture until it reaches to output layer without feedback between layers as described in Figure 1.

Backpropagation neural networks (BPNN)
Backpropagation neural networks (BPNN) is the supervised learning technique that learn to improve itself based on error correction. BPNN is suitable for solving the problems that have a lot of input and output data but cannot fi nd the relationship between input and output, have high complexity, the solution to problem keep changing overtime and output can be fuzzy. Consequently, BPNN has been successfully applied to various areas such as chemical [5], transportation [6], ergonomics [7], banking [8], marketing [9], economics [10][11], medical [12][13], and energy [14][15] and others. Later, BPNN was an algorithm that used for training feedforward network inspired [16]. BPNN enhances performance of FFNN by adjusting weights and bias of neurons based on the error which is the difference between target output and actual output. All weights are randomly generated and used in the fi rst iteration and they are then adjusted and updated after iteration during training process. Steps for training the neural network can be described as follows.
The fi rst step is feedforward operation which composes of two step processes. Input values are fed into the input nodes. They are then pushed into the network through the nodes in the hidden layer. After that, they all values in the hidden nodes are multiplied with the weights of the connecting nodes. The total net input is then calculated by Equation (1). The total net input, y net , is then transferred by the activation function (sigmoid function is normally used as an activation function) as presented in Equation (2). After that, the error of the network is computed by Equation (3). The obtained error is used for updating the weight in the network to minimize the error function based on gradient descent method. If the obtained results from the updated weights are better than those of the previous set of weights, the new set of weights will be replaced the previous set and iteration goes on. The concept of BPNN is showed in Figure 2. x i refers to input neuron, w i is weight between input and hidden layer, w 0 represents bias, y net describes total of weighted inputs, y out shows the response of the system, f(y net ) is nonlinear activation function, y target refers to target output. Although BPNN is a very effective tool for searching the solution that is not clear in numerous areas, it takes quite long computational time for training the weights in the network and easily trapped into local solution. Subsequently, various researchers have integrated metaheuristics approaches such as genetic algorithm (GA) [17], ant colony optimization (ACO) [18], particle swarm optimization (PSO) [19], cuckoo search (CS) [20], differential evolution (DE) [21] with neural network for training the weight for managing such drawbacks.

Particle swarm optimization (PSO)
Particle Swarm Optimization (PSO) is fi rstly introduced in 1995 [21]. It inspired by the movement of a bird fl ock and fi sh school. The algorithm composes of velocity, weight, and particles (potential solutions). Each particle in PSO randomly fl ies in D-dimensional search space with its own velocity. Position and velocity of each particle are adjusted according to its own fl ying experiences and the best's experience among the group at each time step. Direction and velocity of each particle are changed towards its own best experience (pbest) and the group best experiences (gbest) as explained in Equation (4).
when X i =x i1 ,x i2 ,…,x iD represents the i th particle, the previous best position (position of the best fi tness value) of the i th particle are P i =p i1 ,p i2 ,…,p iD while symbol g represent the best particle in the population. V i =v i1 ,v i2 ,…,v iD is the velocity of each particle,w represents inertia weight that is the coeffi cient of previous velocity used for controlling the infl uence of particle's previous velocity on the particle's current velocity which affect to exploitation and exploration of the particle. If inertia weight is set to be large value, the algorithm would explore the new search space which leads to the delay of convergence and vice versa. Therefore, the adjusted inertia weight is applied in this experiment for a better trading of exploitation and exploration. c 1 and c 2 are two positive constants that called as learning factors. rand 1 () and rand 2 () are random numbers in the range [0,1]. PSO has been widely applied for solving optimization problems due to its simplicity, high computational speed, robustness, effectiveness. PSO has been developed for a wide range of applications such as logistics [22][23] medical [24], scheduling [25][26], etc. These imply that PSO is suitable for enhancing the performance of neural network.

Particle swarm optimization for training backpropagation neural network (PSONN)
Researchers have been enhancing the performance of BPNN by using optimization search techniques to train the weight. It is because BPNN can be easily trapped into the local optimum or unsatisfi ed solution during the (3) development process. Numerous studies have been proposed to identify ability of PSO as an effective training algorithm for NN. The studies showed that PSO has a very high capability for training BPNN [27][28][29][30][31][32]. Although some attempts have been made to use other optimization search techniques for training the weights, it has been found that the results obtained by PSO-BPNN provides higher accuracy when compared to other algorithms [33]. The procedure for PSO-BPNN is classifi ed into seven steps as follows.
Step 1 Initialization of neural network's parameters: Number of nodes in input layer (m), hidden layer (n) and output layer (o) are designed.
Step 2 Setting of PSO parameters: Set all relevant parameters of PSO algorithm i.e. population size (N), Maximum number of population (Maxiter), inertia weight (w), position (x ij ), velocity (v ij ), learning factors c 1 and c 2 .
Step 3 Determine fi tness of particles: The fi tness of particles is calculated from the individual best (pbest) and group best (gbest) experiences. Solution quality from pbest and gbest are compared and the best position is recorded. The mean square error (MSE) are used for comparing the performance of each particle as presented in Equation (6).
for the i th sample, and j th output node.
Step 4 Comparison of particles' fi tness: The individual best and group best positions are determined as follows: ifx id >p id , then p id = x id , otherwise p id = p id , ifx id >g id , then g id = x id , otherwise g id = g id .
Step 5 Updating of position and velocity of each particle. The particles are updates based on the equations (3) and (4), respectively.
Step 6 Error calculation: The error of the PSO algorithm can be calculated from Equation (7) where iteris number of iteration and fi tness (g id ) represents the best fi tness value of the i th iteration.
Step 7 Termination process: The process is terminated when stopping criterion is met, otherwise the process returns to Step 3. Stopping criterion can be either the maximum number of iterations reach, or the error is low enough. Even though both factors are used to adjust the weights, they are differed from each other in that the learning rate is used to adjust step size of the weight whereas momentum factor is used to accelerate convergence of the network. In this work, η (learning rate) and λ (momentum factor) were selected as 0.5 and 1, respectively. In case of computation of PSO, it depends on few parameters: population size, inertia weight, maximum velocity, maximum and minimum positions and maximum number of iterations. Computation of PSONN, population size and maximum iteration of 50 and 1000 were selected, respectively. The inertia weight gradually decreased from 0.9 to 0.4 so as to balance the global and local exploration. Since particles' velocities on each dimension are clamped to a maximum velocity, vmax, to control the exploration ability of particles. If vmax is too high, the PSO facilitates global search, and particles might fl y pass good solutions. However, if vmax is too small, the PSO facilitates local search, and particles may not explore beyond locally good regions. Thus, if v id is greater than vmax, then v id is equated to vmax. Similarly, if v id is less than -vmax, then v id is equated to -vmax. Therefore, maximum velocity, it was set at 12% of the dynamic range of the variable in each dimension. In case of, maximum and minimum position of the variable in each dimension, there were set to 0.5 and -0.5, respectively. All variables for training the network of both algorithms were kept the same. The tan-sigmoid function was applied on the fi rst layer for increasing the computational power of the network, whereas linear function or purelin function was applied on the last layer in order map their inputs onto a real number range that matches the expected output for both training algorithms. In addition, number of hidden node and maximum iteration were also set to 5 and 50,000 (number of epochs in BPNN = maximum iteration size of swarm in PSONN), respectively. The tested set is used to test how well the trained neural networks generalize. Table 1 shows percent of accuracy of the predicted values over 50,000 iterations after trained and tested the neural network by using BP and PSO.   Figure 6: Comparison of PSONN testing performance er error than those of PSONN for all experimentbased on mean square errors valueIt confi rms that PSONN has higher predicting performance than BPNN. This would assist management team to use the predicted values as the guideline to operate seaport logistics and supply chain such as demand management, seaport management, order management, etc. effi ciently.

CONCLUSIONS
Conventional computation cannot solve the problem that cannot be directly explained by mathematical model to represent the correlation between input and output. It is because such problem has noisy or incomplete data which always happen in the real world. Industrial area also has to face with this kind of problems especially, demand forecasting. When compared to other traditional computing algorithm, neural network can determine implicit relationship between inputs and outputs by learning from the given data. It can be also applied to the problem that has dynamic or nonlinear relationship, does not limited in strict assumption such as normality, linearity, variable independence, etc. Hence, neural network was applied to estimate port throughputs since port throughputs play an important role in Thai logistics development. As BPNN is subject to local optimum and slow convergence rate therefore PSO was applied for training neural network to overcome such drawbacks. The PSO is very attractive because it presents advantages of simplicity since it requires only primitive mathematical operations, short computer code, few parameters to adjust, and fast convergence. Performance of artifi cial neural network bases on BP and PSO-based were compared as illustrated in Table 1. The results show that PSONN is superior to BPNN in terms of quality of solution when applied to predict port throughputs. The mean squared error obtained from PSO-based neural network after applied for Siwaporn Kunnapapdeelert, et al. -Thailand port throughput prediction via particle swarm optimization based neural network port throughput prediction are about 10 timeslower than that of BPNN. This confi rms that neural network based on PSO training algorithm has better performance and better ability to escape local optimum than that of classical BP training algorithm. More infl uencing factorssuch as key element of port capacity i.e. channels, terminals, loading and unloading equipment, etc.would be taken into consideration to make the model more comprehensive and realistic and improve performance of this computational technique.
Subsequently, themore precise results could be as s guideline for the better seaport supply chain management. In addition, systematic parameters selection of the PSO will certainly enhance its ease of use and should be investigated in the future. enhance its ease of use and should be investigated in the future.