# Distributed Resources Allocation Method for Space-Ground Integrated Mobile Communication System
## 6 Numerical Results
### Simulation Procedure  
The architecture of the whole experimental approach to our ideas in this study is shown in Figure 7.  
We first define MS objects programmatically in MATLAB, and randomly generate its arrival time, transmit power, packet size and other parameters for each object. Then, we use python to conduct the DP-DQN reinforcement learning training proposed by us. After obtaining the model, the operating system of PC is used as a bridge to pass the trained model into the MATLAB function. This step also simulates the distributed deployment process of the model trained by the core network to the user's mobile station.  
In the simulation, we assume that the maximum amount of users over a 1 h duration is 3000, among which 1500 users are asking for a connection to send messages while the other 1500 users are asking for slices to receive messages. The max information package of one request will not exceed 20 GB and will not be below 2 MB. At the same time, each message package will be given an emergence level randomly, which is a positive integer between 1 and 3. We will define three types of service types which have different data rates and latencies. Every user will have a reference service type. To make the simulation more universal, all of the parameters listed above will be given randomly in the simulation process. Meanwhile, the requests from the users have different arrival times, which will be randomly generated in the loop. And, in our research, we assume that the arrival time of each user obeys the Poisson process.  
Also, to take the location and density of the MS, we will also arrange location (longitude, latitude and altitude) for each MS (i.e., user) randomly. To simulate the scenario of metropolises with rural areas. The generation of the location will not be absolutely random; most of the users' locations will be around the main city which is set as 4 in our work and  
Figure 7: Simulation flow diagram: the DP-DQN model is trained in python and transferred to MATLAB with the operating system as a bridge to simulate the process of decision model delivery.  
several users will be around the small towns, which means in these kind of area the access request will not be as much as those in metropolises.  
In the table, the element SF indicates Sensitive Factor. Moreover, we will define three types of physical channels (e.g., terrain cellular, satellite and drone network). Each channel will be cut into three slices based on the total service types. Then, the slices will also contain 1800 or less different sub-carrier. The minimum particle have a maximum transmitting rate of 3 MBps. In addition, \(\lambda_{i}\) in the table is the sensitive factor of each input parameter, which is set as variable (non-fixed value), and experiments are conducted on different \(\lambda_{i}\). Here, we use a grid search algorithm with a step size of 0.1 to determine the most appropriate value in a certain state, shown in Table 3.  
All of the slices which have been allocated to users will be recorded in an array until the process of transmitting messages has been finished.