# Scheduling of Industrial Control Traffic for Dynamic RAN Slicing with Distributed Massive MIMO +
## 5 Optimization Formulations
### Formulation FPRM/2: General  
In the case when the frame length \(T\) is a decision variable, the problem formulation is significantly more complicated than its counterpart in [16]. This is because, to obtain aMIP formulation, we need to remove the divisions of decision variables that appear in the objective function, i.e., the divisions \(\frac{x_{i}^{i}}{T}\), \(k\in\mathcal{K},i\in\mathcal{S}\). The formulation is as follows. \[\min \sum_{k\in\mathcal{K}}\sum_{i\in\mathcal{S}}w_{k}^{i} \tag{2a}\] \[T=\sum_{i\in\mathcal{S}}X^{i}\] (2b) \[X^{1}\geq X^{2}\geq\cdots\geq X^{S}\] (2c) \[x_{k}^{i}\leq X^{i}, k\in\mathcal{K}, i\in\mathcal{S}\] (2d) \[\sum_{i\in\mathcal{S}}x_{k}^{i}\geq\hbar(k)T, k\in\mathcal{K}\] (2e) \[\sum_{i\in\mathcal{S}}x_{k}^{i}\geq\hbar(k)T, k\in\mathcal{K}\] (2f) \[\sum_{i\in\mathcal{S}}x_{k}^{i}\geq 1, k\in\mathcal{K}\] (2g) \[\sum_{i\in\mathcal{S}}\lambda^{i}=1\] (2h) \[\sum_{i\in\mathcal{S}}\lambda^{i}=T\] (2i) \[u=\sum_{i\in\mathcal{S}}\frac{1}{\lambda^{i}}\] (2j) \[T=\sum_{i\in\mathcal{S}}X^{i}\]0 (2k) \[T=\sum_{i\in\mathcal{S}}X^{i}\]1 (2l) \[T=\sum_{i\in\mathcal{S}}X^{i}\]2 (2m) \[T=\sum_{i\in\mathcal{S}}X^{i}\]3 (2n) \[T=\sum_{i\in\mathcal{S}}X^{i}\]4 (2o) \[T=\sum_{i\in\mathcal{S}}X^{i}\]5 (2p) \[T=\sum_{i\in\mathcal{S}}X^{i}\]6 (2q) \[T=\sum_{i\in\mathcal{S}}X^{i}\]7 (2r) \[T=\sum_{i\in\mathcal{S}}X^{i}\]8 (2s) \[T=\sum_{i\in\mathcal{S}}X^{i}\]9 (2t) \[X^{1}\geq X^{2}\geq\cdots\geq X^{S}\]0 (2u) \[X^{1}\geq X^{2}\geq\cdots\geq X^{S}\]1 (2v) \[X^{1}\geq X^{2}\geq\cdots\geq X^{S}\]2  
In order to express the objective function without variable divisions, we introduce auxiliary variables \(u\) and \(w_{k}^{i},k\in\mathcal{K},i\in\mathcal{S}\). As we will see, \(u\) will be constrained to take the value \(\frac{1}{T}\), and then each \(w_{k}^{i}\) will express the value \(x_{k}^{k}u\), i.e., \(\frac{x_{k}^{i}}{T}\). The sum over all the \(w_{k}^{i}\) thus gives the pilot rate for the frame. The frame length \(T\) is specified in (2b) by means of binary variables \(X^{i}\), \(i\in\mathcal{S}=\{1,2,\ldots,S\}\), where \(S\) is the maximum frame length and \(X^{i}=1\) if, and only if, slot \(i\) belongs to the frame. Note that the monotonicity constraint (2c) ensures that the constructed frame is of the required form, i.e., \(\mathcal{T}=\{1,2,\ldots,T\}\). Then, constraint (2d) forbids allocating pilots to nodes in the slots outside the frame. As in formulation (1), constraints (2e) and (2f) ensure that each node obtains its required traffic rate on the uplink and downlink, and constraint (2g) forces every node to transmit at least once. Constraints (2h)-(2j) use binary variables \(\lambda^{i}\), \(i\in\mathcal{S}\) (out of which only one is equal to 1 due to constraint (2h)), to first express the current value of variable \(T\) (constraint (2i)), and then the current value of \(\frac{1}{T}\) (constraint (2j) sets variable \(u\) to \(\frac{1}{T}\)). Finally, constraint (2k) make the values of variables \(w_{k}^{i},\,k\in\mathcal{K},i\in\mathcal{S}\), equal to \(x_{k}^{i}/T\); this is correct because \(u=1/T\) and hence the inequality \(u\leq 1\) holds. The next group of constraints makes sure that each node \(k\in\mathcal{K}\) transmits at least once in every \(d(k)\) slots. This is mostly done by constraint (2l), which implies that within any sequence of consecutive \(d(k)\) slots in frame \(\mathcal{T}\), there is at least one slot with a pilot allocated to node \(k\). Yet, on top of that, we need to ensure that in vector \(x_{k}=(x_{k}^{1},x_{k}^{2},\ldots,x_{k}^{5})\), the number of zeros after the last element equal to 1 plus the number of zeros before the first element equal to 1 will not be more than \(d(k)-1\). This is done by means of constraint (2s), where \(T_{k}\) is the variable that expresses the largest index \(i\) with \(x_{k}^{i}=1\), while the smallest index \(i\) with \(x_{k}^{i}=1\) is equal to \(S+1-t_{k}\) (\(t_{k}\) is a variable). The proper values of \(T_{k}\) are ensured by constraints (2m)-(2o), while the proper value of \(t_{k}\) is implied by constraints (2p)-(2r).