Enviado desde mi dispositivo BlackBerry® de Claro Dominicana
-----Original Message-----
From: iman <[email protected]>
Sender: [email protected]
Date: Wed, 16 Nov 2011 19:16:48
To: <[email protected]>
Reply-To: "MATPOWER discussion forum" <[email protected]>
Subject: I want to add a 10MW generator to bus 7
Dear All,
I have a quick question about MATPOWER.
From MATPOWER documentation we know if we want to load the 30-bus system
data from case30.m,increase its real power demand at bus 2 to 30 MW, then
run an AC optimal power flow with default options, this could be
accomplished as follows:
>> define_constants;
>> mpc = loadcase('case30');
>> mpc.bus(2, PD) = 30;
>> runopf(mpc);
Now I want to add a 10MW generator to bus 7 and run pf (not opf) for 14 bus
system so I write:
>> define_constants;
>> mpc = loadcase('case14');
>> mpc.gen (7, PG) = 10; //add 10MW to bus 7
>>mpc.bus (7, BUS_TYPE) = 2; // changes the type of bus 7 to PV
>> runpf(mpc);
but I recieve this error:
??? Subscript indices must either be real positive integers or logicals.
Error in ==> ext2int at 230
gs = ( mpc.gen(:, GEN_STATUS) > 0 & ... %% gen status
Error in ==> runpf at 131
mpc = ext2int(mpc);
Do u know what is wrong with my code?
Thanks
--part2265-boundary-861242848-228417209
Content-Transfer-Encoding: base64
Content-Type: text/html;
charset="utf-8"
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html><head><meta
content="text/html; charset=utf-8" http-equiv="Content-Type"></head><body>
<div>Enviado desde mi dispositivo BlackBerry® de Claro
Dominicana</div><hr/><div><b>From: </b> iman <[email protected]>
</div><div><b>Sender: </b> [email protected]
</div><div><b>Date: </b>Wed, 16 Nov 2011 19:16:48 +0000</div><div><b>To:
</b><[email protected]></div><div><b>ReplyTo: </b> "MATPOWER
discussion forum" <[email protected]>
</div><div><b>Subject: </b>I want to add a 10MW generator to bus
7</div><div><br/></div>Dear All,<br><br>I have a quick question about
MATPOWER.<br><br>From
MATPOWER documentation we know if we want to load the 30-bus system
data from case30.m,increase its real power demand at bus 2 to 30 MW,
then run an AC optimal power flow with default options, this could be
accomplished as follows:<br>
<br>>> define_constants;<br>>> mpc =
loadcase('case30');<br>>> mpc.bus(2, PD) = 30;<br>>>
runopf(mpc);<br> <br>Now I want to add a 10MW generator to bus 7 and run pf
(not opf) for 14 bus system so I write:<br>
<br>>> define_constants;<br>
>> mpc = loadcase('case14');<br>
>> mpc.gen (7, PG) = 10; //add 10MW to bus
7<br>>>mpc.bus (7, BUS_TYPE) = 2; // changes the type of bus 7 to
PV<br>
>> runpf(mpc);<br clear="all"><br>but I recieve this error:<br><br>???
Subscript indices must either be real positive integers or
logicals.<br><br>Error in ==> ext2int at 230<br> gs = (
mpc.gen(:, GEN_STATUS) > 0 & ... %% gen status<br>
<br>Error in ==> runpf at 131<br>mpc = ext2int(mpc);<br><br>Do u know what
is wrong with my code?<br><br>Thanks
</body></html>
--part