Thanks for pointing this out. The bustypes() function is only intended
to be used on data that has been converted to internal consecutive bus
number via the ext2int() function. And, within MATPOWER it is always
used that way. Your updates do allow it to work on systems that have
not been converted to internal bus numbering, but it creates a dense
NB x 1 vector, where NB is the largest *external* bus number. This can
be can be fixed too with a minor change [1].
Now I need to decide whether to just update the documentation or to
actually add this extra step to the code.
Ray
[1] Change line 28 to: bus_gen_status_by_bus_i = Cg * sparse(ones(ng,
1));
On Nov 19, 2007, at 5:42 AM, [email protected] wrote:
Hello,
The code (in bustypes.m) for finding the number of turned-on
generators
connected to a bus
assumes that the bus identifiers in the bus array are consecutively
numbered. In general,
this does not need to be the case, however.
Here's a version which fixes this problem:
Best,
Jörg Lehmann
--
Dr. Joerg Lehmann
ABB Schweiz AG Tel: +41 58 586 70 59
Corporate Research Fax: +41 58 586 73 58
CH-5405 Baden-Dättwil Mail: [email protected]<bustypes.m>