Skip to main content
. 2024 Feb 23;9(3):137. doi: 10.3390/biomimetics9030137
Algorithm 1. Pseudocode of the BOA.
Start the BOA.
1. Input problem information: variables, objective function, and constraints.
2. Set the BOA population size N and the total number of iterations T.
3. Generate the initial population matrix at random using Equation (2).
4. Evaluate the objective function.
5. Determine the best candidate solution X→best.
6. For t=1 to T
7.   Update number of decision variables for Botox injections using Equation (4).
8.   For i=1 to N
9.  Determine the variables that are considered for Botox injection using Equation (5).
10.  Calculate the amount of Botox injection using Equation (6).
11.  For j=1 to Nb
12.  Calculate the new position of the ith BOA member using Equation (7).
13.  End
14.  Evaluate the objective function based on X→inew.
15.  Update the ith BOA member using Equation (8).
16.   End
17.   Save the best candidate solution obtained so far.
18.   End
19.   Output the best quasi-optimal solution obtained with the BOA.
End the BOA.