C_MT=0;
C_GRID=0;
C_BA=0;
P_BA_sum=0;
Deltp_sum=0;
P_BA_sum_delt=0;
Energy storage charged state % %
BAsocMax=200;
P_load=[11.7 12.4 11.7 12.4 11.7 22.4 81.9 122.4 241.3 242.0 241.3 241.3 241.3 240.7 241.3 240.7 241.3 161.0 122.2 121.1 102.9 101.2 23.0 11.1];
P_pv=[0 0 0 0 0 0 0 0.0391 19.5244 40.0204 50.1010 73.3946 74.3511 76.3489 72.8004 53.1185 4.6258 0 0 0 0 0 0 0];
G_price=[0 0 0 0 0 0 0 0 0.0931 0.0931 0.0931 0.0931 0.0931 0.0931 0.0931 0.0931 0.0931 0.0931 0.0931 0.0931 0.0931 0 0 0];
For I=2:
If i<25
C_MT=C_MT + 0.04 * x (I);
Elseif i> 24 & amp; & i<49
C_GRID=C_GRID + G_price (I - 24) * x (I);
The else
C_BA=C_BA abs + 8 * (x (I));
End
End
For I=selfwill 2
P_BA_sum=P_BA_sum + (x (I));
P_BA_sum_delt=P_BA_sum_delt + Max (0, P_BA_sum - BAsocMax);
End
If (P_BA_sum_delt & lt;=0)
D=0;
Elseif (P_BA_sum_delt & gt; 0 & amp; & P_BA_sum_delt & lt;=0.001)
D=10; % % % % % iterations
Elseif (P_BA_sum_delt & gt; 0.001 & amp; & P_BA_sum_delt & lt;=0.1)
D=20;
Elseif (P_BA_sum_delt & gt; 0.1 & amp; & P_BA_sum_delt & lt;=1.0)
D=100;
The else
D=1000;
End
% power balance constraint processing
For I=
unto themDeltp (I)=abs (P_pv (I) + x (I) + x (I + 24) + x (I + 48) - P_load (I));
Deltp_sum=deltp_sum + deltp (I);
End
If (deltp_sum==0)
R=0.0;
Elseif (deltp_sum & gt; 0 & amp; & Deltp_sum & lt;=0.001)
% r=10 * SQRT (k); % % % % iterations
R=10;
Elseif (deltp_sum & gt; 0.001 & amp; & Deltp_sum & lt;=0.1)
R=20;
Elseif (deltp_sum & gt; 0.1 & amp; & Deltp_sum & lt;=1.0)
R=100;
The else
R=2000;
End
% power balance constraint processing
Result=C_MT + C_GRID + C_BA P_BA_sum_delt + r + d * * deltp_sum;
CodePudding user response:
From the top!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!CodePudding user response:
Is anyone here!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!CodePudding user response:
I also in research this program, this is the MATLAB, and want to question the Lord found the answer