## 3 The Optimization of the Decision Criterion in the EDBA Algorithm  
The EDBA algorithm works with the dynamic traffic loading of ONU units. When the reported traffic from ONU units is high, the corresponding size of the transmission window is also large. In this case, this _TW_ size is larger than the allocated overhead \(GT\) data space. The EDBA algorithm is trying to divide an ONU traffic to various wavelengths based on their starting times and utilization of the bandwidth allocation. Larger _TW_ sizes assigned for each wavelength can avoid large transmission delays. In such a case, the EDBA algorithm allocates transmission windows on all wavelengths because the _TW_ size for each wavelength is larger than the \(GT\) data space. Then, the performance of this algorithm is the same as the Water-Filling Algorithm [31; 32]. In general, a higher efficiency of resource utilization decreases in proportion to the reduction in the upstream latency. Right after the data transmission in each ONU unit, its new report with the bandwidth demand in the next cycle is sent. A Grant Processing Time (GPT) is the time taken to process dynamic bandwidth and wavelength allocations in the OLT terminal that depends on the complexity of the selected method and is now on the order of milliseconds. The waiting time for the bandwidth and wavelength allocation process is considered up to one millisecond; the transition time for the ONU wavelength change is expected to be up to three milliseconds. When the reported traffic from ONU units is low, the EDBA algorithm is trying to allocate bandwidth requests on a smaller number of wavelengths based on the bandwidth allocation utilization. The bandwidth allocation process begins with a wavelength with the smallest starting time for decreasing the overhead size due to \(GT\) times. If the reportedbandwidth request is smaller than the \(GT\) data space or less than a decision criterion of the bandwidth allocation utilization, then the EDBA algorithm allocates a bandwidth on one wavelength irrespective of a difference in the starting times of the wavelengths. Then, the EDBA algorithm behaves similarly to the First Fit algorithm. If the reported bandwidth is larger than the \(GT\) data space or than a criterion of the bandwidth allocation utilization, the next wavelength will be allocated. In such a case, an allocation by using the EDBA algorithm can be executed on any wavelength from the four available. Therefore, the EDBA algorithm allocates a required number of wavelengths to the ONU unit based on the allocation utilization [31; 32]. In a moment of the granted allocation, its utilization \(\zeta\) is calculated from the \(TW\) size for data transmitting and the \(GT\) data space using the following formula:  
\[\zeta=\frac{TW}{TW+GT} \tag{1}\]  
For increasing the bandwidth allocation utilization, the \(Rh\) decision criterion is a crucial parameter because it determines the efficiency of the bandwidth utilization for the dedicated wavelength. This factor is set to 1, the default, at the allocation process and is changed optionally only after evaluation of the bandwidth utilization of utilized wavelengths in the working conditions. The simulation model is prepared and realized in the MATLAB 2021a programming environment. In this simulation model, parameters presented in Table 1 are included and can be optionally set. The simulation is executed in the online scheduling cycle where the OLT terminal can allocate \(i\) wavelengths from 1 to 4 to the ONU\({}_{\text{K}}\) unit based on its reported requested bandwidth \(RqB\). It begins with starting cycle times \(SC\) that are collected and ordered from the smallest to the highest. After ordering, a program calculates a difference of adjacent starting cycle times as follows:  
\[dif(i)=SC_{i+1}-SC_{i} \tag{2}\]  
where \(i=1,2,3,\dots\). Next, a residual bandwidth \(RsB\) of the ONU unit is calculated, whereby \(RsB=RqB\) at the start of the allocation process.