## 2 Materials and Methods
### AGV Double-Cycling
#### 2.1.2 Mathematical Model
The waiting time is the previous task point's waiting time before unloading plus the unloading time of the previous task point. Equation (16) indicates the waiting time before task point \(i\) is loaded at the quayside. The waiting time is the previous task point's waiting time plus the previous task point's loading time. Equations (17)-(20) describe the situation of AGVs entering and leaving the yard. Equation (17) indicates the waiting time of task point \(i\) before it is unloaded in the yard. It describes two cases: 1) if the YC can be prepared in advance, the waiting time is 0; 2) if the YC cannot be prepared in advance, there are two situations: if the YC is loading a container, the waiting time is the previous task point's waiting time plus the previous task point's loading time minus the time interval between two consecutive AGVs driving out of the quayside. If the YC is unloading a container, the waiting time is the previous task point's waiting time plus the previous task point's waiting time plus the previous task point's unloading time minus the time interval from the arrival at the yard at the previous task point. Equation (18) depicts the time taken for task point \(i\) to be unloaded in the yard. Specifically, 1) if the YC can be prepared in advance, the unloading time is the time needed by the spreader transporting a container at the I/O point; 2) if the YC cannot be prepared in advance, there are two situations. If the YC's previous operation is a loading operation, the YC stops at the I/O point after transportation, and the unloading time is the time the spreader transports the container. If the YC's previous operation is an unloading operation, the unloading time is the time needed by YC moving to the I/O point plus the spreader transporting a container at the I/O point. Equation (19) describes the waiting time before task point \(i\) is loaded in the yard. Specifically, 1) if AGVs are loaded in the same yard, the waiting time is the time needed by YC moving to the I/O point after the unloading; 2) if the AGVs are loaded in another yard, there are two situations. When the next target yard's YC can be prepared in advance, the waiting time is the time needed by the AGV running empty to the target yard. When the next target yard's YC cannot be prepared in advance, there are also two situations: if the YC is loading a container, the waiting time is the previous task point's waiting time plus the task point's loading time minus the empty running time of AGV; if the YC is unloading a container, the waiting time is the previous task point's waiting time plus the previous task point's unloading time minus the empty running time of the AGV. Equation (20) depicts the time taken for task point \(i\) to be loaded in the yard. Specifically, 1) if the AGV is loaded in the same yard after unloading, the loading time is the time needed by the YC moving to the position of the container and transporting it, the YC moving to the I/O point, and the spreader transporting a container at the I/O point; 2) if the AGV needs to be loaded in other yards after unloading, there are two situations. If the YC can be prepared in advance, the loading time is the time needed by the spreader transporting a container at the I/O point. If the YC cannot be prepared in advance, there are two situations. If the YC is loading a container, the loading time is the time needed by the YC to move to the position of the target container and transport it. If the YC is unloading a container, the loading time is the time needed by the YC moving to the target container and transporting it, the YC moving to the I/O point, and the spreader transporting a container at the I/O point.