GridMod / RTS-GMLC

Reliability Test System - Grid Modernization Lab Consortium
154 stars 82 forks source link

bus numbering in matpower format #90

Closed jd-lara closed 5 years ago

jd-lara commented 5 years ago

Matpower requires the buses to be numbered sequentially to enable some calculations.

PTDF = makePTDF(RTS_GMLC)
Error using makePTDF (line 70)
makePTDF: buses must be numbered consecutively in bus matrix; use ext2int() to convert to internal ordering

Using the Matpower provided function ext2int() eliminates branches and generates problems with the case.

It would be better to store the buses in sequential ordering to avoid case transformations.

ccoffrin commented 5 years ago

Renaming the buses would be a massive departure from the original RTS specification. I would recommend sticking with the standard bus numbers.

It may also be useful to note that every real-world dataset I have encountered does not have purely sequential bus ids.

jd-lara commented 5 years ago

The problem is that Matpower is removing some branches in the re-indexing process, complicating the use of some features to test that the calculations are valid. I don't know of any alternative then.

Checking the ext2int() I can't find why this is happening.

RTS_GMLC

ans = 

  struct with fields:

        version: '2'
        baseMVA: 100
          areas: [3×2 double]
            bus: [73×13 double]
            gen: [158×21 double]
         branch: [119×13 double]
        gencost: [158×12 double]
       bus_name: {73×1 cell}
    branch_name: {119×1 cell}
       gen_name: {158×3 cell}

>> ext2int(ans)

ans = 

  struct with fields:

        version: '2'
        baseMVA: 100
          areas: [3×2 double]
            bus: [72×13 double]
            gen: [96×21 double]
         branch: [117×13 double]
        gencost: [96×12 double]
       bus_name: {72×1 cell}
    branch_name: {119×1 cell}
       gen_name: {158×3 cell}
          order: [1×1 struct]
ccoffrin commented 5 years ago

To me this sounds like an issue for https://github.com/MATPOWER/matpower

jd-lara commented 5 years ago

@ccoffrin The RTS file I had had a mistake and it was fixed in the current version of the repo.