|
Algorithm 1 Path-driven application mapping iteration algorithm |
-
1:
flag ← true, , , ;
-
2:
while flag do
-
3:
Add operations without parent operations to ready queue Q;
-
4:
while or do
-
5:
if then
-
6:
Call operation sorting algorithm to sort operations in Q, and add them to ;
-
7:
end if
-
8:
Retrieve an operation from the front of ;
-
9:
if there are other fluid in the target component m then
-
10:
Transport the fluid to the next component or a dedicated storage unit;
-
11:
end if
-
12:
Calculate the contaminated channel segments in the current flow path;
-
13:
if there is a path that needs to be cleaned then
-
14:
Perform globally aware wash operation;
-
15:
end if
-
16:
Execute transportation task and update component and channel information;
-
17:
Execute , add ’s child operations to queue Q, update component information;
-
18:
end while
-
19:
if completion time remains unchanged for three consecutive iterations then
-
20:
flag ← false;
-
21:
end if
-
22:
;
-
23:
end while
|