Skip to main content
. 2017 Sep 5;10:65–78. doi: 10.2147/AABC.S138944
Reduction stage
1. Set the information system of antibacterial plants A=(U,A)
2. Define the indiscernibility matrix M(A)=(cij)
3. Build the discernibility function FA for the information system A as in Equation (1).
4. Reduce M attributes using laws of Rough sets (Upper, and Lower Laws).
5. Define d as number of non-empty rows of reduced M.
6. Build families sets of R0, R1, R2,………… Rd in the as follows:
7. Begin:
8. R0 is empty
9. For i = 1 to d
10. Ri=SiTi, where Si={RRi1:RCi∅}, and Ti=(R{a})aCi,RRi,RCi=
11. Calculate the accuracy α for each Ri
12. End
13. If αi < 0.6
14. Remove dispensable attribute form each element of Rd
15. REDA (A)= Rd
Optimization Stage
16. Set the Population P as a matrix P = [Ni*Mj] where N is the bacteria type and M is the plant
17. Set the particle is Pij which is the bacteria i on plant j
18. For each particle
19. Initialize position and velocity
20. End For
21. Do
22. For each particle
23. Find in the particle neighborhood, the particles with the best fitness as Pbest and Gbest.
24. Calculate Pi velocity according to the velocity equation
25. Vij(k+1)=wvij+c1r1[pbest-xij(k)]+c2r2[gbest-xij(k)]
26. Update Pi position according to the position equation
27. Xij(k+1)=xij(k)+vij(k+1)
28. If the new position for Pi is less than its current position then
29. Modify the velocity and position for Pi and Pbest and Gbest
30. Else
31. Modify the velocity of Pi and keep its old position
32. End For
33. While maximum iterations or minimum error criteria is not attained