# Load Forecasting Based on LVMD-DBFCM Load Curve Clustering and the CNN-IVIA-BLSTM Model
## 2 Influenza Virus Immunity Optimization Algorithm
### Mathematical Model
* Susceptible individuals are updated by Equation (7): \[x_{i,j}(t+1) =x_{i,j}(t)+\beta\big{|}x_{i,j}(t)-x_{i,\
u}(t)\big{|}\] \[\beta =\exp\left(\frac{C-L}{\varepsilon\times N_{\max}}\right)\] (7) \[\varepsilon =rand(0,1)\]  
When the contact distance between individuals in the population and infected individuals is \(0.5L<C<0.8L\), the position is updated by Equation (7). \(x_{i,\
u}(t)\) is a random acquisition of viral cells by highly susceptible individuals, \(\beta\) represents update coefficient at the contact distance of \(0.5L<C<0.8L\), \(\varepsilon\) is a random number in the range 0-1. When the number of exchanged cells has exceeded one-third of the total number of cells, the highly susceptible individuals are transformed into infected individuals. * Secure individuals updated by Equation (8): \[x_{i,j}(t+1) =x_{i,j}(t)+\gamma\big{|}x_{i,j}(t)-x_{i,\
u}(t)\big{|}\] \[L=\frac{1}{2}\sqrt{L_{\min}^{2}+L_{\max}^{2}} \tag{4}\]0 (8) \[L=\frac{1}{2}\sqrt{L_{\min}^{2}+L_{\max}^{2}} \tag{4}\]1  
When the contact distance between individuals in the population and infected individuals is \(0.8L<C<L\), the position is updated by Equation (8). \(\gamma\) is a random number in the range \(-1\)-\(1\). There is no cellular exchange between safe individuals and infected individuals. However, as the number of infected individuals increases, the contact distance between safe individuals and infected individuals may decrease, and safe individuals may become susceptible. * Absolutely safe individuals updated by Equation (9):\[ \begin{array}{l}x_{i,j}(t+1)=\lambda x_{i,j}(t)\\ \lambda=\gamma\times\left(\frac{\sqrt{2}-1}{2}\right)L\end{array}  \tag{9}\]  
Absolutely safe individuals are immune, and the contact distance between individuals and infected individuals is \(C>L;\lambda\) represents the update coefficient at the contact distance of \(C>L\). They randomly change their positions during the iterative process and can be used to escape the current search region when the algorithm falls into local optima. Stop criterion IVIA: The algorithm terminates when the number of immune individuals in the population exceeds more than 80% of the population or when the maximum number of iterations is reached. Therefore, the individual with the highest population immunity corresponds to the optimal solution of the optimization problem, and the corresponding function value is the optimal value of the optimization problem. If the problem to be solved requires higher accuracy, the population immunity rate in the Algorithm 1 can be increased. The pseudo-code of IVIA is presented below. ```
0: \(n\): The number of people \(N_{\max}\): The maximum number of iterations \(m\): Initial number of infected individuals (usually set to 1) \(L\): Maximum safe contact distance \(R\): Herd immunity ratio C: The distance between individuals \(lb\),\(ub\): Search boundary 1: Population initialization 2: Setting parameters 3:while (\(t<N\))
4: Calculate fitness value and sort 5:for\(i=1:m\)
6:if (\(C<0.2L\)) then
7: Using Equation (5) to update the location of the infected individuals
8: Record the current status of the individuals
9:elseif (\(0.2L<C<0.5L\)) then
10: Using Equation (6) to update the location of highly susceptible individuals
11: Record the current status of the individuals
12:elseif (\(0.5L<C<0.8L\)) then
13: Using Equation (7) to update the location of susceptible individuals
14: Record the current status of the individuals
15:elseif (\(0.8L<C<L\)) then
16: Using Formula (8) to update the position of a safe individuals
17: Record the current status of the individual
18:else
19: Using Equation (9) to update the position of an absolutely safe individuals
20:endif
21: Recalculate fitness value
22:endfor
23: Calculate immunity rate
24:\(t=t+1\)
25:endwhile
```  
**Algorithm 1** IVIA pseudo-code