# Optimization of Port Emergency Materials Dispatch with Time Windows Constraints under Uncertainties

Authors: Bowei Xu; Yuqing Wang; Junjun Li
Journal: Discrete Dynamics in Nature and Society
 (2021)

---

## Abstract

Uncertainties exist and affect the actual port production. For example, at the beginning of 2020, the sudden outbreak of COVID-19 seriously affected terminal production and increased the short-term pressure of handling at container terminals. Consequently, a large number of containers were stacked at terminals, and the problem of terminal congestion became more serious. To solve the congestion problem of container terminals and ensure the priority dispatch of emergency materials, this study uses the optimized arrival patterns of external trucks and a priority dispatch strategy for emergency materials to establish a bilevel optimization model for container terminals and proposes a chaotic genetic algorithm based on logistic mapping as a solution. Through numerical experiments, the algorithm proposed in this study was compared with the genetic algorithm and adaptive genetic algorithm. The experimental results show that the model and algorithm proposed in this study can effectively reduce the total cost of containers in a terminal while ensuring the priority dispatch of emergency materials, reducing the overlapping part of the time window, optimizing the arrival mode of external trucks, and reducing the waiting time of external trucks, effectively alleviating the terminal congestion problem.


---

## Body

## 1. Introduction

The outbreak of COVID-19 in early 2020 has had a serious impact on our lives, industrial production, and economic development. It is a challenge not only for medical and health services but also for the transportation of emergency materials. In this epidemic, the emergency materials are the antiepidemic materials and living materials, mainly including protective clothing, disinfectants, and food. Due to the urgency of time, it is necessary to ensure that all links of emergency logistics are carried out efficiently and quickly.In response to these situations, the transportation department has actively worked to ensure the smooth transportation of emergency materials. Although the domestic epidemic has been effectively controlled, overseas epidemics have become more severe, affecting terminal logistics. This global public health incident has caused the interruption of the normal operation of container terminals and has affected the original planned production operations of vessels. It is necessary to take corresponding emergency measures to ensure the smooth transportation of emergency materials.In order to minimize the impact of COVID-19 on our lives, industrial production, and economic development, it is necessary to construct the optimized arrival patterns of external trucks and a priority dispatch strategy for emergency materials in container terminal. When emergency occurs in container terminal, it affects normal production operations. The container terminal should make emergency dispatch of materials, personnel, and equipment to ensure the normal operation of the container terminal. In recent years, the Chinese government has paid more attention to the development of emergency logistics at container terminals and has successively issued measures for container terminal emergency logistics. Container terminal emergency logistics has been substantially developed but still needs further optimization.Considering that COVID-19 has increased the demand for emergency materials, such as protective clothing, disinfectants, and food, time window constraint is used to optimize arrival patterns of external trucks. The arrival patterns of external trucks refer to avoiding the random arrival of external trucks at the container terminal and planning the arrival time of external trucks by using the constraints such as vessel-related time windows; this optimized pattern can alleviate terminal congestion. Then, in response to the need for emergency materials under the outbreak of COVID-19, this article proposes implementing the priority dispatch strategy for emergency materials in container terminals to ensure that emergency materials reach the destinations as soon as possible. The priority dispatching strategy for emergency materials refers to scheduling according to the priority of materials transported by external trucks. We construct a bilevel optimization model for the priority dispatch of emergency materials in container terminals, use the chaotic genetic algorithm based on logistic mapping to solve the problem, and compare the results with the genetic algorithm and the adaptive genetic algorithm to obtain the best plan for priority dispatch of emergency materials.This study is organized as follows. The literature review on container terminal congestion and emergency logistics at maritime container terminals is discussed in Section2. The problem description and optimization model are established in Section 3. The solution approach is proposed in Sections 4. Numerical experiments and the results analysis are presented in Section 5. Conclusions and further directions are presented in the last section.


## 2. Literature Review

In response to COVID-19, it is necessary to consider avoiding terminal congestion due to the centralized arrival of the external trucks and giving priority to the external trucks with the task of emergency materials. Therefore, the literature review is mainly organized from two parts: container terminal congestion and emergency logistics.


### 2.1. Related Research on Container Terminal Congestion

Terminal congestion has become a hot topic around the enterprises and academic circles in recent years. Many studies have put forward methods and measures to solve terminal congestion, such as the automated guided vehicle (AGV) route planning, truck appointment system, congestion charging, and some other solutions.Yang et al. [1] considered the integrated scheduling of quay cranes and AGVs and constructed a bilevel programming model. Ng [2] replaced the individual limit on the number of deployable ships by examining the method of ship deployment in container ports when there is a time window. Nossack and Pesch [3] solved the truck scheduling problem in intermodal container transportation, and the trucks must be routed and scheduled under the hard time window restrictions imposed by customers and terminals to minimize the total running time of trucks. Shiri and Huynh [4] pointed out that the intermodal terminal requires trucks to make an appointment, and each truck must load and unload containers at the specified time window. The results show that the integrated model can find the best solution. The previously mentioned researches use time windows to solve the problems of integrated terminal dispatch and transportation dispatch.Some scholars further apply the time window constraint to solve the problem of terminal congestion. For example, Chen et al. [5] proposed a method called “time window dependent on ships” to control the arrival of external trucks. Ma et al. [6] established a two-stage queuing model describing the queuing process of vehicles at gates and yards and established a reservation system based on ship-related time windows. To solve the congestion problem at the gate of the terminal, Yi et al. [7] proposed an appointment scheduling method, which considered the truck cost, the number of appointments allowed in each time window, and the number of trucks available in each time window. Chen and Jiang [8] proposed a time window management solution based on the truck-ship service relationship. Assadipour et al. [9] considered the specific available time window of each crane to minimize the container storage time in the terminal. Although the previously mentioned documents use time windows to solve the problem of terminal congestion, they are all the problems of landside congestion. On this basis, this study takes into account the cooperative planning of landside and seaside to solve the problems of container stacking, busy production, and terminal congestion.


### 2.2. Related Research on Emergency Logistics

Due to the frequent occurrence of unpredictable disasters, emergency logistics scheduling has become more and more important in modern society, and many studies have proposed solutions.Minas et al. [10] conducted a comprehensive survey of emergency response operation literature in the article. Research helps strengthen the theoretical basis of emergency response operations. The purpose of the study by Memari et al. [11] was to distribute some temporary emergency stations in the entire area through maximum coverage after a disaster occurs. Qi et al. [12] designed and implemented a postearthquake emergency material distribution and transportation decision support system based on geographic information system in order to reduce the losses caused by the earthquake. However, most of the existing researches consider a certain emergency logistics scheduling model, and most of them are based on ideal scenarios. Considering the uncertainty of information, many scholars have further considered the uncertain scenarios and conducted research. Lu and Luo [13] pointed out in their research that emergencies are full of a lot of uncertain information, so a new emergency transportation model was proposed in the article, which simulated the emergency transportation scene from logistics centre to disaster areas and between disaster areas. Wang et al. [14] established a multiobjective and multiperiod emergency resource allocation model based on the uncertainty and continuity of the natural rescue process; this model realized the effective distribution of rescue materials and the reasonable choice of transportation routes.In 2020, the COVID-19 infectious disease sweeps the world, causing huge loss of life and serious economic problems to countries. Therefore, the provision of epidemic prevention and control materials that guarantee the livelihood of the people is a priority for governments of all countries. In response to this epidemic, some scholars have made researches in the field of transportation. Chen et al. [15] reviewed urban public transportation safety issues, traffic control methods, and emergency public transportation planning in their article. On this basis, they proposed the emergency traffic control measures. Liu et al. [16] used the ant colony-taboo hybrid algorithm to establish a medical waste transportation efficiency model between the hospital and the temporary storage station, which solved the problem of medical waste disposal based on the transit temporary storage station to a certain extent. Pacheco and Laguna [17] considered that the rapid increase in the number of COVID-19 cases has caused the vehicle routing problems. The objective function was processed hierarchically. The first objective was to minimize the transportation time of the longest route. The second goal was to minimize the total travel distance.The genetic algorithm is widely used in the field of transportation. Park et al. [18] proposed a waiting strategy for the vehicle routing problem with simultaneous pickup and delivery and used the genetic algorithm to solve and validate its accuracy. Escobar-Falcón et al. [19] integrated the fuel consumption heterogeneous vehicle routing problem with two-dimensional loading constraints and presented a specialized genetic algorithm to solve the design of routes. Mahpour et al. [20] determined the fitness function and the initial population and finally imposed constraints in the development process of the genetic algorithm (GA) to determine the optimal service time of container port berths. Avdagic et al. [21] focused on use of the genetic algorithm for effectively narrowing the search space.In summary, regarding the research on the transportation during the spread of COVID-19, the limitations of these studies are that there is no specific scheduling of container terminal operations, and they did not give priority to the transportation management of epidemic prevention and control materials. Therefore, the main contribution of this article is that, considering the urgency of epidemic prevention and control supplies, priority is given to the dispatch of emergency supplies at container terminals, which has important research significance and research value. Moreover, the genetic algorithm is suitable for solving the related problems in the field of transportation, so this study uses the chaotic genetic algorithm based on logistic mapping to solve the problem.


## 2.1. Related Research on Container Terminal Congestion

Terminal congestion has become a hot topic around the enterprises and academic circles in recent years. Many studies have put forward methods and measures to solve terminal congestion, such as the automated guided vehicle (AGV) route planning, truck appointment system, congestion charging, and some other solutions.Yang et al. [1] considered the integrated scheduling of quay cranes and AGVs and constructed a bilevel programming model. Ng [2] replaced the individual limit on the number of deployable ships by examining the method of ship deployment in container ports when there is a time window. Nossack and Pesch [3] solved the truck scheduling problem in intermodal container transportation, and the trucks must be routed and scheduled under the hard time window restrictions imposed by customers and terminals to minimize the total running time of trucks. Shiri and Huynh [4] pointed out that the intermodal terminal requires trucks to make an appointment, and each truck must load and unload containers at the specified time window. The results show that the integrated model can find the best solution. The previously mentioned researches use time windows to solve the problems of integrated terminal dispatch and transportation dispatch.Some scholars further apply the time window constraint to solve the problem of terminal congestion. For example, Chen et al. [5] proposed a method called “time window dependent on ships” to control the arrival of external trucks. Ma et al. [6] established a two-stage queuing model describing the queuing process of vehicles at gates and yards and established a reservation system based on ship-related time windows. To solve the congestion problem at the gate of the terminal, Yi et al. [7] proposed an appointment scheduling method, which considered the truck cost, the number of appointments allowed in each time window, and the number of trucks available in each time window. Chen and Jiang [8] proposed a time window management solution based on the truck-ship service relationship. Assadipour et al. [9] considered the specific available time window of each crane to minimize the container storage time in the terminal. Although the previously mentioned documents use time windows to solve the problem of terminal congestion, they are all the problems of landside congestion. On this basis, this study takes into account the cooperative planning of landside and seaside to solve the problems of container stacking, busy production, and terminal congestion.


## 2.2. Related Research on Emergency Logistics

Due to the frequent occurrence of unpredictable disasters, emergency logistics scheduling has become more and more important in modern society, and many studies have proposed solutions.Minas et al. [10] conducted a comprehensive survey of emergency response operation literature in the article. Research helps strengthen the theoretical basis of emergency response operations. The purpose of the study by Memari et al. [11] was to distribute some temporary emergency stations in the entire area through maximum coverage after a disaster occurs. Qi et al. [12] designed and implemented a postearthquake emergency material distribution and transportation decision support system based on geographic information system in order to reduce the losses caused by the earthquake. However, most of the existing researches consider a certain emergency logistics scheduling model, and most of them are based on ideal scenarios. Considering the uncertainty of information, many scholars have further considered the uncertain scenarios and conducted research. Lu and Luo [13] pointed out in their research that emergencies are full of a lot of uncertain information, so a new emergency transportation model was proposed in the article, which simulated the emergency transportation scene from logistics centre to disaster areas and between disaster areas. Wang et al. [14] established a multiobjective and multiperiod emergency resource allocation model based on the uncertainty and continuity of the natural rescue process; this model realized the effective distribution of rescue materials and the reasonable choice of transportation routes.In 2020, the COVID-19 infectious disease sweeps the world, causing huge loss of life and serious economic problems to countries. Therefore, the provision of epidemic prevention and control materials that guarantee the livelihood of the people is a priority for governments of all countries. In response to this epidemic, some scholars have made researches in the field of transportation. Chen et al. [15] reviewed urban public transportation safety issues, traffic control methods, and emergency public transportation planning in their article. On this basis, they proposed the emergency traffic control measures. Liu et al. [16] used the ant colony-taboo hybrid algorithm to establish a medical waste transportation efficiency model between the hospital and the temporary storage station, which solved the problem of medical waste disposal based on the transit temporary storage station to a certain extent. Pacheco and Laguna [17] considered that the rapid increase in the number of COVID-19 cases has caused the vehicle routing problems. The objective function was processed hierarchically. The first objective was to minimize the transportation time of the longest route. The second goal was to minimize the total travel distance.The genetic algorithm is widely used in the field of transportation. Park et al. [18] proposed a waiting strategy for the vehicle routing problem with simultaneous pickup and delivery and used the genetic algorithm to solve and validate its accuracy. Escobar-Falcón et al. [19] integrated the fuel consumption heterogeneous vehicle routing problem with two-dimensional loading constraints and presented a specialized genetic algorithm to solve the design of routes. Mahpour et al. [20] determined the fitness function and the initial population and finally imposed constraints in the development process of the genetic algorithm (GA) to determine the optimal service time of container port berths. Avdagic et al. [21] focused on use of the genetic algorithm for effectively narrowing the search space.In summary, regarding the research on the transportation during the spread of COVID-19, the limitations of these studies are that there is no specific scheduling of container terminal operations, and they did not give priority to the transportation management of epidemic prevention and control materials. Therefore, the main contribution of this article is that, considering the urgency of epidemic prevention and control supplies, priority is given to the dispatch of emergency supplies at container terminals, which has important research significance and research value. Moreover, the genetic algorithm is suitable for solving the related problems in the field of transportation, so this study uses the chaotic genetic algorithm based on logistic mapping to solve the problem.


## 3. Model

In this part, we propose a framework of the bilevel optimization model. Considering the problems of terminal congestion and the dispatch of emergency materials under the uncertain situation, as well as the related time window constraints, establish a bilevel optimization model for the priority dispatch of emergency materials. It can alleviate port congestion while realizing the priority dispatch of emergency supplies. The model framework is shown in Figure1, and the arrival time window of external truck is solved by the upper-level model and input into the lower-level model as the initial value.Figure 1
The bilevel optimization model framework.


### 3.1. Problem Description

In the upper layers, with the goal of minimizing the total cost of containers in the container terminal, the arrival time window of external trucks is solved according to constraints, such as the arrival time of the vessel and the storage space of the yard. When the terminal operator receives the arrival notification from the arriving vessel, it will consider the time window for container delivery. The starting point depends on the availability of yard capacity, and the ending point depends on the estimated arrival time of vessel. The upper-level model framework is shown in Figure2.Figure 2
The details of the upper-level model.There may be overlapping parts in the initial time window between different tasks, which may cause terminal congestion; therefore, the initial time window needs to be adjusted. The lower-level model aims to minimize the cost of task adjustment. According to the priority of the task, the higher the task level is, the higher the adjustment cost is to ensure that urgent materials are dispatched first. Obtaining a time window arrival plan for external trucks with the lowest adjustment cost is the optimal plan for the priority dispatch of emergency materials. The framework of the lower-level model is shown in Figure3.Figure 3
The details of the lower-level model.


### 3.2. Model Assumptions

Before generating the time windows plan, the information of the upcoming vessels has been known; because container vessels are weekly liners and use the weekly arrival mode, the arrival vessels within one week of container terminal are studied. The container handling quantity of each vessel is known, and the container specifications are assumed to be standard containers with 20 feet. The processing speed of each gate is consistent. The service efficiency of each yard crane is consistent, and the energy consumed by each yard crane is the same.


### 3.3. Upper-Level Optimization Model

#### 3.3.1. Parameter Definition

i: vessel, i=1,2,…,I;t: time, t=1,2,…,Tr: the hourly interest rateg: the number of the gates, g=1,2,…,GQi: the volume of export containers to be loaded onto vessel iH: the gate processing rateA: the unit value of waiting time per truck per hourB: the unit cost of fuel consumption per truck per hourY: the total yard storage capacityAC: the hourly yard fee per containerVC: the average value of one container cargoERit: the estimated arrival time of vessel iELit: the estimated departure time of vessel iTl: the length of the time windowTk: the starting point of time window which shall not be earlier than the arrival time hoursWCOit: the cost of truck waiting and fuel consumption at time t of vessel iYCDit: the yard fee and the storage time cost of cargos at time t for vessel iPCt: the penalty for the insufficient yard space at time tfit: the number of truck arrivals for vessel i at time tfit′: the number of reallocated truck arrivals for vessel i at time tnt: the queue lengthχ¯t: the average waiting time of the trucksDit: the average storage time of the containers arriving at time t for vessel iTV: the value of the storage time per TEU cargo per hourOt: the occupied yard space at time tλit: the number of trucks arriving at the yard at time tdit: the number of trucks leaving gate g at time tAQit: the number of export containers of vessel iat time tMC: the handling charge per containerN: the number of time windows after divisionTLit=1,the time windows of timetand timeT−1overlap0,others;TFit=1,the starting point of the time window of theiis att0,others;TAit: starting point of time windowTBit: ending point of time window


#### 3.3.2. Model Establishment

(1)minTC=W1+W2+W3=∑i∑tWCOit+∑i∑tYCDit+∑tPCt,(2)W1=∑i∑tWCOit=∑i∑tA+B×χ¯t×fit′,(3)W2=∑i∑tYCDit=∑i∑tTV+AC×Dit×fit′+N×MC,(4)W3=∑tPCt=999,999,whenOt>Y,0,whenOt≤Y.Regarding all the processes of the container in the terminal, the total cost of container in the terminal is the sum of the cost of external trucks, the cost generated in the yard, and the penalty cost of insufficient space in the yard. The arrival of the external truck should meet the time window constraints related to the vessels, and at the same time, it should ensure that the total cost of the container in the terminal is minimized. The objective function can be expressed by equation (1), where TC means the total cost of container in the terminal.Equation (2) is the total cost of the external trucks, including the waiting time of the external trucks and the cost of fuel consumption. Equation (3) is the cost of containerized cargo storage time, yard cost, and the cost of manpower and equipment for loading and unloading.Equation (4) is the penalty cost for insufficient space in the yard. Because of the outbreak, several vessels have not been able to pick up the containers in time, which has led to a backlog of several containers in the yard. In addition, as most countries are in a state of blockade, buyers have begun to cancel orders, leading to an increase in inventory and likely causing congestion. If the yard space is not available at time t, an operation halt will happen and all external trucks have to wait at container terminal until some storage space is released. Therefore, a penalty cost is set to avoid the fact that there is no storage space at the yard when the external truck arrives in the terminal, where Ot is the occupied yard space at time t and Y is the total yard storage capacity. When the occupied yard space at time t is greater than the total yard storage capacity, a larger penalty cost is set; when the occupied yard space at time t is less than the total yard storage capacity, the penalty cost is 0.We have(5)TBit−TAit=Tl,(6)TAit+Tk≥ERit,(7)TBit+6≤ERit,(8)Tl≥6,(9)TAit,TBitis the integer.Each vessel calling at the container terminal is assigned an external truck arrival time window. Equation (5) indicates that the length of the time window for container on the vessel is Tl. Equation (6) indicates that the starting time of time window should not be earlier than the arrival time of the vessel. Equation (7) indicates that the ending time of the time window should be more than 6 hours earlier than the arrival time of the vessel. Equation (8) indicates that the starting point of each time window should be at least 6 hours earlier than the ending point, which means that the minimum length of the time window is 6 hours. Equation (9) ensures that the starting and ending times for external trucks related to vessel are integers.(10)fit=Vii×∫cc+i/Liu0.291−u2.25du∫01u0.291−u2.25du,where,c=t−1−∑t=1t=Tt∗TSitLi,if,t∈∑t=1t=Tt∗TAit+1,∑t=1t=Tt∗TBit∀i,∀t,0,others,(11)fit′=fit+fit+24×7+fit−24×7,(12)nt=maxnt−1+∑ifit′−H,0,(13)χ¯t=nt+nt−12H,(14)λit=∑g=1Gdit,(15)Ot−1TLit+∑iQi≤Y,(16)Ot=Ot−1+∑iQiTFit−TLit,(17)Dit=ERit−t−χ¯t,(18)TV=VC×r,(19)AQit=EiTBit−TAit+1,∀i,t.Equations (10)–(13) are constraints at the gate. The truck arrivals can be estimated with equation (10), where fit is positive only when time t is within the time window i; otherwise, fit is 0. It is assumed that a terminal has the same vessels calling each week, so, for the vessel operation in the current week, if any workload is allocated to the former or the next week, then the same workload will be allocated back from the next or the former week [10]. Therefore, truck arrivals should be updated with equation (11). Equation (12) is the queue length of external trucks at the gate, and the queue length is measured by the number of trucks. Equation (13) calculates the average waiting time of external trucks at the gate.Equation (14) calculates the number of external trucks arriving at the yard at time t. Equation (15) ensures that the occupied yard space at time t should not exceed the total yard storage capacity in the container terminal. Equation (16) calculates the occupied yard space at time t. Equation (17) indicates the average storage time of the containers arriving at time t for vessel i. Equation (18) indicates the value of containerized external truck storage time and yard fee. Equation (19) calculates the number of containers related to vessel i arriving at the container terminal gate at time t.


### 3.4. Lower-Level Optimization Model

#### 3.4.1. Parameter Definition

l: container, l=1,2,…,Lj: external truck, j=1,2,…,Jk: the service order of the arrival external truckS: the capacity of the time windowU: terminal working hoursM: unit time window stepTRit: the time when the gate actually started to process the task of the external truckTAit′: starting point of the adjusted time windowTBit′: ending point of the adjusted time windowZjt: the external truck j arrives at time tYit: handling the task of vessel i at time tC∂: adjustment cost∑j∈Jxlj=1,containerslare transported by external truckj0,others∑g∈Gzjg=1,external truckjis served by the gateg0,othershtg=1,the gategis working at timet0,othersyljt=1,generate time window adjustment0,others


#### 3.4.2. Model Establishment

The goal of the lower-level model is to minimize the adjustment cost of time windows related to the vessels. The higher the priority of the task, the higher the corresponding adjustment cost. Try to adjust the lower priority tasks later to ensure that urgent tasks enter the container terminal first and realize the priority dispatch of urgent materials.(20)min∑t∈T∑j∈J∑l∈Lyljt⋅TBit−TAit−TBit′−TAit′N⋅C∂,subject to(21)∂1+∂2+∂3=1,(22)0<∂1<∂2<∂3<1.The task level is divided into I, II, and III, and the priority is a specific decimal, which is represented by∂1, ∂2, and ∂3. Equations (21) and (22) are used to define the priority of the task, and the task priority remains consistent throughout the container terminal operation. The higher the priority level, the greater the weight, and the sum of their addition is 1.(23)N=UM,(24)TRit∂3≤TRit∂2≤TRit∂1,(25)TAit′,TBit′⊂TAit,TBit,(26)TBitl−TAitl+1>0.Equation (23) is used to calculate the number of time windows after division. Equation (24) is used to ensure that the high-priority external truck enters the terminal earlier than the low-priority external truck. The higher the task level, the earlier the gate processing time. Equation (25) ensures that the adjusted time window is in the initial within the time window. Equation (26) is used to determine whether there is an overlap in the time window.(27)TAit≤TRit≤TBit,(28)∑j∈Jxlj=1,l∈L,(29)∑g∈Gzjg=1,(30)∑j∈Jygjk≤1,(31)htg≤Z,∀g∈G,t∈T.Equations (27)–(31) express the constraints related to the gate. Equation (27) guarantees that the time when the gate actually starts processing tasks is within the initial time window of the task. Equation (28) ensures that there is only one task for each external truck. Equation (29) ensures that each external truck is served by only one gate and can only be served once. Equation (30) indicates that one gate can handle at most one task at the same time. Equation (31) ensures that the number of external trucks entering the terminal at the same time does not exceed the total number of gates.(32)Zjt=Yit,∀i∈I,t∈T,j∈J,(33)TAit−TAit′≤2UN.Equation (32) means that the external trucks serving the same vessel enter the terminal at the same time window. Equation (33) indicates that the task adjustment range of the external trucks with overlapping time windows is within the interval of the two time windows.


## 3.1. Problem Description

In the upper layers, with the goal of minimizing the total cost of containers in the container terminal, the arrival time window of external trucks is solved according to constraints, such as the arrival time of the vessel and the storage space of the yard. When the terminal operator receives the arrival notification from the arriving vessel, it will consider the time window for container delivery. The starting point depends on the availability of yard capacity, and the ending point depends on the estimated arrival time of vessel. The upper-level model framework is shown in Figure2.Figure 2
The details of the upper-level model.There may be overlapping parts in the initial time window between different tasks, which may cause terminal congestion; therefore, the initial time window needs to be adjusted. The lower-level model aims to minimize the cost of task adjustment. According to the priority of the task, the higher the task level is, the higher the adjustment cost is to ensure that urgent materials are dispatched first. Obtaining a time window arrival plan for external trucks with the lowest adjustment cost is the optimal plan for the priority dispatch of emergency materials. The framework of the lower-level model is shown in Figure3.Figure 3
The details of the lower-level model.


## 3.2. Model Assumptions

Before generating the time windows plan, the information of the upcoming vessels has been known; because container vessels are weekly liners and use the weekly arrival mode, the arrival vessels within one week of container terminal are studied. The container handling quantity of each vessel is known, and the container specifications are assumed to be standard containers with 20 feet. The processing speed of each gate is consistent. The service efficiency of each yard crane is consistent, and the energy consumed by each yard crane is the same.


## 3.3. Upper-Level Optimization Model

### 3.3.1. Parameter Definition

i: vessel, i=1,2,…,I;t: time, t=1,2,…,Tr: the hourly interest rateg: the number of the gates, g=1,2,…,GQi: the volume of export containers to be loaded onto vessel iH: the gate processing rateA: the unit value of waiting time per truck per hourB: the unit cost of fuel consumption per truck per hourY: the total yard storage capacityAC: the hourly yard fee per containerVC: the average value of one container cargoERit: the estimated arrival time of vessel iELit: the estimated departure time of vessel iTl: the length of the time windowTk: the starting point of time window which shall not be earlier than the arrival time hoursWCOit: the cost of truck waiting and fuel consumption at time t of vessel iYCDit: the yard fee and the storage time cost of cargos at time t for vessel iPCt: the penalty for the insufficient yard space at time tfit: the number of truck arrivals for vessel i at time tfit′: the number of reallocated truck arrivals for vessel i at time tnt: the queue lengthχ¯t: the average waiting time of the trucksDit: the average storage time of the containers arriving at time t for vessel iTV: the value of the storage time per TEU cargo per hourOt: the occupied yard space at time tλit: the number of trucks arriving at the yard at time tdit: the number of trucks leaving gate g at time tAQit: the number of export containers of vessel iat time tMC: the handling charge per containerN: the number of time windows after divisionTLit=1,the time windows of timetand timeT−1overlap0,others;TFit=1,the starting point of the time window of theiis att0,others;TAit: starting point of time windowTBit: ending point of time window


### 3.3.2. Model Establishment

(1)minTC=W1+W2+W3=∑i∑tWCOit+∑i∑tYCDit+∑tPCt,(2)W1=∑i∑tWCOit=∑i∑tA+B×χ¯t×fit′,(3)W2=∑i∑tYCDit=∑i∑tTV+AC×Dit×fit′+N×MC,(4)W3=∑tPCt=999,999,whenOt>Y,0,whenOt≤Y.Regarding all the processes of the container in the terminal, the total cost of container in the terminal is the sum of the cost of external trucks, the cost generated in the yard, and the penalty cost of insufficient space in the yard. The arrival of the external truck should meet the time window constraints related to the vessels, and at the same time, it should ensure that the total cost of the container in the terminal is minimized. The objective function can be expressed by equation (1), where TC means the total cost of container in the terminal.Equation (2) is the total cost of the external trucks, including the waiting time of the external trucks and the cost of fuel consumption. Equation (3) is the cost of containerized cargo storage time, yard cost, and the cost of manpower and equipment for loading and unloading.Equation (4) is the penalty cost for insufficient space in the yard. Because of the outbreak, several vessels have not been able to pick up the containers in time, which has led to a backlog of several containers in the yard. In addition, as most countries are in a state of blockade, buyers have begun to cancel orders, leading to an increase in inventory and likely causing congestion. If the yard space is not available at time t, an operation halt will happen and all external trucks have to wait at container terminal until some storage space is released. Therefore, a penalty cost is set to avoid the fact that there is no storage space at the yard when the external truck arrives in the terminal, where Ot is the occupied yard space at time t and Y is the total yard storage capacity. When the occupied yard space at time t is greater than the total yard storage capacity, a larger penalty cost is set; when the occupied yard space at time t is less than the total yard storage capacity, the penalty cost is 0.We have(5)TBit−TAit=Tl,(6)TAit+Tk≥ERit,(7)TBit+6≤ERit,(8)Tl≥6,(9)TAit,TBitis the integer.Each vessel calling at the container terminal is assigned an external truck arrival time window. Equation (5) indicates that the length of the time window for container on the vessel is Tl. Equation (6) indicates that the starting time of time window should not be earlier than the arrival time of the vessel. Equation (7) indicates that the ending time of the time window should be more than 6 hours earlier than the arrival time of the vessel. Equation (8) indicates that the starting point of each time window should be at least 6 hours earlier than the ending point, which means that the minimum length of the time window is 6 hours. Equation (9) ensures that the starting and ending times for external trucks related to vessel are integers.(10)fit=Vii×∫cc+i/Liu0.291−u2.25du∫01u0.291−u2.25du,where,c=t−1−∑t=1t=Tt∗TSitLi,if,t∈∑t=1t=Tt∗TAit+1,∑t=1t=Tt∗TBit∀i,∀t,0,others,(11)fit′=fit+fit+24×7+fit−24×7,(12)nt=maxnt−1+∑ifit′−H,0,(13)χ¯t=nt+nt−12H,(14)λit=∑g=1Gdit,(15)Ot−1TLit+∑iQi≤Y,(16)Ot=Ot−1+∑iQiTFit−TLit,(17)Dit=ERit−t−χ¯t,(18)TV=VC×r,(19)AQit=EiTBit−TAit+1,∀i,t.Equations (10)–(13) are constraints at the gate. The truck arrivals can be estimated with equation (10), where fit is positive only when time t is within the time window i; otherwise, fit is 0. It is assumed that a terminal has the same vessels calling each week, so, for the vessel operation in the current week, if any workload is allocated to the former or the next week, then the same workload will be allocated back from the next or the former week [10]. Therefore, truck arrivals should be updated with equation (11). Equation (12) is the queue length of external trucks at the gate, and the queue length is measured by the number of trucks. Equation (13) calculates the average waiting time of external trucks at the gate.Equation (14) calculates the number of external trucks arriving at the yard at time t. Equation (15) ensures that the occupied yard space at time t should not exceed the total yard storage capacity in the container terminal. Equation (16) calculates the occupied yard space at time t. Equation (17) indicates the average storage time of the containers arriving at time t for vessel i. Equation (18) indicates the value of containerized external truck storage time and yard fee. Equation (19) calculates the number of containers related to vessel i arriving at the container terminal gate at time t.


## 3.3.1. Parameter Definition

i: vessel, i=1,2,…,I;t: time, t=1,2,…,Tr: the hourly interest rateg: the number of the gates, g=1,2,…,GQi: the volume of export containers to be loaded onto vessel iH: the gate processing rateA: the unit value of waiting time per truck per hourB: the unit cost of fuel consumption per truck per hourY: the total yard storage capacityAC: the hourly yard fee per containerVC: the average value of one container cargoERit: the estimated arrival time of vessel iELit: the estimated departure time of vessel iTl: the length of the time windowTk: the starting point of time window which shall not be earlier than the arrival time hoursWCOit: the cost of truck waiting and fuel consumption at time t of vessel iYCDit: the yard fee and the storage time cost of cargos at time t for vessel iPCt: the penalty for the insufficient yard space at time tfit: the number of truck arrivals for vessel i at time tfit′: the number of reallocated truck arrivals for vessel i at time tnt: the queue lengthχ¯t: the average waiting time of the trucksDit: the average storage time of the containers arriving at time t for vessel iTV: the value of the storage time per TEU cargo per hourOt: the occupied yard space at time tλit: the number of trucks arriving at the yard at time tdit: the number of trucks leaving gate g at time tAQit: the number of export containers of vessel iat time tMC: the handling charge per containerN: the number of time windows after divisionTLit=1,the time windows of timetand timeT−1overlap0,others;TFit=1,the starting point of the time window of theiis att0,others;TAit: starting point of time windowTBit: ending point of time window


## 3.3.2. Model Establishment

(1)minTC=W1+W2+W3=∑i∑tWCOit+∑i∑tYCDit+∑tPCt,(2)W1=∑i∑tWCOit=∑i∑tA+B×χ¯t×fit′,(3)W2=∑i∑tYCDit=∑i∑tTV+AC×Dit×fit′+N×MC,(4)W3=∑tPCt=999,999,whenOt>Y,0,whenOt≤Y.Regarding all the processes of the container in the terminal, the total cost of container in the terminal is the sum of the cost of external trucks, the cost generated in the yard, and the penalty cost of insufficient space in the yard. The arrival of the external truck should meet the time window constraints related to the vessels, and at the same time, it should ensure that the total cost of the container in the terminal is minimized. The objective function can be expressed by equation (1), where TC means the total cost of container in the terminal.Equation (2) is the total cost of the external trucks, including the waiting time of the external trucks and the cost of fuel consumption. Equation (3) is the cost of containerized cargo storage time, yard cost, and the cost of manpower and equipment for loading and unloading.Equation (4) is the penalty cost for insufficient space in the yard. Because of the outbreak, several vessels have not been able to pick up the containers in time, which has led to a backlog of several containers in the yard. In addition, as most countries are in a state of blockade, buyers have begun to cancel orders, leading to an increase in inventory and likely causing congestion. If the yard space is not available at time t, an operation halt will happen and all external trucks have to wait at container terminal until some storage space is released. Therefore, a penalty cost is set to avoid the fact that there is no storage space at the yard when the external truck arrives in the terminal, where Ot is the occupied yard space at time t and Y is the total yard storage capacity. When the occupied yard space at time t is greater than the total yard storage capacity, a larger penalty cost is set; when the occupied yard space at time t is less than the total yard storage capacity, the penalty cost is 0.We have(5)TBit−TAit=Tl,(6)TAit+Tk≥ERit,(7)TBit+6≤ERit,(8)Tl≥6,(9)TAit,TBitis the integer.Each vessel calling at the container terminal is assigned an external truck arrival time window. Equation (5) indicates that the length of the time window for container on the vessel is Tl. Equation (6) indicates that the starting time of time window should not be earlier than the arrival time of the vessel. Equation (7) indicates that the ending time of the time window should be more than 6 hours earlier than the arrival time of the vessel. Equation (8) indicates that the starting point of each time window should be at least 6 hours earlier than the ending point, which means that the minimum length of the time window is 6 hours. Equation (9) ensures that the starting and ending times for external trucks related to vessel are integers.(10)fit=Vii×∫cc+i/Liu0.291−u2.25du∫01u0.291−u2.25du,where,c=t−1−∑t=1t=Tt∗TSitLi,if,t∈∑t=1t=Tt∗TAit+1,∑t=1t=Tt∗TBit∀i,∀t,0,others,(11)fit′=fit+fit+24×7+fit−24×7,(12)nt=maxnt−1+∑ifit′−H,0,(13)χ¯t=nt+nt−12H,(14)λit=∑g=1Gdit,(15)Ot−1TLit+∑iQi≤Y,(16)Ot=Ot−1+∑iQiTFit−TLit,(17)Dit=ERit−t−χ¯t,(18)TV=VC×r,(19)AQit=EiTBit−TAit+1,∀i,t.Equations (10)–(13) are constraints at the gate. The truck arrivals can be estimated with equation (10), where fit is positive only when time t is within the time window i; otherwise, fit is 0. It is assumed that a terminal has the same vessels calling each week, so, for the vessel operation in the current week, if any workload is allocated to the former or the next week, then the same workload will be allocated back from the next or the former week [10]. Therefore, truck arrivals should be updated with equation (11). Equation (12) is the queue length of external trucks at the gate, and the queue length is measured by the number of trucks. Equation (13) calculates the average waiting time of external trucks at the gate.Equation (14) calculates the number of external trucks arriving at the yard at time t. Equation (15) ensures that the occupied yard space at time t should not exceed the total yard storage capacity in the container terminal. Equation (16) calculates the occupied yard space at time t. Equation (17) indicates the average storage time of the containers arriving at time t for vessel i. Equation (18) indicates the value of containerized external truck storage time and yard fee. Equation (19) calculates the number of containers related to vessel i arriving at the container terminal gate at time t.


## 3.4. Lower-Level Optimization Model

### 3.4.1. Parameter Definition

l: container, l=1,2,…,Lj: external truck, j=1,2,…,Jk: the service order of the arrival external truckS: the capacity of the time windowU: terminal working hoursM: unit time window stepTRit: the time when the gate actually started to process the task of the external truckTAit′: starting point of the adjusted time windowTBit′: ending point of the adjusted time windowZjt: the external truck j arrives at time tYit: handling the task of vessel i at time tC∂: adjustment cost∑j∈Jxlj=1,containerslare transported by external truckj0,others∑g∈Gzjg=1,external truckjis served by the gateg0,othershtg=1,the gategis working at timet0,othersyljt=1,generate time window adjustment0,others


### 3.4.2. Model Establishment

The goal of the lower-level model is to minimize the adjustment cost of time windows related to the vessels. The higher the priority of the task, the higher the corresponding adjustment cost. Try to adjust the lower priority tasks later to ensure that urgent tasks enter the container terminal first and realize the priority dispatch of urgent materials.(20)min∑t∈T∑j∈J∑l∈Lyljt⋅TBit−TAit−TBit′−TAit′N⋅C∂,subject to(21)∂1+∂2+∂3=1,(22)0<∂1<∂2<∂3<1.The task level is divided into I, II, and III, and the priority is a specific decimal, which is represented by∂1, ∂2, and ∂3. Equations (21) and (22) are used to define the priority of the task, and the task priority remains consistent throughout the container terminal operation. The higher the priority level, the greater the weight, and the sum of their addition is 1.(23)N=UM,(24)TRit∂3≤TRit∂2≤TRit∂1,(25)TAit′,TBit′⊂TAit,TBit,(26)TBitl−TAitl+1>0.Equation (23) is used to calculate the number of time windows after division. Equation (24) is used to ensure that the high-priority external truck enters the terminal earlier than the low-priority external truck. The higher the task level, the earlier the gate processing time. Equation (25) ensures that the adjusted time window is in the initial within the time window. Equation (26) is used to determine whether there is an overlap in the time window.(27)TAit≤TRit≤TBit,(28)∑j∈Jxlj=1,l∈L,(29)∑g∈Gzjg=1,(30)∑j∈Jygjk≤1,(31)htg≤Z,∀g∈G,t∈T.Equations (27)–(31) express the constraints related to the gate. Equation (27) guarantees that the time when the gate actually starts processing tasks is within the initial time window of the task. Equation (28) ensures that there is only one task for each external truck. Equation (29) ensures that each external truck is served by only one gate and can only be served once. Equation (30) indicates that one gate can handle at most one task at the same time. Equation (31) ensures that the number of external trucks entering the terminal at the same time does not exceed the total number of gates.(32)Zjt=Yit,∀i∈I,t∈T,j∈J,(33)TAit−TAit′≤2UN.Equation (32) means that the external trucks serving the same vessel enter the terminal at the same time window. Equation (33) indicates that the task adjustment range of the external trucks with overlapping time windows is within the interval of the two time windows.


## 3.4.1. Parameter Definition

l: container, l=1,2,…,Lj: external truck, j=1,2,…,Jk: the service order of the arrival external truckS: the capacity of the time windowU: terminal working hoursM: unit time window stepTRit: the time when the gate actually started to process the task of the external truckTAit′: starting point of the adjusted time windowTBit′: ending point of the adjusted time windowZjt: the external truck j arrives at time tYit: handling the task of vessel i at time tC∂: adjustment cost∑j∈Jxlj=1,containerslare transported by external truckj0,others∑g∈Gzjg=1,external truckjis served by the gateg0,othershtg=1,the gategis working at timet0,othersyljt=1,generate time window adjustment0,others


## 3.4.2. Model Establishment

The goal of the lower-level model is to minimize the adjustment cost of time windows related to the vessels. The higher the priority of the task, the higher the corresponding adjustment cost. Try to adjust the lower priority tasks later to ensure that urgent tasks enter the container terminal first and realize the priority dispatch of urgent materials.(20)min∑t∈T∑j∈J∑l∈Lyljt⋅TBit−TAit−TBit′−TAit′N⋅C∂,subject to(21)∂1+∂2+∂3=1,(22)0<∂1<∂2<∂3<1.The task level is divided into I, II, and III, and the priority is a specific decimal, which is represented by∂1, ∂2, and ∂3. Equations (21) and (22) are used to define the priority of the task, and the task priority remains consistent throughout the container terminal operation. The higher the priority level, the greater the weight, and the sum of their addition is 1.(23)N=UM,(24)TRit∂3≤TRit∂2≤TRit∂1,(25)TAit′,TBit′⊂TAit,TBit,(26)TBitl−TAitl+1>0.Equation (23) is used to calculate the number of time windows after division. Equation (24) is used to ensure that the high-priority external truck enters the terminal earlier than the low-priority external truck. The higher the task level, the earlier the gate processing time. Equation (25) ensures that the adjusted time window is in the initial within the time window. Equation (26) is used to determine whether there is an overlap in the time window.(27)TAit≤TRit≤TBit,(28)∑j∈Jxlj=1,l∈L,(29)∑g∈Gzjg=1,(30)∑j∈Jygjk≤1,(31)htg≤Z,∀g∈G,t∈T.Equations (27)–(31) express the constraints related to the gate. Equation (27) guarantees that the time when the gate actually starts processing tasks is within the initial time window of the task. Equation (28) ensures that there is only one task for each external truck. Equation (29) ensures that each external truck is served by only one gate and can only be served once. Equation (30) indicates that one gate can handle at most one task at the same time. Equation (31) ensures that the number of external trucks entering the terminal at the same time does not exceed the total number of gates.(32)Zjt=Yit,∀i∈I,t∈T,j∈J,(33)TAit−TAit′≤2UN.Equation (32) means that the external trucks serving the same vessel enter the terminal at the same time window. Equation (33) indicates that the task adjustment range of the external trucks with overlapping time windows is within the interval of the two time windows.


## 4. Chaotic Genetic Algorithm Based on Logistic Mapping (L-CGA)

### 4.1. The Introduction of Chaotic Genetic Algorithm Based on Logistic Mapping (L-CGA)

According to the characteristics of the model, this study introduces the logistic chaotic sequence into the genetic algorithm and generates a chaotic genetic algorithm based on the logistic mapping; it is more compatible with the model in this study.The difference between the genetic algorithm and chaotic genetic algorithm is that the former adopts the method of random search in the evolution process, whereas the latter uses a chaotic sequence to determine the location of crossover and mutation points, which is the coexistence of randomness and certainty, and is closer to the biological evolution model.The genetic algorithm has poor local search ability, long solution time, and low search efficiency; it is easy to fall into local convergence and chatter in the optimization process, resulting in premature convergence. The advantage of the chaotic genetic algorithm is that chaotic system is sensitive to initial conditions and has strong ergodicity, which greatly improves the optimization ability of the genetic algorithm.Introducing chaotic sequences into genetic algorithms can enhance the global search capability by using the randomness and ergodicity of chaos to construct chaotic operators. Chaotic sequence can ensure fast and simple generation and storage, and there is no need to store a long chaotic sequence. Logistic map is a simple one-dimensional map, but it has the characteristics and properties of all chaotic models. It has high efficiency, simple operation, and uniform solution. The expression of logistic chaotic sequence is(34)xn+1=fμ,xn=μxn1−xn,n=0,1,2,…,0<x0<1,0<μ≤4.The significance of the model is to show accurately the relationship between the fluctuation in the number of biological groups and the changes in the iterations. In the formula,n means the number of iterations, and xn+1 and xn are the elements before and after the iteration, respectively. When μ=4, it is completely chaotic.The specific content of the improvement of the chaotic genetic algorithm based on logistic mapping (L-CGA) is as follows.


#### 4.1.1. Crossover Operation

Based on improved crossover, the logistic chaotic sequence is used to determine the position of the crossover point, and, finally, the crossover item is crossed. Take a random initial value in the range of (0, 1), and then, use generate a chaotic value in the range of (0, 1), save the above chaotic value as the initial value of chaotic iteration for generating the next generation of cross terms, and the specific process is shown in Figure4. This single-point crossover changes the original solution very little, which can weaken and avoid the optimal chattering problem and improve the accuracy of algorithm convergence.Figure 4
Representation of crossover.


#### 4.1.2. Mutation Operation

Mutation is also a means to achieve group diversity and an important guarantee for jumping out of local optimal. The specific mutation operator in this study is designed as follows. According to the given mutation rate, the specific mutation takes the current gene value as the initial value and uses the chaotic sequence to perform an appropriate number of iterations to obtain the new gene value after the mutation, thereby obtaining a new chromosome. The specific process is shown in Figure5.Figure 5
Representation of mutation.


### 4.2. Implementation Procedure of Chaotic Genetic Algorithm Based on Logistic Mapping

Figure6 shows the implementation procedure of the chaotic genetic algorithm based on logistic mapping. In this study, the chaotic genetic algorithm based on logistic mapping (L-CGA) is conducted with the following steps:(1)
Coding method and population initialization: the chromosome is composed of the start and end points of the time window, and each is coded by integer number. The chromosome can be represented asTA1t,TA2t,…,TAIt,TB1t,TB2t,…,TBIt. This study adopts the approach of initializing individuals randomly under the constraints of equations (5)–(9), ensuring that every individual is feasible.(2)
Fitness evaluation: the fitness value is the reciprocal value of the total cost of external trucks in the terminal(3)
Select: to select a parent, a roulette wheel approach is applied. The highest fitness individual of current population is retained to the next generation to ensure that the final outcome of L-CGA is the highest fitness individual of all generations.(35)Pi=fi∑i=1Mfi,where
fi is the individual fitness value and Pi is the probability of being selected.(4)
Crossover①
Control the frequency of crossover operation and decide on crossover. Use single-point crossover and preset the crossover probability. Any initial value will be used as a criterion, if crossover probability is less than this value, the crossover operation can be performed; otherwise, it will not crossover. Liu et al. [22] pointed out in the study that a large number of experiments show that when crossover probability is set to 0.9, the performance of the chaotic genetic algorithm is the best.②
The logistic chaotic sequence determines the location of the crossover. Consider a long chromosome withL position, randomly select a number in the interval (0, 1) as the initial value, and use the logistic model to generate a chaotic sequence in the interval (0, 1). Use the formula to map the sequence to the chromosome, so that the crossover operation occurs at this position to form a new offspring; only parts of the genes are updated, so the changes are small to avoid optimal chattering.(5)
Mutation operation①
Control the frequency of mutation operation, randomly select the mutation probability, and set it in advance. The mutation probability is set as 0.1 [22].②
The logistic chaotic sequence determines the mutation pointFigure 6
Implementation procedure of the chaotic genetic algorithm based on logistic mapping.


## 4.1. The Introduction of Chaotic Genetic Algorithm Based on Logistic Mapping (L-CGA)

According to the characteristics of the model, this study introduces the logistic chaotic sequence into the genetic algorithm and generates a chaotic genetic algorithm based on the logistic mapping; it is more compatible with the model in this study.The difference between the genetic algorithm and chaotic genetic algorithm is that the former adopts the method of random search in the evolution process, whereas the latter uses a chaotic sequence to determine the location of crossover and mutation points, which is the coexistence of randomness and certainty, and is closer to the biological evolution model.The genetic algorithm has poor local search ability, long solution time, and low search efficiency; it is easy to fall into local convergence and chatter in the optimization process, resulting in premature convergence. The advantage of the chaotic genetic algorithm is that chaotic system is sensitive to initial conditions and has strong ergodicity, which greatly improves the optimization ability of the genetic algorithm.Introducing chaotic sequences into genetic algorithms can enhance the global search capability by using the randomness and ergodicity of chaos to construct chaotic operators. Chaotic sequence can ensure fast and simple generation and storage, and there is no need to store a long chaotic sequence. Logistic map is a simple one-dimensional map, but it has the characteristics and properties of all chaotic models. It has high efficiency, simple operation, and uniform solution. The expression of logistic chaotic sequence is(34)xn+1=fμ,xn=μxn1−xn,n=0,1,2,…,0<x0<1,0<μ≤4.The significance of the model is to show accurately the relationship between the fluctuation in the number of biological groups and the changes in the iterations. In the formula,n means the number of iterations, and xn+1 and xn are the elements before and after the iteration, respectively. When μ=4, it is completely chaotic.The specific content of the improvement of the chaotic genetic algorithm based on logistic mapping (L-CGA) is as follows.


### 4.1.1. Crossover Operation

Based on improved crossover, the logistic chaotic sequence is used to determine the position of the crossover point, and, finally, the crossover item is crossed. Take a random initial value in the range of (0, 1), and then, use generate a chaotic value in the range of (0, 1), save the above chaotic value as the initial value of chaotic iteration for generating the next generation of cross terms, and the specific process is shown in Figure4. This single-point crossover changes the original solution very little, which can weaken and avoid the optimal chattering problem and improve the accuracy of algorithm convergence.Figure 4
Representation of crossover.


### 4.1.2. Mutation Operation

Mutation is also a means to achieve group diversity and an important guarantee for jumping out of local optimal. The specific mutation operator in this study is designed as follows. According to the given mutation rate, the specific mutation takes the current gene value as the initial value and uses the chaotic sequence to perform an appropriate number of iterations to obtain the new gene value after the mutation, thereby obtaining a new chromosome. The specific process is shown in Figure5.Figure 5
Representation of mutation.


## 4.1.1. Crossover Operation

Based on improved crossover, the logistic chaotic sequence is used to determine the position of the crossover point, and, finally, the crossover item is crossed. Take a random initial value in the range of (0, 1), and then, use generate a chaotic value in the range of (0, 1), save the above chaotic value as the initial value of chaotic iteration for generating the next generation of cross terms, and the specific process is shown in Figure4. This single-point crossover changes the original solution very little, which can weaken and avoid the optimal chattering problem and improve the accuracy of algorithm convergence.Figure 4
Representation of crossover.


## 4.1.2. Mutation Operation

Mutation is also a means to achieve group diversity and an important guarantee for jumping out of local optimal. The specific mutation operator in this study is designed as follows. According to the given mutation rate, the specific mutation takes the current gene value as the initial value and uses the chaotic sequence to perform an appropriate number of iterations to obtain the new gene value after the mutation, thereby obtaining a new chromosome. The specific process is shown in Figure5.Figure 5
Representation of mutation.


## 4.2. Implementation Procedure of Chaotic Genetic Algorithm Based on Logistic Mapping

Figure6 shows the implementation procedure of the chaotic genetic algorithm based on logistic mapping. In this study, the chaotic genetic algorithm based on logistic mapping (L-CGA) is conducted with the following steps:(1)
Coding method and population initialization: the chromosome is composed of the start and end points of the time window, and each is coded by integer number. The chromosome can be represented asTA1t,TA2t,…,TAIt,TB1t,TB2t,…,TBIt. This study adopts the approach of initializing individuals randomly under the constraints of equations (5)–(9), ensuring that every individual is feasible.(2)
Fitness evaluation: the fitness value is the reciprocal value of the total cost of external trucks in the terminal(3)
Select: to select a parent, a roulette wheel approach is applied. The highest fitness individual of current population is retained to the next generation to ensure that the final outcome of L-CGA is the highest fitness individual of all generations.(35)Pi=fi∑i=1Mfi,where
fi is the individual fitness value and Pi is the probability of being selected.(4)
Crossover①
Control the frequency of crossover operation and decide on crossover. Use single-point crossover and preset the crossover probability. Any initial value will be used as a criterion, if crossover probability is less than this value, the crossover operation can be performed; otherwise, it will not crossover. Liu et al. [22] pointed out in the study that a large number of experiments show that when crossover probability is set to 0.9, the performance of the chaotic genetic algorithm is the best.②
The logistic chaotic sequence determines the location of the crossover. Consider a long chromosome withL position, randomly select a number in the interval (0, 1) as the initial value, and use the logistic model to generate a chaotic sequence in the interval (0, 1). Use the formula to map the sequence to the chromosome, so that the crossover operation occurs at this position to form a new offspring; only parts of the genes are updated, so the changes are small to avoid optimal chattering.(5)
Mutation operation①
Control the frequency of mutation operation, randomly select the mutation probability, and set it in advance. The mutation probability is set as 0.1 [22].②
The logistic chaotic sequence determines the mutation pointFigure 6
Implementation procedure of the chaotic genetic algorithm based on logistic mapping.


## 5. Numerical Experiment and Result Analysis

### 5.1. Case Description

The proposed model is applied to actual data prediction. The cycle is one week, including weekly vessel berthing plans, relevant container, and external trucks information. Figure7 shows the operation process of the external trucks in the terminal. Taking 30 vessels docked within 7 days as an example, the total number of tasks is 1200; the arrival and departure time, terminal system data, and cost data of these vessels are collected to verify the proposed optimization model [8].Figure 7
Operation process of external trucks.


### 5.2. Parameter Value

Other input variables and input values as well as estimated times of arrival and departure of vessels are given in Tables1 and 2, respectively.Table 1
Input variables and input values.
Input variableInput valueDiesel idling fuel consumption3.8 l/hPrice of fuel6 yuan/lTime value of truck/driver waiting40 yuan/hAverage value of container cargo184,000 yuan/TEUThe rate of interest5%/yearThe gate processing rate40 trucks/hThe minimum length of time window6 hNumber of gate lanes4Table 2
Estimated times of arrival and departure of vessels.
Vessel no.Estimated arrival timeEstimated departure time1Tuesday 4:00Tuesday 18:002Tuesday 8:00Tuesday 23:003Tuesday 16:00Wednesday 7:004Tuesday 22:00Wednesday 21:005Tuesday 23:00Wednesday 8:006Wednesday 5:00Wednesday 15:007Wednesday 9:00Wednesday 23:008Wednesday 15:00Thursday 7:009Wednesday 16:00Thursday 1:0010Wednesday 17:00Thursday 7:0011Wednesday 20:00Thursday 9:0012Thursday 1:00Thursday 13:0013Thursday 2:00Thursday 18:0014Thursday 5:00Thursday 17:0015Thursday 13:00Friday 0:0016Thursday 16:00Friday 2:0017Thursday 20:00Friday 16:0018Thursday 22:00Friday 19:0019Friday 0:00Friday 11:0020Friday 3:00Friday 21:0021Friday 22:00Saturday 13:0022Saturday 2:00Saturday 16:0023Saturday 8:00Saturday 23:0024Saturday 19:00Sunday 11:0025Saturday 20:00Sunday 6:0026Saturday 21:00Sunday 9:0027Saturday 22:00Sunday 14:0028Sunday 0:00Sunday 9:0029Sunday 2:00Sunday 23:0030Sunday 12:00Sunday 22:00


### 5.3. Result Analysis

A simulation experiment was conducted in MATLAB 2018b to test the applicability of the adopted bilevel optimization model for the priority dispatch of emergency materials in terminals and the proposed the chaotic genetic algorithm based on logistic mapping (L-CGA). The number of iterations was determined by attempting some pilot calculations. The L-CGA convergence is normally finalized at 60–70 generations; therefore, 200 iterations should be sufficient. The experimental results were as follows.Figure8 shows the convergence process of the population optimal values of the genetic algorithm, adaptive genetic algorithm, and chaotic genetic algorithm based on logistic mapping. The population optimal value of L-CGA reaches convergence in 70 generations. Figure 9 shows the comparison of the solution time of the three algorithms, and Figure 10 shows the comparison of the solution results. According to the data, the cost of per container is 134.08 yuan/TEU in the Nanjing Port Longtan Container Co., Ltd.; in this study, the total cost is 1.97E + 06, and the cost of per container is 82.06 yuan/TEU. It can be seen that the optimized chaotic genetic algorithm has faster solving speed and better results. In summary, L-CGA has a faster convergence rate, converges to the best solution, maintains population diversity, and enhances the global convergence of genetic algorithms. Therefore, L-CGA was chosen for solving the problem.Figure 8
Convergence curve.Figure 9
Comparison of solution times of different algorithms.Figure 10
Comparison of the solution results of different algorithms.Tables3 and 4 provide the task time window of the external trucks related to the vessel, where TA is the starting point of the time window, TB is the ending point of the time window, and the tables provide the specific operation time windows of all tasks.Table 3
Time windows’ starting point of external trucks related to vessels.
TA (hours)123456789101112131415161718192021222324252627282930Tasks 1–3071419292837354440525059585373767780777598103109122122129127122122139Tasks 31–60141025332633454349505160516170657770837698107111120124126127132133144Tasks 61–9061224233530354651505054566167687382817910498105118124119122120125141Tasks 91–1201216183025394042464154495065687473817287106104116122125125130128134139Tasks 121–150811223035293350524453536153666980747879100100111117118125118120122133Tasks 151–18015818273530434143515456565670706978808494101104124128126121124122135Tasks 181–210162028332829354445505650565566747279837998110109120116124126132129134Tasks 211–24081819242430454740504751625669677477787795106115121122124126126133142Tasks 241–270121926253529404751485354545561707778758710098109115127120120129129140Tasks 271–300121423303431334245484858515869757574748497105116118122122125131131143Tasks 301–3301117172228323748414950596061647371728184105110107124122119118122126132Tasks 331–3601620283225393449435145555665707369768487102102114117120121118132131143Tasks 361–39071325303531414643484461555967757680777997107114119125127126126131142Tasks 391–420121118312433454245464749556362767575767598109106117128129123129122135Tasks 421–4501614232534403543414855555955646968788477101105107122126118118130126142Tasks 451–48091521243232404145435254576363747977848399101116119116129129125126134Tasks 481–510129202530363548414250556054647072747976105100106116128121129131127140Tasks 511–5401020282431374045525144506156726973727682105104113125126127125127134137Tasks 541–5701416162228383547514848515465676876767975104108107123121123130121124143Tasks 571–6001218212524334150404946525260697370818177100108113117124120130126133134Tasks 601–630101223302632455042414760515667736973847999110113123121128126130124132Tasks 631–6601019172325333851475346556259737268727984102105107116125128122121122135Tasks 661–690514232728393548475350506264696975798280104109109121122121130131130137Tasks 691–720816262928344547435148586263717573727277106105105125125128130129133138Tasks 721–75016102433344033454146505856576172747878859999106122124118126129130132Tasks 751–780141128262641454751535053516463767270808410099107123127119118123134144Tasks 781–81081820283132375148444552606567767875808797101105122128129127121131143Tasks 811–840161528342441453940524957516173727674798294107107121124118124125123143Tasks 841–87061627262631393951475551506173748070818496100109126128126129126124139Tasks 871–900161319292335394144415352546464647371818696104104123116118129128127143Tasks 901–9301316283326343846415155585464727273768185106102112125123118126120127140Tasks 931–96041719243235454542524653625873757873837699101116126122127124127132140Tasks 961–9901318183228404445505244525755677472718378103100116118116127126130133144Tasks 991–102016820302530414545485257595565667273778196109114116121127118128125141Tasks 1021–1050152019272536394748494653525372676975767910499104127121125125126123143Tasks 1051–108099242430343339494546546064647279787378105107108122127122122126131139Tasks 1081–11101312272430293542504446525254737269708078106105106122117124118127128133Tasks 1111–1140616282630334043494146525054696879768175101109111122126123120126126139Tasks 1141–11709112633353640425144485862556374808181879799107120118124128132125144Tasks 1171–120071822313333434747435450585961757082788199110111117123129129132129136Table 4
Time windows’ ending point of external trucks related to vessels.
TB (hours)123456789101112131415161718192021222324252627282930Tasks 1–301324263941444854535957666468798283868791109109115133131135135133139149Tasks 31–602121334034475152575657665868777984769084105114121132133135135138140150Tasks 61–901419303241364152575660646668777679889092111105113130133131133132140148Tasks 91–1202023323931474849545661616071768282879093112110122131131133136134140147Tasks 121–1501526343941384256585259596859757886858589107112120123127135134136139144Tasks 151–1802114273941444950525860646270777785878891107116112132134132130135135148Tasks 181–2102226343937414656575962596571748282878985104116122128131130133138135143Tasks 211–2401924323638395154585855656869777683838785102113121131128132133133139148Tasks 241–2701926333641415155575860666064687684888393112115121127133135131138139149Tasks 271–3001823323740474950555758646366798283878591108115122132134131133137138149Tasks 301–3302226273340474554485558676771788181868793112116120130133126134132138146Tasks 331–3602226343840465157545758676771787981839093112114120129127132132138137149Tasks 361–3901820343741464854495455676168798286888593105115120128134135134137137149Tasks 391–4201820303738445154535361596169748281868692105116112129134135136138139144Tasks 421–4502226303141474857505861616564708274879090112114121133134133129138140150Tasks 451–4801623333440444852535261606869778185869093109111122129132135136131139149Tasks 481–5102124273641455055585861636668787779888785111109120130134129136138137149Tasks 511–5402226343437455152585958586862788184888389112112119131133133135134140148Tasks 541–5702026304037444657585560586371767883888883112114113130127135136135131150Tasks 571–6002025343730475056575952656171768077888783109115121128132133136138139144Tasks 601–6302123313741415157565156676263768275799092112116121133133135132138136144Tasks 631–6601726243834434657555959616869797878798590108113122128132135128135133144Tasks 661–6901222333841454454555959646870797783888987112115122127128129136138140149Tasks 691–7201926323934435156505862646870778285868584112113119132131134136136140149Tasks 721–7502216323940474751485961646463737981888792111114115131133133136135137142Tasks 751–7802217343733475155585958645770718282878990108107118133134135128133140150Tasks 781–8101926284040384557555757666771788284888893109111112132134135133135138150Tasks 811–8402221344039475147485858666371798286858592107115121131131132133138131150Tasks 841–8702126343737404946585962646371798186869093108114116133134133135132135149Tasks 871–9002222323531415048505662626071787984869092107115110132130135136135134150Tasks 901–9302226343935414656505962666270798082869091112111122133132130135126140148Tasks 931–9601125273639425156495953656866798184859090109115122133131135130133138147Tasks 961–9902224243939465055585960656471788080778984110110122126132134132138140150Tasks 991–10202221333635374855575762656770788078819090107115121126132133129135132150Tasks 1021–10502126303339454956545858666869787877888392111111119133131133135134133150Tasks 1051–10801721333141444346575960656870767986848791112113118131134133128132137145Tasks 1081–11102122343139445055565852605863797884889093112111120130126132134134138145Tasks 1111–11402123343337434755585460606463777486888991110116118130134134135138140148Tasks 1141–11701519323941444849575754646862698086888893112109122133131133134138134150Tasks 1171–12001326293841435055535760646566788280888490108116122128131135135138140149Figure11 shows the comparison of the truck arrivals in the real and optimized cases. The real solution generates a very high arrival peak in the middle of the week, which substantially exceeds the gate capacity. The result shows that using the optimized arrival patterns of external trucks can reduce the regularity of the truck arrivals and flatten the peaks of hourly truck arrivals.Figure 11
The truck arrivals in the real and optimized cases.Tables5 and 6 provide the operating time window of the external trucks after considering the priority dispatch of emergency materials, which is the optimal plan for priority dispatch of emergency materials.Table 5
The time windows’ starting point of the external trucks after considering the priority dispatch of emergency materials.
TA (hours)123456789101112131415161718192021222324252627282930Tasks 1–301118263025324145505151495664727368757776102108113121116125119122125141Tasks 31–60713262435383448445248535261646874808086104101116118127119130128131144Tasks 61–9014172834263844455251476055607271768182859899105122125119130122125140Tasks 91–12052026272534354851415452566462696970728095109116116127123123122123138Tasks 121–15061428323140454047495550606271707278827796101114119128127126132134138Tasks 151–180815243235393640445249535053647578787275104106112126120122122125131135Tasks 181–2101512182526384040414948555857657679728485102105113120117117126122125138Tasks 211–2408162032324045414949505361546269718276779599110118125128119125133138Tasks 241–2701320172423303949484548575764686978717582106110111124122127123125122143Tasks 271–300139163030354548494956585665627370737787106100107116121119125126132135Tasks 301–3301215222533374245444648536253697268717585100110109127122119129126130139Tasks 331–3601120163233393947474552515464677674778382104109116121120118130123127136Tasks 361–390151225222540334349474959535873697675838596108109117123118124126122137Tasks 391–420161916292729384742444460615468737678817898101105115120128122131133134Tasks 421–45051517302741434740524954555766677681778194104116116120127122121130134Tasks 451–4806918242640335049445353596267716982737799103109118120124118132131135Tasks 481–5101113272326393843474149585157717375717582104104116127125128124121130142Tasks 511–5401520202324354148475152615156737675817486105103113126123129130121126133Tasks 541–570132028332935374945514659566461717170748697105107118127129122128128137Tasks 571–60016928343438364152534550575665677481798010699105119120119122120128138Tasks 601–63072016243333444846514660525471706881758597101115124121124120124130133Tasks 631–660410203423404245525352525053717477717476106100114125126122127123128142Tasks 661–6901415263128333441444548535160656479787685103107110116123126127121131138Tasks 691–72011923223335375150465158586168717170837999110116118118125119129125143Tasks 721–750716262227383848424653535259716671718487101106109122128124118125127143Tasks 751–780161520333237344246435149595965647473767796110106118124128125132128134Tasks 781–81041925342730364947444650525573657776818097109109115120121125128124141Tasks 811–8401017213130344547494355586257737275797285102102104119125120126128123136Tasks 841–87041428232632344849485553526369728078787995109109118116128124129133140Tasks 871–900152022282632354641514960615362667880728699106114116128123130124122139Tasks 901–930415193323354440435346595661697675787779106110113120119122128127122144Tasks 931–960141920332539374351445456576172677776788597103114116122117121120124136Tasks 961–990108173234293748514745595564666969757478101108110117121120123121131139Tasks 991–102081825232834414845524954535865657877738798100107124125120120127124133Tasks 1021–1050918242426323548474944496155736470707376103109108122117126130125128141Tasks 1051–10801318282534314345405252595254616579748281105105105125126128125122129140Tasks 1081–1110161320293435394150475261576071717772827796110109120117129127124132135Tasks 1111–114071625302832425141475154616371717381778598101116122118128129125124133Tasks 1141–1170161021342340384550434659556264687774738395105109122128119127128128137Tasks 1171–1200121727262940334448454957566061667382848099102109117119119126126124134Table 6
The time windows’ ending point of the external trucks after considering the priority dispatch of emergency materials.
TB (hours)123456789101112131415161718192021222324252627282930Tasks 1–302124334033405153565762576571797984818593109116119130133134136135133150Tasks 31–601821333541454554525954646771787584888993112110122128133125136134137150Tasks 61–902124344038455055585762666169788185879093109108121130134129136133132149Tasks 91–1201726334035444357574962676270787575768593106115122132133129132130139150Tasks 121–1501624343840475157545662676871798078888990112115120128134135132138140145Tasks 151–1801621344041455148565858665870718186868485112112122132134134132131138150Tasks 181–2102220264034455055555761636769798285799091110111121127129124133136140149Tasks 211–2401726323838475157575658636764717779889089101108121131134135130138140148Tasks 241–2701926273731444855555562646771788186828688112116122131130134131135137149Tasks 271–3002226243639475154575662676271707983888793112115118129128134132136140146Tasks 301–3302123344041474852555462676868788086819092109116120133133133136136139146Tasks 331–3602026334041475156535659606470748280859093110116122127128135136138134145Tasks 361–3902126314035474156555355675966797786878992102114115125132129132132137150Tasks 391–4202225303736384454575151676860758086878890104116120124130134135138140140Tasks 421–4501721293834474957555956606371757786888488111112122123128133134131136141Tasks 451–4801823283241475057565159636870738077887987106115120133128132133138140144Tasks 481–5101919333439464451575760676571787986808191111116122133133135130138136149Tasks 511–5402226313537464854545862676069798286879092111109122132130135136137140148Tasks 541–5701926343935445155525860656270748077858693110113117124134135136138140150Tasks 571–6002224344041474255585958636870777784888686112111114131126132130131135149Tasks 601–6301926343540415056585962665970797778888993109111122132127132130132138144Tasks 631–6601425284033475154585961616462798286818485112106120132134130136129136150Tasks 661–6902126333941444754585957605766717285868692112114117123130134133130137150Tasks 691–7202021333839474857585361666771768281779086112116122129128134136136138149Tasks 721–7501324323034475155485560655970787680849093108116116128134135132138139150Tasks 751–7802225344041444756585159616768727183818984102116121127133134133138136147Tasks 781–8102225324041434757555953596669797886869086112115119127127134132134137149Tasks 811–8401626274038445153585961656870797986858693110115121126133131136136140149Tasks 841–8701721343036434156555661596169777986878990104115120129122134136138139150Tasks 871–9002226284032454754555960666765748286868693106114122122134131136131140146Tasks 901–9301121263939475146525959676370778285848490112116119132128131136138136150Tasks 931–9602126263936464854575261646367787485848892107112120132129134132127136145Tasks 961–9902219313940475154585956666371747576878386108116122131134129133132140147Tasks 991–10201826343036414855575961636864717286848893105114115131132135131134130141Tasks 1021–10501824303541394455575955646866798182768286111116121131126133136131140150Tasks 1051–10801925343941424951565962676360697985888888111115113133134134136131138148Tasks 1081–11102222324040434754575960676667798183808884108116120126126135136135139149Tasks 1111–11401426313634405157585662626770777883878892108112122132124134135138139149Tasks 1141–11702219274033474657575556666370708285878489105114117131134128134135140149Tasks 1171–12002125333341464852545861646267747486889088106116115131129127135136136141Figure12 shows the optimized arrival time windows of the external trucks. The blue rectangles are the time windows before optimization, and the green parts are the time windows after optimization. It can be seen that the overlaps of the time windows are significantly reduced from 468 hours to 157 hours, a decrease of about 66.45%. At the same time, the total task time windows have been reduced from 612 hours to 266 hours, a decrease of 56.54%.Figure 12
The optimized arrival time windows of the external trucks.


## 5.1. Case Description

The proposed model is applied to actual data prediction. The cycle is one week, including weekly vessel berthing plans, relevant container, and external trucks information. Figure7 shows the operation process of the external trucks in the terminal. Taking 30 vessels docked within 7 days as an example, the total number of tasks is 1200; the arrival and departure time, terminal system data, and cost data of these vessels are collected to verify the proposed optimization model [8].Figure 7
Operation process of external trucks.


## 5.2. Parameter Value

Other input variables and input values as well as estimated times of arrival and departure of vessels are given in Tables1 and 2, respectively.Table 1
Input variables and input values.
Input variableInput valueDiesel idling fuel consumption3.8 l/hPrice of fuel6 yuan/lTime value of truck/driver waiting40 yuan/hAverage value of container cargo184,000 yuan/TEUThe rate of interest5%/yearThe gate processing rate40 trucks/hThe minimum length of time window6 hNumber of gate lanes4Table 2
Estimated times of arrival and departure of vessels.
Vessel no.Estimated arrival timeEstimated departure time1Tuesday 4:00Tuesday 18:002Tuesday 8:00Tuesday 23:003Tuesday 16:00Wednesday 7:004Tuesday 22:00Wednesday 21:005Tuesday 23:00Wednesday 8:006Wednesday 5:00Wednesday 15:007Wednesday 9:00Wednesday 23:008Wednesday 15:00Thursday 7:009Wednesday 16:00Thursday 1:0010Wednesday 17:00Thursday 7:0011Wednesday 20:00Thursday 9:0012Thursday 1:00Thursday 13:0013Thursday 2:00Thursday 18:0014Thursday 5:00Thursday 17:0015Thursday 13:00Friday 0:0016Thursday 16:00Friday 2:0017Thursday 20:00Friday 16:0018Thursday 22:00Friday 19:0019Friday 0:00Friday 11:0020Friday 3:00Friday 21:0021Friday 22:00Saturday 13:0022Saturday 2:00Saturday 16:0023Saturday 8:00Saturday 23:0024Saturday 19:00Sunday 11:0025Saturday 20:00Sunday 6:0026Saturday 21:00Sunday 9:0027Saturday 22:00Sunday 14:0028Sunday 0:00Sunday 9:0029Sunday 2:00Sunday 23:0030Sunday 12:00Sunday 22:00


## 5.3. Result Analysis

A simulation experiment was conducted in MATLAB 2018b to test the applicability of the adopted bilevel optimization model for the priority dispatch of emergency materials in terminals and the proposed the chaotic genetic algorithm based on logistic mapping (L-CGA). The number of iterations was determined by attempting some pilot calculations. The L-CGA convergence is normally finalized at 60–70 generations; therefore, 200 iterations should be sufficient. The experimental results were as follows.Figure8 shows the convergence process of the population optimal values of the genetic algorithm, adaptive genetic algorithm, and chaotic genetic algorithm based on logistic mapping. The population optimal value of L-CGA reaches convergence in 70 generations. Figure 9 shows the comparison of the solution time of the three algorithms, and Figure 10 shows the comparison of the solution results. According to the data, the cost of per container is 134.08 yuan/TEU in the Nanjing Port Longtan Container Co., Ltd.; in this study, the total cost is 1.97E + 06, and the cost of per container is 82.06 yuan/TEU. It can be seen that the optimized chaotic genetic algorithm has faster solving speed and better results. In summary, L-CGA has a faster convergence rate, converges to the best solution, maintains population diversity, and enhances the global convergence of genetic algorithms. Therefore, L-CGA was chosen for solving the problem.Figure 8
Convergence curve.Figure 9
Comparison of solution times of different algorithms.Figure 10
Comparison of the solution results of different algorithms.Tables3 and 4 provide the task time window of the external trucks related to the vessel, where TA is the starting point of the time window, TB is the ending point of the time window, and the tables provide the specific operation time windows of all tasks.Table 3
Time windows’ starting point of external trucks related to vessels.
TA (hours)123456789101112131415161718192021222324252627282930Tasks 1–3071419292837354440525059585373767780777598103109122122129127122122139Tasks 31–60141025332633454349505160516170657770837698107111120124126127132133144Tasks 61–9061224233530354651505054566167687382817910498105118124119122120125141Tasks 91–1201216183025394042464154495065687473817287106104116122125125130128134139Tasks 121–150811223035293350524453536153666980747879100100111117118125118120122133Tasks 151–18015818273530434143515456565670706978808494101104124128126121124122135Tasks 181–210162028332829354445505650565566747279837998110109120116124126132129134Tasks 211–24081819242430454740504751625669677477787795106115121122124126126133142Tasks 241–270121926253529404751485354545561707778758710098109115127120120129129140Tasks 271–300121423303431334245484858515869757574748497105116118122122125131131143Tasks 301–3301117172228323748414950596061647371728184105110107124122119118122126132Tasks 331–3601620283225393449435145555665707369768487102102114117120121118132131143Tasks 361–39071325303531414643484461555967757680777997107114119125127126126131142Tasks 391–420121118312433454245464749556362767575767598109106117128129123129122135Tasks 421–4501614232534403543414855555955646968788477101105107122126118118130126142Tasks 451–48091521243232404145435254576363747977848399101116119116129129125126134Tasks 481–510129202530363548414250556054647072747976105100106116128121129131127140Tasks 511–5401020282431374045525144506156726973727682105104113125126127125127134137Tasks 541–5701416162228383547514848515465676876767975104108107123121123130121124143Tasks 571–6001218212524334150404946525260697370818177100108113117124120130126133134Tasks 601–630101223302632455042414760515667736973847999110113123121128126130124132Tasks 631–6601019172325333851475346556259737268727984102105107116125128122121122135Tasks 661–690514232728393548475350506264696975798280104109109121122121130131130137Tasks 691–720816262928344547435148586263717573727277106105105125125128130129133138Tasks 721–75016102433344033454146505856576172747878859999106122124118126129130132Tasks 751–780141128262641454751535053516463767270808410099107123127119118123134144Tasks 781–81081820283132375148444552606567767875808797101105122128129127121131143Tasks 811–840161528342441453940524957516173727674798294107107121124118124125123143Tasks 841–87061627262631393951475551506173748070818496100109126128126129126124139Tasks 871–900161319292335394144415352546464647371818696104104123116118129128127143Tasks 901–9301316283326343846415155585464727273768185106102112125123118126120127140Tasks 931–96041719243235454542524653625873757873837699101116126122127124127132140Tasks 961–9901318183228404445505244525755677472718378103100116118116127126130133144Tasks 991–102016820302530414545485257595565667273778196109114116121127118128125141Tasks 1021–1050152019272536394748494653525372676975767910499104127121125125126123143Tasks 1051–108099242430343339494546546064647279787378105107108122127122122126131139Tasks 1081–11101312272430293542504446525254737269708078106105106122117124118127128133Tasks 1111–1140616282630334043494146525054696879768175101109111122126123120126126139Tasks 1141–11709112633353640425144485862556374808181879799107120118124128132125144Tasks 1171–120071822313333434747435450585961757082788199110111117123129129132129136Table 4
Time windows’ ending point of external trucks related to vessels.
TB (hours)123456789101112131415161718192021222324252627282930Tasks 1–301324263941444854535957666468798283868791109109115133131135135133139149Tasks 31–602121334034475152575657665868777984769084105114121132133135135138140150Tasks 61–901419303241364152575660646668777679889092111105113130133131133132140148Tasks 91–1202023323931474849545661616071768282879093112110122131131133136134140147Tasks 121–1501526343941384256585259596859757886858589107112120123127135134136139144Tasks 151–1802114273941444950525860646270777785878891107116112132134132130135135148Tasks 181–2102226343937414656575962596571748282878985104116122128131130133138135143Tasks 211–2401924323638395154585855656869777683838785102113121131128132133133139148Tasks 241–2701926333641415155575860666064687684888393112115121127133135131138139149Tasks 271–3001823323740474950555758646366798283878591108115122132134131133137138149Tasks 301–3302226273340474554485558676771788181868793112116120130133126134132138146Tasks 331–3602226343840465157545758676771787981839093112114120129127132132138137149Tasks 361–3901820343741464854495455676168798286888593105115120128134135134137137149Tasks 391–4201820303738445154535361596169748281868692105116112129134135136138139144Tasks 421–4502226303141474857505861616564708274879090112114121133134133129138140150Tasks 451–4801623333440444852535261606869778185869093109111122129132135136131139149Tasks 481–5102124273641455055585861636668787779888785111109120130134129136138137149Tasks 511–5402226343437455152585958586862788184888389112112119131133133135134140148Tasks 541–5702026304037444657585560586371767883888883112114113130127135136135131150Tasks 571–6002025343730475056575952656171768077888783109115121128132133136138139144Tasks 601–6302123313741415157565156676263768275799092112116121133133135132138136144Tasks 631–6601726243834434657555959616869797878798590108113122128132135128135133144Tasks 661–6901222333841454454555959646870797783888987112115122127128129136138140149Tasks 691–7201926323934435156505862646870778285868584112113119132131134136136140149Tasks 721–7502216323940474751485961646463737981888792111114115131133133136135137142Tasks 751–7802217343733475155585958645770718282878990108107118133134135128133140150Tasks 781–8101926284040384557555757666771788284888893109111112132134135133135138150Tasks 811–8402221344039475147485858666371798286858592107115121131131132133138131150Tasks 841–8702126343737404946585962646371798186869093108114116133134133135132135149Tasks 871–9002222323531415048505662626071787984869092107115110132130135136135134150Tasks 901–9302226343935414656505962666270798082869091112111122133132130135126140148Tasks 931–9601125273639425156495953656866798184859090109115122133131135130133138147Tasks 961–9902224243939465055585960656471788080778984110110122126132134132138140150Tasks 991–10202221333635374855575762656770788078819090107115121126132133129135132150Tasks 1021–10502126303339454956545858666869787877888392111111119133131133135134133150Tasks 1051–10801721333141444346575960656870767986848791112113118131134133128132137145Tasks 1081–11102122343139445055565852605863797884889093112111120130126132134134138145Tasks 1111–11402123343337434755585460606463777486888991110116118130134134135138140148Tasks 1141–11701519323941444849575754646862698086888893112109122133131133134138134150Tasks 1171–12001326293841435055535760646566788280888490108116122128131135135138140149Figure11 shows the comparison of the truck arrivals in the real and optimized cases. The real solution generates a very high arrival peak in the middle of the week, which substantially exceeds the gate capacity. The result shows that using the optimized arrival patterns of external trucks can reduce the regularity of the truck arrivals and flatten the peaks of hourly truck arrivals.Figure 11
The truck arrivals in the real and optimized cases.Tables5 and 6 provide the operating time window of the external trucks after considering the priority dispatch of emergency materials, which is the optimal plan for priority dispatch of emergency materials.Table 5
The time windows’ starting point of the external trucks after considering the priority dispatch of emergency materials.
TA (hours)123456789101112131415161718192021222324252627282930Tasks 1–301118263025324145505151495664727368757776102108113121116125119122125141Tasks 31–60713262435383448445248535261646874808086104101116118127119130128131144Tasks 61–9014172834263844455251476055607271768182859899105122125119130122125140Tasks 91–12052026272534354851415452566462696970728095109116116127123123122123138Tasks 121–15061428323140454047495550606271707278827796101114119128127126132134138Tasks 151–180815243235393640445249535053647578787275104106112126120122122125131135Tasks 181–2101512182526384040414948555857657679728485102105113120117117126122125138Tasks 211–2408162032324045414949505361546269718276779599110118125128119125133138Tasks 241–2701320172423303949484548575764686978717582106110111124122127123125122143Tasks 271–300139163030354548494956585665627370737787106100107116121119125126132135Tasks 301–3301215222533374245444648536253697268717585100110109127122119129126130139Tasks 331–3601120163233393947474552515464677674778382104109116121120118130123127136Tasks 361–390151225222540334349474959535873697675838596108109117123118124126122137Tasks 391–420161916292729384742444460615468737678817898101105115120128122131133134Tasks 421–45051517302741434740524954555766677681778194104116116120127122121130134Tasks 451–4806918242640335049445353596267716982737799103109118120124118132131135Tasks 481–5101113272326393843474149585157717375717582104104116127125128124121130142Tasks 511–5401520202324354148475152615156737675817486105103113126123129130121126133Tasks 541–570132028332935374945514659566461717170748697105107118127129122128128137Tasks 571–60016928343438364152534550575665677481798010699105119120119122120128138Tasks 601–63072016243333444846514660525471706881758597101115124121124120124130133Tasks 631–660410203423404245525352525053717477717476106100114125126122127123128142Tasks 661–6901415263128333441444548535160656479787685103107110116123126127121131138Tasks 691–72011923223335375150465158586168717170837999110116118118125119129125143Tasks 721–750716262227383848424653535259716671718487101106109122128124118125127143Tasks 751–780161520333237344246435149595965647473767796110106118124128125132128134Tasks 781–81041925342730364947444650525573657776818097109109115120121125128124141Tasks 811–8401017213130344547494355586257737275797285102102104119125120126128123136Tasks 841–87041428232632344849485553526369728078787995109109118116128124129133140Tasks 871–900152022282632354641514960615362667880728699106114116128123130124122139Tasks 901–930415193323354440435346595661697675787779106110113120119122128127122144Tasks 931–960141920332539374351445456576172677776788597103114116122117121120124136Tasks 961–990108173234293748514745595564666969757478101108110117121120123121131139Tasks 991–102081825232834414845524954535865657877738798100107124125120120127124133Tasks 1021–1050918242426323548474944496155736470707376103109108122117126130125128141Tasks 1051–10801318282534314345405252595254616579748281105105105125126128125122129140Tasks 1081–1110161320293435394150475261576071717772827796110109120117129127124132135Tasks 1111–114071625302832425141475154616371717381778598101116122118128129125124133Tasks 1141–1170161021342340384550434659556264687774738395105109122128119127128128137Tasks 1171–1200121727262940334448454957566061667382848099102109117119119126126124134Table 6
The time windows’ ending point of the external trucks after considering the priority dispatch of emergency materials.
TB (hours)123456789101112131415161718192021222324252627282930Tasks 1–302124334033405153565762576571797984818593109116119130133134136135133150Tasks 31–601821333541454554525954646771787584888993112110122128133125136134137150Tasks 61–902124344038455055585762666169788185879093109108121130134129136133132149Tasks 91–1201726334035444357574962676270787575768593106115122132133129132130139150Tasks 121–1501624343840475157545662676871798078888990112115120128134135132138140145Tasks 151–1801621344041455148565858665870718186868485112112122132134134132131138150Tasks 181–2102220264034455055555761636769798285799091110111121127129124133136140149Tasks 211–2401726323838475157575658636764717779889089101108121131134135130138140148Tasks 241–2701926273731444855555562646771788186828688112116122131130134131135137149Tasks 271–3002226243639475154575662676271707983888793112115118129128134132136140146Tasks 301–3302123344041474852555462676868788086819092109116120133133133136136139146Tasks 331–3602026334041475156535659606470748280859093110116122127128135136138134145Tasks 361–3902126314035474156555355675966797786878992102114115125132129132132137150Tasks 391–4202225303736384454575151676860758086878890104116120124130134135138140140Tasks 421–4501721293834474957555956606371757786888488111112122123128133134131136141Tasks 451–4801823283241475057565159636870738077887987106115120133128132133138140144Tasks 481–5101919333439464451575760676571787986808191111116122133133135130138136149Tasks 511–5402226313537464854545862676069798286879092111109122132130135136137140148Tasks 541–5701926343935445155525860656270748077858693110113117124134135136138140150Tasks 571–6002224344041474255585958636870777784888686112111114131126132130131135149Tasks 601–6301926343540415056585962665970797778888993109111122132127132130132138144Tasks 631–6601425284033475154585961616462798286818485112106120132134130136129136150Tasks 661–6902126333941444754585957605766717285868692112114117123130134133130137150Tasks 691–7202021333839474857585361666771768281779086112116122129128134136136138149Tasks 721–7501324323034475155485560655970787680849093108116116128134135132138139150Tasks 751–7802225344041444756585159616768727183818984102116121127133134133138136147Tasks 781–8102225324041434757555953596669797886869086112115119127127134132134137149Tasks 811–8401626274038445153585961656870797986858693110115121126133131136136140149Tasks 841–8701721343036434156555661596169777986878990104115120129122134136138139150Tasks 871–9002226284032454754555960666765748286868693106114122122134131136131140146Tasks 901–9301121263939475146525959676370778285848490112116119132128131136138136150Tasks 931–9602126263936464854575261646367787485848892107112120132129134132127136145Tasks 961–9902219313940475154585956666371747576878386108116122131134129133132140147Tasks 991–10201826343036414855575961636864717286848893105114115131132135131134130141Tasks 1021–10501824303541394455575955646866798182768286111116121131126133136131140150Tasks 1051–10801925343941424951565962676360697985888888111115113133134134136131138148Tasks 1081–11102222324040434754575960676667798183808884108116120126126135136135139149Tasks 1111–11401426313634405157585662626770777883878892108112122132124134135138139149Tasks 1141–11702219274033474657575556666370708285878489105114117131134128134135140149Tasks 1171–12002125333341464852545861646267747486889088106116115131129127135136136141Figure12 shows the optimized arrival time windows of the external trucks. The blue rectangles are the time windows before optimization, and the green parts are the time windows after optimization. It can be seen that the overlaps of the time windows are significantly reduced from 468 hours to 157 hours, a decrease of about 66.45%. At the same time, the total task time windows have been reduced from 612 hours to 266 hours, a decrease of 56.54%.Figure 12
The optimized arrival time windows of the external trucks.


## 6. Conclusions

This study investigated the priority dispatching of emergency materials at container terminals during an epidemic. The time window constraints were considered, and a bilevel optimization model for container terminals was built to ensure the priority dispatching of epidemic prevention materials. The irregular arrival of external trucks is a key factor affecting the congestion of terminal gates and yards and the low efficiency of the yard. Simultaneously, considering the serious problem of yard pressing during the epidemic, a penalty fee for insufficient yard space was added to the plan. This prevents the yard from having no space for storage when an external truck is delivered to the terminal, thereby increasing terminal congestion. The chaotic genetic algorithm based on logistic mapping was used to solve the bilevel optimization model. Experimental results showed that the bilevel optimization model proposed in this study and the chaotic genetic algorithm based on logistic mapping improve the speed and accuracy of the solution. The total cost of the external trucks in the terminal was reduced while ensuring the priority dispatch of emergency materials, reducing the overlapping part of the time window, and optimizing the arrival mode of external trucks, thereby reducing the waiting time for an external truck.This study alleviates the congestion of container terminals and effectively ensures the supply of emergency medical supplies and living materials in an epidemic. Thus, the results of this study are of great significance to control the COVID-19 epidemic and treat infected patients. The limitation of this study is that it only considers the capacity constraints of the yard but does not consider the operating time window of the yard crane and does not involve the problem of yard crane task allocation. Therefore, in the future, we will consider other practical constraints in terminal operations, such as operation tasks and the time windows of quayside cranes and yard cranes. In addition, as all the vessels considered in this model have the same arriving periodicities, it will be more practical if multiple arriving patterns are considered in the future.



---

*Source: 3977984-2021-11-10.xml*