# Generating Datasets for Real-Time Scheduling on 5G New Radio
## 4 Formulation of the OMT Problem  
According to the requirements of 5G NR scheduling, we formulate the problem into an OMT problem, which contains fewer variables than the work in [9]. This simple  
Figure 3: Packet-to-packet relationship. Figure 2: Packet model. OMT problem will make the subsequent improvement we introduce in the next section more efficient. The problem addressed in this paper is as follows: given the packet set \(V\), and the available resources \(L\times P\), we need to specify the coordinates \((x_{i},y_{i})\) for each packet \(v_{i}\) so that all packets can be allocated in the available resources, and unimportant packets are covered first if network resources are not sufficient; \(x_{i}\) and \(y_{i}\) are integer variables, and \(r_{i}\) is 0-1 variable. If \(r_{i}=1\), then \(v_{i}\) is covered by other packets; otherwise \(v_{i}\) is not covered. The value ranges are as follows:  
\[\forall v_{i}\in V,x_{i}\in[0,P-c_{i}\times m_{i}),y_{i}\in[0,L-l_{i}),r_{i} \in\{0,1\}. \tag{1}\]  
When all \(x_{i}\) and \(y_{i}\) are specified, the corresponding \(r_{i}\) can be obtained indirectly. The formulation of \(x_{i}\), \(y_{i}\), and \(r_{i}\) is as follows:  
\[ \begin{split}\forall v_{i}\in V,&((r_{i}=1)\wedge \underset{\forall v_{j}\in V^{m_{i}+1}\cap\ldots\cap V^{M}}{\vee}R(v_{i},c_{i }\times m_{i},v_{j},c_{j}\times m_{j}))\vee\\ &((r_{i}=0)\wedge\underset{\forall v_{j}\in V^{m_{i}+1}\cap \ldots\cap V^{M}}{\wedge}R(v_{i},c_{i}\times m_{i},v_{j},c_{j}\times m_{j}))= true,\end{split}  \tag{2}\]  
where \(V^{m_{i}+1}\) contains the packets with the maximum transmission times of \(m_{i}+1\), i.e., \(V^{m_{i}+1}=\{v_{j}|\forall v_{j}\in V,m_{j}=m_{i}+1\}\). Since the packets with higher transmission times can cover \(v_{i}\), only these packets are considered in Equation (2); \(R()\) is invoked to check if two packets do not cover or conflict with each other, as follows:  
\[R(v_{i},c^{\prime}_{i},v_{j},c^{\prime}_{j})=(x_{i}\geq x_{j}+c^{\prime}_{j}) \vee(y_{i}\geq y_{j}+l_{j})\vee(x_{j}\geq x_{i}+c^{\prime}_{i})\vee(y_{j}\geq y _{i}+l_{i}), \tag{3}\]  
where the parameters \(c^{\prime}_{i}\) and \(c^{\prime}_{j}\) represent transmission time along the \(x\)-axis. According to different transmission times, \(c^{\prime}_{i}\) and \(c^{\prime}_{j}\) are an integer multiple of \(c_{i}\) and \(c_{j}\). Equation (3) is used to check the relationship between the two rectangles \(<\)\((x_{i},y_{i})\), \((x_{i}+c^{\prime}_{i},y_{i}+l_{i})\)\(>\) and \(<\)\((x_{j},y_{j})\), \((x_{j}+c^{\prime}_{j},y_{j}+l_{j})\)\(>\). Then, the check is true, i.e., two rectangles do not cover or conflict with each other, if one of the following four conditions is true: (1) the bottom side of \(v_{i}\) is above the top side of \(v_{j}\); (2) the left side of \(v_{i}\) is to the right of the right side of \(v_{j}\); (3) the top side of \(v_{i}\) is below the bottom side of \(v_{j}\); (4) the right side of \(v_{i}\) is to the left of the left side of \(v_{j}\). In Equation (2), if \(v_{i}\) is covered by a packet, i.e., \(\underset{\forall v_{j}\in V^{m_{i}+1}\cap\ldots\cap V^{M}}{\vee}R(v_{i},c_ {i}\times m_{i},v_{j},c_{j}\times m_{j})\) is true, then \(r_{i}\) must be equal to 1. Conversely, if \(v_{i}\) is not covered by any packet, \(\underset{\forall v_{j}\in V^{m_{i}+1}\cap\ldots\cap V^{M}}{\wedge}R(v_{i},c _{i}\times m_{i},v_{j},c_{j}\times m_{j})\) is true and \(r_{i}=0\). Hence, we connect \(r_{i}\) with \(x_{i}\) and \(y_{i}\) through \(R()\). This paper focuses on the problem of covering as few packets as possible. Thus, the objective of the problem is to minimize the weighted sum of the number of covered packets, as follows:  
\[\min\sum_{\forall m\in[1,M)}(w^{m}\times\sum_{\forall v_{j}\in V^{m}}r_{i}), \tag{4}\]  
where \(\omega^{m}\) is the weight of the packets with \(m\) transmissions, as follows:  
\[\forall m\in[1,M],w^{m}=\left\{ \begin{array}{ll}1,&if\;\;m=1\\ \underset{\forall k\in[1,m-1]}{\sum}(w^{k}\times|V^{k}|)+1,&\text{others}\end{array} \right.