WOLFRAM|DEMONSTRATIONS PROJECT

Model of a Firefly Swarm

​
trial number
1
modeling parameters:
total flight time
100
time unit size
-1.07
swarm parameters:
number of fireflies
12
swarm evolution parameters:
interaction strength 1
0.66
interaction strength 2
0.34
interaction power law 1
2
interaction power law 2
-2.18
correlation length 1
1.92
correlation length 2
0.82
air resistance
5.48
wind turbulence
2.72
fly path visualization
paths as tubes
tube thickness
-1
firefly light
on/off
Using techniques of swarm modeling, it is possible to make a somewhat unrealistic model of firefly behavior.
Concretely, the following differential equations that describe the velocity change of firefly
i
in a swarm of
n
fireflies are solved in a discrete time-step approximation.
m
′
v
i
(t)=-γ
v
i
(t)+a
v
i
(t)+
n
∑
j,j≠i
v
j
(t)exp-

r
i
(t)-
r
j
(t)
r
a
+b
n
∑
j,j≠i
r
i
(t)-
r
j
(t)

r
i
(t)-
r
j
(t)
α
r
b

r
i
(t)-
r
j
(t)
-
β
r
b

r
i
(t)-
r
j
(t)
exp-

r
i
(t)-
r
j
(t)
r
b
+
ξ
i
For a swarm of fireflies, the parameters
a
and
b
are the interaction strengths,
r
a
and
r
b
are the correlation lengths, α and β are the interaction power laws,
γ
is the air resistance, and the random variable
ξ
i
is interpreted as wind turbulence.