|
Input: Two sets of cloud models: Ci(Exi, Eni, Hei) and Cj(Exj, Enj, Hej). |
|
Output: The of the two sets of cloud models. |
|
1 function [EPTCM] = EPTCM(PO,PN) |
|
2 z = 1; |
|
3 t = 1; |
|
4 Ex1 =PO(1); |
|
5 En1 =PO(2); |
|
6 He1 =PO(3); |
|
7 Ex2 =PN(1); |
|
8 En2 =PN(2); |
|
9 He2 =PN(3); |
| %The two sets of cloud model expectation curves are expressed in the form of triangular fuzzy numbers. |
|
10 symsr; |
|
11 ux1 = Ex1 − 3∗En1∗(1 − r); |
|
12 us1 = Ex1 + 3∗En1∗(1 − r); |
|
13 ux2 = Ex2 − 3∗En2∗(1 − r); |
|
14 us2 = Ex2 + 3∗En2∗(1 − r); |
| % The expectation values E (u) and E (v) and the widths W (u) and W (v) of the two triangular blurred numbers are calculated, respectively. |
|
15 Eu1 = (ux1 + us1)/2; |
|
16 Eu2 = (ux2 + us2)/2; |
|
17 Wu1 = (us1 − ux1)/2; |
|
18 Wu2 = (us2 − ux2)/2; |
| % Calculate the difference between the expected value (ΔE) of the two triangular cloud models, and the difference (ΔW) in width. Substitute into Eqs. (8) and (9) to obtain the interval number closeness (nEW(u, v)). |
|
19 ; |
| % According to Eq. (15), the obtained interval number closeness (nEW(u, v)) is converted to EW-type closeness. That is Sim (ETCM). |
|
20 ETCM = int(N1, r, 0, 1); |
|
21 eval(ETCM); |
| % Calculate the mean variance of the two sets of cloud models. Calculate the distance similarity Sim (PCM) of two groups of cloud models by Eq. (16). |
|
22 ; |
| % Calculate the weight coefficients of ETCM and PCM methods by Eq. (17). The final EPTCM algorithm is obtained after the weighting calculation of the two. As shown in Eq. (18). |
|
23 syms B; |
|
24 [B] =solve((1-2*B) 2-sqrt((ETCM-PCM) 2) = =0); |
|
25 B =vpa(B); |
|
26 A =B(1); |
|
27 if(A<B(2)) |
|
28 C =A; |
|
29 A =B(2); |
|
30 B =C; |
|
31 end |
|
32 EPTCM =A*ETCM+B*PCM; |
|
33 eval(EPTCM); |
|
34 end |