# Resource Assignment Algorithms for Autonomous Mobile Robots with Task Offloading
## 3 System Model and Problem Formulation  
With reference to Figure 1, we introduce the system model that will be used to mathematically formulate the optimization problem in Section 3.2 by adopting a three-level graph structure, such as that shown in Figure 2.  
The problem dimensions are given by the number of AVs \(N_{\text{AV}}\), the number of BSs \(N_{\text{BS}}\), and the number of DCs \(N_{\text{DC}}\) in the graph levels. At the leftmost level, the AVs are indexed by \(i\), \(i^{\prime}\), \(i^{\prime\prime}\), or \(\iota=1,\dots,N_{\text{AV}}\), they are equipped with an internal service, which is characterized by a latency \(\ell_{i}>0\), which can perform the assigned task when there is no route configured, and produce an UL bit rate \(\rho_{i}\). In the intermediate level, the BSs are indexed by \(k\), \(k^{\prime}\), or \(\kappa=1,\dots,N_{\text{BS}}\) and provide a UL access bit rate \(r_{i,k}\) to an AV, only when the radio connection is active and available, expressed by \(D_{i,k}\in\{0,1\}\) (this corresponds to a presence or absence of the edge connecting the AV node with a BS node). Every AV that is connected to and is using the \(k\)th BS contributes to a total radio link usage \(U_{k}\geq 0\), expressing the amount of occupied radio resources. In the rightmost level, the DCs are indexed by \(m\), \(m^{\prime}\), or \(\mu=1,\ldots,N_{\text{DC}}\), with \(l_{m}>0\) denoting the typical end-to-end latency offered by the service and \(d_{k,m}>0\) representing the latency between a BS and a DC; the connection availability between a BS and a DC is expressed by \(K_{k,m}\in\{0,1\}\) (an edge is present or absent in the graph). Note that in Figure 2, we split the rightmost level into two separate sublevels but only for drawing clarity: we consider that each DC hosts a single offloading service (SVC). Every service, when used by an AV, contributes an amount \(\gamma_{m}\) to the normalized CPU load \(\Gamma_{m}\geq 0\). The performance generated by a particular assignment of AVs to DCs passing through BSs can be measured by different KPIs, such as the response delay or latency, the average UL access rate, or the number of overloaded DCs, for example. In order to identify a specific assignment, the vector \(\mathbf{f}= \begin{bmatrix}f_{1}&\ldots&f_{N_{AV}}\end{bmatrix} \), \(f_{i}\in\{0,1\}\) marks the AVs that are using the internal service (\(f_{i}=1\)) rather than the external ones (\(f_{i}=0\)). In addition, the partial selection matrix \(\mathbf{S}_{i}= \begin{bmatrix}S_{i,k,m}\end{bmatrix} \) of size \(N_{\text{BS}}\times N_{\text{DC}}\), \(S_{i,k,m}\in\{0,1\}\) chooses the BS-DC pair \((k,m)\) used to offload the task of the \(i\)th AV (together with the corresponding \(f_{i}=0\)); there is only a single \(1\) in the entries so that \(\sum_{k=1}^{N_{\text{BS}}}\sum_{m=1}^{N_{\text{DC}}}S_{i,k,m}=1\). The full selection matrix \(\mathbf{S}= \begin{bmatrix}\mathbf{S}_{1}&\ldots&\mathbf{S}_{N_{AV}}\end{bmatrix} \) of size \(N_{\text{BS}}\times N_{\text{AV}}N_{\text{DC}}\) represents the complete assignment for all AVs. Equivalently, the indexing vectors \(\mathbf{k}= \begin{bmatrix}k_{1}&\ldots&k_{N_{AV}}\end{bmatrix} \) and \(\mathbf{m}= \begin{bmatrix}m_{1}&\ldots&m_{N_{AV}}\end{bmatrix} \) denote the selected pairs of indexes for a specific route, with \((n_{i},m_{i})=(0,0)\) flagging the internal service choice. For instance, \(k_{i}=3\) and \(m_{i}=2\) means that the \(i\)th AV is using the 3 rd BS and the 2 nd DC. One can commute between the two representations with the mapping function \((\mathbf{f},\mathbf{S})=\text{M}(\mathbf{k},\mathbf{m})\), which converts from the index sets to the selection sets, according to the rules  
\[f_{i} =\delta[k_{i}m_{i}], \tag{1}\] \[S_{i,k,m} =\delta[k-k_{i}]\delta[m-m_{i}], \tag{2}\]  
where \(\delta[\cdot]\) is the Kronecker delta function.