## 5 Simulation Examples
### Examples with Consideration of Multiple Uncertainties
#### 5.2.1 Example 4--Coverage of the Required Load and Its Changes  
In this example, the desired load was set to \(P_{D}=1500\) kW. The individual values \(P_{i}\) are randomly assigned, with the only constraint that their sum equals \(P_{D}\). The network topology and generator types remain consistent with those in Example 1 (Section 5.1.1). The algorithm initialization follows the settings in Table 6. Notably, adjustments were made to the parameters for calculating the learning constant \(M(0)\) and \(c(0)\). Based on the Bernoulli process, the drop-off packet occurrence is modeled as one event every \(n=250\) steps.  
The parameters for solar and wind power plants remain the same as described in Section 5.1.1, which also holds true for all subsequent examples.  
The simulation results for the values of \(\lambda_{i}\), \(P_{i}\), and time delay on the first generator are shown in Figure 12. The algorithm approaches the desired load within 100 steps but does not quite reach it before the next change, resulting in a final value slightly lower by about 3-4 kW. However, it was confirmed that the algorithm achieves convergence to the optimal solution for a longer time horizon (\(k\to\infty\)). The plots show that the total incremental cost \(\lambda\) decreases as renewable power generation increases. The lowest \(\lambda\) value, 8.626 USD/kWh, is observed in the range from \(k=200\) to 300. At the beginning of the simulation, it was 8.908 USD/kWh.  
\begin{table}
\begin{tabular}{l l l l l l l} \hline
**Variable** & \(\mathbf{i=1}\) & \(\mathbf{i=2}\) & \(\mathbf{i=3}\) & \(\mathbf{i=4}\) & \(\mathbf{i=5}\) & \(\mathbf{i=6}\) \\ \hline \(P(0)\) [kW] & 150 & 150 & 100 & 50 & 0 & 0 \\ \(y(0)\) [kW] & 300 & 300 & 150 & 200 & 50 & 50 \\ \(\lambda(0)\) & 7.6262 & 7.6262 & 8.2390 & 8.4552 & 0 & 0 \\ \([USD/\text{kWh}]\) & 472.5 & 472.5 & 262.5 & 262.5 & 52.5 & 52.5 \\ \(M(0)\) & 1 & 1 & 1 & 1 & 1 & 1 \\ \(c(0)\) & 0.5 & 0.5 & 0.5 & 0.5 & 0.5 & 0.5 \\ \(\gamma(0)\) & 1 & 1 & 1 & 1 & 1 & 1 \\ \hline \end{tabular}
\end{table}
Table 6: Initialization of \(P(0),y(0),\lambda(0),D(0),M(0),c(0)\), and \(\gamma(0)\) for the fourth example.  
Figure 12: Example 4 results for \(\lambda_{i}\), \(P_{i}\) and time delay on the first generator with more uncertainties.  
Comparing these results to the previous Example 1 (Section 5.1.1), it is evident that the algorithm requires more time for convergence. Additionally, introducing line losses leads to an overall increase in the required power and, consequently, an increase in the value of \(\lambda\). The treatment of drop-off packets in the variable traffic delay representation ensures the stability and functionality of the algorithm even in these scenarios.  
It is also worth noting the oscillations that occur when the algorithm reacts to a change in the performance of renewable sources. It is only a transition event caused by the inclusion of several uncertainties at once and stabilizes after some time, as seen from Figure 12. The size and speed of these overshoots can be influenced by the choice learning gain \(\gamma\), i.e., the values of \(M(0)\) and \(c(0)\).