Research Article
Operational Optimization of Large-Scale Parallel-Unit SWRO Desalination Plant Using Differential Evolution Algorithm
Algorithm 1
Pseudocode of TSDE.
Line % Pseudocode of TSDE | (1) Begin | (2) Set NP = 100; ; ; ; | (3) % Stage One | (4) Initialize population (, NP) (the vectors which represent the status of RO are initialized | randomly in the range of 0, 1; the vectors which represent the amount of freshwater are | initialized as constants, which equal the average capacity of each RO unit) | (5) | (6) For to | (7) For to | (8) For to NP | (9) Randomly selected three integers , , and from the set , NP} | (≠ ≠ ≠ ) | (10) * rand + 0.1 | (11) = + * () | (12) Randomly selected index rnbr() (rnbr() ∈ | (13) CR = rand * 0.2 + 0.7 | (14) For to | (15) If (rand < CR) or ( = rnbr()) | (16) = | (17) Elseif | (18) = | (19) End If | (20) If ( < ) or ( > ) | (21) = + rand * () | (22) End If | (23) End For | (24) If () > () | (25) = | (26) Else | (27) = | (28) End If | (29) End For | (30) End For | (31) End For | (32) % Stage Two | (33) Initialize population (, NP) (30 percent of them are remained the best values | from Stage One and 70 percent are generated randomly) | (34) | (35) For to | (36) For to | (37) For to NP | (38) Randomly selected three integers , , and from the set , NP} | (≠ ≠ ≠ ) | (39) * rand + 0.1 | (40) = + * () | (41) Randomly selected index rnbr() (rnbr() ∈ | (42) CR = rand * 0.2 + 0.7 | (43) For to | (44) If (rand < CR) or ( = rnbr()) | (45) = | (46) Elseif | (47) = | (48) End If | (49) If ( < ) or ( > ) | (50) = + rand * () | (51) End If | (52) End For | (53) If () > () | (54) = | (55) Else | (56) = | (57) End If | (58) End For | (59) End For | (60) End For | (61) End |
|