Code covered by the BSD License
-
dedemov(action);
DE function minimization demonstration.
-
devec(NP,D,F,CR,itermax,strat...
Run DE minimization
-
devec3(fname,VTR,D,XVmin,XVma...
minimization of a user-supplied function with respect to x(1:D),
-
eldde.m
This program solves the economic dispatch with Bmn coefficients by
-
xplt(NP,pop,vec,flag)
xplt plots a coloured point with coordinates vec(1), vec(2)
-
detest1.m
-
View all files
from
Solution to Economic Dispatch by Differential evolution
by Saloman Danaraj
this software solves the economic dispatch by differential evolution
|
| eldde.m |
% This program solves the economic dispatch with Bmn coefficients by
% Genetic Algorithm
% the data matrix should have 5 columns of fuel cost coefficients and plant limits.
% 1.a ($/MW^2) 2. b $/MW 3. c ($) 4.lower lomit(MW) 5.Upper limit(MW)
%no of rows denote the no of plants(n)
function[ F P1 Pl]=eldde(x,data)
global B Pd
x=abs(x);
n=length(data(:,1));
for i=1:n-1
if x(i)<data(i+1,4)
x(i)=data(i+1,4);
else
end
if x(i)>data(i+1,5)
x(i)=data(i+1,5);
else
end
end
P=x;
B11=B(1,1);
B1n=B(1,2:n);
Bnn=B(2:n,2:n);
A=B11;
BB1=2*B1n*P';
B1=BB1-1;
C1=P*Bnn*P';
C=Pd-sum(P)+C1;
x1=roots([A B1 C]);
xx=abs(min(x1));
if xx>data(1,5)
xx=data(1,5);
else
end
if xx<data(1,4)
xx=data(1,4);
else
end
P1=[xx P];
for i=1:n
F1(i)=data(i,1)* P1(i)^2+data(i,2)*P1(i)+data(i,3);
end
Pl=P1*B*P1';
lam=abs(sum(P1)-Pd-P1*B*P1');
F=sum(F1)+1000*lam;
|
|
Contact us at files@mathworks.com