pes2014/func_deltF.m

15 lines
330 B
Mathematica
Raw Normal View History

2012-11-16 22:47:06 +08:00
function deltF=func_deltF(PG,QG,PVi,PGi,wPG,wQG,wPD,wQD,PG0,QG0,PD0,PD,QD,QD0,Busnum,Loadi)
t1=2*wPG.*(PG(PGi) - PG0(PGi) );
t2=2*wQG.*(QG(PVi) - QG0(PVi) );
t3=2*wPD.*(PD(Loadi)-PD0(Loadi));
2012-11-16 22:47:06 +08:00
t4=2*wQD.*(QD(Loadi)-QD0(Loadi));
2012-05-22 11:33:21 +08:00
deltF=[
sparse(t1);
sparse(t2);
sparse(t3);
2012-11-16 22:47:06 +08:00
sparse(t4);
sparse(2*Busnum,1);
2012-05-22 11:33:21 +08:00
];
end