how can i create an array constraints in Genetic algorithm for Renewable energy system optimization
1 回表示 (過去 30 日間)
古いコメントを表示
function [c,ceq]=Hconstraint(n)
load('assignment_input_data.mat'); %loading data required for thePV system and wind turbine
%PV calculation-------------------------------------------------------
Npv=0.12; %efficiency of the solar module selected
%n(1) the area of the PV array
Ir=repmat(ir',1,30); %changing the matrix of solar irradiance to 12X720
Ir=Ir(:); %changing the matrix to vector 8640X1
Ppv=Ir*n(1).*Npv; %calculate the output power produced by the pv system
L= repmat(demand',1,30); %converting demand array to 12x720
L=L(:); %Load
P=Ppv; %renewable output power
Pd=P-L; %power defcit
%-------------------------------------------------------------------
cost=100000*n(1)+2000;
%objective
c1=zeros(8640,1);
for i=1:8640
c1(i)=-P(i)+L(i);
end
P=sum(P);
LCOE=cost/P;
c=[c1];
ceq=[];
end
1 件のコメント
Asvin Kumar
2020 年 4 月 10 日
Since the rest of the community might be unfamiliar with the equations you're trying to implement, it would help to provide details on that. To begin with, have you had a look at the following page: https://www.mathworks.com/help/gads/examples/constrained-minimization-using-the-genetic-algorithm.html?
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Genetic Algorithm についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!