|
Algorithm 1 Pseudocode of the Multi-Peak Dynamic Switching Control Scheme for SIL-IoT |
Require: , , Ensure: , T, , , Best
-
1:
Create initial population
-
2:
for
do
-
3:
-
4:
-
5:
-
6:
-
7:
-
8:
if
and
then
-
9:
Statistical analysis of pest phototactic rhythm
-
10:
according to the Equations (1)–(5)
-
11:
Calculate energy consumption
-
12:
according to the Equations (6)–(13)
-
13:
-
14:
end if
-
15:
{according to the Equations (21)–(26)}
-
16:
while do
-
17:
-
18:
if then
-
19:
-
20:
InsecticidalRate ← Calculate insecticidal rate
-
21:
OperationTime ← Calculate operation time
-
22:
Find optimal switching state {according to the Equations (14)–(20)}
-
23:
end if
-
24:
end while
-
25:
end for
-
26:
-
27:
return , T, Best
|