|
Algorithm 1 Swarm control in the proposed metaverse |
Input:
, , ,
-
1:
← initialiseDigitalTwins()
-
2:
← initialiseVirtualControlAgents( )
-
3:
t ← 0
-
4:
while t do
-
5:
t ← t + 1
-
6:
← getPhysicalSwarmData( )
-
7:
updateDigitialTwinsData(, )
-
8:
updatedGUI(, )
-
9:
← getHumanCommand( )
-
10:
translateCommands()
-
11:
for i in length() do
-
12:
executeCommand(,)
-
13:
end for
-
14:
applySheepBehaviours(,)
-
15:
if then
-
16:
sendDigitalTwinPositionsAndHeadings()
-
17:
updatePhysicalRobotPositions( )
-
18:
else
-
19:
sendControlAgentPositions()
-
20:
for each physical robot do
-
21:
applySheepBehaviour( )
-
22:
end for
-
23:
end if
-
24:
end while
|