## 5 Ubunye Service Allocator
### Ubunye Auction Process  
The Ubunye auction algorithm's initialization process determines the initial prices of the resources. Each resource \(j\) has an initial price \(p_{j}\). Initially, all prices can be equal to zero or some arbitrary value [29]. The algorithm then proceeds with iterations, in which the agents update their bids based on the current prices of the resources and the initial values. We propose two bid formulas, one based on latency and another based on bandwidth (BW), according to the QoE requirements of user applications, CPU load, and memory usage.  
1. Ubunye latency bid Formula (1): We propose a formula based on latency, according to the QoE requirements of user applications, CPU load, and memory usage: \[B_{ij}=(|log10(1/L_{ij})|+|log10(P_{j})|+|log10(M_{j})|).\] (1)
2. Ubunye bandwidth bid Formula (2): We propose a formula based on the available bandwidth on each edge node, according to the QoE requirements of user applications, CPU load, and memory usage: \[B_{ij}=(|log10(BW_{ij})|+|log10(P_{j})|+|log10(M_{j})|).\] (2)  
For Ubunye latency bid Formula (1), we calculated the agents' bids by considering the \(L_{ij}\) Latency between user i and edge node j. It is a dimensionless quantity calculated from the ratio between the value of the user path delay (in seconds) and the unit value of one second. It is inversely proportional to the benefit \(B_{ij}\) since the shorter the latency, the greater the benefit.  
For Ubunye bandwidth bid Formula (2), we calculated the agents' bids by considering the \(BW_{ij}\) network bandwidth between user i and edge node j in seconds. It is a dimensionless quantity calculated from the ratio between the value of the available bandwidth (in megabits per second) and the unit value of one megabit per second. It is directly proportional to the benefit \(B_{ij}\), as the greater the available bandwidth, the greater the benefit.  
For Formulas (1) and (2), we calculated the agents' bids by considering the following common variables in two bid formulas:  
* \(B_{ij}\): benefit of a service request i concerning an edge node j (dimensionless quantity);
* \(P_{j}\): number of free CPUs on an edge node j at an instant of time t, calculated from the difference between total CPU capacity and the number of CPUs occupied. This is directly proportional to the benefit \(B_{ij}\), as the greater the number of free CPUs, the greater the benefit;
* \(M_{j}\): free memory on an edge node j at a given observed time instant. It is a dimensionless quantity calculated from the ratio between the amount of memory available (in megabytes) and the unit value of a megabyte. This is directly proportional to the benefit \(B_{ij}\), as the greater the amount of free memory, the greater the benefit.  
The latency, bandwidth, CPU, and memory values can vary by order of magnitude. Using the logarithm compresses this scale, bringing the values into a closer range, which can make it easier to compare and calculate bids. The logarithm amplifies minor differences in low values. It can be helpful, for example, to give more weight to minor improvements in latency or increases in resources such as CPU and memory when these values are initially low. Significant improvements in QoS and QoE are often seen in lower value ranges, whereas increases in higher value ranges have a less significant impact. Using logarithms can help model this non-linear relationship, giving more weight to improvements in value ranges that are more relevant to the user's perception.  
After the agents update their bids, the prices of the resources are updated based on the bids received. The iterations continue until they reach a convergence criterion when the agents' bids converge to stable values or when the resource prices do not change significantly between iterations [29].