MATLAB's Report Dr. Mohamed EL-Shimy M. Bekhet
MATLAB's Report Dr. Mohamed EL-Shimy M. Bekhet
College of Engineering
Third Year Electrical Power & Machines Department
Economics of Generation & Operation
MATLAB’s Report
Kmax = 15
The solution code:
pl(k+1)=B11*((p(k+1,1))^2)+B22*((p(k+1,2
))^2)+2*B12*p(k+1,1)*p(k+1,2);
deltap(k+1)=pd+pl(k+1)-p(k+1,1)-
p(k+1,2);
lamda(k+1)=lamda(k)+alfa*deltap(k+1);
end
end
deltap(1)=0;
%ending of the iteration process
i=[0:(length(pl)-1)]';
%printing the output
fprintf('output order in matrix m is
order ,p1 ,p2 ,losses , delta p , price
of energy');
%outputing the results
m=[i,p,pl',deltap',lamda']
Results of code’s runtime :
This is a sample runtime of the code on MATLAB
output order in matrix m is order ,p1 ,p2 ,losses , delta p , price of energy
m=