## 3. MPSO for Inter-Layer Contact Plan  
Considering the complexity of the MLSCN topology and the NP-hardness of the CPD problem itself, we combine the characteristics of the CPD in MLSCN model and the idea of Particle Swarm Optimization (PSO) to propose MPSO and so as to improve the transmission efficiency in inter-layer contacts. Before describing MPSO in detail, several terms used in MPSO are explained here:  
_Particle_: Particles are individuals who perform the optimization process in MPSO. They adjust their speed and position through historical information to gradually approach the optimal solution in an iterative way. A particle is represented by a string of binary bits. _Group_: A group consists of several particles, and the number of particles is called as group size. _Learning factor_: The learning factor adjusts the particle trajectory through historical information. The larger the parameter, the greater the influence of the historical information. _Inertia weight_: The inertia weight represents the influence degree of the current speed on the trajectory. The larger the parameter, the stronger the global search ability of particles. The overall process of MPSO is shown in Figure 4. The algorithm first initializes the group by grid-based initialization, which is aimed to increase the diversity of the group by minimizing the relevancy between particles. Then, the particles are coded to bit strings according to the initialized group. However, the generated CPs may not meet the requirement of system, so the next step is to repair each particle. The repaired particle can be regarded as a feasible CP, then MPSO evaluates each particle by an evaluation function so as to distinguish the merits of each particle. Figure 4: The flow chart of MPSO. To this point, MPSO completes current iteration and determines whether to continue iterating. If MPSO chooses to continue iterating, then it enters the main optimization step of the algorithm. Through the worst and best position of the particle, after this, MPSO guides the direction of motion of the particles through the worst and best position saved in the iterative process, and gradually approaches the optimal solution of the system. In fact, updating the code string only by the direction guidance may break the delivery requirement of system. Thus, particles that have just finished the position update need to be repaired again. The specific implementation of each part of MPSO is described below. Traditionally, heuristic algorithms initialize the group by random binary strings. Although this method can obtain an initial group with a low computational overhead, randomly generated strings may cause the particles to be unevenly distributed in the solution domain, and quickly fall into the local optimization trap in the following iteration process. In light of this, the grid-based in MPSO is introduced to disperse the particles in the initial group as much as possible. Since only the UAVs are source data nodes in the MLSCN model, the packets mush be delivered to the HAPs before transmitted to satellites through SPLs. Thus, the grid-initialization here is the initialization of the PVLs. In addition, it should be noted that Figure 5 shows the solution domain of the same PVL, rather than the solution domain of a complete CP in the MLSCN. In other words, a CP has multiple solution domains in Figure 5, and the points in the figure indicate the PVL in a CP, which is characterized by the average establishing time and the amount of data. Figure 5a shows the establishment of a PVL in the initial group generated by the random initialization, in which many of these PVLs have similar average establishing time and data amount. To maximize the link diversity in each CP, grid-based initialization in Figure 5b distributes PVLs uniformly in two dimensions.