Skip to main content
. 2019 Sep 14;19(18):3973. doi: 10.3390/s19183973
Algorithm 3 Optimisation based on SA algorithm
  • 1:
    Let T> 0 as initial parameter
  • 2:
    Let N(T) as maximum number of iterations
  • 3:
    while stop criterion has not been met do
  • 4:
     Randomly generate a fasible solution tsched
  • 5:
     Evaluate tschedi, D = f(tschedi)
  • 6:
     n = 1
  • 7:
    while while n <= N(T) do
  • 8:
      Generate solution tschedi based on tschedi
  • 9:
      Evaluation of tschedi; D = f(tschedi); δ =  f(tschedi)–f(tschedi)
  • 10:
      if f(tosi) < f(tschedi) then
  • 11:
       tschedi = tschedi
  • 12:
      else
  • 13:
       ifδ >= 0 and u< exp((f(tschedi)–f(tschedi))/T) then
  • 14:
        tschedi = tschedi
  • 15:
       end if
  • 16:
      end if
  • 17:
      n = n+1
  • 18:
    end while
  • 19:
    T reduction and update tschedi at each reduction
  • 20:
    end while