Advertisement
Sax

ABC - SBR Ex

Sax
Sep 23rd, 2016
372
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.28 KB | None | 0 0
  1. h(n) = x sin(x)/2 + 10 : 0 <= x <= 15
  2. Wolfram: plot x/2 sin(x) + 10, from x=0 to x=15
  3.  
  4. n = 7 bees
  5.  
  6. 1. Initialize n bees with any x coord for the function.
  7. 2. Evaluate population.
  8. 3. Repeat (just once, since we're doing 1st iteration):
  9. 1. Select m : m < n patches to search in their neighborhood.
  10. 2. Select e : e < m as the best e patches of those m.
  11. 3. Determine size of patches.
  12. 3. Recruit SOME bees for e and some others for m such that bees on e > bees on m.
  13. 4. Evaluate best bee on EACH patch.
  14. 5. Assign n-m bees to randomly search
  15. 6. Evaluate them.
  16.  
  17.  
  18. Starting positions for n=7 explorer bees (using random numbers from 0-150, and then divided by 10):
  19.  
  20. Rn1 = 16, x = 1.6, h(n1) = 1.6/2 sin(1.6) + 10 = 10.79
  21. Rn2 = 90, x = 9, h(n2) = 11.85
  22. Rn3 = 118, x = 11.8, h(n3) = 5.9
  23. Rn4 = 112, x = 11.2, h(n4) = 4.51
  24. Rn5 = 58, x = 5.8, h(n5) = 8.65
  25. Rn6 = 126, x = 12.6, h(n6) = 10.21
  26. Rn7 = 142, x = 14.2, h(n7) = 17.08
  27.  
  28. Parameters were defined as:
  29. m=4, e=2, m-e=2.
  30.  
  31. e1 = n7 with h(n7) = 17.08
  32. e2 = n2 with h(n2) = 11.85
  33. p1 = n1 with h(n1) = 10.79
  34. p2 = n6 with h(n6) = 10.21
  35.  
  36. Neighborhood is of size 1 (that means 10 in random numbers).
  37. n=2 for elite patches.
  38. n=1 for non-elite patches.
  39.  
  40. Recruiting worker bees for elite patch (e1 = n7) (using random numbers from 132 to 152, i.e. from 14.2 x 10 - 10, to 14.2 x 10 + 10):
  41. Rn8 = 136, x = 13.6, h(ne1) = 15.84
  42. Rn9 = 147, x = 14.7, h(ne2) = 16.21
  43.  
  44. Recruiting worker bees for elite patch (e2 = n2) (using random numbers from 80 to 100, i.e. from 9 x 10 - 10, to 9 x 10 + 10):
  45. Rn10 = 87, x = 8.7, h(ne3) = 12.88
  46. Rn11 = 99, x = 9.9, h(ne4) = 7.73
  47.  
  48. Recruiting worker bees for non-elite patch (p1 = n1) (using random numbers from 6 to 26):
  49. Rn12 = 19, x = 1.9, h(np1) = 10.89
  50.  
  51. Recruiting worker bees for non-elite patch (p2 = n6) (using random numbers from 116 to 136):
  52. Rn13 = 123, x = 12.3, h(np2) = 8.38
  53.  
  54. The best bees so far are as follows:
  55.  
  56. For patch e1, bee n7 with h(n7) = 17.08
  57. For patch e2, bee ne3 with h(ne3) = 12.88
  58. For patch p1, bee np1 with h(np1) = 10.89
  59. For patch p2, bee n6 with h(n6) = 10.21
  60.  
  61. Recruiting now n-m=3 new explorer bees for random search:
  62. Rn14 = 105, x = 10.5, h(n8) = 5.38
  63. Rn15 = 112, x = 11.2, h(n9) = 4.51
  64. Rn16 = 61, x = 6.1, h(n10) = 9.44
  65.  
  66. Best bee this iteration: n7 with x = 14.2 and h(n7) = 17.08.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement