Research Article
Particle Swarm Optimization Algorithm for Optimizing Assignment of Blood in Blood Banking System
| Begin PSO Algorithm | | Input: : the function to optimize | | : the swarm size | | : the problem dimension | | : decision variable search range | | : particle velocity limits | | Output: : the best particle position found (global best) | | : the best fitness value found | | Initialize: position and velocity , for all particles in problem space | | evaluate in variables and get , () | | ← best of | | While stopping criteria is false do | | Compute inertia weight () if it is not a constant | | Repeat for times | | Repeat for times | | update for particle using (2) | | validate for velocity boundaries using Algorithm 3 | | update for particle using (3) | | validate for position boundaries using Algorithm 2 | | compute | | End Repeat for | | compute | | obtain new | | If then | | If then | | ← | | () ← | | end if | | End Repeat for | | End while | | ← | | ← | | Return and | | End PSO Algorithm |
|