How to run Self-adaptive Bonobo Optimizer (SaBO) Matlab code
The code is written and tested in MATLAB 2022b version. It has three .m files. This algorithm
has no user-defined controlling parameters.
‘MyObjectiveFunction.m’ file is used for defining the objective function to be solved. Its input
is a bonobo or array of variables with
[1
×
𝑑]
dimensions. Here,
𝑑
is the total number of variables
of the optimization problem. Output of this function is the objective value.
‘SaBO.m’ is another function, where the mechanism of Self-adaptive Bonobo Optimizer (SaBO)
has been written through codes. The inputs of this function are population size (N), total number
of variables (d), lower limit of the variables (Var_min), upper limit of the variables (Var_max),
maximum number of iterations (max_it), and the objective function or Cost Function. However,
the outputs of this function are bestcost (i.e., the best-obtained objective value), alphabonobo (i.e.,
the best solution) and convergence_curve (i.e., evolution of the best-objective value over the
iterations).
‘Main.m’ is the main program file, which is to be executed by the user. In this code, a user has to
define a few things as follows:
� Total number of variables (d) of the optimization problem, in line no. 12.
� Lower limit of the variables (Var_min), in line no. 13.
� Upper limit of the variables (Var_max), in line no. 14.
� Population size (N), in line no. 16. In general, N is set equal to five to ten times of the
number of variables (d). However, a user may set its value in different manner too.
� Maximum number of iterations (max_it), in line no. 17.
After completing all these simple steps, user should run the ‘Main.m’ file and get the results.