# Generating Datasets for Real-Time Scheduling on 5G New Radio
## 6 Evaluation
### Pointer Networks  
To demonstrate the effectiveness of the generated dataset, we use it to train a supervised learning model--pointer networks [28]. Pointer networks are a type of neural network that can be used to schedule software tasks [8]. The input of pointer networks is the sequence of task parameters, and the output is the sequence of task indexes, which represent the execution order of tasks. Thus, for 5G NR scheduling, similarly, the input is the sequence of packet parameters {\(<\)\(l_{1},c_{1},m_{1}>\), \(<\)\(l_{2},c_{2},m_{2}\),...}. However, the output sequence has to be changed, because packet scheduling is different from task scheduling. In task scheduling, multiple processors cannot be combined to serve a task. Thus, when multiple processors are available, no matter which processor the task is executed on, the execution result is not affected. However, in packet scheduling, multiple adjacent frequencies can be combined to serve a packet. Therefore, the execution result depends not only on the order in which the packets are executed, but also on how the frequencies are assigned. To address the problem, we define the output sequence to be first along the frequency dimension and then along the time dimension (as shown in Figure 17(a)). Furthermore, we add some virtual packets to align resource usage. A virtual packet occupies only one resource, i.e., its parameters are \(<\)\(1,1,1\)\(>\). Thus, the output sequence of Figure 17(a) is \(\{3,1,5,4,2\}\), where \(v_{5}\) is a virtual packet. If \(v_{5}\) is not added, the output sequence \(\{3,1,4,2\}\) corresponds to Figure 17(b), which cannot be reconstructed to the original solution as shown in Figure 17(a).  
Based on the input/output structure, we reorganize the generated dataset. Then, the neural architecture of pointer networks is set up as follows: (1) Encoder/Decoder: LSTM (long short-term memory) with 512 hidden units; (2) Batch size: 256; (3) Optimizer: Adam; (4) Loss function: sparse categorical cross-entropy; (5) Learning rate: cosine annealing; (6) Epochs: 50. Since, in related work, there is no polynomial-time algorithm for the 5G NR scheduling problem, we compare the pointer network (abbreviated Ptr-Net) with the left-top strategy (abbreviated LT) as shown in Algorithm 1. The comparison results are shown in Figures 19 and 20. As shown in Figure 19, the pointer network can achieve a better objective value than LT. As the number of packets increases, the objective value of LT increases rapidly, while that of Ptr-Net remains almost stable. This is because the coverage strategy employed by LT is greedy, and more packets are covered. However, the objective value of Ptr-Net is not affected by the number of packets because the pointer network can learn the optimal execution order of packets. Because LT covers more packets, its satisfiable ratio is higher, as shown in Figure 20. The pointer network used in this paper is traditional. If more novel neural network models are proposed, training them based on our datasets would lead to improved performance. Since this paper focuses on generating datasets, we will conduct in-depth research on supervised learning in the future.  
Figure 18: Output sequence.