👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆下
载资源链接👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆
《《《《《《《《更多资源还请持续关注本专栏》》》》》》》
论文可参考:
含分布式发电的微电网中储能装置容量优化配置
基于机会约束规划的混合储能优化配置方法
基于全寿命周期成本的配电网蓄电池储能系统的优化配置
微电网复合储能多目标优化配置方法及评价指标
部分代码展示:
Diag_neg_disch_eff=Diag1_neg*battery_effic_disch; %is not implemented yet
Diag_pos_charge_eff=Diag1_pos*(1/battery_effic_charge);
%Create the diagonal matrix OF THE first efficiency
v = ones(1,num_of_hours);
v=v.*efficiencies(1);
Diag_eff1_pos =diag(v);
Diag_eff1_neg=-Diag_eff1_pos;
%Create the diagonal matrix OF THE second efficiency
v = ones(1,num_of_hours);
v=v.*efficiencies(2);
Diag_eff2_pos =diag(v);
Diag_eff2_neg=-Diag_eff2_pos;
%Create the diagonal matrix OF THE third efficiency
v = ones(1,num_of_hours);
v=v.*efficiencies(3);
Diag_eff3_pos =diag(v);
Diag_eff3_neg=-Diag_eff3_pos;
%Create the diagonal matrix OF THE fourth efficiency
v = ones(1,num_of_hours);
v=v.*efficiencies(4);
Diag_eff4_pos =diag(v);
Diag_eff4_neg=-Diag_eff4_pos;
%create lower triangular matrix positive and negative
v=tril(ones(num_of_hours,num_of_hours),-1);
pos_triangular=v+Diag1_pos;
neg_triangular=-pos_triangular;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
pos_triangular=pos_triangular/4; %for quarter hour
neg_triangular=neg_triangular/4;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Create the diagonal matrix OF THE bounds efficiency
v = ones(1,num_of_hours);
v=v.*bounds_efficiency(1);
Diag_bounds_eff1 =diag(v);
%Create the diagonal matrix OF THE bounds efficiency
v = ones(1,num_of_hours);
v=v.*bounds_efficiency(2);
Diag_bounds_eff2 =diag(v);
%Create the diagonal matrix OF THE bounds efficiency
v = ones(1,num_of_hours);
v=v.*bounds_efficiency(3);
Diag_bounds_eff3 =diag(v);
%Create the diagonal matrix OF THE bounds efficiency
v = ones(1,num_of_hours);
v=v.*bounds_efficiency(4);
Diag_bounds_eff4 =diag(v);
%create the upper bound value of y1 and y2
upper_y1=max_batt_discharge+max(PV);
upper_y2=max_batt_charge*(1/battery_effic_charge);
%Create the diagonal matrix of upper bound value of y1
v = ones(1,num_of_hours);
v=v.*upper_y1; %very big value for ours values
Diag_upper_pos_y1 =diag(v);
Diag_upper_neg_y1 =-Diag_upper_pos_y1;
%Create the diagonal matrix of upper bound value of y2
v = ones(1,num_of_hours);
v=v.*upper_y2; %very big value for ours values
Diag_upper_pos_y2 =diag(v);
Diag_upper_neg_y2 =-Diag_upper_pos_y2;
%% *****************************************************************************
%Objective Function
%
% F=[pgrid_pos pgrid_neg bat PDC y1:y4 B1:B4];
F=[c k*(-1) zeros(1,num_of_hours*4) zeros(1,num_of_hours*4*num_descrit)];
intcon = 6*num_of_hours+num_of_hours*2*num_descrit+1:length(F); %binary variables
% %BOUNDS
%**********Ina***
PgridMax=inf;%limit the power from grid: INA added to avoid spikes in charging batery
%***********
lb=[zeros(1,2*num_of_hours) zeros(1,2*num_of_hours) zeros(1,2*num_of_hours) zeros(1,num_of_hours*4*num_descrit) ];
% ub=[ones(1,2*num_of_hours)*(inf) ones(1,num_of_hours)*(max_batt_discharge) ones(1,num_of_hours)*(max_batt_charge) ones(1,2*num_of_hours)*(inf) ones(1,num_of_hours*4*num_descrit)*(inf) ];
ub=[ones(1,2*num_of_hours)*(PgridMax) ones(1,num_of_hours)*(max_batt_discharge) ones(1,num_of_hours)*(max_batt_charge) ones(1,2*num_of_hours)*(PgridMax) ones(1,num_of_hours*4*num_descrit)*(PgridMax) ];
效果展示:
34号资源-源程序:论文可在知网下载《基于混合整数规划的储能容量优化》本人博客有解读资源-CSDN文库https://download.csdn.net/download/LIANG674027206/88905716👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆下载资源链接👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆
《《《《《《《《更多资源还请持续关注本专栏》》》》》》》