Skip to main content
. 2024 Feb 21;9(3):125. doi: 10.3390/biomimetics9030125
Algorithm 1 Multigene algorithm for solving task allocation problem
  • Input: 

      

  •    

    U={1,2,,Nu}, S={1,2,,Ns}, Na, Nh;

  • Output: 

      

  •    

    task allocation scheme with the highest F;

  • 1:

    Initialize Nchrom schemes in initial chromosome;

  • 2:

    Calculate F of each scheme of the initial chromosome;

  • 3:

    Set Fmax and calculate F¯ of the initial chromosome;

  • 4:

    Ge = number of iterations;

  • 5:

    Set Pc, Pm, Pm1, Pm2;

  • 6:

    while iGedo

  • 7:

       Crossover process in Phase 1;

  • 8:

       Mutation Process in Phase 2;

  • 9:

       Reinsertion Process in Phase 3;

  • 10:

      Select the scheme with the highest F in this generation;

  • 11:

      i=i+1;

  • 12:

    end while

  • 13:

    Output the scheme with the highest F in the last generation.