Two-Swim Operators in the Modified Bacterial Foraging Algorithm for the Optimal Synthesis of Four-Bar Mechanisms
Algorithm 2
IMBFOA pseudocode. Input parameters are number of bacteria , chemotaxis loop limit , number of bacteria for reproduction , scaling factor , the reproduction cycle RepCycle, the number of cycles , the local search frequency , and for the search direction, and ss for the skew mechanism.
) Create an initial swarm of bacteria by using the skew mechanism ,
() Evaluate ,
() for to do
() for to do
() for to do
() Perform the chemotaxis process by using the two swims in (42) and (43) and the attractor operator in (41) for
bacteria by considering the three feasibility rules as selection criteria
() end
() end
() if ( mod RepCycle == 0) then
() Perform the reproduction process by sorting all bacteria in the swarm based on the feasibility rules, duplicating
the best bacteria and eliminating the remaining
() end
() Perform the elimination-dispersal process by eliminating the worst bacterium in the current swarm