Objective function

Generate initial population of fireflies

Light intensity at is determined by

Define light absorption coefficient

while (t < MaxGeneration) do

for: all fireflies do

for: all n fireflies do

if () then

Move firefly i towards j in d-dimension;

end if

Attractiveness varies with distance via

Evaluate new solutions and update light intensity

end for

end for

Rank the fireflies and find the current best

end while

Post-process results and visualization