Containerization, the stowage of regularly or even irregularly shaped freight in sealed, reusable boxes with standardized dimensions is one of the most important cargo moving techniques developed in the 20th century. Countries are investing not only in expanding terminals capacity, but as well in advanced container terminal technologies to increase operations efficiency and reduce vessel discharging time. With the development of material handling and information technology, a number of terminals, such as Europe Combined Terminal (ECT) in Rotterdam are employing automated container-handling equipments to satisfy the growing demands and lower the labour costs . Automated container terminal can be divided to three main operations as follows: 1- Quay Cranes (QCs), 2- Automated Guided Vehicles (AGVs) and 3- Automated Stacking Cranes (ASCs). Quay Cranes (QCs) are responsible for loading and discharging containers from and to vessels on the berth.
These QCs are semi-automated cranes which are operated by operators at a remote control room. Crane operator will load and discharge containers according to the stowage plan that the port will receive before vessel berthing to specify the sequence and location of each container in the ship. The Automated Guided Vehicles (AGVs) are responsible to take containers from QCs and transport them to the storage yard during the discharging operation and from storage yard to QCs during the loading operation. These AGVs are driverless vehicles which are moving based on pre-defined paths. Finally, the Automated Stacking Cranes (ASCs) handle the containers received from the AGVs when they arrive to storage yard. Scheduling and controlling these kinds of automated equipments is a very demanding and important task.
Most of the existing AGVs researches assume fixed paths for AGVs movements to reduce traffic complexity and easier vehicles control. On the other hand, using non fixed paths for AGVs movements can increase transportation efficiency, but it will increase traffic complexity and will create new controlling problems. GPS based AGVs will replace the fixed paths AGVs and will be able to reach a destination much faster than the pre-defined paths vehicles which will add more efficiency to the automated container terminal. On the other hand, implementing these free travel AGVs will add more traffic complexity and collision problems and those problems should be considered in the terminal more seriously. However, using sensor networks, Vehicle-to-Vehicle Communications and Internet of Things can help solve those AGVs traffic problems, increase terminal efficiency and therefore reduce vessel discharging time.
2. Related Work
Many researchers studied different operational aspects in the container terminal from different angles. For example, Luo and Wu  proposed a mixed integer programming model and genetic algorithm for AGVs’ dispatching and storage allocation optimization with the objective of minimizing vessel berthing period in a fully automated container terminal. Huang, Yan and Wang  proposed a mixed integer programming model to optimize scheduling of non-automated container terminal resources by minimizing vessel waiting time and reducing terminal energy consumption. According to Xin et al. , the control of automated container terminals is complex since Quay Cranes (QCs), Automated Guided Vehicles (AGVs) and Automated Stacking Cranes (ASCs) interact intensively for transporting containers, while collision avoidance of equipment must be ensured. Many research works also focused on AGVs routing, dispatching and collision avoidance algorithms in an automated container terminal. Routing is the process of choosing a static path and specifying the number of trips for each AGV in the terminal. Dispatching is the process of assigning the right AGV to the right container request. The dispatching process is considered as a dynamic problem where an AGV is assigned in real time depending on the location of the vehicle and other real time data from the terminal environment. Most work in this area use integer programming models with some heuristic approaches and concluded that using AGV’s for multiple vessels is much more efficient than specifying for single vessel operation . For the dispatching process, research works have studied different types of vehicles using both static and dynamic dispatching approaches with the objective to minimize total operation time or total crane waiting time [6,7]. Other notable works in this area include Kim and Bae  who proposed a static and dynamic AGVs dispatching based on vehicle initiated look-ahead algorithm. The suggested dispatching method showed higher efficiency than other dispatching methods such as, shortest travel distance or time, revised shortest imminent operation and earliest due date. AGVs deadlock and collision detection was also studied in the literature including the work of Kim, Jeon, and Ryu  who proposed to divide the traffic area in the terminal to grid-blocks and use reservation graphs during the development and validation stages allowing AGVs to be on several gridblocks. Zeng and Hsu  used a grid based solution which partitioned the terminal area to blocks and pre-defined paths. In addition, their method used discrete time segments for AGVs routing to avoid dangerous interactions between vehicles for collision avoidance. On the other hand, the use of Internet of Things was studied extensively in the supply chain and logistics industry but from different perspectives. Ports globally face considerable challenges calling for research on innovative solutions with minimal reliance on manual interventions and controls. As a result, the authors in  proposed an RFID based smart solution for Mombasa container terminal which considers the operations of containers which are entering, exiting or still in the terminal. There are many researchers studied the effects of Internet of Things on the transportation sectors and how to increase car traffic efficiency suggesting different methodologies for connected cars localization and distributed fault diagnosis using Vehicle to Vehicle communications .
3. Methodology and Framework
The operations of the automated container terminal can be divided in to three stages. The first stage is responsible for the operations of Quay Cranes for discharging/ loading containers from/to the vessel. The second stage focuses on AGVs operations moving containers from QCs to ASCs in the discharging process and from ASCs to QCs during the loading process. In addition, the second stage plans the scheduling of AGVs to generate collision free path for each AGV. Stage 3 handles the operations of ASCs stacking containers in their storage slots. Furthermore, in all of the three stages there are two levels of controlling decisions. In this research paper, we will be focusing on the two levels of stage 2 only which include AGVs operations. The higher level is responsible for the scheduling process of AGVs and assigning a specific job to a specific AGV (Discrete Events Operations). The higher level controller consists of a stage controller for each stage and a supervision controller which acts similar to a central brain of all the three operations stages as shown in Figure 1.
3.1. High Level Algorithm
The higher level algorithm is responsible for dividing the time intervals and assigning sequences of each job in all the three stages. In addition, the higher level algorithm depends on some assumptions as follows: 1) It considers the discharging operation only. 2) The containers’ origins in the vessel are known and are ready for processing at time 0. 3) Each container takes different operation times during the QCs, AGVs and ASCs stages. 4) The capacity of each QC, AGV and ASC is equal to 1 container (1 TEU). The higher level algorithm is divided into five main functions which control the processes of assigning resources and sequences for each container. The main function will control the overall algorithm and acts as the supervision controller responsible to manage the three stages of operation. The main function will declare the number of containers, number of QCs resources, number of AGVs resources and number of ASCs resources in the operation problem. Then, it will start executing the container jobs one by one giving priority to available food containers by calling the food_first function. - AssignQC function will assign a QC for each container and it will give priority to food containers to get served from the QC which has the least number of jobs in the queue for a less waiting time. Based on the area location of the food container, it will be assigned either to the corresponding QC in that area or the two neighbour QCs to the left or right based on the least number of jobs on their queues. On the other hand, non-food container will be served using the corresponding area QC only. - AssignASC function will assign ASC for each container. The container will be assigned to the corresponding ASC or the one to the left or the one to the right depending on the least number of jobs in their queues. This process of assigning ASC will be used regardless of the type of cargo inside the container. - AssignAGV function will assign an AGV for each container in the ship. The function will assign a free AGV for each container based on the nearest AGV which has the shortest distance to the container loading point. The function will calculate the distance between the AGV’s current position and the container loading point which is considered as the point of origin of the AGV operation. The function will calculate the distance for all the AGVs and it will choose the one with the shortest distance to serve the container.
3.2. Low Level Algorithm
The lower level considers the movements of AGVs, obstacles detections and collision avoidance between AGVs and other static obstacles. AGVmove function will begin by calculating the number of zones needed to be crossed during transportation from the current location to the point of origin and from the point of origin to the AGV destination. Then, the function will call obstacle_detection function to check if there is an obstacle in front of the AGV and will call the collision_avoidance function otherwise it will move one zone foreword and it will repeat this process to move until it reaches the destination. Also, in the automated container terminal there are two types of obstacles static or dynamic obstacles. Static obstacles are the non-moving obstacles such as cranes and the other infrastructure in the container terminal as shown in Figure 2(a,b). On the other hand, dynamic obstacles are the other AGVs which are moving and interacting with each other using common paths and intersections. To manage these interactions Vehicle -to- Infrastructure and Vehicle -to- Vehicle Communications were used to assure smooth and safe transportation in the automated container terminal. Vehicle -to- Infrastructure communication will help AGVs detect static obstacles by sharing the exact location of all the static obstacles in the automated container terminal. This is done by uploading a detailed map with all exact dimensions and locations of static obstacles to a central cloud system connected to all local AGV systems. In addition, the infrastructure will broadcast a message to all surrounding AGVs to alert them from a possible collision. Vehicle -to- Vehicle Communication will be used to detect dynamic obstacles while an AGV is moving. There will be a local system in every AGV and this system will contain a 1 meter accuracy GPS and a radar sensor to act as a two layer safety sensor. Every AGV local system will share its real time location with other surrounding local systems and the central cloud system to allow other AGVs to read this important information. In addition, the radar sensor, which surrounds the AGV, will act as the second layer of safety to detect any obstacle surrounding it. So, these two layers of safety will assure correct detection of obstacles by analyzing the two readings and giving a better decision. Furthermore, Obstacle_detection function will read and analyze the readings from the GPS and the radar sensors. Based on these readings, the function will decide if there is an obstacle on the way of the AGV or not. The function will return TRUE to the AGVmove function if any of the two sensors detect an obstacle and FALSE if no obstacle is detected. The Collision_avoidance function will act to avoid any possible accidents between the AGV and a static obstacle or the AGV and a dynamic obstacle. The AGV will stop if another AGV is occupying the wanted zone and it will wait until the other AGV releases the zone. Furthermore, the AGV will slightly turn left or right if there is a static obstacle in the way to avoid crashing. Logically, as the number of containers increases, the computational time will increase as well. The time complexity of the algorithm with n containers is O(n2). The higher and lower levels algorithms will work together to allocate resources for each container and assure safe transportation. By having efficient resource allocations and transportation, we will have faster operations which would therefore result in reducing vessel discharging time in an automated container terminal.
4. Experiments and Simulation
To prove the efficiency of the suggested methodology, we use a typical container terminal map in Figure 2 that shows the environment of the operations and respective coordinates. This container terminal map or reference system also used by  assumes 5 QCs for discharging containers from the ship, 5 AGVs to transport containers from the QCs to the ASCs and 5 ASCs for 5 stacking areas so each ASC will be responsible for one stacking area. The AGV will take the container from the origin transfer point which is the QC discharge point to the destination point which is the ASC loading point as shown in Figure 2.
Some assumptions and parameters for the experiments include the following:
- The vessel stowage width is equal to 8 TEUs.
- The maximum distance between the QC interchange point and a container is 100 meters.
- The container terminal yard area is 150 m x 270 m.
- Each stacking location has a volume of (36 TEU length x 10 TEU width x 6 TEU height).
- The maximum speed (velocity) for: QCs is 4 m/s, AGVs is 6 m/s and ASCs is 4 m/s.
- The maximum acceleration (in (m/s)²)for QCs is 0.4, AGVs is 1 and ASCs is 0.4.
- Each QC or AGV or ASC will handle 1 TEU only
- The initial positions of AGVs are loading positions, and of QCs are discharging positions.
- The QC handling time of each container depends on its position in the ship.
Arena simulation software was used in the following experiments to measure the efficiency of the
proposed framework and will focus on the following indicators:
- Total Discharging Time: the completion time for handling all containers which leave the ship.
- QC average operation time per container: the average time that the container will spend in the QC stage from waiting in the QC queue until it gets discharged to the AGV.
- AGV average operation time per container: the average time that an AGV will spend starting from the requesting time to delivering the corresponding container to the final destination.
- ASC average operation time per container: the average time that the container will spend in the ASC stage from waiting in the ASC queue until it reaches the final location in the stacking area.
- Average Waiting Time: the average time that a container will wait in the queues during all stages of operation.
Comparison experiments were conducted between the proposed algorithm in this paper and a benchmark experiment in the literature  using the same simulation parameters including the same constraints and number of resources. The results shown are the average of five simulation runs.
-Discharge Time: Three experiments were conducted using 1) 5 QCs, 10 AGVs and 8 ASCs, 2) 4 QCs, 8 AGVs and 6 ASCs and 3) 3 QCs, 6 AGVs and 5 ASCs respectively to compare the overall discharge time between the proposed algorithm and the benchmark. Results are shown in Figure 3(a). The results show 13%, 19% and 18% improvement on the discharge time between the proposed algorithm and the benchmark for the three different scenarios with an overall average improvement of 17%.
- Average Operation Time: Using similar scenarios as in the previous experiments, the average operation time was compared between the two algorithms as shown in Figure 3(b). The benchmark algorithm expectedly scored a better result on AGV average operation time compared with the proposed algorithm. This slight increase in the AGV average operation time of the proposed algorithm is because of the extra collision avoidance logic that has been applied to the proposed algorithm. This collision avoidance logic is to assure smooth transportation without any accidents between the AGVs which are using common paths and intersections while moving.
- Resource Utilization: Another comparison experiment was conducted between the proposed algorithm using same number of resources as the benchmark (5 QCs, 10 AGVs and 8 ASCs) and the proposed algorithm using fewer resources (5 QCs, 5 AGVs and 5 ASCs). The results show a very small difference (+3 seconds) in the total discharging time between the two scenarios (365 seconds vs. 368 seconds). Even with the 3 extra seconds, the total discharging time with fewer resources is still lower than the benchmark which has 420 seconds. Therefore, the proposed algorithm with the new configuration will save 5 extra AGVs and 3 extra ASCs while still resulting in a better total discharging time. However, the result of AGV average operation time was slightly more in the proposed algorithm with the fewer resources (+2 seconds). This small increase in the AGV average operation time is because of the fewer available number of AGVs in the automated container terminal. With fewer numbers of AGVs, the response time of the selected AGVs will increase.
- Lower Bound Stage Analysis: Another comparison experiment was conducted between the proposed algorithm and the optimum possible solution as an ideal case scenario. The optimum solution is the ideal situation when there is an assumption of zero waiting time for each container and zero transportation waiting time. There is 161 seconds difference between the proposed algorithm and the optimum solution total discharge time, and this difference is a direct result of the container waiting time. To achieve this optimum result, no shared resources should be considered in the automated container terminal which makes it a very expensive solution and it leads to a very low utilization of resources. In addition, a detailed experiment was conducted to compare between the proposed algorithm and the optimum solution for every stage separately. As shown in Figure 3(c), the proposed algorithm resulted in 175.4 seconds, 29 seconds and 19.3 seconds in the QC stage (stage 1), AGV operations (Stage 2) and ASC (Stage 3) respectively compared to 34.2 seconds, 15.5 seconds and 12.8 seconds for the optimum solution. These savings are a result of the lack of waiting time in Stage 1 and 3, and the assumption of having an AGV ready on the loading point for each container in Stage 2. These results serve as a lower bound and assist us in further improving our proposed algorithms to achieve optimal results.
This paper studied the three stages of operations in the automated container terminal and proposed a smart algorithm to increase its efficiency using sensor networks. The objective of proposed algorithm is to decrease the total discharging time of a vessel which will increase the efficiency of the automated container terminal assuring smooth traffic in the automated container terminal. The proposed algorithm was proven to work with fewer resources than the benchmark and achieve better results. Future work includes real world deployment in UAE container terminals and will cover different scenarios of different containers sizes to be able to handle 40 feet containers and 2x20 feet containers at the same time.
 UNCTAD, (2011). (United Nations Conference on Trade and Development) secretariat. Review of Maritime Transport 2011, United Nations publication.
 Luo, J., & Wu, Y. (2015). Modelling of dual-cycle strategy for container storage and vehicle scheduling problems at automated container terminals. Transportation Research Part E: Logistics and Transportation Review, 49-64.
 He, J., Huang, Y., Yan, W., & Wang, S. (2015). Integrated internal truck, yard crane and quay crane scheduling in a container terminal considering energy consumption. Expert Systems with Applications, 2464-2487.
 Xin, J., Negenborn, R., Corman, F., & Lodewijks, G. (2015). Control of interacting machines in automated container terminals using a sequential planning approach for collision avoidance. Transportation Research Part C: Emerging Technologies, 377-396.
 Zeng, Q., Yang, Z., & Lai, L. (2009). Models and algorithms for multi-crane oriented scheduling method in container terminals. Transport Policy, 16, 271–278.
 Zhang, L. W., Ye, R., Huang, S. Y., & Hsu, W. J. (2005). Mixed integer programming models for dispatching vehicles at a container terminal. Journal of Applied Mathematics & Computing, 17(1–2), 145–17.
 Xing, Y., Yin, K., Quadrifoglio, L., & Wang, B. L. (2012). Dispatch problem of automated guided vehicles for serving tandem lift quay crane. Transportation Research Record, 79–86.
 Kim, K. H., & Bae, J. W. (2004). A look-ahead dispatching method for automated guided vehicles in automated port container terminals. Transportation Science, 38(2), 224–234.
 Kim, K. H., Jeon, S. M., & Ryu, K. R. (2006). Deadlock prevention for automated guided vehicles in automated container terminals. OR Spectrum, 28, 659–679.
 Zeng, J., & Hsu, W. J. (2008). Conflict-free container routing in mesh yard layouts. Robotics and Autonomous Systems, 56, 451–460.
 Siror, J., Huanye, S., & Dong, W. (2011). RFID based model for an intelligent port. Computers in Industry, 795-810.
 Homchaudhuri, B., Pisu, P., & Ozguner, U. (2015). Secure Vehicle Localization and Cruise Control for Connected Vehicles. IFAC-PapersOnLine, 1192-1197.