Load Dispatch

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

PROGRAM-7

Clc;
Clear all;
p = 0;
syms p1
syms p2
syms p3
syms L
a = input('Enter total power, P:');
h1 = 510+7.2*p1+.00142*p1.^2;
h2 = 310+7.85*p2+.00194*p2.^2;
h3 = 78+7.97*p3+.00482*p3.^2;
p = p1+p2+p3==a;
fuel_cost1=1.1;
fuel_cost2=1.0;
fuel_cost3=1.0;

f1=fuel_cost1*h1;
f2=fuel_cost2*h2;
f3=fuel_cost3*h3;

d1=diff(f1,p1)==L;
d2=diff(f2,p2)==L;
d3=diff(f3,p3)==L;

sol=solve(d1,d2,d3,p);
p1=double(sol.p1)
p2=double(sol.p2)
p3=double(sol.p3)
lambda=double(sol.L)

You might also like