Agent-based modelling and simulation for ship unloading processes: determining the number of trucks and container cranes

Loading and unloading activities generate nearly fifty per cent of the total cost in port. The loading and unloading process of the container at the port is considered as a complex process since it involves several interrelated components, such as ships, cranes, and trucks. The uncertainty of these component activities might impact the loading and unloading time and cost. Agent-based modelling and simulation (ABMS) approach is a method for analyzing and modelling a complex system. This study aims to simulate the unloading process to determine a strategy to reduces unloading process time in the largest port in Indonesian using ABMS approach. The results show that the agent-based simulation approach is feasible to be applied in port activities. This approach can assist decision-makers in predicting the number of facilities that must be used to minimize processing time.


Introduction
The use of the container for transporting goods is growing with the projected annual growth rate of ten per cent until 2020 [1]. A large number of container transshipments will cause high demands on the seaport container terminal, container logistic, management, and technical equipment [2]. Furthermore, the increase of loading and unloading process is in both the size of their fleets and the capacity in transporting container process [3]. The port cost, including loading and unloading cost itself, can reach 50 per cent of the total cost, while the 55 per cent of the port cost is the result of poor ship-handling [1,4]. Therefore, it indicates that an increase in the number of container shipments will certainly influence the cost of loading and unloading processes. The optimal resource allocation planning process is essential to improve loading and unloading efficiency at the ports.
Handling of loading and unloading at the port can be divided into two types: lift on/lift-off (Lo/Lo) and roll-on/ roll-off (Ro/Ro). The application of both methods depends on the way the ship performs the loading and unloading the load. For Lo/Lo method, the unloading process is conducted vertically using a crane, a ship, a crane, a car crane or a quay gantry crane. In this study, port performs container loading and unloading using a quay gantry crane. The quay gantry crane is a giant crane installed on the rail along the loading and unloading dock from and to the ship. The unloading is a process for transferring the container from a ship using cranes to be placed on the trucks. It then transports the container to the storage area. The process is repeated until there is no container left in the ship. A complex adaptive system is defined as a dynamic system process that consists of a network of interacting actors such as human, processes, and environment [5]. The loading process, as well as unloading the container at the port, is considered as a complex system as it has several interrelated components. The components are, ships arrival time, the number of containers carried in the ship, number and the crane speed, uncertainty of arrival and the amount and speed in each component that will affect the total time and cost. Therefore, to solve the problem of loading and unloading process, an approach that can solve complex and dynamic problems is needed.
Agent-based Modeling and Simulation (ABMS) is an approach for analyzing and modelling a complex system [6]. It can solve problems in several areas, such as human behavior [7], product innovation [8], or logistics area [1,2]. It is also able to view the agent as a social entity that possesses particular behavior and interacts with another entity in a dynamic and complex system [9]. Thus, the ABMS approach can be utilized to model the loading and unloading process at the port.
Many previous studies were not focused on modelling the complexity of loading and unloading activities in a more detailed way by including the movement of the ships, cranes, and trucks. Previous studies were more focused on logistics management as a whole than the interaction between the components. This study aims to model and apply the ABMS approach to determine the policy related to the determination of the ideal number of cranes and trucks that lead to minimum total time and maximizing truck's utility in the unloading process.
The object of this study is the largest port in Indonesia. The port has a high intensity in logistics activities. As the port is busy with export, import, and goods transporting activities, the loading and unloading activities should be well regulated to obtain time efficiency. Loading and unloading activities are the processes for moving the container from the ship to the yard at the port and vice versa. Its complexity and the number of interrelationships between the components, such as the number of containers used will affect the number of trucks used and the total time of the loading and unloading process.
Moreover, there are probabilistic aspects of this system such as the speed of the container crane used which is not always in the same pace drives the needs of simulation in determining the number of container cranes and trucks to perform the loading and unloading process. However, this study is restricted to model the container unloading process. So, the focus of this study is to look in detail at the process of minimizing waiting time and truck's utility during the unloading process, which is expected to minimize the overall total time.
Based on all the explanations regarding the model and simulation approach, the main contribution of this proposed study are as follows: -To design a more comprehensive model for ship unloading processes to minimize total waiting time (including maximizing truck's utility). -To develop an agent-based simulation approach that focused on ships, trucks, and cranes behavior implemented in the largest port in Indonesia.
The paper is divided into five sections. In the next section, a literature review related to agent-based modelling and simulation approaches in logistic activities is given. Section 3 presents the method in the proposed model and approach. The simulation results on the existing and proposed model are provided in Section 4. Conclusions will be explained in Section 5.

Literature review
There are several previously published studies related to agent-based simulation modelling in logistics. Garro and Russo [9] developed an agent-based simulation approach, namely easyABMS, that perform the analysis towards better policy in logistics management. Henesey et al. [1] applied the agent-based simulation method to evaluate the operational policies in container shipping in general. Li and Li [2] modelled a container logistics system using ABMS in the logistics management stage. Roorda et al. [10] built a conceptual model of logistics services using an agent-based simulation model. Sun et al. [11] developed MicroPort simulation software for evaluating the operational capability and efficiency of different designs of seaport container terminals through an integrated and flexible modelling system. Rizaldi et al. [12] used agent-based simulation, to evaluate the performance of the proposed coordination alternatives by assessing the trucks' waiting time, the RTGs' utilization, and the RTGs' fuel consumption values. Huijuan et al. [13] studied the scheduling of quay cranes and tractor in the container port and established the simulation model of container port's unloading operation by use of container port's simulation software FlexTerm. Cimpeanu et al. [14] proposed model for the analysis of bulk of carrier unloading and material transport, storage, and discharge at Europe's largest alumina refinery using discrete event simulation.

Method
This study begins with a preliminary study of the unloading process at the port and continues with direct observation at the largest port in Indonesia. After that, the investigation continued with building a simulation model consisting of five stages: (i) The determination of the performance measure and the decision variable of the model; (ii) The Identification of agent types, attributes, and behavior; (iii) Establishing the flow of simulation based on the behavior and the interaction among agents; (iv) The implementation of agent-based simulation in software programs; (v) conducting the validation test of the simulation model.

The determination of performance measure and decision variable
The performance measure of the model is the output generated based on the value of the controlled input (decision variable) and uncontrolled input [15,16]. This study uses the average time of the unloading process per ship and truck's utility as a performance measure, while the number of cranes and trucks needed acts as a decision variable.

The identification of agent's type, attribute, and behavior of performance measurement and decision variable
There are three types of agents in this study, namely the ship agent, crane agent, and truck agent. The attribute and behavior of each agent are presented in Table 1.

Establishing the flow of the simulation
At this stage, the whole simulation flow is expressed in state diagrams form, whereas for the behavior of each agent and its interrelationships are described in activity diagrams form. Based on the previous similar studies [17][18][19], the overall activities of ship operations in the large ports have simila characteristics, so this model is built based on the general process flow of ship operations. After arriving in the port, the ship will wait in the anchorage to get berthed. When it gets a turn for berthing, the ship will move through a channel towards the berth. This problem can be represented as a sequencing problem. After berthing, containers are unloaded. Finally, when the ship service is completed, it leaves the port. The state diagram activity is given in Figure 1. Figure 1 explains the general simulation flow for the unloading process. In this case, the ship that arrives at the dock will be directly served by an idle crane. The crane conducted the setup process then it will search if there are any available trucks or not. If there is a truck available, then the truck will perform the setup process. The container then will be lifted and placed on the truck to be stored in the storage area. The ship then leaves the dock after the all container has been moved. Intermediary step such as stacking policy for solving the container stacking problem (including different types of product with different paths) not discussed in this section, as this study is still limited to the general flow of the unloading container processes. Figures 2-4 show agent activities.
As indicated by Figures 2-4, there are six core behaviors of the ship, truck, and crane agents with the following explanation: (1) In ship behavior, the ship comes to the dock and then the arrival time based on the ship interarrival time is determined. If the time is the same as the ship entry time, it will go to the dock; (2) The data provided by the ship arriving at the pier is captured by the cranes, and the cranes determine the setup time (crane ready time). If the crane is available for unloading, it sends information to the trucks; (3) Trucks that are not in use perform set-up activities (truck ready time). Once the truck is available, it also sends the information to the crane; (4) In this behavior, crane lifts the container and stores it on the truck. The processing time is figured based on the calculation of crane unload finish time; (5) Trucks

Case study
The object of this study is the largest port in Indonesia that has a high intensity in logistics activities, including export, import, and goods transporting activities. This study object is used for validating the model implemented in Visual Basic.Net software. This programming technique is built with object-orientation. The class feature of this software can be used as a media portrayal of agent behavior. In this section, the validity test for the simulation model is conducted by using three validity techniques, namely extreme validity, replicated validity, and simulation output and real condition output comparison. The result of extreme validity is given in Table 2.
According to the extreme validity test, the simulation output produces a long unloading time and maximum truck's utility when the value of an input is extremely low. When the simulation input value is hugely increased, the unloading time becomes very fast, and the truck's utility is very low. It shows that the simulation model behavior is correct according to the real condition. It can be concluded that the simulation model is valid according to the suitability of its behavior.
In addition to the extreme validity test, data replication test was also performed due to the random number usage. Data replication test is necessary to identify whether there is any significant difference caused by the random number that may affect the prediction accuracy of the simulation. Table 3 displays the replication result.
Based on the replication test, the average score obtained was 259.003 minutes/ship with a standard deviation of 0.754 minutes/ship. Moreover, a control chart is used to identify if the quality of the simulation output is not unusual (very different if random numbers are different). That means this test was conducted to ensure that random numbers do not significantly reduce the quality of the simulation output solutions. Based on the data, then the value of the Upper Limit Chart and Lower Limit Chart was calculated. This chart can be seen in Figure 5.
According to the extreme validity test, the simulation output produces a long unloading time when the value of an input is extremely low. When the simulation input value is extremely raised, the unloading time becomes very fast. It demonstrates that the simulation model behavior is correct according to the real condition. In conclusion, the simulation model is valid according to the extreme validity test to see the suitability of its behavior.
To obtain the best solution, minimizing the average total time of unloading process and maximizing utility, several scenarios as given in Table 4 are investigated.
All scenarios generated in this study are based on the possible action that can be implemented in the object. In this study, the data obtained from interview results with operation manager at the port and from literature data for comparison and validation. Based on estimation data, for   11, 13 (2020) small ships, the average time for crane unloading processes is 40 minutes with a standard deviation of 10 minutes per unit container, while for truck is 30 minutes with 8 minutes standard deviation. Because these data are still in the form of estimation, a uniform distribution is used from the smallest value limit to the largest value limit (average ± standard deviation). The uniform distribution is used to accommodate uncertainty because this approach can be used to describe errors in the absence of more precise information [20].
Regarding the ships inter-arrival time, the estimated time between arrivals is two until four hours. It is following the data from Budipriyanto et al. [21] whose study is done on the same object. In that study, one of the average inter-arrival time for small ships is 169 minutes, with a standard deviation of 41 minutes (normally distributed). Thus, the data from that study is used as a parameter value for inter-arrival times. The scenarios are given in Tables 4 and 5. Table 4 shows that 125.30 minutes/ship is the best scenario. This scenario was obtained from three cranes and eight trucks. To ensure the solution is optimal, the utility of the truck used must be checked first. Table 5 displays that the average truck's utility is 80.15%, and that is relatively high. Thus, the results of three cranes with eight trucks scenario is the best decision. The result can be seen in Figure 6.

Conclusions
This study reveals that the ABMS can simulate the unloading activity at the port. It shows that the interactions among ship agents, cranes, and trucks can  be modelled. The uncertainty element can also be depicted and accommodated by an agent-based simulation approach. This study shows the number of cranes and trucks that can minimize the unloading time, including maximizing truck's utility. The result indicates that the minimum value of average unloading time is 125.30 minutes/ship, the total number of unloading is 1700 ship unloading/year, and the average truck's utility is 80.15% with three cranes and eight trucks decision. However, this study has some limitations, such as unintegrated unloading operation with loading operation, which can influence the policy of determining the number of trucks and cranes. The variation of behaviors is limited and not fully illustrated all processes that occur on the port. Extreme conditions of unusual behavior in loading-unloading conditions also need to be considered. Besides, stacking policy for solving the container stacking problem can be developed for further study, considering that different types of products have different paths. Thus, this study can be improved by eliminating these limitations.