how can i create an array constraints in Genetic algorithm for Renewable energy system optimization
조회 수: 2 (최근 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!