Dear Zhangshuo,
For running repeated simulations with varying input data, I recommend
loading the case file into a struct (via loadcase) then modifying the
data in this struct and passing it to the appropriate run*pf function.
For example, you might change your loop to ...
mpc = loadcase('Datax');
for nx=1:py
mpc.gen(:,8)=genmat(:,nx);
mpc.branch(:,11)=bramat(:,nx);
mpc.bus(:,3)=fuhemat(:,nx);
[baseMVAo,buso,geno,brancho,success,et]=rundcpf(mpc);
end
Hope this helps,
--
Ray Zimmerman
Senior Research Associate
428-B Phillips Hall, Cornell University, Ithaca, NY 14853
phone: (607) 255-9645
On Aug 6, 2008, at 12:43 PM, zs_c1 wrote:
Dear Matpower Developer :
I have some problems with Matpower 3.0.0. The name of my data file
is ‘Datax.m’, I change its data each time before running
Matpower(with this sentence: ‘[baseMVAo, buso, geno, brancho,
success, et] = rundcpf('Datax');’ )by such functions, but the data
Matpower calculating is not change, every result is the same as
previous one.
Matpower is great tool for solving power flow, but I am a beginner
of programming and Matpower, this problem nearly drive me crazy. How
can I solve this problem? Or you could help me writing some
appropriate functions in the file I sent you to fix this issue.
Thank you all very much and welcome to Beijing.
BTW: the accessories file is main functional sentences, copy all to
Command Window and run you will see the same results of Matpower
calculition.
Yours
Zhangshuo
<MymatpowerQ.m>