Research Article

Space Deployment Algorithm for UAV-IRS-Based Systems Using a Ck++ Optimizer

Algorithm 1

Deployment Algorithm.
Initialization:
Initialize the initial position of the user node, and calculate the number of UAV-IRS in theory;
1. A random point is selected from the input user node location and then it will be set as the first cluster center;
2. For each point in the data set, calculate its distance from the nearest cluster center (selected cluster center);
3. A new data point is selected as the new clustering center, and the selection principle is as follows: the point with larger has a higher probability of being selected as the clustering center;
4. Repeat steps 2 and 3 until k cluster centers are selected.
5. The k initial clustering centers are used to run the standard K-means algorithm.
Step 3 Reflect to the probability of point selection. The specific algorithm is as follows:
1. Let us start with a random seed from our database;
2. For each point, we calculate its straight-line distance from the nearest seed point and store it in an array. Then we add up the distances to get ;
3. Then, a random value is taken and the next seed point is calculated in the way of weight. The algorithm is realized by taking a random value ā€œā€ that can fall in and then using until it is not greater than 0, at which point the next seed point is taken;
4. Repeat steps 2 and 3 until k cluster centers are selected;
5. These k initial clustering centers are used to run the standard k-means++ algorithm.