# Resource Assignment Algorithms for Autonomous Mobile Robots with Task Offloading
## 3 System Model and Problem Formulation
Conversely, the demapping function \((\mathbf{k},\mathbf{m})=\text{M}^{-1}(\mathbf{f},\mathbf{S})\), does the opposite according to  
Figure 2: Three-level directed graph modeling the radio connections and the backhaul connections available for assignment. Note that some edges could not be actually present, depending on \(D_{i,k}\) and \(K_{k,m}\). \[(k_{i},m_{i})= \begin{cases}\arg\max_{k,m}S_{i,k,m},&f_{i}=0,\\ (0,0),&f_{i}=1.\end{cases}  \tag{3}\]  
With the help of the selection matrix, we define the radio usage of an AV-BS link as  
\[U_{k}=\sum_{i^{\prime}=1}^{N_{\text{AV}}}\sum_{m^{\prime}=1}^{N_{\text{BC}}} \frac{\rho_{i^{\prime}}}{r_{i^{\prime},k}}D_{i^{\prime},k}K_{k,m^{\prime}}S_{ i^{\prime},k,m^{\prime}}, \tag{4}\]  
and the CPU load of a DC as  
\[\Gamma_{m}=\gamma_{m}\sum_{i^{\prime\prime}=1}^{N_{\text{AV}}}\sum_{k^{\prime }=1}^{N_{\text{BS}}}D_{i^{\prime\prime},k^{\prime}}K_{k^{\prime},m}S_{i^{ \prime\prime},m}. \tag{5}\]  
Let the experienced latency be considered here as the target KPI. Assume that the AV produces \(N_{\text{req}}\) service requests per time unit; for instance, in the case of video streaming, \(N_{\text{req}}=30\) frames per second should be processed by the remote service. In our model, for every sent video frame, there should be a response from the service, upon which the AV modifies its trajectory or speed. The latency expected by the application managing the AV is thus \(l_{m}=1/N_{\text{req}}\). Now, we consider the effects of a finite amount of radio and computation resources. The first bottleneck is represented by the radio access UL channel: if multiple AVs are concurrently using the \(k\)th BS, which shares its radio resources equally, we should take into account the normalized radio usage \(U_{k}\). When \(U_{k}\leq 1\), the UL requests (i.e., video frames) pass regularly and without any streaming interruption. However, when \(U_{k}>1\), the BS controller proportionally reduces the number of requests passing through so that it effectively forwards only \(N_{\text{FW}}=\frac{N_{\text{req}}}{U_{k}}\) requests per time unit toward the DC [13]. Similarly, the DCs represent another bottleneck. If too many AVs are using the same DC, its CPU can get overloaded so that \(\Gamma_{m}>1\). Then, if the OS scheduler is fair, it will proportionally assign processes a lower CPU time to perform computations [34], thus decreasing the effective number of requests served to \(N_{\text{SRV}}=\frac{N_{\text{FW}}}{T_{m}}\). For the AV, it is as if the effective latency experienced by the application becomes \(L_{i}=\frac{1}{N_{\text{SAV}}}=l_{m}U_{k}\Gamma_{m}\). Thus, considering (4)-(5) and the network delay \(d_{k,m}\) on the wired BS-DC connections, we can write the latency experienced by the \(i\)th AV as  
\[L_{i}= \begin{cases}l_{m_{i}}\max\{1,U_{k_{i}}\}\max\{1,\Gamma_{m_{i}}\}+d_{k_{ i},m_{i}},&f_{i}=0\wedge\sum_{k=1}^{N_{\text{BS}}}\sum_{m=1}^{N_{\text{DC}}}D_{ i,k}K_{k,m}S_{i,k,m}=1,\\ \infty,&f_{i}=0\wedge\sum_{k=1}^{N_{\text{BS}}}\sum_{m=1}^{N_{\text{DC}}}D_{ i,k}K_{k,m}S_{i,k,m}=0,\\ \ell_{i},&f_{i}=1.\end{cases}  \tag{6}\]  
The value \(L_{i}=\infty\) in (6) represents the case when the selection does not entail a valid path between the AV and the BS or between the BS and the DC.