Skip to main content
. 2024 Nov 1;9(11):664. doi: 10.3390/biomimetics9110664
Algorithm 1: MTLLSO
  Input: the number of particles of two-task NP, random mating probability rmp, number of levels L, level size LS, control parameter ϕ, the maximum number of fitness evaluation FES.
  /* Initialization */
  1. fes = 0 /* This variable counts the used fitness evaluations. */

  2. Randomly initialize P1 and P2 for two tasks respectively and evaluate the fitness values for P1 and P2;

  3. fes + = 2*NP;

  4. While fes < FES do

  5. P1 and P2 are divided into L group;

  6. For POP = {P1, P2} do /* This variable the population evolving in the current iteration. */

  7. Generate offspring particles OP through Algorithm 2;

  8. Evaluate the generated offspring particles OP;

  9. fes + = (NPLS);

  10. POP = POPOP;

  11. Sort P1 and P2 in ascending order of fitness;

  12. Select the fittest NP particles from P1 and P2 to form the next P1 and P2;

  13. End while

  Output: The best solutions of P1 and P2